﻿// JScript File
function ltrim (s)
        {
            return s.replace( /^\s*/, "" );
        }
        
        function trim(s)
{
    
    return s.replace(/^\s+|\s+$/g,"");
}


 function changepwd()
        {
            var password=document.getElementById("TextBox1");
            var pwd=document.getElementById("TextBox2");
            var confirmpwd=document.getElementById("TextBox3");
            var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;


            
            if (ltrim(password.value)=="")
            { alert("Please enter Password"); password.value=""; password.focus(); return false; }
            else if(d.test(password.value))
    { alert("The Password contains illegal characters!"); password.focus(); return false; }
            
            
                      
            if (ltrim(pwd.value)=="")
            { alert("Please enter New Password"); pwd.value=""; pwd.focus(); return false; }
              if (pwd.value.length<5)
            { alert("Password should minimum 5 characters"); pwd.focus(); return false; }
              if (pwd.value.length>8)
            { alert("Password should Maximum 8 characters"); pwd.focus(); return false; }            
            else if(d.test(pwd.value))
    { alert("The Password contains illegal characters!"); pwd.focus(); return false; }
            
            if (ltrim(confirmpwd.value) =="")
            { alert("Please enter confirm Password"); confirmpwd.value=""; confirmpwd.focus(); return false; }
            if (pwd.value!=confirmpwd.value)
            { alert("Password entries didn't match."); pwd.focus(); return false; }
            }
            
            
        
        
        function changepassword()
        {
            var password=document.getElementById("TextBox1");
            var pwd=document.getElementById("TextBox2");
            var confirmpwd=document.getElementById("TextBox3");
            var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;


            
            if (ltrim(password.value)=="")
            { alert("Please enter Password"); password.value=""; password.focus(); return false; }
            else if(d.test(password.value))
    { alert("The Password contains illegal characters!"); password.focus(); return false; }
            
            
                      
            if (ltrim(pwd.value)=="")
            { alert("Please enter New Password"); pwd.value=""; pwd.focus(); return false; }
              if (pwd.value.length<5)
            { alert("Password should minimum 5 characters"); pwd.focus(); return false; }
              if (pwd.value.length>8)
            { alert("Password should Maximum 8 characters"); pwd.focus(); return false; }
            
            else if(d.test(pwd.value))
    { alert("The Password contains illegal characters!"); pwd.focus(); return false; }
            
            if (ltrim(confirmpwd.value) =="")
            { alert("Please enter confirm Password"); confirmpwd.value=""; confirmpwd.focus(); return false; }
            if (pwd.value!=confirmpwd.value)
            { alert("Password entries didn't match."); pwd.focus(); return false; }
            }
            
            
            
               function Search()
                {
                  var keyword=document.getElementById("TextBox1");
            
                var d=/[\W_]/;
            
                 var naExp=/^([a-zA-Z,&\s])+$/;
            
            if (ltrim(keyword.value)=="")
             { alert("Please enter keyword"); keyword.value=""; keyword.focus(); return false; }
             if((trim(keyword.value).length!=keyword.value.length)||(keyword.value.match(naExp)==null))
    {  alert("keywords contain illegal characters!"); keyword.focus(); return false; } 
}


            function FUser()
            {
            var uname=document.getElementById("txtusername");
            var pwd=document.getElementById("txtpassword");
            var confirmpwd=document.getElementById("txtconfirmpassword");
            var fname=document.getElementById("txtname");
            var nname=document.getElementById("txtnickname");
            var sex=document.getElementById("ddmalefemale");
            var dob=document.getElementById("txtfromdate");            
            var addr=document.getElementById("txtaddress");
            var city=document.getElementById("ddcity");
            var state=document.getElementById("ddstate");
            var country=document.getElementById("ddcountry");
            var mobile=document.getElementById("txtmobile");
            var email=document.getElementById("txtemail");
            var image=document.getElementById("FileUpload1");
                        
             var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;               
                
               
            

            if (ltrim(fname.value)=="")
            { alert("Please enter Name"); fname.value=""; fname.focus(); return false; }
            else if((trim(fname.value).length!=fname.value.length)||(fname.value.match(naExp)==null))
            {  alert("Name contain illegal characters!"); fname.focus(); return false; }
            
            
            
            if (ltrim(nname.value)=="")
            { alert("Please enter Nick name"); nname.value=""; nname.focus(); return false; }
            else if((trim(nname.value).length!=nname.value.length)||(nname.value.match(naExp)==null))
            {  alert("Nick Name contain illegal characters!"); nname.focus(); return false; }


            if(sex.selectedIndex==0)
            { alert("Please Select Gender"); sex.focus(); return false; }
            
            
               if (ltrim(dob.value)=="")
            { alert("Please enter Date Of Birth"); dob.value=""; dob.focus(); return false; }
            
            
	        if (ltrim(addr.value)=="")
            { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }
            var str=addr.value;
            var addrExp =/^[a-zA-z0-9._%+-]+\S/;
           
	        if(str.match(addrExp)==null)	
	        { alert("Address contain illegal characters"); addr.focus(); return false; }           
            
            if(country.selectedIndex==0)
            { alert("Please Select Country"); country.focus(); return false; }
            
            if(state.selectedIndex==0)
            { alert("Please Select State"); state.focus(); return false; }
            
	        if(city.selectedIndex==0)
            { alert("Please Select City"); city.focus(); return false; }
            
            if (ltrim(mobile.value)=="")
            { alert("Please enter  mobile number"); mobile.value=""; mobile.focus(); return false; }
             var str=mobile.value;
            var mobileExp = /^\d{10}$/;
	        if(str.match(mobileExp)==null)	
	        { alert("Mobile should be numeric & 10 digits"); mobile.focus(); return false; }
            
            if (ltrim(email.value)=="")
            { alert("Please enter Email"); email.value=""; email.focus(); return false; }
            
            str=email.value;
            var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp)==null)	
	        { alert("Enter Valid Email Id"); email.focus(); return false; }
	        
	         if (image.value!="")
        {
        str=image.value;
        var exp=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(bmp))$/;
        if(str.match(exp)==null)
        { alert("Select Image File Only To Upload !"); image.focus(); return false; }
        
           }
           
	        if (ltrim(uname.value)=="")
            { alert("Please enter  Username"); uname.value=""; uname.focus(); return false; }
            else if(d.test(uname.value))
    { alert("The Username contains illegal characters!"); uname.focus(); return false; }
            
            if (ltrim(pwd.value)=="")
            { alert("Please enter Password"); pwd.value=""; pwd.focus(); return false; }
              if (pwd.value.length<5)
            { alert("Password should minimum 5 characters"); pwd.focus(); return false; }
              if (pwd.value.length>8)
            { alert("Password should Maximum 8 characters"); pwd.focus(); return false; }
            else if(d.test(pwd.value))
    { alert("The Password contains illegal characters!"); pwd.focus(); return false; }
            
            if (ltrim(confirmpwd.value) =="")
            { alert("Please enter confirm Password"); confirmpwd.value=""; confirmpwd.focus(); return false; }
            if (pwd.value!=confirmpwd.value)
            { alert("Password entries didn't match."); pwd.focus(); return false; }           
        }
        
        function fimage()
            {
             var image=document.getElementById("FileUpload1");
             
             if (image.value!="")
             {        
                str=image.value;
                var exp=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(bmp))$/;
                if(str.match(exp)==null)
                { alert("Select Image File Only To Upload !"); image.focus(); return false; }                 
	         }
	        }
        
        function FParents()
            {
            var fname=document.getElementById("TextBox1");
            var nname=document.getElementById("TextBox2");
            var faname=document.getElementById("TextBox4");
            var maname=document.getElementById("TextBox5");
            var sex=document.getElementById("DropDownList1");
            var dob=document.getElementById("txtfromdate");            
            var alive=document.getElementById("CheckBox1");
            var addr=document.getElementById("TextBox3");
            
            var city=document.getElementById("DropDownList3");
            var state=document.getElementById("DropDownList4");
            var country=document.getElementById("DropDownList5");
            var mobile=document.getElementById("TextBox7");
            var email=document.getElementById("TextBox8");
            var image=document.getElementById("FileUpload1");
            
            
            var fname1=document.getElementById("TextBox9");
            var nname1=document.getElementById("TextBox10");
            var faname1=document.getElementById("TextBox12");
            var maname1=document.getElementById("TextBox6");
            var sex1=document.getElementById("DropDownList2");
            var dob1=document.getElementById("txtfromdate1");            
            var alive1=document.getElementById("CheckBox2");
            var addr1=document.getElementById("TextBox11");
            
            var city1=document.getElementById("DropDownList6");
            var state1=document.getElementById("DropDownList7");
            var country1=document.getElementById("DropDownList8");
            var mobile1=document.getElementById("TextBox15");
            var email1=document.getElementById("TextBox16");
            var image1=document.getElementById("FileUpload2");
            
            
            
             var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;

                
                
             
            if (ltrim(fname.value)=="")
            { alert("Enter Name"); fname.value=""; fname.focus(); return false; }
            else if((trim(fname.value).length!=fname.value.length)||(fname.value.match(naExp)==null))
            {  alert("Name contain illegal characters!"); fname.focus(); return false; }
            
            
            
            if (ltrim(nname.value)=="")
            { alert("Enter Nick name"); nname.value=""; nname.focus(); return false; }
            else if((trim(nname.value).length!=nname.value.length)||(nname.value.match(naExp)==null))
            {  alert("Nick Name contain illegal characters!"); nname.focus(); return false; }

            if (ltrim(faname.value)=="")
            { alert("Enter Father's name"); faname.value=""; faname.focus(); return false; }
            else if((trim(faname.value).length!=faname.value.length)||(faname.value.match(naExp)==null))
            {  alert("Father's Name contain illegal characters!"); faname.focus(); return false; }
            
            if (ltrim(maname.value)=="")
            { alert("Please enter Mother name"); maname.value=""; maname.focus(); return false; }
            else if((trim(maname.value).length!=maname.value.length)||(maname.value.match(naExp)==null))
            {  alert("Mother Name contain illegal characters!"); maname.focus(); return false; }

            
            
//            if(sex.selectedIndex==0)
//            { alert("Please Select Gender"); sex.focus(); return false; }
            
            
           
            if (ltrim(dob.value)=="")
            { alert("Please Select Date"); dob.value=""; dob.focus(); return false; }
           
          
//             if (ltrim(alive.value)=="")
//            { alert("Please Select Alive"); alive.value=""; alive.focus(); return false; }
            
	        if (ltrim(addr.value)=="")
            { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }
            var str=addr.value;
            var addrExp =/^[a-zA-z0-9._%+-]+\S/;
           
	        if(str.match(addrExp)==null)	
	        { alert("Address contain illegal characters"); addr.focus(); return false; }
	        
            
            
          
          
            if(country.selectedIndex==0)
            { alert("Please Select Country"); country.focus(); return false; }
            
            if(state.selectedIndex==0)
            { alert("Please Select State"); state.focus(); return false; }
                        
              if(city.selectedIndex==0)
            { alert("Please Select City"); city.focus(); return false; }
            
            
	       
            if (mobile.value!="")
            {
             var str=mobile.value;
            var mobileExp = /^\d{10}$/;
	        if(str.match(mobileExp)==null)	
	        { alert("Mobile should be numeric & 10 digits"); mobile.focus(); return false; }
            }
            if (email.value!="")
            { 
            
            str=email.value;
            var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp)==null)	
	        { alert("Enter Valid Email Id"); email.focus(); return false; }
	        }
	         
	           if (image.value!="")
