/* confirmation message */
function mbr_confirm (str)
{
	str = (str == '0')? 'Are you sure?' : str;
	return (confirm(str))? true : false;
}

/* disble submit (to be used in onsubmit form tag) */
function mbr_disable_submit ()
{
	document.getElementById('submit').value = 'Please wait...';
	document.getElementById('loading').style.visibility = 'visible';
	document.getElementById('submit').disabled = true;
}

/* focus on a field (to be used in onload) */
function mbr_focus ()
{
	if (document.getElementsByTagName('input')[0] && (document.getElementsByTagName('input')[0].type == 'text' || document.getElementsByTagName('input')[0].type == 'password'))
		document.getElementsByTagName('input')[0].focus();
}

/* dropdown jump to url */
function mbr_jump_url (obj)
{
	destination = obj.options[obj.selectedIndex].value;
	if (destination) location.href = destination;
}