/*==================================================
  Show e hide um objeto pelo id
  ==================================================*/

//here you place the ids of every element you want.
//var ids=new Array('a1','a2','a3','thiscanbeanything');


function switchid(id){	
	// sem uso
	hideallids();
	showdiv(id);
}

function hideallids(){
	// sem uso
	//loop through the array and hide each element by id
	for (var i=0;i<ids.length;i++){
		hidediv(ids[i]);
	}		  
}

function hidealldivs(pref){
	//esconde a div "esconder"
	a = pref + "_hide";
	hidediv(a);
	//mostra a div "mostrar"
	a = pref + "_show";
	showdiv(a);
	//esconde ate 50 divs com mesmo prefixo
	for (var i=1;i<50;i++){
		a = pref + "_" + i;
		hidediv(a);
	}		  
}
function showalldivs(pref){
	//esconde a div "esconder"
	a = pref + "_show";
	hidediv(a);
	//mostra a div "mostrar"
	a = pref + "_hide";
	showdiv(a);
	//mostra ate 50 divs com mesmo prefixo
	for (var i=1;i<50;i++){
		a = pref + "_" + i;
		showdiv(a);
	}		  
}

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';
		}
	}
}



