///////////////////////////////////////////////////////////////////////
// BROWERS DETECTION:
//
// Is this Netscape version 4 or earlier?
var v4 =(parseInt(navigator.appVersion) < 5) ? 1 : 0;
var ns =(navigator.appName.match(/Netscape/) && v4) ? 1 : 0;
// Is this Netscape 6+ or Mozilla?
var ns6 = (navigator.appName.match(/Netscape/) && !v4) ? 1 : 0;
// Is this Opera?
var opera = (navigator.userAgent.indexOf("Opera") != -1 ? 1 : 0);
// Is this Mozilla only?
var mozilla = (navigator.userAgent.indexOf("Gecko") != -1 && navigator.userAgent.indexOf("Netscape") == -1? 1 : 0);
// Is this IE 4? - Not used
var ie = (navigator.appName.match(/Microsoft Internet Explorer/) && v4) ? 1 : 0;



///////////////////////////////////////////////////////////////////////
// 
// WRITTEN BY TREVOR NIELSON  & Tim Flack: Aug 19, 2003
// PLATFORMS: IE 4.0+, NETSCAPE 4+, MOZILLA, OPERA
//
// NETSCAPE ISSUES:	Not Tested
// ISSUES: Not Tested
///////////////////////////////////////////////////////////////////////

	

function ShowHideTip(tipcat,proc){
	
	var windowWidth
	windowWidth = (ns || opera || ns6 ? window.innerWidth : document.body.clientWidth);
	
	// This prevents the layers from redrawing incorrectly if the window size is less than the layout size
	if (windowWidth < layoutSize+16) {
		if (ns) windowWidth = layoutSize + 16;
		else windowWidth = layoutSize;
	}else{
		if (ns6) windowWidth -= 16;
	}

		var layerObj = (ns? MM_findObj(tipcat) : MM_findObj(tipcat).style);
		if (ns) layerObj.left = (windowWidth/2) - ((tableWidth-offsetWidth)/2) - 8;
		else layerObj.left = (windowWidth/2) - ((tableWidth-offsetWidth)/2);		
		
		MM_showHideLayers(tipcat,'',proc);
}


function POSLayer(layerid){
	
	var windowWidth
	windowWidth = (ns || opera || ns6 ? window.innerWidth : document.body.clientWidth);
	
	// This prevents the layers from redrawing incorrectly if the window size is less than the layout size
	if (windowWidth < layoutSize+16) {
		if (ns) windowWidth = layoutSize + 16;
		else windowWidth = layoutSize;
	}else{
		if (ns6) windowWidth -= 16;
	}

		layerObj = MM_findObj(layerid);
		scrollobj = MM_findObj("module");
		var scrollHeight = (ns ? scrollobj.clip.height : scrollobj.offsetHeight);
		offsetHeight = scrollHeight - 270;

		if (ns) {
			layerObj.left = (windowWidth/2) - ((tableWidth-offsetWidth)/2) - 8;
			scrollObj.top = 0;
		 } else {
			layerObj.style.left = (windowWidth/2) - ((tableWidth-offsetWidth)/2);
			scrollobj.style.top = 0;
		}
		MM_showHideLayers('moduleClipping','','show');
}


	function scroll(num){
		clearTimeout(spdTimer);
		if (!isNaN(num)) moveIt(num);
	}
	
	function scroll(num){
		clearTimeout(spdTimer);
		if (!isNaN(num)) moveIt(num);
	}
	
	function moveIt(speed){
		//	Get the top of the scrollable layer
		if (ns){
			num = scrollobj.top;
		} else {
			var num = parseInt(scrollobj.style.top.substring(0,scrollobj.style.top.indexOf("p")));
		}

		if (!isNaN(speed)){
			//	Enable scrolling if the following two conditional statements are true
			var scroll = (num > -offsetHeight && speed > 0) ? 1 : (num < 0 && speed < 0) ? 1 : 0;
	
			// 	If scrolling is enabled, move the layers top position up or down
			if (scroll){
				if (ns) scrollobj.top = num - speed;
				else scrollobj.style.top = (num - speed) + "px";
				spdTimer = setTimeout("moveIt(" + speed + ")",50);
			}
		}
	}
	
	
	function ShowHidePhase(tipcat,proc){
	
	var windowWidth
	windowWidth = (ns || opera || ns6 ? window.innerWidth : document.body.clientWidth);
	
	// This prevents the layers from redrawing incorrectly if the window size is less than the layout size
	if (windowWidth < layoutSize+16) {
		if (ns) windowWidth = layoutSize + 16;
		else windowWidth = layoutSize;
	}else{
		if (ns6) windowWidth -= 16;
	}

		var layerObj = (ns? MM_findObj(tipcat) : MM_findObj(tipcat).style);
		if (ns) layerObj.left = (windowWidth/2) - ((tableWidth-offsetWidth)/2) - 8;
		else layerObj.left = (windowWidth/2) - ((tableWidth-offsetWidth)/2);		
		
		MM_showHideLayers(tipcat,'',proc);
}
