// fireclick flash
function call_fc_flash (arg1,arg2) {
	if(typeof(fc_flash) == "function") {
		fc_flash(arg1,arg2);
	}
}

var ordnum = Math.random()*10000000000000000;

/* Extra stuff to enable nav hovers in lame IE */
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover);


/***** COOKIE FUNCTIONS *****/
// Check cookie to see if the cookie already exists
function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');

	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

// Write the cookie
function createCookie(name,value,days,related) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	} else {
		var expires = "";
	}

	document.cookie = name+"="+value+expires+"; path=/";
	if (related == 'team') {
		myTeamDisplay();
	}
}

// Delete the cookie
function eraseCookie(name) {
	createCookie(name,"",-1,'team');
}
function closeSponsor() {
	document.getElementById('sponsor').style.display = 'none';
}

/*  Pops Photo Gallery windows */		
function photoGallery(url, name) {window.open( url, name, 'toolbar=no,resizable=no,scrollbars=no,menubar=no,location=no,width=678,height=460,top=10,left=10' );}


/*******************************************************************
 * menu navigation script added by RRO
 *******************************************************************/
function goOn(newURL) {
  //--If the selected file name isn't blank, send it to reader.
  if (newURL != "") {
    location.href=newURL
  }
}

// script by Paul Bellows

function setTall() {
	if (document.getElementById) {
// read the height of each div element
		var contentHeight = document.getElementById('leftCol');
		var rightHeight = document.getElementById('rightCol');
		
		//var rightCon = document.getElementById('fauxCol');
		//var rheight = (fauxCol - rightCon);
		
// see if the content div is the tallest and set the style.height of the other two accordingly
		if (contentHeight.offsetHeight >= rightHeight.offsetHeight) {	
		var fauxCol = document.getElementById('fauxCol');
		var rc= document.getElementById('rc');
			//rightHeight.style.height = (contentHeight.offsetHeight - 10) + 'px';
			fauxCol.style.height = (contentHeight.offsetHeight -rc.offsetHeight-12) + 'px';
			fauxCol.style.display = 'block';	
			
			} else {
				contentHeight.style.height = (rightHeight.offsetHeight -12) + 'px';
				
			}
		}
	}
window.onload = function() {
	setTall();
	Fat.fade_all();
	
}

window.onresize = function() {
	setTall();
}
