startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

function zoomText(Accion,Elemento)
{
	obj=document.getElementById(Elemento);
	var as = obj.getElementsByTagName("p");
	var tabla = obj.getElementsByTagName('table');
	
	if(obj.style.fontSize=="")
		{obj.style.fontSize="100%";}
	actual=parseInt(obj.style.fontSize);
	incremento=5;
	
	if(Accion=="reestablecer"){valor="100"}
	if(Accion=="aumentar"){valor=actual+incremento;}
	if(Accion=="disminuir"){valor=actual-incremento;}

	obj.style.fontSize=valor+"%"
	for (var i=0; i<as.length; i++) {
      as[i].style.fontSize = valor+"%";
	}
	for (var i=0; i<tabla.length; i++) { 
		var celda = tabla[i].getElementsByTagName('td');
		for (var j=0; j<celda.length; j++){
			celda[j].style.fontSize=valor+"%";
		}
	}
}

function openPictureWindow(imageType,imageName,imageWidth,imageHeight,scroll,alt,posLeft,posTop) {  // v4.01
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=" + scroll +",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	if (imageType == "swf"){
	newWindow.document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('<param name=movie value=\"'+imageName+'\"><param name=quality value=high>');
	newWindow.document.write('<embed src=\"'+imageName+'\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('</embed></object>');	}else{
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">'); 	}
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// para guia de tramites, turismo como llegar
function ocultar()
{
	var a = document.getElementById("tabla1"); a.style.display = 'none'; 
	var a = document.getElementById("tabla2"); a.style.display = 'none'; 
	var a = document.getElementById("tabla3"); a.style.display = 'none'; 
	var a = document.getElementById("tabla4"); a.style.display = 'none'; 
	var a = document.getElementById("tabla5"); a.style.display = 'none'; 
	var a = document.getElementById("tabla6"); a.style.display = 'none'; 
	var a = document.getElementById("tabla7"); a.style.display = 'none'; 
	var a = document.getElementById("tabla8"); a.style.display = 'none'; 
}
function mostrar(obj)
{
	ocultar();
	var a = document.getElementById(obj);
	if (a.style.display != 'none'){a.style.display = 'none'}
		else{a.style.display = 'inline'}
}

// para organigramas y para menu de guia de tramites
// nombrediv es lo que se oculta y titulo tiene la opcion de ocultar y mostrar
function muestra(nombrediv, titulo) {
    if(document.getElementById(nombrediv).style.display == '') {
        document.getElementById(nombrediv).style.display = 'none';
		document.getElementById(titulo).className = "mas";
    } else {
        document.getElementById(nombrediv).style.display = '';
		document.getElementById(titulo).className = 'menos';
    }
}

/* esta funcion permite tener mas de un script que se ejecute en el evento onload,
   q solo hay uno!!!! */
function addOnLoad(nuevoOnLoad) {
   var prevOnload = window.onload;
   if (typeof window.onload != 'function') {
      window.onload = nuevoOnLoad;
   }
   else {
      window.onload = function() {
          prevOnload();
          nuevoOnLoad();
		}
	}
}