function IsPopupBlocker(url) 
{
	var i = Math.round(100*Math.random());

	var oWin = window.open(url,"newWin_"+i);//,"width=100,height=50,top=5000,left=5000");
	if (oWin==null || typeof(oWin)=="undefined")
	{
		doPassVar("_root.Portal._puBlocker", 1);
	}
	else
	{
		//oWin.close();
		doPassVar("_root.Portal._puBlocker", 0);
	}
}

function setHeight(h)
{
	document.getElementById("siteholder").style.height = h+"px";
	window.scroll(0,0); 
	setHtmlVars();
}

function setHtmlVars()
{
	var ScrollTop = document.body.scrollTop;
	if (ScrollTop == 0)			
	{
		if (window.pageYOffset)
	
			ScrollTop = window.pageYOffset;
		else
			ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
	}
		
	doPassVar("_root.htmlScrollPos", ScrollTop);
	//doPassVar('_root.Portal._center', 'true');

	var availHeight;
	var availWidth;
	Browser = (navigator.appName.substring(0,9)== "Microsoft")? 'MSIE':navigator.appName;

	if (Browser != 'MSIE')
	{
		doPassVar("_root.htmlInnerHeight", innerHeight);
		availHeight = Number(innerHeight);
		availWidth = Number(innerWidth);
	}
	else
	{
		doPassVar("_root.htmlInnerHeight", document.body.clientHeight);
		availHeight = Number(document.body.clientHeight);
		availWidth = Number(document.body.clientWidth);
	}

	if((availHeight <= 540)&&(availWidth <= 940))
	{
		document.getElementById("siteholder").style.height ="540px";
		document.getElementById("siteholder").style.width = "940px";
		document.body.style.overflow = "auto";
	}
	else if ((availHeight <= 540)&&(availWidth > 940))
	{
		document.getElementById("siteholder").style.height = "540px";
		document.getElementById("siteholder").style.width = (availWidth)+"px";
		document.body.style.overflow = "auto";
	}
	else if ((availHeight > 540)&&(availWidth <= 940))
	{
		document.getElementById("siteholder").style.height = (availHeight-1)+"px";
		document.getElementById("siteholder").style.width = "940px";
		document.body.style.overflow = "auto";
	}
	else
	{
		document.getElementById("siteholder").style.height = (availHeight)+"px";
		document.getElementById("siteholder").style.width = (availWidth)+"px";
		document.body.style.overflow = "hidden";	
	}
}

function doPassVar(name, args)
{		
	window.document.website.SetVariable(name, args);
}

function refresh()
{
		window.location = window.location;
		
		return null;
}

function refocus()
{
	window.focus();
	//return null;		
}

