<!--
function validateString(myfield, s) {
	if (notNull(myfield.value) && notBlank(myfield.value)) 
		return true
	else {
		myfield.focus()
		alert("Please enter " + s + "!")
		return false
	}
}

function notNull(str) {
	if (str.length == 0)
		return false
	else 
		return true
}

function notBlank(str) {
	for (i = 0; i < str.length; i++) {
		if (str.charAt(i) != " ")
			return true
	}
	return false
}

function isDigits(str) {
	var i
	for (i = 0; i < str.length; i++) {
		mychar = str.charAt(i)
		if (mychar < "0" || mychar > "9")
			return false
	}
	return true
}

function isNumber(str) {
	numdecs = 0
	for (i = 0; i < str.length; i++) {
		mychar = str.charAt(i)
		if ((mychar >= "0" && mychar <= "9") || mychar == ".") {
			if (mychar == ".")
				numdecs++
		}
		else 
			return false
	}
	if (numdecs > 1)
		return false	
	return true
}


function ValidEmail(email) {
	invalidChars = " /:,;"
	
	if (email == "") {
		return false
	}
	
	for (i=0; i<invalidChars.length; i++) {
		badChar = invalidChars.charAt(i)
		if (email.indexOf(badChar, 0) > -1) {
			return false
		}
	}
	
	atPos = email.indexOf("@", 1)
	if (atPos == -1) {
		return false
	}
	
	if (email.indexOf("@", atPos + 1) > -1) {
		return false
	}
	
	periodPos = email.indexOf(".", atPos)
	if (periodPos == -1) {
		return false
	}
	
	if (periodPos + 3 > email.length) {
		return false
	}
	
	return true
}


IE = navigator.appName=="Microsoft Internet Explorer";
NS = navigator.appName=="Netscape";
browsertype = parseInt(navigator.appVersion);

var newWin=null;
function popup(loc, name, width, height) {
        var _params = "width="+width+",height="+height+",resizable=yes,scrollbars=auto,status=no";

        // CENTER ON BROWSERS WHICH SUPPORT JSCRIPT 1.2
        if (browsertype >= 4) {
                 _left = ( (screen.width-width) >>1 );
                 _top = ( (screen.height-height) >>1 );
        } else {
                 _left = ( (430-width) >>1 );
                 _top = ( (380-height) >>1 );
        }

        if (IE) _params += ",top=" + _top + ",left=" + _left;
        else if (NS) _params += ",screenX=" + _left + ",screenY=" + _top;

        newWin = window.open(loc, name, _params);
        if ( newWin!=null && !(IE && browsertype<5) )
                newWin.focus(); // MSIE4 DOESN'T FOCUS WINDOWS
}

//-->
