function show(line,div){
	line.style.display='';
	div.style.visibility='visible';
	//locateDiv();
}

function hide(line,div){
	line.style.display='none';
	div.style.visibility='hidden';
}

function loadincludes(){
	clientSideInclude('topinc', '../includes/top.htm');
	clientSideInclude('leftinc', '../includes/left.htm');
	clientSideInclude('bottominc', '../includes/bottom.htm');
}

function OpenWinpop()
{
	var NewWin;
	path="requestQuote.htm";
	NewWin1=window.open(path,'NewWin2','height=635,width=386,top=50,left=50,location=no,status=no,toolbar=no,menubar=no,scrollbars=no');
	NewWin1.focus();
}

/********** Initialization ********************/
var leftPosToSet = 157; // left position of the Dropdown menu.
var table_width=776; // Width of the table containing actual contents.
/********** End of Initialization ********************/

/********** Start Function to Relocate menus. ********************/
function locateDiv(){
	 var x;
	 x = document.body.offsetWidth; // Window width
	 var margine = x-table_width;
	 var leftx = (margine/2);
	 var ieOffset = 11;  // For WINDOWS IE Browser, left border width is 2px and right scrollbar width is 19px 
	 // So browser offset is (2+19)/2 that is approx 11px
	 var detect = navigator.userAgent.toLowerCase(); // Browser info string.
	 var OS,browser,version,total,thestring;

	/********** Start Function to check OS, Browser, Version string in the Browser info string. ********************/
	function checkIt(string)
	{
		place = detect.indexOf(string) + 1;
		thestring = string;
		return place;
	}
	/********** End Function to check OS, Browser, Version string in the Browser info string. ********************/

	/********** Start Browser Detection ********************/
	if (checkIt('konqueror')){
		browser = "Konqueror";
		OS = "Linux";
	}
	else if (checkIt('safari')) browser = "Safari"
	else if (checkIt('firefox')) browser = "Firefox"
	else if (checkIt('netscape')) browser = "Netscape"
	else if (checkIt('omniweb')) browser = "OmniWeb"
	else if (checkIt('opera')) browser = "Opera"
	else if (checkIt('webtv')) browser = "WebTV";
	else if (checkIt('icab')) browser = "iCab"
	else if (checkIt('msie')) browser = "Internet Explorer"
	else if (!checkIt('compatible')){
		browser = "Netscape"
		version = detect.charAt(8);
	}
	else browser = "An unknown browser";
	/********** End Browser Detection********************/

	/********** Start Version Detection********************/
	if (!version) version = detect.charAt(place + thestring.length);
	/********** End Version Detection********************/

	/********** Start OS Detection********************/
	if (!OS){
		if (checkIt('linux')) OS = "Linux";
		else if (checkIt('x11')) OS = "Unix";
		else if (checkIt('mac')) OS = "Mac"
		else if (checkIt('win')) OS = "Windows"
		else OS = "an unknown operating system";
	}
	/********** End OS Detection********************/

	//alert('OS = '+OS);
	//alert('browser = '+browser);
	//alert('version = '+version);

	/********** Start Adjustments depeding upon OS, Browser, Version ********************/
	if(OS == "Windows"){
		if(browser == "Internet Explorer"){
			leftPosToSetNew = leftPosToSet - ieOffset;
			leftPosToSet = leftPosToSet;
		}else{
			leftPosToSetNew = leftPosToSet;
			leftPosToSet = leftPosToSet;
		}
	}else{
		leftPosToSetNew = leftPosToSet;
		leftPosToSet = leftPosToSet;
	}
	/********** End  Adjustmants depeding upon OS, Browser, Version ********************/

	/********** Start Repositioning the menu ********************/
	//for(i=1; i<=totalSubMenus; i++){
		if(x>table_width) {
 			document.getElementById("alinks").style.left=leftx+ leftPosToSetNew;
 			document.getElementById("ilinks").style.left=leftx+ leftPosToSetNew;
 		} else {
 			document.getElementById("alinks").style.left=leftPosToSet;
 			document.getElementById("ilinks").style.left=leftPosToSet;
		}
		
	//}
	/********** End Repositioning the menu ********************/

}
/********** End Function to Relocate menus. ********************/