//            { alert("Please Upload your Image"); image.value=""; image.focus(); return false; }
        {
        str=image.value;
        var exp=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(bmp))$/;
        if(str.match(exp)==null)
        { alert("Select Image File Only To Upload !"); image.focus(); return false; }
        }
	         
//	      
//            if (image.value!="")
//            {
//        
//        str=image.value;
//        var exp=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(bmp))$/;
//        if(str.match(exp)==null)
//        { alert("Select Image File Only To Upload !"); image.focus(); return false; }
//        
//           
//	        }
	        
	        
	        
	        
	        
	        
	        
	        if (ltrim(fname1.value)=="")
            { alert("Enter Name"); fname1.value=""; fname1.focus(); return false; }
            else if((trim(fname1.value).length!=fname1.value.length)||(fname1.value.match(naExp)==null))
            {  alert("Name contain illegal characters!"); fname1.focus(); return false; }
            
            
            
            if (ltrim(nname1.value)=="")
            { alert("Enter Nick name"); nname1.value=""; nname1.focus(); return false; }
            else if((trim(nname1.value).length!=nname1.value.length)||(nname1.value.match(naExp)==null))
            {  alert("Nick Name contain illegal characters!"); nname1.focus(); return false; }

            if (ltrim(faname1.value)=="")
            { alert("Please enter Father's name"); faname1.value=""; faname1.focus(); return false; }
            else if((trim(faname1.value).length!=faname1.value.length)||(faname1.value.match(naExp)==null))
            {  alert("Father's Name contain illegal characters!"); faname1.focus(); return false; }
            
            if (ltrim(maname1.value)=="")
            { alert("Enter Mother's name"); maname1.value=""; maname1.focus(); return false; }
            else if((trim(maname1.value).length!=maname1.value.length)||(maname1.value.match(naExp)==null))
            {  alert("Mother's Name contain illegal characters!"); maname1.focus(); return false; }

            
            
//            if(sex1.selectedIndex==0)
//            { alert("Please Select Gender"); sex1.focus(); return false; }
            
            
          
            if (ltrim(dob1.value)=="")
            { alert("Please Select Date"); dob1.value=""; dob1.focus(); return false; }
            
            
	        if (ltrim(addr1.value)=="")
            { alert("Please enter Address"); addr1.value=""; addr1.focus(); return false; }
            var str=addr1.value;
            var addrExp1 =/^[a-zA-z0-9._%+-]+\S/;
           
	        if(str.match(addrExp1)==null)	
	        { alert("Address contain illegal characters"); addr1.focus(); return false; }
	        
            
            
            
          
            if(country1.selectedIndex==0)
            { alert("Please Select Country"); country1.focus(); return false; }
              
            if(state1.selectedIndex==0)
            { alert("Please Select State"); state1.focus(); return false; }
            
            if(city1.selectedIndex==0)
            { alert("Please Select City"); city1.focus(); return false; }
            
            
            
	       
            if (mobile1.value!="")
            {
             var str=mobile1.value;
            var mobileExp1 = /^\d{10}$/;
	        if(str.match(mobileExp1)==null)	
	        { alert("Mobile should be numeric & 10 digits"); mobile1.focus(); return false; }
            }
            if (email1.value!="")
            { 
            
            str=email1.value;
            var emailExp1 = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp1)==null)	
	        { alert("Enter Valid Email Id"); email1.focus(); return false; }
	        }
	          if (image1.value!="")
//            { alert("Please Upload your Image"); image1.value=""; image1.focus(); return false; }
        {
        str=image1.value;
        var exp=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(bmp))$/;
        if(str.match(exp)==null)
        { alert("Select Image File Only To Upload !"); image1.focus(); return false; }
	         }
