<!--

/* This function is pulled from a generic validation file from
some other site (probably developer.netscape.com) and strips out
characters you don't want */

function stripCharsInBag (s, bag) {
	var i;
    var returnString = "";

    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.

    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

// This function just makes sure the comment field is not empty

function valForm(frm) {
	// Questionable characters
	badChars = "<[]>{}";
	if(frm.frmComment.value == "") {
		alert("Please fill in your comments for the guestbook.");
		return false;
	} else {
		// Strip questionable chars from all fields
		frm.frmComment.value = stripCharsInBag(frm.frmComment.value, badChars);
		// These values may be empty, but strip chars in case they're not
		frm.frmName.value = stripCharsInBag(frm.frmName.value, badChars);
		frm.frmEmail.value = stripCharsInBag(frm.frmEmail.value, badChars);
		return true;
	}
}

-->
