
startUp = function() {
	if (document.getElementById){
	
		if (document.getElementById('validatedform') != null){
			document.getElementById('validatedform').onsubmit = function(){
				vform = document.getElementById('validatedform');
	
				for (i=0; i<document.forms.length; i++){
					if (document.forms[i].id == 'validatedform'){
						vform = document.forms[i];
					}
				}
				if (vform != null){
					for (i=0; i<vform.elements.length; i++){
						e = vform.elements[i];
						ename = e.name;
						if (e.className == 'required' && e.value == ''){
							alert('Please complete the ' + ename + ' field');
							return false;
						}
					}
				}
				return true;
	
			}
		}
	}
}
window.onload=startUp;