//            if (image1.value!="")
//            {
//        
//        str=image1.value;
//        var exp1=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(bmp))$/;
//        if(str.match(exp1)==null)
//        { alert("Select Image File Only To Upload !"); image1.focus(); return false; }
//        
//           
//	        }
	          
            
        }
        
        
         function FOrbituary()
            {
            var name=document.getElementById("TextBox13");
            var relation=document.getElementById("TextBox4");
            var sex=document.getElementById("DropDownList1");
            var dob=document.getElementById("txtfromdate");
            var dod=document.getElementById("Text1");
            var addr=document.getElementById("TextBox1");            
            var city=document.getElementById("DropDownList3");
            var state=document.getElementById("DropDownList4");
            var country=document.getElementById("DropDownList5");
            var mobile=document.getElementById("TextBox3");
            var email=document.getElementById("TextBox2");
            var desp=document.getElementById("TextBox9");
            var image=document.getElementById("FileUpload1");
            
            var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;
            var addrExp =/^[a-zA-z0-9._%+-]+\S/;
                
             	        
            if (ltrim(name.value)=="")
            { alert("Please enter Name"); name.value=""; name.focus(); return false; }
            else if((trim(name.value).length!=name.value.length)||(name.value.match(naExp)==null))
            {  alert("Name contain illegal characters!"); name.focus(); return false; }  
        
              if (ltrim(relation.value)=="")
            { alert("Please Enter Relation"); relation.value=""; relation.focus(); return false; }  
             else if((trim(relation.value).length!=relation.value.length)||(relation.value.match(naExp)==null))
            {  alert("Relation contain illegal characters!"); relation.focus(); return false; }  
	        
            if(sex.selectedIndex==0)
           { alert("Please Select Gender"); sex.focus(); return false; }                                                
                   
                   if (ltrim(dob.value)=="")
            { alert("Please Select Date of Birth"); dob.value=""; dob.focus(); return false; }  
            
             if (ltrim(dod.value)=="")
            { alert("Please Select Died On Date"); dod.value=""; dod.focus(); return false; }  
            
//	        if (ltrim(addr.value)=="")
//            { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }
//            var str=addr.value;
//            var addrExp =/^[a-zA-z0-9._%+-]+\S/;
//           
//	        if(str.match(addrExp)==null)	
//	        { alert("Address contain illegal characters"); addr.focus(); return false; }
	                    
//	        if(addr.value=="")
//	        { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }  
//	       else (addr.value!="")
//            {             
//            str=addr.value;
//            var addrExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
//	        if(str.match(addrExp)==null)	
//	        { alert("Address contain illegal characters"); addr.focus(); return false; }
//	        } 
             if (ltrim(addr.value)=="")
            { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }                 
	        else if((trim(addr.value).length!=addr.value.length)||(addr.value.match(addrExp)==null))
            {  alert("Address contain illegal characters!"); addr.focus(); return false; }    
            
                   
//	        if (addr.value!="")
//            {             
//            str=addr.value;
//            var addrExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]$/;
//	        if(str.match(addrExp)==null)	
//	        { alert("Address contain illegal characters"); addr.focus(); return false; }
//	        }       
	        
           
           if(country.selectedIndex==0)
            { alert("Please Select Country"); country.focus(); return false; }  
          
            if(state.selectedIndex==0)
            { alert("Please Select State"); state.focus(); return false; }
            
            if(city.selectedIndex==0)
            { alert("Please Select City"); city.focus(); return false; }
          
                   
            if (mobile.value!="")
            {
             var str=mobile.value;
            var mobileExp = /^\d{10}$/;
	        if(str.match(mobileExp)==null)	
	        { alert("Mobile Number should be numeric & 10 digits"); mobile.focus(); return false; }
            }           
	        
	        if (email.value!="")
            {             
            str=email.value;
            var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp)==null)	
	        { alert("Enter Valid Email Id"); email.focus(); return false; }
	        }  
	        	  
	        if (ltrim(desp.value)=="")
            { alert("Please enter Description"); desp.value=""; desp.focus(); return false; }   	  
	        else if((trim(desp.value).length!=desp.value.length)||(desp.value.match(addrExp)==null))
            {  alert("Description contain illegal characters!"); desp.focus(); return false; }    
            
            
            if (image.value!="")
            {        
            str=image.value;
            var exp=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(bmp))$/;
            if(str.match(exp)==null)
            { alert("Select Image File Only To Upload !"); image.focus(); return false; }       
	        }
	        }
	        
        
        
        function loss()
            {
            var name=document.getElementById("TextBox13");
            var age=document.getElementById("TextBox1");
            var sex=document.getElementById("DropDownList1");            
            var dom=document.getElementById("txtfromdate");            
            var image=document.getElementById("FileUpload1");            
            var desp=document.getElementById("TextBox9");            
            var status=document.getElementById("DropDownList2");            
            var addr=document.getElementById("TextBox10");     
                            
            var city=document.getElementById("DropDownList3");
            var state=document.getElementById("DropDownList4");
            var country=document.getElementById("DropDownList5");  
            var mobile=document.getElementById("TextBox11");
            var email=document.getElementById("TextBox12");           
            
            var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;
            var addrExp =/^[a-zA-z0-9._%+-]+\S/;
            var naExp1=/^([0-9\s])+$/;
                             	 
                             	 
                             	         
            if (ltrim(name.value)=="")
            { alert("Please enter Name"); name.value=""; name.focus(); return false; }
            else if((trim(name.value).length!=name.value.length)||(name.value.match(naExp)==null))
            {  alert("Name contain illegal characters!"); name.focus(); return false; }  
        
              if (ltrim(age.value)=="")
            { alert("Please Enter age"); age.value=""; age.focus(); return false; }  
             else if((trim(age.value).length!=age.value.length)||(age.value.match(naExp1)==null))
            {  alert("Only Integers are Allowed!"); age.focus(); return false; }  
            
                  if (age.value<1)
            { alert("Enter Correct age"); age.value=""; age.focus(); return false; }
              if (age.value>150)
            { alert("Enter Correct Age"); age.value=""; age.focus(); return false; }
	        
            if(sex.selectedIndex==0)
           { alert("Please Select Gender"); sex.focus(); return false; }                                                
                   
                   if (ltrim(dom.value)=="")
            { alert("Please Select Date of Missing"); dom.value=""; dom.focus(); return false; }  
         
          if (image.value!="")
            {        
            str=image.value;
            var exp=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(bmp))$/;
            if(str.match(exp)==null)
            { alert("Select Image File Only To Upload !"); image.focus(); return false; }       
	        }
	        
               if (ltrim(desp.value)=="")
            { alert("Please enter Description"); desp.value=""; desp.focus(); return false; }   	  
//	        else if((trim(desp.value).length!=desp.value.length)||(desp.value.match(addrExp)==null))
//            {  alert("Description contain illegal characters!"); desp.focus(); return false; }    
            
             if(status.selectedIndex==0)
            { alert("Please Select Status"); status.focus(); return false; }
            
             if (ltrim(addr.value)=="")
            { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }                 
	        else if((trim(addr.value).length!=addr.value.length)||(addr.value.match(addrExp)==null))
            {  alert("Address contain illegal characters!"); addr.focus(); return false; }    
                
//	        if (ltrim(addr.value)=="")
//            { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }
//            var str=addr.value;
//            var addrExp =/^[a-zA-z0-9._%+-]+\S/;
//           
//	        if(str.match(addrExp)==null)	
//	        { alert("Address contain illegal characters"); addr.focus(); return false; }
	                    
