<!--
/* Javascript function for creating secondary windows to display external documents */
/* Created 10 Oct 2002 */

var strCompanyID;
var SecWin;
var strWinFeatures="";

function launchSecWin(theCompany){
// This function might be redundant when the actual sites are available.
	strCompanyID=theCompany;
	var strTargetDoc = "../support/notavail.html";
	var width = 767;
	var height = 450;

	winFeatures="width="+width+",height="+height+",personalbar=yes,toolbar=yes,menubar=yes,status=yes,location=yes,resizable=yes,scrollbars=yes";
  if (!SecWin||SecWin.closed){ //Check for the existence of the secondary window.
   SecWin=window.open(strTargetDoc,"SecWin",winFeatures);
  } else {
   SecWin.location = strTargetDoc;
  }
	setTimeout("SecWin.focus()",100);
}



var ns4 = (document.layers);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);
var ns6 = (!document.all && document.getElementById);

var strBrowserType = ns4 ? "NS4" : ie4 ? "IE4" : ie5 ? "IE5" : "NS6";

// Global variables
var xMousePos = 0; // Horizontal position of the mouse on the screen
var yMousePos = 0; // Vertical position of the mouse on the screen
var xMousePosMax = 0; // Width of the page
var yMousePosMax = 0; // Height of the page


//alert(strBrowserType);
function show(id, e){
	switch (strBrowserType){
		case "NS4" :
			var popup = document.layers[id]
			xMousePos = e.pageX;
			yMousePos = e.pageY;
			xMousePosMax = window.innerWidth+window.pageXOffset;
			yMousePosMax = window.innerHeight+window.pageYOffset;
			popup.top = yMousePos+10;
			popup.left = xMousePos-200;
			popup.visibility = "show";
			break;
		case "IE4" :
			var popStyle = document.all(id).style
			xMousePos = window.event.x+document.body.scrollLeft;
			yMousePos = window.event.y+document.body.scrollTop;
			xMousePosMax = document.body.clientWidth+document.body.scrollLeft;
			yMousePosMax = document.body.clientHeight+document.body.scrollTop;
			popStyle.visibility="visible";
			popStyle.display="inline";
			popStyle.top= yMousePos + 10;
			popStyle.left= xMousePos-200;
			break;
		case "IE5" :
			var popStyle = document.getElementById(id).style
			xMousePos = window.event.x+document.body.scrollLeft;
			yMousePos = window.event.y+document.body.scrollTop;
			xMousePosMax = document.body.clientWidth+document.body.scrollLeft;
			yMousePosMax = document.body.clientHeight+document.body.scrollTop;
			popStyle.visibility="visible";
			popStyle.display="inline";
			popStyle.top= yMousePos + 10;
			popStyle.left= xMousePos-200;
			break;
		case "NS6" :
			var popStyle = document.getElementById(id).style
			xMousePos = e.pageX;
			yMousePos = e.pageY;
			xMousePosMax = window.innerWidth+window.pageXOffset;
			yMousePosMax = window.innerHeight+window.pageYOffset;
			popStyle.visibility="visible";
			popStyle.display="inline";
			popStyle.top= yMousePos + 10;
			popStyle.left= xMousePos-200;
			break;
		default :
			break;
	}
}

function hide(id, e){
	switch (strBrowserType){
		case "NS4" :
			document.layers[id].visibility = "hidden";
			break;
		case "IE4" :
			document.all[id].style.visibility = "hidden";
			break;
		case "IE5" :
			document.getElementById(id).style.visibility = "hidden";
			break;
		case "NS6" :
			document.getElementById(id).style.visibility = "hidden";
			break;
		default :
			break;
	}
}

function writeAGITooltip(){
	var strPopup = "Australian Gypsum Industries";
	switch (strBrowserType){
		case "NS4" :
			document.write('<layer id="popup" visibility="hidden" top="200" left="200">' + strPopup + '</layer>');
			break;
		case "IE4" :
			document.write('<div id="popup" style="visibility:hidden;">' + strPopup + '</div>');
			break;
		case "IE5" :
			document.write('<div id="popup" style="visibility:hidden;">' + strPopup + '</div>');
			break;
		case "NS6" :
			document.write('<div id="popup" style="visibility:hidden;">' + strPopup + '</div>');
			break;
		default :
			break;
	}
}

//-->