function validsubmit()
{
var err="";
if(document.formmain.clspostjob_postby.selectedIndex==0) err+="Select one option from \'you are a:\' listbox\n";
if(ValidatorTrim(document.formmain.clspostjob_orgname.value)=="") err+="Organisation name is required field.\n";
if(ValidatorTrim(document.formmain.clspostjob_location.value)=="") err+="Location is required field.\n";
//if(ValidatorTrim(document.formmain.clspostjob_url.value)=="") err+="Url is required field.\n";

if(ValidatorTrim(document.formmain.clspostjob_contactfirstname.value)=="") err+="Contact name is required field.\n";
if(ValidatorTrim(document.formmain.clspostjob_contactemail.value)=="")
	err+="Contact email is required field \n";
else
	err += checkEmail(document.formmain.clspostjob_contactemail.value);
if(ValidatorTrim(document.formmain.clspostjob_contactemail.value)!=ValidatorTrim(document.formmain.clspostjob_contactconfirmemail.value))
	err+="Both the e-mail must be same.\n";

if(ValidatorTrim(document.formmain.clspostjob_contactaddress1.value)=="") err+="Contact Address is required field.\n";
if(ValidatorTrim(document.formmain.clspostjob_jobcity.value)=="") err+="City is required field.\n";
if(ValidatorTrim(document.formmain.clspostjob_jobregionid.value)=="-1") err+="State is required field.\n";
if(ValidatorTrim(document.formmain.clspostjob_jobzip.value)=="") err+="Zip Code is required field.\n";

if(ValidatorTrim(document.formmain.clspostjob_contactaddress1.value)=="") err+="Contact Address is required field.\n";
if(ValidatorTrim(document.formmain.clspostjob_jobtitle.value)=="") err+="Job Title is required field \n";
if(ValidatorTrim(document.formmain.clspostjob_jobdesc.value)=="") err+="Job Description is required field \n";
if(document.formmain.clspostjob_minyearsexp.selectedIndex==0) err+="Minimum years experience is required field\n";
if(ValidatorTrim(document.formmain.clspostjob_orgdesc.value)=="") err+="Organisation description is required field\n";

var flg=false;
for(i = 0; i < document.formmain.elements.length; i++)
{
	if(document.formmain.elements[i].name=="clspostjob_recieveapplication[]" && document.formmain.elements[i].type == "checkbox" && document.formmain.elements[i].checked)
	{		
		flg=true;
		if(document.formmain.elements[i].value==3)
		{
			if(ValidatorTrim(document.formmain.clspostjob_contactfax.value)=="") err+="Contact Fax is required field.\n";
		}
	}
}
if(!flg)
	err+="Select atleast one option from\n how to receive applications?\n";
	
var jobtypeflag=false;
for(i = 0; i < document.formmain.elements.length; i++)
{
	if(document.formmain.elements[i].name=="clspostjob_arrjobtypeparameters[]" && document.formmain.elements[i].type == "checkbox" && document.formmain.elements[i].checked)
	{
		jobtypeflag=true;
	}
}
if(jobtypeflag==false) err += "Job Type is required\n";

var firmtypeflag=false;
for(i = 0; i < document.formmain.elements.length; i++)
{
	if(document.formmain.elements[i].name=="clspostjob_arrfirmtypeparameters[]" && document.formmain.elements[i].type == "checkbox" && document.formmain.elements[i].checked)
	{
		firmtypeflag=true;
	}
}
if(firmtypeflag==false) err += "Employer Type is required\n";

var practiceareaflag=false;
for(i = 0; i < document.formmain.elements.length; i++)
{
	if(document.formmain.elements[i].name=="clspostjob_arrparameters[]" && document.formmain.elements[i].type == "checkbox" && document.formmain.elements[i].checked)
	{
		practiceareaflag=true;
	}
}
if(practiceareaflag==false) err += "Practice Areas is required\n";



if(err!=""){
	alert(err);
	return false;
	}
else
	{
		document.formmain.clspostjob_hdnsubmited.value='1';
		return true;
	}
}
