
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")
{
//alert(legnum);
//flightremove(seg_no);
return false;
}

else if(document.getElementById("ori_"+legnum).value=="" || document.getElementById("des_"+legnums).value=="")
{
//alert(legnum);
//flightremove(seg_no);
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;
//alert("we remove 1 leg, Because you have Surface segment.");
//active_form=5;
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;
//alert("we remove 2 leg, Because you have Surface segment.");
//active_form=4;
//active_5="no";
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"
//alert("we remove 3 leg, Because you have Surface segment.");
//active_form=3;
//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 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=0,width=350,height=120,left = 470,top = 200');");
}


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;}

// Begin. Specify URLs to randomly select from and pop-under. Add or take away freely.
var popunder=new Array()


popunder[0]="pop_under_ad.html"




// Specify the width and height of new popunder window (in pixels).

var width = '365';
var height = '290';






var p = 'scrollbars=yes,resizable=yes,toolbar=no,' + //these are obvious variables. set "yes" or "no".
'menubar=no,status=no,location=no,left=85,top=20';



// Load new PopUnder only once per browser session? (0=no, 1=yes)
// Putting 0 will cause the Popunder to load every time page is loaded
// Specifying 1 will cause it to load only once per session
var one_time=1


// That's it! Don't edit the code below unless you're really good. :-P //








function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if the cookie exists
offset += search.length
end = document.cookie.indexOf(";", offset); // set the index of beginning value
if (end == -1) // set the index of the end of cookie value
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 = '365';var height = '290';
	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 = '500';var height = '760';
	
	win2=window.open(url,"bw",p+',height=' + height + ',width=' + width)
win2.blur()
window.focus()
}

