function admin_logout()
{
  var tmp=window.confirm("您确定要退出管理后台吗？");
  if (tmp)
  { return true; }
  else
  { return false; }
  
}

function chkgo()
{

    if (document.frmLogin.txtUsername.value=="")
       {
        alert("帐号未填！")
        document.frmLogin.txtUsername.focus()
        document.frmLogin.txtUsername.select()
        return
       }
    if (document.frmLogin.txtPassword.value=="")
       {
        alert("密码未填！")
        document.frmLogin.txtPassword.focus()
        document.frmLogin.txtPassword.select()		
        return
       }
    if (document.frmLogin.txtCode.value=="")
       {
        alert("验证码未填！")
        document.frmLogin.txtCode.focus()
        document.frmLogin.txtCode.select()		
        return
       }
       document.frmLogin.submit()
}

function clear()
{
  document.frmLogin.reset()
}

function re_load() 
{ 
  Location.reload(); 
}


function left_menu(meval)
{
  var left_n=eval(meval);
  if (left_n.style.display=="none")
  { eval(meval+".style.display='';"); }
  else
  { eval(meval+".style.display='none';"); }
}

function AllSelect()
{
  if (this.frmList.checkbox.checked)
  {
    for (i = 0; i < this.frmList.id.length; i++) 
    {
      this.frmList.id[i].checked = true;
    }
    return true;
  }
  else
  {
    for (i = 0; i < this.frmList.id.length; i++) 
    {
      this.frmList.id[i].checked = false;
    }
    return true;
  }
}

function reset()
{
  frmList.reset()
}

function chkRow(obj)
{
  var r = obj.parentElement.parentElement;
  if(obj.checked){ r.style.backgroundColor="#B0C4DE";}
  else {if(r.rowIndex%2==1)r.style.backgroundColor="#F2F2F2";else r.style.backgroundColor="#FFFFFF";}
}

function DelSelect(sel)
{
  for(i=sel.options.length-1; i>0; i--)
    if(sel.options[i].selected)
      sel.options[i]=null;
}

function Element_Del()
{
  var tmp=window.confirm("确实要删除吗？");
  if (tmp)
  { return true; }
  else
  { return false; }
  
}

function KeyBoard(strObj)
{
	var objInput = document.all(strObj);
	if(objInput)
	{
		var intLeft = 100+Math.random()*400;
		while(intLeft>(screen.width-282)){intLeft = 100+Math.random()*400;}
		var intTop= 100+Math.random()*300;
		while(intLeft>(screen.width-95)){intTop = 100+Math.random()*300;}
		//var intLeft=document.body.scrollLeft+event.clientX; //获取当前鼠标位置的X坐标
		//var intTop=document.body.scrollTop+event.clientY; //获取当前鼠标位置的Y坐标
		var strUrl = "Include/KeyBorad.htm";
		var strStyle = "dialogLeft="+intLeft+"pt;dialogTop="+intTop+"pt;dialogWidth=282pt;dialogHeight=95pt;center=no;resizable=no;status=off;help=off;"
		var strDate  = objInput.value;
		var strData = window.showModalDialog(strUrl, objInput, strStyle);
	}
}