var g_sRegionID="";var g_sRatingTypeID="";var g_sRatingID="";var g_sKeywords="";var g_sCurrency="";var g_bSearch=false;function getPagingContent(c,d){var e="";if(g_sRatingTypeID!="0"&&g_sRatingTypeID!=""){e="&RatingTypeID="+g_sRatingTypeID}if(g_sRatingID!="0"&&g_sRatingID!=""){e="&RatingID="+g_sRatingID}var b="/wayntravels.html?wci=attractions&wce=enter&submittype=content&RegionID="+g_sRegionID+e+"&keywords="+g_sKeywords+"&currency="+g_sCurrency+"&page="+c+"&page_size="+d;if(g_sRegionID!=0&&g_bSearch==true){var a=new Ajax.Updater("isango_content",b,{method:"get"})}else{msgBox("warning","You must choose destination or city")}}function setDestCity(){var a=document.getElementById("region");var b=a.options[a.selectedIndex].getAttribute("region_key");if(b!=0){getDestination(a)}}function logRedirectingEvent(g,f,b,d,e,c){var a="/wayntravels.html?wci=attractions&wce=enter&submittype=logevent";new Ajax.Request(a,{onSuccess:function(h){if(h.responseText=="-1"){}},onFailure:function(){return false},method:"post",postBody:"sPID="+g+"&sPN="+encodeURIComponent(f)+"&sCN="+encodeURIComponent(b)+"&sDN="+encodeURIComponent(d)+"&sTN="+encodeURIComponent(e)+"&sAN="+encodeURIComponent(c)})}function getContent(o,q){var f=document.getElementById("destination");var g=document.getElementById("region");var l=document.getElementById("activity_type");var h=document.getElementById("currency");var d=document.getElementById("city");var b="";var k="";var n="";var j=l.options[l.selectedIndex].getAttribute("sub");if(j=="AT"){b=l.options[l.selectedIndex].getAttribute("value")}else{k=l.options[l.selectedIndex].getAttribute("value")}if(b!="0"&&b!=""){n="&RatingTypeID="+b}if(k!="0"&&k!=""){n="&RatingID="+k}var e=h.options[h.selectedIndex].getAttribute("value");if(e==""||e=="0"){e="GBP"}var p=document.getElementById("keywords_id").getAttribute("value");var m=d.options[d.selectedIndex].getAttribute("value");if(m=="0"||m==""){m=f.options[f.selectedIndex].getAttribute("value")}var c="/wayntravels.html?wci=attractions&wce=enter&submittype=content&RegionID="+m+n+"&currency="+e+"&keywords="+p+"&page="+o+"&page_size="+q;if(m!="0"&&m!=""){var a=new Ajax.Updater("isango_content",c,{method:"get"});g_sRegionID=m;g_sRatingTypeID=b;g_sRatingID=k;g_sKeywords=p;g_sCurrency=e;g_bSearch=true}else{g_sRegionID="";g_sRatingTypeID="";g_sRatingID="";g_sKeywords="";g_sCurrency="";g_bSearch=false;msgBox("warning","You must choose destination or city")}}function showIsangoContent(a){document.getElementById("isango_content").innerHTML=a}function getDestination(d){var c=document.getElementById("destination");c.innerHTML="";var e=null;var a=d.options[d.selectedIndex].getAttribute("region_key");var b="/wayntravels.html?wci=attractions&wce=enter&submittype=get_dest&parent_region_key="+a;new Ajax.Request(b,{method:"GET",onFailure:function(){msgBox("error","Sorry we're unable to execute the search. Please try again later (2-"+e.status+").")},onSuccess:function(j){var f=j.responseXML.getElementsByTagName("destination");for(i=0;i<f.length;i++){if(f[i].nodeName!="#text"){if(f[i].getAttribute("name")!="not to use"){var g=document.createElement("option");g.setAttribute("region_key",f[i].getAttribute("region_key"));g.setAttribute("value",f[i].getAttribute("value"));if(f[i].getAttribute("value")==g_sRegionID&&g_sRegionID!=""){g.selected=true}if(f[i].getAttribute("sub")=="1"){g.innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;"+f[i].getAttribute("name")}else{g.innerHTML=f[i].getAttribute("name")}c.appendChild(g)}}}var h=e.responseXML.getElementsByTagName("city");for(i=0;i<h.length;i++){if(h[i].nodeName!="#text"){var g=document.createElement("option");g.setAttribute("region_key",h[i].getAttribute("region_key"));g.setAttribute("value",h[i].getAttribute("value"));if(h[i].getAttribute("value")==g_sRegionID&&g_sRegionID!=""){g.selected=true}if(h[i].getAttribute("sub")=="1"){g.innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;"+h[i].getAttribute("name")}else{g.innerHTML=h[i].getAttribute("name")}c.appendChild(g)}}}})}function goAttractionSearch(k){var c=$("destination");var d=$("region");var g=$("activity_type");var a="";var f="";var l="";var e=g.options[g.selectedIndex].getAttribute("sub");if(e=="AT"){a=g.options[g.selectedIndex].getAttribute("value")}else{f=g.options[g.selectedIndex].getAttribute("value")}if(a!="0"&&a!=""){l="&RatingTypeID="+a}if(f!="0"&&f!=""){l="&RatingID="+f}var m="";m=$("keywords_id").value;var h="";if(h=="0"||h==""){h=c.options[c.selectedIndex].getAttribute("value")}var b="/wayntravels.html?wci=search&wce=enter&submittype=attraction_search&RegionID="+h+l+"&keywords="+m;if(h!="0"&&h!=""){var j=$("tmpFormThingToDo");j.action=b+"&searchBoxTracker="+k;WAYN.Popup.showLoader();document.tmpFormThingToDo.submit()}else{msgBox("warning","You must choose destination.")}};
