function trim(str) {
	return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}
function getFileExt(str) {
	var extStart = str.lastIndexOf(".") + 1;
	if (extStart > 1 && str.length > extStart) {
		return str.substr(extStart, str.length - extStart).toLowerCase();
	} else {
		return "";
	}		
}
/*function debug(str) {
	$("#debug:hidden").show();
	$("#debug").html($("#debug").html() + str + " ");
}*/
function debug() {}
function throwError(str) {
	alert("ERROR: " + trim(str.replace("ERROR:","")));	
}
