﻿// JScript 文件
function $(id)
{
    return document.getElementById(id);
}
function _sendlogin() 
{ 
    var state=true;
    var username=document.getElementById("SendEmail1_senduser").value;
    var comment=document.getElementById("SendEmail1_sendcomment").value;
    var email=document.getElementById("SendEmail1_sendemail").value;
    var YCountry=document.getElementById("SendEmail1_sendYCountry").value;
    if( comment=="")
    {
        alert("Please enter content.");
        state=false;    
    }
    if(state && username=="")
    {
        alert(" Please enter your Name.");
        state=false;
    }
    if(state && email== "")
    {
         alert(" Please enter your Email adrsee.");
          state=false;
    }
    var pattern = /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
    if(state && !pattern.test(email))
    {
        alert("The Email address you entered is wrong.");
        state=false;
    }
    if(state)
    {
          $("aspnetForm").submit();
    } 
}

function Concel()
{
    $("myshield__").style.display="none";
    $("big").style.display="none";
    $("smalldiv").style.display="block";
    $("SendEmail1_tishitrue").style.display="none";
    $("SendEmail1_tishierror").style.display="none";   
}

function Conver()
{
    $("myshield__").style.width=document.body.offsetWidth;
    $("myshield__").style.height=document.body.offsetHeight;
//    function Z_Index2()
//    {
        $("big").style.display="block";
        $("myshield__").style.display="block"; 
        $("smalldiv").style.display="none";
//    }
//    Z_Index2();
}

window.onload=function onloaddiv()
{    
    if($("SendEmail1_action").value=="123" || $("SendEmail1_action").value=="456")
    {
        Concel();
    }
    else
    {
        $("myshield__").style.display="none";
        $("big").style.display="none";
        $("smalldiv").style.display="block";
   }
}

function check(QQ)
{
    if(QQ.replace('<','').replace('>',"").length!=QQ.length){
        return false;
    }else{
        return true;}
}