// JavaScript Document
var ie4 = document.all;
var ns4 = document.layers;
var ns6 = document.getElementById && !document.all; 

var elementos = new Array();
elementos['academia']='cerrado';
	elementos['academia_outdoor']='cerrado';
	elementos['academia_speedshow']='cerrado';
	elementos['academia_photoshow']='cerrado';
	elementos['academia_showroom']='cerrado';
	elementos['academia_imagen']='cerrado';
	elementos['academia_pasarela']='cerrado';
	elementos['academia_top_junior']='cerrado';
elementos['agencia']='cerrado';
	elementos['agencia_objetivo']='cerrado';
	elementos['agencia_parametros']='cerrado';
	elementos['agencia_petit']='cerrado';
	elementos['agencia_top_models']='cerrado';
	elementos['agencia_international_models']='cerrado';
	elementos['agencia_men_models']='cerrado';
elementos['eventos']='cerrado';
elementos['marketing']='cerrado';
elementos['book']='cerrado';

function desplegar(e){
	obj = findObj(e);
	if(elementos[e]=="cerrado"){
		if(ns6 || ns4){
			obj.style.display="table-row";
		}else{
			obj.className="filaVisible";
		}
		elementos[e]='abierto';
	}else{
		if(ns6 || ns4){
			obj.style.display="none";
			elementos[e]="cerrado";
		}else{
			obj.className="filaInvisible";
		}
		elementos[e]='cerrado';
	}
}

// Example: obj = findObj("image1");
function findObj(theObj, theDoc)
{
  var p, i, foundObj;
  
  if(!theDoc) theDoc = document;
  if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  {
    theDoc = parent.frames[theObj.substring(p+1)].document;
    theObj = theObj.substring(0,p);
  }
  if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  for (i=0; !foundObj && i < theDoc.forms.length; i++) 
    foundObj = theDoc.forms[i][theObj];
  for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
    foundObj = findObj(theObj,theDoc.layers[i].document);
  if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  
  return foundObj;
}
