/**********************************************************************************
* Copyright (c) 2002,中国网络技术联盟                                             *
* All rights reserved.                                                            *
*                                                                                 *
* 文件名称：script.js                                                         *
* 文件标识：见配置管理计划书                                                      *
* 摘    要：系统语言设置                                                       *
*                                                                                 *
* 当前版本：1.0                                                                   *
* 作    者：szw                                                                   *
* Email   ：sszw@163.net                                                          *
* 网    址：http://www.focusexe.com                                               *
* 建立日期：2002-03-13                                                            *
* 修改日期：2002-03-13                                                            *
*                                                                                 *
* 取代版本：1.0                                                                   *
* 原作  者：szw                                                                   *
* Email   ：sszw@163.net                                                          *
* 网    址：http://www.focusexe.com                                               *
* 建立日期：2002-03-13                                                            *
* 修改日期：2002-03-13                                                            *
***********************************************************************************/
//把下面的中文翻译成其它语言就可以，实现多语言版本。
var
LANGUAGE_1="用户名太短";
LANGUAGE_2="密码太短";
LANGUAGE_3="用户名太短，用户名在2个字符以上";
LANGUAGE_4="密码太短";
LANGUAGE_5="密码与确认密码不符，请检查";
LANGUAGE_6="请输入取回密码问题";
LANGUAGE_7="请输入取回密码回答";
LANGUAGE_8="请输入中文名";
LANGUAGE_9="请输入Email地址";
LANGUAGE_10="请输入邮箱大小！！";
LANGUAGE_11="邮箱大小请输入数字！！";
LANGUAGE_12="请输入密码！";
LANGUAGE_13="密码与确认密码不符，请检查";
LANGUAGE_14="确实要删除吗?";
LANGUAGE_15="删除所有的邮件吗？";
LANGUAGE_16="要将指定邮件放入选定的邮箱中吗？";
LANGUAGE_17="将选中的邮件复制到指定的邮箱。";
LANGUAGE_18="删除邮箱吗？";
LANGUAGE_19="你还没有选中要操作的项目";
LANGUAGE_20="您已经选择了该内容!";
LANGUAGE_21="请输入邮箱名称!";
LANGUAGE_22="请输入域名名称!";
LANGUAGE_23="删除邮件分类规则吗？";
LANGUAGE_24="删除拒收邮件规则吗？";
LANGUAGE_25="禁用拒收邮件规则吗？";
LANGUAGE_26="启用拒收邮件规则吗？";
LANGUAGE_27="[发件人], [收件人/抄送], [主题], [正文]中至少输入一项";
LANGUAGE_28="[发件人], [收件人], [主题]中至少输入一项";
LANGUAGE_29="请您输入要拒收的电子邮件地址";
LANGUAGE_30="请您输入要转发到指定用户(电子邮件的地址)";
LANGUAGE_31="密码不能为空";
LANGUAGE_32="两次输入的密码不一样";
LANGUAGE_33="你真的要删除用户吗？删除用户的话，这个用户的邮件将全部被删除！！";
LANGUAGE_34="您真的要禁止用户使用Webmail收信吗？";
LANGUAGE_35="您真的要让用户使用Webmail收信吗？";
LANGUAGE_36="您真的要禁止用户使用邮件系统吗？";
LANGUAGE_37="您真的要让用户使用邮件系统吗？";
LANGUAGE_38="删除域名吗？此域名下的用户将被全部删除！！";
LANGUAGE_39="域名名称不能为空！！";
LANGUAGE_40="删除用户吗？";
LANGUAGE_41="确实要删除吗?";
LANGUAGE_42="请您输入名称";
LANGUAGE_43="请您输入主题";
LANGUAGE_44="请您输入内容";
LANGUAGE_45="请您输入姓名";
LANGUAGE_46="请您输入email地址";
LANGUAGE_47="请您输入回复主题";
LANGUAGE_48="请您输入回复内容";
LANGUAGE_49="删除邮箱吗？";
LANGUAGE_50="POP3服务器不能为空";
LANGUAGE_51="POP3用户名不能为空";
LANGUAGE_52="POP3密码不能为空";
LANGUAGE_53="接改后的邮件处理不能为空";
LANGUAGE_54="要存入的邮箱不能为空";
LANGUAGE_55="启用邮箱吗？";
LANGUAGE_56="禁用邮箱吗？";
LANGUAGE_57="请输入公司名称";
LANGUAGE_58="请输入注册的用户数";
LANGUAGE_59="请输入注册码";
LANGUAGE_60="启用拒收邮件吗？";
LANGUAGE_61="禁用拒收邮件吗？";
LANGUAGE_62="请输入用户名";
LANGUAGE_63="请输入取回密码问题";
LANGUAGE_64="请输入取回密码回答";
LANGUAGE_65="请输入电子邮件";
LANGUAGE_66="背景名称不能为空！！";
LANGUAGE_67="背景图片不能为空！！";
LANGUAGE_68="文件夹不能为空！！";
LANGUAGE_69="如果您先择了一个文件夹，这个文件夹中的所有文档将被删除，确实要删除吗";
LANGUAGE_70="确实要删除全部文件吗?";
LANGUAGE_71="要把所选的文件复制到所选路径中吗";
LANGUAGE_72="确实要将所选文件移入指定的路径吗";
LANGUAGE_73="请输入界面风格名称";
LANGUAGE_74="请输入界面风格作者";
LANGUAGE_75="请输入电子邮件";
LANGUAGE_76="请输入公司/个人主页";
LANGUAGE_77="您真的要禁止此界面风格吗？";
LANGUAGE_78="您真的要启用此界面风格吗？";
LANGUAGE_79="您真的要删除此界面风格吗？";
LANGUAGE_80="您真的要删除此登录日志吗？";
LANGUAGE_81="广告名称不能为空！！";
LANGUAGE_82="链接地址不能为空！！";
LANGUAGE_83="广告条宽度不能为空！！";
LANGUAGE_84="广告条高度不能为空！！";
LANGUAGE_85="广告图片不能为空！！";
LANGUAGE_86="请输入文档名称";
LANGUAGE_87="您真的要删除别名吗？";
LANGUAGE_88="您真的要禁用别名吗？";
LANGUAGE_89="您真的要启用别名吗？";
LANGUAGE_90="别名名称不能为空！";
LANGUAGE_91="您真的要删除邮件列表吗？";
LANGUAGE_92="您真的要禁用邮件列表吗？";
LANGUAGE_93="您真的要启用邮件列表吗？";
LANGUAGE_94="您真的要公开邮件列表吗？";
LANGUAGE_95="您真的要隐藏邮件列表吗？";
LANGUAGE_96="邮件列表名称不能为空？";
LANGUAGE_97="您真的要删除邮件列表成员吗？";
LANGUAGE_98="您真的要禁用邮件列表成员吗？";
LANGUAGE_99="您真的要启用邮件列表成员吗？";
LANGUAGE_100="您真的要将邮件列表成员设为管理员吗？";
LANGUAGE_101="您真的要将邮件列表成员由管理员设为用户吗？";
LANGUAGE_102="成员名不能为空？";
LANGUAGE_103="您真的要修复邮箱吗？";
LANGUAGE_104="请您输入域名名称?";
LANGUAGE_105="请您输入最大用户数?";
LANGUAGE_106="请您输入最大空间数?";
LANGUAGE_107="请您输入管理员密码";
LANGUAGE_108="请您输入缺省邮箱大小";
LANGUAGE_109="您真的要启用域名吗？";
LANGUAGE_110="您真的要禁用域名吗？";
LANGUAGE_111="您真的要启用邮件自动处理规则吗？";
LANGUAGE_112="您真的要禁用邮件自动处理规则吗？";
LANGUAGE_113="用户名太长，不能超出20个字符";
LANGUAGE_114="密码太长，不能超出20个字符";

LANGUAGE_121="请输入邮箱名称";

LANGUAGE_122="请输入用户名称";

LANGUAGE_123="您真的要改变界面默认风格吗？";


LANGUAGE_1221="您邮箱名称不能为空";
LANGUAGE_1231="您真的要启用邮箱监控功能吗？";
LANGUAGE_124="您真的要禁用邮箱监控功能吗？";
LANGUAGE_125="您真的要删除邮箱监控吗？";
LANGUAGE_126="您真的要删除邮箱监控成员吗？";
LANGUAGE_127="您真的要禁用邮箱监控成员吗？";
LANGUAGE_128="您真的要启用邮箱监控成员吗？";
LANGUAGE_129="您真的要启用邮箱监控保存吗？";
LANGUAGE_130="您真的要启用邮箱监控不保存吗？";

LANGUAGE_131="您真的要删除禁止的内容吗";
LANGUAGE_132="您真的要启用禁止的内容吗？";
LANGUAGE_133="您真的要禁用禁止的内容吗？";

LANGUAGE_134="您真的要删除吗？";
LANGUAGE_135="您真的要强制发送吗？";

LANGUAGE_136="您真的要删除RBL服务器吗";
LANGUAGE_137="您真的要启用RBL服务器吗？";
LANGUAGE_138="您真的要禁用RBL服务器吗？";

LANGUAGE_143="请输入您的姓";
LANGUAGE_144="请输入您的名";

LANGUAGE_139="您真的要将选中的邮件设置成垃圾邮件吗？";
LANGUAGE_140="您真的要将选中的邮件设置成正常邮件吗？";


LANGUAGE_145="删除短信通知规则吗？";
LANGUAGE_146="您真的要禁用短信通知规则吗？";
LANGUAGE_147="您真的启用短信通知规则吗？";
LANGUAGE_148="[发件人], [收件人], [主题]中至少输入一项";
LANGUAGE_149="请输入手机号码：";

LANGUAGE_150="请输入邮箱名";

LANGUAGE_151="请输入不能收发的邮件存入邮箱";

LANGUAGE_200="请选择要增加到的分类";
LANGUAGE_201="请选择要删除的分类";
LANGUAGE_202="请选择要修改的分类";
LANGUAGE_203="请选择要备份的分类";

LANGUAGE_204="您真的要删除所有的邮件吗？";
LANGUAGE_205="您真的要把发件人加入白名单吗？";
LANGUAGE_206="您真的要把发件人加入黑名单吗？";

LANGUAGE_207="您真的要把发件人从白名单中去除吗？";
LANGUAGE_208="您真的要把发件人从黑名单中去除吗？";

LANGUAGE_220="您真的要删除RBL服务器吗";
LANGUAGE_221="您真的要启用RBL服务器吗？";
LANGUAGE_222="您真的要禁用RBL服务器吗？";

LANGUAGE_223="您真的要将您选中的邮件进行存档吗？";
LANGUAGE_224="您真的要将您选中的邮件进行存档恢复吗？";

LANGUAGE_225="您输入的新密码和旧密码不能相同.";
LANGUAGE_226="您输入的新密码必需是字母加数字，密码长度在6位数以上.";

LANGUAGE_228="您真的要删除吗？";
LANGUAGE_229="您真的要启用吗？";
LANGUAGE_230="您真的要禁用吗？";

LANGUAGE_231="删除所选的邮件吗？";

//登陆检查
function Checklogin()
{
    if (document.login.user.value.length<2)
        {alert(LANGUAGE_1); return false;}
    var IniText=document.login.user.value;
    //document.login.user.value = IniText.toLowerCase();
    if (document.login.passwd.value.length<2)
       {alert(LANGUAGE_2); return false;}
    return true;
}
function msglogin()
{
    if(!Checklogin()) return;
    else document.login.submit();
}

//增加用户信息检查
function Checkadduser()
{
    if (document.adduser.user.value.length<2)
        {alert(LANGUAGE_3);return false;}

    if (document.adduser.user.value.length>20)
        {alert(LANGUAGE_113);return false;}

    if (document.adduser.passwd.value.length<3)
        {alert(LANGUAGE_4); return false;}

    if (document.adduser.passwd.value.length>20)
        {alert(LANGUAGE_114); return false;}

    if (document.adduser.passwd.value!=document.adduser.passwd2.value)
        {alert(LANGUAGE_5); return false;}
    if (document.adduser.question.value=="")
        {alert(LANGUAGE_6);return false;}
    if (document.adduser.answer.value=="")
        {alert(LANGUAGE_7);return false;}
    if (document.adduser.name.value=="")
        {alert(LANGUAGE_8);return false;}
    if (document.adduser.email.value=="")
        {alert(LANGUAGE_9);return false;}
    if (chkemail(document.adduser.email.value)==0)
        {alert(LANGUAGE_9);return false;}

    if (document.adduser.mailbox_size.value=="")
        {alert(LANGUAGE_10);return false;}
    if (fucCheckNUM(document.adduser.mailbox_size.value)==0)
        {alert(LANGUAGE_11);return false;}

    return true;
}

function adduser()
{
    if(!Checkadduser()) return;
    else document.adduser.submit();
}


//删除用户信息检查
function msgscyh()
{
        if(!checkone(document.scyh))
        {
        return;
        }
        else
        {
           document.scyh.submit();
        }
}

//修改密码检查
function Checkpasswd()
{
    if (document.passwd.passwd1.value=="")
        {alert(LANGUAGE_12); return false;}
    if (document.passwd.passwd2.value!=document.passwd.passwd1.value)
        {alert(LANGUAGE_13); return false;}
    return true;
}
function msgpasswd()
{
    if(!Checkpasswd()) return;
    else document.passwd.submit();
}

//检查删除邮件
function delmail()
{
        if(!checkone(document.do_mail_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_14)) {
                document.do_mail_operate.operate.value="del";
                document.do_mail_operate.submit();
           }
        }
}

//检查删除邮件
/*
function delmail_see()
{
      if(confirm("确实要删除吗?")) {
           document.do_mail_operate_see.operate.value="del";
           document.do_mail_operate_see.submit();
      }
}
*/
//检查删除所有邮件
function delmailall()
{
      if(confirm(LANGUAGE_15)) {
           document.do_mail_operate.operate.value="delall";
           document.do_mail_operate.submit();
      }
}

//检查移动邮件
function move_mail()
{
        if(!checkone(document.do_mail_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_16)) {
                document.do_mail_operate.operate.value="move";
                document.do_mail_operate.submit();
           }
        }
}

//检查复制邮件
function copy_mail()
{
        if(!checkone(document.do_mail_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_17)) {
                document.do_mail_operate.operate.value="copy";
                document.do_mail_operate.submit();
           }
        }
}

//检查移动邮件
function mail_fwd()
{
        if(!checkone(document.do_mail_operate))
        {
        return;
        }
        else
        {
             document.do_mail_operate.operate.value="fwd";
             document.do_mail_operate.submit();
        }
}

//检查删除邮箱
function delbox()
{
        if(!checkone(document.mail_box_set))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_18)) {
                document.mail_box_set.operate.value="delbox";
                document.mail_box_set.submit();
           }
        }
}

function Checkaddbox()
{
         if(document.mail_box_set_1.box_name.value=="")
         {
            alert(LANGUAGE_121);
            //document.mail_box_set_1.box_name.focus;
            return false;
         }
        //document.ad_sort.submit();
        return true;
}

//检查增加邮箱

function addbox()
{
        if(!Checkaddbox())
        {
           return;
        }
        else
        {
             document.mail_box_set_1.operate.value="addbox";
             document.mail_box_set_1.submit();
        }
}

//搜索内容检查
function Chktxt()
{
        return true;
}

function msgsearch()
{
    if(!Chktxt()) return;
    else document.search.submit();
}


//取消函数
function checknone(f)
{
  for (var i=0;i<f.elements.length;i++)
    f.elements[i].checked = false;
}

//删除按钮检查
function checkone(f)
{
    for (var i=0;i<f.elements.length;i++)
    {
       if(f.elements[i].checked) return true;
    }
    alert(LANGUAGE_19);
    return false;
}

//全选函数
function CheckAll(f)
{
    for (var i=0;i<f.elements.length;i++)
    f.elements[i].checked = true;
}
//反选函数
function InvCheck(f)
{
  for (var i=0;i<f.elements.length;i++)
  {
     f.elements[i].checked = !f.elements[i].checked;
  }
}

