var XmlHttp;function CreateXmlHttp(){try{XmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{XmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(oc){XmlHttp=null}}if(!XmlHttp&&typeof XMLHttpRequest!="undefined"){XmlHttp=new XMLHttpRequest()}}function destinationChanged(destination){if(destination!='0'){var requestUrl=AjaxServerPageName+"?x="+encodeURIComponent(destination);document.getElementById("validateDestinationGateway").style.display='none';CreateXmlHttp();if(XmlHttp){XmlHttp.onreadystatechange=HandleResponse;XmlHttp.open("GET",requestUrl,true);XmlHttp.send(null)}}else{var resortList=document.getElementById("ctl00_cph1_Inc_iq1_resort");for(var count=resortList.options.length-1;count>-1;count--){resortList.options[count]=null}var textValue;var optionItem;optionItemSelect=new Option(' - Select Destination First -','0',false,false);resortList.options[0]=optionItemSelect;resortList.selected=0;resortList.disabled=true}}function HandleResponse(){if(XmlHttp.readyState==4){if(XmlHttp.status==200){ClearAndSetResortListItems(XmlHttp.responseXML.documentElement)}else{alert("There was a problem retrieving data from the server.")}}}function ClearAndSetResortListItems(destinationNode){var resortList=document.getElementById("ctl00_cph1_Inc_iq1_resort");for(var count=resortList.options.length-1;count>-1;count--){resortList.options[count]=null}var resortNodes=destinationNode.getElementsByTagName('resort');var textValue;var optionItem;optionItemSelect=new Option(' - Select Resort (Optional) -','0',false,false);resortList.options[0]=optionItemSelect;resortList.selected=0;for(var count=0;count<resortNodes.length;count++){textValue=GetInnerText(resortNodes[count]);selectValue=resortNodes[count].getAttribute("value");optionItem=new Option(textValue,selectValue,false,false);resortList.options[resortList.length]=optionItem}resortList.disabled=false}function GetInnerText(node){return(node.textContent||node.innerText||node.text)}