/* dropdown jump to url */
function mbr_jump_url (obj)
{
	destination = obj.options[obj.selectedIndex].value;
	if (destination) location.href = destination;	
}

/* popup window */
function mbr_popup (page, win, mywidth, myheight)
{
	open(page, win, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=' + mywidth + ', height= ' + myheight)	
}

/* focus on first text box (2nd now) */ 
function mbr_onload ()
{
	if (document.forms[1]) document.forms[1].elements[0].focus();
}

/* disable submit buttons */
function mbr_disable_button (obj)
{
	obj.value = 'Please wait...';
	obj.disabled = true;
	obj.form.submit();
}

/* confirmation message */
function mbr_confirm (str)
{
	if (str == 0) str = 'Warning: This action cannot be reversed. Do you want to continue?';
	return (confirm(str)) ? true : false;
}

/* shows and hide a element with id */
function mbr_show_hide (id)
{
	if (document.getElementById(id).style.display == 'block')
		document.getElementById(id).style.display = 'none';
	else
		document.getElementById(id).style.display = 'block';
}

/* highlight element with id */
function mbr_highlight_selected (id)
{
    if (document.getElementById('checkbox_'+id).checked)
        document.getElementById(id).style.background = 'yellow';
	else
        document.getElementById(id).style.background = 'none';
}
