if (document.getElementById){
document.write('<style type="text/css">')
document.write('.switchcontent{display:none;}')
document.write('.tit{display:block}')
document.write('</style>')
}


function getElementbyClass(classname){
ccollect=new Array()
var inc=0
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
ccollect[inc++]=alltags[i]
}
}









function contractcontentMenu(omit){
	var inc=0
	//alert("omit="+omit);
	while (ccollect[inc]){
	//alert("ccollect[inc].id="+ccollect[inc].id);
		if (ccollect[inc].id!=omit) {
			ccollect[inc].style.display="none";
			//var titid = 'a' + ccollect[inc].id;
			//document.getElementById(titid).style.color='#225C96';
			var imgid = 'i' + ccollect[inc].id;
			if (document.images[imgid]!=undefined)
			{			
		//	document.images[imgid].src="/estado/img/ico+.gif" 
			//document.images[imgid].src="img/fl_dw.gif";
			}
		}
	//	else{alert("omit= "+omit);}
		inc++
	}
}

function expandcontentMenu(cid){

	if (typeof ccollect!="undefined"){
		
		contractcontentMenu(cid)
	//	alert("contractcontentMenu="+cid);
		document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"; 
		//document.getElementById(cid).style.color=color2;
		//var cid2 = 'a' + cid
		var cid3 = 'i' + cid
		//alert("entre "+cid);
		//alert("cid3 "+cid3);
		//alert("cid3 "+document.images[cid].src);
		
		if (document.getElementById(cid).style.display=="block") {
			//document.getElementById(cid2).style.color=color2;
			//document.images[cid3].src="img/fl_up.gif";
		//	document.images[cid3].src="/estado/img/ico-.gif";
		} else {
			//document.getElementById(cid2).style.color='#225C96';
			//document.images[cid3].src="img/fl_dw.gif";
		//	document.images[cid3].src="/estado/img/ico+.gif";
		}
		selectedItem=cid+"|"+document.getElementById(cid).style.display
	}
}
















function contractcontent(omit){
	var inc=0
	while (ccollect[inc]){
		if (ccollect[inc].id!=omit) {
			ccollect[inc].style.display="none";
			//var titid = 'a' + ccollect[inc].id;
			//document.getElementById(titid).style.color='#225C96';
			var imgid = 'i' + ccollect[inc].id;
			if (document.images[imgid]!=undefined)
			{			
			document.images[imgid].src="/estado/img/ico+.gif" 
			//document.images[imgid].src="img/fl_dw.gif";
			}
		}
		inc++
	}
}

function expandcontent(cid){

	if (typeof ccollect!="undefined"){
		contractcontent(cid)
		document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"; 
		//document.getElementById(cid).style.color=color2;
		//var cid2 = 'a' + cid
		var cid3 = 'i' + cid
		//alert("entre "+cid);
		//alert("cid3 "+cid3);
		//alert("cid3 "+document.images[cid].src);
		
		if (document.getElementById(cid).style.display=="block") {
			//document.getElementById(cid2).style.color=color2;
			//document.images[cid3].src="img/fl_up.gif";
			document.images[cid3].src="/estado/img/ico-.gif";
		} else {
			//document.getElementById(cid2).style.color='#225C96';
			//document.images[cid3].src="img/fl_dw.gif";
			document.images[cid3].src="/estado/img/ico+.gif";
		}
		selectedItem=cid+"|"+document.getElementById(cid).style.display
	}
}




function revivecontent(){
selectedItem=getselectedItem()
selectedComponents=selectedItem.split("|")
contractcontent(selectedComponents[0])
document.getElementById(selectedComponents[0]).style.display=selectedComponents[1]
}


function do_onload(){
getElementbyClass("switchcontent")
}


if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload