﻿
 
function check_rgn()
{

    var b=new Array();
    b[0]=encodeURI($("#ctl00_ContentPlaceHolder1_txtname").val());
    b[1]=encodeURI($("#ctl00_ContentPlaceHolder1_txtpwd1").val());
    b[2]=encodeURI($("#ctl00_ContentPlaceHolder1_txtpwd2").val());
    b[3]=encodeURI($("#ctl00_ContentPlaceHolder1_txttname").val());
    b[4]=encodeURI($("#ctl00_ContentPlaceHolder1_txttel").val());
    b[5]=encodeURI($("#ctl00_ContentPlaceHolder1_txtmail").val());
    b[6]=encodeURI($("#ctl00_ContentPlaceHolder1_txtaddress").val());
    
    if(b[0]==""||b[1]==""||b[2]==""||b[3]==""||b[4]==""||b[5]==""||b[6]=="")
    {
        alert("信息不完整!");
        return false;
    }
    if(b[1]!=b[2])
    {
        alert("两次密码不一致!");
         $('#ctl00_ContentPlaceHolder1_txtpwd1').select();
          $('#ctl00_ContentPlaceHolder1_txtpwd2').val("");
        return false;
    }
    if($("#ctl00_ContentPlaceHolder1_txtpwd1").val().length<6)
    {
        alert("密码少于6位!");
        $('#ctl00_ContentPlaceHolder1_txtpwd1').select();
        $("#ctl00_ContentPlaceHolder1_txtpwd2").val("");
        $("#ctl00_ContentPlaceHolder1_txtpwd1").focus();
        return false;
    }
   
        //E-mail 
        var email=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
        if(!email.test($('#ctl00_ContentPlaceHolder1_txtmail').val()))
        {
           alert("请输入有效的邮箱地址");
        $('#ctl00_ContentPlaceHolder1_txtmail').select();
            return false;
        } 
 }



function check_login()
{

    var b=new Array();
    b[0]=encodeURI($("#ctl00_ContentPlaceHolder1_txtname").val());
    b[1]=encodeURI($("#ctl00_ContentPlaceHolder1_txtpwd").val());
    
    if(b[0]==""||b[1]=="")
    {
        alert("用户名或密码不能为空!");
        return false;
    
    }
    else
    {   
    }
 }
 
function check_mesg()
{

    var b=new Array();
    b[0]=encodeURI($("#ctl00_ContentPlaceHolder1_txttitle").val());
    b[1]=encodeURI($("#ctl00_ContentPlaceHolder1_conten2").val());
    
    if(b[0]==""||b[1]=="")
    {
        alert("内容不可为空");
        return false;
    
    }
    else
    {   
    }
 }
 
 
 function check_mesg1()
{

    var b=new Array();
    b[0]=encodeURI($("#ctl00_ContentPlaceHolder1_txtname").val());
    b[1]=encodeURI($("#ctl00_ContentPlaceHolder1_txtphone").val());
    b[2]=encodeURI($("#ctl00_ContentPlaceHolder1_txtmail").val());
    b[3]=encodeURI($("#ctl00_ContentPlaceHolder1_txttitle").val());
    b[4]=encodeURI($("#ctl00_ContentPlaceHolder1_txtcon").val());
    
    if(b[0]==""||b[1]==""||b[2]==""||b[3]==""||b[4]=="")
    {
        alert("内容不可为空");
        return false;
    
    }
    
    //E-mail 
        var email=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
        if(!email.test($('#ctl00_ContentPlaceHolder1_txtmail').val()))
        {
           alert("请输入有效的邮箱地址");
        $('#ctl00_ContentPlaceHolder1_txtmail').select();
            return false;
        } 
    
 }
 
