// JavaScript Document

var tblWidth 	= 910;		//THIS IS THE MINIMUM SIZE FOR THE POPUP MENU, AND FOR THE PAGE
var tdWidth 	= 151;		//THIS IS THE DEFAULT WIDTH OF THE TD'S IN THE POPUP MENU		
var popUpTop	= 74;		//THIS IS THE TOP POSITIO OF THE POPUP MENU ITEMS
var size5 		= 0;		//THIS IS THE SIZE OF THE SECOND LAST TD WHICH WILL EXPAND WHEN POPUP MENU IS RESIZED

function resized(){
	//THIS FUNCTION WILL RESIZE THE POPUP MENU IF THE WIDTH OF THE PAGE IS > tblWidth(910)
	//AND WILL RESIZE THE PAGE IF THE WIDTH OF THE PAGE IS < tblWidth(910)
	if(document.getElementById("PrjTable") != null){
		if(document.getElementById("PrjTable").offsetWidth  > tblWidth){
			size5 = (document.getElementById("PrjTable").offsetWidth - tblWidth)+tdWidth;
			document.getElementById("TopNavTable").width = document.getElementById("PrjTable").offsetWidth ;
			document.getElementById("LogoTable").width = document.getElementById("PrjTable").offsetWidth ;
			document.getElementById("searchTable").width = document.getElementById("PrjTable").offsetWidth ;					
			document.getElementById("navCell5").width = size5;						
		}	
		if(document.getElementById("PrjTable").offsetWidth  < tblWidth){
			document.getElementById("PrjTable").width  = tblWidth;
		}	
	}

	document.getElementById("navCell1").width = tdWidth;
	document.getElementById("navCell2").width = tdWidth;
	document.getElementById("navCell3").width = tdWidth;
	document.getElementById("navCell4").width = tdWidth;

	if (typeof window.opera != 'undefined') {	//IF THE BROWSER FOUND IS OPERA
		foundOpera();	
	}
	if(document.all) {							//IF THE BROWSER FOUND IS IE
		foundIE();
	}
	else {
		foundNS();								//IF THE BROWSER FOUND IS FIREFOEX, NETSCAPE
	}
}

function foundOpera(){
			popUpTop = 81;
			document.getElementById("Layer1").style.left =document.getElementById("navCell1").offsetLeft+7;
			document.getElementById("Layer2").style.left =document.getElementById("navCell2").offsetLeft+7;
			document.getElementById("Layer3").style.left =document.getElementById("navCell3").offsetLeft+7;
			document.getElementById("Layer4").style.left =document.getElementById("navCell4").offsetLeft+7;

			document.getElementById("Layer1").style.top =popUpTop;
			document.getElementById("Layer2").style.top =popUpTop;
			document.getElementById("Layer3").style.top =popUpTop;
			document.getElementById("Layer4").style.top =popUpTop;		

}

function foundNS(){
			document.getElementById("Layer1").style.left =document.getElementById("navCell1").offsetLeft-1;
			document.getElementById("Layer2").style.left =document.getElementById("navCell2").offsetLeft-1;
			document.getElementById("Layer3").style.left =document.getElementById("navCell3").offsetLeft-1;
			document.getElementById("Layer4").style.left =document.getElementById("navCell4").offsetLeft-1;

			document.getElementById("Layer1").style.top =popUpTop;
			document.getElementById("Layer2").style.top =popUpTop;
			document.getElementById("Layer3").style.top =popUpTop;
			document.getElementById("Layer4").style.top =popUpTop;		
}

function foundIE(){
		document.getElementById("iFrame1").style.left =document.getElementById("navCell1").offsetLeft-1;
		document.getElementById("iFrame2").style.left =document.getElementById("navCell2").offsetLeft-1;
		document.getElementById("iFrame3").style.left =document.getElementById("navCell3").offsetLeft-1;
		document.getElementById("iFrame4").style.left =document.getElementById("navCell4").offsetLeft-1;

		document.getElementById("iFrame1").style.top =popUpTop;
		document.getElementById("iFrame2").style.top =popUpTop;
		document.getElementById("iFrame3").style.top =popUpTop;
		document.getElementById("iFrame4").style.top =popUpTop;		
}

