function Set_Cookie(c,e,a,h,d,g){var b=new Date();b.setTime(b.getTime());if(a){a=a*1000*60*60*24}var f=new Date(b.getTime()+(a));document.cookie=c+"="+escape(e)+((a)?";expires="+f.toGMTString():"")+((h)?";path="+h:"")+((d)?";domain="+d:"")+((g)?";secure":"")}function Get_Cookie(c){var d=document.cookie.indexOf(c+"=");var a=d+c.length+1;if((!d)&&(c!=document.cookie.substring(0,c.length))){return null}if(d==-1){return null}var b=document.cookie.indexOf(";",a);if(b==-1){b=document.cookie.length}return unescape(document.cookie.substring(a,b))}function prepopulate(){if(!(document.getElementById("prepopFrom")&&document.getElementById("prepopTo")&&document.getElementById("prepopDate")&&document.getElementById("prepopMonth")&&document.getElementById("prepopYear")&&document.getElementById("prepopService"))){return}var d=document.getElementById("prepopFrom").innerHTML.replace(/^\s+|\s+$/g,"").toUpperCase();var e=document.getElementById("prepopTo").innerHTML.replace(/^\s+|\s+$/g,"").toUpperCase();var g=document.getElementById("prepopDate").innerHTML.replace(/^\s+|\s+$/g,"");var c=document.getElementById("prepopMonth").innerHTML.replace(/^\s+|\s+$/g,"");var h=document.getElementById("prepopYear").innerHTML.replace(/^\s+|\s+$/g,"");var b=document.getElementById("prepopService").innerHTML.replace(/^\s+|\s+$/g,"").toLowerCase();var f=false;if(d!=""){setOLHFrom(d)}if(e!=""){setOLHTo(e)}if(g!=""&&c!=""&&h!=""){var a=new Date();if((a.getDate()+1<=g&&a.getMonth()+1==c&&a.getFullYear()==h)||(a.getMonth()+1<c&&a.getFullYear()==h)||(a.getFullYear()<h)){setOLHDate(g);setOLHMonth(h+"-"+c)}}if(b!=""){setOLHService(b)}}function setOLHFrom(b){if(document.getElementById("h_depart_loc")){var a=document.getElementById("h_depart_loc");setDropDownSelection(a,b);cityChanged(document.getElementById("depart_loc"),"from","h_")}if(document.getElementById("depart_loc")){var c=document.getElementById("depart_loc");setDropDownSelection(c,b);cityChanged(document.getElementById("depart_loc"),"from","")}}function setOLHTo(c){if(document.getElementById("h_arrival_loc")){var a=document.getElementById("h_arrival_loc");setDropDownSelection(a,c);cityChanged(document.getElementById("arrival_loc"),"to","h_")}if(document.getElementById("arrival_loc")){var b=document.getElementById("arrival_loc");setDropDownSelection(b,c);cityChanged(document.getElementById("arrival_loc"),"to","")}}function setOLHDate(c){if(document.getElementById("h_depart_date")){var a=document.getElementById("h_depart_date");setDropDownSelection(a,c)}if(document.getElementById("depart_date")){var b=document.getElementById("depart_date");setDropDownSelection(b,c)}}function setOLHMonth(c){if(document.getElementById("h_depart_yearmonth")){var a=document.getElementById("h_depart_yearmonth");setDropDownSelection(a,c);dateChanged("h_",true)}if(document.getElementById("depart_yearmonth")){var b=document.getElementById("depart_yearmonth");setDropDownSelection(b,c);dateChanged("",true)}}function setOLHService(b){if(document.getElementById("h_longHaulPref")){var a=document.getElementById("h_longHaulPref");cityChanged(document.getElementById("depart_loc"),"from","h_");cityChanged(document.getElementById("arrival_loc"),"to","h_");setDropDownSelection(a,b)}if(document.getElementById("longHaulPref")){var c=document.getElementById("longHaulPref");cityChanged(document.getElementById("depart_loc"),"from","");cityChanged(document.getElementById("arrival_loc"),"to","");setDropDownSelection(c,b)}if(document.getElementById("shortHaulPref")){var c=document.getElementById("shortHaulPref");cityChanged(document.getElementById("depart_loc"),"from","");cityChanged(document.getElementById("arrival_loc"),"to","");setDropDownSelection(c,b)}}function setDropDownSelection(c,b){if(!c){return}for(var a=0;a<c.length;a++){if(c[a].value==b){c[a].selected=true}}}function waitPrepop(){if(!document.getElementById("prepopService")){if(prepop_wait_count<200){setTimeout("waitPrepop()",200);prepop_wait_count++}}else{prepopulate()}}var prepop_wait_count=0;waitPrepop();function loadIframe(d,b,c,a){d="http://"+d+"/home/";iframe=document.getElementById("iframe_cookieCrossDomain_"+a);if(iframe!=null){iframe.src=d+"cookie_cross_domain.htm?name="+b+"&value="+c}}function setFromValue(c,e){var d=document.getElementById(e);if(d==null){return}var b=d.options.length;for(i=0;i<b;i++){var a=d.options[i].value.substring(0,3);if(a==c){d.selectedIndex=i;if(e=="depart_loc"){cityChanged(d,"from","")}else{cityChanged(d,"from","h_")}return}}}function getFromValue(){var b=null;if(document.getElementById("flightsRadio")!=null){if(document.getElementById("flightsRadio").checked==true){b=document.getElementById("depart_loc")}else{b=document.getElementById("h_depart_loc")}}else{b=document.getElementById("depart_loc")}if(b==null){alert("here")}var a=b.options[b.selectedIndex].value;return a}function getFromValue2(c){var b=document.getElementById(c);var a=b.options[b.selectedIndex].value;return a}if(!m_isKiosk){var max_wait=400;var wait_count=0;wait("depart_loc");wait("h_depart_loc")};