// JScript source code

var imgInternalArray = new Array(4), menArray = new Array(5);
	
	imgInternalArray[0] = new Image(132, 26); imgInternalArray[0].src = "images/menu_top/menMoving_services_on.gif";
	imgInternalArray[1] = new Image(98, 26); imgInternalArray[1].src = "images/menu_top/menCorporate_on.gif";
	imgInternalArray[2] = new Image(88, 26); imgInternalArray[2].src = "images/menu_top/menStorage_on.gif";
	imgInternalArray[3] = new Image(88, 26); imgInternalArray[3].src = "images/menu_top/menPacking_on.gif";
	imgInternalArray[4] = new Image(69, 26); imgInternalArray[4].src = "images/menu_top/menTips_on.gif";

	menArray[0] = 'menMoving_services';
	menArray[1] = 'menCorporate';
	menArray[2] = 'menStorage';
	menArray[3] = 'menPacking';
	menArray[4] = 'menTips';
	
function menuMouseOver(category, l, t){
	closeSubMenus();
	swapOn(category);	
	showSubMenu(category, l ,t);
}

function menuMouseOut(category){
	//swapOff(category);	
}

function swapOn(category){
	window.document.getElementById(category).src = 'images/menu_top/' + category + '_on.gif';
}

function swapOff(category){
	window.document.getElementById(category).src = 'images/menu_top/' + category + '_off.gif';
}

function subMouseOver(category){
	window.document.getElementById(category).className = 'SubMenuOn';
}

function subMouseOut(category){
	window.document.getElementById(category).className = 'SubMenuOff';
}

function page(slocation){
	window.location.href = slocation;
}

function showSubMenu(category, l, t){
var iLeft, iTop;
	
	iLeft = window.document.getElementById('PrimaryTable').offsetLeft + l;
	iTop = window.document.getElementById('PrimaryTable').offsetTop + t;
		
	category = category + '_sub';
	
	with (window.document.getElementById(category)){
		style.left = iLeft + 'px';
		style.top = iTop + 'px';
		style.display = 'inline';
	}
}

function closeSubMenus(){
var i;

	for (i = 0; i <= 4; i++){
		hideSubMenu(menArray[i]);
		swapOff(menArray[i]);
	}
}

function hideSubMenu(category){
	category = category + '_sub';
	window.document.getElementById(category).style.display = 'none';
}

function subDivOver(category){
	//swapOn(category);
	
	category = category + '_sub';
	document.getElementById(category).style.display = 'none';
	//document.getElementById(sMenuItem).src = arrOnImages[iElementNumber].src;
}

function subDivOut(category){
	//swapOff(category);
	hideSubMenu(category);
}




