﻿	 function Contact()
		   {
		      if (document.getElementById("ctl00_ContentPlaceHolder1_txtname").value=='')
		    {
		        alert("Full Name cannot be blank");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtname").focus();
		        return false;
		    }
		     if (document.getElementById("ctl00_ContentPlaceHolder1_txtaddress").value=='')
		    {
		        alert("Address cannot be blank");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtaddress").focus();
		        return false;
		    }
		     if (document.getElementById("ctl00_ContentPlaceHolder1_txtcity").value=='')
		    {
		        alert("City cannot be blank");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtcity").focus();
		        return false;
		    }
		     if (document.getElementById("ctl00_ContentPlaceHolder1_txtcountry").value=='')
		    {
		        alert("Country cannot be blank");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtcountry").focus();
		        return false;
		    }
		     var fl=0;
    		
			    if(document.getElementById("ctl00_ContentPlaceHolder1_txtMobile").value!='')
			    {
				    fl =1;
			    }
    		
                if (document.getElementById("ctl00_ContentPlaceHolder1_txtphone").value!='')
                  {
				    fl =1;
			        }
	 		        if (fl==0)
	 		        {
 				    alert("Please Enter any one of them ( Mobile No or Telephone No) ");
 				    document.getElementById("ctl00_ContentPlaceHolder1_txtphone").focus();
 				    return false; 
 				    }
		      if (document.getElementById("ctl00_ContentPlaceHolder1_txtemail").value=='')
		    {
		        alert("E-Mail Address cannot be blank");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtemail").focus();
		        return false;
		    }
		   var msg = ''
		    if (document.getElementById("ctl00_ContentPlaceHolder1_txtemail").value!='')
	        {
	            regex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ //new RegExp(pattern);
	                if (!regex.test(document.getElementById("ctl00_ContentPlaceHolder1_txtemail").value))
					        {
						        msg=msg + "Please enter a valid E-Mail Address,\nfor example : \n     yourname@domain.com  OR\n     yourid@yourdomain.co.in  OR\n     yourid.somname@domain.co.in\n "
						        alert(msg);
						        document.getElementById("ctl00_ContentPlaceHolder1_txtemail").focus();
						        return false;
					        } 
		    }
		     if (document.getElementById("ctl00_ContentPlaceHolder1_txtinquiry").value=='')
		    {
		        alert("Inquiry cannot be blank");
		        document.getElementById("ctl00_ContentPlaceHolder1_txtinquiry").focus();
		        return false;
		    }
		  }
		  
		   function OpenPopupCenter(pageURL, title,w,h,scroll) 
        {
            var left = (screen.width/2)-(w/2);
            var top = (screen.height/2)-(h/2);
            var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars='+scroll+', resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
        } 
