function validate()
{
c1=0;c2=0;c3=0;c4=0;c5=0;c6=0;c7=0;
//c8=0;c9=0;
c10=0;c11=0;c12=0;c13=0;
ph=0;count=0;count1=0;
a=document.f.name.value;
b=document.f.email.value;
//c=document.f.acode.value;
d=document.f.phone.value;
e=document.f.companyname.value;
n=document.f.purpose.value;
g=document.f.textarea.value;
h=document.f.url1.value;
ii=document.f.url2.value;
j=document.f.url3.value;
other=document.f.others.value;
//money=document.f.money.value;
//validation for Name
if(a=="")
{
document.getElementById("s1").innerHTML=' Name is required';
c1=1;
}
else
{
for(i=0;i<a.length;i++)
{
temp=a.charCodeAt(i);
if((temp>=65 && temp<=90)||(temp>=97 && temp<=122)||(temp==32))
{}
else
{
document.getElementById("s1").innerHTML=' Invalid Name';
c1=1;
}
}
}
//validation for email
if(b=="")
{
document.getElementById("s2").innerHTML=' Email is required';
c2=1;
}
else
{
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(f.email.value))
{}
else
{
document.getElementById("s2").innerHTML=' Invalid Email';
c2=1;
}
}
//validation for acode
/*if(c=="")
{
document.getElementById("s3").innerHTML='* Enter the Areacode';
c3=1;
}
else
{
if(isNaN(c))
{
document.getElementById("s3").innerHTML='* Areacode will not accept Characters';
c3=1;
}
}*/
//validation for Phone
if(d=="")
{
document.getElementById("ss").innerHTML=' Phone Number is required';
c4=1;
}
else
{
if(isNaN(d))
{
document.getElementById("ss").innerHTML=' Phone number will not accept Characters';
c4=1;
}
}
//validation for company name
if(e=="")
{
document.getElementById("s4").innerHTML=' Company Name is required';
c5=1;
}

//Validation for purpose
if(n=="")
{
document.getElementById("s5").innerHTML=' Primary Project Purpose is required';
c6=1;
}
//validation for textarea
if(g=="")
{
document.getElementById("s6").innerHTML=' Project Description is required';
c7=1;
}
//validation for money
/*if(money=="")
{
document.getElementById("s7").innerHTML='* Select project Budget';
c8=1;
}
//validation for time duration
for(var i=0; i<document.f.time.length; i++) 
{
if(document.f.time[i].checked)
{
count++;
}
}
if(count!=1)
{
document.getElementById("s8").innerHTML='* Select project Time';
c9=1;
}*/
//validation for checkbox
for(var i=0; i<document.f.idd.length; i++) 
{
if(document.f.idd[i].checked)
{
count1++;
}
}
if(count1<1 && other=="")
{
document.getElementById("special").innerHTML=' Please select atleast one service or type a one on others field';
c10=1;
}
//validation for url1
if(h=="")
{}
else
{
	 tomatch= /http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/
     if (tomatch.test(h))
     {}
     else
     {
  	document.getElementById("u1").innerHTML=' Invalid url(See Example)';
	c11=1;
	 }
 }
 //validation for url2
if(ii=="")
{}
else
{
	 tomatch= /http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/
     if (tomatch.test(ii))
     {}
     else
     {
  	document.getElementById("u2").innerHTML=' Invalid url(See Example)';
	c12=1;
     }
 }
  //validation for url3
if(j=="")
{}
else
{
	 tomatch= /http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/
     if (tomatch.test(j))
     {}
     else
     {
  	document.getElementById("u3").innerHTML=' Invalid url(See Example)';
	c13=1;
     }
 }


if(c1==0)
document.getElementById("s1").innerHTML='';
if(c2==0)
document.getElementById("s2").innerHTML='';
/*if(c3==0)
document.getElementById("s3").innerHTML='';*/
if(c4==0)
document.getElementById("ss").innerHTML='';
if(c5==0)
document.getElementById("s4").innerHTML='';
if(c6==0)
document.getElementById("s5").innerHTML='';
if(c7==0)
document.getElementById("s6").innerHTML='';
/*if(c8==0)
document.getElementById("s7").innerHTML='';
if(c9==0)
document.getElementById("s8").innerHTML='';*/
if(c10==0)
document.getElementById("special").innerHTML='';
if(c11==0)
document.getElementById("u1").innerHTML='';
if(c12==0)
document.getElementById("u2").innerHTML='';
if(c13==0)
document.getElementById("u3").innerHTML='';


if(c1==1 || c2==1 || c4==1 || c5==1 || c6==1 || c7==1 || c10==1 || c11==1 || c12==1 || c13==1)
{
return false;
}
else
{
document.getElementById("xx").disabled = true;
return true;
}

}