
function specialval(num)
{
  var i=0;
   var j=0;
   for(i=0;i<num.length;i++)
   {
if(num.charAt(i) < '0'|| num.charAt(i) > '9') 
{
   if(!(num.charAt(i) == ' ' || num.charAt(i) == '(' || num.charAt(i)==')' || num.charAt(i)==',' || num.charAt(i)=='/' || num.charAt(i)=='-' || num.charAt(i)=='[' || num.charAt(i)==']' || num.charAt(i)=='+')) 
   {
    return false;
   }
}
}
return true;
}

function check(theForm)
{

  if(theForm.T1.value== "")
  {
   alert("Please enter your name");
   theForm.T1.focus();
   theForm.T1.select();
   return false;
   }
else
{
for(var i=0;i<theForm.T1.value.length;i++)
{
if(theForm.T1.value.charAt(i)<'A' || theForm.T1.value.charAt(i)>'Z')
{
if(theForm.T1.value.charAt(i)<'a' || theForm.T1.value.charAt(i)>'z')
{
if(!((theForm.T1.value.charAt(i)=='.') || (theForm.T1.value.charAt(i)==' ')))
{
alert("Only alphabets, a space and a . are allowed in the name field.");
theForm.T1.select();
theForm.T1.focus();
return false;
}
}
}
}
}
 if(theForm.S1.value== "")        
  {
   alert("Please enter your address");
   theForm.S1.focus();
   theForm.S1.select();
   return false;
   }

 if(theForm.phone.value== "")        
  {
   alert("Please enter your Phone No.");
   theForm.phone.focus();
   theForm.phone.select();
   return false;
   }

if(!specialval(theForm.phone.value))
     {
      alert("Please enter numbers in Phone field, Alphabets not accepted");
      theForm.phone.select();  
      theForm.phone.focus();
      return false;
}

  if(theForm.email.value.indexOf("@") == -1)
   {
   alert("Please enter a valid email address")
   theForm.email.focus();
   theForm.email.select();
   return false;
   }
  if(theForm.email.value.indexOf(".") == -1)
{
   alert("Please enter a valid email address")
   theForm.email.focus();
   theForm.email.select(); 
  return false;
   }
  if(theForm.S2.value== "")
  {
   alert("Please enter your Skill Set");
   theForm.S2.focus();
   theForm.S2.select();
   return false;
   }
  if(theForm.T3.value== "")        
  {
   alert("Please enter your area of expertise");
   theForm.T3.focus();
   theForm.T3.select();
   return false;
   }

return true;
}


function checkcontact(theForm)
{

  if(theForm.Name.value== "")
  {
   alert("Please enter your name");
   theForm.Name.focus();
   theForm.Name.select();
   return false;
   }
else
{
for(var i=0;i<theForm.Name.value.length;i++)
{
if(theForm.Name.value.charAt(i)<'A' || theForm.Name.value.charAt(i)>'Z')
{
if(theForm.Name.value.charAt(i)<'a' || theForm.Name.value.charAt(i)>'z')
{
if(!((theForm.Name.value.charAt(i)=='.') || (theForm.Name.value.charAt(i)==' ')))
{
alert("Only alphabets, a space and a . are allowed in the name field.");
theForm.Name.select();
theForm.Name.focus();
return false;
}
}
}
}
}

if(theForm.address.value== "")        
  {
   alert("Please enter your address");
   theForm.address.focus();
   theForm.address.select();
   return false;
   }

 if(theForm.phone.value== "")        
  {
   alert("Please enter your Phone");
   theForm.phone.focus();
   theForm.phone.select();
   return false;
   }

if(!specialval(theForm.phone.value))
     {
      alert("Please enter numbers in Phone field, Alphabets not accepted");
      theForm.phone.focus();
      theForm.phone.select();
      return false;
}

  if(theForm.email.value.indexOf("@") == -1)
   {
   alert("Please enter a valid email address")
   theForm.email.focus();
   theForm.email.select();
   return false;
   }
  if(theForm.email.value.indexOf(".") == -1)
{
   alert("Please enter a valid email address")
   theForm.email.focus();
   theForm.email.select(); 
  return false;
   }
  if(theForm.Services.value== "")
  {
   alert("Please enter the Services you require");
   theForm.Services.focus();
   theForm.Services.select();
   return false;
   }
return true;
}
