if (top.frames.length != 0) top.location=self.location; 

function getWindowWidth()
{	if (window.innerWidth)
	{ return window.innerWidth;
	}
	else
	{	if (document.documentElement && document.documentElement.clientWidth) 
		{	return document.documentElement.clientWidth;
		}
		return document.body.offsetWidth;
	}
}

function getWindowHeight()
{	if (window.innerHeight)
	{	return window.innerHeight;
	}
	else
	{	if (document.documentElement && document.documentElement.clientHeight) 
		{	return document.documentElement.clientHeight;
		}
		return document.body.offsetHeight;
	}
}



function setSize()
{
	wx=getWindowWidth();
	wy=getWindowHeight();
	sx=screen.availWidth;
	sy=screen.availHeight;
	
	//if the window is big enought, do nothing and exit
	if(sx<=1024 || sy<=768) return;
	if(wx>=975 && wy>=580) return;
	/*
	if (!wx || wx==0 || wx=="") { wx=1024; }
	if (!wy || wy==0 || wy=="") { wy=1024; }
	*/
	
	setx=0;
	if (wx<975){
		setx=975-wx;
	}
	
	sety=0;
	if (wy<580) {
		sety=580-wy;
	}
	
	top.resizeBy(setx,sety);

}
