<!--
dom = (document.getElementById) ? true : false;
ns5 = ((navigator.userAgent.indexOf("Gecko")>-1) && dom) ? true: false;
ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
ns4 = (document.layers && !dom) ? true : false;
ie4 = (document.all && !dom) ? true : false;
nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;

// resize fix for ns4
var origWidth, origHeight;
if (ns4) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

window.onload=initInfoLyr;
//  IMPORTANT NOTE: Put the width and height of your infoDiv
//	below (in infoWd and infoHt) as well as in the style 
//	specifications for the div itself (for ns4 layer sizing). 
var infoLyr, infoWd = 321, infoHt = 101;
function initInfoLyr() {
	if (ns4) {
		infoLyr = new Layer(infoWd,document.infoDiv);
		document.infoDiv.resizeTo(infoWd,infoHt);
		infoLyr.visibility = "show";
  } else if (ie4) infoLyr = document.all.infoDiv;
	else if (ie5 || ns5) infoLyr = document.getElementById('infoDiv');
	showInfo(dfltMsg);	// show message
}

function showInfo(msg) {
	if (!infoLyr) return; 
	if (msg == '') startTimer();
	else if (timerId) clearTimeout(timerId);
	var cntnt = '<div class="info">' + msg + '</div>';
	if (ns4) { 
		infoLyr.document.write(cntnt);
		infoLyr.document.close();
	} else if (ie4 || ie5 || ns5) { 
		infoLyr.innerHTML = cntnt;
	}
}

// called from showInfo when mouseouts write empty string
var startTime, timerId;
function startTimer() {
	var now = new Date();
	startTime = now.getTime();
	timerId = setTimeout("checkElapsed()",0);
}

function checkElapsed() {
	var now = new Date();
	var elapsed = now.getTime();
	if (elapsed-startTime>0) {
		showInfo(dfltMsg);
		clearTimeout(timerId);
	} else timerId = setTimeout("checkElapsed()",0);
}


// for centering sub-window on screen
var screenWidth = screen.availWidth;
var screenHeight = screen.availHeight;
var subWinWd = 620;	// width of sub-window
var subWinHt = 400;	// height of sub-window
var subWinTop = Math.round((screenHeight-subWinHt)/2)-40;
var subWinLeft = Math.round((screenWidth-subWinWd)/2);

// opens sub-window 
var newWin = null;
function getSubWin(url) {
 	if (newWin && !newWin.closed) newWin.focus();
	newWin = window.open(url, "subwin", "menubar,resizable,scrollbars,height="+subWinHt+",width="+subWinWd+",top="+subWinTop+",left="+subWinLeft);
}

function OpenNewWin(url,xSize,ySize) {
 	window.open(url, "_blank", "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,height="+ySize+",width="+xSize+",top="+(Math.round((screenHeight-ySize)/2)-40)+",left="+(Math.round((screenWidth-xSize)/2)));
}

// close window when this page unloads 
function closeWin() {
	if (newWin && !newWin.closed) newWin.close();
}

window.onunload=closeWin;

//-->