//	        if(addr.value=="")
//	        { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }  
//	       else (addr.value!="")
//            {             
//            str=addr.value;
//            var addrExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
//	        if(str.match(addrExp)==null)	
//	        { alert("Address contain illegal characters"); addr.focus(); return false; }
//	        } 

            
            
                   
//	        if (addr.value!="")
//            {             
//            str=addr.value;
//            var addrExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]$/;
//	        if(str.match(addrExp)==null)	
//	        { alert("Address contain illegal characters"); addr.focus(); return false; }
//	        }       
	        
            
          
          if(country.selectedIndex==0)
            { alert("Please Select Country"); country.focus(); return false; }
          
            if(state.selectedIndex==0)
            { alert("Please Select State"); state.focus(); return false; }
            
              if(city.selectedIndex==0)
            { alert("Please Select City"); city.focus(); return false; }
            
                   
            if (mobile.value!="")
            {
             var str=mobile.value;
            var mobileExp = /^\d{10}$/;
	        if(str.match(mobileExp)==null)	
	        { alert("Mobile Number should be numeric & 10 digits"); mobile.focus(); return false; }
            }           
	        
	        if (email.value!="")
            {             
            str=email.value;
            var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp)==null)	
	        { alert("Enter Valid Email Id"); email.focus(); return false; }
	        }  
	        	  
	          
            
            
           
	        }
        
        function lossedit()
            {
            var name=document.getElementById("TextBox13");
            var age=document.getElementById("TextBox1");
            var sex=document.getElementById("DropDownList1");            
            var dom=document.getElementById("txtfromdate");            
//            var image=document.getElementById("FileUpload1");            
            var desp=document.getElementById("TextBox9");            
            var status=document.getElementById("DropDownList2");            
            var addr=document.getElementById("TextBox10");     
                            
            var city=document.getElementById("DropDownList3");
            var state=document.getElementById("DropDownList4");
            var country=document.getElementById("DropDownList5");  
            var mobile=document.getElementById("TextBox11");
            var email=document.getElementById("TextBox12");           
            
            var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;
            var addrExp =/^[a-zA-z0-9._%+-]+\S/;
            var naExp1=/^([0-9\s])+$/;
                             	 
                             	 
                             	         
            if (ltrim(name.value)=="")
            { alert("Please enter Name"); name.value=""; name.focus(); return false; }
            else if((trim(name.value).length!=name.value.length)||(name.value.match(naExp)==null))
            {  alert("Name contain illegal characters!"); name.focus(); return false; }  
        
              if (ltrim(age.value)=="")
            { alert("Please Enter age"); age.value=""; age.focus(); return false; }  
             else if((trim(age.value).length!=age.value.length)||(age.value.match(naExp1)==null))
            {  alert("Only Integers are Allowed!"); age.focus(); return false; }  
            
                  if (age.value<1)
            { alert("Enter Correct age"); age.value=""; age.focus(); return false; }
              if (age.value>150)
            { alert("Enter Correct Age"); age.value=""; age.focus(); return false; }
	        
            if(sex.selectedIndex==0)
           { alert("Please Select Gender"); sex.focus(); return false; }                                                
                   
                   if (ltrim(dom.value)=="")
            { alert("Please Select Date of Missing"); dom.value=""; dom.focus(); return false; }  
         
//          if (image.value!="")
//            {        
//            str=image.value;
//            var exp=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(bmp))$/;
//            if(str.match(exp)==null)
//            { alert("Select Image File Only To Upload !"); image.focus(); return false; }       
//	        }
	        
               if (ltrim(desp.value)=="")
            { alert("Please enter Description"); desp.value=""; desp.focus(); return false; }   	  
//	        else if((trim(desp.value).length!=desp.value.length)||(desp.value.match(addrExp)==null))
//            {  alert("Description contain illegal characters!"); desp.focus(); return false; }    
            
             if(status.selectedIndex==0)
            { alert("Please Select Status"); status.focus(); return false; }
            
             if (ltrim(addr.value)=="")
            { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }                 
	        else if((trim(addr.value).length!=addr.value.length)||(addr.value.match(addrExp)==null))
            {  alert("Address contain illegal characters!"); addr.focus(); return false; }    
                
//	        if (ltrim(addr.value)=="")
//            { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }
//            var str=addr.value;
//            var addrExp =/^[a-zA-z0-9._%+-]+\S/;
//           
//	        if(str.match(addrExp)==null)	
//	        { alert("Address contain illegal characters"); addr.focus(); return false; }
	                    
//	        if(addr.value=="")
//	        { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }  
//	       else (addr.value!="")
//            {             
//            str=addr.value;
//            var addrExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
//	        if(str.match(addrExp)==null)	
//	        { alert("Address contain illegal characters"); addr.focus(); return false; }
//	        } 

            
            
                   
//	        if (addr.value!="")
//            {             
//            str=addr.value;
//            var addrExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]$/;
//	        if(str.match(addrExp)==null)	
//	        { alert("Address contain illegal characters"); addr.focus(); return false; }
//	        }       
	        
            
          
          if(country.selectedIndex==0)
            { alert("Please Select Country"); country.focus(); return false; }
          
            if(state.selectedIndex==0)
            { alert("Please Select State"); state.focus(); return false; }
            
              if(city.selectedIndex==0)
            { alert("Please Select City"); city.focus(); return false; }
            
                   
            if (mobile.value!="")
            {
             var str=mobile.value;
            var mobileExp = /^\d{10}$/;
	        if(str.match(mobileExp)==null)	
	        { alert("Mobile Number should be numeric & 10 digits"); mobile.focus(); return false; }
            }           
	        
	        if (email.value!="")
            {             
            str=email.value;
            var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp)==null)	
	        { alert("Enter Valid Email Id"); email.focus(); return false; }
	        }  
	        	  
	          
            
            
           
	        }
	        
	        
         function FSon()
            {
            var fname=document.getElementById("TextBox1");
            var nname=document.getElementById("TextBox2");
            var sex=document.getElementById("DropDownList1");
            var dob=document.getElementById("txtfromdate");
            var addr=document.getElementById("TextBox3");            
            var city=document.getElementById("DropDownList2");
            var state=document.getElementById("DropDownList4");
            var country=document.getElementById("DropDownList5");
            var mobile=document.getElementById("TextBox7");
            var email=document.getElementById("TextBox8");
            var image=document.getElementById("FileUpload1");
            
            
            var fname1=document.getElementById("TextBox4");
            var nname1=document.getElementById("TextBox5");
            var sex1=document.getElementById("DropDownList3");
             var dob1=document.getElementById("txtfromdate");
            var addr1=document.getElementById("TextBox6");            
            var city1=document.getElementById("DropDownList6");
            var state1=document.getElementById("DropDownList7");
            var country1=document.getElementById("DropDownList8");
            var mobile1=document.getElementById("TextBox9");
            var email1=document.getElementById("TextBox10");
            var image1=document.getElementById("FileUpload2");
            
            
            
             var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;

                
                
             
            if (ltrim(fname.value)=="")
            { alert("Please enter Name"); fname.value=""; fname.focus(); return false; }
            else if((trim(fname.value).length!=fname.value.length)||(fname.value.match(naExp)==null))
            {  alert("Name contain illegal characters!"); fname.focus(); return false; }            
                       
            if (ltrim(nname.value)=="")
            { alert("Please enter Nick name"); nname.value=""; nname.focus(); return false; }
            else if((trim(nname.value).length!=nname.value.length)||(nname.value.match(naExp)==null))
            {  alert("Nick Name contain illegal characters!"); nname.focus(); return false; }           
            
//            if(sex.selectedIndex==0)
//            { alert("Please Select Gender"); sex.focus(); return false; }                                                
                   
                   if (ltrim(dob.value)=="")
            { alert("Please Select Date"); dob.value=""; dob.focus(); return false; }  
            
	        if (ltrim(addr.value)=="")
            { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }
            var str=addr.value;
            var addrExp =/^[a-zA-z0-9._%+-]+\S/;
           
	        if(str.match(addrExp)==null)	
	        { alert("Address contain illegal characters"); addr.focus(); return false; }
	        
           
 if(country.selectedIndex==0)
            { alert("Please Select Country"); country.focus(); return false; }
            if(state.selectedIndex==0)
            { alert("Please Select State"); state.focus(); return false; }
                         
            if(city.selectedIndex==0)
            { alert("Please Select City"); city.focus(); return false; }
          
           
            
            
            
	       
            if (mobile.value!="")
            {
             var str=mobile.value;
            var mobileExp = /^\d{10}$/;
	        if(str.match(mobileExp)==null)	
	        { alert("Mobile should be numeric & 10 digits"); mobile.focus(); return false; }
            }
            if (email.value!="")
            { 
            
            str=email.value;
            var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp)==null)	
	        { alert("Enter Valid Email Id"); email.focus(); return false; }
	        }
	         
            if (image.value!="")
            {
        
        str=image.value;
        var exp=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(bmp))$/;
        if(str.match(exp)==null)
        { alert("Select Image File Only To Upload !"); image.focus(); return false; }
        
           
	        }
	        
	        
	        
	        
	        
	        
	        
	        if (ltrim(fname1.value)=="")
            { alert("Please enter  Name"); fname1.value=""; fname1.focus(); return false; }
            else if((trim(fname1.value).length!=fname1.value.length)||(fname1.value.match(naExp)==null))
            {  alert(" Name contain illegal characters!"); fname1.focus(); return false; }
            
            
            
            if (ltrim(nname1.value)=="")
            { alert("Please enter Nick name"); nname1.value=""; nname1.focus(); return false; }
            else if((trim(nname1.value).length!=nname1.value.length)||(nname1.value.match(naExp)==null))
            {  alert("Nick Name contain illegal characters!"); nname1.focus(); return false; }

           
            
            
