function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&ia.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&id.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

function setIframeHeight (contenedor, contenido) {
	var oContenedor = document.getElementById(contenedor);
	var oContenidoI = document.getElementById(contenido);
	var oContenidoN = window.frames[contenido];

	var oInterna = oContenidoN.document.getElementById("interna");
	//asigno al contenedor y al iframe los valores correspondientes
	oContenedor.style.height = (parseInt(oInterna.style.height)+10)+'px';
	oContenidoI.style.height = (parseInt(oInterna.style.height)+10)+'px';	
}

function showContent(id,iNoOfContents)
{
	var oTabla;
	// Oculto lo que tengo q ocultar y muestro lo que hay que mostrar
	for (var i=1;i<=iNoOfContents;i++)
	{
		oTabla = window.document.getElementById('tbl_contenido'+i);
		oTabla.style.display = (oTabla.getAttribute('identifier') != id?'none':'');
	}
	// Cargo la porka si no esta cargada
	var iFrameLoco = window.document.getElementById('contenido'+id);
	if (iFrameLoco.getAttribute('loaded')=='false') 
	{
		iFrameLoco.setAttribute('loaded','true');
		iFrameLoco.src = iFrameLoco.getAttribute('latesrc');
	}
}


function ocultarMostrarGrupo(sGroup2Hidde, sTr2Show) {
	var i
	sGroupTag = "TR";

	aTAGs = document.getElementsByTagName(sGroupTag);
	for(i = 0; i < aTAGs.length; i++) {
		if(aTAGs[i].getAttribute("group") == sGroup2Hidde) {
			if(aTAGs[i].id == sTr2Show){			
				alert(aTAGs[i].id + "show");
				aTAGs[i].style.visibility = 'visible';
				aTAGs[i].style.display = 'block';
			} else {				
				alert(aTAGs[i].id + "hidde");
				aTAGs[i].style.visibility = 'hidden';
				aTAGs[i].style.display = 'none';				
			}	
		}	
	}
}

	function setBg(objTr){
	
	}
	
var dato;
var img_exp 	= new Image();
img_exp.src = 'images/bullet7.gif';
var img_con 	= new Image();
img_con.src = 'images/bullet6.gif';

function mostrarData (nro, cant){
		var i;
		var abrir = document.getElementById('data_' + nro).style.visibility != 'visible';
		for (i=1; i<=cant; i++) {
			//if (i != nro) {
				document.getElementById('data_' + i).style.visibility = 'hidden';
				document.getElementById('data_' + i).style.display = 'none';
				document.getElementById('flechita_'+i).src = img_exp.src;		
			//}
		}
		if (abrir) {
			document.getElementById('data_' + nro).style.visibility = 'visible';
			document.getElementById('data_' + nro).style.display = 'block';
			document.getElementById('flechita_'+nro).src = img_con.src;		
		}

 function abrirTodo(cant)
	{
		for (i=1;i<cant;i++)
		document.getElementById("respuesta_"+i).style.display = "";
}

}

var dato;
var img_mas 	= new Image();
img_mas.src = 'images/bullet7.gif';
var img_menos 	= new Image();
img_menos.src = 'images/bullet6.gif';

function mostrarSubItem (nro, cant) {	
		var i;
		var abrir = document.getElementById('sub_' + nro).style.visibility != 'visible';
		for (i=1; i<=cant; i++) {	
			//if (i != nro) {
				document.getElementById('sub_' + i).style.visibility = 'hidden';
				document.getElementById('sub_' + i).style.display = 'none';
				document.getElementById('bullet_'+i).src = img_mas.src;		
			//}
		}
		if (abrir) {
			document.getElementById('sub_' + nro).style.visibility = 'visible';
			document.getElementById('sub_' + nro).style.display = 'block';
			document.getElementById('bullet_'+nro).src = img_menos.src;		
		}

function abrirTodo(cant)  {
		for (i=1;i<cant;i++)
		document.getElementById("respuesta_"+i).style.display = "";
}

}

function nuevaVentana (sPath, sTitulo, sPropiedades){
	window.open(sPath, sTitulo, sPropiedades);
}

function setBg(objTr){
	
	}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function AbrirPopup(URL){       
       	window.open(URL,"_blank","toolbar=false, location=false, directories=false, status=false, menubar=false, scrollbars=false, resizable=false, copyhistory=false, width=775, height=420");    	
}
