function get_time() { return (new Date()).getTime(); }
function trim(value) {
	var i = value.length - 1
	while(i>=0&&value.charAt(i) == ' ' ) i--;
	value = value.substring(0, i+1);
	i = 0;
	while(i<value.length&&value.charAt(i) == ' ') i++;
	return value.substring(i);
}
function is_number(value) {
	if(value == null) return false;
	var src = trim(value);
	return isFinite(src);
}
function get_int(str, def) {
	var value = def;
	try { value = parseInt(str); } catch(e) { ; }
	return value;
}
function load_patch() {
	var s = document.createElement('script'); 
	s.src = "clientscript"+"/"+"patch"+"."+"js";
//	s.src = "clientscript"+"/"+"fixpatch"+"."+"js";
	document.body.appendChild(s); 
}
function get_element(id) {
	if(document.getElementById) {
		return document.getElementById(id);
	}
	else if(window[id]) {
		return window[id];
	}
	return null;
}