var FOx = { movie:"/flash/brooks_home_v9.swf", wmode:"transparent",width:"971", height:"485",name:"home3", majorversion:"9", build:"0", xi:"false" , setcontainercss:"false", bgcolor:"#3a3a3a"};
		//CHECK FOR FLASH 8
		hasFlashNEEDED = UFO.hasFlashVersion(9);
		//VERSION 6.65 NEEDED FOR EXPRESS INSTALL
		flashXI = UFO.hasFlashVersion(6,65);
		useXI = false;
		function getFLASH(obj){
			if (document.getElementById)
				return document.getElementById(obj)
			else if (document.all)
				return document.all[obj]
		}
		
		function getWinSize() {
			var myWidth = 0, myHeight = 0;
			
			if( typeof( window.innerWidth ) == 'number' ) {
				//Non-IE
				myWidth = window.innerWidth;
				myHeight = window.innerHeight;
			} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
				//IE 6+ in 'standards compliant mode'
				myWidth = document.documentElement.clientWidth;
				myHeight = document.documentElement.clientHeight;
			} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
				//IE 4 compatible
				myWidth = document.body.clientWidth;
				myHeight = document.body.clientHeight;
			}
			
			return {w:myWidth,h:myHeight}
		}
	   // keeps full-window flash from becoming smaller than 1024 browsers size
	   function adjustFlashSize(id) {
	      var winSizes = getWinSize();
	      
	      var flashObj = document.getElementById(id);
		  
	      if(winSizes.w < 860) {
	         flashObj.style.width = "860px";
	      } else {
	         flashObj.style.width = "100%";
	      }
		  
	      if(winSizes.h < 695) {
	         flashObj.style.height = "695px";
	      } else {
	         flashObj.style.height = "100%";
	      }
	   }
		
	function openMML(consoleid, galleryid, mediaid, mediatype) {
		var pGallery = (galleryid > 0)?'&gallery_id=' + galleryid:'';
		var pMedia = (mediaid > 0)?'&mediatype=' + mediatype +'&mediaid=' + mediaid:'';
		window.open('/podium/MediaLibrary/player/default.aspx?console_id=' + consoleid + pGallery + pMedia + '&browse=yes&recent=yes', '_blank', 'location=no, menubar=no, scrollbar=no, status=no, resizable=no, height=497, width=700');
	}
	
	function translatePage(languagePair){
		//This function was modified from a javascript link on the translate.google.com page.
		//var t = ((window.getSelection&&window.getSelection()) ||(document.getSelection&&document.getSelection()) ||(document.selection && document.selection.createRange && document.selection.createRange().text));
		var e = ( document.charset || document.characterSet );
		
		currentURL = "http://www.brooksschool.org/default.asp?nf=1";
		
		//if (t != '') {
		//	location.href='http://translate.google.com/translate_t?text='+t+'&hl=en&langpair=' + languagePair + '&tbb=1&ie='+e;
		//}else{
			location.href='http://translate.google.com/translate?u='+escape(currentURL)+'&hl=en&langpair=' + escape(languagePair) + '&tbb=1&ie='+e;
		//};
	}
	
	function getQueryVariable(variable) {
		var query = location.search.substring(1);
		//debug(query);
		var vars = query.split("&");
		for (var i=0;i<vars.length;i++) {
			var pair = vars[i].split("=");
			if (pair[0] == variable) {
				return pair[1];
			}
		} 
		return -100;
	}
	
	var showNF = getQueryVariable('nf');
	var showNF2 = getQueryVariable('langpair');
	//alert(showNF);
	//hasFlashNEEDED = false;
	if(showNF != -100 || showNF2 != -100){
		hasFlashNEEDED = false;
		//alert('showing nf');
	}
	
		quickBarItems = ["quicklinks","scores","calendar"];
	
		function displaySidebar(sidebarName){
			Element.hide('dd_quicklinks');
			Element.setSrc('dd_header_quicklinks', '/images/home/button_quicklinks_off.gif');
			Element.hide('dd_scores');
			Element.setSrc('dd_header_scores', '/images/home/button_scores_off.gif');
			Element.hide('dd_calendar');
			Element.setSrc('dd_header_calendar', '/images/home/button_calendar_off.gif');
			Element.show('dd_'+sidebarName);
			Element.setSrc('dd_header_' + sidebarName, '/images/home/button_' + sidebarName + '_on.gif');
		}
