function alertWin(title, msg, w, h, sw, sh){      
     var iWidth = document.documentElement.clientWidth; 
     var iHeight = document.documentElement.clientHeight; 
     var bgObj = document.createElement("div"); 
	 
     bgObj.id = "BgDiv"; 
     bgObj.style.cssText = "position:absolute;left:0px;top:0px;width:"+iWidth+"px;height:"+Math.max(document.body.clientHeight, iHeight)+"px;filter:Alpha(Opacity=10);opacity:0.3;z-index:101;background-color:#ffffff"; 
     document.body.appendChild(bgObj); 
      
     var msgObj=document.createElement("div"); 
     msgObj.id = "MsgDiv"; 
     msgObj.style.cssText = "position:absolute;font-size:12px;top:"+(iHeight-h-sh)/2+"px;left:"+(iWidth-w-sw)/2+"px;width:"+w+"px;height:"+h+"px;text-align:center;padding:1px;line-height:22px;z-index:102;cursor:move;"; 
     document.body.appendChild(msgObj); 
      
     var table = document.createElement("table"); 
     msgObj.appendChild(table); 
     table.style.cssText = "margin:0px;border:0px;padding:0px;"; 
     table.cellSpacing = 0; 

msgObj.onmousedown = function(){
	var e = getEvent();
	var deltaX=e.clientX-parseInt(msgObj.style.left);
	var deltaY=e.clientY-parseInt(msgObj.style.top);
	var drag=true;
	if(e.preventDefault){
		e.preventDefault();
	}
	this.onmousemove = function(ev){
		ev=ev?ev:window.event;
		if(drag==true){
		msgObj.style.top = parseInt(ev.clientY-deltaY)+"px";
		msgObj.style.left = parseInt(ev.clientX-deltaX)+"px";
		this.setCapture();
		}
	}
	this.onmouseup = function(){drag=false;this.releaseCapture();}
}
     var msgBox = table.insertRow(-1).insertCell(-1); 
     msgBox.id = "MsgBox"; 
     msgBox.style.cssText = "font:10pt;"; 
     msgBox.colSpan = 2; 
     msgBox.innerHTML = msg; 
      
     function getEvent() { 
         return window.event || arguments.callee.caller.arguments[0]; 
     } 
} 
     function delWin(sid){
		 if (sid==0){
		 var a=document.body;
		 var b=document.getElementById('BgDiv');
		 var c=document.getElementById('MsgDiv');
		 a.removeChild(b);
		 a.removeChild(c);
		 }
		 else if (sid==1){location.href="/";}
		 else if (sid==2){window.close();}
	 }

function MM_openwin_size(w,h){
if (w>0){document.getElementById("tsframe").style.width = w + "px";}
if (h>0){document.getElementById("tsframe").style.height = h + "px";}
if (w>0){document.getElementById("MsgDiv").style.width = (w+81) + "px";}
if (h>0){
	document.getElementById("MsgDiv").style.height = (h+78) + "px";
	document.getElementById("ajaxHeidth1").style.height = h + "px";
	document.getElementById("ajaxHeidth2").style.height = h + "px";
}
if (w>0){
	var iWidth = document.documentElement.clientWidth; 
	document.getElementById("MsgDiv").style.left = ((iWidth-w-81)/2) + "px";
	}
if (h>0){
	var iHeight = document.documentElement.clientHeight;
	document.getElementById("MsgDiv").style.top = ((iHeight-h-78)/2) + "px";
	}
}

function MM_openwin(title,str,w,h,m){
	var M_h=h-33;
	//var msg='<iframe width="99%" height="'+M_h+'" align="center" frameborder="0" scrolling="auto" src="'+str+'"></iframe>';
	var msgObj="";
	msgObj+='<table border="0" cellspacing="0" cellpadding="0" oncontextmenu="return false" onselectstart="return false" class="ajaxWin">';
	msgObj+='<tr>';
	msgObj+='<td class="ajaxWin_top_left"><div>&nbsp;</div></td>';
	msgObj+='<td class="ajaxWin_top_center"><div>&nbsp;</div></td>';
	msgObj+='<td  onclick="delWin('+ m +')" style="cursor:pointer;" class="ajaxWin_top_right"><div>&nbsp;</div></td>';
	msgObj+='</tr>';
	msgObj+='<tr>';
	msgObj+='<td class="ajaxWin_center_left"><div style="height:' + h + 'px;" id="ajaxHeidth1">&nbsp;</div></td>';
	msgObj+='<td bgcolor="#ffffff"><iframe width="'+w+'" height="'+h+'" align="center" id="tsframe" frameborder="0" scrolling="auto" src="'+str+'"></iframe></td>';
	msgObj+='<td class="ajaxWin_center_right"><div style="height:' + h + 'px;" id="ajaxHeidth2">&nbsp;</div></td>';
	msgObj+='</tr>';
	msgObj+='<tr>';
	msgObj+='<td class="ajaxWin_bottom_left"><div>&nbsp;</div></td>';
	msgObj+='<td class="ajaxWin_bottom_center"><div>&nbsp;</div></td>';
	msgObj+='<td class="ajaxWin_bottom_right"><div>&nbsp;</div></td>';
	msgObj+='</tr>';
	msgObj+='</table>';
	alertWin(title,msgObj,w,h,81,78);
}
function MM_account_show(){document.getElementById('accountCD').style.display='block';}
function MM_account_hide(){document.getElementById('accountCD').style.display='none';}