//            if(sex1.selectedIndex==0)
//            { alert("Please Select Gender"); sex1.focus(); return false; }
            
            
             if (ltrim(dob1.value)=="")
            { alert("Please Select Date"); dob1.value=""; dob1.focus(); return false; }  
            
            
	        if (ltrim(addr1.value)=="")
            { alert("Please enter Address"); addr1.value=""; addr1.focus(); return false; }
            var str=addr1.value;
            var addrExp1 =/^[a-zA-z0-9._%+-]+\S/;
           
	        if(str.match(addrExp1)==null)	
	        { alert("Address contain illegal characters"); addr1.focus(); return false; }
	        
            
           
          

            
            
            if(country1.selectedIndex==0)
            { alert("Please Select Country"); country1.focus(); return false; }
            
            if(state1.selectedIndex==0)
            { alert("Please Select State"); state1.focus(); return false; }
             
            if(city1.selectedIndex==0)
            { alert("Please Select City"); city1.focus(); return false; }
	       
            if (mobile1.value!="")
            {
             var str=mobile1.value;
            var mobileExp1 = /^\d{10}$/;
	        if(str.match(mobileExp1)==null)	
	        { alert("Mobile should be numeric & 10 digits"); mobile1.focus(); return false; }
            }
            if (email1.value!="")
            { 
            
            str=email1.value;
            var emailExp1 = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp1)==null)	
	        { alert("Enter Valid Email Id"); email1.focus(); return false; }
	        }
	         
            if (image1.value!="")
            {
        
        str=image1.value;
        var exp1=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(bmp))$/;
        if(str.match(exp1)==null)
        { alert("Select Image File Only To Upload !"); image1.focus(); return false; }
        
           
	        }
	          
            
        }
        
        
        
        
        
        
         
        function FPartner()
            {
            
            var fname=document.getElementById("TextBox1");
            var nname=document.getElementById("TextBox2");       
            var sex=document.getElementById("DropDownList1");
            var dob=document.getElementById("txtfromdate");  
            var doa=document.getElementById("txtwedding");     
            var fathername=document.getElementById("TextBox4");
            var mothername=document.getElementById("TextBox5");
            var alive=document.getElementById("CheckBox1");
            var addr=document.getElementById("TextBox3");            
            var city=document.getElementById("DropDownList2");
            var state=document.getElementById("DropDownList4");
            var country=document.getElementById("DropDownList5");
            var mobile=document.getElementById("TextBox7");
            var email=document.getElementById("TextBox8");
            var image=document.getElementById("FileUpload1");
            
            var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;         
    
            if (ltrim(fname.value)=="")
            { alert("Please enter Name"); fname.value=""; fname.focus(); return false; }
            else if((trim(fname.value).length!=fname.value.length)||(fname.value.match(naExp)==null))
            {  alert("Name contain illegal characters!"); fname.focus(); return false; }
                        
            
            if (ltrim(nname.value)=="")
            { alert("Please enter Nick name"); nname.value=""; nname.focus(); return false; }
            else if((trim(nname.value).length!=nname.value.length)||(nname.value.match(naExp)==null))
            {  alert("Nick Name contain illegal characters!"); nname.focus(); return false; }

                                  
//            if(sex.selectedIndex==0)
//            { alert("Please Select Gender"); sex.focus(); return false; }
            
            if (ltrim(dob.value)=="")
            { alert("Please Select DOB"); dob.value=""; dob.focus(); return false; }
            
            if (ltrim(doa.value)=="")
            { alert("Please Select DOA"); doa.value=""; doa.focus(); return false; }                                               
            
            
            if (ltrim(fathername.value)=="")
            { alert("Please enter Father Name"); fathername.value=""; fathername.focus(); return false; }
            else if((trim(fathername.value).length!=fathername.value.length)||(fathername.value.match(naExp)==null))
            {  alert("Name contain illegal characters!"); fathername.focus(); return false; }
                        
                        
            if (ltrim(mothername.value)=="")
            { alert("Please enter Mother Name"); mothername.value=""; mothername.focus(); return false; }
            else if((trim(mothername.value).length!=mothername.value.length)||(mothername.value.match(naExp)==null))
            {  alert("Name contain illegal characters!"); mothername.focus(); return false; }
                        
            
	        if (ltrim(addr.value)=="")
            { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }
            var str=addr.value;
            var addrExp =/^[a-zA-z0-9._%+-]+\S/;
           
	        if(str.match(addrExp)==null)	
	        { alert("Address contain illegal characters"); addr.focus(); return false; }
	        
            
            
            
          
  if(country.selectedIndex==0)
            { alert("Please Select Country"); country.focus(); return false; }
            if(state.selectedIndex==0)
            { alert("Please Select State"); state.focus(); return false; }
            
          if(city.selectedIndex==0)
            { alert("Please Select City"); city.focus(); return false; }
            
            
            
	       
            if (mobile.value!="")
            {
             var str=mobile.value;
            var mobileExp = /^\d{10}$/;
	        if(str.match(mobileExp)==null)	
	        { alert("Mobile should be numeric & 10 digits"); mobile.focus(); return false; }
            }
            if (email.value!="")
            { 
            
            str=email.value;
            var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp)==null)	
	        { alert("Enter Valid Email Id"); email.focus(); return false; }
	        }
	         
            if (image.value!="")
            {
        
        str=image.value;
        var exp=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(bmp))$/;
        if(str.match(exp)==null)
        { alert("Select Image File Only To Upload !"); image.focus(); return false; }
        
           
	        }
	        }
	   
	   
	   
	   function FProfile()
            {
            
            var name=document.getElementById("TextBox1");
            var nname=document.getElementById("TextBox2"); 
            
            var addr=document.getElementById("TextBox5"); 
            var city=document.getElementById("DropDownList1");
            var state=document.getElementById("DropDownList2");
            var country=document.getElementById("DropDownList3");            
            var sex=document.getElementById("DropDownList4");
            
            var dob=document.getElementById("txtfromdate"); 
            var email=document.getElementById("TextBox6"); 
            var mobile=document.getElementById("TextBox7");           
            var doa=document.getElementById("txtwedding");     
            
            var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;         
    
            if (ltrim(name.value)=="")
            { alert("Please enter Name"); name.value=""; name.focus(); return false; }
            else if((trim(name.value).length!=name.value.length)||(name.value.match(naExp)==null))
            {  alert("Name contain illegal characters!"); name.focus(); return false; }
                        
            
            if (ltrim(nname.value)=="")
            { alert("Please enter Nick name"); nname.value=""; nname.focus(); return false; }
            else if((trim(nname.value).length!=nname.value.length)||(nname.value.match(naExp)==null))
            {  alert("Nick Name contain illegal characters!"); nname.focus(); return false; }

            if (ltrim(addr.value)=="")
            { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }
            var str=addr.value;
            var addrExp =/^[a-zA-z0-9._%+-]+\S/;
           
	        if(str.match(addrExp)==null)	
	        { alert("Address contain illegal characters"); addr.focus(); return false; }
                                  
             if(city.selectedIndex==0)
            { alert("Please Select City"); city.focus(); return false; }
          
 if(country.selectedIndex==0)
            { alert("Please Select Country"); country.focus(); return false; } 
            if(state.selectedIndex==0)
            { alert("Please Select State"); state.focus(); return false; }
             if(city.selectedIndex==0)
            { alert("Please Select City"); city.focus(); return false; }
                                
                                  
            if(sex.selectedIndex==0)
            { alert("Please Select Gender"); sex.focus(); return false; }
            
            
            if (ltrim(dob.value)=="")
            { alert("Please Select DOB"); dob.value=""; dob.focus(); return false; }
           
            if (email.value!="")
            { 
            
            str=email.value;
            var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp)==null)	
	        { alert("Enter Valid Email Id"); email.focus(); return false; }
	        }
            
            if (mobile.value!="")
            {
            var str=mobile.value;
            var mobileExp = /^\d{10}$/;
	        if(str.match(mobileExp)==null)	
	        { alert("Mobile should be numeric & 10 digits"); mobile.focus(); return false; }
            }
            
                 if (ltrim(doa.value)=="")
            { alert("Please Select DOA"); doa.value=""; doa.focus(); return false; } 
                                                      
            
	        }
	        
	   
	    function FRelation()
            {
            var relative=document.getElementById("DropDownList3");
            var fname=document.getElementById("TextBox1");
            var nname=document.getElementById("TextBox2");
            
            
            //var sex=document.getElementById("DropDownList1");
            var dob=document.getElementById("txtfromdate");            
            var alive=document.getElementById("CheckBox1");
            var addr=document.getElementById("TextBox3");
            
            var city=document.getElementById("DropDownList2");
            var state=document.getElementById("DropDownList4");
            var country=document.getElementById("DropDownList5");
            var mobile=document.getElementById("TextBox7");
            var email=document.getElementById("TextBox8");
            var image=document.getElementById("FileUpload1");
            
            
            
            
            
            
             var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;

            if(relative.selectedIndex==0)
            { alert("Please Select Relation"); relative.focus(); return false; }
                
                
             
            if (ltrim(fname.value)=="")
            { alert("Please enter Name"); fname.value=""; fname.focus(); return false; }
            else if((trim(fname.value).length!=fname.value.length)||(fname.value.match(naExp)==null))
            {  alert("Name contain illegal characters!"); fname.focus(); return false; }
            
            
            
            if (ltrim(nname.value)=="")
            { alert("Please enter Nick name"); nname.value=""; nname.focus(); return false; }
            else if((trim(nname.value).length!=nname.value.length)||(nname.value.match(naExp)==null))
            {  alert("Nick Name contain illegal characters!"); nname.focus(); return false; }

           
            
            
//            if(sex.selectedIndex==0)
//            { alert("Please Select Gender"); sex.focus(); return false; }
            
             if (ltrim(dob.value)=="")
            { alert("Please Select DOB"); dob.value=""; dob.focus(); return false; }
            
       
	        if (ltrim(addr.value)=="")
            { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }
            var str=addr.value;
            var addrExp =/^[a-zA-z0-9._%+-]+\S/;
           
	        if(str.match(addrExp)==null)	
	        { alert("Address contain illegal characters"); addr.focus(); return false; }
	        
            
            
            
          
if(country.selectedIndex==0)
            { alert("Please Select Country"); country.focus(); return false; }
            if(state.selectedIndex==0)
            { alert("Please Select State"); state.focus(); return false; }
            
            if(city.selectedIndex==0)
            { alert("Please Select City"); city.focus(); return false; }
            
            
            
	       
            if (mobile.value!="")
            {
            var str=mobile.value;
            var mobileExp = /^\d{10}$/;
	        if(str.match(mobileExp)==null)	
	        { alert("Mobile should be numeric & 10 digits"); mobile.focus(); return false; }
            }
            if (email.value!="")
            { 
            
            str=email.value;
            var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp)==null)	
	        { alert("Enter Valid Email Id"); email.focus(); return false; }
	        }
	         
            if (image.value!="")
            {
        
        str=image.value;
        var exp=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(bmp))$/;
        if(str.match(exp)==null)
        { alert("Select Image File Only To Upload !"); image.focus(); return false; }
        
           
	        }
	        }
	   
	        
	        
	        
	          
            
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        function YVendorlog()
        {
        var uname=document.getElementById("TextBox1");
            var pwd=document.getElementById("TextBox2");
         var c=/\W/;
            var d=/[\W_]/;
            
            
                
        
          if (ltrim(uname.value)=="")
            { alert("Please enter  Username"); uname.value=""; uname.focus(); return false; }
            else if(c.test(uname.value))
    { alert("The Username contains illegal characters!"); uname.focus(); return false; }
            
            
	        
            
            if (ltrim(pwd.value)=="")
            { alert("Please enter Password"); pwd.value=""; pwd.focus(); return false; }
            else if(d.test(pwd.value))
    { alert("The Password contains illegal characters!"); pwd.focus(); return false; }
        
        }
        
        
        
        
        
            
            
            
            function YAdvertise()
            {
            var cmpyname=document.getElementById("TextBox1");
            var fname=document.getElementById("TextBox2");
            var addr=document.getElementById("TextBox3");
            var location=document.getElementById("TextBox4");
            var city=document.getElementById("DropDownList4");
            //var rbtmale=document.getElementById("RadioButton1");
            var state=document.getElementById("DropDownList1");
            //var rbtfemale=document.getElementById("RadioButton2");
            var mobile=document.getElementById("TextBox8");
            var phone=document.getElementById("TextBox7");
            var email=document.getElementById("TextBox9");
            var website=document.getElementById("TextBox10");
            var pincode=document.getElementById("TextBox6");
            var country=document.getElementById("DropDownList2");
            var category=document.getElementById("DropDownList3");
            var subcategory=document.getElementById("TextBox11");
            var Description=document.getElementById("TextBox12");
            var image=document.getElementById("FileUpload1");
             var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;
            var naExp1=/^([a-zA-Z,\s])+$/;
            var cmpynameExp = /^([a-zA-Z0-9\s])+$/;
            
            
      
            
            
           
            
            
                if (ltrim(cmpyname.value)=="")
            { alert("Please enter Companyname"); cmpyname.value=""; cmpyname.focus(); return false; }
            else if((trim(cmpyname.value).length!=cmpyname.value.length)||(cmpyname.value.match(cmpynameExp)==null))
    {  alert("Company Name contain illegal characters!"); cmpyname.focus(); return false; }

            
            if (ltrim(fname.value)=="")
            { alert("Please enter Name"); fname.value=""; fname.focus(); return false; }
            else if((trim(fname.value).length!=fname.value.length)||(fname.value.match(naExp)==null))
    {  alert("Name contain illegal characters!"); fname.focus(); return false; }

	        if (ltrim(addr.value)=="")
            { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }
            var str=addr.value;
            var addrExp =/^[a-zA-z0-9._%+-]+\S/;
           
	        if(str.match(addrExp)==null)	
	        { alert("Address contain illegal characters"); addr.focus(); return false; }
	        
	        
            
            if (ltrim(location.value)=="")
            { alert("Please enter location"); location.value=""; location.focus(); return false; }
            else if((trim(location.value).length!=location.value.length)||(location.value.match(naExp)==null))
    {  alert("Location contain illegal characters!"); location.focus(); return false; }

	        
	      
            if(city.selectedIndex==0)
            { alert("Please Select City"); city.focus(); return false; }
          

            if(state.selectedIndex==0)
            { alert("Please Select State"); state.focus(); return false; }
            
            if(country.selectedIndex==0)
            { alert("Please Select Country"); country.focus(); return false; }
            
//          if (ltrim(state.value)=="Select State")
//            { alert("Please enter State"); state.value=""; state.focus(); return false; }
           
            
	        
            
            if (ltrim(pincode.value)=="")
            { alert("Please enter pincode"); pincode.value=""; pincode.focus(); return false; }
            var str=pincode.value;
            var pincodeExp = /^\d{6}$/;
	        if(str.match(pincodeExp)==null)	
	        { alert("Pincode should be Nuemric & 6 digits"); pincode.focus(); return false; }
	        
         
           if (phone.value!="")
            { 
             var str=phone.value;
            var phoneExp = /^([\d]{3}[\s-]{1}[\d]{8}|[\d]{4}[\s-]{1}[\d]{7}|[\d]{5}[\s-]{1}[\d]{6}|[\d]{10})$/;
	        if(str.match(phoneExp)==null)	
	        { alert("Phone No should be numeric & in proper format"); phone.focus(); return false; }
            }
            
            
            
            
            
            if (ltrim(mobile.value)=="")
            { alert("Please enter  mobile number"); mobile.value=""; mobile.focus(); return false; }
             var str=mobile.value;
            var mobileExp = /^\d{10}$/;
	        if(str.match(mobileExp)==null)	
	        { alert("Mobile should be numeric & 10 digits"); mobile.focus(); return false; }
            
            
            if (ltrim(email.value)=="")
            { alert("Please enter Email"); email.value=""; email.focus(); return false; }
            
            str=email.value;
            var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp)==null)	
	        { alert("Email Id contain illegal characters"); email.focus(); return false; }
	        
	       
            
             if(website.value!="")
	        {
	       var str=website.value;
	       var websiteExp= /^(www.[a-zA-Z0-9].)[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}$/;
	       if(str.match(websiteExp)==null)
	       { alert ("Website contain illegal characters"); website.focus(); return false; }
	       
	        }
	           if(category.selectedIndex==0)
            { alert("Please Select Category"); category.focus(); return false; }
            
	         if (ltrim(subcategory.value)=="")
            { alert("Please enter subcategory"); subcategory.value=""; subcategory.focus(); return false; }
            else if((trim(subcategory.value).length!=subcategory.value.length)||(subcategory.value.match(naExp1)==null))
    {  alert("subcategory contain illegal characters!"); subcategory.focus(); return false; }
     
	        
             if(image.value!="")
        {
        
        str=image.value;
        var exp=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(bmp))$/;
        if(str.match(exp)==null)
        { alert("Select Image File Only To Upload !"); image.focus(); return false; }
        }
        
        
        
            if (ltrim(Description.value)=="")
            { alert("Please enter Description"); Description.value=""; Description.focus(); return false; }
            var str=Description.value;
            var DescriptionExp =/^[a-zA-z0-9._%+-]+\S/;
           
	        if(str.match(DescriptionExp)==null)	
	        { alert("Description contain illegal characters");Description.focus(); return false; }
	        
	        
    
