/* Very basic JS Form Validation for empty fields */

function SubmitForm() {

  var errors = "";

  

  for (i = 0; i < document.forms[0].elements.length; i++) {

    if (document.forms[0].elements[i].value == "") {

      errors+= "- " + document.forms[0].elements[i].id + " is blank.\n";

    }

  }

  

  if (errors != "") {

    alert(errors);

    return false;

  }

}





/* Validates Add Job Form */

function ValidateAVForm () {

  if(document.getElementById('jobtitle').value=="") {

    alert("You need to complete the Job Title");

    return false;

  }

  if(document.getElementById('descr').value=="") {

    alert("You need to complete the Job Description");

    return false;

  }

  if(document.getElementById('your_ref_no').value=="") {

    alert("You need to complete the Job Reference No");

    return false;

  }

  if(document.getElementById('hours').value=="") {

    alert("You need to complete the number of Hours");

    return false;

  }

  if(document.getElementById('salarydescr').value=="") {

    alert("You need to complete the Salary Description");

    return false;

  }

  if(document.getElementById('postcode').value=="") {

    alert("You need to complete the Postcode");

    return false;

  }

  if(document.getElementById('locationdescr').value=="") {

    alert("You need to complete the Location Description");

    return false;

  }

  if(document.getElementById('expirydate').value=="") {

    alert("You need to complete the Expiry Date");

    return false;

  }

  return true;

}











	function blah($this){

	var found=null

	var els=document.getElementsByName($this.name)

	for(var i=0;i<els.length;i++){

	if(els[i]==$this){found=i;break}

	}

	

	if(found==0)return showNo()

	if(found==1)return showNo()

	if(found==2)return showYes()

	}

	function showYes(){

	document.getElementById("no1").style.display="none"

	document.getElementById("no1lbl").style.display="none"

	}

	function showNo(){

	document.getElementById("no1").style.display="block"

	document.getElementById("no1lbl").style.display="block"

	}
	
	
	
	
	
	
	
	
	
	
		<!--
	// for all date displays
	//by Bill Sanders. billsanders@yahoo.com
	//submitted and displayed at www.a1javascripts.com
	today = new Date();
	year = (today.getFullYear) ? today.getFullYear() : today.getYear();
	month = today.getMonth();
	switch (month) {
				 case 0 : month = "Jan"; break;
				 case 1 : month = "Feb"; break;
				 case 2 : month = "Mar"; break;
							 case 3 : month = "Apr"; break;
				 case 4 : month = "May"; break;
				 case 5 : month = "Jun"; break;
				 case 6 : month = "Jul"; break;
				 case 7 : month = "Aug"; break;
				 case 8 : month = "Sep"; break;
				 case 9 : month = "Oct"; break;
				 case 10 : month = "Nov"; break;
				 case 11 : month = "Dec"; break;
				 }
	date = today.getDate();
	day = today.getDay();
	switch (day) {
				 case 0 : day = "Sunday"; break;
				 case 1 : day = "Monday"; break;
				 case 2 : day = "Tuesday"; break;
				 case 3 : day = "Wednesday"; break;
				 case 4 : day = "Thursday"; break;
				 case 5 : day = "Friday"; break;
				 case 6 : day = "Saturday"; break;
				 }
	hours = today.getHours();
	  if (hours<12)  greeting = '<strong>Good morning</strong>';
		if (hours<18 && hours>11)  greeting = '<strong>Good afternoon</strong>';
		if (hours<20 && hours>17)  greeting = '<strong>Good evening</strong>';
	hour = (hours>12) ? (hours-12) : hours;
	halfDay = (hours>11 && hours<24) ? 'PM' : 'AM';
	minutes = today.getMinutes();
	dayStr =  day+ ', ' +date+ '&nbsp;' +month+ ',&nbsp;' +year;
	timeStr = (minutes<10) ? hour+ ':0' +minutes+ ' ' +halfDay : hour+ ':' +minutes+ ' ' +halfDay;
	
	// -->