function showSignUpblk(str){var hidechk=document.getElementById('hidebackSignup').style.display;if(hidechk=='none'){document.getElementById('hidebackSignup').style.display='block';}else{document.getElementById('hidebackSignup').style.display='none';}
var chk=document.getElementById('showSignUp').style.display;if(chk=='none'){document.getElementById('showSignUp').style.display='block';}else{document.getElementById('showSignUp').style.display='none';}
window.scrollTo(0,0)}
function showForgetPassMsg(str){var hidechk=document.getElementById('hidebackSignup').style.display;if(hidechk=='none'){document.getElementById('hidebackSignup').style.display='block';}else{document.getElementById('hidebackSignup').style.display='none';}
document.getElementById('showSignUp').style.display='none';var chk=document.getElementById('forgetpassword').style.display;if(chk=='none'){document.getElementById('forgetpassword').style.display='block';}else{document.getElementById('forgetpassword').style.display='none';}
if(str=='close'){document.getElementById('fPageDestinationSelect').style.display="block";document.getElementById('fPagedurationSelect').style.display="block";document.getElementById('fPageDateSelect').style.display="block";document.getElementById('fPageCruseLineSelect').style.display="block";}}
function showSignUpblkFrPage(str){var hidechk=document.getElementById('hidebackSignup').style.display;if(hidechk=='none'){document.getElementById('hidebackSignup').style.display='block';}else{document.getElementById('hidebackSignup').style.display='none';}
var chk=document.getElementById('showSignUp').style.display;if(chk=='none'){document.getElementById('showSignUp').style.display='block';}else{document.getElementById('showSignUp').style.display='none';}
if(str=='show'){if(document.getElementById('fPageDestinationSelect'))document.getElementById('fPageDestinationSelect').style.display="none";if(document.getElementById('fPagedurationSelect'))document.getElementById('fPagedurationSelect').style.display="none";if(document.getElementById('fPageDateSelect'))document.getElementById('fPageDateSelect').style.display="none";if(document.getElementById('fPageCruseLineSelect'))document.getElementById('fPageCruseLineSelect').style.display="none";}else{if(document.getElementById('fPageDestinationSelect'))document.getElementById('fPageDestinationSelect').style.display="block";if(document.getElementById('fPagedurationSelect'))document.getElementById('fPagedurationSelect').style.display="block";if(document.getElementById('fPageDateSelect'))document.getElementById('fPageDateSelect').style.display="block";if(document.getElementById('fPageCruseLineSelect'))document.getElementById('fPageCruseLineSelect').style.display="block";}}
function showSearchblk(str){shpopup=ReadCookie("vpop");if(shpopup=='show'){showSignUpblk('show');return;}
var hint=str;if(hint=='redefine'){document.getElementById('changemsg').innerHTML="";}
var hidechk=document.getElementById('hideback').style.display;if(hidechk=='none'){document.getElementById('hideback').style.display='block';}else{document.getElementById('hideback').style.display='none';}
var chk=document.getElementById('showSearch').style.display;if(chk=='none'){document.getElementById('showSearch').style.display='block';}else{document.getElementById('showSearch').style.display='none';}
window.scrollTo(0,0)}
function showMyAccountblkFrPage(str){var activeCls=document.getElementById('cssHistory');activeCls.className="active";var activeCls=document.getElementById('cssPdata');activeCls.className="tempCls";var activeCls=document.getElementById('cssAlerts');activeCls.className="tmepCls";document.getElementById("popUpMsgNew").style.display="none";document.getElementById("pricealert").style.display="none";document.getElementById('sHistory').style.display="block";var hidechk=document.getElementById('hidebackMyAccount').style.display;if(hidechk=='none'){document.getElementById('hidebackMyAccount').style.display='block';}else{document.getElementById('hidebackMyAccount').style.display='none';}
var chk=document.getElementById('showMyAccount').style.display;if(chk=='none'){document.getElementById('showMyAccount').style.display='block';}else{document.getElementById('showMyAccount').style.display='none';}
if(str=='show'){document.getElementById('fPageDestinationSelect').style.display="none";document.getElementById('fPagedurationSelect').style.display="none";document.getElementById('fPageDateSelect').style.display="none";document.getElementById('fPageCruseLineSelect').style.display="none";xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="myAcSearchInclude.php"
url=url+"?sid="+Math.random()
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState<4){if(navigator.appName=="Microsoft Internet Explorer"){document.getElementById("sHistory").innerHTML="<div style='position:absolute;top:100px;left:300px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration: blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}
else{document.getElementById("sHistory").innerHTML="<div style='position:absolute;top:200px;left:300px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration: blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}}
if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){document.getElementById("sHistory1").innerHTML="";document.getElementById("sHistory").innerHTML=xmlHttp.responseText}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
else{document.getElementById('fPageDestinationSelect').style.display="block";document.getElementById('fPagedurationSelect').style.display="block";document.getElementById('fPageDateSelect').style.display="block";document.getElementById('fPageCruseLineSelect').style.display="block";}}
function showMyAccountblk(str){var activeCls=document.getElementById('cssHistory');activeCls.className="active";var activeCls=document.getElementById('cssPdata');activeCls.className="tempCls";var activeCls=document.getElementById('cssAlerts');activeCls.className="tmepCls";document.getElementById("popUpMsgNew").style.display="none";document.getElementById("pricealert").style.display="none";document.getElementById('sHistory').style.display="block";var hidechk=document.getElementById('hidebackMyAccount').style.display;if(hidechk=='none'){document.getElementById('hidebackMyAccount').style.display='block';}else{document.getElementById('hidebackMyAccount').style.display='none';}
var chk=document.getElementById('showMyAccount').style.display;if(chk=='none'){document.getElementById('showMyAccount').style.display='block';}else{document.getElementById('showMyAccount').style.display='none';}
if(str=='show'){xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="myAcSearchInclude.php"
url=url+"?sid="+Math.random()
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState<4){if(navigator.appName=="Microsoft Internet Explorer"){document.getElementById("sHistory").innerHTML="<div style='position:absolute;top:100px;left:300px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration: blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}
else{document.getElementById("sHistory").innerHTML="<div style='position:absolute;top:200px;left:300px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration: blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}}
if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){document.getElementById("sHistory1").innerHTML="";document.getElementById("sHistory").innerHTML=xmlHttp.responseText}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}}
function delUserSearch(str){xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="deleteUserSearch.php"
url=url+"?id="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChangedPopup
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function showPdata(str){var activeCls=document.getElementById('cssPdata');activeCls.className="active";var activeCls=document.getElementById('cssHistory');activeCls.className="tempCls";var activeCls=document.getElementById('cssAlerts');activeCls.className="tmepCls";document.getElementById("pricealert").style.display="none";document.getElementById('sHistory').style.display="none";document.getElementById("popUpMsgNew").style.display="block";xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="editUserInfo.php"
url=url+"?id="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){document.getElementById("popUpMsgNew1").innerHTML=""
document.getElementById("popUpMsgNew").innerHTML=xmlHttp.responseText}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function showSHistory(){var activeCls=document.getElementById('cssHistory');activeCls.className="active";var activeCls=document.getElementById('cssAlerts');activeCls.className="tmepCls";var activeCls=document.getElementById('cssPdata');activeCls.className="tempCls";document.getElementById("popUpMsgNew").style.display="none";document.getElementById("pricealert").style.display="none";document.getElementById('sHistory').style.display="block";xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="myAcSearchInclude.php"
url=url+"?sid="+Math.random()
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState<4){if(navigator.appName=="Microsoft Internet Explorer"){document.getElementById("sHistory").innerHTML="<div style='position:absolute;top:100px;left:300px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration: blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}
else{document.getElementById("sHistory").innerHTML="<div style='position:absolute;top:200px;left:300px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration: blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}}
if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){document.getElementById("sHistory1").innerHTML="";document.getElementById("sHistory").innerHTML=xmlHttp.responseText}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function showPriceData(){var activeCls=document.getElementById('cssAlerts');activeCls.className="active";var activeCls=document.getElementById('cssHistory');activeCls.className="tempCls";var activeCls=document.getElementById('cssPdata');activeCls.className="tempCls";xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
document.getElementById("popUpMsgNew").style.display="none";document.getElementById("pricealert").style.display="block";document.getElementById('sHistory').style.display="none";xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState<4){if(navigator.appName=="Microsoft Internet Explorer"){document.getElementById("pricealert").innerHTML="<div style='position:absolute;top:100px;left:300px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration: blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}
else{document.getElementById("pricealert").innerHTML="<div style='position:absolute;top:200px;left:300px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration: blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}}
if(xmlHttp.readyState==4){document.getElementById("pricealert1").innerHTML="";document.getElementById("pricealert").innerHTML=xmlHttp.responseText;}}
var url="getprice.php?type=displayprice";xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function editUserInfo(str){xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="editUserInfo.php"
url=url+"?id="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState<4){if(navigator.appName=="Microsoft Internet Explorer"){document.getElementById("popUpMsgNew").innerHTML="<div style='position:absolute;top:100px;left:300px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration: blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}
else{document.getElementById("popUpMsgNew").innerHTML="<div style='position:absolute;top:200px;left:300px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration: blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}}
if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){document.getElementById("sHistory").style.display="none";document.getElementById("popUpMsgNew").style.display="block";document.getElementById("popUpMsgNew").innerHTML=xmlHttp.responseText}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function saveUserInfo(id,name,email,pass,ulang,ucon){var alertvalue=document.getElementById('alertvalues').value;splitalert=alertvalue.split("?");if(document.popUpUserInfoEdit.uname.value=="")
{document.getElementById('alertmsg').innerHTML='';document.getElementById('alertmsg').innerHTML=splitalert[0];document.popUpUserInfoEdit.uname.focus();return false;}
if(document.popUpUserInfoEdit.email.value=="")
{document.getElementById('alertmsg').innerHTML='';document.getElementById('alertmsg').innerHTML=splitalert[1];document.popUpUserInfoEdit.email.focus();return false;}
if(document.popUpUserInfoEdit.email.value!=""&&document.popUpUserInfoEdit.pass.value=="")
{apos=email.indexOf("@");dotpos=email.lastIndexOf(".");if(apos<1||dotpos-apos<2)
{document.getElementById('alertmsg').innerHTML='';document.getElementById('alertmsg').innerHTML=splitalert[2];document.popUpUserInfoEdit.email.focus();return false;}
else
{if(document.popUpUserInfoEdit.pass.value=="")
{document.getElementById('alertmsg').innerHTML='';document.getElementById('alertmsg').innerHTML=splitalert[3];document.popUpUserInfoEdit.pass.focus();return false;}}}
if(document.popUpUserInfoEdit.email.value!="")
{apos=email.indexOf("@");dotpos=email.lastIndexOf(".");if(apos<1||dotpos-apos<2)
{document.getElementById('alertmsg').innerHTML='';document.getElementById('alertmsg').innerHTML=splitalert[2];document.popUpUserInfoEdit.email.focus();return false;}}
var unewslr=1;xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
document.getElementById("pricealert").style.display="none";document.getElementById('sHistory').style.display="none";document.getElementById("popUpMsgNew").style.display="block";var url="saveUserInfo.php"
url=url+"?id="+id
url=url+"&name="+name
url=url+"&email="+email
url=url+"&pass="+pass
url=url+"&prelang="+ulang
url=url+"&precurrency="+ucon
url=url+"&newsopt="+unewslr
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(xmlHttp.responseText){alert('YOUR CHANGES HAVE BEEN SAVED');window.location.reload(true);}
document.getElementById("popUpMsgNew1").innerHTML=""
document.getElementById("popUpMsgNew").innerHTML=xmlHttp.responseText}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function saveUserInfoPA(id,name,email,pass,ulang,ucon){var alertvalue=document.getElementById('alertvaluespa').value;splitalert=alertvalue.split("?");if(document.popUpUserInfoEdit.uname.value=="")
{document.getElementById('alertmsgpa').innerHTML='';document.getElementById('alertmsgpa').innerHTML=splitalert[0];document.popUpUserInfoEdit.uname.focus();return false;}
if(document.popUpUserInfoEdit.email.value=="")
{document.getElementById('alertmsgpa').innerHTML='';document.getElementById('alertmsgpa').innerHTML=splitalert[1];document.popUpUserInfoEdit.email.focus();return false;}
if(document.popUpUserInfoEdit.email.value!=""&&document.popUpUserInfoEdit.pass.value=="")
{apos=email.indexOf("@");dotpos=email.lastIndexOf(".");if(apos<1||dotpos-apos<2)
{document.getElementById('alertmsgpa').innerHTML='';document.getElementById('alertmsgpa').innerHTML=splitalert[2];document.popUpUserInfoEdit.email.focus();return false;}
else
{if(document.popUpUserInfoEdit.pass.value=="")
{document.getElementById('alertmsgpa').innerHTML='';document.getElementById('alertmsgpa').innerHTML=splitalert[3];document.popUpUserInfoEdit.pass.focus();return false;}}}
if(document.popUpUserInfoEdit.email.value!="")
{apos=email.indexOf("@");dotpos=email.lastIndexOf(".");if(apos<1||dotpos-apos<2)
{document.getElementById('alertmsgpa').innerHTML='';document.getElementById('alertmsgpa').innerHTML=splitalert[2];document.popUpUserInfoEdit.email.focus();return false;}}
var unewslr=1;xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
document.getElementById("pricealert1").style.display="none";document.getElementById('sHistory1').style.display="none";document.getElementById('priceArea1').style.display='none';document.getElementById("popUpMsgNew1").style.display="block";var url="saveUserInfoPA.php"
url=url+"?id="+id
url=url+"&name="+name
url=url+"&email="+email
url=url+"&pass="+pass
url=url+"&prelang="+ulang
url=url+"&precurrency="+ucon
url=url+"&newsopt="+unewslr
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(xmlHttp.responseText){alert('YOUR CHANGES HAVE BEEN SAVED');window.location.reload(true);}
document.getElementById("popUpMsgNew").innerHTML=""
document.getElementById("popUpMsgNew1").innerHTML=xmlHttp.responseText}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function SetPriceAlert(ItineraryID,userId,cabin,pricealert){var palert=pricealert;document.getElementById('hidebackPricePopUp').style.display='block';document.getElementById('PricePopUp').style.display='block';document.getElementById("pricealert1").style.display="block";document.getElementById("popUpMsgNew1").style.display="none";document.getElementById('sHistory1').style.display="none";document.getElementById('priceArea1').style.display='none';var activeCls=document.getElementById('cssHistorySA');activeCls.className="tempCls";var activeCls=document.getElementById('cssPdataSA');activeCls.className="tmepCls";var newPriceAlert=palert.replace(' ','_');var dispPriceAlert=palert.replace('_',' ');document.getElementById('priceshow').innerHTML='<a href="#" id="cssAlertsSA" class="active"   onclick=SetPriceAlert('+ItineraryID+','+userId+',"Inside","'+newPriceAlert+'"); >'+dispPriceAlert+'</a>';showPriceData1(ItineraryID,userId,cabin);}
function showPdata1(str){var activeCls=document.getElementById('cssPdataSA');activeCls.className="active";var activeCls=document.getElementById('cssHistorySA');activeCls.className="tempCls";var activeCls=document.getElementById('cssAlertsSA');activeCls.className="tmepCls";document.getElementById('sHistory1').style.display="none";document.getElementById("popUpMsgNew1").style.display="block";document.getElementById('priceArea1').style.display='none';document.getElementById("pricealert1").style.display="none";xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="editUserInfoPA.php"
url=url+"?id="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState<4){if(navigator.appName=="Microsoft Internet Explorer"){document.getElementById("popUpMsgNew1").innerHTML="<div style='position:absolute;top:100px;left:300px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration: blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}
else{document.getElementById("popUpMsgNew1").innerHTML="<div style='position:absolute;top:200px;left:300px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration: blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}}
if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){document.getElementById("popUpMsgNew").innerHTML=""
document.getElementById("popUpMsgNew1").innerHTML=xmlHttp.responseText}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function showSHistory1(){var activeCls=document.getElementById('cssHistorySA');activeCls.className="active";var activeCls=document.getElementById('cssAlertsSA');activeCls.className="tmepCls";var activeCls=document.getElementById('cssPdataSA');activeCls.className="tempCls";document.getElementById("popUpMsgNew1").style.display="none";document.getElementById("pricealert1").style.display="none";document.getElementById('priceArea1').style.display='none';document.getElementById('sHistory1').style.display="block";xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="myAcSearchInclude.php"
url=url+"?sid="+Math.random()
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState<4){if(navigator.appName=="Microsoft Internet Explorer"){document.getElementById("sHistory1").innerHTML="<div style='position:absolute;top:100px;left:300px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration: blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}
else{document.getElementById("sHistory1").innerHTML="<div style='position:absolute;top:200px;left:300px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration: blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}}
if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){document.getElementById("sHistory").innerHTML="";document.getElementById("sHistory1").innerHTML=xmlHttp.responseText}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function showPriceData1(ItineraryID,userId,cabin){var activeCls=document.getElementById('cssAlerts');activeCls.className="active";var activeCls=document.getElementById('cssHistory');activeCls.className="tempCls";var activeCls=document.getElementById('cssPdata');activeCls.className="tempCls";xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState<4){if(navigator.appName=="Microsoft Internet Explorer"){document.getElementById("pricealert1").innerHTML="<div style='position:absolute;top:100px;left:300px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration: blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}
else{document.getElementById("pricealert1").innerHTML="<div style='position:absolute;top:200px;left:300px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration: blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}}
if(xmlHttp.readyState==4){document.getElementById('pricealert').innerHTML="";document.getElementById('pricealert1').innerHTML=xmlHttp.responseText;}}
var url="getprice.php?type=displayalertprice"+"&itineraryid="+ItineraryID+"&cabin_type="+cabin;xmlHttp.open("GET",url,true)
xmlHttp.send(null)
window.scrollTo(0,0)}
function DeletePrice1(id,itiId,userId,cabin){xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){showPriceData1(itiId,userId,cabin);}}
document.getElementById('priceArea1').style.display='none';var url="getprice.php?type=delete"+"&id="+id;xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function ClosePricePopUp(){document.getElementById('hidebackPricePopUp').style.display='none';document.getElementById('PricePopUp').style.display='none';}
function SubmitPrice(ItinerID,UserID){var cabinSize=document.roomtype.stateRoomSA.length;var Cabin;var Price;for(var k=0;k<cabinSize;k++){if(document.roomtype.stateRoomSA[k].checked){Cabin=document.roomtype.stateRoomSA[k].id;Price=document.roomtype.stateRoomSA[k].value;}}
xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){document.getElementById('priceArea1').innerHTML='';document.getElementById('priceArea1').style.display='block';document.getElementById('priceArea1').innerHTML="<span style='font-size:15px;'>"+xmlHttp.responseText+"</span>";showPriceData1(ItinerID,UserID,Cabin);}}
var url="getprice.php?type=store"+"&itineraryid="+ItinerID+"&cabin_type="+Cabin+"&userid="+UserID+"&price="+Price;xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function DeletePrice(id){xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){showPriceData();}}
var url="getprice.php?type=delete"+"&id="+id;xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function WishListLAert(itinerID,userid,cabin){var html;document.getElementById('hidebackPricePopUp').style.display='block';document.getElementById('PricePopUp').style.display='block';html='<a href="#" onClick="ClosePricePopUp();" style="z-index:8;"> <img src="images/closebut.png" border="0" align="right" style="margin-top:3px; <?php echo $clsBtn; ?>" /> </a> <br/><br/><br/><br/>'
html+="<form name='roomtype1'><table width='100%'> ";html+='<tr><td style="font-size:15px;"><b>Choose Cabin Type</b></td></tr>';html+='<tr> <td style="font-size:13px;padding-left:30px;"><input type="radio" name="stateRoom1" id="Inside" value="Inside" checked="checked" > Inside  </td> <td class="priceTd2"></td> </tr>';html+='<tr> <td style="font-size:13px;padding-left:30px;"><input type="radio" name="stateRoom1" id="Outside" value="Outside"  > Outside</td> </tr> ';html+='<tr> <td style="font-size:13px;padding-left:30px;"><input type="radio" name="stateRoom1" id="Balcony" value="Balcony"  > Balcony </td> </tr> ';html+='<tr> <td style="font-size:13px;padding-left:30px;"><input type="radio" name="stateRoom1" id="Suite" value="Suite" > Suite </td></tr> ';html+='<tr><td id="submit" style="font-size:13px;padding-top:60px;padding-left:100px;"><input type="button" id="ok"  value="Ok" onclick=SubmitWishList('+itinerID+','+userid+')></td></tr>';html+='</table></form>';document.getElementById('PricePopUp').innerHTML=html;}
function SubmitWishList(itiID,usrID){xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){document.getElementById('PricePopUp').innerHTML='';document.getElementById('PricePopUp').innerHTML="<span style='font-size:15px;'>"+xmlHttp.responseText+"</span>";}}
var len=document.roomtype1.stateRoom1.length;for(var i=0;i<len;i++){if(document.roomtype1.stateRoom1[i].checked==true){var cabin_typ=document.roomtype1.stateRoom1[i].value;}}
var url="getprice.php?type=wishlist"+"&iti_id="+itiID+"&usrid="+usrID+"&cabin_typ="+cabin_typ;xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function showShipDetails(id){var tblId='shipDetails'+id;var tbl=document.getElementById(tblId);var state=tbl.style.display;if(state=='none'){tbl.style.display='block';document.getElementById('expImg'+id).innerHTML="<img src='images/reduce.png'  />";}
if(state=='block'){tbl.style.display='none';document.getElementById('expImg'+id).innerHTML="<img src='images/expandbtn.png'  />";}}
function showCabinPrice(price,sign,soldout){if(price!=0||price=="")
{document.getElementById('sroomPrice').innerHTML=sign+price;}
else
{document.getElementById('sroomPrice').innerHTML="<span style='font-size:22;letter-spacing:-2px;'>"+soldout+"</span>";}}
function deleteSearchModifyPopup(id){xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="deleteSearchPopup.php"
url=url+"?id="+id
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){document.getElementById("popUpRecentSearch").innerHTML=xmlHttp.responseText}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function deleteSearchMyAcPopup(id){xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="deleteSearchMyAcPopup.php"
url=url+"?id="+id
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){document.getElementById("popUpRecentMyAcSearch").innerHTML=xmlHttp.responseText}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function DeletePriceFrontPageMyAc(id){xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="deleteSearch.php"
url=url+"?id="+id
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){var res=xmlHttp.responseText;if(res.search(/cutting edge/)>0){}
document.getElementById("fPageRecentSearch").innerHTML=xmlHttp.responseText}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function showforgetpassdiv(){var disp=document.getElementById("forgetpassdiv").style.display;if(disp=='none'){document.getElementById("forgetpassdiv").style.display="block";}else{document.getElementById("forgetpassdiv").style.display="none";}}
function checkUseremail(){var email=document.getElementById('fpemail').value;xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="checkusermail.php"
url=url+"?email="+email
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){var restxt=xmlHttp.responseText
if(restxt.search(/rec/)>0){document.getElementById("msg").innerHTML="There is no user account for this mailid.";}
if(restxt.search(/available/)>0){document.getElementById('hidebackSignup').style.display='none';showForgetPassMsg();}}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function showNewsLetterPopup(){var hidechk=document.getElementById('hidebackNewsLetterSignup').style.display;if(hidechk=='none'){document.getElementById('hidebackNewsLetterSignup').style.display='block';}else{document.getElementById('hidebackNewsLetterSignup').style.display='none';}
var chk=document.getElementById('showNewsLetterSignUp').style.display;if(chk=='none'){document.getElementById('showNewsLetterSignUp').style.display='block';}else{document.getElementById('showNewsLetterSignUp').style.display='none';}
window.scrollTo(0,0)}
function showNewsLetterSignIn(str){if(str=='show'){document.getElementById('hidebackNewsLetterSignup').style.display='block';}else{document.getElementById('hidebackNewsLetterSignup').style.display='none';}
document.getElementById('showNewsLetterSignUp').style.display='none';var chk=document.getElementById('showNewsLetterSignIn').style.display;if(chk=='none'){document.getElementById('showNewsLetterSignIn').style.display='block';}else{document.getElementById('showNewsLetterSignIn').style.display='none';}}
function registernewletteruser(signType){var uName;var uMail;var uPass;if(signType=='signUp'){uName=document.getElementById('nlrUserName').value;uMail=document.getElementById('nlremail').value;uPass=document.getElementById('nlrpassword').value;}
if(signType=='signIn'){uMail=document.getElementById('nlrsinemail').value;uPass=document.getElementById('nlrsinpass').value;}
xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="checkUser_popup.php"
url=url+"?email="+uMail
url=url+"&name="+uName
url=url+"&pass="+uPass
url=url+"&signType="+signType
url=url+"&prelang=english"
url=url+"&precurrency=USA-USD"
url=url+"&newsopt=1"
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=function stateChangedSignInNewlr(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){var reply=xmlHttp.responseText
if(reply.search(/Registered/)>0){CookieSet();window.location.reload(true);}else{if(reply.search(/different/)>0){var id='msgsignUpnlr';}
if(reply.search(/incorrect/)>0){var id='msgsignInlr';}
document.getElementById(id).innerHTML=xmlHttp.responseText}}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function show_graph(Itiner_id,Price_type){var http_request;http_request=new GetXmlHttpObject();if(http_request==null){alert("Browser does not support HTTP Request");return;}
http_request.onreadystatechange=function(){if(http_request.readyState<4){document.getElementById('hidebackgraph').style.display="block";document.getElementById('showgraph').style.display="block";var windowheight=getScrollHeight();document.getElementById("showgraph").style.top=eval(windowheight)+eval(150)+"px";document.getElementById('graph_area').innerHTML="<div style='position:absolute;top:200px;left:400px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration:blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}
if(http_request.readyState==4){check_result=http_request.responseText;document.getElementById('graph_area').innerHTML=http_request.responseText;}}
url="graph_data.php?iti_id="+Itiner_id+"&p_type="+Price_type;http_request.open("GET",url,true);http_request.send(null);}
function close_graph(){document.getElementById('hidebackgraph').style.display="none";document.getElementById('showgraph').style.display="none";}
function getScrollHeight()
{var h=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop;return h?h:0;}
function daysInMonth(month,year){var dd=new Date(year,month,0);return dd.getDate();}
function clickhere()
{}
function clickhere_main()
{var xx=0;var len=document.form2.elements.length;for(xx=0;xx<len;xx++)
{document.form2.elements[xx].checked=false;document.form2.allCruiseVendors.checked=true;}}
function newAdvanceSearch(){var lpcount=document.form2.cruiseVendorName.length;var concatstr='';for(var i=0;i<lpcount;i++){if(document.form2.cruiseVendorName[i].checked==true){concatstr=concatstr+document.form2.cruiseVendorName[i].value+',';}}
var destination_list=document.getElementById('destination_list').value;if(document.getElementById('cruise_duration').value==''){var cruise_duration=document.getElementById('cruise_duration').value='0-9999';}
else{var cruise_duration=document.getElementById('cruise_duration').value;}
var fromdate=document.getElementById('DPC_date1').value;var todate=document.getElementById('DPC_date2').value;if(fromdate==""||fromdate.toUpperCase()=='MM/DD/YYYY'){alert("please select start date");return false;}
if(todate==""||todate.toUpperCase()=='MM/DD/YYYY'){alert("please select end date");return false}
var dt1=new Date(document.getElementById('DPC_date1').value);var dt2=new Date(document.getElementById('DPC_date2').value);if(dt1>dt2){alert('Start date is greater than End date.');return false;}
var surl='slider2_dd2.php?DestinationID='+destination_list+'&cruise_duration='+cruise_duration+'&asfromdate='+fromdate+'&astodate='+todate+'&vendorid='+concatstr+'&searchtype=adsearch';window.location.href=surl;}
function searchrequest(id)
{if(id=="advanced"){var lpcount=document.form2.cruiseVendorName.length;var concatstr=document.getElementById("cruiseVendorName").value;var destination_list=document.getElementById('destination_list').value;if(destination_list==""){alert("Please select Destination");return false;}
if(document.getElementById('cruise_duration').value==''){var cruise_duration=document.getElementById('cruise_duration').value='0-9999';}
else{var cruise_duration=document.getElementById('cruise_duration').value;}
var fromdate=document.getElementById('DPC_date1').value;var todate=document.getElementById('DPC_date2').value;if(fromdate==""||fromdate.toUpperCase()=='MM/DD/YY'){alert("Please select Start Date");return false;}
if(todate==""||todate.toUpperCase()=='MM/DD/YY'){alert("Please select End Date");return false}
var dt1=new Date(document.getElementById('DPC_date1').value);var dt2=new Date(document.getElementById('DPC_date2').value);if(dt1>dt2){alert('Start date is greater than End date.');return false;}
var portid=document.getElementById("portid").value;var surl='slider2_dd2.php?DestinationID='+destination_list+'&cruise_duration='+cruise_duration+'&asfromdate='+fromdate+'&astodate='+todate+'&vendorid='+concatstr+'&searchtype=adsearch&portid='+portid;window.location.href=surl;}else{var lpcount=document.form2.cruiseVendorName.length;var concatstr=document.getElementById("cruiseVendorName").value;var destination_list=document.getElementById('destination_list').value;if(destination_list==""){alert("Please select Destination");return false;}
if(document.getElementById('cruise_duration').value==''){var cruise_duration=document.getElementById('cruise_duration').value='0-9999';}
else{var cruise_duration=document.getElementById('cruise_duration').value;}
var monYear=document.getElementById('cruiseMonth').value;var MY=monYear.split(' ');var cruise_month=MY[0]
var cruise_year=MY[1]
if(cruise_month==0){var d=new Date();cruise_month=d.getMonth()+1;cruise_year=d.getFullYear();}
var cruise_day1=daysInMonth(cruise_month,cruise_year)
var portid=document.getElementById("portid").value;window.location.href='slider2_dd.php?DestinationID='+destination_list+'&cruise_duration='+cruise_duration+'&cruise_month='+cruise_month+'&cruise_year='+cruise_year+'&cruise_day=1&cruise_month2='+cruise_month+'&cruise_year2='+cruise_year+'&cruise_day2='+cruise_day1+'&vendorid='+concatstr+'&portid='+portid;}}
function ChangLanguageFrontPage(str,cflag,con,url){window.location.href=url+'?clang='+str+'&cimage='+cflag+'&c_country='+con;}
function registerUser(signType,uName,uMail,uPass,ulang,ucon){if(document.signUp.newsletteroption.checked==true){unewslr=1;}else{unewslr=0;}
if(document.getElementById('rememberme')&&document.getElementById('rememberme').checked){unremme=1;}else{unremme=0;}
xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="checkUser_popup.php"
url=url+"?email="+uMail
url=url+"&name="+uName
url=url+"&pass="+uPass
url=url+"&signType="+signType
url=url+"&prelang="+ulang
url=url+"&precurrency="+ucon
url=url+"&newsopt="+unewslr
url=url+"&remopt="+unremme
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChangedSignIn
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function stateChangedSignIn(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){var reply=xmlHttp.responseText
if(reply.search(/Registered/)>0){var dext=reply.split('-');var domainext="com/";var userid=dext[2];var urllocation="http://www.cruisedirector."+domainext+"?douid="+userid;CookieSet();window.location="http://www.cruisedirector."+domainext+"?douid="+userid;}else{var result=xmlHttp.responseText;var split_result=result.split("?");var split_one=split_result[0];var split_two=split_result[1];if(split_one=="msg")
{document.getElementById("msg").innerHTML=split_two;document.getElementById("msgsignUp").innerHTML='&nbsp;';document.getElementById("msgsignIn").innerHTML='&nbsp;';}
else if(split_one=="alertemail")
{document.getElementById("msg").innerHTML='&nbsp;';document.getElementById("msgsignUp").innerHTML='&nbsp;';document.getElementById("msgsignIn").innerHTML=split_two;document.signIn.email.focus();}
else if(split_one=="alertpassword")
{document.getElementById("msg").innerHTML='&nbsp;';document.getElementById("msgsignUp").innerHTML='&nbsp;';document.getElementById("msgsignIn").innerHTML=split_two;document.signIn.password.focus();}
else if(split_one=="signupmsg")
{document.getElementById("msg").innerHTML=split_two;document.getElementById("msgsignUp").innerHTML='&nbsp;';document.getElementById("msgsignIn").innerHTML='&nbsp;';}
else if(split_one=="signupalertname")
{document.getElementById("msg").innerHTML='&nbsp;';document.getElementById("msgsignUp").innerHTML=split_two;document.getElementById("msgsignIn").innerHTML='&nbsp;';document.signUp.userName.focus();}
else if(split_one=="signupalertemail")
{document.getElementById("msg").innerHTML='&nbsp;';document.getElementById("msgsignUp").innerHTML=split_two;document.getElementById("msgsignIn").innerHTML='&nbsp;';document.signUp.email.focus();}
else if(split_one=="signupwrongemail")
{document.getElementById("msg").innerHTML='&nbsp;';document.getElementById("msgsignUp").innerHTML=split_two;document.getElementById("msgsignIn").innerHTML='&nbsp;';document.signUp.email.focus();}
else if(split_one=="signupalertpassword")
{document.getElementById("msg").innerHTML='&nbsp;';document.getElementById("msgsignUp").innerHTML=split_two;document.getElementById("msgsignIn").innerHTML='&nbsp;';document.signUp.password.focus();}}}}
function showDetails(dest,my,dur,cl){if(cl!=""){var cls=cl.split(',');var asize=cls.length;for(var i=0;i<asize;i++){var clId='cruiseVendorID'+cls[i];document.getElementById(clId).checked='checked';document.getElementById('allCruiseVendors').checked='';}}else{document.getElementById('allCruiseVendors').checked='checked';var clSize=document.form2.cruiseVendorName.length;for(var j=0;j<clSize;j++){document.form2.cruiseVendorName[j].checked=false;}}
var did='desId_'+dest;var myr='MY_'+my
var duration='dur_'+dur;document.getElementById(did).selected='selected';document.getElementById(myr).selected='selected';document.getElementById(duration).selected='selected';}
function stateChanged(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){document.getElementById("topDeals").innerHTML=xmlHttp.responseText}}
function showcruiselineShistory(){var e=document.getElementById('Scruise_line_div').style.display;if(e=="block"){document.getElementById('Scruise_line_div').style.display="none";}else{document.getElementById('Scruise_line_div').style.display="block";}}
function countDaysOfMonth(month,year){var dd=new Date(year,month,0);return dd.getDate();}
function searchCruise(){var lpcount=document.searchForm.cruiseVendorName.length;var concatstr='';for(var i=0;i<lpcount;i++){if(document.searchForm.cruiseVendorName[i].checked==true){concatstr=concatstr+document.searchForm.cruiseVendorName[i].value+',';}}
var destination_list=document.getElementById('Sdestination_list').value;if(document.getElementById('Scruise_duration').value==''){var cruise_duration=document.getElementById('Scruise_duration').value='0-9999';}
else{var cruise_duration=document.getElementById('Scruise_duration').value;}
var monYear=document.getElementById('ScruiseMonth').value;var MY=monYear.split(' ');var cruise_month=MY[0]
var cruise_year=MY[1]
if(cruise_month==0){var d=new Date();cruise_month=d.getMonth()+1;cruise_year=d.getFullYear();}
var cruise_day1=countDaysOfMonth(cruise_month,cruise_year);window.location.href='slider2_dd.php?DestinationID='+destination_list+'&cruise_duration='+cruise_duration+'&cruise_month='+cruise_month+'&cruise_year='+cruise_year+'&cruise_day=1&cruise_month2='+cruise_month+'&cruise_year2='+cruise_year+'&cruise_day2='+cruise_day1+'&vendorid='+concatstr;}
function checkVendor()
{document.searchForm.allCruiseVendors.checked=false;}
function checkVendorAll()
{var xx=0;var len=document.searchForm.elements.length;for(xx=0;xx<len;xx++)
{document.searchForm.elements[xx].checked=false;document.searchForm.allCruiseVendors.checked=true;}}
function selectSearchInput(dest,my,dur,cl){if(cl!=""){var cls=cl.split(',');var asize=cls.length;for(var i=0;i<asize;i++){var clId='ScruiseVendorID'+cls[i];document.getElementById(clId).checked='checked';document.getElementById('SallCruiseVendors').checked='';}}else{document.getElementById('SallCruiseVendors').checked='checked';var clSize=document.searchForm.cruiseVendorName.length;for(var j=0;j<clSize;j++){document.searchForm.cruiseVendorName[j].checked=false;}}
var did='SdesId_'+dest;var myr='SMY_'+my
var duration='Sdur_'+dur;document.getElementById(did).selected='selected';document.getElementById(myr).selected='selected';document.getElementById(duration).selected='selected';}
function showNext_bf(page,orderBy,sortBy){var xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="showthisbestfare.php"
url=url+"?page="+page
url=url+"&sorttype="+orderBy
url=url+"&sortby="+sortBy
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState<4){document.getElementById('bfnextpgloading').innerHTML="<div style='position:absolute;top:500px;left:400px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration:blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}
if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){document.getElementById('bfnextpgloading').innerHTML="";document.getElementById("bf_onchange").innerHTML=xmlHttp.responseText}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function sort_bf(type){var xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="showthisbestfare.php"
url=url+"?sorttype="+type
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState<4){document.getElementById('bfnextpgloading').innerHTML="<div style='position:absolute;top:500px;left:400px;'><img src='images/loadingbg.png' border='0'><div style='position: absolute; top: 50px; left: 60px; font-size: 14px; text-decoration:blink;color:grey;font-weight:bold;color:gray;'>Loading...</div></div>";}
if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){document.getElementById('bfnextpgloading').innerHTML="";document.getElementById("bf_onchange").innerHTML=xmlHttp.responseText}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function shownextcruise(id){if(id=="bfprematrixtbl"){document.getElementById("bfprematrixtbl").style.display="none";document.getElementById("bfnextmatrixtbl").style.display="block";}
if(id=="bfnextmatrixtbl"){document.getElementById("bfprematrixtbl").style.display="block";document.getElementById("bfnextmatrixtbl").style.display="none";}}
function GetXmlHttpObject()
{var xmlHttp=null;try
{xmlHttp=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}
return xmlHttp;}
function changeSignType(id){if(id=="signIndiv"){document.getElementById("signIndiv").style.display="block";document.getElementById("signupdiv").style.display="none";}else if(id=="signupdiv"){document.getElementById("signupdiv").style.display="block";document.getElementById("signIndiv").style.display="none";}}
function saveSignUpNewsLetter(){var uMail;uMail=document.getElementById('newslremail').value;xmlHttp=GetXmlHttpObject()
if(xmlHttp==null){alert("Browser does not support HTTP Request")
return}
var url="saveNewsLetterEmail.php"
url=url+"?email="+uMail
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=function savenewsemail(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){var result=xmlHttp.responseText;var arrValue=result.split('?');if(arrValue[0]=='signupmsg'){document.getElementById('signupmsg').innerHTML=arrValue[1];return;}
CookieSet();window.location.reload(true);window.location.reload(true);}}
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function changeImgMover(spanid){document.getElementById("img_over_"+spanid).style.display="block";document.getElementById("img_out_"+spanid).style.display="none";}
function changeImgMout(spanid){document.getElementById("img_over_"+spanid).style.display="none";document.getElementById("img_out_"+spanid).style.display="block";}
function switchToSignIn(){showNewsLetterPopup();showSignUpblk('show');}
function cruisesearch()
{var destid=document.getElementById("destination_list").value;var duration=document.getElementById("cruise_duration").value;if(duration==""){duration="0-9999";}
if(document.getElementById("portid")){var portid=document.getElementById("portid").value;}else{var portid='';}
var lpcount=document.form2.cruiseVendorName.length;var total=document.getElementById("cruiseVendorName").value;if(document.getElementById('cruiseMonth')){var monYear=document.getElementById('cruiseMonth').value;var MY=monYear.split(' ');var month=MY[0];if(month==0)
{var year=MY[1];var month=00;var day=01;var fromdate1=new Date(year,month,day);var year1=fromdate1.getFullYear();var month1=fromdate1.getMonth();var days1=fromdate1.getDate();var fromdate=year1+'-'+month1+'-'+days1;var toyear=MY[1];var tomonth=11;var today=32;var todate1=new Date(toyear,tomonth,today);var toyear1=todate1.getFullYear();var tomonth1=todate1.getMonth();var todays1=todate1.getDate();var todate=toyear1+'-'+tomonth1+'-'+todays1;}else
{var year=MY[1];var today=new Date();var day=today.getDate();var mth=today.getMonth()+1;var fromdate=year+'-'+month+'-1';var todate=year+'-'+month+'-31';}}
var typeflag='basic';if(document.getElementById('DPC_date1')){typeflag='adv';var fromdate=document.getElementById('DPC_date1').value;var todate=document.getElementById('DPC_date2').value;if(fromdate==""||fromdate.toUpperCase()=='MM/DD/YY'||todate==""||todate.toUpperCase()=='MM/DD/YY'){var fromdate1=new Date();var year1=fromdate1.getFullYear();var month1=fromdate1.getMonth();month1=month1+1;var days1=fromdate1.getDate();var fromdate=year1+'-'+month1+'-'+days1;var d=fromdate1.getDate()+30;var todate1=new Date(year1,month1,d);var toyear1=todate1.getFullYear();var tomonth1=todate1.getMonth();var todays1=todate1.getDate();var todate=toyear1+'-'+tomonth1+'-'+todays1;}else{var tmpfrmdata=fromdate.split("/");var fromdate=tmpfrmdata[2]+'-'+tmpfrmdata[0]+'-'+tmpfrmdata[1];var tmptodata=todate.split("/");var todate=tmptodata[2]+'-'+tmptodata[0]+'-'+tmptodata[1];}}
xmlHttp=GetXmlHttpObject();if(document.getElementById('fPageStyleSelect')){xmlHttp.open('get','searchcounter_firsttime.php?destid='+destid+'&duration='+duration+'&todates='+todate+'&fromdates='+fromdate+'&vendorid='+total+'&sesid=1&portid='+portid+'&typeflag='+typeflag);}else{xmlHttp.open('get','searchcounter.php?destid='+destid+'&duration='+duration+'&todates='+todate+'&fromdates='+fromdate+'&vendorid='+total+'&sesid=1&portid='+portid+'&typeflag='+typeflag);}
xmlHttp.onreadystatechange=postadparse;xmlHttp.send('');if(total!='0'){xmlHttpPort=GetXmlHttpObject();xmlHttpPort.open('get','updatecruiseport_cruiseline.php?destid='+destid+'&month='+month+'&year='+year+'&vendorid='+total);xmlHttpPort.onreadystatechange=portpostadparse;xmlHttpPort.send('');}}
function Destinationcruisesearch()
{var destid=document.getElementById("destination_list").value;var duration=document.getElementById("cruise_duration").value;if(duration==""){duration="0-9999";}
if(document.getElementById("portid")){var portid=document.getElementById("portid").value;}else{var portid='';}
var lpcount=document.form2.cruiseVendorName.length;var total=document.getElementById("cruiseVendorName").value;if(document.getElementById('cruiseMonth')){var monYear=document.getElementById('cruiseMonth').value;var MY=monYear.split(' ');var month=MY[0];if(month==0)
{var year=MY[1];var month=00;var day=01;var fromdate1=new Date(year,month,day);var year1=fromdate1.getFullYear();var month1=fromdate1.getMonth();var days1=fromdate1.getDate();var fromdate=year1+'-'+month1+'-'+days1;var toyear=MY[1];var tomonth=11;var today=32;var todate1=new Date(toyear,tomonth,today);var toyear1=todate1.getFullYear();var tomonth1=todate1.getMonth();var todays1=todate1.getDate();var todate=toyear1+'-'+tomonth1+'-'+todays1;}else
{var year=MY[1];var today=new Date();var day=today.getDate();var mth=today.getMonth()+1;var fromdate=year+'-'+month+'-1';var todate=year+'-'+month+'-31';}}
if(document.getElementById('DPC_date1')){var fromdate=document.getElementById('DPC_date1').value;var todate=document.getElementById('DPC_date2').value;if(fromdate==""||fromdate.toUpperCase()=='MM/DD/YY'||todate==""||todate.toUpperCase()=='MM/DD/YY'){var fromdate1=new Date();var year1=fromdate1.getFullYear();var month1=fromdate1.getMonth();month1=month1+1;var days1=fromdate1.getDate();var fromdate=year1+'-'+month1+'-'+days1;var d=fromdate1.getDate()+30;var todate1=new Date(year1,month1,d);var toyear1=todate1.getFullYear();var tomonth1=todate1.getMonth();var todays1=todate1.getDate();var todate=toyear1+'-'+tomonth1+'-'+todays1;}else{var tmpfrmdata=fromdate.split("/");var fromdate=tmpfrmdata[2]+'-'+tmpfrmdata[0]+'-'+tmpfrmdata[1];var tmptodata=todate.split("/");var todate=tmptodata[2]+'-'+tmptodata[0]+'-'+tmptodata[1];}}
if(document.getElementById('cruiseMonth')){xmlHttpDest=GetXmlHttpObject();xmlHttpDest.open('get','updatecruiseline.php?destid='+destid);xmlHttpDest.onreadystatechange=function(){if(xmlHttpDest.readyState<4)
{}
if(xmlHttpDest.readyState==4)
{var answer=xmlHttpDest.responseText;document.getElementById('updatecruiseMonth').innerHTML=answer;var monYear=document.getElementById('cruiseMonth').value;var MY=monYear.split(' ');var month=MY[0];var year=MY[1];var month=MY[0];if(month==0)
{var year=MY[1];var month=00;var day=01;var fromdate1=new Date(year,month,day);var year1=fromdate1.getFullYear();var month1=fromdate1.getMonth();var days1=fromdate1.getDate();var fromdate=year1+'-'+month1+'-'+days1;var toyear=MY[1];var tomonth=11;var today=32;var todate1=new Date(toyear,tomonth,today);var toyear1=todate1.getFullYear();var tomonth1=todate1.getMonth();var todays1=todate1.getDate();var todate=toyear1+'-'+tomonth1+'-'+todays1;}else
{var year=MY[1];var today=new Date();var day=today.getDate();var mth=today.getMonth()+1;var fromdate=year+'-'+month+'-1';var todate=year+'-'+month+'-31';}
xmlHttp=GetXmlHttpObject();if(document.getElementById('fPageStyleSelect')){xmlHttp.open('get','searchcounter_firsttime.php?destid='+destid+'&duration='+duration+'&todates='+todate+'&fromdates='+fromdate+'&vendorid='+total+'&sesid=1&portid='+portid);}else{xmlHttp.open('get','searchcounter.php?destid='+destid+'&duration='+duration+'&todates='+todate+'&fromdates='+fromdate+'&vendorid='+total+'&sesid=1&portid='+portid);}
xmlHttp.onreadystatechange=postadparse;xmlHttp.send('');xmlHttpCruise=GetXmlHttpObject();xmlHttpCruise.open('get','updatecruiselength.php?destid='+destid+'&month='+month+'&year='+year);xmlHttpCruise.onreadystatechange=cruisepostadparse;xmlHttpCruise.send('');xmlHttpPort=GetXmlHttpObject();xmlHttpPort.open('get','updatecruiseport.php?destid='+destid+'&month='+month+'&year='+year+'&portid='+portid);xmlHttpPort.onreadystatechange=portpostadparse;xmlHttpPort.send('');if(!document.getElementById('fPageStyleSelect')){xmlHttpcruiseline=GetXmlHttpObject();xmlHttpcruiseline.open('get','updatecruise_line.php?destid='+destid+'&month='+month+'&year='+year);xmlHttpcruiseline.onreadystatechange=cruiselinepostadparse;xmlHttpcruiseline.send('');}}}
xmlHttpDest.send('');}else{xmlHttp=GetXmlHttpObject();xmlHttp.open('get','searchcounter.php?destid='+destid+'&duration='+duration+'&todates='+todate+'&fromdates='+fromdate+'&vendorid='+total+'&sesid=1&portid='+portid);xmlHttp.onreadystatechange=postadparse;xmlHttp.send('');}}
function Durationcruisesearch()
{var destid=document.getElementById("destination_list").value;var duration=document.getElementById("cruise_duration").value;if(duration==""){duration="0-9999";}
if(document.getElementById("portid")){var portid=document.getElementById("portid").value;}else{var portid='';}
var lpcount=document.form2.cruiseVendorName.length;var total=document.getElementById("cruiseVendorName").value;if(document.getElementById('cruiseMonth')){var monYear=document.getElementById('cruiseMonth').value;var MY=monYear.split(' ');var month=MY[0];if(month==0)
{var year=MY[1];var month=00;var day=01;var fromdate1=new Date(year,month,day);var year1=fromdate1.getFullYear();var month1=fromdate1.getMonth();var days1=fromdate1.getDate();var fromdate=year1+'-'+month1+'-'+days1;var toyear=MY[1];var tomonth=11;var today=32;var todate1=new Date(toyear,tomonth,today);var toyear1=todate1.getFullYear();var tomonth1=todate1.getMonth();var todays1=todate1.getDate();var todate=toyear1+'-'+tomonth1+'-'+todays1;}else
{var year=MY[1];var today=new Date();var day=today.getDate();var mth=today.getMonth()+1;var fromdate=year+'-'+month+'-1';var todate=year+'-'+month+'-31';}}
if(document.getElementById('DPC_date1')){var fromdate=document.getElementById('DPC_date1').value;var todate=document.getElementById('DPC_date2').value;if(fromdate==""||fromdate.toUpperCase()=='MM/DD/YY'||todate==""||todate.toUpperCase()=='MM/DD/YY'){var fromdate1=new Date();var year1=fromdate1.getFullYear();var month1=fromdate1.getMonth();month1=month1+1;var days1=fromdate1.getDate();var fromdate=year1+'-'+month1+'-'+days1;var d=fromdate1.getDate()+30;var todate1=new Date(year1,month1,d);var toyear1=todate1.getFullYear();var tomonth1=todate1.getMonth();var todays1=todate1.getDate();var todate=toyear1+'-'+tomonth1+'-'+todays1;}else{var tmpfrmdata=fromdate.split("/");var fromdate=tmpfrmdata[2]+'-'+tmpfrmdata[0]+'-'+tmpfrmdata[1];var tmptodata=todate.split("/");var todate=tmptodata[2]+'-'+tmptodata[0]+'-'+tmptodata[1];}}
xmlHttp=GetXmlHttpObject();if(document.getElementById('fPageStyleSelect')){xmlHttp.open('get','searchcounter_firsttime.php?destid='+destid+'&duration='+duration+'&todates='+todate+'&fromdates='+fromdate+'&vendorid='+total+'&sesid=1&portid='+portid);}else{xmlHttp.open('get','searchcounter.php?destid='+destid+'&duration='+duration+'&todates='+todate+'&fromdates='+fromdate+'&vendorid='+total+'&sesid=1&portid='+portid);}
xmlHttp.onreadystatechange=postadparse;xmlHttp.send('');if(document.getElementById('cruiseMonth')){var monYear=document.getElementById('cruiseMonth').value;var MY=monYear.split(' ');var month=MY[0];var year=MY[1];xmlHttpCruise=GetXmlHttpObject();xmlHttpCruise.open('get','updatecruiselength.php?destid='+destid+'&month='+month+'&year='+year);xmlHttpCruise.onreadystatechange=cruisepostadparse;xmlHttpCruise.send('');xmlHttpPort=GetXmlHttpObject();xmlHttpPort.open('get','updatecruiseport.php?destid='+destid+'&month='+month+'&year='+year+'&portid='+portid);xmlHttpPort.onreadystatechange=portpostadparse;xmlHttpPort.send('');xmlHttpdestination=GetXmlHttpObject();xmlHttpdestination.open('get','updatecruisedest.php?destid='+destid+'&month='+month+'&year='+year);xmlHttpdestination.onreadystatechange=destinationpostadparse;xmlHttpdestination.send('');}}
function postadparse()
{if(xmlHttp.readyState<4)
{document.getElementById('founddiv').innerHTML='';}
if(xmlHttp.readyState==4)
{var answer=xmlHttp.responseText;if(answer==''){answer=0;}
document.getElementById('founddiv').innerHTML=answer+' Cruises Found';}}
function destpostadparse()
{if(xmlHttpDest.readyState<4)
{}
if(xmlHttpDest.readyState==4)
{var answer=xmlHttpDest.responseText;document.getElementById('updatecruiseMonth').innerHTML=answer;}}
function cruisepostadparse()
{if(xmlHttpCruise.readyState<4)
{}
if(xmlHttpCruise.readyState==4)
{var answer=xmlHttpCruise.responseText;document.getElementById('updatecruise_duration').innerHTML=answer;}}
function portpostadparse()
{if(xmlHttpPort.readyState<4)
{}
if(xmlHttpPort.readyState==4)
{var answer=xmlHttpPort.responseText;document.getElementById('fPagedurationSelect').innerHTML=answer;}}
function cruiselinepostadparse()
{if(xmlHttpcruiseline.readyState<4)
{}
if(xmlHttpcruiseline.readyState==4)
{var answer=xmlHttpcruiseline.responseText;document.getElementById('fPageCruseLineSelect').innerHTML=answer;}}
function destinationpostadparse()
{if(xmlHttpdestination.readyState<4)
{}
if(xmlHttpdestination.readyState==4)
{var answer=xmlHttpdestination.responseText;document.getElementById('fPageDestinationSelect').innerHTML=answer;}}
function durationDestination()
{var destid=document.getElementById("destination_list").value;var duration=document.getElementById("cruise_duration").value;xmlHttpdestination=GetXmlHttpObject();xmlHttpdestination.open('get','updatecruisedest.php?destid='+destid+'&duration='+duration);xmlHttpdestination.onreadystatechange=destinationpostadparse;xmlHttpdestination.send('');}
function lineDestination()
{var destid=document.getElementById("destination_list").value;var line=document.getElementById("cruiseVendorName").value;xmlHttpdestination=GetXmlHttpObject();xmlHttpdestination.open('get','updatecruisedest.php?destid='+destid+'&line='+line);xmlHttpdestination.onreadystatechange=destinationpostadparse;xmlHttpdestination.send('');}
function portDestination()
{var destid=document.getElementById("destination_list").value;var port=document.getElementById("portid").value;xmlHttpdestination=GetXmlHttpObject();xmlHttpdestination.open('get','updatecruisedest.php?destid='+destid+'&port='+port);xmlHttpdestination.onreadystatechange=destinationpostadparse;xmlHttpdestination.send('');}
function firsttime_searchrequest(id)
{if(id=="advanced"){var lpcount=document.form2.cruiseVendorName.length;var concatstr=document.getElementById("cruiseVendorName").value;var destination_list=document.getElementById('destination_list').value;if(destination_list==""){alert("Please select Destination");return false;}
if(concatstr==0){alert("Choose your type of cruise");return false;}
if(document.getElementById('cruise_duration').value==''){var cruise_duration=document.getElementById('cruise_duration').value='0-9999';}
else{var cruise_duration=document.getElementById('cruise_duration').value;}
var fromdate=document.getElementById('DPC_date1').value;var todate=document.getElementById('DPC_date2').value;if(fromdate==""||fromdate.toUpperCase()=='MM/DD/YY'){alert("Please select Start Date");return false;}
if(todate==""||todate.toUpperCase()=='MM/DD/YY'){alert("Please select End Date");return false}
var dt1=new Date(document.getElementById('DPC_date1').value);var dt2=new Date(document.getElementById('DPC_date2').value);if(dt1>dt2){alert('Start date is greater than End date.');return false;}
var portid=document.getElementById("portid").value;var surl='slider2_dd2.php?DestinationID='+destination_list+'&cruise_duration='+cruise_duration+'&asfromdate='+fromdate+'&astodate='+todate+'&vendorid='+concatstr+'&searchtype=adsearch&portid='+portid;window.location.href=surl;}else{var lpcount=document.form2.cruiseVendorName.length;var concatstr=document.getElementById("cruiseVendorName").value;var destination_list=document.getElementById('destination_list').value;if(destination_list==""){alert("Please select Destination");return false;}
if(concatstr==0){alert("Choose your type of cruise");return false;}
if(document.getElementById('cruise_duration').value==''){var cruise_duration=document.getElementById('cruise_duration').value='0-9999';}
else{var cruise_duration=document.getElementById('cruise_duration').value;}
var monYear=document.getElementById('cruiseMonth').value;var MY=monYear.split(' ');var cruise_month=MY[0]
var cruise_year=MY[1]
if(cruise_month==0){var d=new Date();cruise_month=d.getMonth()+1;cruise_year=d.getFullYear();}
var cruise_day1=daysInMonth(cruise_month,cruise_year)
var portid=document.getElementById("portid").value;window.location.href='slider2_dd.php?DestinationID='+destination_list+'&cruise_duration='+cruise_duration+'&cruise_month='+cruise_month+'&cruise_year='+cruise_year+'&cruise_day=1&cruise_month2='+cruise_month+'&cruise_year2='+cruise_year+'&cruise_day2='+cruise_day1+'&vendorid='+concatstr+'&portid='+portid+'&srtype=first';}}