function is_numeric(str_in) {
	var str = str_in.replace(/ /g, "");
	var valid = "0123456789.";
	var is_valid = true;
	var i, char;
	for (i = 0; i < str.length && is_valid == true; i++) {
		char = str.charAt(i);
		if (valid.indexOf(char) == -1) {
			return false;
		}
	}
	return is_valid;
}

function valid_email(email) {
	var at_pos, stop_pos;
	at_pos = email.indexOf("@");
	stop_pos = email.lastIndexOf(".");
	if (at_pos < 1 || stop_pos < 1 || stop_pos < at_pos || (stop_pos - at_pos) == 1 || ((email.length - stop_pos) - 1 < 2 || (email.length - stop_pos) - 1 > 4)) {
		return false;
	}
	else {
		return true;
	}
}

function window_open(url, width, height) {
	var nam = url.substr(url.lastIndexOf("/") + 1);
	nam = nam.substr(0, nam.indexOf("."));
	nam = nam.replace(/\W+/g, '');
	window.open(url, nam, 'scrollbars=no,status=no,resizable=no, width='+width+', height='+height+',screenX=0,screenY=0,top=0,left=0');
}

