function mOvr(src,clrOver){ 
        if (!src.contains(event.fromElement)){ 
				  src.style.cursor = 'default'; 
				  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();
}

function visor (doc,tit,ancho,alto)
{
	altov = alto + 20;
	anchov = ancho + 20;
	window.open(doc,tit,'scrollbars=no,toolbar=no,status=no,resizable=no, top=70,left=160,width=' + anchov + ',height=' + altov);
}
function visorpdf (doc,tit,ancho,alto)
{
	altov = alto;
	anchov = ancho;
	window.open(doc,tit,'scrollbars=yes,toolbar=no,status=no,resizable=yes, top=70,left=160,width=' + anchov + ',height=' + altov);
}

function isnotEmail (s) {
if (isEmail(s)){
	return false;
	}
else {
	return true;
}
}
function checkMail() {
if ((document.correo.de.value.length == 0 || isWhitespace(document.correo.de.value)) && (isnotEmail(document.correo.mailde.value))) 
{
alert('Debe introducir su nombre o direccion de correo para enviar un mensaje');
return false;
}
if (document.correo.cuerpo.value.length == 0 || isWhitespace(document.correo.cuerpo.value)) 
{
alert('Debe introducir el texto del mensaje');
return false;
}

}
function IniciaPag() {
	//document.form.menu.value = 1;
	self.defaultStatus = "Seleccione una opci&oacute;n de las disponibles.";
	return true;
}

function FinPag() {
	self.defaultStatus = "";
	return true;
}

  if (!(document.all||document.getElementById)) document.tags.td.fontSize="10px";
 // if (self.location == parent.location) document.location.replace("http://www.cajalaboral.com");

  var ns6=document.getElementById&&!document.all;
  if (!ns6){
    var str_base=document.all?"document.all.":"document.layers.";
    var str_arriba=document.all?".style.pixelTop":".top";
    var str_alto=document.all?".offsetHeight":".document.height";
    var str_recorte=document.all?".style.clip":".clip.bottom";
    var str_mostrar=document.all?".style.visibility='visible'":".visibility='show'";
    var str_ocultar=document.all?".style.visibility='hidden'":".visibility='hide'";
  }
  var arr_menus=["menu1", "menu2", "menu3", "menu4", "menu7", "menu8"];
  var arr_submenus=["contmenu1", "contmenu2", "contmenu3", "contmenu4", "contmenu7", "contmenu8"];
  var vnt_abierto='';
  var vnt_porabrir='';
  var bln_ocupado=false;

 function fn_iniciar(NumMenu){
   IniciaPag();
   if (bln_ocupado)	return;
   if (ns6){
     if (!document.getElementById(arr_submenus[NumMenu])) return;
   }
   else{
     if (!eval(str_base+arr_submenus[NumMenu])) return;
   }
   if (vnt_abierto!==''&&vnt_abierto!=NumMenu){
     vnt_porabrir=NumMenu;
     fn_plegar(vnt_abierto,25,100);
   }
   else
     if	(vnt_abierto==='')
       fn_desplegar(NumMenu,25,100);
     else
       fn_plegar(vnt_abierto,25,100);
 }

 function fn_desplegar(NumMenu,Dif,Seg,int_Alto){
   bln_ocupado=true;
   vnt_abierto=NumMenu;
   vnt_porabrir='';
   if (ns6) {
     if (parseInt(document.getElementById(arr_submenus[NumMenu]).style.top)==0) {
       document.getElementById(arr_submenus[NumMenu]).style.top=1+parseInt(document.getElementById(arr_menus[NumMenu]).style.top)+parseInt(document.getElementById(arr_menus[NumMenu]).offsetHeight);
       document.getElementById(arr_submenus[NumMenu]).style.visibility='visible';
     }
     alt=parseInt(document.getElementById(arr_submenus[NumMenu]).offsetHeight);
     int_Alto=int_Alto?int_Alto:0;
     if (int_Alto+Dif>alt) Dif=alt-int_Alto;
     int_Alto+=Dif;
     fn_ajustar(NumMenu,Dif);
     if (int_Alto<alt)
       timer=setTimeout("fn_desplegar("+NumMenu+","+Dif+","+Seg+","+int_Alto+")",Seg);
     else
       bln_ocupado=false;
     return;
   }
   if (eval(str_base+arr_submenus[NumMenu]+str_arriba)==0) {
     eval(str_base+arr_submenus[NumMenu]+str_arriba+"=1+"+str_base+arr_menus[NumMenu]+str_arriba+"+"+str_base+arr_menus[NumMenu]+str_alto);
     eval(str_base+arr_submenus[NumMenu]+str_mostrar);
   }
   alt=eval(str_base+arr_submenus[NumMenu]+str_alto);
   int_Alto=int_Alto?int_Alto:0;
   if (int_Alto+Dif>alt) Dif=alt-int_Alto;
   int_Alto+=Dif;
   if (navigator.userAgent.indexOf("Mac") == -1){
	strecorte=document.all?'rect(0,100%,'+int_Alto+',0)':int_Alto;
	eval(str_base+arr_submenus[NumMenu]+str_recorte+'="'+strecorte+'"')
   }
   fn_ajustar(NumMenu,Dif);
   if (int_Alto<alt)
     timer=setTimeout("fn_desplegar("+NumMenu+","+Dif+","+Seg+","+int_Alto+")",Seg);
   else
     bln_ocupado=false;
 }

 function fn_plegar(NumMenu,Dif,Seg,int_Alto){
   bln_ocupado=true;
   if (ns6){
     alt=parseInt(document.getElementById(arr_submenus[NumMenu]).offsetHeight);
     int_Alto=int_Alto?int_Alto:alt;
     if (int_Alto-Dif<0) Dif=int_Alto;
     int_Alto-=Dif;
     document.getElementById(arr_submenus[NumMenu]).style.clip.bottom=int_Alto;
     fn_ajustar(NumMenu,-Dif);
     if (int_Alto>0)
       timer=setTimeout("fn_plegar("+NumMenu+","+Dif+","+Seg+","+int_Alto+")",Seg);
     else{
       vnt_abierto='';
       vnt_porabrir===''?bln_ocupado=false:fn_desplegar(vnt_porabrir,25,1);
       document.getElementById(arr_submenus[NumMenu]).style.visibility='hidden';
       document.getElementById(arr_submenus[NumMenu]).style.top=0;
     }
     return;
   }
   alt=eval(str_base+arr_submenus[NumMenu]+str_alto);
   int_Alto=int_Alto?int_Alto:alt;
   if (int_Alto-Dif<0) Dif=int_Alto;
   int_Alto-=Dif;
   if (navigator.userAgent.indexOf("Mac") == -1){
	strecorte=document.all?'rect(0,100%,'+int_Alto+',0)':int_Alto;
	eval(str_base+arr_submenus[NumMenu]+str_recorte+'="'+strecorte+'"')
   }
   fn_ajustar(NumMenu,-Dif);
   if (int_Alto>0)
     timer=setTimeout("fn_plegar("+NumMenu+","+Dif+","+Seg+","+int_Alto+")",Seg);
   else{
     vnt_abierto='';
     vnt_porabrir===''?bln_ocupado=false:fn_desplegar(vnt_porabrir,25,1);
     eval(str_base+arr_submenus[NumMenu]+str_ocultar);
     eval(str_base+arr_submenus[NumMenu]+str_arriba+"=0");
   }
 }

 function fn_ajustar(NumMenu,Dif){
   if (Dif==0) return;
   if (ns6){
     for(i=NumMenu+1;i<arr_menus.length;i++){
       document.getElementById(arr_menus[i]).style.top=parseInt(document.getElementById(arr_menus[i]).style.top)+Dif;
     }
     return;
   }
   for(i=NumMenu+1;i<arr_menus.length;i++){
     eval(str_base+arr_menus[i]+str_arriba+'+='+Dif);
   }
 }