//--------------------------------------------------------------------------------------------------------------
//  Public JS Document |  Maximize Window  |  Edit by Maxphinx  |  2004.07.27 |  maxphinx@hotmail.com
//--------------------------------------------------------------------------------------------------------------

var winObj="";
winObj+='<OBJECT id="maxSphinx" classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">';
winObj+='<PARAM name="Command" value="Maximize">';
winObj+='</OBJECT>';
document.write(winObj);

function maximize()
{
	var ScreenWidth=screen.availWidth;
	var ScreenHeight=screen.availHeight;
	var ClientWidth=document.body.clientWidth+4;
	var ClientHeight=document.body.scrollHeight+125;
	maxWindow();
	if(ClientWidth<ScreenWidth)//||ClientHeight<ScreenHeight)	//如果地址栏下方使用了某种搜索工具栏将会对ClientHeight的值有影响。故取消Clientheight判断。
	{
		document.all.maxSphinx.click();
	}
}

function maxWindow()
{
	try
	{
		window.moveTo(-4,-4);
		window.resizeTo(screen.availWidth+8,screen.availHeight+8);
	}
	catch(e)
	{
	}
}

/*
function remind()
{
	var ScreenWidth=screen.availWidth;
	var ScreenHeight=screen.availHeight;
	var ClientWidth=document.body.clientWidth+4;
	var ClientHeight=document.body.scrollHeight+125;
	alert("ScreenWidth="+ScreenWidth+",ScreenHeight="+ScreenHeight+",ClientWidth="+ClientWidth+",ClientHeight="+ClientHeight);
}
*/

//用法：在BODY里加上 onLoad="maximize();"