function msgmanage()
{
    if(!checkone(document.manage)) return;
    else document.manage.submit();
}





           //函数名：fucCheckLength
            //功能介绍：检查字符串的长度
            //参数说明：要检查的字符串
            //返回值：长度值
            function fucCheckLength(strTemp)
            {
                var i,sum;
                sum=0;
                for(i=0;i<strTemp.length;i++)
                {
                    if ((strTemp.charCodeAt(i)>=0) && (strTemp.charCodeAt(i)<=255))
                        sum=sum+1;
                    else
                        sum=sum+2;
                }
                return sum;
            }

            //函数名：chkdate    (YYYY-MM-DD)
            //功能介绍：检查是否为日期
            //参数说明：要检查的字符串
            //返回值：0：不是日期  1：是日期
            function chkdate(datestr)
            {
                var lthdatestr
                if (datestr != "")
                    lthdatestr= datestr.length ;
                else
                    lthdatestr=0;

                var tmpy="";
                var tmpm="";
                var tmpd="";
                //var datestr;
                var status;
                status=0;
                if ( lthdatestr== 0)
                    return 0


                for (i=0;i<lthdatestr;i++)
                {    if (datestr.charAt(i)== '-')
                    {
                        status++;
                    }
                    if (status>2)
                    {
                       //alert("Invalid format of date!");
                        return 0;
                    }
                    if ((status==0) && (datestr.charAt(i)!='-'))
                    {
                        tmpy=tmpy+datestr.charAt(i)
                    }
                    if ((status==1) && (datestr.charAt(i)!='-'))
                    {
                        tmpm=tmpm+datestr.charAt(i)
                    }
                    if ((status==2) && (datestr.charAt(i)!='-'))
                    {
                        tmpd=tmpd+datestr.charAt(i)
                    }

                }
                year=new String (tmpy);
                month=new String (tmpm);
                day=new String (tmpd)
                //tempdate= new String (year+month+day);
                //alert(tempdate);
                if ((tmpy.length!=4) || (tmpm.length>2) || (tmpd.length>2))
                {
                    //alert("Invalid format of date!");
                    return 0;
                }
                if (!((1<=month) && (12>=month) && (31>=day) && (1<=day)) )
                {
                    //alert ("Invalid month or day!");
                    return 0;
                }
                if (!((year % 4)==0) && (month==2) && (day==29))
                {
                    //alert ("This is not a leap year!");
                    return 0;
                }
                if ((month<=7) && ((month % 2)==0) && (day>=31))
                {
                    //alert ("This month is a small month!");
                    return 0;

                }
                if ((month>=8) && ((month % 2)==1) && (day>=31))
                {
                    //alert ("This month is a small month!");
                    return 0;
                }
                if ((month==2) && (day==30))
                {
                    //alert("The Febryary never has this day!");
                    return 0;
                }

                return 1;
            }
            //函数名：chkemail
            //功能介绍：检查是否为Email Address
            //参数说明：要检查的字符串
            //返回值：0：不是  1：是
            function chkemail(a)
            {    var i=a.length;
                var temp = a.indexOf('@');
                var tempd = a.indexOf('.');
                if (temp > 1) {
                    if ((i-temp) > 3){
                            if (tempd!=-1){
                                return 1;
                            }

                    }
                }
                return 0;
            }
            //函数名：fucCheckNUM
            //功能介绍：检查是否为数字
            //参数说明：要检查的数字
            //返回值：1为是数字，0为不是数字
            function fucCheckNUM(NUM)
            {
                var i,j,strTemp;
                strTemp="0123456789";
                if ( NUM.length== 0)
                    return 0
                for (i=0;i<NUM.length;i++)
                {
                    j=strTemp.indexOf(NUM.charAt(i));
                    if (j==-1)
                    {
                    //说明有字符不是数字
                        return 0;
                    }
                }
                //说明是数字
                return 1;
            }
            //函数名：fucCheckTEL
            //功能介绍：检查是否为电话号码
            //参数说明：要检查的字符串
            //返回值：1为是合法，0为不合法
            function fucCheckTEL(TEL)
            {
                var i,j,strTemp;
                strTemp="0123456789-()# ";
                for (i=0;i<TEL.length;i++)
                {
                    j=strTemp.indexOf(TEL.charAt(i));
                    if (j==-1)
                    {
                    //说明有字符不合法
                        return 0;
                    }
                }
                //说明合法
                return 1;
            }

//函数名：fucChecktwopass
//功能介绍：检查是否为电话号码
//参数说明：要检查的字符串
//返回值：1为是合法，0为不合法
function fucChecktwopass(PAS1, PAS2)
{
    if (PAS1 != PAS2)
           return 0;
    return 1;
}
//函数名：fucOneCheck
//功能介绍：检查是否有选中
//参数说明：表单名和字段串
//返回值：1为是有，0为没

function fucOneCheck(f,chkStr)
{
    var flag=0;
    for (var i=0;i<f.elements.length;i++)
    {
         if(f.elements[i].name.indexOf(chkStr) == 0 && f.elements[i].checked)
         {
              flag = 1;
               break;
         }
    }
    if(flag == 0)
             return 0;

    return 1;
}




//列表框排序用
function mysubmit(form)
{
with(form){
        selectValue.value=''
        for(i=1;i<s1.length;i++)
                selectValue.value+=s1.options[i].value+','
        }
}

function moveUp(obj)
{
with (obj){
        if(selectedIndex==1){
                options[length]=new Option(options[1].text,options[1].value)
                options[1]=null
                selectedIndex=length-1
                }
        else if(selectedIndex>1) moveG(obj,-1)
        }
}

function moveDown(obj)
{
with (obj){
        if(selectedIndex==length-1){
                var otext=options[selectedIndex].text
                var ovalue=options[selectedIndex].value
                for(i=selectedIndex; i>1; i--){
                        options[i].text=options[i-1].text
                        options[i].value=options[i-1].value
                        }
                options[i].text=otext
                options[i].value=ovalue
                selectedIndex=1
                }
        else if(selectedIndex>0 && selectedIndex<length-1) moveG(obj,+1)
        }
}

function moveG(obj,offset)
{
with (obj){
        desIndex=selectedIndex+offset
        var otext=options[desIndex].text
        var ovalue=options[desIndex].value
        options[desIndex].text=options[selectedIndex].text
        options[desIndex].value=options[selectedIndex].value
        options[selectedIndex].text=otext
        options[selectedIndex].value=ovalue
        selectedIndex=desIndex
        }
}


//两个列表框选择
function mysubmit1(form,verb)
{
    with(form){
        v.value=verb;
        selectValue.value=''
        for(i=1; i<s2.length; i++)
            selectValue.value+=s2.options[i].value+','
    }
    return true;
}

function selectContent(src,des)
{
    var oindex=src.selectedIndex;
    var olength=des.length;
    if(oindex>0){
        var otext=src.options[oindex].text;
        var ovalue=src.options[oindex].value;
        if(ovalue=="0") return;
        var tag=0
        for(i=0; i<olength; i++){
                if(otext==des.options[i].text) {tag=1; break;}
                }
        if(tag==0) {
                src.options[oindex]=null;
                des.options[olength]=new Option(otext,olength);
                des.options[olength].value=ovalue;
                src.selectedIndex=-1;
                }
        if(!setup) setup=true;
        }
}

function insertNew(obj)
{
        for(var i=0;i<document.shezhi.s1.length;i++)
        {
                if(document.shezhi.s1.options[i].value==obj)
                {
                        document.shezhi.s1.options[i].selected=true;
                        selectContent(document.shezhi.s1,document.shezhi.s2);
                        return false;
                }
        }
        alert(LANGUAGE_20);
        return false;
}



function search()
{
    document.search.search_flag.value="search";
    document.search.submit();
}


function Checkedit_box()
{
        if (document.edit_box.box_name.value=="")
                {alert(LANGUAGE_21);return false;}
        return true;
}

function edit_box()
{
        if(!Checkedit_box())
        {
           return;
        }
        else
        {
          document.edit_box.submit();
        }
}

function Checkedit_domain()
{
        if (document.edit_domain.domains.value=="")
                {alert(LANGUAGE_22);return false;}
        if (document.edit_domain.maxuser.value=="")
                {alert(LANGUAGE_105);return false;}
        if (document.edit_domain.maxspace.value=="")
                {alert(LANGUAGE_106);return false;}
        if (document.edit_domain.passwd.value=="")
                {alert(LANGUAGE_107);return false;}
        if (document.edit_domain.mailbox_size.value=="")
                {alert(LANGUAGE_108);return false;}
        return true;
}

function edit_domain()
{
        if(!Checkedit_domain())
        {
           return;
        }
        else
        {
          document.edit_domain.operate.value="update";
          document.edit_domain.submit();
        }
}

function delclass()
{
        if(!checkone(document.mail_class))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_23)) {
                document.mail_class.operate.value="delete";
                document.mail_class.submit();
           }
        }
}



function del_refuse_mail_all ()
{
        if(!checkone(document.refuse_mail_all))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_24)) {
                document.refuse_mail_all.operate.value="delete";
                document.refuse_mail_all.submit();
           }
        }
}

function estop_refuse_mail_all ()
{
        if(!checkone(document.refuse_mail_all))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_25)) {
                document.refuse_mail_all.operate.value="estop";
                document.refuse_mail_all.submit();
           }
        }
}

function start_refuse_mail_all ()
{
        if(!checkone(document.refuse_mail_all))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_26)) {
                document.refuse_mail_all.operate.value="start";
                document.refuse_mail_all.submit();
           }
        }
}

function Checkadd_class()
{
        //if (document.add_class.sender_txt.value=="" && document.add_class.recv_txt.value=="" && document.add_class.subject_txt.value=="" && document.add_class.body_txt.value=="")
        if (document.add_class.sender_txt.value=="" && document.add_class.recv_txt.value=="" && document.add_class.subject_txt.value=="")
        {
           alert(LANGUAGE_28);
           document.add_class.sender_txt.focus();
            return false;
        }
        return true;
}

function add_class()
{
        if(!Checkadd_class())
        {
           return;
        }
        else
        {

          document.add_class.operate.value="insert";
          document.add_class.submit();
        }
}




function Checkedit_class()
{
        //if (document.edit_class.sender_txt.value=="" && document.edit_class.recv_txt.value=="" && document.edit_class.subject_txt.value=="" && document.edit_class.body_txt.value=="")
        if (document.edit_class.sender_txt.value=="" && document.edit_class.recv_txt.value=="" && document.edit_class.subject_txt.value=="")
        {
           alert(LANGUAGE_28);
           document.edit_class.sender_txt.focus();
            return false;
        }
        return true;
}

function edit_class()
{
        if(!Checkedit_class())
        {
           return;
        }
        else
        {

          document.edit_class.operate.value="update";
          document.edit_class.submit();
        }
}



function Checkrefuse_mail_all()
{
        if (document.refuse_mail_all.sender_txt.value=="" && document.refuse_mail_all.recv_txt.value=="" && document.refuse_mail_all.subject_txt.value=="")
        {
           alert(LANGUAGE_28);
           document.refuse_mail_all.sender_txt.focus();
            return false;
        }
        return true;
}

