nn4=(document.layers)?true:false;
ie4=(document.all)?true:false;
dom=(document.getElementById)?true:false;
_nn5=(navigator.appName == "Netscape" && parseInt(navigator.appVersion)==5)?true:false;
_nn=(nn4||_nn5)?true:false;

var fixedValuationsHeight = false;

var currentFund = 2;
function swapFunds() {
if(ie4 && ! document.all['fund1Div']) return;
if(dom && document.getElementById('fund1Div')==null) return;
if(nn4 && !document.layers['fund1Div']) return;
if (ie4 && document.all.summary != null) {
document.all.summary.height = 270;
}

if (!fixedValuationsHeight) {
doFixValuationsHeight();
}

if(currentFund==1) {
hide("fund1Div"); 
hide("fund3Div"); 
show("fund2Div");
currentFund=2;
} else if(currentFund==2) {
hide("fund2Div"); 
hide("fund1Div"); 
show("fund3Div");
currentFund=3; 
} else {
hide("fund2Div"); 
hide("fund3Div"); 
show("fund1Div");
currentFund=1; 
}
setTimeout("swapFunds()",10000);  
}

function selectFund(num) {
if (ie4 && document.all.summary != null) {
document.all.summary.height = 270;
}else if (dom && document.getElementById('summary')) {
document.getElementById('summary').height = 270;
}

if(num==1) {
hide("fund2Div"); 
hide("fund3Div"); 
show("fund1Div"); 
currentFund=3;
} else if(num==2) {
hide("fund1Div"); 
hide("fund3Div")
show("fund2Div"); 
currentFund=1;
} else {
hide("fund1Div"); 
hide("fund2Div")
show("fund3Div"); 
currentFund=2;
}	
}

function doFixValuationsHeight() {
fixedValuationsHeight = true;
var fh = 0;
var f1d = document.getElementById('fund1Div');
var f2d = document.getElementById('fund2Div');
var f3d = document.getElementById('fund3Div');

var maxHeight = 0;
if (f1d) {
maxHeight = f1d.style.height;
}

if (f2d) {
fh = f2d.style.height;
if (fh>maxHeight) {
maxHeight = fh;
}
}
if (f3d) {
fh = f3d.style.height;
if (fh>maxHeight) {
maxHeight = fh;
}
}

if (maxHeight != 0) {
var newDiv = document.createElement('div');
newDiv.style.height = maxHeight;
var fParent = f1d.parentNode;
fParent.appendChild(newDiv);
newDiv.appendChild( fParent.removeChild(f1d));
newDiv.appendChild( fParent.removeChild(f2d));
newDiv.appendChild( fParent.removeChild(f3d));
}
}
