Num_ca=Math.floor ((Math.random()*10000)*100);
 function mOvr(src,clrOver) {
 if (!src.contains(event.fromElement)) {
	 src.style.cursor = 'hand';
	 src.bgColor = clrOver;
	}
 }
 function mOut(src,clrIn) {
	if (!src.contains(event.toElement)) {
	 src.style.cursor = 'default';
	 src.bgColor = clrIn;
	}
 }
 function mClk(src) {
 if(event.srcElement.tagName=='TD')
	 src.children.tags('A')[0].click();
 }

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false


function show(id) {
	if (ns4) document.layers[id].visibility = "show"
    else if (ie4) document.all[id].style.visibility = "visible"
}

function hide(id) {
     if (ns4) document.layers[id].visibility = "hide"
     else if (ie4) document.all[id].style.visibility = "hidden"
}

function abrir_img(im,ti,ex,ancho,alto){
	images=im;
	tituloi=ti;
	extrasi=ex;
	anchoi=ancho;
	altoi=alto;
	masAlto=alto;
	features = "width="+ancho+",height="+masAlto;	
	
	ventana=window.open("/java/ver_imagen.htm",0,features);
		ventana.resizeTo(anchoi+10, altoi+60);
	ventana.focus();
}

function abrir_img_auto(im,ti,ex,ancho,alto){
	
	images=im;
	tituloi=ti;
	extrasi=ex;
	anchoi=ancho;
	altoi=alto;
	features = "width="+40+",height="+40;	
	ventana=window.open("/java/ver_imagen_auto.htm",100,features);
	ventana.resizeTo(anchoi+10, altoi+60);
	
}

function abrir_img_cerrar(im,ti,ex,ancho,alto){
	images=im;
	tituloi=ti;
	extrasi=ex;
	anchoi=ancho;
	altoi=alto;
	masAlto=alto+11;
	features = "width="+ancho+",height="+masAlto;	
	
	ventana=window.open("/java/ver_imagen_cerrar.htm",ancho+alto,features);
		ventana.resizeTo(anchoi, masAlto);
	ventana.focus();
}

function abrir_window(pagina,ancho,alto,nombre){
	features = "width="+ancho+",height="+alto;	
	window.open(pagina,nombre,features);
}

// Corrector de Bug PNG para Explorer. Opera y Mozilla funcionan correctamente sin este JS
function correctPNG() 
   {
   for(var i=0; i<document.images.length; i++)
      {
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase()
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	     {
		 var imgID = (img.id) ? "id='" + img.id + "' " : ""
		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		 var imgStyle = "display:inline-block;" + img.style.cssText 
		 if (img.align == "left") imgStyle = "float:left;" + imgStyle
		 if (img.align == "right") imgStyle = "float:right;" + imgStyle
		 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
		 var strNewHTML = "<span " + imgID + imgClass + imgTitle
		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
	     + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
		 img.outerHTML = strNewHTML
		 i = i-1
	     }
      }

   }

var ua = navigator.userAgent.toLowerCase();
function detect(text) {
   stringposition = ua.indexOf(text) + 1;
   data = text;
   return stringposition;
}

if (detect('opera')) {
	 
 } else if (detect('firefox')){
	 
} else if (detect('msie')){
	 window.attachEvent("onload", correctPNG);	
}	 

// AUMENTAR Y REDUCIR TAMAŅO DE FUENTES
var objPage = null; 

// tamaņo en .em de la fuente gral. del cuerpo (se define tambien en la hoja de estilos).
var actual=0.5;

		function AumentarFuente(pageName) { 
			if (detect('msie')) {
					objPage=document.getElementById(pageName); 
					actual=actual+0.05;
					objPage.style.font=actual+"em;"
			}else{
					actual=actual+0.05;
					document.getElementById(pageName).style.fontSize=actual+"em;"
			}
		} 
		function ReducirFuente(pageName) { 
			if (detect('msie')) {		
					objPage=document.getElementById(pageName); 
					actual=actual-0.05;
					objPage.style.font=actual+"em;"
			}else{
					actual=actual-0.05;
					document.getElementById(pageName).style.fontSize=actual+"em;"			
			}			
		} 


