var ids=new Array('topTen','previousMonth','previous2Month','allHoldings');
var dateids=new Array('topdate','prev2date','alldate');
var linkids=new Array('prevlink','prev2link','alllink');
function init()
{
	switchid('topTen',ids);
}
window.onload = init;


function switchid(id,ids){
	hideallids(ids);
	showdiv(id);
	
}

function hideallids(ids){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}
}

function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
	
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'inline';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'inline';
		}
		else { // IE 4
			document.all.id.style.display = 'inline';
		}
	}
}

function switchhighlight(id,ids){
	unhighlightall(ids);
	highlight(id);
	
}

function highlight(id)
{
	//safe function to hide an element with a specified id
	if (document.getElementById) 
	{ // DOM3 = IE5, NS6
		document.getElementById(id).style.color = 'black';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.color = 'black';
		}
		else { // IE 4
			document.all.id.style.color = 'black';
		}
	}
}

function unhighlight(id)
{
	//safe function to hide an element with a specified id
	if (document.getElementById) 
	{ // DOM3 = IE5, NS6
		document.getElementById(id).style.color = '';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.color = '';
		}
		else { // IE 4
			document.all.id.style.color = '';
		}
	}
}

function unhighlightall(ids)
{
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++)
	{
		unhighlight(ids[i]);
	}
}



