var menuTop = 45;
var menuLeft = 400;

var domSID = null;
var oldDomSID = null;
var t = 0;
var lDelay = 3;
var lCount = 0;
var pause = 1000;

function layerPro(layerID){
	if (isDHTML) {
///// Sets the previous layer's visibility to hidden
		t = 0;
		if (oldDomSID) {
			oldDomSID.visibility = 'hidden'; 
			oldDomSID.zIndex = '0'; 
			t = 0; 
			lCount = 0;
		}


//----------------------------------------------------



///// Positions and shows the layer

var idSID = layerID;
var domSID = findDOM(idSID,1);

                       if (oldDomSID != domSID) {	
			domSID.visibility = 'visible';
			domSID.zIndex = '100';
			oldDomSID = domSID;
		}

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

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


//------------------------------------------------------



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

///// Hides the old menu, resets menu conditions, 
///// and stops the function running
        oldDomSID.visibility = 'hidden'; 
        oldDomSID.zIndex = '0';
        oldDomSID = null;
        lCount = 0; 
        return false;
    }

///// Interupts the function if another menu 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 menu will hide when it runs again
    if (t == 1) { 
        lCount = lCount + 1;
        if (lDelay <= lCount) { t = 0; }
        if (lDelay >= lCount) { setTimeout('delayHide(' + t + ')',pause); }
    }
}








