
//通用选择删除条目（反选-全选）--------------------------------------------------------
function CheckOthers(form)
{
   for (var i=0;i<form.elements.length;i++)
   {
      var e = form.elements[i];
      if (e.checked==false)
      {
	     e.checked = true;
      }
      else
      {
	     e.checked = false;
      }
   }
}

function CheckAll(form)
{
   for (var i=0;i<form.elements.length;i++)
   {
      var e = form.elements[i];
      e.checked = true;
   }
}
//相关条目删除提示------------------------------------------------------------
function ConfirmDel(message)
{
   if (confirm(message))
   {
      document.formDel.submit()
   }
}

//检查管理员登录------------------------------------------------------------------------------
function CheckAdminLogin()
{
   var check; 
   if (!voidNum(document.AdminLogin.LoginName.value))
   {
	  alert("请正确输入管理员名称（由0-9,a-z,-_任意组合的字符串）。");
      document.AdminLogin.LoginName.focus();
	  return false;
	  exit;
   }    
   if (!voidNum(document.AdminLogin.LoginPassword.value))
   {
	  alert("请输入管理员密码。");
	  document.AdminLogin.LoginPassword.focus();
	  return false;
	  exit;
   }
   if (!voidNum(document.AdminLogin.CheckCode.value))
   {
      alert("请正确输入验证码。");
      document.AdminLogin.CheckCode.focus();
	  return false;
	  exit;
   }
   return true;
}
//检查编辑管理员------------------------------------------------------------------------------
function CheckAdminEdit()
{
   if (document.editForm.AdminName.value.length<3 || document.editForm.AdminName.value.length>10 )
   {
	  alert("请正确输入登录名（由0-9,a-z,-_任意组合3-10位的字符串）。");
      document.editForm.AdminName.focus();
	  return false;
	  exit;
   }	
   var check; 
   if (!voidNum(document.editForm.AdminName.value))
   {
	  alert("请正确输入登录名（由0-9,a-z,-_任意组合3-10位的字符串）。");
      document.editForm.AdminName.focus();
	  return false;
	  exit;
   }
}
//检查编辑会员--------------------------------------------------------------------------------
function CheckMemEdit()
{
   if (document.editMemForm.MemName.value.length<3 || document.editMemForm.MemName.value.length>16 )
   {
	  alert("请正确输入登录名（由0-9,a-z,-_任意组合3-16位的字符串）。");
      document.editMemForm.MemName.focus();
	  return false;
	  exit;
   }	
   var check; 
   if (!voidNum(document.editMemForm.MemName.value))
   {
	  alert("请正确输入登录名（由0-9,a-z,-_任意组合3-16位的字符串）。");
      document.editMemForm.MemName.focus();
	  return false;
	  exit;
   }
}
//管理员退出登录提示--------------------------------------------------------------------------
function AdminOut()
{
   if (confirm("您真的要退出管理操作吗？"))
   location.replace("CheckAdmin.asp?AdminAction=Out")
}
//跳转到第几页-------------------------------------------------------------------------------
function GoPage(Myself)
{
   window.location.href=Myself+"Page="+document.formDel.SkipPage.value;
}
 function unselectall(thisform){
        if(thisform.chkAll.checked){
            thisform.chkAll.checked = thisform.chkAll.checked&0;
        }   
    }
    function CheckAll(thisform){
        for (var i=0;i<thisform.elements.length;i++){
            var e = thisform.elements[i];
            if (e.Name != "chkAll"&&e.disabled!=true)
                e.checked = thisform.chkAll.checked;
        }
    }
	
	//颜色选择
function Getcolor(img_val,input_val){
	var arr = showModalDialog("../images/selcolor.html?action=title", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0; help:0");
	if (arr != null){
		document.getElementById(input_val).value = arr;
		img_val.style.backgroundColor = arr;
		}
}
/* 类别跳转 */
function display(ID)
{
	if (document.getElementById(ID).style.display == "none") {
		document.getElementById(ID).style.display = "";
	}else{
		document.getElementById(ID).style.display = "none";
	}
}
         function openn(){
          var args = openn.arguments;
          if(args[0] == 0) return;
          location.href=(args[0]);
          }