function destroycatfish()
{
	var catfish = document.getElementById('summerCatfish');
	document.body.removeChild(catfish); /* clip catfish off the tree */
	var homeFooter = document.getElementById('homeFooterPara');
	var pageFooter = document.getElementById('footerPara');
	var contentFooter = document.getElementById('content_index');
	if(homeFooter != null){
		homeFooter.style.paddingBottom='0'; /* reset the padding at the bottom */
	} else if(pageFooter != null){
		pageFooter.style.paddingBottom='0'; /* reset the padding at the bottom */
	} else if(contentFooter != null){
		contentFooter.style.paddingBottom='0'; /* reset the padding at the bottom */
	}
	pageTracker._trackEvent('Catfish', 'CatfishClosed', 'March Break 2010 Catfish');
	return false;
}
function summerCatfishClose()
{
	var closelink = document.getElementById('summerCatfishClose');
	closelink.onclick = destroycatfish;
	return false;
}

var catfish;

function summerCatfish()
// initializing
{
	catfish = document.getElementById('summerCatfish');
	
	catfishheight = 80; // total height of catfish in pixels
	catfishoverlap = 30; // height of the 'overlap' portion only (semi-transparent)
	catfishtimeout = setTimeout(startcatfish, 2000);
}

function startcatfish()
// starts the catfish sliding up
{
	catfishposition = 0; // catfishposition is expressed in percentage points (out of 100)
	catfishtimeout = setInterval(positioncatfish, 25);
}

function positioncatfish()
{
	catfishposition += 10;
	catfish.style.marginBottom = '-' + (((100 - catfishposition) / 100) * catfishheight) + 'px';
	if (catfishposition >= 100)
	{
		clearTimeout(catfishtimeout);
		catfishtimeout = setTimeout(finishcatfish, 1);
	}
}

function finishcatfish()
{
	catfish.style.marginBottom = '0';	
	// jump the bottom of the document to give room for the catfish when scrolled right down
	document.body.parentNode.style.paddingBottom = (catfishheight - catfishoverlap) +'px';
	
	// here you could use AJAX (or similar) to log the popup hit for tracking purposes
	pageTracker._trackEvent('Catfish', 'CatfishViewed', 'March Break 2010 Catfish');
}
function wrapFish() { // Fix for IE6
	var catfish = document.getElementById('summerCatfish');
	var subelements = [];
	for (var i = 0; i < document.body.childNodes.length; i++) {
 		subelements[i] = document.body.childNodes[i];
	}

	var zip = document.createElement('div');    // Create the outer-most div (zip)
	zip.id = 'zip';                      // call it zip

	for (var i = 0; i < subelements.length; i++) {
	zip.appendChild(subelements[i]); 
	}
	document.body.appendChild(zip); // add the major div
	document.body.appendChild(catfish); // add the catfish after the zip
}
function vIE(){return (navigator.appName=='Microsoft Internet Explorer')?parseFloat((new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})")).exec(navigator.userAgent)[1]):-1;}
function initSummerCatfish(){
	summerCatfishClose();
	summerCatfish();
	var verIE = vIE();
	if(verIE == '6'){
		wrapFish();
	}
}