function showlayer(n){
	var chgStr;
	if (document.getElementById) {  						// DOM3 = IE5, NS6 
			document.getElementById(n).style.visibility='visible'; 	
	}//if
	else{
		if (navigator.appName=='Netscape'&&document.layers != null) {
	 		chgStr = "document." + n + ".visibility=\'visible\'";
	 		eval(chgStr);
		}//inner if
		else if (document.all != null) { //IE	
	 		chgStr = "document.all." + n + ".style.visibility=\'visible\'";
	 		eval(chgStr);
		}//inner else
	}//else
}//showlayer

function hidelayer(n){
	var chgStr;
	if (document.getElementById) {  						// DOM3 = IE5, NS6 
		document.getElementById(n).style.visibility='hidden'; 	
	}//if
	else{	
		if (navigator.appName=='Netscape'&&document.layers != null) {
	 		chgStr = "document." + n + ".visibility=\'hidden\'";
	 		eval(chgStr);
		}//inner if
		else if (document.all != null) { //IE
	 		chgStr = "document.all." + n + ".style.visibility=\'hidden\'";
	 		eval(chgStr);
		}//inner else
	}//else
}//hidelayer

// This function will change the visibility of a group of div tags with the same begining string name to 'show'
// input: the string portion of a numbered layer  (layer1,layer2... enter 'layer') and the last number to be shown

function showAllThese(these,lastOne){  
    for (i=1;i<=lastOne;i++){
        showThis = these +  i;
        showlayer(showThis);   
    }//for           
}//showAllThese

// This function will change the visibility of a group of div tags with the same begining string name to 'hidden'
//input: the string portion of a numbered layer  (layer1,layer2... enter 'layer') and the last number to be hidden
function hideAllThese(these,lastOne){  
    for (i=1;i<=lastOne;i++){
        hideThis = these +  i;
        hidelayer(hideThis);       
    }//for           
}//hideAllThese
    
// This function move layer n x pixel up or down depending if x is -/+ and minX and maxX sets the max and min value
// that the layer can be moved to    
function movelayer(n,x,minX,maxX){
	var chgStr;    
    var theTop;   
    var newTop;
    
	if (document.all != null) { //IE        
        theTop = eval("document.all." + n + ".style.top");
        newTop = parseInt(theTop.substring(0,theTop.indexOf("p"))) + x;
        if (newTop > minX ){
            newTop = minX;
        }//if
        if (newTop < maxX ){
            newTop = maxX;
        }//if
        //alert(newTop);
 		chgStr = "document.all." + n + ".style.top = newTop ";
 		eval(chgStr);
	}//if
	if (navigator.appName=='Netscape'&&document.layers != null) {    
        theTopstr = "document." + n + ".top";
        theTop = eval(theTopstr);
        newTop = theTop + x;
        if (newTop > minX ){
            newTop = minX;
        }//if
        if (newTop < maxX ){
            newTop = maxX;
        }//if     
 		chgStr = "document." + n + ".top = newTop";
 		eval(chgStr);
	}//if
}// movelayer

//this function moves the layer to a top postion of x
function movelayerToX(n,x){
	var chgStr;    
    var theTop;   
    var newTop;
    
	if (document.all != null) { //IE        
        //theTop = eval("document.all." + n + ".style.top");
       // newTop = parseInt(theTop.substring(0,theTop.indexOf("p"))) + x;
        //alert(newTop);
 		chgStr = "document.all." + n + ".style.top = x ";
 		eval(chgStr);
	}//if
	if (navigator.appName=='Netscape'&&document.layers != null) {    
        //theTopstr = "document." + n + ".top";
        //theTop = eval(theTopstr);
       // newTop = theTop + x;
 		chgStr = "document." + n + ".top = x";
 		eval(chgStr);
	}//if

}// movelayerToX