function add_refuse_mail_all()
{
        if(!Checkrefuse_mail_all())
        {
           return;
        }
        else
        {

          document.refuse_mail_all.operate.value="insert";
          document.refuse_mail_all.submit();
        }
}




function Checkedit_refuse_mail_all()
{
        if (document.refuse_mail_all.sender_txt.value=="" && document.refuse_mail_all.recv_txt.value=="" && document.refuse_mail_all.subject_txt.value=="")
        {
           alert(LANGUAGE_28);
           document.refuse_mail_all.sender_txt.focus();
            return false;
        }
        return true;
}

function edit_refuse_mail_all()
{
        if(!Checkedit_refuse_mail_all())
        {
           return;
        }
        else
        {

          document.refuse_mail_all.operate.value="update";
          document.refuse_mail_all.submit();
        }
}



function Checkrefuse_mail()
{
        if (document.refuse_mail.mail.value=="")
        {
           alert(LANGUAGE_29);
           document.refuse_mail.mail.focus();
           return false;
        }
        return true;
}

function add_refuse_mail()
{
        if(!Checkrefuse_mail())
        {
           return;
        }
        else
        {
          document.refuse_mail.operate.value="add_refuse_mail";
          document.refuse_mail.submit();
        }
}
function edit_refuse_mail()
{
        if(!Checkrefuse_mail())
        {
           return;
        }
        else
        {
          document.refuse_mail.operate.value="edit_refuse_mail";
          document.refuse_mail.submit();
        }
}


function Checkauto_transmit()
{
        /*
        if (document.auto_transmit.email.value=="")
        {
           alert(LANGUAGE_30);
           document.auto_transmit.email.focus();
           return false;
        }
        */
        return true;
}

function add_auto_transmit()
{
        if(!Checkauto_transmit())
        {
           return;
        }
        else
        {
          document.auto_transmit.submit();
        }
}


function Checkedit_user()
{
    if (document.edit_user.passwd.value.length<3)
        {alert(LANGUAGE_2); return false;}
    if (document.edit_user.passwd.value.length>20)
        {alert(LANGUAGE_114); return false;}
    if (document.edit_user.name.value=="")
        {alert(LANGUAGE_8);return false;}
    if (document.edit_user.question.value=="")
        {alert(LANGUAGE_6);return false;}
    if (document.edit_user.answer.value=="")
        {alert(LANGUAGE_7);return false;}
    if (document.edit_user.email.value=="")
        {alert(LANGUAGE_9);return false;}
    if (document.edit_user.mailbox_size.value=="")
        {alert(LANGUAGE_10);return false;}
    if (fucCheckNUM(document.edit_user.mailbox_size.value)==0)
        {alert(LANGUAGE_11);return false;}

    return true;
   /*
        if (document.edit_user.name.value=="")
        {
           alert('请输入中文名');
           document.edit_user.name.focus();
           return false;
        }
        return true;
        */
}

function edituser()
{
        if(!Checkedit_user())
        {
           return;
        }
        else
        {
          document.edit_user.submit();
        }
}


function checkPassWordLevel(o) {
   var n=0;
   if (/\d/.test(o.value)) n ++;//包含数字
   if (/[a-z]/.test(o.value)) n ++;//包含小写字母
   if (/[A-Z]/.test(o.value)) n ++;//包含大写字母
   if (/\W/.test(o.value)) n ++;//包含其他字符
   if (o.value.length<6) n=1;//长度小于5位
   return n;
}



function Checkedit_passwd()
{
        if (document.edit_password.passwd_old.value=="")
        {
           alert(LANGUAGE_31);
           return false;
        }
        if (document.edit_password.new_passwd.value=="")
        {
           alert(LANGUAGE_31);
           return false;
        }
        if (document.edit_password.new_passwd_re.value=="")
        {
           alert(LANGUAGE_31);
           return false;
        }

        if(document.edit_password.passwd_old.value==document.edit_password.new_passwd_re.value)
        {
           alert(LANGUAGE_225);
           return false;
        }
        
        if(checkPassWordLevel(document.edit_password.new_passwd)<=1)
        {
           alert(LANGUAGE_226);
           return false;
        
        }


        if(document.edit_password.new_passwd.value!=document.edit_password.new_passwd_re.value){
           alert(LANGUAGE_32);
           return false;
        }
        return true;
}

function edit_passwd()
{
        if(!Checkedit_passwd())
        {
           return;
        }
        else
        {
          document.edit_password.submit();
        }
}

function Checksign()
{
        return true;
}

function sign_s()
{
        if(!Checksign())
        {
           return;
        }
        else
        {
          document.sign_s.submit();
        }
}


function del_user()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_33)) {
                document.user_adm.operate.value="del_user";
                document.user_adm.submit();
           }
        }
}


function pop3_1()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_34)) {
                document.user_adm.operate.value="pop3_1";
                document.user_adm.submit();
           }
        }
}

function pop3_2()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_35)) {
                document.user_adm.operate.value="pop3_2";
                document.user_adm.submit();
           }
        }
}
function user_1()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_36)) {
                document.user_adm.operate.value="user_1";
                document.user_adm.submit();
           }
        }
}

function user_2()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_37)) {
                document.user_adm.operate.value="user_2";
                document.user_adm.submit();
           }
        }
}

function del_ym()
{
        //alert("sdfd");

        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_38)) {
                document.user_adm.operate.value="delete";
                document.user_adm.submit();
           }
        }

}


function add_ym()
{
        if(document.user_adm.domains.value=="")
        {
            alert(LANGUAGE_39);
        }
        else
        {
            document.user_adm.operate.value="insert";
            document.user_adm.submit();
        }
}

   function userInfoWin(url) {
       var mywin = window.open(url, "userInfoForm", "RESIZABLE=yes, SCROLLBARS=yes, WIDTH=650, HEIGHT=500, TOOLBAR=yes");
       mywin.window.focus();
   }



function del_register_manage()
{
        if(!checkone(document.register_manage))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_40)) {
                document.register_manage.operate.value="del";
                document.register_manage.submit();
           }
        }
}
function register_manage_ok()
{
        if(!checkone(document.register_manage))
        {
        return;
        }
        else
        {
             document.register_manage.operate.value="register";
             document.register_manage.submit();
        }
}

function save_conf()
{
         document.adm_conf.submit();
}


function read_messages(fname)
{
         window.open(fname,'','top=20,left=15,width=600,height=450,scrollbars=yes,resizable=no,status=no,toolbar=no');
}



function delad()
{
        if(!checkone(document.address_sort))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_41)) {
                document.address_sort.operate.value="del";
                document.address_sort.submit();
           }
        }
}

function backup_address()
{
        if(!checkone(document.address_sort))
        {
        return;
        }
        else
        {
              document.address_sort.operate.value="backup";
              document.address_sort.submit();
        }
}

function Checkad_sort()
{
         if(document.ad_sort.ad_name.value=="")
         {
            alert(LANGUAGE_42);
            return false;
         }
         //document.ad_sort.submit();
        return true;
}


function add_ad_sort()
{
        if(!Checkad_sort())
        {
           return;
        }
        else
        {
          document.ad_sort.operate.value="add";
          document.ad_sort.submit();
        }
}


function Checkedit_address_sort()
{
        if (document.edit_address_sort.ad_name.value=="")
                {alert(LANGUAGE_42);return false;}
        return true;
}

function edit_address_sort()
{
        if(!Checkedit_address_sort())
        {
           return;
        }
        else
        {
          document.edit_address_sort.submit();
        }
}


function Checkedit_message()
{
        if (document.edit_message.subject.value=="")
                {alert(LANGUAGE_43);return false;}
        if (document.edit_message.content.value=="")
                {alert(LANGUAGE_44);return false;}

        return true;
}

function edit_message()
{
        if(!Checkedit_message())
        {
           return;
        }
        else
        {
          document.edit_message.submit();
        }
}

function Checkedit_ads()
{
        if (document.edit_ads.ad_content.value=="")
                {alert(LANGUAGE_44);return false;}

        return true;
}

function edit_ads()
{
        if(!Checkedit_ads())
        {
           return;
        }
        else
        {
          document.edit_ads.submit();
        }
}

function Checkadd_address()
{
        if (document.add_address.name.value=="")
                {alert(LANGUAGE_45);return false;}
        if (document.add_address.email.value=="")
                {alert(LANGUAGE_46);return false;}

        return true;
}

function add_address()
{
        if(!Checkadd_address())
        {
           return;
        }
        else
        {
          document.add_address.operate.value="insert";
          document.add_address.submit();
        }
}
function Checkedit_address()
{
        if (document.edit_address.name.value=="")
                {alert(LANGUAGE_45);return false;}
        if (document.edit_address.email.value=="")
                {alert(LANGUAGE_46);return false;}

        return true;
}

function edit_address()
{
        if(!Checkedit_address())
        {
           return;
        }
        else
        {
          document.edit_address.operate.value="update";
          document.edit_address.submit();
        }
}

function address_go()
{
          //alert("sdf");
          document.addressgo.submit();
}


function Checkadd_message()
{
        if (document.message.subject.value=="")
                {alert(LANGUAGE_43);return false;}
        if (document.message.content.value=="")
                {alert(LANGUAGE_44);return false;}

        return true;
}

