<!--

document.write ('<STYLE TYPE=\"text\/css\">')
document.write('#headline {font-family: Arial; font-weight: bold; font-size: 17px; color: #333399}')
document.write('#subheadline {font-family: Arial; font-weight: bold; font-size: 13px; color: #333399}')
document.write('#admin_page_title {font-family: Arial; font-weight: bold; font-size: 20px; color: #333399}')
document.write('#admin_subhead {font-family: Arial; font-weight: bold; font-size:14px; color: #333399}')
document.write('#admin_body {font-family: Arial; font-size:12px;}')
var oSystem = navigator.platform
	var browser = navigator.appName;
	if ((navigator.platform.indexOf("Mac") != -1) &&  (navigator.appName.indexOf("Netscape") != -1)){
	document.write ('#body {font-family: verdana; font-size: 11px;}')
	} else {
			if ((navigator.platform.indexOf("Win") != -1) &&  (navigator.appName.indexOf("Netscape") != -1)){
				document.write ('#body {font-family: verdana; font-size: 11px;}')
			} else {
				document.write ('#body {font-family: verdana; font-size: 10px;}')
			}
	}
	if ((navigator.platform.indexOf("Mac") != -1) &&  (navigator.appName.indexOf("Netscape") != -1)){
	document.write ('#initcap {font-family: verdana; font-size: 17px;}')
	} else {
			if ((navigator.platform.indexOf("Win") != -1) &&  (navigator.appName.indexOf("Netscape") != -1)){
				document.write ('#initcap {font-family: verdana; font-size: 15px;}')
			} else {
				document.write ('#initcap {font-family: verdana; font-size: 15px;}')
			}
	}
	if ((navigator.platform.indexOf("Mac") != -1) &&  (navigator.appName.indexOf("Netscape") != -1)){
	document.write ('#subhead {font-family: verdana; font-weight: bold; font-size: 10px;}')
	} else {
			if ((navigator.platform.indexOf("Win") != -1) &&  (navigator.appName.indexOf("Netscape") != -1)){
				document.write ('#subhead {font-family: verdana; font-weight: bold; font-size: 11px;}')
			} else {
				document.write ('#subhead {font-family: verdana; font-weight: bold; font-size: 10px;}')
			}
	}
	if ((navigator.platform.indexOf("Mac") != -1) &&  (navigator.appName.indexOf("Netscape") != -1)){
	document.write ('#subheadplus {font-family: verdana; font-weight: bold; font-size: 10px;}')
	} else {
			if ((navigator.platform.indexOf("Win") != -1) &&  (navigator.appName.indexOf("Netscape") != -1)){
				document.write ('#subheadplus {font-family: verdana; font-weight: bold; font-size: 11px;}')
			} else {
				document.write ('#subheadplus {font-family: verdana; font-weight: bold; font-size: 10px;}')
			}
	}
	if ((navigator.platform.indexOf("Mac") != -1) &&  (navigator.appName.indexOf("Netscape") != -1)){
	document.write ('#utilities {font-family: verdana; font-size: 10px; color: #0000CC}')
	} else {
			if ((navigator.platform.indexOf("Win") != -1) &&  (navigator.appName.indexOf("Netscape") != -1)){
				document.write ('#utilities {font-family: verdana; font-size: 11px; color: #0000CC}')
			} else {
				document.write ('#utilities {font-family: verdana; font-size: 10px; color: #0000CC}')
			}
	}
	if ((navigator.platform.indexOf("Mac") != -1) &&  (navigator.appName.indexOf("Netscape") != -1)){
	document.write ('#navlink {text-decoration: none; font-family: verdana; font-size: 10px; color: #333399}')
	} else {
			if ((navigator.platform.indexOf("Win") != -1) &&  (navigator.appName.indexOf("Netscape") != -1)){
				document.write ('#navlink {text-decoration: none; font-family: verdana; font-size: 11px; color: #333399}')
			} else {
				document.write ('#navlink {text-decoration: none; font-family: verdana; font-size: 10px; color: #333399}')
			}
	}
	if ((navigator.platform.indexOf("Mac") != -1) &&  (navigator.appName.indexOf("Netscape") != -1)){
	document.write ('#navlink_on {text-decoration: none; font-family: verdana; font-size: 10px; color: #FF3333}')
	} else {
			if ((navigator.platform.indexOf("Win") != -1) &&  (navigator.appName.indexOf("Netscape") != -1)){
				document.write ('#navlink_on {text-decoration: none; font-family: verdana; font-size: 11px; color: #FF3333}')
			} else {
				document.write ('#navlink_on {text-decoration: none; font-family: verdana; font-size: 10px; color: #FF3333}')
			}
	}
