/* 	global variables for the hiding/show multiple divs functions */

var ids=new Array('a1','a2','a3','a4','a5','a6');    /* Content Divs */
var beids=new Array('b1','b2','b3','b4','b5','b6');  /* Menu Items */

/* 	Functions to show and hide single div (FAQ) */
function HideContent(id) {
		document.getElementById(id).style.display = "none";
		}
function ShowContent(id) {
		document.getElementById(id).style.display = "block";
		}
function ReverseDisplay(id) {
		if(document.getElementById(id).style.display == "none") { document.getElementById(id).style.display = "block"; }
		else { document.getElementById(id).style.display = "none"; }
		}
function Display(id) {
		{document.getElementById(id).style.display = "block"; }
		}

/* 	Functions to show and hide multiple divs */

function switchid(id){	
	hideallids();
	showdiv(id);
}
	
function switchcontent(id){	
	hideallids();
	showdiv(id);
	dimallpix();
	showpic(id);
}

function hideallids(){
	//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 = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}

function redon(id) {
	redoff();
	selectred(id);
}
function redoff() {
	for (var i=0;i<beids.length;i++){
		deselectred(beids[i]);
	}
}
function selectred(id) {
	document.getElementById(id).className = 'selectedred';
}
function deselectred(id) {
	document.getElementById(id).className = 'unselectedred';
}



