    //Open a help window for Vanguard tools
    // - called from libfuncs show*() functions
    // - pass optional arg "large" to get a larger window (e.g., "help_foobar.html!large")
function new_window (url, winsize) {
    if (winsize == "large") {
	helpwin = window.open(url, "Help_Window",
	    "toolbar=0,menubar=0,scrollbars=1,resizable=1,"
	    + "width=650,height=450,left=80,top=180");
    } else {	//small is default
	helpwin = window.open(url, "Help_Window",
	    "toolbar=0,menubar=0,scrollbars=1,resizable=1,"
	    + "width=500,height=300,left=80,top=180");
    }
}  //new_window

    //validate an input field associated with a button on the college search screen
    // - Search by State requires selecting a state name
    // - Search by Name requires a non-blank search string
function button_check (myname, errmsg) {
    for (i=0; i < document.forms[0].length; i++) {
        var e = document.forms[0].elements[i];
	if (myname == e.name) {		//this is the field to check
	    if (e.type == "text") {	//check name field - not blank or spaces
		var rexpblanks = / */;	//blanks
		e.value = e.value.replace(rexpblanks, "");         //remove blanks
		if (e.value == "") {
		    alert(errmsg);
		    return false;
		} else {
		    return true;
		}
	    } else if (e.type == "select-one" && getselectval(e) == "") {	//check state select
		alert(errmsg);
		return false;
	    } else {
		return true;
	    }
	}
    }
}  //button_check