function add_message()
{
        if(!Checkadd_message())
        {
           return;
        }
        else
        {
          document.message.submit();
        }
}
function Checkadd_ads()
{
        if (document.ads.ad_content.value=="")
                {alert(LANGUAGE_44);return false;}

        return true;
}

function add_ads()
{
        if(!Checkadd_ads())
        {
           return;
        }
        else
        {
          document.ads.submit();
        }
}

function Checkadd_write_back()
{

        if(document.auto_write_back.state.checked){
            if (document.auto_write_back.subject.value=="")
                    {alert(LANGUAGE_47);return false;}

        }

        //if (document.auto_write_back.body.value=="")
        //        {alert(LANGUAGE_48);return false;}

        return true;
}

function add_auto_write_back()
{
        if(!Checkadd_write_back())
        {
           return;
        }
        else
        {
          document.auto_write_back.submit();
        }
}


function backup_in()
{
         document.backup.operate.value="resume";
          document.backup.submit();
}


function delpop3()
{
        if(!checkone(document.mail_pop3_set))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_49)) {
                document.mail_pop3_set.operate.value="delpop3";
                document.mail_pop3_set.submit();
           }
        }
}


function Checkadd_mail_pop3()
{
        if (document.add_mail_pop3.pop3.value=="")
        {
           alert(LANGUAGE_50);
           return false;
        }
        if (document.add_mail_pop3.user.value=="")
        {
           alert(LANGUAGE_51);
           return false;
        }
        if (document.add_mail_pop3.passwd.value=="")
        {
           alert(LANGUAGE_52);
           return false;
        }
        if (document.add_mail_pop3.del.value=="")
        {
           alert(LANGUAGE_53);
           return false;
        }
        if (document.add_mail_pop3.f_id.value=="")
        {
           alert(LANGUAGE_54);
           return false;
        }
        return true;
}

function add_mail_pop3()
{
        if(!Checkadd_mail_pop3())
        {
           return;
        }
        else
        {
          document.add_mail_pop3.operate.value="insert";
          document.add_mail_pop3.submit();
        }
}
function Checkedit_mail_pop3()
{
        if (document.edit_mail_pop3.pop3.value=="")
        {
           alert(LANGUAGE_50);
           return false;
        }
        if (document.edit_mail_pop3.user.value=="")
        {
           alert(LANGUAGE_51);
           return false;
        }
        if (document.edit_mail_pop3.passwd.value=="")
        {
           alert(LANGUAGE_52);
           return false;
        }
        if (document.edit_mail_pop3.del.value=="")
        {
           alert(LANGUAGE_53);
           return false;
        }
        if (document.edit_mail_pop3.f_id.value=="")
        {
           alert(LANGUAGE_54);
           return false;
        }
        return true;
}

function edit_mail_pop3()
{
        if(!Checkedit_mail_pop3())
        {
           return;
        }
        else
        {
          document.edit_mail_pop3.operate.value="update";
          document.edit_mail_pop3.submit();
        }
}

function qypop3()
{
        if(!checkone(document.mail_pop3_set))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_55)) {
                document.mail_pop3_set.operate.value="qypop3";
                document.mail_pop3_set.submit();
           }
        }
}
function jypop3()
{
        if(!checkone(document.mail_pop3_set))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_56)) {
                document.mail_pop3_set.operate.value="jypop3";
                document.mail_pop3_set.submit();
           }
        }

}

function Checkwebmail_reg()
{
        if (document.webmail_reg.company.value=="")
                {alert(LANGUAGE_57);return false;}
        if (document.webmail_reg.reg_count.value=="")
                {alert(LANGUAGE_58);return false;}
        if (document.webmail_reg.sn.value=="")
                {alert(LANGUAGE_59);return false;}

        return true;
}

function webmail_reg()
{
        if(!Checkwebmail_reg())
        {
           return;
        }
        else
        {
          document.webmail_reg.submit();
        }
}

function start_refuse_mail()
{
        if(!checkone(document.refuse_mail))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_60)) {
                document.refuse_mail.operate.value="start";
                document.refuse_mail.submit();
           }
        }
}
function stop_refuse_mail()
{
        if(!checkone(document.refuse_mail))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_61)) {
                document.refuse_mail.operate.value="stop";
                document.refuse_mail.submit();
           }
        }
}

function Checkget_passwd()
{
    if (document.get_passwd.user.value=="")
        {alert(LANGUAGE_62); return false;}
    //if (document.get_passwd.question.value=="")
    //    {alert("请输入取回密码问题");return false;}
    //if (document.get_passwd.answer.value=="")
    //    {alert("请输入取回密码回答");return false;}
    //if (document.get_passwd.name.value=="")
    //    {alert("请输入电子邮件");return false;}
    return true;
}

function get_passwd()
{
        if(!Checkget_passwd())
        {
           return;
        }
        else
        {
          document.get_passwd.submit();
        }
}

function Checkget_passwd_1()
{
    if (document.get_passwd_1.user.value=="")
        {alert(LANGUAGE_62); return false;}
    if (document.get_passwd_1.question.value=="")
        {alert(LANGUAGE_63);return false;}
    if (document.get_passwd_1.answer.value=="")
        {alert(LANGUAGE_64);return false;}
    if (document.get_passwd_1.name.value=="")
        {alert(LANGUAGE_65);return false;}
    return true;
}

function get_passwd_1()
{
        if(!Checkget_passwd_1())
        {
           return;
        }
        else
        {
          document.get_passwd_1.submit();
        }
}


function checkuser()
{
    document.adduser.action='../prog/check_user.php';
    document.adduser.submit();
}


function add_manage_background()
{
        flag=2;
        if(document.manage_background.ba_name.value=="")
        {
            alert(LANGUAGE_66);
            flag=1;
            //return false;
        }
        if(document.manage_background.ba_url.value=="")
        {
            alert(LANGUAGE_67);
            flag=1;
            //return false;
        }
        if(flag==2){
            document.manage_background.operate.value="insert";
            document.manage_background.submit();
        }
}

function del_manage_background()
{
        if(!checkone(document.manage_background))
        {
        return;
        }
        else
        {
              document.manage_background.operate.value="delete";
              document.manage_background.submit();
        }

}

function edit_manage_background()
{
        flag=2;
        if(document.manage_background.ba_name.value=="")
        {
            alert(LANGUAGE_66);
            flag=1;
            //return false;
        }
        if(flag==2){
            document.manage_background.operate.value="update";
            document.manage_background.submit();
        }
}

function add_folder()
{
        flag=2;
        if(document.tform.pe_name.value=="")
        {
            alert(LANGUAGE_68);
            flag=1;
            //return false;
        }
        if(flag==2){
            document.tform.cmd.value="insert_folder";
            document.tform.submit();
        }
}
function search_document()
{
    document.tform.cmd.value="search";
    document.tform.action="../prog/filemgr.php"
    document.tform.submit();
}


function document_mailCompose() {

     if(!checkone(document.tform))
     {
     return;
     }
     else
     {
            document.tform.state.value = "document_compose";
            document.tform.action="../prog/composer.php"
            document.tform.submit();
     }
}



function document_fileDel() {

     if(!checkone(document.tform))
     {
     return;
     }
     else
     {
          if(confirm(LANGUAGE_69)) {
          //if(confirm("确实要删除吗?")) {
              document.tform.cmd.value = "delete";
              document.tform.submit();
          }
     }
}


function document_fileDelAll() {
    CheckAll(tform);
    if(confirm(LANGUAGE_70)) {
        document.tform.cmd.value = "deleteall";
        document.tform.submit();
    }
}


function document_fileCopy() {
     if(!checkone(document.tform))
     {
     return;
     }
     else
     {
          if(confirm(LANGUAGE_71)) {
              document.tform.cmd.value = "copy";
              document.tform.submit();
          }
     }
 }


function document_fileMove() {
     if(!checkone(document.tform))
     {
     return;
     }
     else
     {
          if(confirm(LANGUAGE_72)) {
              document.tform.cmd.value = "move";
              document.tform.submit();
          }
     }
}

function Checkaddstyle()
{
    if (document.form1.sy_name.value=="")
        {alert(LANGUAGE_73);return false;}
    if (document.form1.sy_author.value=="")
        {alert(LANGUAGE_74); return false;}
    if (document.form1.sy_email.value=="")
        {alert(LANGUAGE_75); return false;}
    if (document.form1.sy_homepage.value=="")
        {alert(LANGUAGE_76);return false;}
    return true;
}

function addstyle()
{
    if(!Checkaddstyle()) {
         return;
    }
    else {
         document.form1.operate.value="add";
         document.form1.submit();
    }
}


function style_1()
{
        if(!checkone(document.operate_style))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_77)) {
                document.operate_style.operate.value="estop";
                document.operate_style.submit();
           }
        }
}

function style_2()
{
        if(!checkone(document.operate_style))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_78)) {
                document.operate_style.operate.value="start";
                document.operate_style.submit();
           }
        }
}

function del_style()
{
        //alert("sdfd");

        if(!checkone(document.operate_style))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_79)) {
                document.operate_style.operate.value="delete";
                document.operate_style.submit();
           }
        }

}