//      if (ltrim( Description.value)=="")
//            { alert("Please enter  Description");  Description.value="";  Description.focus(); return false; }
////            else if((trim( Description.value).length!= Description.value.length)||( Description.value.match(naExp)==null))
////    {  alert(" Description contain illegal characters!");  Description.focus(); return false; }
           
	     
	     }




            function AdminAdvertise()
            {
            var cmpyname=document.getElementById("TextBox1");
            var fname=document.getElementById("TextBox2");
            var addr=document.getElementById("TextBox3");
            var location=document.getElementById("TextBox4");
            var city=document.getElementById("DropDownList4");
            //var rbtmale=document.getElementById("RadioButton1");
            var state=document.getElementById("DropDownList1");
            var country=document.getElementById("DropDownList2");
            var category=document.getElementById("DropDownList3");
            //var rbtfemale=document.getElementById("RadioButton2");
            var mobile=document.getElementById("TextBox8");
            var phone=document.getElementById("TextBox7");
            var email=document.getElementById("TextBox9");
            var website=document.getElementById("TextBox10");
            var pincode=document.getElementById("TextBox6");
            //var country=document.getElementById("txtcountry");
            var subcategory=document.getElementById("TextBox11");
            var Description=document.getElementById("TextBox12");
            
             var image=document.getElementById("FileUpload1");
        
       
            
             var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;
            var naExp1=/^([a-zA-Z,\s])+$/;
             var cmpynameExp = /^([a-zA-Z0-9\s])+$/;
               if (ltrim(cmpyname.value)=="")
            { alert("Please enter Companyname"); cmpyname.value=""; cmpyname.focus(); return false; }
            else if((trim(cmpyname.value).length!=cmpyname.value.length)||(cmpyname.value.match(cmpynameExp)==null))
    {  alert("Company Name contain illegal characters!"); cmpyname.focus(); return false; }

            
            
            if (ltrim(fname.value)=="")
            { alert("Please enter Name"); fname.value=""; fname.focus(); return false; }
            else if((trim(fname.value).length!=fname.value.length)||(fname.value.match(naExp)==null))
    {  alert("Name contain illegal characters!"); fname.focus(); return false; }

	        if (ltrim(addr.value)=="")
            { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }
            var str=addr.value;
            var addrExp =/^[a-zA-z0-9._%+-]+\S/;
           
	        if(str.match(addrExp)==null)	
	        { alert("Address contain illegal characters"); addr.focus(); return false; }
	        
	        
            
            if (ltrim(location.value)=="")
            { alert("Please enter location"); location.value=""; location.focus(); return false; }
            else if((trim(location.value).length!=location.value.length)||(location.value.match(naExp)==null))
    {  alert("Location contain illegal characters!"); location.focus(); return false; }

	        
	        if(city.selectedIndex==0)
            { alert("Please Select City"); city.focus(); return false; }
	        


            if(state.selectedIndex==0)
            { alert("Please Select State"); state.focus(); return false; }
	        
	        
	        if(country.selectedIndex==0)
            { alert("Please Select Country"); country.focus(); return false; }
	        
//          if (ltrim(state.value)=="Select State")
//            { alert("Please enter State"); state.value=""; state.focus(); return false; }
           
            
	        
            
            if (ltrim(pincode.value)=="")
            { alert("Please enter pincode"); pincode.value=""; pincode.focus(); return false; }
            var str=pincode.value;
            var pincodeExp = /^\d{6}$/;
	        if(str.match(pincodeExp)==null)	
	        { alert("Pincode should be Nuemric & 6 digits"); pincode.focus(); return false; }
	        
         
           if (phone.value!="")
            {
             var str=phone.value;
            var phoneExp = /^([\d]{3}[\s-]{1}[\d]{8}|[\d]{4}[\s-]{1}[\d]{7}|[\d]{5}[\s-]{1}[\d]{6}|[\d]{10})$/;
	        if(str.match(phoneExp)==null)	
	        { alert("Phone No should be numeric & in proper format"); phone.focus(); return false; }
            }
            
            
            
            
            
            if (ltrim(mobile.value)=="")
            { alert("Please enter  mobile number"); mobile.value=""; mobile.focus(); return false; }
             var str=mobile.value;
            var mobileExp = /^\d{10}$/;
	        if(str.match(mobileExp)==null)	
	        { alert("Mobile should be numeric & 10 digits"); mobile.focus(); return false; }
            
            
            if (ltrim(email.value)=="")
            { alert("Please enter Email"); email.value=""; email.focus(); return false; }
            
            str=email.value;
            var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp)==null)	
	        { alert("Email Id contain illegal characters"); email.focus(); return false; }
	        
	         if(website.value!="")
	        {
	       var str=website.value;
	       var websiteExp= /^(www.[a-zA-Z0-9].)[a-zA-Z0-9\-\.]+\.[a-zA-Z]*$/;
	       if(str.match(websiteExp)==null)
	       { alert ("Website contain illegal characters");website.value=""; website.focus(); return false; }
	       
	        }
	        
	          if(website.value!="")
	        {
	       var str=website.value;
	       var websiteExp= /^(www.[a-zA-Z0-9].)[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}$/;
	       if(str.match(websiteExp)==null)
	       { alert ("Website contain illegal characters"); website.focus(); return false; }
	       
	        }
	        
	        
	    if(category.selectedIndex==0)
            { alert("Please Select Category"); category.focus(); return false; }
	        
	        
            
               if (ltrim(subcategory.value)=="")
            { alert("Please enter subcategory"); subcategory.value=""; subcategory.focus(); return false; }
            else if((trim(subcategory.value).length!=subcategory.value.length)||(subcategory.value.match(naExp1)==null))
    {  alert("subcategory contain illegal characters!"); subcategory.focus(); return false; }
    
    
     if(image.value!="")
        {
        
        str=image.value;
        var exp=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(bmp))$/;
        if(str.match(exp)==null)
        { alert("Select Image File Only To Upload !"); image.focus(); return false; }
        }
        
        
        
      if (ltrim( Description.value)=="")
            { alert("Please enter  Description");  Description.value="";  Description.focus(); return false; }
 
	     
	     }
	     
	     
	     
	     
	     function AdminEditAdvertise()
            {
            var cmpyname=document.getElementById("TextBox1");
            var fname=document.getElementById("TextBox2");
            var addr=document.getElementById("TextBox3");
            var location=document.getElementById("TextBox4");
            var city=document.getElementById("DropDownList1");
            //var rbtmale=document.getElementById("RadioButton1");
            var state=document.getElementById("DropDownList1");
            var country=document.getElementById("DropDownList2");
            var category=document.getElementById("DropDownList3");
            //var rbtfemale=document.getElementById("RadioButton2");
            var mobile=document.getElementById("TextBox8");
            var phone=document.getElementById("TextBox7");
            var email=document.getElementById("TextBox9");
            var website=document.getElementById("TextBox10");
            var pincode=document.getElementById("TextBox6");
            //var country=document.getElementById("txtcountry");
            var subcategory=document.getElementById("TextBox11");
            var Description=document.getElementById("TextBox12");
            var image=document.getElementById("FileUpload1");
             var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;
            var naExp1=/^([a-zA-Z,\s])+$/;
           
            
      
            
            
           
            
                      var cmpynameExp = /^([a-zA-Z0-9\s])+$/;
                      
                      
               if (ltrim(cmpyname.value)=="")
            { alert("Please enter Companyname"); cmpyname.value=""; cmpyname.focus(); return false; }
            else if((trim(cmpyname.value).length!=cmpyname.value.length)||(cmpyname.value.match(cmpynameExp)==null))
    {  alert("Company Name contain illegal characters!"); cmpyname.focus(); return false; }

 
            if (ltrim(fname.value)=="")
            { alert("Please enter Name"); fname.value=""; fname.focus(); return false; }
            else if((trim(fname.value).length!=fname.value.length)||(fname.value.match(naExp)==null))
    {  alert("Name contain illegal characters!"); fname.focus(); return false; }

	        if (ltrim(addr.value)=="")
            { alert("Please enter Address"); addr.value=""; addr.focus(); return false; }
            var str=addr.value;
            var addrExp =/^[a-zA-z0-9._%+-]+\S/;
           
	        if(str.match(addrExp)==null)	
	        { alert("Address contain illegal characters"); addr.focus(); return false; }
	        
	        
            
            if (ltrim(location.value)=="")
            { alert("Please enter location"); location.value=""; location.focus(); return false; }
            else if((trim(location.value).length!=location.value.length)||(location.value.match(naExp)==null))
    {  alert("Location contain illegal characters!"); location.focus(); return false; }

	        
	        

//              if(state.selectedIndex==0)
//            { alert("Please Select State"); state.focus(); return false; }
//            
//               if(country.selectedIndex==0)
//            { alert("Please Select Country"); country.focus(); return false; }
//	     
	     
//          if (ltrim(state.value)=="Select State")
//            { alert("Please enter State"); state.value=""; state.focus(); return false; }
           
            
	        
            
            if (ltrim(pincode.value)=="")
            { alert("Please enter pincode"); pincode.value=""; pincode.focus(); return false; }
            var str=pincode.value;
            var pincodeExp = /^\d{6}$/;
	        if(str.match(pincodeExp)==null)	
	        { alert("Pincode should be Nuemric & 6 digits"); pincode.focus(); return false; }
	        
         
           if (phone.value!="")
            { 
             var str=phone.value;
            var phoneExp = /^([\d]{3}[\s-]{1}[\d]{8}|[\d]{4}[\s-]{1}[\d]{7}|[\d]{5}[\s-]{1}[\d]{6}|[\d]{10})$/;
	        if(str.match(phoneExp)==null)	
	        { alert("Phone No should be numeric & in proper format"); phone.focus(); return false; }
            
            }
            
            
            
            
            if (ltrim(mobile.value)=="")
            { alert("Please enter  mobile number"); mobile.value=""; mobile.focus(); return false; }
             var str=mobile.value;
            var mobileExp = /^\d{10}$/;
	        if(str.match(mobileExp)==null)	
	        { alert("Mobile should be numeric & 10 digits"); mobile.focus(); return false; }
            
            
            if (ltrim(email.value)=="")
            { alert("Please enter Email"); email.value=""; email.focus(); return false; }
            
          var  str=email.value;
            var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp)==null)	
	        { alert("Email Id contain illegal characters"); email.focus(); return false; }
	        
	        
	         if(website.value!="")
	        {
	       var str=website.value;
	       var websiteExp= /^(www.[a-zA-Z0-9].)[a-zA-Z0-9\-\.]+\.[a-zA-Z]*$/;
	       if(str.match(websiteExp)==null)
	       { alert ("Website contain illegal characters");website.value=""; website.focus(); return false; }
	       
	        }
	        
	        
	        
	        
