﻿ var response;   
var xmlHttp = false;
try {
  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
  //xmlHttp.async=false;
} catch (e) {
  try {
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    //xmlHttp.async=false;
  } catch (e2) {
    xmlHttp = false;
  }
}
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
  xmlHttp = new XMLHttpRequest();
}

function callServer() {
  var u_name = document.getElementById("username").value;
  if ((u_name == null) || (u_name == "")) return;
  var url = "jianbie.aspx?username=" + escape(u_name);//发送数据到鉴别页面，判定企业名称是否存在
  xmlHttp.open("GET", url, true);
  xmlHttp.onreadystatechange = updatePage;
  xmlHttp.send(null);  
}

function updatePage() {
//  if (xmlHttp.readyState < 4) {
//	test1.innerHTML="loading...";
//  }
  if (xmlHttp.readyState == 4) {
    //response = xmlHttp.responseText;
	//test1.innerHTML=response;
    //document.getElementById("uname").innerHTML = response; //把返回的辨别情况也赋值给lebel，便于cs页面取值判定 
    var div_id = document.getElementById("div_username");
    var text_id = document.getElementById("text_username");
    var success_id = document.getElementById("success_username");
      
        var username = /^[a-zA-Z][a-zA-Z0-9_]{4,19}$/;      
        if (document.getElementById("username").value == "")
        {
               div_id.className = "body_left_text_3";
               div_id.style.display = "block";
               div_id.style.backgroundImage = "url(../images/default/ts3.gif)";
               div_id.style.height = 42;
               text_id.innerHTML = "<span style='color:#666666;'>Please enter your User ID.This will be used to sign-in to www.en.qp365.net</span>";
               text_id.style.display = "block";
               success_id.style.display = "none";            
        }
        else
        {
              if(!username.test(document.getElementById("username").value))
              {
                     div_id.className = "body_left_text_3";
                     div_id.style.display = "block";
                     div_id.style.height = 23;
                     div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                     text_id.innerHTML = "<span style='color:#D60107;'>Please enter 5 - 20 characters (A-Z, a-z, 0-9, _ only)</span>";
                     text_id.style.display = "block";
                     success_id.style.display = "none";
              }
              else if(username.test(document.getElementById("username").value))
              {
                    if( xmlHttp.responseText == "no")
                      {     
                         div_id.className = "body_left_text_3";
                         div_id.style.display = "block";
                         div_id.style.height = 42;
                         div_id.style.backgroundImage = "url(../images/default/ts4.gif)";
                         text_id.innerHTML = "<span style='color:#D60107;'>This account already exists.<br/><a href='../login.aspx' style='text-decoration:underline'>Sign in</a> now, OR Enter a new User ID</span>";
                         text_id.style.display = "block";
                         success_id.style.display = "none";
                      }
                      else if( xmlHttp.responseText == "yes")
                      {
                         text_id.style.display = "none";
                         div_id.style.display = "none";
                         success_id.style.display = "block";
                      }
              }
        }       
  }
}

    
    

function callServeremail() {
  var u_email = document.getElementById("email").value;
  if ((u_email == null) || (u_email == "")) return;
  var url = "jianbie2.aspx?email=" + escape(u_email);//发送数据到鉴别页面，判定企业名称是否存在
  xmlHttp.open("GET", url, true);
  xmlHttp.onreadystatechange = updatePageemail;
  xmlHttp.send(null);  
}

