
var x, y, xnew, xtemp, ynew, ytemp, xwanted, ywanted;

if (document.all) {

	xwanted=1220;
	ywanted=950;

	if(screen.availWidth > xwanted) 
	{ x = xwanted; }
	else
	{ x = screen.availWidth; }

	if(screen.availHeight > ywanted) 
	{ y = ywanted; }
	else
	{ y = screen.availHeight; }
	
	top.window.resizeTo(x,y);

	if(y < screen.availHeight)
	{ ynew = (screen.availHeight - y) >> 1; }
	else
	{ ynew = 0; }

	if(x < screen.availWidth)
	{ xnew = (screen.availWidth - x) >> 1; }
	else
	{xnew = 0; }

}
else if (document.layers||document.getElementById) {

	xwanted=1200;
	ywanted=900;

	xtemp= xwanted - top.window.innerWidth;
	if(xtemp > 0)
	{
		if((screen.availWidth - top.window.outerWidth) > xtemp)
		{ xnew = xwanted + top.window.outerWidth - top.window.innerWidth; }
		else
		{ xnew = screen.availWidth; }
	}
	else { xnew = top.window.outerWidth; }

	ytemp= ywanted - top.window.innerHeight;
	if(ytemp > 0)
	{
		if((screen.availHeight - top.window.outerHeight) > ytemp)
		{ ynew = ywanted + top.window.outerHeight - top.window.innerHeight; }
		else
		{ ynew = screen.availHeight; }
	}
	else { ynew = top.window.outerHeight; }


	if (top.window.outerHeight<ynew||top.window.outerWidth<xnew){
	top.window.outerHeight = ynew;
	top.window.outerWidth = xnew;
	}
	if(top.window.outerHeight < screen.availHeight)
	{ ynew = (screen.availHeight - top.window.outerHeight) >> 1; }

	if(top.window.outerWidth < screen.availWidth)
	{ xnew = (screen.availWidth - top.window.outerWidth) >> 1; }
}

top.window.moveTo(xnew,ynew);

