//移动对象
var Obj;
var oMove;
function MouseDown(obj){
Obj=obj;
oMove=Obj.parentElement.parentElement.parentElement;
Obj.setCapture();
Obj.l=event.x-oMove.style.pixelLeft;
Obj.t=event.y-oMove.style.pixelTop;
}
function MouseMove(){
if(Obj!=null){
    oMove.style.left = event.x-Obj.l;
    oMove.style.top = event.y-Obj.t;
    }
}
function MouseUp(){
if(Obj!=null){
    Obj.releaseCapture();
    Obj=null;
    }
}


//弹出对话框
window.alert = function(txt)
{
	var shield = document.createElement("DIV");
	shield.id = "shield";
	shield.style.position = "absolute";
	shield.style.left = "0px";
	shield.style.top = "0px";
	shield.style.width = "100%";
	shield.style.height = document.body.scrollHeight+"px";
	shield.style.background = "#333";
	shield.style.textAlign = "center";
	shield.style.zIndex = "10000";
	shield.style.filter = "alpha(opacity=0)";
	var alertFram = document.createElement("DIV");
	alertFram.id="alertFram";
	alertFram.style.position = "absolute";
	alertFram.style.left = "50%";
	alertFram.style.top = "20%";
	alertFram.style.marginLeft = "-225px";
	alertFram.style.marginTop = "-25px";
	alertFram.style.zIndex = "10001";

	strHtml  = "<table width=\"398\" height=\"150\" cellpadding=\"0\" cellspacing=\"0\" style=\"position:absolute;left:50;top:50;border:1px solid #0099FF;\" onselectstart=\"return false\" ><tr><td height=\"28\" background=\"../Images/tit_dialog.gif\" style=\"text-align:left;padding-left:10px;padding-top:2px;font-size:14px;font-weight:bold;color:#ffffff;cursor:move\" onmousedown=\"MouseDown(this)\" onmouseup=\"MouseUp()\" onmousemove=\"MouseMove()\">【系统提示信息】</td></tr>\n";
	strHtml += "<tr><td align=\"center\" style=\"background:#fff;text-align:center;font-size:14px;font-weight:bold;color:#0099cc;height:120px;line-height:25px;border:1px solid #0099FF;\"><br><img src=../images/dialog-5.gif width=30 height=21 border=0>&nbsp;"+txt+"<br><br><input type=\"button\" value=\"确 定\" onclick=\"doOk()\" id=\"DialogButt\" /></td></tr></table>\n";
	alertFram.innerHTML = strHtml;
	document.body.appendChild(alertFram);
	document.body.appendChild(shield);
	var c = 0;
	this.doAlpha = function(){
		if (c++ > 80){clearInterval(ad);return 0;}
		shield.style.filter = "alpha(opacity="+c+");";
	}
	var ad = setInterval("doAlpha()",1);
	this.doOk = function(){
		alertFram.style.display = "none";
		shield.style.display = "none";
	}
	alertFram.focus();
	document.body.onselectstart = function(){return false;};
}
