String.prototype.trim = function()
{
	return this.replace(/(^\s*)|(\s*$)/g, '');
}

function redirect($target)
{
	window.location.href=$target;
}

function confirm_redirect($msg, $target)
{
	if (confirm($msg))
		window.location.href=$target;
}

function refresh_debug($info)
{
	$dbg = $('div_debug');
	if ($dbg != null)
		$('div_debug').innerHTML = $info;
}

