// JavaScript Document for Account Login 
function getRadioValue(radioObject) {

	var value = null
//	alert ("Radio Value Check");
	
	for (var i=0; i<radioObject.length; i++) {	
		if (radioObject[i].checked) {
			value = radioObject[i].value
			break
		}
	}
	return value;
}
function checkLogin() {
	var iError = 0;

	if (document.AccountProfile.EMailAddress.value=="") {
  		alert("Please enter your Email Address!");
		iError = 1;
      	document.AccountProfile.EMailAddress.select();
   		document.AccountProfile.EMailAddress.focus();
   		return false;
	}

	if (getRadioValue(eval("document.AccountProfile.custLogin"))=="returning"){
		if (document.AccountProfile.Password.value=="") {
			alert("Please enter your Password!");
			iError = 1;
			document.AccountProfile.Password.select();
			document.AccountProfile.Password.focus();
			return false;
		}
	}

	if (iError == 0) {
		document.AccountProfile.submit();
		return true;
	}

}
