
var currentFrm='';var currentType='';var mouseX=0;var mouseY=0;var destLoaderHTML='<div style="text-align:center"><img src="/images/animations/ajax-loader-white.gif" style="margin-top:40px; margin-bottom:5px;" /><br /><div style="margin-bottom:4px;"><strong>Loading destinations... Please wait.</strong></div></div>';function getDestinationHelpDest(country,type){sURL="/includes/destinationhelp/lookup_dest.asp?country="+country+"&type="+type+"&qsss";if(!country){openDestinationHelp(currentType,currentFrm);}else{if(document.getElementById('destinationHelpDest')){document.getElementById('destinationHelpDest').innerHTML=destLoaderHTML;}
if(sURL){setTimeout("loadDestinationHelpXMLDoc('"+sURL+"','dest')",100);}}}
function setDestination(value){document.forms[currentFrm].freetext.value=value;closeDestinationHelp();}
function closeDestinationHelp(){clearInterval(intervalAutoComplete);document.getElementById('destinationHelp').style.display='none';if(document.getElementById('destinationHelpFrame')){document.getElementById('destinationHelpFrame').style.display='none';}
grayOut(false);}
function openDestinationHelp(type,cform){clearInterval(intervalAutoComplete);currentType=type;currentFrm=cform;sURL="/includes/destinationhelp/lookup_top.asp?type="+type+"&qs";if(sURL){grayOut(true);setTimeout("loadDestinationHelpXMLDoc('"+sURL+"','top')",100);}}
function loadDestinationHelpXMLDoc(url,type){if(type=='top'){var processChange=processDestinationHelpTop;}else{var processChange=processDestinationHelpDest;}
if(window.XMLHttpRequest){req=new XMLHttpRequest();req.onreadystatechange=processChange;req.open("GET",url,true);req.send(null);}else if(window.ActiveXObject){req=new ActiveXObject("Microsoft.XMLHTTP");if(req){req.onreadystatechange=processChange;req.open("GET",url,true);req.send();}}}
function processDestinationHelpDest(){if(req.readyState==4){if(req.status==200){html=req.responseText;if(document.getElementById('destinationHelpDest')){document.getElementById('destinationHelpDest').innerHTML=html;}}else{alert("There was a problem retrieving the XML data:\n"+req.statusText);grayOut(false);}}}
function processDestinationHelpTop(){if(req.readyState==4){if(req.status==200){html=req.responseText;document.getElementById('destinationHelp').style.display='block';if(document.getElementById('destinationHelpFrame')){document.getElementById('destinationHelpFrame').style.top=document.getElementById('destinationHelp').offsetTop+'px';document.getElementById('destinationHelpFrame').style.left=document.getElementById('destinationHelp').offsetLeft+'px';document.getElementById('destinationHelpFrame').style.width='520px';document.getElementById('destinationHelpFrame').style.height='350px';document.getElementById('destinationHelpFrame').style.display='block';}
if(document.getElementById('destinationHelpTop')){document.getElementById('destinationHelpTop').innerHTML=html;}
if(document.getElementById('destinationHelpDest')){if(currentType=='airport'){sHTML='<div style="margin-top:25px; margin-left:10px;">';sHTML+='<strong>Not sure of the name of the airport?</strong><br><br>';sHTML+='<div style="float:left"><img src="/images/other/alternative_dest.gif" style="margin-left:10px;" /></div>';sHTML+='<div style="float:left; margin-top:5px;">';sHTML+='<ul type="square">'
sHTML+='<li>Choose the country you are travelling to from the drop down.</li>';sHTML+='<li>All airports are listed alphabetically.</li>';sHTML+='<li>Click on the correct airport.</li>';sHTML+='<li>Search</li>';sHTML+='<li>Fly!</li>';sHTML+='</ul>'
sHTML+='</div>'
sHTML+='</div>'}else{sHTML='<div style="margin-top:25px; margin-left:10px;">';sHTML+='<strong>Not sure of the name of the city?</strong><br><br>';sHTML+='<div style="float:left"><img src="/images/other/alternative_dest.gif" style="margin-left:10px;" /></div>';sHTML+='<div style="float:left; margin-top:5px;">';sHTML+='<ul type="square">'
sHTML+='<li>Choose the country you are travelling to from the drop down.</li>';sHTML+='<li>All cities are listed alphabetically.</li>';sHTML+='<li>Click on the correct city.</li>';sHTML+='<li>Search</li>';sHTML+='</ul>'
sHTML+='</div>'
sHTML+='</div>'}
document.getElementById('destinationHelpDest').innerHTML=sHTML;}}else{alert("There was a problem retrieving the XML data:\n"+req.statusText);}}}
