//UACRAO Validation Check for Registration
 
function checkform(form){
	var valid = true; // This 
	var error = "Please fix the following problem(s):";
	
	//Makes sure that the first name is entered and not blank
	
	if(form.fname.value==""){
		valid = false;
		error+="\n - Please enter a first name";
		form.fname.className="error";
		}
			else{
		form.fname.className="";	
			}
	
	//Makes sure that the last name is entered and not blank
	
	if(form.lname.value==""){
		valid = false;
		error+="\n - Please enter a last name";
		form.lname.className="error";
			}
			else{
		form.lname.className="";	
			}
	
	
	//Makes sure that the email address is entered and not blank
	
	if(form.email.value==""){
		valid = false;
		error+="\n - Please enter an email address";
		form.email.className="error";
			}
			else{
		form.email.className="";	
			}
	
	//Returns an error if something wasn't done

	if(valid==false){
		alert(error);
		}
	
	
	//here is the question to ask if they want to submit
		//var answer = confirm("Do you want to submit registration?")
		//if (answer){
			//form.submit();
				//}
		
		
				
	//If all is good it will submit the form
	
	else{
		var answer = confirm("Do you want to submit the registration?")
		if (answer){
			form.submit();	
			}
		}
}


function SetToggle(idInfo,flag) {
var CState = document.getElementById(idInfo);
if (flag == true) { CState.style.display = 'block'; }
else { CState.style.display = 'none'; }
// can also be initialize as ".visibility = 'visible';"
// and as ".visibility = 'hidden';", but uses screen space even if 'hidden'
}

function popup(mylink, windowname)
				{
				if (! window.focus)return true;
				var href;
				if (typeof(mylink) == 'string')
				   href=mylink;
				else
				   href=mylink.href;
				window.open(href, windowname, 'width=900,height=800,scrollbars=yes');
				return false;
				}
 
 
 
		
