function PopUp()
{	
	document.onmousemove = mouseMove; 
	document.onmouseup = mouseUp;   
 	var dragObject     = null;   
   	var dropTargets = [];
	var intAddWidth = 0;
	var intAddHeight = 0;
	var initShow = false;
	objCloseButton = new Image();
	objCloseButtonRO = new Image();
	// -- rollover images added. GV 9/2/09
	objCloseButton.src = "/PopUp/CloseButton.gif";
	objCloseButtonRO.src = "/PopUp/CloseButton_RO.gif";		
	
	if ((browser.isIE55 || browser.isIE6x) && browser.isWin32)
	{
		var strBackground = "PopUpBG_Clear.gif";
	}
	else if ((browser.isGecko) | (browser.isIE5up && browser.isMac) | (browser.isIE6up && browser.isWin) | (browser.isOpera && browser.isWin  && browser.versionMajor >= 6) | (browser.isOpera && browser.isUnix && browser.versionMajor >= 6) | (browser.isOpera && browser.isMac && browser.versionMajor >= 5) | (browser.isOmniweb && browser.versionMinor >= 3.1) | (browser.isIcab && browser.versionMinor >= 1.9) | (browser.isWebtv) | (browser.isDreamcast))
	{  	
		var strBackground = "PopUpBG_Black.png"; 
	}
	else
	{
		var strBackground = "PopUpBG_Clear.gif";
	}
	var strCloseButton = "<img style=\"position:absolute; right:8px; top:9px; z-index:3;\" onClick=\"CLOSESCRIPTobjContainerRef.style.display = 'none';\" src=\"/PopUp/CloseButton.gif\" title=\"Click here to close\" onmouseover=\"this.src = objCloseButtonRO.src;\" onmouseout=\"this.src = objCloseButton.src;\"></img>";
	var strResponseText = "";
	var strTableHeader = "<table width=\"100%\" cellpadding=\"7\" cellspacing=\"0\" style=\"STYLEPC\" border=\"6\"><tr><td>";	
	var objContentBox = document.createElement("span");
	objContentBox.id = "Content";
	this.style = "background-color:#FFFFFF;left:100px;top:200px;width:800px;"	
	this.url = "";
	this.content = "";
	this.closeScript = "";
	this.loadtext = "Loading Content";
	this.closeButton = true;
	var intPause = 0;
	this.show = function() 
	{	
		//this.style = "background-color:#FFFFFF;border:;"
		//---- match the background image file width & height to the width & height of the containing page. 
		if( window.innerHeight && window.scrollMaxY )  
		{
			intPageWidth = window.innerWidth + window.scrollMaxX + intAddWidth;
			intPageHeight = window.innerHeight + window.scrollMaxY + intAddHeight;
		}
		// works in all but Explorer Mac
		else if( document.body.scrollHeight > document.body.offsetHeight ) 
		{
			intPageWidth = document.body.scrollWidth + intAddWidth;
			intPageHeight = document.body.scrollHeight + intAddHeight;
		}
		// works in Explorer 6 Strict, Mozilla (not FF) and Safari
		else 
		{ 
			intPageWidth = document.body.offsetWidth + document.body.offsetLeft + intAddWidth; 
			intPageHeight = document.body.offsetHeight + document.body.offsetTop + intAddHeight; 
		}
		// ---- set default properties
		objContainerRef = document.createElement("div");
		document.body.appendChild(objContainerRef);
		objContainerRef.style.display = "none";
		objContainerRef.style.width = intPageWidth.toString() + "px";
		objContainerRef.style.height = intPageHeight.toString() + "px";	
		objContainerRef.style.background = "url('/PopUp/" + strBackground + "')";
		objContainerRef.style.position = "absolute";	
		objContainerRef.style.top = 0;	
		objContainerRef.style.left = 0;	
		
		//-- insert custom style

		if (this.closeButton == true)
		{
			strTableHeader = strTableHeader.replace(/STYLEPC/, this.style);
			strCloseButton = strCloseButton.replace(/CLOSESCRIPT/, this.closeScript);			
			strContainer = strTableHeader + strCloseButton;
		}
		else
		{
				strContainer = strTableHeader;
		}
		objContentBox.style.position = "absolute";
		objContentBox.style.cssText = "position:absolute;padding:0px 0 0px 0px;" + this.style;
		objContainerRef.appendChild(objContentBox);	
		makeDraggable(objContentBox);
		//objContentBox.style.top = 200;
		//objContentBox.style.left = 100;
		//objContentBox.style.width = "800px";
		//-- insert custom script to fire when popup is closed
		if (initShow == false){
			//-- code to retreive content from an external file.
			if (this.url != "")
			{
				var objHttp = CreateHttp();
				objHttp.open("GET", this.url,  true)
				objHttp.onreadystatechange = function()	
				{	
					if (objHttp.readyState == 4)
		    		{				
						strResponseText = objHttp.responseText.toString();
						objContentBox.innerHTML =  strContainer + strResponseText  + "</td></tr></table>";										
					}
				}
				objHttp.send(null);
			}
			else
			{
				//-- code to insert content directly into the popup
				if (this.content == "")
				{
					alert("POPUP OBJECT ERROR\n\nyou must provide a value for either the \"url\" property or the \"content\" property.");
					return false;
				}
				else
				{
					objContentBox.innerHTML =  strContainer + this.content  + "</span>";											
				}
			}
			initShow = true;
		}
		//alert(this.content);
		setTimeout("objContainerRef.style.display = \"block\"",300);	
	}
	this.hide = function() {
		objContainerRef.style.display = "none";
	}
	this.hideCloseButton = function() {
		strContainer = strTableHeader;
	}	
}


