//here you place the ids of every element you want.

var topids=new Array('ImageTop','About1','About2','About3','About4','About5','About6','About7','About8','About9','About10','About11','About12');
var bodyids=new Array('Body0','Body1','Body2','Body3','Body4','Body5','Body6','Body7','Body8','Body9','Body10','Body11','Body12','Body13','Body14','Body15');

function actonHash (hash) {
	if (hash.length > 0) {
		switchBody(hash.substring(1));
	}
}


function switchTop(id){	
	hideallTopids();
	showdiv(id);
}

function hideallTopids(){
	//loop through the array and hide each element by id
	for (var i=0;i<topids.length;i++){
		hidediv(topids[i]);
	}		  
}


function switchBody(id){	
	hideallBodyids();
	showBodydiv(id);
}

function hideallBodyids(){
	//loop through the array and hide each element by id
	for (var i=0;i<bodyids.length;i++){
		hidediv(bodyids[i]);
		try { 
			document.getElementById(bodyids[i]+'b').style.background = '#ccccff';
			document.getElementById(bodyids[i]+'b').style.borderLeft = '1px solid #ffffff';
			document.getElementById(bodyids[i]+'b').style.borderRight = '1px solid #cccc44';
			document.getElementById(bodyids[i]+'b').style.borderBottom = '1px solid #cccc44';
		}
		catch (err) {}

	}		  
}


function hidediv(id) {
	try { 
		document.getElementById(id).style.display = 'none';
	}
	catch (err) {}
}

function showdiv(id) {
	document.getElementById(id).style.display = 'block';
}

function showBodydiv(id) {
	document.getElementById(id).style.display = 'block';
	document.getElementById(id + 'b').style.background = '#ffffff';
	document.getElementById(id + 'b').style.borderLeft = '1px solid #550055';
	document.getElementById(id + 'b').style.borderRight = '1px solid #550055';
	document.getElementById(id + 'b').style.borderBottom = '1px solid #550055';
	document.getElementById(id + 'b').blur();
}

var zoomTimer1Id=0
var collapseTimer1Id=0

function zoomhon(){
	clearTimeout (collapseTimer1Id);
	zoomTimer1Id=setTimeout("document.getElementById('bothon').style.width = '220px';",500);
}

function collapsehon(){
	clearTimeout (zoomTimer1Id);
	collapseTimer1Id=setTimeout("document.getElementById('bothon').style.width = '72px';",1000);
}

var zoomTimer2Id=0
var collapseTimer2Id=0

function zoomw3c(){
	clearTimeout (collapseTimer2Id);
	zoomTimer2Id=setTimeout("document.getElementById('botw3c').style.width = '220px';document.getElementById('botw3cmention').style.display = 'none';",500);
}

function collapsew3c(){
	clearTimeout (zoomTimer2Id);
	collapseTimer2Id=setTimeout("document.getElementById('botw3c').style.width = '25px';document.getElementById('botw3cmention').style.display = 'block';",1000);
}



function modLanguage(lan){
	var tds = document.getElementsByTagName('td');
	for(var i=0; i<tds.length; i++) {
		if(tds[i].className == lan + 'off') {
			tds[i].className = lan + 'on';
			}
			else {
				if(tds[i].className == lan + 'on') {
				tds[i].className = lan + 'off';
				}
			}
		}
}
