//Gavin CR86 function changeEmail(emailValid,refreshParent) { if(!emailValid){ window.open("mbrDspUpdateEmail.jsp?refreshParent="+refreshParent ,"changeEmail","toolbars=no,scrollbars=yes,width=458,height=360;"); } } function refreshWindow(){ window.location.reload(); } // End Gavin CR86 // Developed by V.F.N. Pushpanayagam. 18-01-2004 // This function validates the user name. PR 612 function validateUserName(validatingControl){ var invalidInputs = new Array(' ','.','?','!',':',';','-','(',')','[',']',"'", '"','/',',','*','#','$','@','%','^','=','\\','|','~','`'); var objValidatingControl = eval(validatingControl); var txtInput = objValidatingControl.value; for(var i=0;i-1){ popMessage('userid'); objValidatingControl.focus(); return false; } } return true; } // V.F.N. Pushpanayagam // Developed by V.F.N. Pushpanayagam. 03-02-2004 // This function validates the phone number. PR 566 function validatePhoneNumber(phoneNumber){ for(var i=0;i daysInMonth){ if(mm==12){ mm = 1; yy++; }else{ mm++; } var remaingDays = daysInMonth - dd; dd = 7 - remaingDays; tmpDate = checkMARSendDate(marsEndDate, dd, mm, yy); mm = tmpDate.substr(0, 2); dd = tmpDate.substr(3, 2); yy = tmpDate.substr(6, 10); }else{ dd = dd + 7; tmpDate = checkMARSendDate(marsEndDate, dd, mm, yy); mm = tmpDate.substr(0, 2); dd = tmpDate.substr(3, 2); yy = tmpDate.substr(6, 10); } yy = Number(yy); mm = Number(mm); dd = Number(dd); for (var i=0;iendYear){ yy = endYear; mm = endMonth; dd = endDay; }else if(yy==endYear){ if(mm>endMonth){ mm = endMonth; dd = endDay; }else if(mm==endMonth){ if(dd>endDay){ dd = endDay; } } } yy = '' + yy; mm = '' + mm; dd = '' + dd; theDate = ((mm.length==1) ? '0' : '')+ mm + '/' + ((dd.length==1) ? '0' : '') + dd + '/' + yy; return theDate; } //END Gavin PR335 11-Feb-2004 //Gavin PR468 11-Feb-2004 function disableReturnDateSelection(selectObject){ if(!sRETURNINGCALENDAR){ selectObject.selectedIndex = 0; } } //END Gavin PR468 11-Feb-2004 //Gavin CR141 31-03-2004 function openWindow(href, sWidth, sHeight, sTop, sLeft) { hWnd = window.open(href, "", 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes,width='+sWidth+',height='+sHeight+',top='+sTop+',left='+sLeft); //return(false); } //END Gavin CR141 31-03-2004 // CR 175 - Added by Vinothini on 11/05/2004 function openETHome(){ window.open("http://www.emirates.com/TravellerInformation/plan/OnlineBooking/E-Ticketing.asp","eticket","toolbars=no,scrollbars=yes,width=800,height=600,top=0,left=0"); } // END CR 175 // CR 208 - Added by TC00404 on 11/05/2004 function openMasterCardCallout() { window.open("http://www.mastercardbusiness.com/mcbiz/index.jsp?template=/orphans&content=securecodepopup","mcc","toolbars=no,scrollbars=yes,width=800,height=600,top=0,left=0"); } function openVBVImage() { window.open("genDspVBVDetails.jsp","VerifiedByVisa","toolbars=no,scrollbars=yes,width=800,height=600,top=0,left=0"); } // END CR 208 //V.F.N. Pushpanayagam. One dollar offer 16-05-2004 function oneDollarWinnerPopup(PNR, isWinner, departureCountry){ var windowWidth= "600"; var windowHeight="400"; var windowTop =100; var windowLeft=100; if(PNR != "" && isWinner=="true" ){ var simpleDepartureCountry = departureCountry .toLowerCase(); if( simpleDepartureCountry == "au"){ window.open("./oneDollarDspMessage.jsp?departureCountry=au","oneDollarOfferWinnerMessage","titlebar=no,resizable=no,toolbar=no,scrollbars=yes,width="+ windowWidth +",height="+ windowHeight + ",top=" + windowTop + ",left="+windowLeft); } else if (simpleDepartureCountry == "nz"){ window.open("./oneDollarDspMessage.jsp?departureCountry=nz","oneDollarOfferWinnerMessage","titlebar=no,resizable=no,toolbar=no,scrollbars=yes,width="+ windowWidth +",height="+ windowHeight + ",top=" + windowTop + ",left="+windowLeft); } else if(simpleDepartureCountry == "ae"){ window.open("./oneDollarDspMessage.jsp?departureCountry=ae","Birthday","titlebar=no,resizable=no,toolbar=no,scrollbars=yes,width="+ windowWidth +",height="+ windowHeight + ",top=" + windowTop + ",left="+windowLeft); } } } function openOneDollarOfferTermsAndConditions(departureCountry){ var tnsURL; var simpleDepartureCountry = departureCountry .toLowerCase(); if(simpleDepartureCountry == "au"){ tnsURL = "http://www.emirates.com/au/miniSites/Offers/1DollarOffer/TermsandConditions/TermsandConditions.asp"; } else if (simpleDepartureCountry == "nz") { tnsURL = "http://www.emirates.com/nz/miniSites/Offers/1DollarOffer/TermsandConditions/TermsandConditions.asp"; } window.open(tnsURL,"terms","toolbars=no,scrollbars=yes"); } function openOneDollarOfferHome(departureCountry){ var tnsURL; var simpleDepartureCountry = departureCountry .toLowerCase(); if(simpleDepartureCountry == "au"){ tnsURL = "http://www.emirates.com/au/miniSites/Offers/1DollarOffer/Offers/Offers.asp"; } else if (simpleDepartureCountry == "nz") { tnsURL = "http://www.emirates.com/nz/miniSites/Offers/1DollarOffer/Offers/Offers.asp"; } window.open(tnsURL,"terms","toolbars=no,scrollbars=yes"); } // end one dollar //Gavin 31-May-2004 function changeDateInDropDown(marsEndDate, arrMonth, dayObject, monthbject, yearbject){ var formObject = eval('document.frmSearch'); var startDay = dayObject.options[dayObject.selectedIndex].value; var startMonth = monthbject.options[monthbject.selectedIndex].value; var startYear = yearbject.options[yearbject.selectedIndex].value; setControlDateValue(Number(startDay), startMonth, startYear,formObject.seldday3,formObject.seldmonth3,formObject.seldyear3, marsEndDate, arrMonth); } function noUpdate(chkBoxObj, msg){ chkBoxObj.checked = false; alert(msg); } //END Gavin 31-May-2004 function loadDemo(section) { var demourl = "http://www.emirates.com/ibetutorial/start.asp"; if (section == "help center") { demourl = "http://www.emirates.com/ibetutorial/start.asp"; } else if (section == "search") { demourl = "http://www.emirates.com/ibetutorial/start.asp?sec=plan"; } else if (section == "availability") { demourl = "http://www.emirates.com/ibetutorial/start.asp?sec=select"; } else if (section == "pricing") { demourl = "http://www.emirates.com/ibetutorial/start.asp?sec=confirm"; } else if (section == "login") { demourl = "http://www.emirates.com/ibetutorial/start.asp?sec=login"; } else if (section == "traveller") { demourl = "http://www.emirates.com/ibetutorial/start.asp?sec=traveller"; } else if (section == "delivery") { demourl = "http://www.emirates.com/ibetutorial/start.asp?sec=ticket"; } else if (section == "payment") { demourl = "http://www.emirates.com/ibetutorial/start.asp?sec=payment"; } else if (section == "preconfirm") { demourl = "http://www.emirates.com/ibetutorial/start.asp?sec=final"; } window.open(demourl, "OnlineBookingDemo","toolbars=no,scrollbars=yes,width=800,height=700,top=10,left="+left); } // Return true if the string is of alphabets. function isAlphabets(charString) { var count = 0; for (var i = 0; i < charString.length; i++) { if (isAlpha(charString.charAt(i))) { count++; } } if (count != charString.length) { return false; } return true; } // Added by Mohamed Nazeer for CR424 on 06/06/2006 function updateProfileChk(ccName,msg){ var frm = document.frmitinDspPaymentOptions; var strccName = ccName; if(frm.chksave.checked){ if(strccName!=frm.selcreditcardname.value){ alert(msg); frm.chksave.checked=false; return false; } else{ return true; } } else{ return true; } } // End of CR424 function openDiscountOfferHome(offerName) { var URL = ""; if (offerName == "intercontinental") { URL = "http://www.emirates.com/TravellerInformation/Bookahotel/BookaHotel.asp"; } else if (offerName == "hertz") { URL = "http://www.emirates.com/TravellerInformation/hireracar/hireacar1.asp"; } if (URL != "") { window.open(URL, "discountoffer", "toolbars=no, scrollbars=yes, width=800, height=600, top=0, left=0"); } } // Added by Nazeer for CR413 - HA implementation function openDiscountOfferHomeHA(HASite){ var URL = ""; if((HASite=="AE") || (HASite=="BH") || (HASite=="JO") || (HASite=="KW") || (HASite=="LB") || (HASite=="OM") || (HASite=="QA") || (HASite=="SA") ||(HASite=="EG")||(HASite=="HAME")) { URL = "http://www.holidayautos.ae/cgi-bin/liveweb.sh/QSearch.w?ctryref=MEA&lang=ME&aff=emiratesweb"; } else if ((HASite=="PL") || (HASite=="TR") || (HASite=="BD") || (HASite=="CN") || (HASite=="HK") || (HASite=="IN") || (HASite=="ID") || (HASite=="JP") || (HASite=="KP") || (HASite=="MY") || (HASite=="PK") ||(HASite=="PH") ||(HASite=="SG") ||(HASite=="LK") ||(HASite=="TH") ||(HASite=="KE") ||(HASite=="TZ") ||(HASite=="ET")||(HASite=="HAInternational")) { URL = "http://www.holidayautos.ae/cgi-bin/liveweb.sh/QSearch.w?ctryref=MEA&lang=ME&aff=emiratesweb"; } else if ((HASite=="DE-German")||(HASite=="HADE")){ URL = "http://www.holidayautos.de/auswahl.asp?Agentur=64026"; } else if ((HASite == "FR-French")||(HASite=="HAFR")){ //URL = "http://www.holidayautos.fr/cgi-bin/liveweb.sh/QSearch.w?ctryref=FRA&lang=FR&aff=emirates"; URL = "http://www.holidayautos.ae/cgi-bin/liveweb.sh/QSearch.w?ctryref=MEA&lang=ME&aff=emiratesweb"; } else if ((HASite == "IT-Italian")||(HASite=="HAIT")){ //URL = "http://italy.holidayautos.com/cgi-bin/liveweb.sh/QSearch.w?ctryref=ITA&lang=IT&aff=emiratesita"; //URL = "http://www.holidayautos.ae/cgi-bin/liveweb.sh/QSearch.w?ctryref=MEA&lang=ME&aff=emiratesweb"; URL = "http://italy.holidayautos.com/cgi-bin/liveweb.sh/QSearch.w?ctryref=ITA&lang=IT&aff=emiratesita"; } else if ((HASite == "CH-French")||(HASite=="HACHFR")){ //URL = "http://switzerland.holidayautos.com/cgi-bin/liveweb.sh/QSearch.w?ctryref=SWZ&lang=SFR&aff=emirateswebsfr"; URL = "http://www.holidayautos.ae/cgi-bin/liveweb.sh/QSearch.w?ctryref=MEA&lang=ME&aff=emiratesweb"; } else if ((HASite == "CH-German")||(HASite=="HACHDE")){ URL = "http://switzerland.holidayautos.com/cgi-bin/liveweb.sh/QSearch.w?ctryref=SWZ&lang=SGR&aff=emirateswebsgr"; } else if ((HASite == "GB")||(HASite=="HAUK")){ URL = "http://www.holidayautos.co.uk/cgi-bin/liveweb.sh/QSearch.w?ctryref=GBR&lang=EN&aff=xemirates"; } else if ((HASite == "US")||(HASite=="HAUS")){ alert ("HA us will active on July 1st "); } else if ((HASite == "AU")||(HASite=="HAAU")){ URL = "http://www.holidayautos.com.au/cgi-bin/liveweb.sh/QSearch.w?ctryref=AUS&lang=AEN&aff=emiratesauweb"; } else if ((HASite == "NZ")||(HASite=="HANZ")){ URL = "http://new-zealand.holidayautos.com/cgi-bin/liveweb.sh/QSearch.w?ctryref=NZE&lang=NEN&aff=emiratesnzweb"; } else if ((HASite == "ZA")||(HASite=="HAZA")){ URL = "http://south-africa.holidayautos.com/cgi-bin/liveweb.sh/QSearch.w?ctryref=SAF&lang=SAE&aff=emiratesweb"; } else if ((HASite == "AT-German")||(HASite=="HAAT")){ URL = "http://www.holidayautos.de/auswahl.asp?Agentur=64027"; } else if ((HASite == "CH")||(HASite=="HACH")){ URL = "http://www.holidayautos.ie/cgi-bin/liveweb.sh/QSearch.w?ctryref=EIR&lang=IR&aff=xemirates"; } else if((HASite=="AT-Euro")||(HASite=="HAEuroInternational")||(HASite=="DE-Euro")||(HASite=="FR-Euro")||(HASite=="IT-Euro")){ URL = "http://www.holidayautos.ie/cgi-bin/liveweb.sh/QSearch.w?ctryref=EIR&lang=IR&aff=xemirates"; } if (URL != "") { window.open(URL, "discountoffer", "toolbar=yes, scrollbars=yes, menubar=yes, width=1000, height=700, top=0, left=0"); } } // CR 413 ends here //Added by Mohamed Nazeer on 03/10/2006 for BCR226 function openPromotionLastminute(LMSite){ var URL = ""; if(LMSite=="LM-GB") { URL = "http://gb.emirates.onlinetravel.com"; } else if(LMSite=="LM-EURO") { URL = "http://eu.emirates.onlinetravel.com"; } else if (LMSite=="LM-US"){ URL = "http://us.emirates.onlinetravel.com"; } if (URL != "") { window.open(URL, "lmdiscountoffer", "toolbar=yes, scrollbars=yes, menubar=yes, width=1024, height=768, top=0, left=0"); } } //BCR 226 ends here function openETRefundRequestForm() { window.open("genDspHelpContactUsETRefundRequest.jsp", "etrefund", "toolbars=no, scrollbars=yes, width=" + iWidth + ", height=" + iHeight + ", top=" + top + ",left=" + left); } function openOnlineCheckInWindow() { var top =100; var left =100; var w=800; var h=600; var gat ="https://checkin.emirates.com/Welcome.do"; var url=gat; window.open(url,"discountedtickets","titlebar=yes,resizable=yes,toolbar=no,scrollbars=yes,width="+ w +",height="+ h + ",top=0,left=0"); } // V.F.N. Pushpanayagam function trimString(stringToTrim){ stringToTrim = stringToTrim.replace( /^\s+/g, "" );// strip leading return stringToTrim.replace( /\s+$/g, "" );// strip trailing } // End V.F.N. Pushpanayagam function openBonusMiles1(){ var URL = "http://emiratesintra/miniSites/gofurther/Home/Home.asp"; window.open(URL,"SkywardsBonusMiles"); } function openBonusMiles2(){ var URL ="http://emiratesintra/miniSites/Gofurther1/Home/Home.asp"; window.open(URL,"SkywardsBonusMiles"); }