function Checkeditstyle()
{
    if (document.form1.sy_name.value=="")
        {alert(LANGUAGE_73);return false;}
    if (document.form1.sy_author.value=="")
        {alert(LANGUAGE_74); return false;}
    if (document.form1.sy_email.value=="")
        {alert(LANGUAGE_75); return false;}
    if (document.form1.sy_homepage.value=="")
        {alert(LANGUAGE_76);return false;}
    return true;
}

function editstyle()
{
    if(!Checkeditstyle()) {
         return;
    }
    else {
         document.form1.operate.value="update";
         document.form1.submit();
    }
}
function save_user_conf()
{
         document.user_conf.submit();
}



function SendMail_To_User()
{
       document.SendMailToUser.action = "../prog/do_manage_sendmail_to_user.php";
       document.SendMailToUser.submit();
}


function del_login_log()
{
        if(!checkone(document.operate_log))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_80)) {
                document.operate_log.operate.value="delete";
                document.operate_log.submit();
           }
        }

}

function del_login_log_all()
{
       document.operate_log.operate.value="deleteall";
       document.operate_log.submit();
}


function add_top_ads()
{
        flag=2;
        if(document.manage_top_ads.to_name.value=="")
        {
            alert(LANGUAGE_81);
            flag=1;
            //return false;
        }
        if(document.manage_top_ads.to_url.value=="")
        {
            alert(LANGUAGE_82);
            flag=1;
            //return false;
        }
        if(document.manage_top_ads.to_width.value=="")
        {
            alert(LANGUAGE_83);
            flag=1;
            //return false;
        }
        if(document.manage_top_ads.to_height.value=="")
        {
            alert(LANGUAGE_84);
            flag=1;
            //return false;
        }
        if(document.manage_top_ads.to_pic.value=="")
        {
            alert(LANGUAGE_85);
            flag=1;
            //return false;
        }

        if(flag==2){
            document.manage_top_ads.operate.value="insert";
            document.manage_top_ads.submit();
        }
}

function del_top_ads()
{
        if(!checkone(document.manage_top_ads))
        {
        return;
        }
        else
        {
              document.manage_top_ads.operate.value="delete";
              document.manage_top_ads.submit();
        }

}

function edit_top_ads()
{
        flag=2;
        if(document.manage_top_ads.to_name.value=="")
        {
            alert(LANGUAGE_81);
            flag=1;
            //return false;
        }
        if(document.manage_top_ads.to_url.value=="")
        {
            alert(LANGUAGE_82);
            flag=1;
            //return false;
        }
        if(document.manage_top_ads.to_width.value=="")
        {
            alert(LANGUAGE_83);
            flag=1;
            //return false;
        }
        if(document.manage_top_ads.to_height.value=="")
        {
            alert(LANGUAGE_84);
            flag=1;
            //return false;
        }
        if(flag==2){
            document.manage_top_ads.operate.value="update";
            document.manage_top_ads.submit();
        }
}



function Checkedit_doc()
{
        if (document.edit_doc.pe_name.value=="")
                {alert(LANGUAGE_86);return false;}
        return true;
}

function edit_doc()
{
        if(!Checkedit_doc())
        {
           return;
        }
        else
        {
          document.edit_doc.cmd.value="update";
          document.edit_doc.submit();
        }
}

function del_alias()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_87)) {
                document.user_adm.operate.value="del_alias";
                document.user_adm.submit();
           }
        }
}


function alias_1()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_88)) {
                document.user_adm.operate.value="alias_1";
                document.user_adm.submit();
           }
        }
}

function alias_2()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_89)) {
                document.user_adm.operate.value="alias_2";
                document.user_adm.submit();
           }
        }
}

function Checkedit_alias()
{
        if (document.edit_alias.alias.value=="")
                {alert(LANGUAGE_90);return false;}
        return true;
}

function edit_alias()
{
        if(!Checkedit_alias())
        {
           return;
        }
        else
        {
          document.edit_alias.operate.value="alias_update";
          document.edit_alias.submit();
        }
}

function Checkadd_alias()
{
        if (document.add_alias.alias.value=="")
                {alert(LANGUAGE_90);return false;}
        return true;
}

function add_alias()
{
        if(!Checkadd_alias())
        {
           return;
        }
        else
        {
          document.add_alias.operate.value="alias_add";
          document.add_alias.submit();
        }
}

function del_mail_list()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_91)) {
                document.user_adm.operate.value="del_mail_list";
                document.user_adm.submit();
           }
        }
}


function mail_list_1()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_92)) {
                document.user_adm.operate.value="mail_list_1";
                document.user_adm.submit();
           }
        }
}

function mail_list_2()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_93)) {
                document.user_adm.operate.value="mail_list_2";
                document.user_adm.submit();
           }
        }
}

function pub_mail_list()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_94)) {
                document.user_adm.operate.value="pub_mail_list";
                document.user_adm.submit();
           }
        }
}

function nopub_mail_list()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_95)) {
                document.user_adm.operate.value="nopub_mail_list";
                document.user_adm.submit();
           }
        }
}

function Checkadd_mail_list()
{
        if (document.add_mail_list.ma_uid.value=="")
                {alert(LANGUAGE_96);return false;}
        return true;
}

function add_mail_list()
{
        if(!Checkadd_mail_list())
        {
           return;
        }
        else
        {
          document.add_mail_list.operate.value="mail_list_add";
          document.add_mail_list.submit();
        }
}

function Checkedit_mail_list()
{
        if (document.edit_mail_list.ma_uid.value=="")
                {alert(LANGUAGE_96);return false;}
        return true;
}

function edit_mail_list()
{
        if(!Checkedit_mail_list())
        {
           return;
        }
        else
        {
          document.edit_mail_list.operate.value="mail_list_update";
          document.edit_mail_list.submit();
        }
}



function del_mail_list_member()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_97)) {
                document.user_adm.operate.value="del_mail_list_member";
                document.user_adm.submit();
           }
        }
}


function mail_list_member_1()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_98)) {
                document.user_adm.operate.value="mail_list_member_1";
                document.user_adm.submit();
           }
        }
}

function mail_list_member_2()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_99)) {
                document.user_adm.operate.value="mail_list_member_2";
                document.user_adm.submit();
           }
        }
}

function adm_mail_list_member_1()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_100)) {
                document.user_adm.operate.value="adm_mail_list_member_1";
                document.user_adm.submit();
           }
        }
}

function adm_mail_list_member_2()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_101)) {
                document.user_adm.operate.value="adm_mail_list_member_2";
                document.user_adm.submit();
           }
        }
}

function add_mail_list_member()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
            document.user_adm.operate.value="add_mail_list_member";
            document.user_adm.submit();
        }
}

function Checkadd_member()
{
        if (document.add_member.li_email.value=="")
                {alert(LANGUAGE_102);return false;}
        return true;
}

function add_member()
{
        if(!Checkadd_member())
        {
           return;
        }
        else
        {
          document.add_member.operate.value="add_mail_list_member_1";
          document.add_member.submit();
        }
}


function add_member_2()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
            document.user_adm.operate.value="add_mail_list_member_2";
            document.user_adm.submit();
        }
}

function Checkset_system_conf()
{
        //if (document.add_member.li_email.value=="")
        //        {alert(LANGUAGE_102);return false;}
        return true;
}

function set_system_conf()
{
        if(!Checkset_system_conf())
        {
           return;
        }
        else
        {
          document.manage_system_conf.submit();
        }
}

function user_3()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_103)) {
                document.user_adm.operate.value="user_3";
                document.user_adm.submit();
           }
        }
}

function Checkadd_domain()
{
        if (document.add_domain.domains.value=="")
                {alert(LANGUAGE_104);return false;}
        if (document.add_domain.maxuser.value=="")
                {alert(LANGUAGE_105);return false;}
        if (document.add_domain.maxspace.value=="")
                {alert(LANGUAGE_106);return false;}
        if (document.add_domain.passwd.value=="")
                {alert(LANGUAGE_107);return false;}
        if (document.add_domain.mailbox_size.value=="")
                {alert(LANGUAGE_108);return false;}
        return true;
}

function add_domain()
{
        if(!Checkadd_domain())
        {
           return;
        }
        else
        {
          document.add_domain.operate.value="insert";
          document.add_domain.submit();
        }
}


function domain_start()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_109)) {
                document.user_adm.operate.value="start";
                document.user_adm.submit();
           }
        }

}

function domain_estop()
{
        //alert("sdfd");

        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_110)) {
                document.user_adm.operate.value="estop";
                document.user_adm.submit();
           }
        }

}

function startclass()
{
        if(!checkone(document.mail_class))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_111)) {
                document.mail_class.operate.value="start";
                document.mail_class.submit();
           }
        }
}
function stopclass()
{
        if(!checkone(document.mail_class))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_112)) {
                document.mail_class.operate.value="stop";
                document.mail_class.submit();
           }
        }
}



function Checkedit_system_default_user()
{
        if (document.edit_system_default_user.system_default_user_1.value=="")
                {alert(LANGUAGE_122);return false;}

        return true;
}

function edit_system_default_user()
{
        if(!Checkedit_system_default_user())
        {
           return;
        }
        else
        {
          document.edit_system_default_user.submit();
        }
}

