﻿// JScript 文件
var c,t;
    function show(obj)
    {
      t=obj.className;
      obj.className="bar_td_selected";
    }
    function unshow(obj)
    {     
      obj.className=t;
    }
    function openWin(url,obj)
    {    
        if(c!=null)c.className="bar_td";
        c=obj;
        t="bar_td_selected";
      document.getElementById("frm").src=url;
    }
    //检查Input输入项是否为空
    function checkInput(obj)
    {
       var strArray=obj.split(',');
       var content="";
       for(i=0;i<strArray.length;i++)
       {
          if(document.getElementById(strArray[i]).value=="") content+=strArray[i]+" "+"不能为空\t\n"; 
       }
       content+=checkPassword();
       if(content.length>1)
       {
       alert(content);
       return false;
       }
       return true;
    }
    function checkPassword()
    {
       if(document.getElementById("password2")==null) return "";
       if(document.getElementById("password").value!=document.getElementById("password2").value) 
       return "两次输入的密码不一致\t\n";
        else
        return "";    
    }
    //用户类
    function check(txt)
    {
        return window.confirm("确定执行'"+txt+"'操作吗？");
    }
    function UserDetail(uid)
    {
        window.open("admin_userDetail.aspx?userID="+uid,"detail","width=520px,height=580px,location=no,menubar=no,scrollbars=no,titlebar=no,toolbar=no");    
    }
    function UserPwd(uid)
    {
        window.open("admin_userPwd.aspx?userID="+uid,"detail","width=520px,height=450px,location=no,menubar=no,scrollbars=no,titlebar=no,toolbar=no");    
    }
    function RoleAdd(moduleID)
    {
        window.open("admin_roleNew.aspx?moduleID="+moduleID,"detail","width=520px,height=450px,location=no,menubar=no,scrollbars=no,titlebar=no,toolbar=no");
    }
    //QueryForm
    function QueryDetailShow(url)
    {
        window.open(url);
    }
    //MoldForm
    function MoldDetailShow(url)
    {
        window.open(url);
    }
    //DocForm
    function DocFormShow(url)
    {
        window.open(url);
    }
    //Dept add user
    function DeptAddUser(url)
    {
        window.open(url,"adduser","top=100px,left=200px,width=520px,height=450px,location=no,menubar=no,scrollbars=no,titlebar=no,toolbar=no");
    }