﻿// JScript File

    var x=new Array();
   function Valid_Control(x)
 {
 if(document.getElementById(x).value=="")
 {
 document.getElementById(x).style.background = 'pink'; 
return false;

 }
 else{
 
 document.getElementById(x).style.background = '#FFFFFF';
 return true;
 }
 }
 
 
 
 function ValidateEmail(email) 
    {    
    
    var strMail = document.getElementById(email).value;
    var regMail =  /^\w+([-.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
    if (regMail.test(strMail))
    {
     return true;
     }
      else 
      {
       return false;        
       }
       }
       
    function Validatemobile(mobileno) 
    {
    
    var strmobile = document.getElementById(mobileno).value;
    var regmobile =/^([9]{1})([234789]{1})([0-9]{8})$/;
    if (regmobile.test(strmobile))
    {
       return true;
    }
    else 
    {
       return false;        
    }
    
    }
       
       
       
     function Validatephone(phoneno) 
    {
    var strphone = document.getElementById(phoneno).value;
    var regmobile =/^([9]{1})([234789]{1})([0-9]{8})$/;
    var regphone=/^0{0,1}[1-9]{1}[0-9]{2}[\s]{0,1}[\-]{0,1}[\s]{0,1}[1-9]{1}[0-9]{6}$/;
    if ((regmobile.test(strphone))||(regphone.test(strphone)))
    {
     return true;
     }
      else 
      {
       return false;        
       }
       }