// Tabs JavaScript Document
var ids=new Array('a1','a2','a3','a4','a5','a6', 'a7');
var tds=new Array('td_a1','td_a2','td_a3','td_a4','td_a5','td_a6', 'td_a7');

function switchid(id){	
	hideallids();
	showdiv(id);
}

function hideallids() {
	//loop through the array and hide each element by id
	for (var i = 0; i < ids.length; i++){
		hidediv(ids[i]);
		disable_class(tds[i]);
	}		  
}

function disable_class(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).setAttribute("class", "blue_tab_unselect");
        document.getElementById(id).setAttribute("className", "blue_tab_unselect"); 
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.className = 'blue_tab_unselect';
		}
		else { // IE 4
			document.all.id.className = 'blue_tab_unselect';
		}
	}
}

function enable_class(id) {
    if (document.getElementById) { // DOM3 = IE5, NS6
    	document.getElementById(id).setAttribute("class", "blue_tab");
        document.getElementById(id).setAttribute("className", "blue_tab"); 
    }
	else {
		if (document.layers) { // Netscape 4
			document.id.className = 'blue_tab';
		}
		else { // IE 4
			document.all.id.className = 'blue_tab';
		}
	}
}

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';
		}
	}
	
	enable_class('td_' + id);
}

function showtd(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 hidetd(id) {
	//safe function to show 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';
		}
	}
}