// JavaScript Document


//////////////// BEGIN BSI VARS /////////////
var bsiActiveOnBg = "";
var bsiActiveOffBg = "";
var bsiRotationTime = 5000;
var framePanels=6;  // set you base panel number here
//////////////// END BSI VARS /////////////

function tellHeight(){
document.getElementById('story0').style.backgroundColor = bsiActiveOnBg;

var i = framePanels-1;

var layerHeights = [];
if(document.getElementById('storyline0')) layerHeights[0] = document.getElementById('storyline0').offsetHeight;
if(document.getElementById('storyline1')) layerHeights[1] = document.getElementById('storyline1').offsetHeight;
if(document.getElementById('storyline2')) layerHeights[2] = document.getElementById('storyline2').offsetHeight;
if(document.getElementById('storyline3')) layerHeights[3] = document.getElementById('storyline3').offsetHeight;
if(document.getElementById('storyline4')) layerHeights[4] = document.getElementById('storyline4').offsetHeight;
if(document.getElementById('storyline5')) layerHeights[5] = document.getElementById('storyline5').offsetHeight;
		/*
		var layerHeights=[
		document.getElementById('storyline0').offsetHeight,
		document.getElementById('storyline1').offsetHeight,
		document.getElementById('storyline2').offsetHeight,
		document.getElementById('storyline3').offsetHeight,
		document.getElementById('storyline4').offsetHeight];
		*/
		if(layerHeights[layerHeights.length-1] > 0){
function compare(a,b){
return b - a;
}
		layerHeights.sort(compare);
		//alert(layerHeights);
		document.getElementById('frameposition').style.height =  layerHeights[0];
		clearInterval(psuBoxAdjust);

		rotate_timer = setInterval("toggleFlip()",bsiRotationTime);
		do{
		document.getElementById("story"+i).style.visibility="visible";
		}while(i--);
		}

}//end

if(!document.layers){
var layerHeights=[document.getElementById('storyline0')];

}else{
oLayer = window.document.frameposition;
var layerHeights=[oLayer.document.storyline0.clip.height,oLayer.document.storyline1.clip.height,oLayer.document.storyline2.clip.height,oLayer.document.storyline3.clip.height,oLayer.document.storyline4.clip.height,oLayer.document.storyline5.clip.height,];
}

layerHeights.sort()
var divAreaWidth=375;
var divAreaHeight = layerHeights[layerHeights.length-1];
if(document.layers){
document.writeln('<img src="" width="'+divAreaWidth+'" height="'+divAreaHeight+'" border="0" alt="">');
}
