function validAll(){
	document.frm.reset();
	validField(document.frm.email, "reqEmail", "Email Address");
	validField(document.frm.password, "reqPassword", "Password");	
}


function checkAll(){

	var eMsg="";
	var isOK=true;

	if(document.frm.email.value==""){
		eMsg += "Email Address is required<br>";
	}
	if(document.frm.password.value==""){
		eMsg += "Password is required<br>";
	}

	if(eMsg !=""){
		eMsg = "The following field information is required:<br>" + eMsg;
		//goto top
		isOK = false;


if(document.getElementById('abox')!=null){
document.getElementById('ibox').removeChild(document.getElementById('abox'));	
}

var newdiv = document.createElement('div');
  var divIdName = 'abox';
  newdiv.setAttribute('id','abox');
  newdiv.setAttribute('name','abox');	
  newdiv.setAttribute('class','alert');	
  newdiv.setAttribute('className','alert');	
  newdiv.innerHTML = eMsg;
document.getElementById('ibox').appendChild(newdiv);
document.location.href="#top";
	} else {
	isOK=true;
document.getElementById('ibox').removeChild(document.getElementById('abox'));

	}
	return isOK;

}

function validField(f, msg, n){

	if(f.value==""){
		f.className="man";
		document.getElementById(msg).innerHTML = n + " is required";
	}else{
		f.className="normal";
		document.getElementById(msg).innerHTML = n + " is filled";
	}

}