function Checkadd_system_default_user()
{
        if (document.system_default_user.system_default_user_1.value=="")
                {alert(LANGUAGE_122);return false;}

        return true;
}

function add_system_default_user()
{
        if(!Checkadd_system_default_user())
        {
           return;
        }
        else
        {
          document.system_default_user.submit();
        }
}

function style_3()
{
        if(!checkone(document.operate_style))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_123)) {
                document.operate_style.operate.value="default";
                document.operate_style.submit();
           }
        }
}

//列表框排序用
function moveUpDown(form)
{
    with(form){
        selectValue.value='';
        for(i=1;i<s1.length;i++)
            selectValue.value+=s1.options[i].value+',';
         //alert(selectValue.value);
   }
    form.submit();
}

function moveUp(obj)
{
    with (obj){
        if(selectedIndex==1){
                options[length]=new Option(options[1].text,options[1].value)
                options[1]=null
                selectedIndex=length-1
                }
        else if(selectedIndex>1) moveG(obj,-1)

    }

}


function moveDown(obj)
{
    with (obj){
        if(selectedIndex==length-1){
                var otext=options[selectedIndex].text
                var ovalue=options[selectedIndex].value
                for(i=selectedIndex; i>1; i--){
                        options[i].text=options[i-1].text
                        options[i].value=options[i-1].value
                        }
                options[i].text=otext
                options[i].value=ovalue
                selectedIndex=1
                }
        else if(selectedIndex>0 && selectedIndex<length-1) moveG(obj,+1)
    }
}

function moveG(obj,offset)
{
    with (obj){
        desIndex=selectedIndex+offset
        var otext=options[desIndex].text
        var ovalue=options[desIndex].value
        options[desIndex].text=options[selectedIndex].text
        options[desIndex].value=options[selectedIndex].value
        options[selectedIndex].text=otext
        options[selectedIndex].value=ovalue
        selectedIndex=desIndex
    }
}

//检查删除所有邮件-不放入垃圾箱
function delmailall_1()
{
        if(!checkone(document.do_mail_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_231)) {
              document.do_mail_operate.operate.value="delallmail";
              document.do_mail_operate.submit();
            }
        }
}

function refusemail()
{
       do_mail_operate.operate.value="refusemail";
       document.do_mail_operate.submit();
}

function Checkadd_monitor_usermail()
{
        if (document.user_adm.mailtransmit.value=="")
                {alert(LANGUAGE_1221);return false;}

        return true;
}

function add_monitor_usermail1()
{
        if(!Checkadd_monitor_usermail1())
        {
           return;
        }
        else
        {
          document.user_adm.operate.value="monitor_usermail_add";
          document.user_adm.submit();
        }
}

function Checkadd_monitor_usermail1()
{
        if (document.user_adm.mailtransmit.value=="")
                {alert(LANGUAGE_1221);return false;}

        if (document.user_adm.mo_saveemail.value=="")
                {alert(LANGUAGE_151);return false;}

        return true;
}


function add_monitor_usermail()
{
        if(!Checkadd_monitor_usermail())
        {
           return;
        }
        else
        {
          document.user_adm.operate.value="monitor_usermail_add";
          document.user_adm.submit();
        }
}



function monitor_usermail_1()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_1231)) {
                document.user_adm.operate.value="monitor_usermail_1";
                document.user_adm.submit();
           }
        }
}

function monitor_usermail_2()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_124)) {
                document.user_adm.operate.value="monitor_usermail_2";
                document.user_adm.submit();
           }
        }
}

function del_monitor_usermail()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_125)) {
                document.user_adm.operate.value="del_monitor_usermail";
                document.user_adm.submit();
           }
        }
}

function add_monitor_usermail_member()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
            document.user_adm.operate.value="add_monitor_usermail_member";
            document.user_adm.submit();
        }
}

function del_monitor_usermail_member()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_126)) {
                document.user_adm.operate.value="del_monitor_usermail_member";
                document.user_adm.submit();
           }
        }
}


function monitor_usermail_member_1()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_127)) {
                document.user_adm.operate.value="monitor_usermail_member_1";
                document.user_adm.submit();
           }
        }
}

function monitor_usermail_member_2()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_128)) {
                document.user_adm.operate.value="monitor_usermail_member_2";
                document.user_adm.submit();
           }
        }
}

function monitor_usermail_member_3()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_129)) {
                document.user_adm.operate.value="monitor_usermail_member_3";
                document.user_adm.submit();
           }
        }
}

function monitor_usermail_member_4()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_130)) {
                document.user_adm.operate.value="monitor_usermail_member_4";
                document.user_adm.submit();
           }
        }
}


function subscibe_mail_list()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
            document.user_adm.operate.value="subscibe_mail_list";
            document.user_adm.submit();
        }
}

function csubscibe_mail_list()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
                document.user_adm.operate.value="csubscibe_mail_list";
                document.user_adm.submit();
        }
}

function Checkadd_aliasdomain()
{
        if (document.add_aliasdomain.al_domain.value=="")
                {alert(LANGUAGE_122);return false;}
        return true;
}

function add_aliasdomain()
{
        if(!Checkadd_aliasdomain())
        {
           return;
        }
        else
        {
          document.add_aliasdomain.operate.value="add_aliasdomain";
          document.add_aliasdomain.submit();
        }
}

function del_aliasdomain()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
                document.user_adm.operate.value="del_aliasdomain";
                document.user_adm.submit();
        }
}

function disable_aliasdomain()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
                document.user_adm.operate.value="disable_aliasdomain";
                document.user_adm.submit();
        }
}


function enable_aliasdomain()
{
        if(!checkone(document.user_adm))
        {
        return;
        }
        else
        {
                document.user_adm.operate.value="enable_aliasdomain";
                document.user_adm.submit();
        }
}

function del_operate_refuse_spam()
{
        if(!checkone(document.refuse_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_131)) {
                document.refuse_operate.operate.value="delete";
                document.refuse_operate.submit();
           }
        }
}


function startoperate_refuse_spam()
{
        if(!checkone(document.refuse_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_132)) {
                document.refuse_operate.operate.value="start";
                document.refuse_operate.submit();
           }
        }
}
function stopoperate_refuse_spam()
{
        if(!checkone(document.refuse_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_133)) {
                document.refuse_operate.operate.value="stop";
                document.refuse_operate.submit();
           }
        }
}

function del_spam_mail_log()
{
        if(!checkone(document.spam_mail_log_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_134)) {
                document.spam_mail_log_operate.operate.value="del";
                document.spam_mail_log_operate.submit();
           }
        }
}
function send_spam_mail_log()
{
        if(!checkone(document.spam_mail_log_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_135)) {
                document.spam_mail_log_operate.operate.value="send";
                document.spam_mail_log_operate.submit();
           }
        }
}

function SendMail_To_User_All()
{
       document.SendMailToUser.action = "../prog/do_manage_sendmail_to_user_all.php";
       document.SendMailToUser.submit();
}



function Checkadd_system_mail_pop3()
{
        if (document.addmailpop3.pop3.value=="")
        {
           alert(LANGUAGE_50);
           return false;
        }
        if (document.addmailpop3.user.value=="")
        {
           alert(LANGUAGE_51);
           return false;
        }
        if (document.addmailpop3.passwd.value=="")
        {
           alert(LANGUAGE_52);
           return false;
        }
        if (document.addmailpop3.del.value=="")
        {
           alert(LANGUAGE_53);
           return false;
        }
        if (document.addmailpop3.f_id.value=="")
        {
           alert(LANGUAGE_54);
           return false;
        }
        return true;
}

function add_system_mail_pop3()
{
        if(!Checkadd_system_mail_pop3())
        {
           return;
        }
        else
        {
          document.addmailpop3.operate.value="insert";
          document.addmailpop3.submit();
        }
}
function Checkedit_system_mail_pop3()
{
        if (document.editmailpop3.pop3.value=="")
        {
           alert(LANGUAGE_50);
           return false;
        }
        if (document.editmailpop3.user.value=="")
        {
           alert(LANGUAGE_51);
           return false;
        }
        if (document.editmailpop3.passwd.value=="")
        {
           alert(LANGUAGE_52);
           return false;
        }
        if (document.editmailpop3.del.value=="")
        {
           alert(LANGUAGE_53);
           return false;
        }
        if (document.editmailpop3.f_id.value=="")
        {
           alert(LANGUAGE_54);
           return false;
        }
        return true;
}

function edit_system_mail_pop3()
{
        if(!Checkedit_system_mail_pop3())
        {
           return;
        }
        else
        {
          document.editmailpop3.operate.value="update";
          document.editmailpop3.submit();
        }
}

function del_operate_rbl_server()
{
        if(!checkone(document.rbl_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_136)) {
                document.rbl_operate.operate.value="delete";
                document.rbl_operate.submit();
           }
        }
}


function startoperate_rbl_server()
{
        if(!checkone(document.rbl_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_137)) {
                document.rbl_operate.operate.value="start";
                document.rbl_operate.submit();
           }
        }
}
function stopoperate_rbl_server()
{
        if(!checkone(document.rbl_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_138)) {
                document.rbl_operate.operate.value="stop";
                document.rbl_operate.submit();
           }
        }
}

