active_form=3;active_6="yes";active_5="yes";active_4="yes";
function show_hide_form(form_no){if(form_no=='4'&&active_4=="yes"){document.getElementById("table_multi_4").style.display='';document.getElementById("add_link_4").style.display='none';document.getElementById("add_link_5").style.display='';active_form=4}else if(form_no=='5'&&active_5=="yes"){document.getElementById("table_multi_5").style.display='';document.getElementById("add_link_5").style.display='none';document.getElementById("add_link_6").style.display='';active_form=5}else if(form_no=='6'&&active_6=="yes"){document.getElementById("table_multi_6").style.display='';document.getElementById("add_link_6").style.display='none';active_form=6}}
function copy_airport(form_fill_no){form_filled_no=form_fill_no-1;if(document.getElementById("des_"+form_filled_no).value!=""&&document.getElementById("origin_"+form_fill_no).value==""){document.getElementById("origin_"+form_fill_no).value=document.getElementById("destination_"+form_filled_no).value;document.getElementById("ori_"+form_fill_no).value=document.getElementById("des_"+form_filled_no).value;document.getElementById("originregioncode_"+form_fill_no).value=document.getElementById("destinationregioncode_"+form_filled_no).value}}
function check_seg(seg_no){sg=0;for(var legnum=2;legnum<=6;legnum++){legnums=legnum-1;if(document.getElementById("ori_"+legnum).value=="From"||document.getElementById("des_"+legnums).value=="To"){return false}else if(document.getElementById("ori_"+legnum).value==""||document.getElementById("des_"+legnums).value==""){return false}else if(document.getElementById("ori_"+legnum).value!=document.getElementById("des_"+legnums).value){sg++}flightremove(seg_no,sg)}}
function flightremove(no,surface_segs){if(surface_segs==1){active_6="no";active_5="yes";active_4="yes";nos=no-1;active_6="no";if(active_form>=4){document.getElementById("table_multi_4").style.display=''}if(active_form>=5){document.getElementById("table_multi_5").style.display=''}if(active_form>=6){document.getElementById("table_multi_6").style.display='none'}if(active_form>=4&&active_4=="yes"){document.getElementById("table_multi_4").style.display='';document.getElementById("add_link_4").style.display='none';document.getElementById("add_link_5").style.display=''}if(active_form>=5&&active_5=="yes"){document.getElementById("table_multi_5").style.display='';document.getElementById("add_link_5").style.display='none';document.getElementById("add_link_6").style.display='none'}if(active_form>=6&&active_6=="no"){document.getElementById("table_multi_6").style.display='none';document.getElementById("add_link_6").style.display='none'}}else if(surface_segs==2){active_6="no";active_5="no";active_4="yes";nos=no-1;if(active_form>=5){document.getElementById("table_multi_5").style.display='none'}if(active_form>=4){document.getElementById("table_multi_4").style.display=''}if(active_form>=6){document.getElementById("table_multi_6").style.display='none'}if(active_form>=4&&active_4=="yes"){document.getElementById("table_multi_4").style.display='';document.getElementById("add_link_4").style.display='none';document.getElementById("add_link_5").style.display='none'}if(active_form>=5&&active_5=="no"){document.getElementById("table_multi_5").style.display='none';document.getElementById("add_link_5").style.display='none';document.getElementById("add_link_6").style.display='none'}if(active_form>=6&&active_6=="no"){document.getElementById("table_multi_6").style.display='none';document.getElementById("add_link_6").style.display='none'}}else if(surface_segs==3){nos=no-1;active_6="no";active_5="no";active_4="no";if(active_form>=4){document.getElementById("table_multi_4").style.display='none';}if(active_form>=5){document.getElementById("table_multi_5").style.display='none'}if(active_form>=6){document.getElementById("table_multi_6").style.display='none';}if(active_form>=4&&active_4=="no"){document.getElementById("table_multi_4").style.display='none';document.getElementById("add_link_4").style.display='none';document.getElementById("add_link_5").style.display='none'}if(active_form>=5&&active_5=="no"){document.getElementById("table_multi_5").style.display='none';document.getElementById("add_link_5").style.display='none';document.getElementById("add_link_6").style.display='none'}if(active_form>=6&&active_6=="no"){document.getElementById("table_multi_6").style.display='none';document.getElementById("add_link_6").style.display='none'}}else{active_6="yes";active_5="yes";active_4="yes";if(active_form>=4){document.getElementById("table_multi_4").style.display=''}if(active_form>=5){document.getElementById("table_multi_5").style.display=''}if(active_form>=6){document.getElementById("table_multi_6").style.display=''}if(active_form>=4&&active_4=="yes"){document.getElementById("table_multi_4").style.display='';document.getElementById("add_link_4").style.display='none';document.getElementById("add_link_5").style.display='none';document.getElementById("add_link_6").style.display='none'}if(active_form>=5&&active_5=="yes"){document.getElementById("table_multi_5").style.display='';document.getElementById("add_link_5").style.display='none';document.getElementById("add_link_6").style.display=''}if(active_form>=6&&active_6=="yes"){document.getElementById("table_multi_6").style.display='';document.getElementById("add_link_6").style.display='none'}}}
var quotations_guest=new Array();
quotations_guest[0]="<div ><img src='new_images/slide-image-1.gif' width='446' height='256' alt='Summer Sale Starts' /><div id='select_city'><select name='jumpMenu' id='domestic1'  style=' font-family:tahoma;font-size:11px;'><option value='#'>Select a City</option><option value='http://www.cheapfareguru.com/Cheap_Flight--to-New York-2-lp.html'>New York</option><option value='http://www.cheapfareguru.com/Cheap_Flight--to-Los Angeles-2-lp.html'>Los Angeles</option><option value='http://www.cheapfareguru.com/Cheap_Flight--to-Las Vegas-2-lp.html'>Las Vegas</option><option value='http://www.cheapfareguru.com/Cheap_Flight--to-San Francisco-2-lp.html'>San Francisco</option><option value='http://www.cheapfareguru.com/Cheap_Flight--to-Atlanta-2-lp.html'>Atlanta</option><option value='http://www.cheapfareguru.com/Cheap_Flight--to-Phoneix-2-lp.html'>Phoneix</option><option value='http://www.cheapfareguru.com/Cheap_Flight--to-Chicago-2-lp.html'>Chicago</option><option value='http://www.cheapfareguru.com/Cheap_Flight--to-Denver-2-lp.html'>Denver</option><option value='http://www.cheapfareguru.com/Cheap_Flight--to-San Diego-2-lp.html'>San Diego</option><option value='http://www.cheapfareguru.com/Cheap_Flight--to-Newark-2-lp.html'>Newark</option></select> <input type='image' src='new_images/go_new.gif' onClick='go_city_deal4()' name='button' id='button' value='Go' align='absmiddle'/></div></div>";quotations_guest[1]="<img src='new_images/slide-image-2.gif' width='446' height='256' alt='India Sale Starts' />";quotations_guest[2]="<img src='new_images/slide_domestic.gif' width='446' height='256' alt='Domestic Sale Starts' />";dr=-1;
function display_guest(){if(dr==-1){dr=0}else if(dr==0){dr=1}else if(dr==1){dr=2}else if(dr==2){dr=0}document.getElementById('slide_show').innerHTML=quotations_guest[dr];n=setTimeout("display_guest()",10000)}navHover=function(){var lis=document.getElementById("navmenu-h").getElementsByTagName("LI");for(var i=0;i<lis.length;i++){    lis[i].onmouseover=function(){this.className+=" iehover"};lis[i].onmouseout=function(){this.className=this.className.replace(new RegExp(" iehover\\b"),"");    }}};if(window.attachEvent)window.attachEvent("onload",navHover);    
function chbg(){document.getElementById("dep_dt").style.background="#ffffff"}
function chbg1(){document.getElementById("ret_dt").style.background="#ffffff"}
function chbg2(){document.getElementById("dat_10").style.background="#ffffff"}
function go_city_deal(){var url=document.getElementById('europe').value;window.location=url}
function go_city_deal1(){var url=document.getElementById('india').value;window.location=url}
function go_city_deal4(){var url=document.getElementById('domestic1').value;window.location=url}
var popunder=new Array();popunder[0]="pop_under_ad.html";var width='600';var height='200';var p='scrollbars=yes,resizable=yes,toolbar=yes,'+'menubar=yes,status=yes,location=no,left=yes,top=yes';var one_time=1 ;
function get_cookie(Name){var search=Name+"=";var returnvalue="";if(document.cookie.length>0){offset=document.cookie.indexOf(search);if(offset!=-1){offset+=search.length;end=document.cookie.indexOf(";",offset);if(end==-1)end=document.cookie.length;returnvalue=unescape(document.cookie.substring(offset,end))}}return returnvalue}
function loadornot(){if(get_cookie('popunder')==''){load_pop_power();document.cookie="popunder=yes"}}
function load_pop_power(){    var width='600';var height='200';win2=window.open(popunder[Math.floor(Math.random()*(popunder.length))],"bw",p+' ,height='+height+',width='+width);win2.blur();window.focus();}
function load_pop_power1(url){var width='1040';var height='700';win2=window.open(url,"bw",p+',height='+height+',width='+width);win2.blur();window.focus()}
function load_pop_power2(url){var width='520';var height='700';win2=window.open(url, 'bw', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=510,height=700,');win2.blur();window.focus()}
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=350,height=120,left = 470,top = 200');");
}
