

// tabbed panel function -->
var ids = new Array('onl','offl','all');
var tabs = new Array('tab1','tab2','tab3');
var im = new Array('online','offline','viewall');


function switchid(id,tab,im){
	hideallids();
	showdiv(id,tab,im);
}

function hideallids(){
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i],tabs[i],im[i]);
	}		  
}

function hidediv(id,tab,im) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
		document.getElementById(tab).className = 'def';
		document.getElementById(im).src = 'images/' + im + '_off.png';
	}
}

function showdiv(id,tab,im) {
	//safe function to show an element with a specified id
		  
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
		document.getElementById(tab).className = 'sel';
		document.getElementById(im).src = 'images/' + im + '_on.png';
	}
}

//end tabbed panel script


