//
function MM_goToURL() { 
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  var url="http://"+document.goPage.ip.value+"/phpmyadmin/";
  //window.location=url;
  window.open(url);
}


//
function checkConfirm()
{
        var returnVarValue=confirm("您确认退出本系统？");
        if(returnVarValue){
                location="logout.asp";
        }
}

//	  
function confirmit()
{
if(confirm("是否确认此操作？"))
return true;
else
return false;
}

//
function ifok()
{
if (confirm("请再次确认是否更换域名！"))
document.mail_modi.submit();
}

  // Begin cs_help.cgi

function chk_edt()
{
if(confirm("请确认是否更改!"))
return true;
else
return false;
}
function chk_del()
{
if(confirm("如果确认，该邮箱内现有信件将全部丢失且不可恢复!"))
return true;
else
return false;
}

		function expl()
		{
		if (identity.style.display=="none")
		identity.style.display="block";
		else
		identity.style.display="none";
		}
		
		function b_regstt_chg()
		{
		if(confirm("是否确认更改邮箱状态?"))
		return true;
		else
		return false;
		
		}

function chk_edt()
{
if(confirm("请确认是否更改!"))
return true;
else
return false;
}

//预载入图片
function MM_preloadImages() { //v3.0    
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();    
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)    
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}    
}   

function upseccode(){

  document.getElementById("seccode").src = "/code/code.asp?t="+Math.random();

}

//mailcode
function upseccodemail(){

  document.getElementById("seccodemail").src = "/code/mailcode.asp?t="+Math.random();

}

//sqlcode
function upseccodesql(){

  document.getElementById("seccodesql").src = "/code/sqlcode.asp?t="+Math.random();

}

//hichinacode
function uphichinacode()
{
var r=Math.round(100*Math.random());
url='http://diy.hichina.com/cgi-bin/sImage?Rand='+r
document.getElementById("img").src=url;
document.getElementById("Rand").value=r;
}

//dnscomcncode
function updnscomcncode()
{
var s=Math.round(100*Math.random());
url='http://mgt.dns.com.cn/main/wauth.php?PHPSESSID='+s
document.getElementById("dnscomcn").src=url;
document.getElementById("PHPSESSID").value=s;
}

//menu
function t(name,cursel,n){ 
for(i=1;i<n;i++){ 
var menu=document.getElementById(name+i); 
var con=document.getElementById("con_"+name+"_"+i); 
menu.className=i==cursel?"hover":""; 
con.style.display=i==cursel?"block":"none"; 
} 
} 

//onmouse
function showTip(obj,txt){
		//感谢坏梨编写该函数.
		//obj.style.position="relative"
		//obj.innerHTML="<div class=\"tip-bg\"><div class=\"tip-bulb\">&nbsp;"+txt+"&nbsp;</div></div>"+obj.innerHTML
		//obj.onmouseover=function(){this.getElementsByTagName ('div')[0].style.display='block'}
		//obj.onmouseout=function(){this.getElementsByTagName ('div')[0].style.display='none'}
		// -- edited by qhwa : check if already setted up
		if(obj.init) return;
		// --
	obj.init = function(){
		var thisObj = this;
		var str = thisObj.innerHTML;
		thisObj.style.position = "relative";
		var div = document.createElement("div");
		div.className = "tip-bg";
		div.innerHTML = "<div class=\"tip-bulb\">&nbsp;" + txt + "&nbsp;</div>";
		thisObj.insertBefore(div,thisObj.firstChild);

			//thisObj.innerHTML = "<div class=\"tip-bg\"><div class=\"tip-bulb\">&nbsp;" + txt + "&nbsp;</div></div>" + str;

		thisObj.getElementsByTagName ('div')[0].style.display = 'none';
		thisObj.showTip();
			
		thisObj.onmouseover = thisObj.showTip;
		thisObj.onmouseout = thisObj.hideTip;
	}
	obj.showTip = function(){

		var thisObj = this;
		clearTimeout(thisObj.timeout);
		thisObj.timeout = setTimeout(function(){
			thisObj.getElementsByTagName ('div')[0].style.display='block';
		},200);
	}
	obj.hideTip = function(){
		var thisObj = this;
		clearTimeout(thisObj.timeout);
		thisObj.getElementsByTagName ('div')[0].style.display='none'
	}
	obj.init();
}

//
	  function sql_regstt_cfm()
	  {
	  if(confirm("是否确认更改数据库状态！"))
      return true;
      else	  
	  return false;
	  }
	   function sql_pss_cfm()
	  {
	  if(confirm("是否确认更改数据库密码！"))
      return true;
      else	  
	  return false;
	  }
	   function sql_ftpstt_cfm()
	  {
	  if(confirm("是否确认更改FTP状态！"))
      return true;
      else	  
	  return false;
	  }
	  function sql_ftppss_cfm()
	  {
	  if(confirm("是否确认更改FTP密码！"))
      return true;
      else	  
	  return false;
	  }
	   function sql_bkp_cfm()
	  {
	  if(confirm("是否确认执行数据库备份！"))
      return true;
      else	  
	  return false;
	  }
	  function sql_rst_cfm()
	  {
	  if(confirm("是否确认执行数据库恢复！"))
      return true;
      else	  
	  return false;
	  }