<!-- hide from old browsers
function checkFormBach() {
  
  var valid = true;
  var errors = '';
  
  if (document.bachForm.name.value == "") {
	 valid = false;
	 errors += '- Name is required\r\n';
  }
  
  if (document.bachForm.surname.value == "") {
	 valid = false;
	 errors += '- Surname is required\r\n';
  }
  
   if (document.bachForm.occupation.value == "") {
	 valid = false;
	 errors += '- Occupation is required\r\n';
  }
  if (document.bachForm.number.value == "") {
	 valid = false;
	 errors += '- Contact number is required\r\n';
  }
  
   if (document.bachForm.email.value == "") {
	 valid = false;
	 errors += '- Email address is required\r\n';
  }
   if (document.bachForm.age.value == "") {
	 valid = false;
	 errors += '- Age is required\r\n';
  }

  if (!document.bachForm.agreeTerms.checked) {
	valid = false;
	errors += '- You must agree to the terms and conditions before you can continue';
  }
  
  if (errors) {
	alert(errors);  
  }
  
  return valid;
  
}


function checkFormUser() {
	
  var valid = true;
  var errors = '';
	
  	if (document.bachForm.name.value == "") {
	 valid = false;
	 errors += '- Name is required\r\n';
    }
  
  if (document.bachForm.surname.value == "") {
	 valid = false;
	 errors += '- Surname is required\r\n';
  }
   if (document.bachForm.username.value == "") {
	 valid = false;
	 errors += '- Username is required\r\n';
  }
   if (document.bachForm.email.value == "") {
	 valid = false;
	 errors += '- Email address is required\r\n';
  }
   if (document.bachForm.pwd.value == "") {
	 valid = false;
	 errors += '- Password is required\r\n';
  }
    if (document.bachForm.pwd2.value == "") {
	 valid = false;
	 errors += '- Password 2 is required\r\n';
  }
  if (document.bachForm.pwd.value != document.bachForm.pwd2.value) {
	 valid = false;
	 errors += '- Your passwords did not match\r\n';
  }
  
   if (document.bachForm.provinces.selectedIndex == 0) {
	 valid = false;
	 errors += '- Please select a province\r\n';
  }
  if (!document.bachForm.agreeTerms.checked) {
	valid = false;
	errors += '- You must agree to the terms and conditions before you can continue';
  }
   
  
  
  if (errors) {
	alert(errors);  
  }
  
  return valid;
}


function checkLogin() {
   var valid2 = true;
   
   var errors = "";
   
  if (document.loginNow.pwd.value == "") {
	  valid2 = false; 
	  errors += '- Password is required\r\n';
	  document.loginNow.pwd.focus();
   }
    if (document.loginNow.username.value == "") {
	  valid2 = false; 
	  document.loginNow.username.focus();
	  errors += '- Username is required\r\n';
   }
    
   
   if (errors) {
	   alert(errors);
   }
   
   return valid2;
   
}

function getPageName(f) {

 document.loginNow.submit();
}

function blogSubmitForm() {
    
	var valid = true;
	errors = '';
	
	if (document.blogSubmit.text.value == "") {
	   valid = false;
	   errors += '- Blog text is required\r\n';
	      document.blogSubmit.text.focus();
	}
	if (document.blogSubmit.blogName.value == "") {
	   valid = false;
	   errors += '- Blog title is required\r\n';
	   document.blogSubmit.blogName.focus();
	}
	
	if (errors) {
	   alert(errors);	
	}
	
	return valid;
	
}

function commentCheck(f) {
    
	var errors = '';
	var valid = true;
	
	if (f.commentHeading.value == "") {
	   valid = false;
	   errors += '- Blog title is required\r\n';
	   f.commentHeading.focus();
	}
	if (f.commentText.value == "") {
	   valid = false;
	   errors += '- Blog text is required\r\n';
	   f.commentHeading.focus();
	}
	
	if (errors) {
	   alert(errors);	
	}
	return valid;
	
	
}

// -->