//	        
//	       if(category.selectedIndex==0)
//            { alert("Please Select Category"); category.focus(); return false; }
//	     
	        
            
             if (ltrim(subcategory.value)=="")
            { alert("Please enter subcategory"); subcategory.value=""; subcategory.focus(); return false; }
            else if((trim(subcategory.value).length!=subcategory.value.length)||(subcategory.value.match(naExp1)==null))
    {  alert("subcategory contain illegal characters!"); subcategory.focus(); return false; }
    
    
   
        
        
      if (ltrim( Description.value)=="")
            { alert("Please enter  Description");  Description.value="";  Description.focus(); return false; }
 
	     
	     }
	     
	     
	     
	     
	      function AdminEditprofile()
            {
            var fname=document.getElementById("TextBox1");
            var email=document.getElementById("TextBox2");
            var phone=document.getElementById("TextBox3");
            var mobile=document.getElementById("TextBox4");
            var uname=document.getElementById("TextBox5");
            var pwd=document.getElementById("TextBox6");
            
	         var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;
            
	          
         if (ltrim(fname.value)=="")
            { alert("Please enter Name"); fname.value=""; fname.focus(); return false; }
            else if((trim(fname.value).length!=fname.value.length)||(fname.value.match(naExp)==null))
    {  alert("Name contain illegal characters!"); fname.focus(); return false; }

 if (ltrim(email.value)=="")
            { alert("Please enter Email"); email.value=""; email.focus(); return false; }
            
            str=email.value;
            var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp)==null)	
	        { alert("Email Id contain illegal characters"); email.focus(); return false; }
	        
	        
	        if (phone.value!="")
            {
             var str=phone.value;
            var phoneExp = /^([\d]{3}[\s-]{1}[\d]{8}|[\d]{4}[\s-]{1}[\d]{7}|[\d]{5}[\s-]{1}[\d]{6}|[\d]{10})$/;
	        if(str.match(phoneExp)==null)	
	        { alert("Phone No should be numeric & in proper format"); phone.focus(); return false; }
            }

 if (ltrim(mobile.value)=="")
            { alert("Please enter  mobile number"); mobile.value=""; mobile.focus(); return false; }
             var str=mobile.value;
            var mobileExp = /^\d{10}$/;
	        if(str.match(mobileExp)==null)	
	        { alert("Mobile should be numeric & 10 digits"); mobile.focus(); return false; }
            
            
              if (ltrim(uname.value)=="")
            { alert("Please enter  Username"); uname.value=""; uname.focus(); return false; }
            else if(c.test(uname.value))
    { alert("The Username contains illegal characters!"); uname.focus(); return false; }
            
            
	        
            
            if (ltrim(pwd.value)=="")
            { alert("Please enter Password"); pwd.value=""; pwd.focus(); return false; }
            else if(d.test(pwd.value))
    { alert("The Password contains illegal characters!"); pwd.focus(); return false; }
            }
            
            
            
            
            
            
              function Tellurfriend()
            {
            var fname=document.getElementById("TextBox1");
            var email=document.getElementById("TextBox2");
            
            var mobile=document.getElementById("TextBox3");
            var Description=document.getElementById("TextBox4");
            
             var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;

            
            
            
            if (ltrim(fname.value)=="")
            { alert("Please enter Name"); fname.value=""; fname.focus(); return false; }
            else if((trim(fname.value).length!=fname.value.length)||(fname.value.match(naExp)==null))
    {  alert("Name contain illegal characters!"); fname.focus(); return false; }

           if (ltrim(email.value)=="")
            { alert("Please enter Email"); email.value=""; email.focus(); return false; }
            
            str=email.value;
            var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp)==null)	
	        { alert("Email Id contain illegal characters"); email.focus(); return false; }
	        
	         

             if (ltrim(mobile.value)=="")
            { alert("Please enter  mobile number"); mobile.value=""; mobile.focus(); return false; }
             var str=mobile.value;
            var mobileExp = /^\d{10}$/;
	        if(str.match(mobileExp)==null)	
	        { alert("Mobile should be numeric & 10 digits"); mobile.focus(); return false; }
            
         if (ltrim( Description.value)=="")
            { alert("Please enter  Description");  Description.value="";  Description.focus(); return false; }
            }
 
	     function Vendoredit()
	     {
	        var fname=document.getElementById("TextBox1");
            var email=document.getElementById("TextBox2");
            var phone=document.getElementById("TextBox3");
            var mobile=document.getElementById("TextBox4");
            
	         var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;
            
	          
         if (ltrim(fname.value)=="")
            { alert("Please enter Name"); fname.value=""; fname.focus(); return false; }
            else if((trim(fname.value).length!=fname.value.length)||(fname.value.match(naExp)==null))
    {  alert("Name contain illegal characters!"); fname.focus(); return false; }

            if (ltrim(email.value)=="")
            { alert("Please enter Email"); email.value=""; email.focus(); return false; }
            
            str=email.value;
            var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp)==null)	
	        { alert("Email Id contain illegal characters"); email.focus(); return false; }
	        
	        
	        if (phone.value!="")
            {
             var str=phone.value;
            var phoneExp = /^([\d]{3}[\s-]{1}[\d]{8}|[\d]{4}[\s-]{1}[\d]{7}|[\d]{5}[\s-]{1}[\d]{6}|[\d]{10})$/;
	        if(str.match(phoneExp)==null)	
	        { alert("Phone No should be numeric & in proper format"); phone.focus(); return false; }
            }

            if (ltrim(mobile.value)=="")
            { alert("Please enter  mobile number"); mobile.value=""; mobile.focus(); return false; }
             var str=mobile.value;
            var mobileExp = /^\d{10}$/;
	        if(str.match(mobileExp)==null)	
	        { alert("Mobile should be numeric & 10 digits"); mobile.focus(); return false; }
            
            
               }
            
            
            
    function Advancedsearch()
        {
            var keyword=document.getElementById("TextBox1");
             var keyword1=document.getElementById("TextBox2");
              var keyword2=document.getElementById("TextBox3");
            var mobile=document.getElementById("TextBox4");
            
            var d=/[\W_]/;
            
            var naExp=/^([a-zA-Z\s,])+$/;
            
            if(keyword.value!="")
            {            
            
            if((trim(keyword.value).length!=keyword.value.length)||(keyword.value.match(naExp)==null))
    {  alert("keywords contain illegal characters!"); keyword.focus(); return false; }
    }
    
    
     if(keyword1.value!="")
            {            
            
            if((trim(keyword1.value).length!=keyword1.value.length)||(keyword1.value.match(naExp)==null))
    {  alert("keywords contain illegal characters!"); keyword1.focus(); return false; }
    }
     if(keyword2.value!="")
            {            
            
            if((trim(keyword2.value).length!=keyword2.value.length)||(keyword2.value.match(naExp)==null))
    {  alert("keywords contain illegal characters!"); keyword2.focus(); return false; }
    }

            
            if(mobile.value!="")
            {
            
             var str=mobile.value;
            var mobileExp = /^\d{10}$/;
	        if(str.match(mobileExp)==null)	
	        { alert("Mobile No contain illegal characters"); mobile.focus(); return false; }
             }         
}	


        function forgetpassword()
        {
         var email=document.getElementById("TextBox2");
            var c=/\W/;
            var d=/[\W_]/;
            var naExp=/^([a-zA-Z\s])+$/;
            
          
          if (ltrim(email.value)=="")
            { alert("Please enter Email"); email.value=""; email.focus(); return false; }
            
            str=email.value;
            var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	        if(str.match(emailExp)==null)	
	        { alert("Email Id contain illegal characters"); email.focus(); return false; }
	        }
	        
	        function Image()
	        {
	          var image=document.getElementById("FileUpload1");
	        
	           if(image.value!="")
        {
        
        str=image.value;
        var exp=/^.+\.((jpg)|(gif)|(jpeg)|(png)|(bmp))$/;
        if(str.match(exp)==null)
        { alert("Select Image File Only To Upload !"); image.focus(); return false; }
        }
        }
        
