
function validate(){
 
	var regex = new RegExp(/\S{1,}/);
 
	var f=document.repair;
	var c=0;
	var m='Sorry, could not proceed due to the errors listed below. Please correct all errors before proceeding.\n\n';
 

	if(f.property_address.value.search(regex) == -1){
		m+='    - Street address is not valid.\n';
		c++;
	}

	if(f.property_suburb.value.search(regex) == -1){
		m+='    - Suburb is not valid.\n';
		c++;
	}

	if(f.first_name.value.search(regex) == -1){
		m+='    - Tenant\'s first name is not valid.\n';
		c++;
	}

	if(f.last_name.value.search(regex) == -1){
		m+='    - Tenant\'s surname is not valid.\n';
		c++;
	}

	if(f.repair_required.value.search(regex) == -1){
		m+='    - Indicate where is the repair required.\n';
		c++;
	}

	if(f.repair_type.value.search(regex) == -1){
		m+='    - Indicate what type of work is required.\n';
		c++;
	}

	if(f.what_needs_repair.value.search(regex) == -1){
		m+='    - Please give specific details of what needs repair.\n';
		c++;
	}

	if(f.enter_with_office_key[0].checked == false && f.enter_with_office_key[1].checked == false){
		m+='    - Access to the Property section is not complete.\n';
		c++;
  }
 
 
 
	if (c > 0){
		m+='\n';
		alert(m);
		return false;
	}
	else {
		return true;
	}
}

