window.name='main';
var homeURL=1;
// this is can be used for all pop up window, need to define URL, and sizes
function Popup_universal(URL,Width,Height)
{
window.open(URL,'Modify','resizable,scrollbars,width='+Width+',height='+Height);
}
var ActiveLayer="";
var ActiveImage="";
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
MM_preloadImages('http://www.geopassage.com/images/nav_search_car_over_new.gif','http://www.geopassage.com/images/nav_search_hotel_over_new.gif','http://www.geopassage.com/images/nav_search_airfare_over_new.gif','http://www.geopassage.com/images/nav_search_airfare_deals_new.gif');

function myswap(imgName,newimage,foritem) {
	if (foritem != ActiveLayer) { //only change if not the active layer
		if(document.getElementById){
			document.images[imgName].src = newimage;
	 	}else if(document.all){
	 		document.all(imgName).src = newimage;
	 	}
	 }
}

//Set Up the option counts for the Hotel and Flight searches
var arrM = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
var textm="";
var textp="";
var textt="";
var textd="";
textm="";
textp="";
textt="";
textd="";
for (ii=0;ii<=30;ii++){
    if (ii<=11){ //all values
		textp +="<option value= " + ii + ">" + ii + "</option>";
		textm += "<option value= " + (ii+1) + ">" + arrM[ii] + "</option>";
		textt+="<option value= " + (ii+1) + ":00AM>" + (ii+1) + ":00 AM</option>";
		textd+="<option value= " + (ii+1) + ">" + (ii+1) + "</option>";
			if (ii==11){ //noon
				textt += "<option value= " + (ii+1) + ":00PM>Noon</option>";
			}
		}
	if ((ii<=23)&&(ii>11)){ //only days and times P.M.
		textt+="<option value= " + (ii+1) + ":00PM>" + (ii-11) + ":00 PM</option>";
			if (ii==23){ //midnight
				textt += "<option value= " + (ii+1) + ":00AM>Midnight</option>";
			}
		textd+="<option value= " + (ii+1) + ">" + (ii+1) + "</option>";
		}
	if (ii>23) { //only days
		textd+="<option value= " + (ii+1) + ">" + (ii+1) + "</option>";
	}
	}
var tempvar="";
function layershow(layername,imagelayer) {
	if(ActiveLayer != "") {
	DoHide();
	tempvar="http://www.geopassage.com/images/"+ActiveImage+"_new.gif";
//alert(tempvar);
	myswap(ActiveImage,tempvar,'nothing');
	}// else {
	//tempvar=eval("http://www.geopassage.com/images/"+imagelayer+"_over.gif");
	//myswap(layername,tempvar,imagelayer);
	//}
	myswap(imagelayer,"http://www.geopassage.com/images/"+imagelayer+"_on_new.gif",imagelayer);
	ActiveLayer=layername;
	ActiveImage=imagelayer;
	
  if(document.layers){
            //thisbrowser="NN4";
			document.layername.visibility = "visible";
        }
 if(document.getElementById){
            //thisbrowser="NN6/FF";
			document.getElementById(layername).style.display = "block";
        }
  	else if(document.all){
            //thisbrowser="ie"
			document.all(layername).style.display = "block";
        }
}

function DoHide() {
	TimeFlag= false;
  	if(document.layers){
            //thisbrowser="NN4";
            document.layer_hotel.visibility = "hidden";
        }
        if(document.all){
            //thisbrowser="ie"
            document.all(ActiveLayer).style.display = "none";
        }
        if(!document.all && document.getElementById){
            //thisbrowser="NN6";FireFox
			document.getElementById(ActiveLayer).style.display = "none";
        }
}