
/************************************************************************/
/* Try to give the first text field in the first form the focus.        */
/************************************************************************/

function TrySetFocus()
{
  if ( ! document.forms                ) return;
  if ( ! document.forms[0]             ) return;
  if ( ! document.forms[0].elements    ) return;
  if ( ! document.forms[0].elements[0] ) return;

  if ( document.forms[0].elements[0].type != 'text' ) return;

  document.forms[0].elements[0].focus();
}

/************************************************************************/
/* Prevent being framed.                                                */
/************************************************************************/

if ( self != top ) top.location.href = self.location.href;

/************************************************************************/
/* Define the roll over functions.                                      */
/************************************************************************/

function mouse_over(label, count, body1, body2) 
{
    if ( document.images ) {
	if ( count ) {
	    name = 'button_' + count;
	} else {
	    name = label;
	}
	document.images[name].src = over[label].src;
	if ( body1 ) {
	    document.images[body1].src = over[body1].src;
	}
	if ( body2 ) {
	    document.images[body2].src = over[body2].src;
	}
    }
}

function mouse_out(label, count, body1, body2) {
    if ( document.images ) {
	if ( count ) {
	    name = 'button_' + count;
	} else {
	    name = label;
	}
	document.images[name].src = out[label].src;
	if ( body1 ) {
	    document.images[body1].src = out[body1].src;
	}
	if ( body2 ) {
	    document.images[body2].src = out[body2].src;
	}
    }
}

