//here you place the ids of every element you want.
var ids=new Array('t-debtcons','t-homereno','t-invest','t-mortgage','t-business','t-other');
var tabs=new Array('t-debtconstab','t-homerenotab','t-investtab','t-mortgagetab','t-businesstab','t-othertab');

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]);
	}		  
}

function hidediv(id) {
		document.getElementById(id).style.display = 'none';
}


function showdiv(id) {
		document.getElementById(id).style.display = 'block';
}

function switchtab(id){	
    hidealltabs();
	showtab(id);
}

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

function hidetab(id) {
		document.getElementById(id).style.backgroundPosition = '0px 0px';
}

function showtab(id) {
		document.getElementById(id).style.backgroundPosition = '0px -60px';
}
