
	function closeOverlay()
	{
		$("#overlay .interface").hide(); // hide any/all embedded things
		$("#overlay").hide(); // hide the overlay
		
	}

	
function confirmRequest(message)
{	
	alert(message);
	return false;
}

function findSWF(movieName) {
  if (navigator.appName.indexOf("Microsoft")!= -1) {
    return window[movieName];
  } else {
    return document[movieName];
  }
}

$(function(){
		// Tabs
		//$('#tabs').tabs();
		
		//JQ UI Buttons
		$('.ui-button').mousedown(function () {
			$(this).addClass('ui-state-active');
		});
		
		$('.ui-button').mouseout(function () {
			$(this).removeClass('ui-state-active');
		});
		
		
		
		// Our Buttons
		$('.button').mousedown(function () {
			$(this).addClass('button-active');
		});
		
		$('.button').mouseout(function () {
			$(this).removeClass('button-active');
		});
		
		$(".hiddenfile").mousedown(function () {
			var id = $(this).attr('id');
			$("#"+id+"-button").mousedown();
		});
		
		$(".hiddenfile").mouseout(function () {
			var id = $(this).attr('id');
			$("#"+id+"-button").mouseout();
		});
		
		$(".hiddenfile").bind('change', function () {
			$(".hiddenfile").parent().submit();
		});
		
		// Infinite loading fix in FF
		$('#frameFix').ajaxComplete(function() {
			var ifr = document.getElementById('frameFix');
			var doc = ifr.contentDocument;
			if (doc == undefined || doc == null)
			doc = testFrame.contentWindow.document;
			doc.open();
			doc.write(' ');
			doc.close();
		});

});