function Checkadd_address_Ldap()
{
        if (document.add_address.name1.value=="")
                {alert(LANGUAGE_143);return false;}
        if (document.add_address.name2.value=="")
                {alert(LANGUAGE_144);return false;}
        if (document.add_address.email.value=="")
                {alert(LANGUAGE_46);return false;}

        return true;
}

function add_address_Ldap()
{
        if(!Checkadd_address_Ldap())
        {
           return;
        }
        else
        {
          document.add_address.operate.value="insert";
          document.add_address.submit();
        }
}
function Checkedit_address_Ldap()
{
        if (document.edit_address.name1.value=="")
                {alert(LANGUAGE_143);return false;}
        if (document.edit_address.name2.value=="")
                {alert(LANGUAGE_144);return false;}
        if (document.edit_address.email.value=="")
                {alert(LANGUAGE_46);return false;}

        return true;
}

function edit_address_Ldap()
{
        if(!Checkedit_address_Ldap())
        {
           return;
        }
        else
        {
          document.edit_address.operate.value="update";
          document.edit_address.submit();
        }
}

function spam_mail_log()
{
        if(!checkone(document.spam_mail_log_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_139)) {
               document.spam_mail_log_operate.operate.value="spam";
                document.spam_mail_log_operate.submit();
           }     
        }
}

function ham_mail_log()
{
        if(!checkone(document.spam_mail_log_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_140)) {
               document.spam_mail_log_operate.operate.value="ham";
               document.spam_mail_log_operate.submit();
           }
        }
}

//检查处理垃圾邮件
function antispam_hammail()
{
        if(!checkone(document.do_mail_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_140)) {
                document.do_mail_operate.operate.value="ham";
                document.do_mail_operate.submit();
           }
        }
}

//检查处理垃圾邮件
function antispam_spammail()
{
        if(!checkone(document.do_mail_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_139)) {
                document.do_mail_operate.operate.value="spam";
                document.do_mail_operate.submit();
           }
        }
}


function Checkadd_mailsms()
{
        if (document.add_class.sender_txt.value=="" && document.add_class.recv_txt.value=="" && document.add_class.subject_txt.value=="")
        {
            alert(LANGUAGE_148);
            document.add_class.sender_txt.focus();
            return false;
        }
        if (document.add_class.number.value==""){
            alert(LANGUAGE_149);
            document.add_class.number.focus();
            return false;
        
        }
        return true;
}

function add_mailsms()
{
        if(!Checkadd_mailsms())
        {
           return;
        }
        else
        {

          document.add_class.operate.value="insert";
          document.add_class.submit();
        }
}




function Checkedit_mailsms()
{
        if (document.edit_class.sender_txt.value=="" && document.edit_class.recv_txt.value=="" && document.edit_class.subject_txt.value=="")
        {
           alert(LANGUAGE_148);
           document.edit_class.sender_txt.focus();
            return false;
        }
        if (document.edit_class.number.value==""){
            alert(LANGUAGE_149);
            document.edit_class.number.focus();
            return false;
        
        }
        return true;
}

function edit_mailsms()
{
        if(!Checkedit_mailsms())
        {
           return;
        }
        else
        {

          document.edit_class.operate.value="update";
          document.edit_class.submit();
        }
}

function delmailsms()
{
        if(!checkone(document.mail_class))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_145)) {
                document.mail_class.operate.value="delete";
                document.mail_class.submit();
           }
        }
}

function startmailsms()
{
        if(!checkone(document.mail_class))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_147)) {
                document.mail_class.operate.value="start";
                document.mail_class.submit();
           }
        }
}
function stopmailsms()
{
        if(!checkone(document.mail_class))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_146)) {
                document.mail_class.operate.value="stop";
                document.mail_class.submit();
           }
        }
}



function add_mail_monitor_email()
{
        if (document.user_adm.me_uid.value==""){
            alert(LANGUAGE_150);
            document.user_adm.me_uid.focus();
            return;
        }else{
            document.user_adm.operate.value="add_monitor_usermail_member";
            document.user_adm.submit();
        }
}

function Checkad_sort_menu()
{
         if(document.ad_sort.ad_name.value=="")
         {
            alert(LANGUAGE_42);
            return false;
         }
         //if(document.ad_sort.HTML_TreeMenu_Listbox_NO_From_1.value=="")
        // {
         //   alert(LANGUAGE_200);
          //  return false;
         //}
         //document.ad_sort.submit();
        return true;
}


function add_ad_sort_menu()
{
        if(!Checkad_sort_menu())
        {
           return;
        }
        else
        {
          document.ad_sort.operate.value="add";
          document.ad_sort.submit();
        }
}

function Checkad_delad_menu()
{
         if(document.address_sort.HTML_TreeMenu_Listbox_NO_From_1.value=="")
         {
            alert(LANGUAGE_201);
            return false;
         }
        return true;
}


function delad_menu()
{
        if(!Checkad_delad_menu())
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_41)) {
                document.address_sort.operate.value="del";
                document.address_sort.submit();
           }
        }
}

function Checkad_editad_menu()
{
         if(document.address_sort.HTML_TreeMenu_Listbox_NO_From_1.value=="")
         {
            alert(LANGUAGE_202);
            return false;
         }
        return true;
}


function editad_menu()
{
        if(!Checkad_editad_menu())
        {
        return;
        }
        else
        {
                document.address_sort.action = "../prog/manage_edit_address_sort_menu.php";
                document.address_sort.operate.value="edit";
                document.address_sort.submit();
        }
}


function Checkad_backupad_menu()
{
         if(document.address_sort.HTML_TreeMenu_Listbox_NO_From_1.value=="")
         {
            alert(LANGUAGE_203);
            return false;
         }
        return true;
}


function backupad_menu()
{
        if(!Checkad_backupad_menu())
        {
        return;
        }
        else
        {
                document.address_sort.operate.value="backup";
                document.address_sort.submit();
        }
}





function del_user_sign()
{
        if(!checkone(document.sign_s))
        {
        return;
        }
        else
        {
              document.sign_s.operate.value="delete";
              document.sign_s.submit();
        }

}


//检查删除所有备份邮件(8000)
function delspammailall()
{
      if(confirm(LANGUAGE_204)) {
           document.spam_mail_log_operate.operate.value="delall";
           document.spam_mail_log_operate.submit();
      }
}

function addwhitemailfrom()
{
        if(!checkone(document.spam_mail_log_operate))
        {
        return;
        }
        else
        {
            if(confirm(LANGUAGE_205)) 
            {
                document.spam_mail_log_operate.operate.value="white";
                document.spam_mail_log_operate.submit();
            }
        }
}

function addblackmailfrom()
{
        if(!checkone(document.spam_mail_log_operate))
        {
        return;
        }
        else
        {
            if(confirm(LANGUAGE_206)) 
            {
                document.spam_mail_log_operate.operate.value="black";
                document.spam_mail_log_operate.submit();
            }
        }
}


function deletewhitemailfrom()
{
        if(!checkone(document.spam_mail_log_operate))
        {
        return;
        }
        else
        {
            if(confirm(LANGUAGE_207)) 
            {
                document.spam_mail_log_operate.operate.value="deletewhite";
                document.spam_mail_log_operate.submit();
            }
        }
}

function deleteblackmailfrom()
{
        if(!checkone(document.spam_mail_log_operate))
        {
        return;
        }
        else
        {
            if(confirm(LANGUAGE_208)) 
            {
                document.spam_mail_log_operate.operate.value="deleteblack";
                document.spam_mail_log_operate.submit();
            }
        }
}



function Checkad_editad_menu_organize()
{
         if(document.address_sort.HTML_TreeMenu_Listbox_NO_From_1.value=="")
         {
            alert(LANGUAGE_202);
            return false;
         }
        return true;
}


function editad_menu_organize()
{
        if(!Checkad_editad_menu())
        {
        return;
        }
        else
        {
                document.address_sort.action = "../mprog/manage_edit_organize.php";
                document.address_sort.operate.value="edit";
                document.address_sort.submit();
        }
}

//邮件存档
function maillist_savemail()
{
        if(!checkone(document.do_mail_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_223)) {
                document.do_mail_operate.operate.value="savemailtoserver";
                document.do_mail_operate.submit();
           }
        }
}

//邮件存档恢复
function maillist_fromsavemail()
{
        if(!checkone(document.do_mail_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_224)) {
                document.do_mail_operate.operate.value="savemailfromserver";
                document.do_mail_operate.submit();
           }
        }
}


function del_manage_module()
{
        if(!checkone(document.refuse_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_228)) {
                document.refuse_operate.operate.value="delete";
                document.refuse_operate.submit();
           }
        }
}


function startmanage_module()
{
        if(!checkone(document.refuse_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_229)) {
                document.refuse_operate.operate.value="start";
                document.refuse_operate.submit();
           }
        }
}
function stopmanage_module()
{
        if(!checkone(document.refuse_operate))
        {
        return;
        }
        else
        {
           if(confirm(LANGUAGE_230)) {
                document.refuse_operate.operate.value="stop";
                document.refuse_operate.submit();
           }
        }
}


