function jumpMenu(){
	NewWindow = window.open('/jump_page.asp','jumpPage','width=450,height=286,left=0,top=0');
	NewWindow.creator = self;
	NewWindow.focus();
}

function returnMGA(){
	this.opener.location = "http://www.mgae.com/";
}


function validate_blank(thefield, themsg){
	if(thefield.value==""){
		alert(themsg);
		thefield.focus();
		return false
	}else{
		return true
	}
}

function validate_email(thefield, themsg){
	if(thefield.value.indexOf ('@',0) == -1 || thefield.value.indexOf ('.',0) == -1){
		alert(themsg);
		thefield.select();
		return false
	}else{
		return true
	}
}

function validate_numeric(thefield, themsg){
	if(isNaN(thefield.value)){
		alert(themsg);
		thefield.focus();
		return false
	}else{
		return true
	}
}

function validate_char_length(thefield, maxchars, themsg){
	var field_length = thefield.value.length;
	if(field_length > maxchars){
		alert(themsg + "\n(Currently " + field_length + " characters.)");
		thefield.focus();
		return false
	}else{
		return true
	}
}

function validate_zip_code(thefield, themsg){
	var zipstr = thefield.value;
	var digits="0123456789-"
	if (zipstr.length < 5 || 10 < zipstr.length) {
		alert(themsg);
		thefield.select();
		return false;
	}else{
		for (var i = 0;i < zipstr.length;i++){
			temp = zipstr.substring(i,i+1)
			if (digits.indexOf(temp)==-1){
				alert(themsg);
				thefield.select();
				return false;
			}else{
				return true;
			}
		}	
	}
}

function validate_checkboxes(thefield, themsg){
	var isChecked = false;
	if(thefield.checked){
		isChecked = true;
	}
	for(i=0;i<thefield.length;i++){
		if(thefield[i].checked==true){
			isChecked = true;
		}
	}
	if(isChecked){
		return true;
	}else{
		alert(themsg);
		return false;
	}
	
}
