// Website	:	Horizon Travel & Tours, Inc.
// Author	:	Mark Anthony Vasquez
// Date		:	27 May 2009

var index_off = new Image();
var index_on = new Image();

var cruises_off = new Image();
var cruises_on = new Image();

var tours_off = new Image();
var tours_on = new Image();

var airfare_off = new Image();
var airfare_on = new Image();

var domestic_off = new Image();
var domestic_on = new Image();

var travels_off = new Image();
var travels_on = new Image();

var passporting_off = new Image();
var passporting_on = new Image();

var visa_off = new Image();
var visa_on = new Image();

var about_off = new Image();
var about_on = new Image();

var activemenu = "";

function inithover(){
	index_off.src = "obj/menu/index-off.png";
	index_on.src = "obj/menu/index-on.png";
	
	cruises_off.src = "obj/menu/cruises-off.png";
	cruises_on.src = "obj/menu/cruises-on.png";
	
	tours_off.src = "obj/menu/tours-off.png";
	tours_on.src = "obj/menu/tours-on.png";
	
	airfare_off.src = "obj/menu/airfare-off.png";
	airfare_on.src = "obj/menu/airfare-on.png";

	domestic_off.src = "obj/menu/domestic-off.png";
	domestic_on.src = "obj/menu/domestic-on.png";

	travels_off.src = "obj/menu/travels-off.png";
	travels_on.src = "obj/menu/travels-on.png";

	passporting_off.src = "obj/menu/passporting-off.png";
	passporting_on.src = "obj/menu/passporting-on.png";
	
	visa_off.src = "obj/menu/visa-off.png";
	visa_on.src = "obj/menu/visa-on.png";
	
	about_off.src = "obj/menu/about-off.png";
	about_on.src = "obj/menu/about-on.png";
	
	setactivemenu();
}

function setactivemenu()
{
	var menu = new Array("index", "cruises", "tours", "airfare", "travels", "passporting", "visa", "about");
	var tempmenu = "";
	var i = 0;
	tempmenu = window.location.href;
	
	for(i = 0; i <= 8; i++)
	{
		if ( tempmenu.indexOf(menu[i]) >= 0 )
		{
			document.getElementById(menu[i]).src = eval(menu[i] + "_on.src");
			activemenu = menu[i];
		}
	}	
}

function hovereffect(objID, intState){
	if(activemenu != objID){
		if(intState == 1) {
			document.getElementById(objID).src = eval(objID + "_on.src");
		}else{
			document.getElementById(objID).src = eval(objID + "_off.src");
		}
	}
}

function SetLinkDescription(textdescription) {
	document.getElementById("link-description").innerHTML = textdescription;
}

function SetActiveTab(tabid, conid) {
	var con_A = document.getElementById("containerA");
	var con_B = document.getElementById("containerB");

	if(con_A != null) {
		con_A.style.display = "none";
		document.getElementById("buttonA").className = "tabbutton";		
	}
	if(con_B != null) {
		con_B.style.display = "none";
		document.getElementById("buttonB").className = "tabbutton";
	}

	document.getElementById(conid).style.display = "";
	document.getElementById(tabid).className = "tabactive";
}

function initTab() {
	var con_A = document.getElementById("containerA");
	var con_B = document.getElementById("containerB");
	//var con_C = document.getElementById("containerC");

	if(con_A == null) document.getElementById("buttonA").style.display = "none";
	if(con_B == null) document.getElementById("buttonB").style.display = "none";
	//if(con_C == null) document.getElementById("buttonC").style.display = "none";
	if(con_A != null && con_B != null) {
		document.getElementById("buttonA").className = "tabactive";
		document.getElementById("containerB").style.display = "none";
	}
	if(con_A == null && con_B != null) {
		document.getElementById("buttonB").className = "tabactive";
		document.getElementById("containerB").style.display = "";
	}
	
	if(con_A != null && con_B == null) document.getElementById("buttonA").className = "tabactive";
}

function openwindow(winname) {
	winref = window.open(winname, '_blank', 'width=720, height=550, location=no, resizable=yes, scrollbars=yes')	
}















