﻿// JScript 文件
function $(id)
{
    return document.getElementById(id);
}


function _sendlogin() 
{ 
var username=document.getElementById("SendEmail1_senduser").value;
var company=document.getElementById("SendEmail1_sendCompany").value; 
var phone=document.getElementById("SendEmail1_sendPhone").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.");       
   }
else
{
    if(company=="")
    {
        alert("Please input company！");
    }else
    {
        if(username=="")
        {
             alert("Please input name！");
        }
        else
        { 
            if(email!= "")
            {
                var pattern = /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
                if(pattern.test(email))
                {                    
                    if(phone!="")
                    { 
                        if(phone.length<50)
                        {
                            $("aspnetForm").submit();
                        }
                        else
                        {
                            alert("The Telephone Number you entered is wrong.");
                        }
                    } 
                    else
                    {
                        alert("Please enter your Tel.");
                    }                   
                }
                else
                {
                    alert("The Email address you entered is wrong.");
                }
            }
            else
            {
                alert(" Please enter your Email address.");
                
            }            
        }
    }
}

}
 function GetEmail(resaultObj){
	var xmls=resaultObj.responseXML;
	var suc=xmls.getElementsByTagName("result")[0].getAttribute("value");
	if(suc=="true"){}else{location.href="?";}
	} 



function closebig()
{
    $("big").style.display="none";
    $("smalldiv").style.display="block";
}

function closesmall()
{
    $("big").style.display="block";
    $("smalldiv").style.display="none";
}

function Concel()
{
    $("myshield__").style.display="none";    
    $("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()
//    {
//        $("myshield__").style.display="block"; 
//    }
//    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;
}

//换Code
function ChangeCode()
{
    $("imgCode").src="/cercode/reg"+Math.random()+".jpg";
}
