function reDo() 
{
	if (innerWidth != origWidth || innerHeight != origHeight)
		location.reload();
}

function init ()
{
	<!--
	// STAY OUT OF FRAMES //
	if (window !=window.top)
	{
		top.location.href = location.href;
	}
	
	// RELOAD CSS ON RESIZE //
	NS4 = document.layers;
	if (NS4) 
	{
		origWidth = innerWidth;
		origHeight = innerHeight;
	}
	if (NS4) onresize = reDo;
}

var newWindow=""
var url=""
var width=""
var height=""
var top=""
var left=""
var scrollbars=""
var resizable=""

//function to handle "valuerewards" popup window
function openWindow(url,width,height,topmargin,leftmargin,scrollbars,resizable) 
{
	
	// check if window already exists
	if (!newWindow || newWindow.closed) 
	{
		// store new window object in global variable
		newWindow = window.open(url,"description", "width=" + width + ",height=" + height + ",scrollbars="+ scrollbars +",toolbar=no,resizable="+ resizable +",directories=no,location=0,top="+ topmargin +",left="+ leftmargin)
		newWindow.focus()
	}
	else 
	{
		// window already exists, close the old one, create a new one, and bring it forward
		newWindow.close();
		newWindow = window.open(url,"description", "width=" + width + ",height=" + height + ",scrollbars="+ scrollbars +",toolbar=no,resizable="+ resizable +",directories=no,location=0,top="+ topmargin +",left="+ leftmargin)
		newWindow.focus()
	}
}
 
function closeWindow() 
{
	if (newWindow && !newWindow.closed) 
	{
		newWindow.close()
	}
}

