jQuery.fn.slideToggle = function(speed, callback) {
    return this.animate({height: this.css("display") == "none" ? "show" : "hide"}, speed, callback);
};

$(document).ready(function() {
	$("#loginBox").hide();
	$('a.login').click(function() {
		$("#loginBox").slideToggle("fast");
		return false;
	});
	//set the ajax start and stop functions
	$('#load').ajaxStart(function(){
		$(this).html("<img src='/images/loading.gif' alt='Loading your request' />");
	});
	$('#load').ajaxStop(function(){
		$(this).empty();
	});
	if ($.browser.msie){
		$('#header ul li ul').css({'top' : '50px'});	
	}
});
if( document.addEventListener ) document.addEventListener( 'DOMContentLoaded', admissform, false );

function admissform(){
  // Hide forms
  	$( 'form.mainform' ).hide();
  // Processing
  $( 'form.mainform' ).find( 'li label' ).not( 'li fieldset label' ).each( function( i ){
    var labelContent = this.innerHTML;
    var labelWidth = document.defaultView.getComputedStyle( this, '' ).getPropertyValue( 'width' );
	if (labelWidth != 'auto') { //added this on 9-19-2007 to accomdate the jQuery 1.2 change
		var labelSpan = document.createElement( 'span' );
			labelSpan.style.display = 'block';
			labelSpan.style.width = labelWidth;
			labelSpan.innerHTML = labelContent;
		this.style.display = '-moz-inline-box';
		this.innerHTML = null;
		this.appendChild( labelSpan );
	};
  } );
  
  // Show forms
  $( 'form.mainform' ).show();
}

function decision(message, url) {
if(confirm(message)) location.href = url;
}