function updatePageemail() {
//  if (xmlHttp.readyState < 4) {
//	test1.innerHTML="loading...";
//  }
  if (xmlHttp.readyState == 4) {
    //response = xmlHttp.responseText;
	//test1.innerHTML=response;
    //document.getElementById("uname").innerHTML = response; //把返回的辨别情况也赋值给lebel，便于cs页面取值判定 
    var div_id = document.getElementById("div_email");
    var text_id = document.getElementById("text_email");
    var success_id = document.getElementById("success_email");
      
        var email = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;      
        if (document.getElementById("email").value == "")
        {
               div_id.className = "body_left_text_3";
               div_id.style.display = "block";
               div_id.style.backgroundImage = "url(../images/default/ts3.gif)";
               div_id.style.height = 42;
               text_id.innerHTML = "<span style='color:#666666;'>Please enter your email.</span>";
               text_id.style.display = "block";
               success_id.style.display = "none";            
        }
        else
        {
              if(!email.test(document.getElementById("email").value))
              {
                     div_id.className = "body_left_text_3";
                     div_id.style.display = "block";
                     div_id.style.height = 23;
                     div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                     text_id.innerHTML = "<span style='color:#D60107;'> Please enter a valid Email Address</span>";
                     text_id.style.display = "block";
                     success_id.style.display = "none";
              }
              else if(email.test(document.getElementById("email").value))
              {
                    if( xmlHttp.responseText == "no")
                      {     
                         div_id.className = "body_left_text_3";
                         div_id.style.display = "block";
                         div_id.style.height = 42;
                         div_id.style.backgroundImage = "url(../images/default/ts4.gif)";
                         text_id.innerHTML = "<span style='color:#D60107;'>This email already exists. Enter a new email</span>";
                         text_id.style.display = "block";
                         success_id.style.display = "none";
                      }
                      else if( xmlHttp.responseText == "yes")
                      {
                         text_id.style.display = "none";
                         div_id.style.display = "none";
                         success_id.style.display = "block";
                      }
              }
        }       
  }
}

    
    
    
    
	 function showNext(sid)
      { 
          //alert(sid);
        var text = document.getElementById('TextBox1');
	    var v = reg_Default.getNextClass(sid).value; // 类的名称
        var imageControl = document.getElementById("img1");
        imageControl.src = v;
      }
      
	 function Show(id)
      { 
        var div_id = document.getElementById("div_" + id);
        var text_id = document.getElementById("text_" + id);
        var success_id = document.getElementById("success_" + id);
                   
        var reg = /^[A-Za-z]*$/; 
        var password = /^[a-zA-Z0-9_]{6,20}$/;   
               
        if (document.getElementById(id).value == "")
        {
            if (id == "companyname")
            {
               div_id.className = "body_left_text_3";
               div_id.style.display = "block";
               div_id.style.backgroundImage = "url(../images/default/ts3.gif)";
               div_id.style.height = 42;
               text_id.innerHTML = "<span style='color:#666666;'>If you don't have a Company Name, please use your full name.</span>";
               text_id.style.display = "block";
               success_id.style.display = "none";
            } 
            else if (id == "username")
            {
               div_id.className = "body_left_text_3";
               div_id.style.display = "block";
               div_id.style.backgroundImage = "url(../images/default/ts3.gif)";
               div_id.style.height = 42;
               text_id.innerHTML = "<span style='color:#666666;'>Please enter your User ID.This will be used to sign-in to www.en.qp365.net</span>";
               text_id.style.display = "block";
               success_id.style.display = "none";
            }           
            else if (id == "email")
            {
               div_id.className = "body_left_text_3";
               div_id.style.display = "block";
               div_id.style.backgroundImage = "url(../images/default/ts3.gif)";
               div_id.style.height = 42;
               text_id.innerHTML = "<span style='color:#666666;'>Please enter your Email Address.We will never display your Email Address on our website.</span>";
               text_id.style.display = "block";
               success_id.style.display = "none";
            }           
            else if (id == "password")
            {
               div_id.className = "body_left_text_3";
               div_id.style.display = "block";
               div_id.style.backgroundImage = "url(../images/default/ts3.gif)";
               div_id.style.height = 42;
               text_id.innerHTML = "<span style='color:#666666;'>To make your password more secure:   Use letters and numbers  ;  Mix lower and uppercase. </span>";
               text_id.style.display = "block";
               success_id.style.display = "none";
            }           
            else if (id == "passwordto")
            {
               div_id.className = "body_left_text_3";
               div_id.style.display = "block";
               div_id.style.backgroundImage = "url(../images/default/ts2.gif)";
               div_id.style.height = 23;
               text_id.innerHTML = "<span style='color:#666666;'>Please enter your password again </span>";
               text_id.style.display = "block";
               success_id.style.display = "none";
            }           
        }
        else
        {
            if (id == "companyname")
            {
               text_id.style.display = "none";
               div_id.style.display = "none";
               success_id.style.display = "block";
            }
            else if (id == "password")
            {
               if(!password.test(document.getElementById(id).value))
               {
                   div_id.className = "body_left_text_3";
                   div_id.style.display = "block";
                   div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                   div_id.style.height = 23;
                   text_id.innerHTML = "<span style='color:#D60107;'>Please enter 6 - 20 characters (A-Z, a-z, 0-9 only) </span>";
                   text_id.style.display = "block";
                   success_id.style.display = "none";
               }
               else
               {
                   text_id.style.display = "none";
                   div_id.style.display = "none";
                   success_id.style.display = "block";
               }
            }           
            else if (id == "passwordto")
            {
               if(document.getElementById("passwordto").value != document.getElementById("password").value)
               {
                   div_id.className = "body_left_text_3";
                   div_id.style.display = "block";
                   div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                   div_id.style.height = 23;
                   text_id.innerHTML = "<span style='color:#D60107;'>Passwords are not the same</span>";
                   text_id.style.display = "block";
                   success_id.style.display = "none";
               }
               else
               {
                   text_id.style.display = "none";
                   div_id.style.display = "none";
                   success_id.style.display = "block";
               }
            }           
        }
               
     }
     
	 function Show1(id)
      {
        var div_id = document.getElementById("div_" + id);
        var text_id = document.getElementById("text_" + id);
        var success_id = document.getElementById("success_" + id);
        var reg = /^[A-Za-z]*$/;            
        var password = /^[a-zA-Z0-9_]{6,20}$/;   
        if (document.getElementById(id).value == "")
        {
            if (id == "companyname")
            {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts2.gif)";
                 text_id.innerHTML = "<span style='color:#666666;'>Please enter your CompanyName</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
            }
            else if (id == "password")
            {
               div_id.className = "body_left_text_3";
               div_id.style.display = "block";
               div_id.style.backgroundImage = "url(../images/default/ts3.gif)";
               div_id.style.height = 42;
               text_id.innerHTML = "<span style='color:#666666;'>To make your password more secure:   Use letters and numbers  ;  Mix lower and uppercase. </span>";
               text_id.style.display = "block";
               success_id.style.display = "none";
            }           
            else if (id == "passwordto")
            {
               div_id.className = "body_left_text_3";
               div_id.style.display = "block";
               div_id.style.backgroundImage = "url(../images/default/ts2.gif)";
               div_id.style.height = 23;
               text_id.innerHTML = "<span style='color:#666666;'>Please enter your password again </span>";
               text_id.style.display = "block";
               success_id.style.display = "none";
            }           
        }
        else
        {
            if (id == "companyname") 
            {
               div_id.style.height = 23;
               text_id.style.display = "none";
               div_id.style.display = "none";
               success_id.style.display = "block";
            }
            else if (id == "password")
            {
               if(!password.test(document.getElementById(id).value))
               {
                   div_id.className = "body_left_text_3";
                   div_id.style.display = "block";
                   div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                   div_id.style.height = 23;
                   text_id.innerHTML = "<span style='color:#D60107;'>Please enter 6 - 20 characters (A-Z, a-z, 0-9 only) </span>";
                   text_id.style.display = "block";
                   success_id.style.display = "none";
               }
               else
               {
                   text_id.style.display = "none";
                   div_id.style.display = "none";
                   success_id.style.display = "block";
               }
            }           
            else if (id == "passwordto")
            {
               if(document.getElementById("passwordto").value != document.getElementById("password").value)
               {
                   div_id.className = "body_left_text_3";
                   div_id.style.display = "block";
                   div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                   div_id.style.height = 23;
                   text_id.innerHTML = "<span style='color:#D60107;'>Passwords are not the same</span>";
                   text_id.style.display = "block";
                   success_id.style.display = "none";
               }
               else
               {
                   text_id.style.display = "none";
                   div_id.style.display = "none";
                   success_id.style.display = "block";
               }
            }  
            
                     
        }
        
      }

      function Showphonename(id)
      {
        var div_id = document.getElementById("div_phone");
        var text_id = document.getElementById("text_phone");
        var success_id = document.getElementById("success_phone");
        var phone = /^[0-9]*$/;   
       
        if(document.getElementById(id).value == "")
        {
            if (id == "phone1")
            {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts2.gif)";
                 text_id.innerHTML = "<span style='color:#666666;'>Please enter your Country Code.</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
            }
            else if (id == "phone2")
            {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts2.gif)";
                 text_id.innerHTML = "<span style='color:#666666;'>Please enter your Area Code.</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
            }
            else if (id == "phone3")
            {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts2.gif)";
                 text_id.innerHTML = "<span style='color:#666666;'>Please enter your Phone Number.</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
            }
        }
        else
        {
               if(!phone.test(document.getElementById("phone1").value) | !phone.test(document.getElementById("phone2").value) | !phone.test(document.getElementById("phone3").value))
               {
                   div_id.className = "body_left_text_3";
                   div_id.style.display = "block";
                   div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                   div_id.style.height = 23;
                   text_id.innerHTML = "<span style='color:#D60107;'>Please enter numbers, dash or space only</span>";
                   text_id.style.display = "block";
                   success_id.style.display = "none";
               }
               else if(document.getElementById("phone1").value == "")
               {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                 text_id.innerHTML = "<span style='color:#D60107;'>Please enter your Country Code.</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
               }
               else if(document.getElementById("phone2").value == "")
               {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                 text_id.innerHTML = "<span style='color:#D60107;'>Please enter your Area Code.</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
               }
               else if(document.getElementById("phone3").value == "")
               {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                 text_id.innerHTML = "<span style='color:#D60107;'>Please enter your Phone Number.</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
               }
               else
               {
                   text_id.style.display = "none";
                   div_id.style.display = "none";
                   success_id.style.display = "block";
               }
        }
      
      }
      
      function Showphonename1(id)
      {
        var div_id = document.getElementById("div_phone");
        var text_id = document.getElementById("text_phone");
        var success_id = document.getElementById("success_phone");
        var phone = /^[0-9]*$/;   
        
        if(document.getElementById(id).value == "")
        {
            if (id == "phone1")
            {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                 text_id.innerHTML = "<span style='color:#D60107;'>Please enter your Country Code.</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
            }
            else if (id == "phone2")
            {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                 text_id.innerHTML = "<span style='color:#D60107;'>Please enter your Area Code.</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
            }
            else if (id == "phone3")
            {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                 text_id.innerHTML = "<span style='color:#D60107;'>Please enter your Phone Number.</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
            }
        }
        else
        {
               if(document.getElementById("phone1").value == "")
               {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts2.gif)";
                 text_id.innerHTML = "<span style='color:#666666;'>Please enter your Country Code.</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
               }
               else if(document.getElementById("phone2").value == "")
               {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts2.gif)";
                 text_id.innerHTML = "<span style='color:#666666;'>Please enter your Area Code.</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
               }
               else if(document.getElementById("phone3").value == "")
               {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts2.gif)";
                 text_id.innerHTML = "<span style='color:#666666;'>Please enter your Phone Number.</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
               }
               else if(!phone.test(document.getElementById("phone1").value) | !phone.test(document.getElementById("phone2").value) | !phone.test(document.getElementById("phone3").value))
               {
                   div_id.className = "body_left_text_3";
                   div_id.style.display = "block";
                   div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                   div_id.style.height = 23;
                   text_id.innerHTML = "<span style='color:#D60107;'>Please enter numbers, dash or space only</span>";
                   text_id.style.display = "block";
                   success_id.style.display = "none";
               }
               else
               {
                   text_id.style.display = "none";
                   div_id.style.display = "none";
                   success_id.style.display = "block";
               }
        }
      
      }
      

      
      function Showname(id)
      { 
        var div_id = document.getElementById("div_name");
        var text_id = document.getElementById("text_name");
        var success_id = document.getElementById("success_name");
        if(document.getElementById(id).value == "First Name" | document.getElementById(id).value == "Last Name" )
        {
          document.getElementById("firstname").value = "";
          document.getElementById("firstname").style.color = "#000";
          document.getElementById("lastname").value = "";
          document.getElementById("lastname").style.color = "#000";
        }
        var reg = /^[A-Za-z, ]*$/;   
        var regto = /^[A-Za-z, ]*$/;   
        if(document.getElementById(id).value == "")
        {
            if (id == "firstname")
            {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts2.gif)";
                 text_id.innerHTML = "<span style='color:#666666;'>Please enter your First Name</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
            }
            else if (id == "lastname")
            {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts2.gif)";
                 text_id.innerHTML = "<span style='color:#666666;'>Please enter your Last Name</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
            }
        }
        else
        {
               if(!reg.test(document.getElementById("firstname").value) | !reg.test(document.getElementById("lastname").value))
               {
                   div_id.className = "body_left_text_3";
                   div_id.style.display = "block";
                   div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                   div_id.style.height = 23;
                   text_id.innerHTML = "<span style='color:#D60107;'>Please enter English characters only</span>";
                   text_id.style.display = "block";
                   success_id.style.display = "none";
               }
               else if(document.getElementById("firstname").value == "")
               {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                 text_id.innerHTML = "<span style='color:#D60107;'>Please enter your First Name</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
               }
               else if(document.getElementById("lastname").value == "")
               {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                 text_id.innerHTML = "<span style='color:#D60107;'>Please enter your Last Name</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
               }
               else
               {
                   text_id.style.display = "none";
                   div_id.style.display = "none";
                   success_id.style.display = "block";
               }
        }
     }
	 function Showname1(id)
      {
        var div_id = document.getElementById("div_name");
        var text_id = document.getElementById("text_name");
        var success_id = document.getElementById("success_name");

        var reg = /^[A-Za-z, ]*$/;   
        var regto = /^[A-Za-z, ]*$/;   
        if(document.getElementById(id).value == "")
        {
            if (id == "firstname")
            {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                 text_id.innerHTML = "<span style='color:#D60107;'>Please enter your First Name</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
            }
            else if (id == "lastname")
            {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                 text_id.innerHTML = "<span style='color:#D60107;'>Please enter your Last Name</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
            }
        }
        else
        {
               if(document.getElementById("firstname").value == "")
               {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts2.gif)";
                 text_id.innerHTML = "<span style='color:#666666;'>Please enter your First Name</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
               }
               else if(document.getElementById("lastname").value == "")
               {
                 div_id.className = "body_left_text_3";
                 div_id.style.display = "block";
                 div_id.style.height = 23;
                 div_id.style.backgroundImage = "url(../images/default/ts2.gif)";
                 text_id.innerHTML = "<span style='color:#666666;'>Please enter your Last Name</span>";
                 text_id.style.display = "block";
                 success_id.style.display = "none";
               }
               else if(!reg.test(document.getElementById("firstname").value) | !reg.test(document.getElementById("lastname").value))
               {
                   div_id.className = "body_left_text_3";
                   div_id.style.display = "block";
                   div_id.style.backgroundImage = "url(../images/default/ts1.gif)";
                   div_id.style.height = 23;
                   text_id.innerHTML = "<span style='color:#D60107;'>Please enter English characters only</span>";
                   text_id.style.display = "block";
                   success_id.style.display = "none";
               }
               else
               {
                   text_id.style.display = "none";
                   div_id.style.display = "none";
                   success_id.style.display = "block";
               }
        }

      }
      
	 function clickreg()
	 {
	    if(document.getElementById("success_companyname").style.display.toString() == "block" & document.getElementById("success_username").style.display.toString() == "block" & document.getElementById("success_email").style.display.toString() == "block" & document.getElementById("success_password").style.display.toString() == "block" & document.getElementById("success_passwordto").style.display.toString() == "block" & document.getElementById("success_phone").style.display.toString() == "block" & document.getElementById("success_name").style.display.toString() == "block" )  
	    {
	       return true;
	    }
	    else
	    {
  	       Show("companyname");
	       Show("username");
	       Show("email");
	       Show("password");
	       Show("passwordto");
	       Showphonename("phone1");
	       Showphonename("phone2");
	       Showphonename("phone3");
	       Showname("firstname");
	       Showname("lastname");
	       
	       return false;
	    }
	 }
