/**************************************************************************
*** Author: James Byers                                                 ***
*** Modified: 03/29/2007                                                ***
***************************************************************************
*** lid = popLayer ID                                                   ***
*** lw = popLayer Width                                                 ***
*** lh = popLayer Height                                                ***
*** lu = "%","px" ect...                                                ***
*** mo = popMask Opacity                                                ***
*** mbg = popMask Background Color                                      ***
**************************************************************************/
function infoPop(lid,lw,lh,lu,mo,mbg){
	
	var popLayer = document.getElementById(lid);
	var popMask = document.getElementById("popMask");
	var myBody = document.getElementsByTagName("body");
	var popMaskBg = mbg;
	var mo = mo;

	if(popLayer.className=="popLayer inactive"){

	// body styles
		myBody[0].style.marginTop="0";
		myBody[0].style.overflow="hidden";
		myBody[0].style.position="absolute";
		myBody[0].style.width="100%";
		myBody[0].style.height="100%";

	// popMask Properties
		popMask.style.backgroundColor=mbg;
		popMask.style.filter="Alpha(opacity="+mo+")";
		popMask.style.opacity="."+mo;
		popMask.style.MozOpacity="."+mo;
		popMask.className="active";

	// popLayer Properties
		popLayer.className="popLayer active";
		popLayer.style.width=lw+lu;
		popLayer.style.height=lh+lu;
		popLayer.style.marginLeft="-"+lw/2+lu;
		popLayer.style.marginBottom="-"+lh/2+lu;

	// hide form fields
		//hideForm("select");				

	} else {

	// Restore Default Values
		popLayer.className="popLayer inactive";
		popMask.className="inactive" 
		myBody[0].style.marginTop="auto"; 
		myBody[0].style.height="auto";
		myBody[0].style.width="100%";
		myBody[0].style.overflow="auto";

	// show form fields
		//showForm("select");				

	}
}
function hideForm(y)   { 	
	var myFields = document.getElementsByTagName(y);

	for(var i=0; i<myFields.length; i++){
		myFields[i].className="inactive";
	}
}
function showForm(y)   { 	
	var myFields = document.getElementsByTagName(y);

	for(var i=0; i<myFields.length; i++){
		myFields[i].className="active";
	}
}
