var infoTop = 45; // 
var infoRight = 400; //400


var domSInfo = null;
var oldDomSInfo = null;
var t = 0;
var lDelay = 10; //was 3 seconds
var lCount = 0;
var pause = 100;

function popInfo(infoNum){
	if (isDHTML) {
///// Sets the previous info's visibility to hidden
		t = 2;
		if (oldDomSInfo) {
			oldDomSInfo.visibility = 'hidden'; 
			oldDomSInfo.zIndex = '0'; 
			t = 2; 
			lCount = 0;
		}

///// Defines the DOMs	of the info objects
		var idInfo = 'infoHead';  //infoHead
		var domInfo = findDOM(idInfo,0);

		var idInfoOpt = 'infoHead' + infoNum;  //infoHead
		var domInfoOpt = findDOM(idInfoOpt,0);				

		var idSInfo = 'info' + infoNum;  //info
		var domSInfo = findDOM(idSInfo,1);

///// Defines the positions of the sub-infos
	if (isID || isAll) { 	
				var infoRight = (domInfo.offsetRight) + (domInfoOpt.offsetRight) + 5;
				var infoTop = (domInfo.offsetTop) + (domInfo.offsetHeight) + 5;
			}
		if (isLayers) {
				var infoRight = document.layers[idInfo].layers[idInfoOpt].pageX - 5;
				var infoTop = domInfo.pageY + domInfo.clip.height - 5;
		}

///// Positions and shows the info
		if (oldDomSInfo != domSInfo) {	
			domSInfo.Right = infoRight; 
			domSInfo.Top = infoTop;
			domSInfo.visibility = 'visible';
			domSInfo.zIndex = '100';
			oldDomSInfo = domSInfo;
		}

///// Resets oldDom if it is the same as the current DOM
		else { oldDomSInfo = null; }
	}

////// Returns a 'null' value for non-DHTML Browsers 
	else { return null; }
}

function delayHide() {
///// Checks to see if there is a info showing and whether 
///// the global variable 't' has been set to 0
    if ((oldDomSInfo) && (t == 0)) {

///// Hides the old info, resets info conditions, 
///// and sTops the function running
        oldDomSInfo.visibility = 'hidden'; 
        oldDomSInfo.zIndex = '0';
        oldDomSInfo = null;
        lCount = 0; 
        return false;
    }

///// Interupts the function if another info is opened
    if (t == 2) { lCount = 0; return false; }

///// Repeats the function adding 1 to lCount each time until 
///// lCount is equal to lDelay and then sets 't' to 0 so that 
///// the info will hide when it runs again
    if (t == 1) { 
        lCount = lCount + 1;
        if (lDelay <= lCount) { t = 0; }
        if (lDelay >= lCount) { setTimeout('delayHide(' + t + ')',pause); }
    }
}
