function Validate(form)
{			
		v1=form.comp_name
		if(isblank(v1)==false) 
	 		{
			alert("Company name cannot be blank.");
			v1.focus(); 
			return false
			}	
			
			v1=form.trade_address
		if(isblank(v1)==false) 
	 		{
			alert("Trading address cannot be blank.");
			v1.focus(); 
			return false
			}	
			myOption = -1;
			for (i=form.radiobutton.length-1; i > -1; i--) {
			if (form.radiobutton[i].checked) {
			myOption = i; i = -1;
			}
			}
			if (myOption == -1) {
			alert("You must select type of business");
			return false;
			}			
				
			v1=form.comp_registration
		if(isblank(v1)==false) 
	 		{
			alert("Company registration cannot be blank.");
			v1.focus(); 
			return false
			}
			
			v1=form.registered_addr
		if(isblank(v1)==false) 
	 		{
			alert("Registered address cannot be blank.");
			v1.focus(); 
			return false
			}
			
			v1=form.head_off_addr
		if(isblank(v1)==false) 
	 		{
			alert("Head office address cannot be blank.");
			v1.focus(); 
			return false
			}
			
			v1=form.no_branches
		if(isblank(v1)==false) 
	 		{
			alert("No. of branches cannot be blank.");
			v1.focus(); 
			return false
			}
			
			v1=form.tel
		if(isblank(v1)==false) 
	 		{
			alert("Telephone No. cannot be blank.");
			v1.focus(); 
			return false
			}
						
			v1=form.email
		if(isblank(v1)==false) 
			{
			alert("E-mail cannot be blank.");
			v1.focus(); 
			return false
			}
		if(isEmail(v1)==false) 
			{
			alert("The email \""+ v1.value+" \"is not valid email");
			v1.focus(); 
			return false;
			}
			
			v1=form.email1
		if(isblank(v1)==false) 
			{
			alert("Retype E-mail cannot be blank.");
			v1.focus(); 
			return false
			}
		if(isEmail(v1)==false) 
			{
			alert("The email \""+ v1.value+" \"is not valid email");
			v1.focus(); 
			return false;
			}
									
		v1=form.contact_name
		if(isblank(v1)==false) 
			{
			alert("Contact name cannot be blank.");
			v1.focus(); 
			return false
			}
			
			v1=form.agencies
		if(isblank(v1)==false) 
			{
			alert("you must select type of agency");
			v1.focus(); 
			return false
			}
			
			v1=form.strCAPTCHA
		if(isblank(v1)==false) 
			{
			alert("you must enter varification code");
			v1.focus(); 
			return false
			}
			
	return true;
}




function isblank(s3) 
{
	if (s3.value == "") 
	{
	return false;
	}
else 
	{
	return true;
   }
}



function isEmail(s2) 
{
	if ((s2.value == "" || s2.value.indexOf('@', 0) == -1) || s2.value.indexOf('.')<5) 
	{
	return false;
	}
else {
	return true;
   	}
}



