//here you place the ids of every element you want.
var tabs=new Array('modems','accessories', 'software', 'software_tab', 'modems_tab', 'accessories_tab');

function switchidm(id){		//switching between functions
	showdiv('modems');
	showdiv('modems_tab');
	hidediv('software');
	hidediv('software_tab');
	hidediv('accessories');
	hidediv('accessories_tab');
}

function switchida(id){		//switching between functions
	
	showdiv('accessories');
	showdiv('accessories_tab');
	hidediv('software');
	hidediv('software_tab');
	hidediv('modems');
	hidediv('modems_tab');
}

function switchidso(id){		//switching between functions
	//hidealltabs();
	showdiv('software');
	showdiv('software_tab');
	hidediv('accessories');
	hidediv('accessories_tab');
	hidediv('modems');
	hidediv('modems_tab');
}

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

function hidediv(id) {
	//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) {
	//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';
		}
	}
}
