function SeedMsgBox(str){
	if(document.getElementById("SeedMsgBoxDiv")){
		document.body.removeChild(document.getElementById("SeedMsgBoxDiv"));
	}

	var sWidth,sHeight,dWidth,dHeight;
	sWidth=window.screen.width;
	if (window.navigator.userAgent.indexOf("MSIE")>=1) {
		sHeight=document.body.clientHeight > document.documentElement.clientHeight ? document.body.clientHeight : document.documentElement.clientHeight;
		if(sHeight<(window.screen.availHeight-230))sHeight=window.screen.availHeight-230;
	}else{
		sHeight=document.documentElement.scrollHeight;
	}

	dHeight=(document.documentElement.clientHeight - 184)/2;
	dWidth=(window.screen.availWidth - 550)/2;
	var msgObj=document.createElement("div");
	msgObj.setAttribute("id","SeedMsgBoxDiv");
	document.body.appendChild(msgObj);
	document.getElementById("SeedMsgBoxDiv").innerHTML="";

	var bgObj=document.createElement("div");
	bgObj.setAttribute("id","SeedMsgBgDiv");
	bgObj.style.position="absolute";
	bgObj.style.filter="Alpha(Opacity=60);opacity:0.6;";
	bgObj.style.opacity="0.48";
        bgObj.style.zIndex="1000";
	bgObj.style.width=document.documentElement.clientWidth+'px'; // "100%"; 2010-7-6 by tony
	bgObj.style.height=sHeight+"px";
	bgObj.style.top="0";
	bgObj.style.left="0";
	bgObj.style.background="#000";
	document.getElementById("SeedMsgBoxDiv").appendChild(bgObj);

	var tipbigdivObj=document.createElement("div");
	tipbigdivObj.setAttribute("id","SeedMsgDiv");
	tipbigdivObj.setAttribute("class","SeedMsgDiv");
	tipbigdivObj.setAttribute("id","SeedMsgDiv");
	tipbigdivObj.innerHTML='<div class="SeedMsgTitle">ΞΒά°ΜαΚΎ:</div><a href="javascript:void(0)" onclick="CloseSeedMsgBox()"class="SeedMsgClose"><img src="http://img.wansecheng.com/img2013/seedbox_close.png" /></a><div class="SeedMsgTextA"><div class="SeedMsgTextB"><div id="SeedMsgTxt" class="SeedMsgText">'+str+'</div></div></div>';
	tipbigdivObj.style.top=dHeight+"px";
	tipbigdivObj.style.left=dWidth+"px";
	document.getElementById("SeedMsgBoxDiv").appendChild(tipbigdivObj);

	var md=false,mobj,ox,oy;
	document.onmousedown=function(ev){
		var ev=ev||window.event;
		var evt=ev.srcElement||ev.target;
		if(typeof(evt.getAttribute("canmove"))=="undefined"){
			return;
		}
		if(evt.getAttribute("canmove")){
			md = true;
			mobj = document.getElementById(evt.getAttribute("forid"));
			ox = mobj.offsetLeft - ev.clientX;
			oy = mobj.offsetTop - ev.clientY;
		}
	}
	document.onmouseup = function(){md=false;}
	document.onmousemove = function(ev){
		var ev=ev||window.event;
		if(md){
			mobj.style.left= (ev.clientX + ox)+"px";
			mobj.style.top= (ev.clientY + oy)+"px";
		}
	}
	var sels = document.getElementsByTagName("SELECT");
	for(var i=0; i<sels.length; i++){
		sels[i].style.visibility = 'hidden';
	}
	this.CloseSeedMsgBox = function(){
		document.body.removeChild(document.getElementById("SeedMsgBoxDiv"));
		for(var i=0; i<sels.length; i++){
			sels[i].style.visibility = '';
		}
	}
}

SeedMsgBox.wait = function(message)
{
    SeedMsgBox('<a href="javascript:void(0)" onclick="CloseSeedMsgBox()"class="SeedMsgClose"><img src="http://img.wansecheng.com/img2013/seedbox_close.png" /></a><div class="SeedMsgTextA-wait"><div class="SeedMsgTextB"><div id="SeedMsgTxt" class="SeedMsgText-wait">'+message+'</div></div></div>');
}

SeedMsgBox.success = function(message)
{
    SeedMsgBox('<a href="javascript:void(0)" onclick="CloseSeedMsgBox()"class="SeedMsgClose"><img src="http://img.wansecheng.com/img2013/seedbox_close.png" /></a><div class="SeedMsgTextA-success"><div class="SeedMsgTextB"><div id="SeedMsgTxt" class="SeedMsgText-success">'+message+'</div></div></div>');
}

SeedMsgBox.error = function(message)
{
    SeedMsgBox('<a href="javascript:void(0)" onclick="CloseSeedMsgBox()"class="SeedMsgClose"><img src="http://img.wansecheng.com/img2013/seedbox_close.png" /></a><div class="SeedMsgTextA-error"><div class="SeedMsgTextB"><div id="SeedMsgTxt" class="SeedMsgText-error">'+message+'</div></div></div>');
}

SeedMsgBox.setMessage=function(message)
{
    var msg = document.getElementById('SeedMsgTxt');
    if(msg)
    {
        msg.innerHTML = message;
    }
}