// JavaScript Document

//here you place the ids of every element you want.
var ids=new Array('tab1','tab6');
var pops=new Array('poptab1','poptab2','poptab3');
var tops=new Array('toptab1','toptab2','toptab3');
var mops=new Array('mtab1','mtab2');
var tips=new Array('tip1','tip2','tip3');

		//used as fold out in sec.140.
var nameid=new Array('navn1','navn2','navn3','navn4','navn5','navn6','navn7');
var spid=new Array('sport1','sport2','sport3');
var defs=new Array('def1','def2','def3');
var debats=new Array('debat1','debat2','debat3');
var koms=new Array('kom1','kom2');

function switchid(id){	
	hideallids();
	showdiv(id);
}

function switchtip(id){	
	hidealltips();
	showdiv(id);
}

function switchpop(id){	
	hideallpops();
	showdiv(id);
}

function switchtop(id){	
	hidealltops();
	showdiv(id);
}

function switchmop(id){	
	hideallmops();
	showdiv(id);
}

function switchdef(id){	
	hidealldefs();
	showdiv(id);
}

function switchnameid(id){	
	hideallnameids();
	showdiv(id);
}

function switchsport(id){	
	hideallspids();
	showdiv(id);
}

function switchdebat(id){	
	hidealldebats();
	showdiv(id);
}

function switchkom(id){	
	hideallkoms();
	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]);
	}		  
}

function hidealltips(){
	//loop through the array and hide each element by id
	for (var i=0;i<tips.length;i++){
		hidediv(tips[i]);
	}		  
}

function hideallpops(){
	//loop through the array and hide each element by id
	for (var i=0;i<pops.length;i++){
		hidediv(pops[i]);
	}		  
}

function hidealltops(){
	//loop through the array and hide each element by id
	for (var i=0;i<tops.length;i++){
		hidediv(tops[i]);
	}		  
}

function hideallmops(){
	//loop through the array and hide each element by id
	for (var i=0;i<mops.length;i++){
		hidediv(mops[i]);
	}		  
}
function hidealldefs(){
	//loop through the array and hide each element by id
	for (var i=0;i<defs.length;i++){
		hidediv(defs[i]);
	}		  
}

function hideallnameids(){
	//loop through the array and hide each element by id
	for (var i=0;i<nameid.length;i++){
		hidediv(nameid[i]);
	}		  
}

function hideallspids(){
	//loop through the array and hide each element by id
	for (var i=0;i<spid.length;i++){
		hidediv(spid[i]);
	}		  
}

function hidealldebats(){
	//loop through the array and hide each element by id
	for (var i=0;i<debats.length;i++){
		hidediv(debats[i]);
	}		  
}

function hideallkoms(){
	//loop through the array and hide each element by id
	for (var i=0;i<koms.length;i++){
		hidediv(koms[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 clearDefault(el) {
	if (el.defaultValue==el.value) el.value = ""
}

//-->