document.write ('<\/STYLE>')

function jumpPage(form) {
        i = form.SelectMenu.selectedIndex;
        if (i == 0) return;
		var_location = form.SelectMenu.options[i].value;
        window.parent.location.href = [var_location];
}
		      
function jumpPageCampus(form) {
    i = form.CampusSelectMenu.selectedIndex;
    if (i == 0) return;
	var_location = form.CampusSelectMenu.options[i].value;
    window.parent.location.href = var_location;
} 

		
		
function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
		
var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		cub_map = newImage("/images/locations/us_map_cub.gif");
		biggs_map = newImage("/images/locations/us_map_biggs.gif");
		keltsch_map = newImage("/images/locations/us_map_keltsch.gif");
		sns_map = newImage("/images/locations/us_map_sns.gif");
		preloadFlag = true;
	}
}

var popupWindow = null
	function popUp(htmLoc, width, height){
		if  (!popupWindow || popupWindow.closed) {	
			popupWindow = window.open(htmLoc, "SuperValuPharmacies", 'titlebar=YES,toolbar=NO,width=' + width + ',height=' + height + ',directories=NO,status=YES,scrollbars=YES,resizable=YES,menubar=yes');
		} else {
			popupWindow = window.open(htmLoc, "SuperValuPharmacies", 'titlebar=YES,toolbar=NO,width=' + width + ',height=' + height + ',directories=NO,status=YES,scrollbars=YES,resizable=YES,menubar=yes');
			popupWindow.focus();
		} 
	}  	

function CheckForm(form) {
	if (form.problem.value == "") {
		alert("You need to enter a comment.")
		form.problem.focus();
		return false;
	} else {
		return true;
	}
} 


function fname(form) {
	if (form.firstname.value == "") {
		alert ("You need to enter your First Name.");
		form.firstname.focus();
		return false;
	} else {
		return true;
	}
}

function lname(form) {
	if (form.lastname.value == "") {
		alert ("You need to enter your Last Name.");
		form.lastname.focus();
		return false;
	} else {
		return true;
	}
}

function addr(form) {
	if (form.address1.value == "") {
		alert ("You need to enter your Address.");
		form.address1.focus();
		return false;
	} else {
		return true;
	}
}

function city(form) {
	if (form.city.value == "") {
		alert ("You need to enter your City.");
		form.city.focus();
		return false;
	} else {
		return true;
	}
}

function state(form) {
	if (form.state.value == "") {
		alert ("You need to enter your State.");
		form.state.focus();
		return false;
	} else {
		return true;
	}
}

function zip(form) {
	if (form.zip.value == "") {
		alert ("You need to enter your Zip Code.");
		form.zip.focus();
		return false;
	} else {
		return true;
	}
}

function phone(form) {
	if (form.phone.value == "") {
		alert ("You need to enter your Phone Number.");
		form.phone.focus();
		return false;
	} else {
		return true;
	}
}

function subject(form) {
	if (form.subject.value == "") {
		alert ("Please enter a Subject for your message.");
		form.subject.focus();
		return false;
	} else {
		return true;
	}
}

function message(form) {
	if (form.message.value == "") {
		alert ("You forgot to tell us why you're writing. Please enter your message.");
		form.message.focus();
		return false;
	} else {
		return true;
	}
}

function validEmail(email) {

  var re = /^\w+(\-\w+)*(\.\w+(\-\w+)*)*@\w+(\-\w+)*(\.\w+(\-\w+)*)*(\.\w+)+$/;

  if (re.test(email)) {
    return true;
  }
  return false;
}

function email(form) {
	if (form.email.value == "") {
		alert("You need to fill in your E-mail Address.")
		form.email.focus();
		return false;
	} 
	else {
	
		if (!validEmail(form.email.value)){
		alert("" + form.email.value + " is an invalid email address!");
		form.email.focus();
		return false;
		}
		else {
			return true;
		}
	}
}

function validate(form) {
	if ( fname(form) && lname(form) && email(form) && addr(form) && city(form) && state(form) && zip(form) && phone(form) && subject(form) && message(form) ) {
		form.submit();
	}
}

function CheckHRForm(form) {
	if ( fname(form) && lname(form) && email(form) && subject(form) && message(form) ) {
		form.submit();
	}
	else {
			return false;
		}
}
//-->
