function fcbkFunctionwidget(a){jQuery.facebox('<div style="width:400px;"><div class="floatr" style="margin:0; width:100px; float:right; "><a href="javascript:;" class="colorgrey bold text11 closeicon" style="text-decoration:none;float:right;" onclick="jQuery(document).trigger(\'close.facebox\');" ></a> <a href="javascript:;" class="colorgrey bold text11 " style="text-decoration:none;margin-left:45px;font-weight:bold;color:#CDCDCD;" onclick="jQuery(document).trigger(\'close.facebox\');" >Close</a></div><div class="clear"><div class="error-page-alert"><span class="ezee">ezee</span><span class="alert">alert</span><br/><div class="alertimg padl20"> </div></div><div class="error-page-main_content"><div class="error_content"><ul class="error_content">'+a+'</ul></div></div><div class="clear"> </div></div></div>')}function fcbkFunction(a){jQuery.facebox('<div style="width:400px;"><div class="floatr" style="margin:5px 5px 0 0; width:100px; float:right; "><a href="javascript:;" class="colorgrey bold text11 closeicon" style="text-decoration:none;float:right;" onclick="jQuery(document).trigger(\'close.facebox\');" ></a> <a href="javascript:;" class="colorgrey bold text11 " style="text-decoration:none;float:right;font-weight:bold;color:#CDCDCD;" onclick="jQuery(document).trigger(\'close.facebox\');" >Close</a></div><div class="clear"></div><center><div><ul style="color:#808080">'+a+'</ul></div></center><div class="clear"> </div></div>')}function Trim(a){return a.replace(/^\s*(.*?)[\s\n]*$/g,"$1")}function IsNumeric(a){var b="0123456789";var c=false;var d;for(var e=0;e<b.length;e++){if(Trim(a)==Trim(b.charAt(e))){c=true;break}}return c}function validateIntegers(a){for(var b=0;a!=null&&b<a.value.length;b++){var c="";for(var d=0,e=0;d<a.value.length;d++){if(IsNumeric(Trim(a.value.charAt(d)))==true){c+=a.value.charAt(d);e++}}a.value=c}}function changeCheckIndate(a){}function holidays_getTour(){var a=HOSTURL+"holidays/index.php";jQuery.ajax({type:"get",url:a,data:"action=retrieveTourTypeForWidget",success:function(a){jQuery("#holiday").html("");jQuery("#holiday").append(a)}})}function holidays_showage(a,b){if(parseInt(a)>0){$("#childagevalue"+b+1).show();$("#childAge"+b+1).show()}else{$("childagevalue"+b+1).hide();$("childAge"+b+1).hide()}}function holidays_showhidechild(a,b){var c=$(a).val().substring($(a).val().length-1);var d=$(a).val().substring(0,3);var e=$(a).val().substring(4,5);var f=0;if(c!="C"){$("#adult"+b).val(c);$("#adult"+b).selected=true}$("#adult"+b,"#child"+b).removeAttr("disabled");if(c=="C"){$("#childvalue"+b).show();$("#extravalue"+b).show();if(d=="DBL"){$("#adult"+b).find("option[value=2]").attr("selected","selected")}if(d=="TRP"){$("#adult"+b).find("option[value=3]").attr("selected","selected")}if(d=="QUD"){$("#adult"+b).find("option[value=4]").attr("selected","selected")}$("#child"+b).find("option[value="+e+"]").attr("selected","selected");f=e;holidays_showage(e,b)}else{for(var g=1;g>=parseInt(f)+1;g--){$("#childagevalue"+b+g).hide();$("#childAge"+b+g).hide()}$("#childvalue"+b).hide();$("#extravalue"+b).hide()}$("#adult"+b,"#child"+b).attr("disabled","disabled")}function holidays_showhide(a,b){for(var c=b;c<=3;c++){$("#roomSection"+c).hide()}for(var d=1;d<=b;d++){$("#roomSection"+d).show()}}function holidays_formatDateMDY(){var a;var b=Array();var c="";a=$(this).val();b=a.split("/");c=b[1]+"/"+b[0]+"/"+b[2];$(this).val(c)}function holidays_loadTourType(){jQuery.ajax({type:"get",url:HOSTURL+"holidays/index.php",data:"action=retrieveTourTypeList&destinationSection="+isDomestic,success:function(a){jQuery("#holiday").html("");jQuery("#holiday").append(a)}})}function holidays_search(){var a="";jtype=jQuery("input[name=tripType]:checked").attr("id");HolidaysType=jQuery("ul.tabs li.active a").attr("id")=="within"?"domestic":"international";var b=jQuery("#holiday").val();isSingleCityPackage=b=="short tours"||b=="Short Tours"?true:false;if($("#SelCountry").val()=="India"){$("#domestic").val("D")}if(b=="Seat in Coach Tours"){var c="1"}if(b=="CNK Group Tours"){var c="6"}else{var c=isSingleCityPackage?"4":"6"}var d=b=="Cosmos Tours"||b=="Globus Tours"?false:true;jQuery("#noOfAdults").val(0);jQuery("#noOfChildren").val(0);var a="";error=true;var e=0;var f=parseInt(jQuery("#rooms").val());var g=parseInt(jQuery("#noOfPromoCodes").val());if(d){for(var h=1;h<=f;h++){if(jQuery("#roomtype"+h).val()=="SGL_1"){jQuery("#sglQty").val(parseInt(jQuery("#sglQty").val())+1);if(parseInt(jQuery("#adult"+h).val())>1){error=false;a+="<li>Select Proper Adult Passengers For Room # "+h+"</li>"}jQuery("#extraBed"+h).val("N");jQuery("#child"+h).val(0)}if(jQuery("#roomtype"+h).val()=="DBL_2"){jQuery("#dblQty").val(parseInt(jQuery("#dblQty").val())+1);if(parseInt(jQuery("#adult"+h).val())>2){error=false;a+="<li>Select Proper Adult Passengers For Room # "+h+"</li>"}jQuery("#extraBed"+h).val("N");jQuery("#child"+h).val(0)}if(jQuery("#roomtype"+h).val()=="TWN_2"){jQuery("#twnQty").val(parseInt(jQuery("#twnQty").val())+1);if(parseInt(jQuery("#adult"+h).val())>2){error=false;a+="<li>Select Proper Adult Passengers For Room # "+h+"</li>"}jQuery("#extraBed"+h).val("N");jQuery("#child"+h).val(0)}if(jQuery("#roomtype"+h).val()=="TRP_3"){jQuery("#tplQty").val(parseInt(jQuery("#tplQty").val())+1);if(parseInt(jQuery("#adult"+h).val())>3){error=false;a+="<li>Select Proper Adult Passengers For Room # "+h+"</li>"}jQuery("#extraBed"+h).val("N");jQuery("#child"+h).val(0)}if(jQuery("#roomtype"+h).val()=="DBL_1C"){jQuery("#dblQty").val(parseInt(jQuery("#dblQty").val())+1);if(parseInt(jQuery("#adult"+h).val())>2||parseInt(jQuery("#child"+h).val())!=1){error=false;a+="<li>Select Proper Adult/Child Passengers For Room # "+h+"</li>"}}if(parseInt(jQuery("#adult"+h).val())>0){jQuery("#noOfAdults").val(parseInt(jQuery("#noOfAdults").val())+parseInt(jQuery("#adult"+h).val()))}if(jQuery("#roomtype"+h).val().substring(jQuery("#roomtype"+h).val().length-1)=="C"){jQuery("#noOfChildren").val(parseInt(jQuery("#noOfChildren").val())+parseInt(jQuery("#child"+h).val()))}}e+=parseInt(jQuery("#noOfAdults").val())+parseInt(jQuery("#noOfChildren").val());if(e>=10){error=false;a+="<li>The maximum number of passengers allowed is 9 </li>"}isError=false;if(jQuery("#holiday").val()=="0"){isError=true;error=false;a+="<li>Select suitable holiday type in 'holiday type' field  </li>"}if(!isSingleCityPackage&&(c==""||c<="0"||c=="NaN"||isNaN(c)||c.indexOf(".")!=-1)){isError=true;error=false;a+="<li>Enter proper value in 'no. of nights' field  </li>"}if(jQuery("#rooms").val()=="0"){isError=true;error=false;a+="<li>Select appropriate Room(s) in 'no.of rooms' field </li>"}if(jQuery("#hfromDate").val()=="dd/mm/yy"||jQuery("#hfromDate").val()==""){isError=true;error=false;a+="<li>Select appropriate date in 'start date' field  </li>"}if(jQuery("#SelCountry").val()=="0"||jQuery("#SelCountry").val()==""){isError=true;error=false;a+="<li>Select appropriate country in 'destination' field  </li>"}if(jQuery("#selCity").val()=="0"||jQuery("#selCity").val()==""){isError=true;error=false;a+="<li>Select appropriate city in 'city' field  </li>"}if(!isError){if(isSingleCityPackage){document.holidaysearch.chkMultipleCities.value="Y"}else{document.holidaysearch.chkMultipleCities.value="Y"}document.holidaysearch.NoofNights.value=c;document.holidaysearch.chkMultipleCityForFlights.value=document.holidaysearch.chkMultipleCities.value}}else{DropCosmosDestinationChange("selCosmosnGlobusCountryId");if(document.getElementById("selCosmosnGlobusDestinationId")==null||document.getElementById("selCosmosnGlobusDestinationId").value=="0"){error=false;a+="<li>Please Select proper Holiday Destination </li>"}else{if(document.getElementById("CosmosnGlobusCountryTxt")==null||document.getElementById("CosmosnGlobusCountryTxt").value==""){error=false;a+="<li>Please Select proper Tour Country </li>"}else{if(document.getElementById("CosmosDepMonthTxt")==null||document.getElementById("CosmosDepMonthTxt").value==""){error=false;a+="<li>Please Enter the Departure Month </li>"}}}}return a}function holidays(a){flight_datepicker("#hfromDate");var b=a==="within"?"domestic":"international";holidays_getTour();if(a=="within"){$("#rooms").val("1");holidays_showhide($("#rooms"),$("#rooms").val());$("#roomtype1").val("DBL_2");holidays_showhidechild($("#roomtype1"),1);$("#roomtype2").val("DBL_2");holidays_showhidechild($("#roomtype2"),2);$("#roomtype3").val("DBL_2");holidays_showhidechild($("#roomtype3"),3);jQuery("#holiday").html("");jQuery("#holiday").append("<option>Select Type</option>");jQuery("#SelCountry").html("");jQuery("#SelCountry").append("<option value='India'>India</option>");jQuery("#selCity").html("");jQuery("#selCity").append("<option value=''>All Cities</option>");holidays_loadTourType();jQuery("#SelCountry").html("");jQuery("#SelCountry").append("<option value='Bhutan'>Bhutan</option>");jQuery("#SelCountry").append("<option value='India' selected='selected'>India</option>");jQuery("#SelCountry").append("<option value='Nepal'>Nepal</option>")}if(a=="outside"){$("#rooms").val("1");holidays_showhide($("#rooms"),$("#rooms").val());$("#roomtype1").val("DBL_2");holidays_showhidechild($("#roomtype1"),1);$("#roomtype2").val("DBL_2");holidays_showhidechild($("#roomtype2"),2);$("#roomtype3").val("DBL_2");holidays_showhidechild($("#roomtype3"),3);jQuery("#holiday").html("");jQuery("#holiday").append("<option>Select Type</option>");jQuery("#SelCountry").html("");jQuery("#SelCountry").append("<option>Select</option>");jQuery("#selCity").html("");jQuery("#selCity").append("<option>Select</option>");holidays_loadTourType()}jQuery("#holiday").change(function(){var a=$(this).attr("value");if(a=="Cosmos Tours"||a=="Globus Tours"){$("#fromDateLi").hide();$("#departDateLi").show();$("#SelCountry").hide();$("#selCosmosnGlobusDestinationId").show();$("#selCity").hide();$("#selCosmosnGlobusCountryId").show();jQuery.ajax({type:"get",url:HOSTURL+"holidays/index.php",data:"action=retrieveContinent&tourType="+a+"&destinationSection="+b,success:function(a){jQuery("#selCosmosnGlobusDestinationId").html("");jQuery("#selCosmosnGlobusDestinationId").append(a)}})}else{$("#departDateLi").hide();$("#fromDateLi").show();$("#selCosmosnGlobusDestinationId").hide();$("#SelCountry").show();$("#selCosmosnGlobusCountryId").hide();$("#selCity").show();if(b=="domestic"){jQuery("#SelCountry").val("India");jQuery("#SelCountry").trigger("change")}else{jQuery.ajax({type:"get",url:HOSTURL+"holidays/index.php",data:"action=retrieveCountries&tourType="+a+"&destinationSection="+b,success:function(a){jQuery("#SelCountry").html("");jQuery("#SelCountry").append(a)}})}}});jQuery("#SelCountry").change(function(){var a=$(this).attr("value");var b=$("#holiday").attr("value");if(a!="0"&&a!=""){jQuery.ajax({type:"get",url:HOSTURL+"holidays/index.php",data:"action=retrieveCities&country="+a+"&tourType="+b,success:function(a){jQuery("#selCity").html("");jQuery("#selCity").append(a)}})}});jQuery("#selCosmosnGlobusDestinationId").change(function(){var a=$(this).attr("value");var c=$("#holiday").attr("value");if(a!="0"&&a!=""){jQuery.ajax({type:"get",url:HOSTURL+"holidays/index.php",data:"action=retrieveContinentCountry&continent="+a+"&tourType="+c+"&destinationSection="+b,success:function(a){jQuery("#selCosmosnGlobusCountryId").html("");jQuery("#selCosmosnGlobusCountryId").append(a)}})}});jQuery("#selCity").change(function(){var a=$(this).attr("value");var b=$("#holiday").attr("value");var c=$("#SelCountry").attr("value");if(a!="0"&&a!=""){jQuery.ajax({type:"get",url:HOSTURL+"holidays/index.php",data:"action=retrieveActivity&city="+a+"&country="+c+"&tourType="+b,success:function(a){jQuery("#holidayActivity").html("");jQuery("#holidayActivity").append(a)}});jQuery.ajax({type:"get",url:HOSTURL+"holidays/index.php",data:"action=retrieveCategory&city="+a+"&country="+c+"&tourType="+b,success:function(a){jQuery("#hotelCategory").html("");jQuery("#hotelCategory").append(a)}})}});jQuery("#selCosmosnGlobusCountryId").change(function(){var a=$(this).attr("value");var c=$("#holiday").attr("value");var d=$("#selCosmosnGlobusDestinationId").attr("value");if(a!="0"&&a!=""){jQuery.ajax({type:"get",url:HOSTURL+"holidays/index.php",data:"action=retrieveContinentCountryDates&continent="+d+"&country="+a+"&tourType="+c+"&destinationSection="+b,success:function(a){jQuery("#selCosmosnGlobusDepMonthId").html("");jQuery("#selCosmosnGlobusDepMonthId").append(a)}})}});jQuery("#cabins").change(function(){var a=jQuery(this).attr("value");if(a=="2"){jQuery("#cabin_2").show()}else{jQuery("#cabin_2").hide()}});jQuery("#childs_1").change(function(){var a=jQuery(this).attr("value");var b=3;if(parseInt(a)==0){jQuery("#choose_child1_1").addClass("display_block").show();for(var c=2;c<=b;c++){jQuery("#choose_child1_"+c).addClass("display_block").addClass("display_none").hide()}}else{for(var c=1;c<=b;c++){if(c<=parseInt(a)){jQuery("#choose_child1_"+c).addClass("display_block").show()}else{jQuery("#choose_child1_"+c).removeClass("display_block").addClass("display_none").hide()}}}});jQuery("#childs_2").change(function(){var a=jQuery(this).attr("value");var b=3;if(parseInt(a)==0){jQuery("#choose_child2_1").addClass("display_block").show();for(var c=2;c<=b;c++){jQuery("#choose_child2_"+c).addClass("display_block").addClass("display_none").hide()}}else{for(var c=1;c<=b;c++){if(c<=parseInt(a)){jQuery("#choose_child2_"+c).addClass("display_block").show()}else{jQuery("#choose_child2_"+c).removeClass("display_block").addClass("display_none").hide()}}}});jQuery("#searchholiday").click(function(){jQuery(".adult_select , .child_select").find("select").removeAttr("disabled");var a="";a=holidays_search();if(a!=""){fcbkFunctionwidget(a)}else{jQuery("#main_form_area").append(jQuery("#productForm").html());jQuery("#main_form_area").trigger("submit")}});jQuery("#fadeOutFormOverlay").ajaxStart(function(){if($.browser.msie){jQuery("#overlayForm").bgiframe({top:0,left:0})}jQuery("#overlayForm").addClass("overlayForm").fadeTo("fast",.85).css("display","block").css("height",jQuery(this).height()+"px").css("width",jQuery(this).width()+"px");jQuery("#loadingCalenderOverlay").removeClass("loadingCalenderHide").addClass("loadingCalender")});jQuery("#fadeOutFormOverlay").ajaxStop(function(){jQuery("#overlayForm").css("height",0+"px").css("width",0+"px").removeClass("overlayForm").fadeTo("fast",1).css("display","none");jQuery("#loadingCalenderOverlay").removeClass("loadingCalender").addClass("loadingCalenderHide")})}function eurail_search(){var a="";jtype=jQuery("input[name=jtype]:checked").attr("id");if(jtype!="jtype3"){if(jQuery("#fromcity").val()==""){a+="<li>Please select from city. </li>"}if(jQuery("#tocity").val()==""){a+="<li>Please select to city. </li>"}if(jQuery("#tocity").val()==jQuery("#fromcity").val()){a+="<li>From and To city cannot be same. </li>"}if(jQuery("#leave_date").val()==""||jQuery("#leave_date").val()=="dd/mm/yy"){a+="<li>Please select leave date. </li>"}if(jQuery("#jtype2").checked==true){if(jQuery("#departure_date").val()==""||jQuery("#departure_date").val()=="dd/mm/yy"){a+="<li>Please select return date. </li>"}}}else{if(jQuery("#leave_date_pass").val()==""||jQuery("#leave_date_pass").val()=="dd/mm/yy"){a+="<li>Please select start date. </li>"}totalCountry=false;jQuery(".cntCountry").each(function(){if(jQuery(this).val()==""){totalCountry=true}});if(totalCountry){a+="<li>Please select country. </li>"}}if(jQuery("#adults").val()=="0"&&jQuery("#child").val()=="0"&&jQuery("#infants").val()=="0"&&jQuery("#senior").val()=="0"){a+="<li>Please fill in suitable passenger type in 'passenger' field..</li>"}return a}function generateCities(a){if(a!="country"){jQuery.ajax({type:"get",url:HOSTURL+"rails/eurail.php",data:"action=retrieveCityListAjax&main="+a,dataType:"html",success:function(a){htmlstr='<option value="" selected="selected">-From City-- </option>'+a;jQuery(".fromcity").html('<select id="fromcity" name="fromcity" >'+htmlstr+"</select>");jQuery(".tocity").html('<select id="tocity" name="tocity" >'+htmlstr+"</select>")}})}else{jQuery.ajax({type:"get",url:HOSTURL+"flights/index.php",data:"action=ajaxRequestEurailCountry",dataType:"html",success:function(a){jQuery("#country0").html(a)}})}}function eurail(){var a="";jQuery("#more_less").click(function(){if(jQuery(this).html()=="More cities"){less="N";jQuery(this).html("Less cities")}else{less="Y";jQuery(this).html("More cities")}generateCities(less)});generateCities("Y");flight_datepicker("#leave_date, #departure_date, #leave_date_pass");jQuery("#leave_date, #departure_date, #leave_date_pass").attr("readonly","true");jQuery("#addcountry").click(function(){var a=jQuery(".cntCountry").length;var b='<select name="country'+a+'" id="country'+a+'" class="cntCountry">'+jQuery("#country0").html()+"</select>";jQuery("#moreCountry").append(b);jQuery("#country"+a).val("");a=jQuery(".cntCountry").length;if(a>1){jQuery("#removecountry").show()}jQuery("#CountryRowCnt").val(a);return false});jQuery("#removecountry").click(function(){jQuery(".cntCountry:last").remove();var a=jQuery(".cntCountry").length;if(a==1){jQuery("#removecountry").hide()}jQuery("#CountryRowCnt").val(a);return false});jQuery("input[name=jtype]").click(function(){jQuery("#or").show();jQuery("#rail_outside_europe_pass_option").hide();if(jQuery(this).attr("id")!="jtype3"){if(jQuery(this).attr("id")=="jtype1"){jQuery(".rail_oustide_europe_return").hide()}else{jQuery(".rail_oustide_europe_return").show()}jQuery("#physicalclass").parent().removeClass("rail_oustide_europe_selectbox_oneway2").addClass("rail_oustide_europe_selectbox_oneway")}else{jQuery("#or").hide();jQuery("#rail_outside_europe_pass_option").show();generateCities("country");jQuery("#physicalclass").parent().removeClass("rail_oustide_europe_selectbox_oneway").addClass("rail_oustide_europe_selectbox_oneway2")}jQuery("#sector").val(jQuery(this).val())});jQuery("#searcheurail").click(function(){var a="";a=eurail_search();if(a!=""){fcbkFunctionwidget(a)}else{jtype=jQuery("input[name=jtype]:checked").attr("id");jQuery("#sector").val(jQuery("#"+jtype).val());if(jtype!="jtype3"){jQuery("#departure_date").attr("disabled","disabled");jQuery("#leave_date").removeAttr("disabled");if(jtype=="jtype2")jQuery("#departure_date").removeAttr("disabled")}else{jQuery("#leave_date_pass").attr("disabled","disabled");jQuery("#leave_date").val(jQuery("#leave_date_pass").val())}jQuery("#main_form_area").append(jQuery("#productForm").html());jQuery("#main_form_area").trigger("submit")}});jQuery("#child").change(function(){if(jQuery(this).val()=="1"){jQuery("#childages").show();jQuery("#childageone").show();jQuery("#childagetwo").hide()}else if(jQuery(this).val()=="2"){jQuery("#childages").show();jQuery("#childageone").show();jQuery("#childagetwo").show()}else{jQuery("#childageone").hide();jQuery("#childagetwo").hide();jQuery("#childages").hide()}})}function tatkalBookingTimeValid(){var a="false";var b=document.getElementById("SystemDateWithTime").value;var c=b.split("/");var d=c[0];var e=c[1];var f=c[2];var g=c[3];if(d<8||d>=10){a="true"}else{a="false"}return a}function bookingTimeValid(){var a="false";var b=jQuery("#SystemDateWithTime").val();var c=b.split("/");var d=c[0];var e=c[1];var f=c[2];var g=c[3];if(d>=5&&d<23){a="true"}else if(d>=23&&e<=30){a="true"}else{a="false"}return a}function y2kIssue(a){return a<1e3?a+1900:a}function daysDiff(a,b){var c=Date.UTC(y2kIssue(a.getYear()),a.getMonth(),a.getDate(),0,0,0);var d=Date.UTC(y2kIssue(b.getYear()),b.getMonth(),b.getDate(),0,0,0);var e=Number(c)-Number(d);e=e/1e3/60/60/24;return e}function getDateCust(a,b){var c=a.split(b);var d=c[0];var e=c[1];var f=c[2];var g=new Date;g.setFullYear(f,e-1,d);return g}function rail_search(){var a="";var b=jQuery("#indrailadults").val();var c=jQuery("#indrailchild").val();var d=jQuery("#indrailseniormale").val();var e=jQuery("#indrailseniorfemale").val();var f=parseInt(b)+parseInt(d)+parseInt(e)+parseInt(c);var g=jQuery("#depDate").val();var h=jQuery("#toSysDate").val();if(jQuery("#fromStationCode").val()==""){a+="<li>Please fill in suitable city in 'from' field </li>"}if(jQuery("#toStationCode").val()==""){a+="<li>Please fill in suitable city in 'to' field</li>"}if(g==""||g=="dd/mm/yy"){a+="<li>Please fill in suitable date in 'Depart' field</li>"}if(g!=""&&g!="dd/mm/yy"){var h=getDateCust(h,"/");var i=getDateCust(g,"/");var j=daysDiff(i,h);if(j>90){a+="<li>Departure Date can not be more than 90 days from today </li>"}if($("#tatkal").attr("checked")===false){if(tatkalBookingTimeValid()=="false"&&g!="dd/mm/yy"){a+="<li>Ticket cannot be booked between 8A.M. to 10A.M. </li>"}}if($("#tatkal").attr("checked")===true&&g!="dd/mm/yy"){if(tatkalBookingTimeValid()=="true"){if(j>1){a+="<li>Tatkal Departure Date can not be more than 1 days from today</li>"}else{$("#tatkal").val("CK")}}else{a+="<li>Tatkal cannot be booked between 8A.M. to 10A.M.</li>"}}}if(jQuery("#fromStationCode").val()==jQuery("#toStationCode").val()){a+="<li>From city and To city can not be same</li>"}if(jQuery("#indrailadults").val()=="0"&&jQuery("#indrailchild").val()=="0"&&jQuery("#indrailseniormale").val()=="0"&&jQuery("#indrailseniorfemale").val()=="0"){a+="<li>Please fill in suitable passenger type in 'passenger' field </li>"}if(parseInt(f)>parseInt("6")){a+="<li>Only 6 passanger allowed in one booking. </li>"}if(parseInt(f)>parseInt("4")&&$("#tatkal").attr("checked")===true){a+="<li>Only 4 passanger allowed in one booking. </li>"}if(jQuery("#classType").val()==""){a+="<li>Please fill in suitable class in 'class' field </li>"}var k=bookingTimeValid();if(k=="false"){a="<li>Indian Railway Reservation system is Available between IST 0500 hrs and 2330 hrs from Monday to Sunday. </li>"}if(jQuery("#tatkal").attr("checked")===true&&jQuery("#classType").val()=="1A"){a="<li>You can not do tatkal booking for class 'First Class AC'. </li>"}return a}function indianrail(){jQuery("#fromStationCode").val("");jQuery("#toStationCode").val("");jQuery("#depDate").datepicker({showOn:"both",buttonImage:STATICURL+"/images/home/cal.gif",buttonImageOnly:true,buttonText:"Choose date",minDate:0,maxDate:false,changeMonth:false,changeYear:false,numberOfMonths:2,dateFormat:"dd/mm/y",firstDay:1,closeText:"",clearText:"",currentText:"",prevImage:STATICURL+"/images/double_prev.gif",nextImage:STATICURL+"/images/double_next.gif"});jQuery("img.datepicker_trigger").attr({width:"16",height:"15"}).css("vertical-align","bottom");jQuery(".rail_textbox1").each(function(){icode="#"+jQuery(this).prev("input").attr("id");jQuery(this).autocomplete(HOSTURL+"rails/index.php?action=searchCity",{matchContains:true,minChars:3,otherinput:icode,width:300});jQuery(this).val("Enter a city or station").css("color","#888").click(function(){jQuery(this).val("").css("color","#000")})});jQuery("#depDate").attr("readonly","true");jQuery("#searchrail").click(function(){var a="";a=rail_search();if(a!=""){fcbkFunctionwidget(a)}else{jQuery("#main_form_area").append(jQuery("#productForm").html());jQuery("#main_form_area").trigger("submit")}});jQuery("#tatkal").click(function(){if($("#tatkal").is(":checked")){jQuery.facebox('<div style="width:400px;"><div class="floatr" style="margin:5px 5px 0 0;  "><a href="javascript:;" class="colorgrey bold text11 closeicon" style="text-decoration:none;float:right;" onclick="$(document).trigger(\'close.facebox\');" ></a> </div><div class="clear"><div class="error-page-alert"><span class="ezee">ezee</span><span class="alert">alert</span><br/><div class="alertimg padl20"> </div></div><div class="error-page-main_content"><div class="error_content"><ul class="error_content">No refund on confirmed Tatkal tickets (except exceptional circumstances)bookings</ul></div></div><div class="clear"> </div></div></div>')}})}function selectPopularCity(a,b){jQuery("#country").find("option[value="+a+"]").attr("selected","selected");var c="";c=HOSTURL+"hotels/lib/searchcity1.php?country="+jQuery("#country").val();strFilled=false;cnt=0;for(j=0;j<stored_country_array.length;j++){if(stored_country_array[j][0]==jQuery("#country").val()){cnt=j+1}}if(cnt>0){strFilled=true}if(strFilled==false){jQuery.ajax({type:"GET",url:c,async:false,success:function(a){optionsvalue=getResultArray(a);stored_country_array[countryCounter]=new Array(2);stored_country_array[countryCounter][0]=jQuery("#country").val();stored_country_array[countryCounter][1]=optionsvalue;createListOfItems(document.getElementById("city"),stored_country_array[countryCounter][1],"City");countryCounter++;jQuery("#city").find("option[value="+b+"]").attr("selected","selected")}})}else{createListOfItems(document.getElementById("city"),stored_country_array[cnt-1][1],"City");jQuery("#city").find("option[value="+b+"]").attr("selected","selected")}}function searchHotel(){var a=jQuery("#ezeego_hotels");var b=0;countryObj=jQuery("#country");cityObj=jQuery("#city");checkindateObj=jQuery("#checkindate");checkoutdateObj=jQuery("#checkoutdate");noOfNightsObj=jQuery("#night_id");var c="";if(countryObj){countryObjVal=countryObj.val();if(countryObjVal==""){c+="<li>"+COUNTRY_MESSAGE+"</li>";b=1}else{if(countryObjVal=="India - IN"){jQuery("#domint").attr("value","domestic")}else{jQuery("#domint").attr("value","international")}}}if(cityObj){cityObjVal=cityObj.val();if(cityObjVal==""){c+="<li>"+CITY_MESSAGE+"</li>";b=1}}if(checkindateObj){var d=checkindateObj.val();if(d=="dd/mm/yy"||d==""){c+="<li>"+CHECKINDATE_MESSAGE+"</li>";b=1}}var e=noOfNightsObj.val();var f=/(^\d\d*$)/;if(e==""){c+="<li>Please enter No. of Nights </li>";b=1}if(!e.match(f)){c+="<li>"+NOOFNIGHTS_NUMERIC_MESSAGE+"</li>";b=1}else if(e<1){c+="<li>"+NOOFNIGHTS_ZERO_MESSAGE+"</li>";b=1}var g=parseInt(jQuery("#norooms").val());var h=0;var i=0;var j=0;for(roomCountStart=1;roomCountStart<=g;roomCountStart++){curRoomTypeVal=jQuery("#roomtype"+roomCountStart).val();var k=roomTypeArr[curRoomTypeVal];var l=k.split(",");var m=parseInt(l[0]);var n=parseInt(l[1]);h+=m;if(jQuery("#roomtype"+roomCountStart).val()=="SGL_1")jQuery("#sglQty").val(parseInt(jQuery("#sglQty").val())+1);if(jQuery("#roomtype"+roomCountStart).val()=="DBL_1"||jQuery("#roomtype"+roomCountStart).val()=="DBL_2"||jQuery("#roomtype"+roomCountStart).val()=="DBL_1C"||jQuery("#roomtype"+roomCountStart).val()=="DBL_2C"){jQuery("#dblQty").val(parseInt(jQuery("#dblQty").val())+1)}if(jQuery("#roomtype"+roomCountStart).val()=="TWN_1"||jQuery("#roomtype"+roomCountStart).val()=="TWN_2"){jQuery("#twnQty").val(parseInt(jQuery("#twnQty").val())+1)}if(jQuery("#roomtype"+roomCountStart).val()=="TRP_3"||jQuery("#roomtype"+roomCountStart).val()=="TRP_1C"){jQuery("#tplQty").val(parseInt(jQuery("#tplQty").val())+1)}if(jQuery("#roomtype"+roomCountStart).val()=="QUD_4")jQuery("#quadQty").val(parseInt(jQuery("#quadQty").val())+1);if(n>0){i+=n;for(childStart=1;childStart<=n;childStart++){var o="childAge"+roomCountStart+childStart;var p=jQuery("#"+o).val();if(p==0){b=1;c+="<li>"+CHILD_AGE_MESSAGE+roomCountStart+"</li>"}}}}j=h+i;jQuery("#noOfAdults").val(h);jQuery("#noOfChildren").val(i);if(j>=10){b=1;c+="<li>The maximum number of passengers allowed is 9 </li>"}if(b==0){jQuery("form[name='ezeego_hotels']").append(jQuery("#productForm").html());jQuery("#checkindate, #adult1, #adult2, #adult3, #child1, #child2, #child3").removeAttr("disabled");if(jQuery("#hotel_name").val()=="Any"||jQuery("#hotel_name").val()==" "){jQuery("#hotel_name").val("")}document.ezeego_hotels.submit()}else{fcbkFunctionwidget(c);return false}}function childShow(a){noOfChild=jQuery("#child"+a).val();clearChildAge(a,noOfChild);hideChild(a,noOfChild);showChild(a,noOfChild)}function showChild(a,b){for(childStart=1;childStart<=b;childStart++){id="childAge"+a+childStart;jQuery("#"+id).show()}}function hideChild(a,b){for(childStart=2;childStart>b;childStart--){id="childAge"+a+childStart;jQuery("#"+id).hide()}}function clearChildAge(a,b){for(childStart=2;childStart>b;childStart--){id="childAge"+a+childStart;jQuery("#"+id).val(0)}}function showRoomDet(a){var b=jQuery("#roomtype"+a).val();var c=roomTypeArr[b];var d=c.split(",");var e=d[0];var f=d[1];jQuery("#adult"+a,"#child"+a).removeAttr("disabled");jQuery("#adult"+a).val(e);jQuery("#child"+a).val(f);jQuery("#adult"+a,"#child"+a).attr("disabled","disabled");var g="extraBed"+a;jQuery("input[name="+g+"]").attr("checked",true);jQuery("#childAge"+a).val("0");for(childStart=2;childStart>f;childStart--){jQuery("#childAge"+a+childStart).val("0")}if(f==0){jQuery("#child_part"+a).hide()}else{jQuery("#child_part"+a).show();if(f<2){for(childStart=2;childStart>f;childStart--){jQuery("#childAge"+a+childStart).val("0");jQuery("#childAge"+a+childStart).hide()}}else{for(childStart=1;childStart<=f;childStart++){jQuery("#childAge"+a+childStart).show()}}}if(e=="3"){if(f=="1"){jQuery("#exbedtxt"+a).hide();jQuery("#extraBed"+a).hide()}}if(e=="2"){if(parseInt(f)>0){jQuery("#exbedtxt"+a).show();jQuery("#extraBed"+a).show()}}}function showRoom(){noOfRooms=jQuery("#norooms").val();for(roomStart=1;roomStart<=noOfRooms;roomStart++){var a="room_det"+roomStart;jQuery("#"+a).show();showRoomDet(roomStart)}if(noOfRooms<3){noOfRooms++;for(roomStart=noOfRooms;roomStart<=3;roomStart++){a="room_det"+roomStart;document.getElementById("roomtype"+roomStart).selectedIndex=2;jQuery("#"+a).hide()}}}function checkindateRange(){changeCheckIndate(document.getElementById("night_id"))}function hotels_loadlist(a,b){var c="";var d="";var e=false;var f;if(countryCounter>9){countryCounter=0}if(a=="domestic"||a=="international"){d=HOSTURL+"hotels/lib/searchcountry1.php?isdomestic="+a;if(a=="domestic"&&domCountryArray.length>0){e=true}if(a=="international"&&intCountryArray.length>0){e=true}}if(a=="country"){d=HOSTURL+"hotels/lib/searchcity1.php?country="+jQuery("#country").val();f=0;for(j=0;j<stored_country_array.length;j++){if(stored_country_array[j][0]==jQuery("#country").val()){f=j+1}}if(f>0){e=true}}if(!e){xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert(ajaxmessage)}else{xmlHttp.onreadystatechange=function(){try{if(xmlHttp.readyState==4){data=getResultArray(xmlHttp.responseText);if(a=="domestic"){domCountryArray=data;createListOfItems(document.getElementById("country"),domCountryArray,"Country",b)}else if(a=="international"){intCountryArray=data;createListOfItems(document.getElementById("country"),intCountryArray,"Country",b)}else if(a=="country"){c=data;stored_country_array[countryCounter]=new Array(2);stored_country_array[countryCounter][0]=jQuery("#country").val();stored_country_array[countryCounter][1]=c;createListOfItems(document.getElementById("city"),stored_country_array[countryCounter][1],"City",b);countryCounter++}}}catch(d){}};xmlHttp.open("GET",d,true);xmlHttp.send(null)}}else{if(a=="domestic"||a=="international"){if(a=="domestic"&&domCountryArray.length>0){createListOfItems(document.getElementById("country"),domCountryArray,"Country",b)}if(a=="international"&&intCountryArray.length>0){createListOfItems(document.getElementById("country"),intCountryArray,"Country",b)}}if(a=="country"){createListOfItems(document.getElementById("city"),stored_country_array[f-1][1],"City",b)}}}function clearComboBoxes(a){a.length=0}function AddItem(a,b,c){var d=document.createElement("option");a.options.add(d);d.text=b;d.value=c}function createListOfItems(a,b,c,d){clearComboBoxes(a);var e=1;if(d=="within"&&c=="Country"){}else{AddItem(a,c,"")}if(b&&b.length>0){for(var f=0;f<b.length;f++){AddItem(a,b[f],b[++f])}}}function getResultArray(a){var b=a.split("##");var c=new Array;for(var d=0;d<b.length;d++){rtrnx=b[d].split("#");c.push(rtrnx[1]);c.push(rtrnx[0])}return c}function GetXmlHttpObject(){var a=null;if(window.XMLHttpRequest){a=new XMLHttpRequest}else if(window.ActiveXObject){a=new ActiveXObject("Microsoft.XMLHTTP")}return a}function checkindateRange(){chInDate=document.getElementById("night_id");validateIntegers(chInDate);var a=new Date;var b=jQuery("#checkindate").val();var c=b.split("/");var d="20"+c[2];var e=c[1]-1;var f=parseInt(c[0],10)+parseInt(jQuery(chInDate).val());a.setFullYear(d,e,f);var g=a.getDate();if(g<10)g="0"+g;var d=a.getFullYear().toString().substring(2);var e=a.getMonth()+1;if(e<10)e="0"+e;var h=g+"/"+e+"/"+d;var i=new Date;if(a>i)jQuery("#checkoutdate").val(h)}function hotels(a){jQuery("#country").change(function(){hotels_loadlist("country",a)});isDomintVar=a=="within"?"domestic":"international";jQuery("#isWithin").val(isDomintVar);if(a=="within"){jQuery("#domestic_populer_country").show();jQuery("#international_populer_country").hide()}if(a=="outside"){jQuery("#domestic_populer_country").hide();jQuery("#international_populer_country").show();jQuery("#country").html('<option value="">Country</option>');jQuery("#city").html('<option value="">City</option>')}if(a=="within"){hotels_loadlist("country",a)}else{hotels_loadlist("international",a)}jQuery("#checkindate").datepicker({showOn:"both",buttonImage:STATICURL+"/images/home/cal.gif",buttonImageOnly:true,buttonText:"Choose date",minDate:0,maxDate:false,changeMonth:false,changeYear:false,numberOfMonths:2,dateFormat:"dd/mm/y",firstDay:1,closeText:"",clearText:"",currentText:"",prevImage:STATICURL+"/images/double_prev.gif",nextImage:STATICURL+"/images/double_next.gif",onClose:checkindateRange});jQuery("img.datepicker_trigger").attr({width:"16",height:"15"}).css("vertical-align","bottom");jQuery("#adult1, #adult2, #adult3 ").attr("disabled","disabled");jQuery("#checkindate").attr("readonly","readonly");showRoom();showRoomDet("1")}function flight_validateReturnDate(){var a=false;var b=jQuery("#fromDate").datepicker("getDate");var c=jQuery("#returnDate").datepicker("getDate");var d=b.getDate();var e=b.getMonth();var f=b.getFullYear();var g=c.getDate();var h=c.getMonth();var i=c.getFullYear();if(f==i){if(e<h){a=true}if(e==h){if(d<=g){a=true}}}if(f<i){a=true}return a}function flight_search(){var a="";jtype=jQuery("input[name=tripType]:checked").attr("id");FlightType=jQuery("ul.tabs li.active a").attr("id")=="within"?"domestic":"international";if(jtype!="jtype3"){if(jQuery("#fromIATA").val()==""){a+="<li>Please fill in suitable city in 'from' field.</li>"}if(jQuery("#toIATA").val()==""){a+="<li>Please fill in suitable city in 'to' field.</li>"}if(jQuery("#fromDate").val()==""||jQuery("#fromDate").val()=="dd/mm/yy"){a+="<li>Please fill in suitable date in 'Depart' field.</li>"}if(jtype=="jtype2"){if($("#returnDate").val()==""||$("#returnDate").val()=="dd/mm/yy"){a+="<li>Please fill in suitable date in 'Return' field.</li>"}}if(jQuery("#fromIATA").val()==jQuery("#toIATA").val()){a+="<li>From city and To city can not be same.</li>"}if(jQuery("#noOfAdults").val()=="0"){a+="<li>Number Of Adults.</li>"}if(jQuery("#airlinename").val()==""){a+="<li>Select one airline or any.</li>"}if(jQuery("#noOfInfantSeat").val()>jQuery("#noOfAdults").val()){a+="<li>Number of infant cannot be greater than number of adult.</li>"}if(jtype=="jtype2"){if(!flight_validateReturnDate()){a+="<li>Return journey date cant be greater than Leaving date.</li>"}}jQuery("#domint").val(FlightType)}else{if(jQuery("#noOfAdults_multi").val()=="0"){a+="<li>Number Of Adults</li>"}if(jQuery("#airlinemulti").val()==""){a+=" <li>Select one airline or any</li>\t"}if(jQuery("#noOfInfantSeat_muilti").val()>jQuery("#noOfAdults_multi").val()){a+="<li>Number of infant cannot be greater than number of adult.</li>"}var b=0;var c=0;var d=0;var e=0;var f="";var g="";sector=jQuery(".multicitycontent").length;for(s=1;s<=sector;s++){f=jQuery("#fromIATA"+s).val().split("(");g=jQuery("#toIATA"+s).val().split("(");jQuery("#fromCityName"+s).val(f[0]);jQuery("#toCityName"+s).val(g[0]);if(jQuery("#fromIATAcode"+s).val()==""){b++}if(jQuery("#toIATAcode"+s).val()==""){c++}if(jQuery("#toIATAcode"+s).val()==jQuery("#fromIATAcode"+s).val()){d++}if(jQuery("#fromDate"+s).val()==""||jQuery("#fromDate"+s).val()=="dd/mm/yy"){e++}}if(b>0){a+="<li>Please fill in suitable city in 'from' field.</li>"}if(c>0){a+="<li>Please fill in suitable city in 'to' field.</li>"}if(d>0){a+="<li>To and From cannot be same city.</li>"}if(e>0){a+="<li>Please fill in suitable date in 'Depart' field.</li>"}jQuery("#domint").val("multicity")}jQuery("#selecttypeflights").val(jQuery("ul.tabs li.active a").attr("id"));jQuery("#dom").val(FlightType=="domestic"?"Y":"N");jQuery("#isWithin").val(FlightType);return a}function flight_close(a,b){input=jQuery(this);fDate=input.datepicker("getDate");if(input.attr("id")=="fromDate"){if(jQuery("#returnDate").val()!=""&&jQuery("#returnDate").val()!="dd/mm/yy"){tDate=jQuery("#returnDate").datepicker("getDate");if(fDate>tDate)jQuery("#returnDate").val("dd/mm/yy")}}if(input.attr("id")=="leave_date"){if(jQuery("#departure_date").val()!=""&&jQuery("#departure_date").val()!="dd/mm/yy"){tDate=jQuery("#departure_date").datepicker("getDate");if(fDate>tDate)jQuery("#departure_date").val("dd/mm/yy")}}}function flight_datepicker(a){jQuery(a).datepicker({showOn:"both",buttonImage:STATICURL+"/images/home/cal.gif",buttonImageOnly:true,buttonText:"Choose date",minDate:0,maxDate:false,changeMonth:false,changeYear:false,numberOfMonths:2,dateFormat:"dd/mm/y",firstDay:1,closeText:"",clearText:"",currentText:"",prevImage:STATICURL+"/images/double_prev.gif",nextImage:STATICURL+"/images/double_next.gif",beforeShow:flight_customRange,onClose:flight_close});jQuery("img.datepicker_trigger").attr({width:"16",height:"15"}).css("vertical-align","bottom")}function flight_multcity(){sector=parseInt(jQuery("#outside_flights").find("div.multicitycontent").length)+1;strHtml="";strHtml+='<div class="multicitycontent">';strHtml+='<div class="multi_sector2">Sector'+sector+"</div>";strHtml+='<div class="multi_type">';strHtml+='<div class="multi_from">From</div>';strHtml+="<div>";strHtml+='<input type="hidden" name="fromCityName'+sector+'" id="fromCityName'+sector+'" value="" /><input type="hidden" name="fromIATAcode'+sector+'" id="fromIATAcode'+sector+'" value=""  />';strHtml+='<input type="text" name="fromIATA'+sector+'" id="fromIATA'+sector+'" value="Type City"  /></div>';strHtml+="</div>";strHtml+='<div class="multi_type">';strHtml+='<div class="multi_from">To</div>';strHtml+='<div><input type="hidden" name="toCityName'+sector+'" id="toCityName'+sector+'" value="" />';strHtml+='<input type="hidden" name="toIATAcode'+sector+'" id="toIATAcode'+sector+'" value=""  />';strHtml+='<input type="text" name="toIATA'+sector+'" id="toIATA'+sector+'" value="Type City"/>';strHtml+="</div>";strHtml+="</div>";strHtml+='<div class="multi_type_cal">';strHtml+='<div class="multi_depart">Depart</div>';strHtml+='<div class="fl"><input type="text" value="dd/mm/yy" name="fromDate'+sector+'" id="fromDate'+sector+'" disabled="disabled" /></div>';strHtml+="</div>";strHtml+='<div class="multi_type_time">';strHtml+='<div class="multi_from">Time</div>';strHtml+='<div><select name="time'+sector+'" id="time'+sector+'">';strHtml+='<option value="Any" selected="selected">Any</option>';strHtml+='<option value="1.00">1:00</option>';strHtml+='<option value="2.00">2:00</option>';strHtml+='<option value="3.00">3:00</option>';strHtml+='<option value="4.00">4:00</option>';strHtml+='<option value="5.00">5:00</option>';strHtml+='<option value="6.00">6:00</option>';strHtml+='<option value="7.00">7:00</option>';strHtml+='<option value="8.00">8:00</option>';strHtml+='<option value="9:00">9:00</option>';strHtml+='<option value="10:00">10:00</option>';strHtml+='<option value="11:00">11:00</option>';strHtml+='<option value="12:00">12:00</option>';strHtml+='<option value="13:00">13:00</option>';strHtml+='<option value="14:00">14:00</option>';strHtml+='<option value="15:00">15:00</option>';strHtml+='<option value="16:00">16:00</option>';strHtml+='<option value="17:00">17:00</option>';strHtml+='<option value="18:00">18:00</option>';strHtml+='<option value="19:00">19:00</option>';strHtml+='<option value="20:00">20:00</option>';strHtml+='<option value="21:00">21:00</option>';strHtml+='<option value="22:00">22:00</option>';strHtml+='<option value="23:00">23:00</option>';strHtml+="</select></div>";strHtml+="</div>";strHtml+="</div>";jQuery("#SectorCount").val(sector);jQuery("#max_count").val(sector+1);jQuery(".sector_text").before(strHtml);flight_datepicker("#fromDate"+sector);jQuery("#outside_flights div.multicitycontent:last").find("input[id*=IATA][type=text]").each(function(){IiCode="#"+jQuery(this).prev("input").attr("id");MmCode=jQuery(this).attr("id");flight_atcmpFun(MmCode,IiCode)});if(jQuery("#outside_flights div.multicitycontent").length>2){jQuery("#deletemore").show()}}function flight_atcmpFun(a,b){jQuery("#"+a).autocomplete(HOSTURL+"flights/index.php?action=retrieveAirports&isdomestic=International&dom=true",{matchContains:true,minChars:3,otherinput:b,width:300});jQuery("#"+a).val("- Type City Here -").css("color","#888").click(function(){jQuery("#"+a).val("").css("color","#000")})}function flight_getAirlineList(a){var b="";if(a=="within"){b+='<option value="AI,IX,GO,6E,9W,S2,IT,SG">All Airlines</option>';b+='<option value="AI">Air India - AI</option>';b+='<option value="IX">Air India Express</option>';b+='<option value="GO">Go Air</option>';b+='<option value="6E">Indigo</option>';b+='<option value="9W">Jet Airways</option>';b+='<option value="S2">JetLite</option>';b+='<option value="IT">Kingfisher Airlines</option>';b+='<option value="SG">Spicejet</option>'}else{b+='<option value="Any">All Airlines</option>';b+='<option value="SU">Aeroflot</option>';b+='<option value="VV">Aerosvit Airlines</option>';b+='<option value="KC">Air Astana</option>';b+='<option value="AC">Air Canada</option>';b+='<option value="CA">Air China</option>';b+='<option value="AF">Air France</option>';b+='<option value="AI">Air India - AI</option>';b+='<option value="IX">Air India Express</option>';b+='<option value="G9">Air Arabia</option>';b+='<option value="MK">Air Mauritius</option>';b+='<option value="NZ">Air New-Zealand</option>';b+='<option value="HM">Air Seychelles</option>';b+='<option value="AB">AirBerlin</option>';b+='<option value="FL">Airlec</option>';b+='<option value="AZ">Alitalia</option>';b+='<option value="NH">All Nippon Airlines/Ana Airlines</option>';b+='<option value="AA">American Airlines </option>';b+='<option value="OZ">Asiana Airlines</option>';b+='<option value="OS">Austrian Airlines</option>';b+='<option value="BG">Biman Bangladesh Airlines</option>';b+='<option value="BA">British Airways</option>';b+='<option value="BD">Brtish Midland</option>';b+='<option value="SN">Brussels Airlines</option>';b+='<option value="CX">Cathay Pacific</option>';b+='<option value="CI">China Airlines</option>';b+='<option value="MU">China Eastern Airways</option>';b+='<option value="CZ">China Southern Air</option>';b+='<option value="XG">clickair</option>';b+='<option value="CO">Continental Airlines</option>';b+='<option value="OK">Czech Airlines</option>';b+='<option value="DL">Delta</option>';b+='<option value="U2">Easyjet</option>';b+='<option value="MS">Egypt Air</option>';b+='<option value="LY">El Al Israel Airlines</option>';b+='<option value="EK">Emirates</option>';b+='<option value="ET">Ethiopian Airways</option>';b+='<option value="EY">Etihad Airways</option>';b+='<option value="GJ">Eurofly S.P.A.</option>';b+='<option value="BR">Eva Airways</option>';b+='<option value="AY">Finn Air</option>';b+='<option value="LF">flynordic</option>';b+='<option value="SJ">freedom air</option>';b+='<option value="GA">Garuda Indonesia</option>';b+='<option value="Z5">Gmg Airlines</option>';b+='<option value="GF">Gulf Airways</option>';b+='<option value="HR">Hahn Air Lines</option>';b+='<option value="KA">HONG KONG DRAGON AIRLINES</option>';b+='<option value="IR">Iran Air</option>';b+='<option value="6E">Indigo</option>';b+='<option value="JL">Japan Air</option>';b+='<option value="9W">Jet Airways</option>';b+='<option value="S2">JetLite</option>';b+='<option value="KL">K.L.M</option>';b+='<option value="KQ">Kenya Airlines</option>';b+='<option value="IT">Kingfisher Airlines</option>';b+='<option value="KE">Korean Air</option>';b+='<option value="KU">Kuwait Airways</option>';b+='<option value="LH">Lufthansa</option>';b+='<option value="W5">Mahan Airlines</option>';b+='<option value="MH">Malaysia Airways</option>';b+='<option value="WY">Oman Air</option>';b+='<option value="QF">Qantas Airlines</option>';b+='<option value="QR">Qatar Airways</option>';b+='<option value="RT">Rak Airways</option>';b+='<option value="BI">Royal Brunei</option>';b+='<option value="RJ">Royal Jordanian</option>';b+='<option value="RA">Royal Nepal Airlines</option>';b+='<option value="SV">Saudi Arabian Airlines</option>';b+='<option value="SK">Scandinavian Airlines</option>';b+='<option value="FM">Shanghai Airlines</option>';b+='<option value="MI">Silk Air</option>';b+='<option value="SQ">Singapore Airlines</option>';b+='<option value="NE">Skyeurope</option>';b+='<option value="SA">South African Airways</option>';b+='<option value="SG">Spicejet</option>';b+='<option value="UL">Sri Lankan Airlines</option>';b+='<option value="NB">Sterling Airways</option>';b+='<option value="LX">Swiss International</option>';b+='<option value="TG">Thai Airways</option>';b+='<option value="HV">Transavia Airlines</option>';b+='<option value="TK">Turkish Air </option>';b+='<option value="US">U.S Airways</option>';b+='<option value="UA">United Airlines</option>';b+='<option value="VN">Vietnam Airways</option>';b+='<option value="VS">Virgin Atlantic</option>';b+='<option value="DJ">Virgin Australia</option>';b+='<option value="IV">VolaWindJet</option>';b+='<option value="VY">vueling</option>';b+='<option value="IY">Yemenia Yemen Airways</option>'}jQuery("#airlinename").html(b);if(jQuery("#airlinemulti")){jQuery("#airlinemulti").html(b)}}function flight_customRange(a){xDate=0;if(jQuery("#jtype3").attr("checked")==false){if(a.id=="returnDate"){if(jQuery("#fromDate").val()!=""&&jQuery("#fromDate").val()!="dd/mm/yy"){xDate=jQuery("#fromDate").datepicker("getDate")}}if(a.id=="departure_date"){if(jQuery("#leave_date").val()!=""&&jQuery("#leave_date").val()!="dd/mm/yy"){xDate=jQuery("#leave_date").datepicker("getDate")}}}else if(jQuery("#jtype3").attr("checked")){if(a.id=="leave_date_pass"){xDate=0}else{var b=parseInt(a.id.replace("fromDate",""));if(b!=1){if(a.id!="fromDate"+parseInt(b-1)){if(jQuery("#fromDate"+b).val()!=""&&jQuery("#fromDate"+b).val()!="dd/mm/yy"){xDate=jQuery("#fromDate"+parseInt(b-1)).datepicker("getDate")}}}}}return{minDate:xDate}}function flight_loadcitylist(){var a="";jQuery.ajax({type:"get",url:HOSTURL+"flights/index.php?action=retrieveCountryAirportsAjax&isdomestic=Domestic",dataType:"text",async:false,success:function(b){a=b}});return a}function flight_adult(){jQuery("#noOfAdults").change(function(){var a=jQuery("#noOfAdults").val();if(a){jQuery("#noOfChild").empty();var b=0;for(var c=9;c>=a;c--){jQuery("#noOfChild").append("<option>"+b+"</option>");b++}jQuery("#noOfInfantSeat").empty();for(var d=0;d<=a;d++){jQuery("#noOfInfantSeat").append("<option>"+d+"</option>")}}});jQuery("#noOfAdults_multi").change(function(){var a=jQuery("#noOfAdults_multi").val();if(a){jQuery("#noOfChild_multi").empty();var b=0;for(var c=9;c>=a;c--){jQuery("#noOfChild_multi").append("<option>"+b+"</option>");b++}jQuery("#noOfInfantSeat_multi").empty();for(var d=0;d<=a;d++){jQuery("#noOfInfantSeat_multi").append("<option>"+d+"</option>")}}})}function disableddates(){jQuery("#fromDate,#returnDate, .multi_type_cal input").attr("readonly","true")}function flights(a){var b=false;jQuery("input[name=tripType]").click(function(){if(jQuery(this).attr("id")=="jtype1"){jQuery("#returnDiv").hide();jQuery("#outside_flights").hide().find("*").attr("disabled","disabled");jQuery("#within_flights").show().find("*").removeAttr("disabled")}else if(jQuery(this).attr("id")=="jtype2"){jQuery("#outside_flights").hide().find("*").attr("disabled","disabled");jQuery("#within_flights").show().find("*").removeAttr("disabled");jQuery("#returnDiv").show()}else if(jQuery(this).attr("id")=="jtype3"){jQuery("#outside_flights").show().find("*").removeAttr("disabled");jQuery("#within_flights").hide().find("*").attr("disabled","disabled");if(!b){b=true;flight_datepicker(".multi_type_cal input[name*=Date]")}jQuery(".multicitycontent").find("input[id*=IATA][type=text]").each(function(){ICode="#"+jQuery(this).prev("input").attr("id");MCode=jQuery(this).attr("id");flight_atcmpFun(MCode,ICode)})}disableddates()});flight_adult();flight_datepicker("#fromDate, #returnDate");jQuery("#jtype3").parent().parent().hide();var c='<option selected value="Economy">Economy</option><option value="Business">Business</option>';if(a=="outside"){c+='<option  value="First">First</option>';jQuery("#fromIATA").parent().html('<input type="hidden"  name="fromIATA" id="fromIATA" value="" /><input type="text" class="outsideinput_text" id="fromIATAo" value="Type City Here" />');jQuery("#toIATA").parent().html('<input type="hidden" name="toIATA" id="toIATA" value="" /><input type="text" class="outsideinput_text" id="toIATAo" value="Type City Here" />');flight_atcmpFun("fromIATAo","#fromIATA");flight_atcmpFun("toIATAo","#toIATA");jQuery("#jtype3").parent().parent().show()}if(a=="within"){flightData=flight_loadcitylist();jQuery("#fromIATA").parent().html('<select id="fromIATA" name="fromIATA">'+flightData+"</select>");jQuery("#toIATA").parent().html('<select id="toIATA" name="toIATA">'+flightData+"</select>");jQuery("#fromIATA").find("option[value=BOM]").attr("selected","selected");jQuery("#toIATA").find("option[value=DEL]").attr("selected","selected")}flight_getAirlineList(a);jQuery("#class_onward,#class_multi").html(c);disableddates();jQuery("#addmore").click(function(){flight_multcity()});jQuery("#deletemore").click(function(){jQuery("#outside_flights div.multicitycontent:last").remove();sector=jQuery("#outside_flights div.multicitycontent").length;if(sector<=2){jQuery("#deletemore").css("display","none")}jQuery("#max_count").val(parseInt(sector)+1);jQuery("#SectorCount").val(sector)});jQuery("#searchMulti, #searchflight").click(function(){var a="";a=flight_search();if(a!=""){fcbkFunctionwidget(a)}else{jtype=jQuery("input[name=tripType]:checked").attr("id");if(jtype!="jtype3"){jQuery("#within_flights *").removeAttr("disabled");jQuery("#outside_flights *").attr("disabled","disabled");jQuery("#returnDate").attr("disabled","disabled");if(jtype=="jtype2")jQuery("#returnDate").removeAttr("disabled")}else{jQuery("#outside_flights *").removeAttr("disabled");jQuery("#within_flights *").attr("disabled","disabled")}jQuery("#main_form_area").append(jQuery("#productForm").html());jQuery("#main_form_area").trigger("submit")}})}function displayOfferSection(a){jQuery("#"+a+"DealD").hide();jQuery("#"+a+"DealO").hide();jQuery("#"+a+"DealI").hide();offer_section_within=jQuery("#"+a+"_offer_ip_D").val();offer_section_outside=jQuery("#"+a+"_offer_ip_I").val();if(domint=="within"&&offer_section_within=="1"){jQuery("#"+a+"DealD").show();jQuery("#"+a+"_offer").show()}if(domint=="outside"&&offer_section_outside=="1"){jQuery("#"+a+"DealI").show();jQuery("#"+a+"_offer").show()}if(a=="hotels"&&domint=="outside"){jQuery("#"+"hot_W").hide();jQuery("#"+"hot_O").show();jQuery("#"+a+"DealO").show();jQuery("#"+a+"_offer").show()}else if(a=="hotels"&&domint=="within"){jQuery("#"+"hot_W").show();jQuery("#"+"hot_O").hide()}if(a=="holidays"&&domint=="outside"){jQuery("#"+"hol_W").hide();jQuery("#"+"hol_O").show();jQuery("#"+a+"DealO").show();jQuery("#"+a+"_offer").show()}else if(a=="holidays"&&domint=="within"){jQuery("#"+"hol_W").show();jQuery("#"+"hol_O").hide();jQuery("#"+a+"DealD").show();jQuery("#"+a+"_offer").show()}}function commonFunction(a){domint=jQuery("ul.tabs li.active").find("a").attr("id");jQuery(".offersection").hide();if(a=="flights"){jQuery(".lime_top_repet").html("<h1>Book Flight Tickets</h1>");flights(domint);displayOfferSection(a)}if(a=="hotels"){jQuery(".lime_top_repet").html("<h1>Book Hotels Online</h1>");hotels(domint);displayOfferSection(a)}if(a=="holidays"){jQuery(".lime_top_repet").html("<h1>Online Holiday Booking</h1>");holidays(domint);displayOfferSection(a)}if(a=="indianrail"){jQuery(".lime_top_repet").html("<h1>Book Train Tickets</h1>");indianrail()}if(a=="eurail"){jQuery(".lime_top_repet").html("<h1>Book your rail</h1>");eurail()}}var countryCounter=0;var stored_country_array=new Array;var stored_cities=new Array;var domCountryArray=new Array;var intCountryArray=new Array;var roomTypeArr=new Array;var isDomestic="domestic";var COUNTRY_MESSAGE="Please select a country.";var CITY_MESSAGE="Please select a city.";var CHECKINDATE_MESSAGE="Please select checkin date.";var NOOFNIGHTS_MESSAGE="Please enter No. of Nights.";var NOOFNIGHTS_NUMERIC_MESSAGE="Please enter numeric No. of Nights";var NOOFNIGHTS_ZERO_MESSAGE="Please enter No. of Nights greater than zero.";var CHILD_AGE_MESSAGE="Please select child age for Room ";var CHECKIN_CHECKOUT_MESSAGE="Checkin date must be before Checkout date.";var emailidpattern=/^[a-zA-Z]{1,}[a-zA-Z0-9-_.]{1,}@[a-zA-Z0-9.]{2,}[a-zA-Z]{2,3}$/g;var msg="";roomTypeArr["SGL_1"]="1,0";roomTypeArr["DBL_1"]="1,0";roomTypeArr["DBL_2"]="2,0";roomTypeArr["TWN_1"]="1,0";roomTypeArr["TWN_2"]="2,0";roomTypeArr["TRP_3"]="3,0";roomTypeArr["QUD_4"]="4,0";roomTypeArr["DBL_1C"]="2,1";roomTypeArr["DBL_2C"]="2,2";roomTypeArr["TRP_1C"]="3,1";jQuery("document").ready(function(){jQuery("ul.tabs li:first").addClass("active").show();jQuery("ul.tabs li a").click(function(){jQuery("ul.tabs li").removeClass("active");jQuery(this).parent().addClass("active");pdt=jQuery("#frmProduct input:radio:checked").val();jQuery("#frmProduct input:radio[value="+pdt+"]").trigger("click");return false});jQuery("#frmProduct input:radio").click(function(){var a="";if(jQuery(this).val()=="rail"){jQuery("#outside").parent().removeClass("active");jQuery("#within").parent().addClass("active");jQuery("#outside").hide();domint=jQuery("ul.tabs li.active").find("a").attr("id");if(domint=="within"){a="indianrail"}else{a="eurail"}if(jQuery("#sc_bool").val()=="Y"){alert("You can not book rail product when your shopping cart contain any product. So you are redirecing to flight product");jQuery("#outside").show();jQuery("#frmProduct input:radio[value=flights]").attr("checked","checked");a="flights"}}else{jQuery("#outside").show();a=jQuery(this).val()}jQuery.ajax({type:"GET",url:HOSTURL+"flights/index.php",data:"product="+a+"&action=ajaxRequest",success:function(b){jQuery("#productdiv").html(b);commonFunction(a)},error:function(b,c,d){jQuery("#productdiv").html(a+" parameters are not available")}})});jQuery("#within").trigger("click");jQuery("#subscribebtn").click(function(){var a=jQuery("#subscribe").val();var b="";if(a==""){b='<span style="color:gray"><b>Please subscribe your email id for best deals.</b></span>'}else if(a.search(emailidpattern)==-1){b='<span style="color:gray"><b>Please enter a valid email ID.</b></span>'}if(b!=""){fcbkFunction(b)}else{jQuery.ajax({type:"post",url:HOSTURL+"flights/index.php?action=subcribe",data:"subscriberemailid="+a,success:function(a){if(a==="success"){a='<span style="color:gray"><b>Thank you for submitting your e-mail address!</b></span><br><br>You Shall start receiving ezeego1 exclusive deals in<br>your mailbox soon.';jQuery("#subscribe").val("")}else{a='<span style="color:gray"><b>This email-id is already registered!</b></span><br/><br/>Please try other e-mail address..'}fcbkFunction(a)}})}return false})})