function PopUpNEW (DivName,iMaxTop)
{	
	document.onmousemove = mouseMove; 
	document.onmouseup = mouseUp;   
 	var dragObject     = null;   
   	var dropTargets = [];
	var intAddWidth = 0;
	var intAddHeight = 0;
	//var objCloseButton = new Image();
	if ((browser.isGecko) | (browser.isIE5up && browser.isMac) | (browser.isIE6up && browser.isWin) | (browser.isOpera && browser.isWin  && browser.versionMajor >= 6) | (browser.isOpera && browser.isUnix && browser.versionMajor >= 6) | (browser.isOpera && browser.isMac && browser.versionMajor >= 5) | (browser.isOmniweb && browser.versionMinor >= 3.1) | (browser.isIcab && browser.versionMinor >= 1.9) | (browser.isWebtv) | (browser.isDreamcast) | ((browser.isIE55 || browser.isIE6x) && browser.isWin32)) 
	{  	

		var strBackground = "BulletinBG_Black.png"; 
	}
	else
	{
		var strBackground = "BulletinBG.gif";
	}	
	var objHttp = CreateHttp();
	var strResponseText = "";
	var strContainer = "<table width=\"100%\" cellpadding=\"7\" cellspacing=\"0\" style=\"STYLEPC\" border=\"6\"><tr><td><img style=\"position:absolute; right: 13; top:12; z-index:3;\" onClick=\"CLOSESCRIPTCBDiv('" + DivName + "').style.display = 'none';\" src=\"/Bulletin/images/CloseButton.gif\" title=\"Click here to close\"></img>";	
	var objContentBox = document.createElement("span");
	objContentBox.id = "Content";
	this.style = "background-color:#FFFFFF;left:100px;top:200px;width:800px;"	
	this.url = "";
	this.content = "";
	this.closeScript = "";
	this.loadtext = "Loading Content";
	//this.style = "background-color:#FFFFFF;border:;"
	//---- match the background image file width & height to the width & height of the containing page. 
	if( window.innerHeight && window.scrollMaxY )  
	{
		intPageWidth = window.innerWidth + window.scrollMaxX + intAddWidth;
		intPageHeight = window.innerHeight + window.scrollMaxY + intAddHeight;
	}
	// works in all but Explorer Mac
	else if( document.body.scrollHeight > document.body.offsetHeight ) 
	{
		intPageWidth = document.body.scrollWidth + intAddWidth;
		intPageHeight = document.body.scrollHeight + intAddHeight;
	}
	// works in Explorer 6 Strict, Mozilla (not FF) and Safari
	else 
	{ 
		intPageWidth = document.body.offsetWidth + document.body.offsetLeft + intAddWidth; 
		intPageHeight = document.body.offsetHeight + document.body.offsetTop + intAddHeight; 
	}
	// ---- set default properties
	objContainerRef = CBDiv(DivName);
	objContainerRef.style.display = "none";
	objContainerRef.style.width = intPageWidth.toString() + "px";
	objContainerRef.style.height = intPageHeight.toString() + "px";		
	objContainerRef.style.position = "absolute";
	objContainerRef.style.zIndex = 2;
	/*if ((browser.isIE55 || browser.isIE6x) && browser.isWin32) 
	{
		var objAlphaBox = document.createElement("span");
		objAlphaBox.id = "Alpha";
		objAlphaBox.style.position = "absolute";
		objAlphaBox.style.width = intPageWidth.toString() + "px";
		objAlphaBox.style.height = intPageHeight.toString() + "px";
		objAlphaBox.style.zIndex = 1;
		objAlphaBox.style.display = "block";
		objAlphaBox.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/Bulletin/images/" + strBackground + "',sizingMethod='crop')";
		document.body.appendChild(objAlphaBox);
	}
	else
	{*/
		objContainerRef.style.background = "url('/Bulletin/images/" + strBackground + "')";
	//}
	this.show = function() 
	{		
		//-- insert custom style
		strContainer = strContainer.replace(/STYLEPC/, this.style);
		strContainer = strContainer.replace(/CLOSESCRIPT/, this.closeScript);
		objContentBox.style.position = "absolute";
		objContentBox.style.cssText = "position:absolute;" + this.style;		
		//objContentBox.style.top = 200;
		//objContentBox.style.left = 100;
		//objContentBox.style.width = "800px";
		//-- insert custom script to fire when popup is closed
		//-- code to retreive content from an external file.
		if (this.url != "")
		{
			objHttp.open("GET", this.url,  true)
			objHttp.onreadystatechange = function()	
			{	
				if (objHttp.readyState == 4)
		    	{				
					strResponseText = objHttp.responseText.toString();
					objContentBox.innerHTML =  strContainer + strResponseText  + "</td></tr></table>";
					objContainerRef.appendChild(objContentBox);	
					setTimeout("objContainerRef.style.display = \"block\"",300);
					makeDraggable(objContentBox);
				}
			}
			objHttp.send(null);
		}
		else
		{
			//-- code to insert content directly into the popup
			if (this.content == "")
			{
				alert("you must provide either the URL where a file containing content resides or the content itself.");
			}
			else
			{
				objContentBox.innerHTML =  strContainer + this.content  + "</span>";
				objContainerRef.appendChild(objContentBox);
				setTimeout("objContainerRef.style.display = \"block\"",300);
				makeDraggable(objContentBox);
			}
		}		
	}
	this.hide = function() {
		objContainerRef.style.display = "none";
	}
}

function PopUpNoButton()
{
	objContainerRef = document.createElement("div");
	document.body.appendChild(objContainerRef);
	objContainerRef.style.display = "none";
	objContainerRef.style.width = "300px";
	objContainerRef.style.height = "100px";	
	objContainerRef.style.background = "#A0A0A4";
	objContainerRef.style.position = "absolute";	
	objContainerRef.style.top = "300px";
	objContainerRef.style.left = "500px";	
	objContainerRef.innerHTML = "<table width=\"100%\" height=\"100%\" cellpadding=\"7\" cellspacing=\"0\" style=\"background:#A0A0A4;border-color:#A0A0A4\" border=\"6\"><tr><td><img src=\"/protectionplus/images/hourglass.gif\"/><tr><td>Loading Text</td></tr></table>";
	this.hide = function() {
		objContainerRef.style.display = "none";
	}
	this.show = function() {
		objContainerRef.style.display = "block";
	}			
}