<!-- 

// function to check a form for blank entries in required fields

function checkBlankFields(fieldsArray) {
	
	var error = false;
	// enter the id's of the inputs you want to check in order of appearence
	if(fieldsArray) {
		var checkInputs = fieldsArray.split(",");
		// var checkInputs = ['field1','field2', ...];
		// reverse the array so that the the focus is always given to the first blank field (not the last)
		checkInputs.reverse();
		
		// for each input in the array, check if a value is present and set class / focus
		checkInputs.each(function(input) {		
			if(!$(input).present()) {
				$(input+"_label").addClassName('oops');
				$(input).focus();
				error = true;
			} else {
				$(input+"_label").removeClassName('oops');
			}
			
		});
	} 
	
	if(error) {
		return true;	
	} else {
		return false;	
	}
	
}

//-->
