
	var nTop = 100;		//target px for sliding in from top
	var nOWidth = 530;  //overlay box width 
	var nW = -1;		//target px for sliding in from left or right.  <0 will center
	var nDelay = 4;		//delay in seconds before box appears
	var nDay = 8;		//days to wait before displaying again.  -1 will display every time the page is loaded - use for testing only
	var bDimMain = true;	//true grays out the backgound (main page), false does not
	var nDirection = 1;	//1 = slide in from top, 
						//2 = slide in from left, 
						//3 = slide in from right, 
						//4 = slide in from bottom,  
						//5 = just pop in place - centered left & right, uses nTop for vertical position
	
	
	//*************************************************************************
	//*************************************************************************
	function pqSetCookie(name, value, expires, path, domain, secure) {
	  var curCookie = name + "=" + escape(value) +
	      ((expires) ? "; expires=" + expires.toGMTString() : "") +
	      ((path) ? "; path=" + path : "") +
	      ((domain) ? "; domain=" + domain : "") +
	      ((secure) ? "; secure" : "");
	  document.cookie = curCookie;
	}

	function pqGetCookie(name) {
	  var dc = document.cookie;
	  var prefix = name + "=";
	  var begin = dc.indexOf("; " + prefix);
	  if (begin == -1) {
	    begin = dc.indexOf(prefix);
	    if (begin != 0) return null;
	  } else
	    begin += 2;
	  var end = document.cookie.indexOf(";", begin);
	  if (end == -1)
	    end = dc.length;
	  return unescape(dc.substring(begin + prefix.length, end));
	}

	function pqDeleteCookie(name, path, domain) {
	  if (pqGetCookie(name)) {
	    document.cookie = name + "=" + 
	    ((path) ? "; path=" + path : "") +
	    ((domain) ? "; domain=" + domain : "") +
	    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
	  }
	}

	function fixDate(date) {
	  var base = new Date(0);
	  var skew = base.getTime();
	  if (skew > 0)
	    date.setTime(date.getTime() - skew);
	}		  	
	
	function fnSubmitOL(sEntry)
	{
		var oObj;
		var sTemp;
		
	    sE = sEntry;
		if (!fnCheckForValue("fname" + sE, "First Name", "First Name"))
		{
			return(false);
		}
		if (!fnCheckForValue("lname" + sE, "Last Name", "Last Name"))
		{
			return(false);
		}

		if (!fnCheckForBlank("fname" + sE, "First Name"))
		{
			return(false);
		}
		
		if (!fnCheckForBlank("lname" + sE, "Last Name"))
		{
			return(false);
		}	
		
		//
		if (!fnCheckForBlank("email1" + sE, "E-Mail Address"))
		{
			return(false);
		}	
		
		if (!fnCheckForBlank("email2" + sE, "E-Mail Address (2nd field)"))
		{
			return(false);
		}		
		
		if (!fnCheckForEqual("email1" + sE, "email2" + sE, "E-Mail Address Fields"))
		{
			return(false);
		}
		
		//check e-mail address
		if (!echeck("email1" + sE))
		{
			alert("Your E-Mail address does not appear to be a valid E-Mail address.  Please check and correct it.");
			oObj = "";
			return(false);
		}
		
		oObj = "";
		oObj = window.document.getElementById("frmEMail" + sE);
		//oObj.submit();
		oObj = "";
		oObj = window.document.getElementById("B1" + sE);
		oObj.disabled = true;
		oObj = "";
		Signup();
		killOverlay();		
		return(true);
	}	
	function Signup()
	{
		var oDate = new Date;
		oDate.setDate(oDate.getDate() + 730);
		fixDate(oDate);
		pqSetCookie("pq", oDate, oDate, "/");	
	}
	
	function killOverlay()
	{
		var oObj;
		var oObj2;
		var wHeight, wWidth, sHeight, sWidth, bitDepth;
		oObj = window.document.getElementById("pq1");
		oObj.style.height = 0;
		oObj.style.width = 0;
		oObj.style.visibility = "hidden";
		oObj.style.zIndex = -200;
		oObj.style.opacity = 0;
		oObj.style.filter = "alpha(opacity=0)";			
		oObj = "";
		oObj2 = window.document.getElementById("pq2");
		oObj2.style.height = 0;
		oObj2.style.width = 0;
		oObj2.style.visibility = "hidden";
		oObj2.style.zIndex = -200;
		oObj2.style.opacity = 0;		
	}
	function fClientWidth() {
		return f_filterResults (
			window.innerWidth ? window.innerWidth : 0,
			document.documentElement ? document.documentElement.clientWidth : 0,
			document.body ? document.body.clientWidth : 0
		);
	}
	function fClientHeight() {
		return f_filterResults (
			window.innerHeight ? window.innerHeight : 0,
			document.documentElement ? document.documentElement.clientHeight : 0,
			document.body ? document.body.clientHeight : 0
		);
	}
	function fScrollLeft() {
		return f_filterResults (
			window.pageXOffset ? window.pageXOffset : 0,
			document.documentElement ? document.documentElement.scrollLeft : 0,
			document.body ? document.body.scrollLeft : 0
		);
	}	
	function fScrollTop() {
		return f_filterResults (
			window.pageYOffset ? window.pageYOffset : 0,
			document.documentElement ? document.documentElement.scrollTop : 0,
			document.body ? document.body.scrollTop : 0
		);
	}
	function f_filterResults(n_win, n_docel, n_body) {
		var n_result = n_win ? n_win : 0;
		if (n_docel && (!n_result || (n_result > n_docel)))
			n_result = n_docel;
		return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
	}
	
	function sizeOverlay()
	{
		var oObj;
		var oObj2;
		var y;
		var nTemp = 0;
		var oDate = new Date;
		var wHeight, wWidth, sHeight, sWidth, bitDepth, sTop;
		
		oObj = window.document.getElementById("pq1");
		oObj.style.height = document.body.scrollHeight + "px";
		oObj.style.width = "100%";
		if (document.body.scrollWidth < document.documentElement.scrollWidth)
		{
			oObj.style.minWidth = document.documentElement.scrollWidth;
		}
		else
		{
			oObj.style.minWidth = document.body.scrollWidth;
		}
		oObj.style.visibility = "visible";
		oObj.style.zIndex = 200;
		oObj.style.opacity = 0;
		oObj.style.filter = "alpha(opacity=0)";			
		oObj2 = window.document.getElementById("pq2");
		sHeight = screen.height;
		sWidth = screen.width;	
		bitDepth = screen.colorDepth; 		
		if (navigator.appName == "Netscape" )
		{	
			wHeight = window.innerHeight;
			wWidth = window.innerWidth;
		}
		else 
		{	
			wHeight = document.body.clientHeight;
			wWidth = document.body.clientWidth;
		}	
		sTop = fScrollTop();
		switch(nDirection)
		{
			case 1:
				//move in from top
				oObj2.style.top = sTop - (oObj2.offsetHeight) + "px";
				oObj2.style.left = "50%";
				oObj2.style.width = nOWidth + "px";
				oObj2.style.marginLeft = -(nOWidth/2) + "px";
				oObj2.style.visibility = "visible";
				oObj2.style.zIndex = 201;	
				oObj2 = "";			
				window.setTimeout('window.pqSliderTop('+nTop+',0);',100,'JavaScript');
				window.setTimeout('window.pqDimer(0);',5,'JavaScript');
				break;
			
			case 2:
				//move in from left			
				oObj2.style.top = (sTop + nTop) + "px";		
				oObj2.style.left = ((0 - nOWidth)) + "px";
				oObj2.style.visibility = "visible";
				oObj2.style.zIndex = 201;	
				if (nW < 0) 
				{
					nTemp = ((wWidth - nOWidth)/2);
				}
				else
				{
					nTemp = nW;
				}
				oObj2 = "";	
				window.setTimeout('window.pqSliderLeft('+nTemp+',0);',100,'JavaScript');		
				window.setTimeout('window.pqDimer(0);',5,'JavaScript');
				break;
				
			case 3:
				//move in from right
				oObj2.style.top = (sTop + nTop) + "px";	
				oObj2.style.left = ((wWidth)) + "px";
				oObj2.style.visibility = "visible";
				oObj2.style.zIndex = 201;	
				if (nW < 0) 
				{
					nTemp = ((wWidth - nOWidth)/2);
					
				}
				else
				{
					nTemp = nW;
				}
				oObj2 = "";	
				window.setTimeout('window.pqSliderRight('+nTemp+',0);',100,'JavaScript');	
				window.setTimeout('window.pqDimer(0);',5,'JavaScript');				
				break;

			case 4:
				//move up from Bottom
				oObj2.style.top = (fClientHeight() + sTop) + "px";
				oObj2.style.left = "50%";
				oObj2.style.width = nOWidth + "px";
				oObj2.style.marginLeft = -(nOWidth/2) + "px";
				oObj2.style.visibility = "visible";
				oObj2.style.zIndex = 201;	
				oObj2 = "";			
				window.setTimeout('window.pqSliderBottom('+nTop+',0);',100,'JavaScript');
				window.setTimeout('window.pqDimer(0);',5,'JavaScript');
				break;				
				
			case 5:
				//just pop in place
				pqDimer(0);
				oObj2.style.top = (fClientHeight() + sTop) + "px";
				oObj2.style.left = "50%";
				oObj2.style.width = nOWidth + "px";
				oObj2.style.marginLeft = -(nOWidth/2) + "px";
				var nVer = msieVersion();
				if ((nVer == 0) || (nVer > 6))
				{
					oObj2.style.position = "fixed";
				}		
				else
				{
					document.documentElement.scrollTop = 0;
				}
				oObj2.style.top = "0%";
				oObj2.style.marginTop = nTop + "px";					
				oObj2.style.visibility = "visible";
				oObj2.style.zIndex = 201;	
				oObj2 = "";		
				break;					
		}
		oObj = "";
		oDate.setDate(oDate.getDate() + nDay);
		fixDate(oDate);
		pqSetCookie("pq", oDate, oDate, "/");
	}
	
	function pqDimer(nOp)
	{
		var y;
		var oObj;
		
		oObj = window.document.getElementById("pq1");
		if ((nOp < 0.7) && bDimMain)
		{
			nOp = nOp + 0.7;
			oObj.style.opacity = nOp;
			y = (nOp)*100;
			oObj.style.filter = "alpha(opacity=" + y + ")";
			window.setTimeout('window.pqDimer('+nOp+');',5,'JavaScript');
		}
	}
	function pqSliderTop(nTargetFloaterTop,nOp)
	{
		var oObj2;
		var y;
		oObj2 = window.document.getElementById("pq2");
		y = parseInt(oObj2.style.top);
		if (y <= (nTargetFloaterTop + fScrollTop()))
		{
			oObj2.style.top = (y + 3) + "px";
			window.setTimeout('window.pqSliderTop('+nTargetFloaterTop+','+nOp+');',10,'JavaScript');
		}
		else
		{
			var nVer = msieVersion();
			if ((nVer == 0) || (nVer > 6))
			{
				oObj2.style.position = "fixed";
			}		
			else
			{
				document.documentElement.scrollTop = 0;
			}
			oObj2.style.top = "0%";
			oObj2.style.marginTop = nTop + "px";		
		}		
	}

	function pqSliderBottom(nTargetFloaterBottom,nOp)
	{
		var oObj2;
		var y;
		oObj2 = window.document.getElementById("pq2");
		y = parseInt(oObj2.style.top);
		if (y >= (nTargetFloaterBottom + fScrollTop()))
		{
			oObj2.style.top = (y - 5) + "px";
			window.setTimeout('window.pqSliderBottom('+nTargetFloaterBottom+','+nOp+');',10,'JavaScript');
		}
		else
		{
			var nVer = msieVersion();
			if ((nVer == 0) || (nVer > 6))
			{
				oObj2.style.position = "fixed";
			}		
			else
			{
				document.documentElement.scrollTop = 0;
			}
			oObj2.style.top = "0%";
			oObj2.style.marginTop = nTop + "px";		
		}			
	}	
	
	function pqSliderLeft(nTargetFloaterLeft,nOp)
	{
		var oObj2;
		var y;
		oObj2 = window.document.getElementById("pq2");
		y = parseInt(oObj2.style.left);
		if (y <= nTargetFloaterLeft)
		{
			oObj2.style.left = (y + 5) + "px";
			window.setTimeout('window.pqSliderLeft('+nTargetFloaterLeft+','+nOp+');',10,'JavaScript');
		}
		else
		{
			if (nW < 0) 
			{
				oObj2.style.left = "50%";
				oObj2.style.width = nOWidth + "px";
				oObj2.style.marginLeft = -(nOWidth/2) + "px";
			}	
			var nVer = msieVersion();
			if ((nVer == 0) || (nVer > 6))
			{
				oObj2.style.position = "fixed";
			}		
			else
			{
				document.documentElement.scrollTop = 0;
			}
			oObj2.style.top = "0%";
			oObj2.style.marginTop = nTop + "px";				
		}
	}
	
	function pqSliderRight(nTargetFloaterRight,nOp)
	{
		var oObj2;
		var y;
		oObj2 = window.document.getElementById("pq2");
		y = parseInt(oObj2.style.left);
		if (y >= nTargetFloaterRight)
		{
			oObj2.style.left = (y - 5) + "px";
			window.setTimeout('window.pqSliderRight('+nTargetFloaterRight+','+nOp+');',10,'JavaScript');
		}
		else
		{
			if (nW < 0) 
			{
				oObj2.style.left = "50%";
				oObj2.style.width = nOWidth + "px";
				oObj2.style.marginLeft = -(nOWidth/2) + "px";
			}	
			var nVer = msieVersion();
			if ((nVer == 0) || (nVer > 6))
			{
				oObj2.style.position = "fixed";
			}		
			else
			{
				document.documentElement.scrollTop = 0;
			}
			oObj2.style.top = "0%";
			oObj2.style.marginTop = nTop + "px";				
		}		
	}	
	
	function msieVersion()
	{
		var ua = window.navigator.userAgent
		var msie = ua.indexOf("MSIE ")
		if (msie > 0)
		{
			return parseInt(ua.substring(msie + 5, ua.indexOf(".", msie)));
		}
		else
		{
			return 0;
		}
	}
	
	function pq()
	{
		var oDate = new Date;
		//check cookie
		if (nDay >= 0)
		{
			if (pqGetCookie("pq") == null) 
			{
				window.setTimeout('window.sizeOverlay();',(nDelay - 1) * 1000,'JavaScript');
			}
		}
		else
		{
			window.setTimeout('window.sizeOverlay();',(nDelay - 1) * 1000,'JavaScript');
		}
		
	}