var CenterTimer,AlertWindow1,AlertWindow2;
function ShowWindow(W1,W2){
	AlertWindow1=W1;
	AlertWindow2=W2;
	if(AlertWindow1=='' || typeof AlertWindow1=='undefined')AlertWindow1='messWindow';
	if(AlertWindow2=='' || typeof AlertWindow2=='undefined')AlertWindow2='promptWindow';
	$('#'+AlertWindow1).css("opacity",0.5);
	$('#'+AlertWindow1).width(document.body.scrollWidth>document.documentElement.clientWidth?document.body.scrollWidth:document.documentElement.clientWidth);
	$('#'+AlertWindow1).height(document.body.scrollHeight>document.documentElement.clientHeight?document.body.scrollHeight:document.documentElement.clientHeight);
	$('#'+AlertWindow1).fadeIn("slow");
	$('#'+AlertWindow2).fadeIn("slow");
	DivCenter();
}
function HideWindow(){$("#"+AlertWindow1).fadeOut("slow");$("#"+AlertWindow2).fadeOut("slow");clearTimeout(CenterTimer);}

function DivCenter()
{
	var Div=document.getElementById(AlertWindow2);
	var Dh = Div.offsetHeight;
	if(Dh>$('#'+AlertWindow1).height())$('#'+AlertWindow1).height(Div.offsetHeight+$('#'+AlertWindow2).offset().top*2);
	if(document.documentElement.clientHeight>Dh)
	{
		Div.style.top=(document.documentElement.clientHeight-Div.offsetHeight)/2+document.documentElement.scrollTop+'px';
	}
	Div.style.left=(document.body.clientWidth-Div.clientWidth)/2+document.body.scrollLeft+'px';
	CenterTimer = setTimeout("DivCenter()",500);
}
function AlertLoginReturn(S){if(S==1)location.reload();}
function IFrameReSize(iframename){var pTar = document.getElementById(iframename);if (pTar){if(pTar.contentDocument && pTar.contentDocument.body.offsetHeight){pTar.style.height = pTar.contentDocument.body.offsetHeight+'px';}else if (pTar.Document && pTar.Document.body.scrollHeight){pTar.style.height = pTar.Document.body.scrollHeight+'px';}}}
¡¡¡¡//iframe¿í¶È×ÔÊÊÓ¦
function IFrameReSizeWidth(iframename){var pTar = document.getElementById(iframename);if (pTar){if (pTar.contentDocument && pTar.contentDocument.body.offsetWidth){pTar.style.width = pTar.contentDocument.body.offsetWidth+'px';}else if (pTar.Document && pTar.Document.body.scrollWidth){pTar.style.width = pTar.Document.body.scrollWidth+'px';}}}