function valid()
{
var f = document.raq;
if(f.name.value.search(/\S/)==-1)
{
	alert("All Fields are Mandatory. Please Enter Names.");
	f.name.focus();
	return false;
}
if(f.city.value.search(/\S/)==-1)
{
	alert("All Fields are Mandatory. Please Enter City.");
	f.city.focus();
	return false;
}
if(f.country.value=="#")
{
	alert("All Fields are Mandatory. Please Select Country.");
	f.country.focus();
	return false;
}
if(f.email.value.search(/\S/)==-1)
{
	alert("All Fields are Mandatory. Please Enter Email.");
	f.email.focus();
	return false;
}
if((/^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z.]{2,5}$/).exec(f.email.value)==null)
{
	alert("Enter Proper Email");
	f.email.select();
	return false;
}
if(f.phone.value.search(/\S/)==-1)
{
	alert( "Please, Provide The Phone Number." );
	f.phone.focus();
	return false;
}
if((/^[0-9]+$/).exec(f.phone.value)==null)
	{
		alert("Please Enter Numaric Contact Number.");
		f.phone.select();
		return false;
	}
if(f.service_required1.value == "#")
{
	alert( "Please, Provide The Required Service You Want." );
	f.service_required1.focus();
	return false;
}
if(f.start_time.value=="#")
{
	alert( "Please, Provide The Time You want to Start The Project." );
	f.start_time.focus();
	return false;
}
if(f.budget.value=="#")
{
	alert( "Please, Provide The Development Budget." );
	f.budget.focus();
	return false;
}
if(f.project_description.value.search(/\S/)==-1)
{
	alert( "Please, Provide The Project Description." );
	f.project_description.focus();
	return false;
}
if(f.project_description.value.length <50)
{
alert( "Very short description, Please Provide The Project Description in details." );
	f.project_description.focus();
	return false;
}
if(f.know_us1.value=="#")
{
	alert("Please Select reference");
	f.know_us1.focus();
	return false;
}
if(f.know_us1.value=="other")
{
	if(f.know_us2.value.search(/\S/)==-1)
	{
	alert("Please Enter reference");
	f.know_us2.focus();
	return false;
	}
}
if(f.imgveri.value != f.imgveri1.value)
	{
		alert( "Please enter the text in the image" );
		f.imgveri.focus();
		return false;
	}	
}
function change2()
{
if(document.raq.site_type1.value == "other")
{
document.getElementById('site_type1').style.display="none";
document.getElementById('site_type2').style.display="";
}
}
function change3()
{
if(document.raq.site_feature1.value == "other")
{
document.getElementById('site_feature1').style.display="none";
document.getElementById('site_feature2').style.display="";
}
}
function change()
{
if(document.raq.know_us1.value == "other")
{
document.getElementById('know_us1').style.display="none";
document.getElementById('know_us2').style.display="";
}
}

var d;
function fill_category(a,b,e,c)
{
var main_select = document.raq.service_required1;
var sub_select = document.raq.site_type1;
if(c==1)
{
d=1;
sub_select.length = 1;
}
if(main_select.options[main_select.selectedIndex].value == "#")
	{	
		document.getElementById('wfeature').style.display="none";
		document.getElementById('pneeded').style.display="none";
		document.getElementById('category').style.display="";
    	sub_select.options[d] = new Option("Please Select A Service");
		sub_select.options[d].value = "#";
	}
	else if(main_select.options[main_select.selectedIndex].value == "Website Design")
	{
		document.getElementById('category').style.display="none";
		document.getElementById('wfeature').style.display="";
		document.getElementById('pneeded').style.display="";
	}
	else if(main_select.options[main_select.selectedIndex].value == "Logo Design" || main_select.options[main_select.selectedIndex].value == "Ebook-Software Box")
	{
		document.getElementById('category').style.display="none";
		document.getElementById('wfeature').style.display="none";
		document.getElementById('pneeded').style.display="none";
	}
	else
	{
    if(main_select.options[main_select.selectedIndex].value == a)
	{
		document.getElementById('wfeature').style.display="none";
		document.getElementById('pneeded').style.display="none";
		document.getElementById('category').style.display="";
		sub_select.options[d] = new Option(e);
		sub_select.options[d++].value = b;
	}
	}
	return c;
}