var xmlHttp; var facility = []; var category = []; var scriptname; var id='null'; var idplace='null'; var idplace1='null'; var idregion="null"; var languagetype=''; if(window.location.hostname == "localhost") { scriptname = "CultBayAssembly.php"; }else { scriptname = "/CultBayAssembly.php"; } function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { //alert(xmlHttp.responseText); document.getElementById("regiondisp").innerHTML=xmlHttp.responseText; getPlacesListFromCountry(id); } } function stateChangedregion() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById("regiondisp").innerHTML=xmlHttp.responseText; placeMapList(idplace); } } function stateChanged1() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById("placedisp").innerHTML=xmlHttp.responseText; regionajaxfunction(id); } } function stateChanged2() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById("googlemap").innerHTML=xmlHttp.responseText; } } function stateChanged3() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById("resultsdisplay").innerHTML=xmlHttp.responseText; } } function stateChanged4() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById("facilityexpand").innerHTML=xmlHttp.responseText; var x= document.getElementsByName("facility[]"); for(var k=0;k (endDate - ONEDAY))) { //end date can't be before start date return true; } var now = new Date().getTime(); if (date < (now - ONEDAY)) { //end date can't be prior to today return true; } return false; } function filter(cal) { var date = cal.date; startDate = date.getTime(); date.setDate(date.getDate()+2); TD = date.getDate(); TY = date.getFullYear(); TM = Zapatec.Calendar.i18n(date.getMonth(), "smn"); document.getElementById("ddate").value = TD + " " + TM + " " + TY; } function filterDates1(cal) { startDate = cal.date; /* If they haven't chosen an end date before we'll set it to the same date as the start date This way if the user scrolls in the start date 5 months forward, they don't need to do it again for the end date. */ //if (endDate == null) { Zapatec.Calendar.setup({ inputField : "ddate", button : "button8b", // What will trigger the popup of the calendar ifFormat : "%e %b %Y", date : startDate, electric : false, showsTime : false, //no time disableFunc : disallowDateBefore, //the function to call onUpdate : filterDates2 }); //} } function filterDates2(cal) { endDate = cal.date; } /* * Both functions disable and hilight dates. */ // end hiding contents from old browsers --> var cal = new Zapatec.Calendar.setup({ inputField : "adate", // id of the input field button : "button8a", // What will trigger the popup of the calendar ifFormat : "%e %b %Y", // format of the input field timeFormat : "24", showsTime : false, //no time electric : false, dateStatusFunc : disallowDateAfter, //the function to call onUpdate : filter }); Zapatec.Calendar.setup({ inputField : "ddate", button : "button8b", // What will trigger the popup of the calendar ifFormat : "%e %b %Y", timeFormat : "24", showsTime : false, //no time electric : false, dateStatusFunc : disallowDateBefore, //the function to call onUpdate : filterDates2 }); Zapatec.Calendar.setup({ inputField : "adate", // id of the input field button : "adate", // What will trigger the popup of the calendar ifFormat : "%e %b %Y", // format of the input field: Mar 18, 2005 showsTime : false, //no time disableFunc : disallowDateAfter, //the function to call onUpdate : filter }); Zapatec.Calendar.setup({ inputField : "ddate", button : "ddate", // What will trigger the popup of the calendar ifFormat : "%e %b %Y", // format of the input field: Mar 18, 2005 showsTime : false, //no time disableFunc : disallowDateBefore, //the function to call onUpdate : filterDates2 }); } function stateChanged6() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById("link").innerHTML=xmlHttp.responseText; call_instance(); } } function quicklink() { xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } //var url="/CultBayAssembly.php"; var url= scriptname; url=url+"?quicklink=yes"; xmlHttp.onreadystatechange=stateChanged6; xmlHttp.open("GET",url,true); xmlHttp.send(null); // location.href='CultBayAssembly.php?quicklink=yes'; //header("location:") } function getRegionList(str) { //alert(str); if(str!=='-------------'){ xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } id= str; document.getElementById("placedisp").innerHTML=''; // var url="/CultBayAssembly.php"; var url= scriptname; url=url+"?regionlist="+str; url=url+"&sid="+Math.random(); //alert(url); xmlHttp.onreadystatechange=stateChanged; xmlHttp.open("GET",url,true); xmlHttp.send(null); }else{ regionajaxfunction("Germany"); } } /*function created by Ramesh @ 13 th july 2008 *this function is used for getting the getting the place list from the database * */ function getPlaceList(str) { xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } //alert(str); //var url="/CultBayAssembly.php"; var url=scriptname; url=url+"?region="+str; url=url+"&sid="+Math.random(); idregion=str; xmlHttp.onreadystatechange=function(){ if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { document.getElementById("placedisp").innerHTML=xmlHttp.responseText; placeajaxfunction(str); } } xmlHttp.open("GET",url,true); xmlHttp.send(null); } function getPlacesListFromCountry(str) { xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } // alert(str); //var url="/CultBayAssembly.php"; var url=scriptname; url=url+"?countrylist="+str; url=url+"&sid="+Math.random(); xmlHttp.onreadystatechange=stateChanged1; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function getRegionListFromPlace(str1,str2) { xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } //var url="/CultBayAssembly.php"; var url=scriptname; url=url+"?placelist1="+str1; url=url+"&placelist2="+str2; url=url+"&sid="+Math.random(); idplace=str1; xmlHttp.onreadystatechange=stateChangedregion; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function test() { var myWidth; var myHeight; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight+10; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight+10; } if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { // embedScript("/CultBayAssembly.php?map=1&width="+myWidth+"&height="+myHeight+"callback=true&Location=" + xmlHttp.responseText, "googlemap", "Please wait...", "Sorry couldn't load the page!"); embedScript(scriptname+"?map=1&width="+myWidth+"&height="+myHeight+"callback=true&Location=" + xmlHttp.responseText, "googlemap", "Please wait...", "Sorry couldn't load the page!"); } } /*function created by Ramesh @ 13 th july 2008 *this function is used for displaying the google map in the front page by taking the country name andregion name and palce ** */ function getMapList(str, url, func) { xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } if( url === null ) { var country=document.cultform.country.value; var region=document.cultform.region.value; url=scriptname; url=url+"?place="+str+"&countryname="+country+"®ionname="+region; url=url+"&sid="+Math.random(); document.getElementById("googlemap").innerHTML = "Please wait while the map loads..."; } if(func === null) { func = test; } xmlHttp.onreadystatechange=func; xmlHttp.open("GET",url,true); xmlHttp.send(null); } //Added by Akshata 17th April for html template google Map function startmap(longlat){ //embedScript("/CultBayAssembly.php?longlat="+longlat, "hotelonmap", "loading...", "Sorry couldn't load the page!"); embedScript(scriptname+"?longlat="+longlat, "hotelonmap", "loading...", "Sorry couldn't load the page!"); } function start(){ var myWidth; var myHeight; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight+10; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight+10; } // wWidth = window.innerWidth; // wHeight = window.innerHeight; // embedScript("/CultBayAssembly.php?map=start&width="+myWidth+"&height="+myHeight, "googlemap", "loading...", "Sorry couldn't load the page!"); embedScript(scriptname+"?map=start&width="+myWidth+"&height="+myHeight, "googlemap", "loading...", "Sorry couldn't load the page!"); } function gotohome(){ if(document.getElementById("maptable")){ document.getElementById("maptable").style.display = 'none'; document.getElementById("loading").style.display = 'block'; } // location.href="/CultBayAssembly.php"; location.href=scriptname; } function home(){ location.href=scriptname+"?home=homepage"; } function changelang(str){ if(document.getElementById("maptable")){ document.getElementById("maptable").style.display = 'none'; document.getElementById("loading").style.display = 'block'; } if(str== 'en') { //location.href="http://www.cultbay.com/CultBayAssembly.php?lang=en"; location.href=scriptname+"?lang=en"; } else{ //location.href="http://www.cultbay.com/CultBayAssembly.php?lang=de"; location.href=scriptname+"?lang=de"; } } function beforeSubmit() { var valid= 'true'; date1=document.getElementById("adate").value; date2=document.getElementById("ddate").value; Date1=new Date(date1); Date2=new Date(date2); nofdays=days_between(Date1, Date2); var val2=document.getElementById('torating').value; var val1=document.getElementById('fromrating').value; if (parseInt(val2) < parseInt(val1)){ alert("From value Should be less than To Value"); } else if (valid =='true'){ if(document.getElementById("noofnights") != undefined) { nnights=document.getElementById("noofnights").value; if( nnights> nofdays){ alert('Number of nights should be within the dates range selected'); } else{ if (document.getElementById("maptable")){ document.getElementById("maptable").style.display = 'none'; document.getElementById("loading").style.display = 'block'; } document.cultform.submit(); } }else{ if (document.getElementById("maptable")){ document.getElementById("maptable").style.display = 'none'; document.getElementById("loading").style.display = 'block'; } document.cultform.submit(); } } } function val(num) { document.getElementById("resultsdisplay").innerHTML="Loading... "; xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } if(num===0) { num=1; } // var url="/CultBayAssembly.php"; var url=scriptname; url=url+"?page="+num; url=url+"&sid="+Math.random(); xmlHttp.onreadystatechange=stateChanged3; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function getSortedList(str) { document.getElementById("resultsdisplay").innerHTML="Loading... "; xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } // var url="/CultBayAssembly.php"; var url=scriptname; //url=url+"?sorted="+str; url=url+"?sorted="+str; url=url+"&sid="+Math.random(); xmlHttp.onreadystatechange=stateChanged3; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function getSortedAuctionList(str) { document.getElementById("resultsdisplay").innerHTML="Loading... "; xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } // var url="/CultBayAssembly.php"; var url=scriptname; //url=url+"?sorted="+str; url=url+"?auctionloop=true&sortedauctions="+str; url=url+"&sid="+Math.random(); xmlHttp.onreadystatechange=stateChanged3; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function getNumberofrecords(str){ document.getElementById("resultsdisplay").innerHTML="Loading... "; xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } var url=scriptname; url=url+"?number="+str; xmlHttp.onreadystatechange=stateChanged3; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function getCurrency(str) { document.getElementById("resultsdisplay").innerHTML="Loading... "; xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } // var url="/CultBayAssembly.php"; var url=scriptname; url=url+"?currencytype="+str; url=url+"&sid="+Math.random(); xmlHttp.onreadystatechange=stateChanged3; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function displayrespectivehotels(str) { document.getElementById("resultsdisplay").innerHTML="Loading... "; xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } // var url="/CultBayAssembly.php"; var url=scriptname; url=url+"?displaytype="+str; url=url+"&sid="+Math.random(); xmlHttp.onreadystatechange=stateChanged3; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function facilityexpand(fact){ //alert(fact); xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } //var url="/CultBayAssembly.php"; var url=scriptname; url=url+"?facilities=facility&fact1="+fact+"&sid="+Math.random(); xmlHttp.onreadystatechange=stateChanged4; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function categoryexpand(cat){ // alert(cat); xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } //var url="/CultBayAssembly.php"; var url=scriptname; url=url+"?category=category&cat1="+cat+"&sid="+Math.random(); xmlHttp.onreadystatechange=stateChanged5; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function facilitycompress(){ xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } //var url="/CultBayAssembly.php"; var url=scriptname; url=url+"?compress=facility"; xmlHttp.onreadystatechange=stateChanged4; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function categorycompress(){ xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } var url=scriptname; url=url+"?compress=category"; xmlHttp.onreadystatechange=stateChanged5; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function show_auctions(str){ //alert(str); document.getElementById("resultsdisplay").innerHTML="please wait transfering the auction details page.."; document.getElementById("resultsbar").innerHTML=" "; xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } //var url="/CultBayAssembly.php"; var url=scriptname; url=url+"?auctionid="+str; url=url+"&sid="+Math.random(); xmlHttp.onreadystatechange=stateChanged3; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function val1(num) { xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } if(num===0) { num=1; } //var url="/CultBayAssembly.php"; var url=scriptname; url=url+"?pagenum="+num; xmlHttp.onreadystatechange=stateChanged3; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function managefacility(val,obj){ if(obj.checked){ facility.push(val); }else{ facility.splice(facility.indexOf(val), 1); } } function managecategory(val,obj){ if(obj.checked){ category.push(val); }else{ category.splice(category.indexOf(val), 1); } } function facilitystate(){ var x= document.getElementsByName("facility[]"); for(var k=0;k parseInt(val2)){ alert("To value should be greater than From"); } } function Checkfromrating(){ var val2=document.getElementById('torating').value; var val1=document.getElementById('fromrating').value; if(val2>=1){ if(parseInt(val2) < parseInt(val1)){ alert("From value Should be less than To Value"); } }else{ document.getElementById('torating').selectedIndex= val1; } } function stateChangedSpecificDate(){ if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { if(languagetype == 'en'){ document.getElementById("specificperiod").innerHTML=' I don\'t have specific dates yet'; document.getElementById("checkin").innerHTML='Earlest Arrival:'; document.getElementById("checkout").innerHTML='Latest Departure:'; } else if( languagetype == 'de'){ document.getElementById("specificperiod").innerHTML=' Anreisedatum noch nicht bekannt'; document.getElementById("checkin").innerHTML='Früheste Anreise:'; document.getElementById("checkout").innerHTML='Späteste Abreise:'; } document.getElementById("adate").value="optional"; document.getElementById("ddate").value="optional"; document.getElementById("nospecific").innerHTML=xmlHttp.responseText; } } function selectSpecificDates(langtype){ //alert("ramesh"); languagetype= langtype document.getElementById("specificperiod").innerHTML="Loading .."; xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } var url=scriptname; url=url+"?specificdates=specificdates"; xmlHttp.onreadystatechange=stateChangedSpecificDate; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function deSelectDates(){ if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { if(languagetype == 'en'){ document.getElementById("specificperiod").innerHTML=''; document.getElementById("checkin").innerHTML='Check IN:'; document.getElementById("checkout").innerHTML='Check OUT:'; document.getElementById("nospecific").innerHTML=' I don\'t have specific dates yet'; } else if( languagetype == 'de'){ document.getElementById("specificperiod").innerHTML=''; document.getElementById("checkin").innerHTML='Check IN:'; document.getElementById("checkout").innerHTML='Check OUT:'; document.getElementById("nospecific").innerHTML=' Anreisedatum noch nicht bekannt'; } document.getElementById("adate").value="optional"; document.getElementById("ddate").value="optional"; } } function deselectSpecificDates(langtype){ languagetype= langtype document.getElementById("specificperiod").innerHTML="Loading .."; xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } var url=scriptname; url=url+"?deselectdates=deselectdates"; xmlHttp.onreadystatechange=deSelectDates; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function checkDate(noofnights){ nnights=noofnights date1=document.getElementById("adate").value; date2=document.getElementById("ddate").value; Date1=new Date(date1); Date2=new Date(date2); nofdays=days_between(Date1, Date2); if(nnights > nofdays) { alert('Number of nights should be within the dates range selected'); } } function days_between(date1, date2) { // The number of milliseconds in one day var ONE_DAY = 1000 * 60 * 60 * 24 // Convert both dates to milliseconds var date1_ms = date1.getTime() var date2_ms = date2.getTime() // Calculate the difference in milliseconds var difference_ms = Math.abs(date1_ms - date2_ms) // Convert back to days and return return Math.round(difference_ms/ONE_DAY) } var startDate; var endDate; var callbacks = 0; function changedate(obj,lang) { var months = new Array(13); if(lang =="en") { months["Jan"] = 0; months["Feb"] = 1; months["Mar"] = 2; months["Apr"] = 3; months["May"] = 4; months["Jun"] = 5; months["Jul"] = 6; months["Aug"] = 7; months["Sep"] = 8; months["Oct"] = 9; months["Nov"] = 10; months["Dec"] = 11; months["01"] = "Jan"; months["02"] = "Feb"; months["03"] = "Mar"; months["04"] = "Apr"; months["05"] = "May"; months["06"] = "Jun"; months["07"] = "Jul"; months["08"] = "Aug"; months["09"] = "Sep"; months["10"] = "Oct"; months["11"] = "Nov"; months["12"] = "Dec"; } if(lang == "de") { months["Januar"] = 0; months["Februar"] = 1; months["Marz"] = 2; months["April"] = 3; months["Mai"] = 4; months["Juni"] = 5; months["Juli"] = 6; months["August"] = 7; months["September"] = 8; months["Oktober"] = 9; months["November"] = 10; months["Dezember"] = 11; months["01"] = "Januar"; months["02"] = "Februar"; months["03"] = "Marz"; months["04"] = "April"; months["05"] = "Mai"; months["06"] = "Juni"; months["07"] = "Juli"; months["08"] = "August"; months["09"] = "September"; months["10"] = "Oktober"; months["11"] = "November"; months["12"] = "Dezember"; } var str_day = obj.value.split(" "); // var str = str_day[1].split(" "); //var key = str['0'] +","+parseInt(months[str['1']])-1+","+str['2']; //alert(str_day[2]+" month:"+months[str_day[1]]+" day:"+str_day[0]); var d = new Date(str_day[2],months[str_day[1]],str_day[0]); var t = new Date(d.getTime() + 86400000*2); //t.setDate(d.getTime() + 86400000); var curr_date = t.getDate(); var curr_month = t.getMonth()+1; var curr_year = t.getFullYear(); if(curr_month<10) month = "0"+(t.getMonth()+1); else month = (t.getMonth()+1); if(curr_date<10) day = "0"+t.getDate(); else day = t.getDate(); document.getElementById("ddate").value = day + " " + months[month] + " " + t.getFullYear(); } function open_win() { var url= scriptname; url=url+"?suggest=suggestionbox"; document.cultform.submit(); //newwindow= window.open(url,'welcome','width=700,height=500,menubar=no,scrollbars=no,left=300,top=100,right=300,location=no,toolbar=no,status=no,titlebar=no'); //if (window.focus) {newwindow.focus()} } function validateSuggestionForm() { //alert('ramesh'); if(document.suggform.Author_Email.value!="") { if(checkemail(document.suggform.Author_Email)==false){ document.suggform.Author_Email.focus(); return false; } } if(document.suggform.Suggestion_Message.value=="") { //alert('ramesh'); alert("Please enter the suggestion"); document.suggform.Suggestion_Message.focus(); return false; } return true; } function validateNewsletterForm(){ if (!document.newsform.news_lang[0].checked && !document.newsform.news_lang[1].checked){ alert("Please select one fo the checkbox"); document.newsform.news_lang[0].focus(); return false; } if(document.newsform.email_id.value=="") { alert("Please enter the email id"); document.newsform.email_id.focus(); return false; } if(document.newsform.email_id.value!=""){ if(checkemail(document.newsform.email_id)==false){ document.newsform.email_id.focus(); return false; } } if(document.newsform.email_id1.value=="") { alert("Please enter the email id"); document.newsform.email_id1.focus(); return false; } if(document.newsform.email_id1.value!=""){ if(checkemail(document.newsform.email_id1)==false){ document.newsform.email_id1.focus(); return false; } } var s1=document.newsform.email_id.value; var s2=document.newsform.email_id1.value; //alert(s1); //alert(s2); if ( s1.toString() == s2.toString() ) { return true; } else { alert("Please re-enter the same email id"); document.newsform.email_id1.focus(); return false; } return true; } function checkemail(email) { var str=email.value; var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; if (filter.test(str)) testresults=true; else { alert("Please enter a valid email address!"); testresults=false; } return (testresults); } function window_close(){ window.close(); } function regionajaxfunction(val) { xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } // alert(val); url="regionajax.php?country_val="+val; //alert(url); xmlHttp.onreadystatechange=regionMap; xmlHttp.open('GET', url, true); xmlHttp.send(null); } function regionMap() { //alert("123"); if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { //alert(xmlHttp.responseText); var sample=xmlHttp.responseText; var country_geo=sample; country_geo=country_geo.split(" "); showMap(country_geo[0], country_geo[1], 'country'); getHotelList(id); } } function placeMap() { //alert("123"); if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { //alert(xmlHttp.responseText); var sample=xmlHttp.responseText; var country_geo=sample; country_geo=country_geo.split(" "); showMap(country_geo[0], country_geo[1], 'region'); var region=idregion; //alert(region); getHotelRegionList(region); } } function placeajaxfunction(val){ var country=document.getElementById('country_id').value; if(val!='-------------'){ xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } //alert(val); url="regionajax.php?region_val="+val+"&country_val="+country; // alert(url); idregion=val; xmlHttp.onreadystatechange=placeMap; xmlHttp.open('GET', url, true); xmlHttp.send(null); } else{ regionajaxfunction(country); } } function Mapplace() { //alert("123"); if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { //alert(xmlHttp.responseText); var sample=xmlHttp.responseText; var country_geo=sample; country_geo=country_geo.split(" "); showMap(country_geo[0], country_geo[1], 'place'); getHotelPlaceList(idplace1); } } function placeMapList(str){ var country=document.getElementById('country_id').value; var region= document.getElementById('region').value; if(str!='-------------'){ xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } // alert(val); url="regionajax.php?place_val="+str+"®ion_val="+region+"&country_val="+country; idplace1 = str; // alert(url); xmlHttp.onreadystatechange=Mapplace; xmlHttp.open('GET', url, true); xmlHttp.send(null); }else{ // alert(region); placeajaxfunction(region); } } function getHotelList(){ var country=document.getElementById('country_id').value; xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } url="hotelajax.php?country_val="+country; // alert(url); xmlHttp.onreadystatechange=HotelCountryRegionPlace; xmlHttp.open('GET', url, true); xmlHttp.send(null); } function HotelCountryRegionPlace() { //alert("123"); if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { //alert(xmlHttp.responseText); document.getElementById("hoteldisp").innerHTML=xmlHttp.responseText; } } function getHotelRegionList(val){ //alert(val); var country=document.getElementById('country_id').value; xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } // alert(val); url="hotelajax.php?region_val="+val+"&country_val="+country; xmlHttp.onreadystatechange=HotelCountryRegionPlace; xmlHttp.open('GET', url, true); xmlHttp.send(null); } function getHotelPlaceList(val) { var country=document.getElementById('country_id').value; var region= document.getElementById('region').value; xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } // alert(val); url="hotelajax.php?place_val="+val+"®ion_val="+region+"&country_val="+country; //alert(url); xmlHttp.onreadystatechange=HotelCountryRegionPlace; xmlHttp.open('GET', url, true); xmlHttp.send(null); } function MapHotel() { //var hotel = document.getElementById('hname').value;// xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } //alert("ramesh"); var country=document.getElementById('country_id').value; var region= document.getElementById('region').value; if(region=='-------------'){ region=""; } var place= document.getElementById('place').value; if(place=='-------------'){ place=""; } var hotel=document.getElementById('hname').value; if(hotel=='-------------'){ placeMapList(place); }else{ url="regionajax.php?place_val="+place+"®ion_val="+region+"&country_val="+country+"&hotelname="+hotel; //alert(url); xmlHttp.onreadystatechange=function(){ if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { //alert(xmlHttp.responseText); var sample=xmlHttp.responseText; var country_geo=sample; country_geo=country_geo.split(" "); showMap(country_geo[0], country_geo[1], 'hotel'); } }; xmlHttp.open('GET', url, true); xmlHttp.send(null); } } function HotelCountryMapList(str){ if(str!='-------------'){ //var hotel = document.getElementById('hname').value; xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } var country=document.getElementById('country_id').value; var hotel_name = str; url="placeajax.php?country_val="+country+"&hotel_name="+hotel_name; //alert(url); xmlHttp.onreadystatechange=PlacefromHotel; xmlHttp.open('GET', url, true); xmlHttp.send(null); //alert(url); }else{ // alert(str); place=document.getElementById('place').value; placeMapList(place); } // getRegionListFromPlace(place_name,country_name); } function PlacefromHotel() { //alert("123"); if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { //alert(xmlHttp.responseText); document.getElementById("placedisp").innerHTML=xmlHttp.responseText; getRegionListFromHotelPlace(); } } function getRegionListFromHotelPlace(){ var place= document.getElementById('place').value;; var country=document.getElementById('country_id').value; xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } var url=scriptname; url=url+"?placelist1="+place; url=url+"&placelist2="+country; idplace=place; xmlHttp.onreadystatechange=stateChangedregion1; //alert(url); xmlHttp.open("GET",url,true); xmlHttp.send(null); } function stateChangedregion1() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { // alert(xmlHttp.responseText); document.getElementById("regiondisp").innerHTML=xmlHttp.responseText; MapHotel(); } } function getRegionListFromHotel(str1) { if(str1!='-------------'){ var str2=document.getElementById('country_id').value; xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } //var url="/CultBayAssembly.php"; var url=scriptname; url=url+"?placelist1="+str1; url=url+"&placelist2="+str2; url=url+"&sid="+Math.random(); // alert(url); idplace=str1; xmlHttp.onreadystatechange=stateChangedregion; xmlHttp.open("GET",url,true); xmlHttp.send(null); }else{ //alert(str1); var region=document.getElementById('region').value; placeajaxfunction(region); } } function HotelCountryMapList1(str){ if(str!='-------------'){ //var hotel = document.getElementById('hname').value; xmlHttp=GetXmlHttpObject(); if (xmlHttp===null) { alert ("Browser does not support HTTP Request"); return; } var country=document.getElementById('country_id').value; var hotel_name = str; url="placeajax.php?country_val="+country+"&hotel_name="+hotel_name; //alert(url); xmlHttp.onreadystatechange=function(){ if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") { //alert(xmlHttp.responseText); document.getElementById("placedisp").innerHTML=xmlHttp.responseText; MapHotel(); } }; xmlHttp.open('GET', url, true); xmlHttp.send(null); }else{ place=document.getElementById('place').value; // alert(place); placeMapList(place); } } function oldbrowser(langtype){ //alert(langtype); var nVer = navigator.appVersion; var nAgt = navigator.userAgent; var browserName = navigator.appName; var fullVersion = ''+parseFloat(navigator.appVersion); var majorVersion = parseInt(navigator.appVersion,10); var nameOffset,verOffset,ix; // In MSIE, the true version is after "MSIE" in userAgent if ((verOffset=nAgt.indexOf("MSIE"))!=-1) { browserName = "Microsoft Internet Explorer"; fullVersion = nAgt.substring(verOffset+5); fullVersion = parseInt(fullVersion); if(fullVersion < 7) { if(langtype == 'en'){ alert("Please update your browser to version 7 or above to get a better view"); }else{ alert("Für eine bessere Ansicht aktualisieren Sie bitte Ihren Browser auf Version 7 oder höher"); } } } // In Firefox, the true version is after "Firefox" else if ((verOffset=nAgt.indexOf("Firefox"))!=-1) { browserName = "Firefox"; fullVersion = nAgt.substring(verOffset+8); fullVersion = parseFloat(fullVersion); if(fullVersion < 3.5) { alert("Please use Mozilla Firefox 3.5/or above for better view"); } } }/* * To change this template, choose Tools | Templates * and open the template in the editor. */ function embedScript(url, pageElement, callMessage, errorMessage) { document.getElementById(pageElement).innerHTML = callMessage; try { req = new XMLHttpRequest(); /* e.g. Firefox */ } catch(e) { try { req = new ActiveXObject("Msxml2.XMLHTTP"); /* some versions IE */ } catch (e) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); /* some versions IE */ } catch (E) { req = false; } } } req.onreadystatechange = function() {loadpage(req, pageElement, errorMessage);}; //alert(url); req.open("GET",url,true); req.send(null); } /* function getEmbeddedHTML(url, con){ var my_page_request = false; if (window.XMLHttpRequest) my_page_request = new XMLHttpRequest(); else if (window.ActiveXObject){ try {my_page_request = new ActiveXObject("Msxml2.XMLHTTP");} catch (e){try{my_page_request = new ActiveXObject("Microsoft.XMLHTTP");} catch (e){}} } else return false; // var url = '[YOUR URL]'; // var con = '[YOUR UNIQUE DIV/CONTAINER ID]'; my_page_request.open('GET', url, true); my_page_request.onreadystatechange = function() { loadpage(my_page_request, con); } my_page_request.send(null); } */ function loadpage(my_page_request, con, errormsg){ var myContainer = document.getElementById(con); if ( my_page_request.readyState == 4 && (my_page_request.status==200 || myBindexOf(window.location.href,"http",0)==-1)) { var myResponse = my_page_request.responseText; myContainer.innerHTML=myResponse; //alert(myResponse); executeEmbeddedScripts(myContainer,myResponse,con); } if(my_page_request.readyState == 4 && my_page_request.status != 200) { myContainer.innerHTML=errormsg; } } function executeEmbeddedScripts(node,theResponse,con){ // alert(theResponse); var bSaf = (myBindexOf(navigator.userAgent,'Safari',0) != -1); var bOpera = (myBindexOf(navigator.userAgent,'Opera',0) != -1); var bMoz = (navigator.appName == 'Netscape'); if (!node) return; var myHead=document.getElementsByTagName('head'); //alert(myHead); for(k=0; k'; var endScriptU = '<' + '/SCRIPT>'; var pos2 = myBindexOf(html,strExec,0); var pos = myBindexOf(html,endScriptL,pos2) >= 0 ? myBindexOf(html,endScriptL,pos2) : myBindexOf(html,endScriptU,pos2); pos += String(endScriptL).length; html = html.substr(0,pos) + html.substr(pos); node.innerHTML = html; if(scriptsAtStart==st.length) i++; } catch(e) { alert("Script execution error: "+e); } } var tmpHead = document.getElementById(con); var ast = node.getElementsByTagName('ascript'); var ascript = document.createElement("script"); var asrc = ast[0].getAttribute("src"); ascript.setAttribute("type", "text/javascript"); ascript.setAttribute("src", asrc); //alert(ascript); //alert(asrc); tmpHead.appendChild(ascript); } function myBindexOf(myObject,mySearch,myPos){ if (myPos==null) myPos=0; if (typeof(myObject)!='object') return -1; if(!myObject.indexOf) { for(var i=myPos; i < myObject.length; i++) if(myObject[i]==mySearch) return i; return -1; } else return myObject.indexOf(mySearch,myPos); } /* * * Copyright (c) 2004-2005 by Zapatec, Inc. * http://www.zapatec.com * 1700 MLK Way, Berkeley, California, * 94709, U.S.A. * All rights reserved. * * */ if(typeof Zapatec=='undefined'){Zapatec=function(){};} Zapatec.version='07-01';if(typeof Zapatec.zapatecPath=='undefined'){Zapatec.zapatecPath=function(){if(document.documentElement){var aTokens=document.documentElement.innerHTML.match(/]+src="([^"]*zapatec(-core|-src)?.js[^"]*)"/i);if(aTokens&&aTokens.length>=2){aTokens=aTokens[1].split('?');aTokens=aTokens[0].split('/');if(Array.prototype.pop){aTokens.pop();}else{aTokens.length-=1;} return aTokens.length?aTokens.join('/')+'/':'';}} return'';}();} if(typeof Zapatec=='undefined'){Zapatec=function(){};} Zapatec.Utils={};Zapatec.Utils.getAbsolutePos=function(el,scrollOff){var SL=0,ST=0;if(!scrollOff){var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft) SL=el.scrollLeft;if(is_div&&el.scrollTop) ST=el.scrollTop;} var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};if(el.offsetParent){var tmp=this.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;} return r;};Zapatec.Utils.getElementOffset=function(oEl){var iLeft=iTop=iWidth=iHeight=0;var sTag;if(oEl.getBoundingClientRect){var oRect=oEl.getBoundingClientRect();iLeft=oRect.left;iTop=oRect.top;iWidth=oRect.right-iLeft;iHeight=oRect.bottom-iTop;iLeft+=Zapatec.Utils.getPageScrollX()-2;iTop+=Zapatec.Utils.getPageScrollY()-2;}else{iWidth=oEl.offsetWidth;iHeight=oEl.offsetHeight;var sPos=Zapatec.Utils.getStyleProperty(oEl,'position');if(sPos=='fixed'){iLeft=oEl.offsetLeft+Zapatec.Utils.getPageScrollX();iTop=oEl.offsetTop+Zapatec.Utils.getPageScrollY();}else if(sPos=='absolute'){while(oEl){sTag=oEl.tagName;if(sTag){sTag=sTag.toLowerCase();if(sTag!='body'&&sTag!='html'){iLeft+=parseInt(oEl.offsetLeft,10)||0;iTop+=parseInt(oEl.offsetTop,10)||0;}} oEl=oEl.offsetParent;sTag=oEl?oEl.tagName:null;if(sTag){sTag=sTag.toLowerCase();if(sTag!='body'&&sTag!='html'){iLeft-=oEl.scrollLeft;iTop-=oEl.scrollTop;}}}}else{var bMoz=(Zapatec.is_gecko&&!Zapatec.is_khtml);var fStyle=Zapatec.Utils.getStyleProperty;var oP=oEl;while(oP){if(bMoz){sTag=oP.tagName;if(sTag){sTag=sTag.toLowerCase();if(sTag=='body'&&!(fStyle(oP,'-moz-box-sizing')=='border-box')){iLeft+=parseInt(fStyle(oP,'border-left-width'));iTop+=parseInt(fStyle(oP,'border-top-width'));}}} iLeft+=parseInt(oP.offsetLeft,10)||0;iTop+=parseInt(oP.offsetTop,10)||0;oP=oP.offsetParent;} oP=oEl;while(oP.parentNode){oP=oP.parentNode;sTag=oP.tagName;if(sTag){sTag=sTag.toLowerCase();if(sTag!='body'&&sTag!='html'&&sTag!='tr'){iLeft-=oP.scrollLeft;iTop-=oP.scrollTop;}}}}} return{left:iLeft,top:iTop,x:iLeft,y:iTop,width:iWidth,height:iHeight};};Zapatec.Utils.getElementOffsetScrollable=function(oEl){var oPos=Zapatec.Utils.getElementOffset(oEl);if(oEl.scrollLeft){oPos.left-=oEl.scrollLeft;oPos.x=oPos.left;} if(oEl.scrollTop){oPos.top-=oEl.scrollTop;oPos.y=oPos.top;} return oPos;};Zapatec.Utils.fixBoxPosition=function(box,leave){var screenX=Zapatec.Utils.getPageScrollX();var screenY=Zapatec.Utils.getPageScrollY();var sizes=Zapatec.Utils.getWindowSize();leave=parseInt(leave,10)||0;if(box.xscreenX+sizes.width){box.x=screenX+sizes.width-box.width-leave;} if(box.y+box.height>screenY+sizes.height){box.y=screenY+sizes.height-box.height-leave;}};Zapatec.Utils.isRelated=function(el,evt){evt||(evt=window.event);var related=evt.relatedTarget;if(!related){var type=evt.type;if(type=="mouseover"){related=evt.fromElement;}else if(type=="mouseout"){related=evt.toElement;}} try{while(related){if(related==el){return true;} related=related.parentNode;}}catch(e){};return false;};Zapatec.Utils.removeClass=function(el,className){if(!(el&&el.className)){return;} var cls=el.className.split(" ");var ar=[];for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}} el.className=ar.join(" ");};Zapatec.Utils.addClass=function(el,className){Zapatec.Utils.removeClass(el,className);el.className+=" "+className;};Zapatec.Utils.replaceClass=function(el,className,withClassName){if(!Zapatec.isHtmlElement(el)||!className){return false;} el.className.replace(className,withClassName);};Zapatec.Utils.getElement=function(ev){if(Zapatec.is_ie){return window.event.srcElement;}else{return ev.currentTarget;}};Zapatec.Utils.getTargetElement=function(ev){if(Zapatec.is_ie){return window.event.srcElement;}else{return ev.target;}};Zapatec.Utils.getMousePos=function(oEv){oEv||(oEv=window.event);var oPos={pageX:0,pageY:0,clientX:0,clientY:0};if(oEv){var bIsPageX=(typeof oEv.pageX!='undefined');var bIsClientX=(typeof oEv.clientX!='undefined');if(bIsPageX||bIsClientX){if(bIsPageX){oPos.pageX=oEv.pageX;oPos.pageY=oEv.pageY;}else{oPos.pageX=oEv.clientX+Zapatec.Utils.getPageScrollX();oPos.pageY=oEv.clientY+Zapatec.Utils.getPageScrollY();} if(bIsClientX){oPos.clientX=oEv.clientX;oPos.clientY=oEv.clientY;}else{oPos.clientX=oEv.pageX-Zapatec.Utils.getPageScrollX();oPos.clientY=oEv.pageY-Zapatec.Utils.getPageScrollY();}}} return oPos;};Zapatec.Utils.stopEvent=function(ev){ev||(ev=window.event);if(ev){if(Zapatec.is_ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}} return false;};Zapatec.Utils.removeOnUnload=[];Zapatec.Utils.addEvent=function(oElement,sEvent,fListener,bUseCapture){if(oElement.addEventListener){if(!bUseCapture){bUseCapture=false;} oElement.addEventListener(sEvent,fListener,bUseCapture);}else if(oElement.attachEvent){oElement.detachEvent('on'+sEvent,fListener);oElement.attachEvent('on'+sEvent,fListener);if(bUseCapture){oElement.setCapture(false);}} Zapatec.Utils.removeOnUnload.push({'element':oElement,'event':sEvent,'listener':fListener,'capture':bUseCapture});};Zapatec.Utils.removeEvent=function(oElement,sEvent,fListener,bUseCapture){if(oElement.removeEventListener){oElement.removeEventListener(sEvent,fListener,bUseCapture);}else if(oElement.detachEvent){oElement.detachEvent('on'+sEvent,fListener);} for(var iLis=Zapatec.Utils.removeOnUnload.length-1;iLis>=0;iLis--){var oParams=Zapatec.Utils.removeOnUnload[iLis];if(!oParams){continue;} if(oElement==oParams['element']&&sEvent==oParams['event']&&fListener==oParams['listener']&&bUseCapture==oParams['capture']){Zapatec.Utils.removeOnUnload[iLis]=null;Zapatec.Utils.removeEvent(oParams['element'],oParams['event'],oParams['listener'],oParams['capture']);}}};Zapatec.Utils.createElement=function(type,parent,selectable){var el=null;if(document.createElementNS) el=document.createElementNS("http://www.w3.org/1999/xhtml",type);else el=document.createElement(type);if(typeof parent!="undefined"&&parent!=null) parent.appendChild(el);if(!selectable){if(Zapatec.is_ie) el.setAttribute("unselectable",true);if(Zapatec.is_gecko) el.style.setProperty("-moz-user-select","none","");} return el;};Zapatec.Utils.writeCookie=function(name,value,domain,path,exp_days){value=escape(value);var ck=name+"="+value,exp;if(domain) ck+=";domain="+domain;if(path) ck+=";path="+path;if(exp_days){exp=new Date();exp.setTime(exp_days*86400000+exp.getTime());ck+=";expires="+exp.toGMTString();} document.cookie=ck;};Zapatec.Utils.getCookie=function(name){var pattern=name+"=";var tokenPos=0;while(tokenPos