function adderr(str, msg) {
	if (str != '') str = str + '\n- ';
	return str+msg;
}
function trim(str) {
	return str.replace(/^\s+|\s+$/g, '');
}
function invalid_str(str) {
	return str == null || trim(str) == '';
}
function invalid_int(st) {
	if (st == null) return true;
	else {
		var i = st.search(/^[0-9]+$/);
		return i == null || i == -1;
	}
}
function invalid_curr(st) {
	if (st == null) return true;
	else {
		var i = st.search(/^-?[0-9]+(\.[0-9]+)?$/);
		return i == null || i == -1;
	}
}
function invalid_email(st) {
	if (st == null) return true;
	else {
		var i = st.search(/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*$/);
		return i == null || i == -1;
	}
}
function bookmark() {
	if (navigator.appName == 'Netscape') alert('Please press Ctrl+D to bookmark us');
	else window.external.AddFavorite('http://www.webatic.com/','Webatic');
}