function escapeSingleQuotes(str) {
	return trim(str.replace(/\x27/g, "''"));
}
function nullordate(val) {
	if (val == '') return 'NULL';
	return "'" + val + "'";
}
function trim(str) {
	return str.replace(/^\s*|\s*$/g,"");
}
function getselectedradio(theradio) {
	for (var i = 0; i < theradio.length; i++) {
		if (theradio[i].checked) return theradio[i].value;
	}
	return '';
}
