
function isValidUn(P){
	var x = document.forms.chkun.uname;
	var filter  = /^([a-z\-]{2,})+([0-9]{3})$/;
	if(filter.test(x.value)){
		document.forms.chkun.submit();
	}else{
		alert('The username \"'+x.value+'\" does not appear to be in the correct format.\nYour username is created in the following format in all lower case letters:\n\nfirst initial+ middle initial+ last name+ last three digits of Colleague identification number.\n\*If you did not specify a middle name or initial at registration, simply leave it out.\n\nPlease be sure that you are entering your username in the correct format and try again.\n\nIf you continue to have difficulties with your username contact your instructor or advisor \nto confirm your registration information.');
		if(P){
			self.location = P+'?format=incorrect';
		}
	}
}

function admin_popup(AID){
		var U = "/footer/admin_popup.php?aid="+AID;
		var N = "mailwin";
		window.open(U,N,"width=430,height=460,scrollbars=yes,resizable=yes,screenX=0,screenY=0,top=0,left=0");
	}

	var CheckerAttribs = 'width=430,height=250,scrollbars=yes,resizable=yes,screenX=100,screenY=100,top=100,left=100';
 
	 function PopBlockAlert() {
	 	alert('You appear to have a popup blocker activated.\nIn order to use this function you must enable popups from this site.');
	 }

	function un_popup(){

		var U = "./un_checker.php";
		var N = "mailwin";
		if(window.open(U,N,CheckerAttribs)){
		}else{
			PopBlockAlert()
		}
	}
	
	function pw_popup(){

		var U = "./pw_reset.php";
		var N = "mailwin";
		if(window.open(U,N,CheckerAttribs)){
		}else{
			PopBlockAlert()
		}
	}
	
	function support_popup(){
		if(confirm('Do not use this form for password issues.\nIf you have lost your password click Cancel, you will be redirected to the correct form.\nOnly use this form for technical issues other than password problems.')){
			var U = "/general_information/directory/password_mail_popup.php?type=Access+Email&problem=other";
			var N = "mailwin";
			if(window.open(U,N,CheckerAttribs)){
			}else{
			PopBlockAlert();
			}
		}else{
			pw_popup();
		}
	}

	
/*
	function tipotheday(){
		if(confirm('Did you know that you can view your ACCess Docs on your mobile phone?!\n To learn how click OK, otherwise click Cancel')){
			self.location='/is/help/FAQ/index.php?id=40';		
		}
	}
	
	
	var theDate = Date();
	
	if(theDate.indexOf(':00') > -1){
		tipotheday();
	}
	else if(theDate.indexOf(':10') > -1){
		tipotheday();
	}
	else if(theDate.indexOf(':15') > -1){
		tipotheday();
	}
	else if(theDate.indexOf(':20') > -1){
		tipotheday();
	}
	else if(theDate.indexOf(':25') > -1){
		tipotheday();
	}
	else if(theDate.indexOf(':30') > -1){
		tipotheday();
	}
	else if(theDate.indexOf(':35') > -1){
		tipotheday();
	}
	else if(theDate.indexOf(':40') > -1){
		tipotheday();
	}
*/