function ShowWarning() {
	var c = document.cookie;
	if (c.indexOf("upgradenotice") < 0) {
		document.cookie="upgradenotice=true";
		if ((agt.indexOf("mac")!=-1) && is_ie5up) {
			// fire off macIE warning page
			url = window.location.toString();
			url = url.substring(0, url.lastIndexOf('/')+1);
			url = url + "MacIE5Warning.jsp";
			window.location=url;
		} else
			PUWStart();

		return false;
	}
}


function PUW_Init()
{
    setTimeout("gPopupWindow.Show()",gPopupWindow.showDelay);
}

function PUW_Show()
{
	var settings = "width="+this.width+",height="+this.height+",top="+this.top+",left="+this.left+",";
	settings += "scrollbars=" + ((this.scrollbars) ? "yes," : "no,");
	settings += "toolbar=" + ((this.toolbar) ? "yes," : "no,");
	settings += "location=" + ((this.locationbar) ? "yes," : "no,");
	settings += "menubar=" + ((this.menubar) ? "yes," : "no,");
	settings += "status=" + ((this.statusbar) ? "yes," : "no,");
	settings += "resizable=" + ((this.resizable) ? "yes" : "no");
	
	var newWin = window.open(this.url,this.name,settings);
	
	if (! this.ontop)
		window.focus();
}



function PopupWindow(url,width,height)
{
	this.width = width;
	this.height = height;
	this.top = screen.availHeight/2 - height/2; // center
	this.left = screen.availWidth/2 - width/2; // center
	this.name = "mypopupwin";
	this.url = url;
	this.showDelay = 2000;
	this.resizable = true;
	this.ontop = true;
	this.scrollbars = false;
	this.toolbar= false;
	this.locationbar = false;
	this.menubar = false;
	this.statusbar = false;

	this.Init = PUW_Init;
	this.Show = PUW_Show;
}

function PUWStart()
{
	gPopupWindow.Init();
}

gPopupWindow = new PopupWindow(browserWarningPage + "?" + gToken, 690, 567);
gPopupWindow.toolbar = true;
gPopupWindow.statusbar = true;
gPopupWindow.resizable = true;
gPopupWindow.ontop = true;
gPopupWindow.frequency = 2;
gPopupWindow.renew = 1;
gPopupWindow.showDelay = 2000;

var isSupported = false;
if (is_opera5 || is_opera6 || is_opera7 || is_nav6 || (is_moz_ver < 1.7) || is_ie5) {
	isSupported=false;
} else {
	isSupported = is_getElementById;
}

if (!isSupported || isSupported=="false") {    
    ShowWarning();
}


