// HPWEB JAVASCRIPT hpweb_utilities.js VERSION hpweb.1.2

//menu superior


function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function MM_findObj(n, d) { //v4.0
  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&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function line()
{
   document.write("<tr><td bgcolor=#63A58C colspan=2><img src=icon/nada.gif width=1 height=1 ></td></tr>");
}

function line1x16()
{
   document.write("<tr><td bgcolor=#63A58C  width=1 ><img src=icon/nada.gif width=1 height=16 ></td>");
}


function line1x16bis()
{
   document.write("<td bgcolor=#63A58C  width=1 ><img src=icon/nada.gif width=1 height=16 ></td>");
}


function line3()
{
   document.write("<tr><td bgcolor='#63A58C' colspan='3'><img src='icon/nada.gif' width='1' height='1' ></td></tr>");
}


function menuitem( url , label , ancho )
{
 //menú ítem
 line1x16(); 
 document.write("<td bgcolor='#FFFFFF' width='"+ancho+"' class=menu2layer  ");
 document.write(" onMouseOver=\"pviiW3Cbg(this, '#efefef')\" onMouseOut=\"pviiW3Cbg(this, '#FFFFFF')\"  ");
 document.write(" height='16' NOWRAP>&nbsp;&nbsp;<a href='"+url+"' ");
 document.write(" class=menu2layer>"+label+"</a></td>");
 line1x16bis(); 
 document.write("</tr>"); 
 line3();
}



function boton( idcapa ,  xcoord , ycoord , ancho , url , idcapadestino , label , seccion , opcccion , imagen , imagenact )
{
 //BOTÓN NUESTRA CLÍNICA
 document.write("<div id=\""+idcapa+"\" style=\"position:absolute; width:150px; height:18px; z-index:3; left: "+xcoord+"px; top: "+ycoord+"px\">"); 
 document.write("<table width="+(ancho+1)+" border=0 cellspacing=0 cellpadding=0>");
 line();  line1x16();
 if ( opcccion == seccion ) 
   {  document.write("<td bgcolor=#63A58C width="+ancho+" class=menutop onMouseOver=\"pviiW3Cbg(this, \'#78c99f\')\" onMouseOut=\"pviiW3Cbg(this, '#63A58C')\" ");    }
 else 
   {  document.write("<td bgcolor=#FFFFFF width="+ancho+" class=menutop onMouseOver=\"pviiW3Cbg(this, \'#efefff\')\" onMouseOut=\"pviiW3Cbg(this, 'FFFFFF')\" ");    }
 
 document.write(" height=16 align=CENTER> <a href="+url+"  onMouseOver=\"P7_autoLayers('"+idcapadestino+"','menucloser')\"  onFocus=\"if(this.blur)this.blur()\">   "); 
 if ( opcccion == seccion ) 
   {  document.write("<img src='icon2/"+imagenact+"' ");     }
 else 
   {  document.write("<img src='icon2/"+imagen+"' ");     }

 document.write("width=144 height=16  border=0 ALT='"+label+"'></a></td></tr>");
 line();  document.write(" </table></div>");	
	
	
}




function menu( option )
{

//BOTÓN NUESTRA CLÍNICA
boton( "Bnuestraclinica" ,  10 , 106 , 147 , "01_palabraspresentacion.html" , "Mnuestraclinica" , "Nuestra Clínica" , 1 , option , "b_nuestraclinica.gif","b_nuestraclinica_act.gif"  );


//BOTÓN CIRUGÍA MAXILOFACIAL
boton( "Bcirugiamaxilofacial" ,  158 , 106 , 147 , "23_cirugia_maxilofacial.htm" , "Mcirugiamaxilofacial" , "Cirugía Maxilofacial" , 3 , option , "b_cirugiamaxilofacial.gif" , "b_cirugiamaxilofacial_act.gif" ); 



//BOTÓN CIRUGÍA BUCAL 
 boton( "Bcirugiabucal" ,  306 , 106 , 147 , "22_cirugia_bucal.htm" , "Mcirugiabucal" , "Cirugía Bucal" , 2 , option , "b_cirugiabucal.gif" , "b_cirugiabucal_act.gif" ); 


 
//BOTÓN CIRUGÍA ORTOGNATICA
boton( "Besteticadental" ,  454 , 106 , 147 , "25_esteticadental.htm" , "Mesteticadental" , "Odontología Estética" , 4 , option , "b_esteticadental.gif" , "b_esteticadental_act.gif" ); 


//BOTÓN IMPLANTES DENTALES
 document.write("<div id=\"Bsincirugia\" style=\"position:absolute; width:150px; height:18px; z-index:3; left: 602px; top: 106px\">"); 
 document.write("<table width=148 border=0 cellspacing=0 cellpadding=0>");
 document.write("<tr><td bgcolor=#63A58C colspan=3><img src=icon/nada.gif width=1 height=1 ></td></tr>");
 line1x16();
 if ( option == 5 ) 
   {  document.write("<td bgcolor=#63A58C width=146 class=menutop onMouseOver=\"pviiW3Cbg(this, \'#78c99f\')\" onMouseOut=\"pviiW3Cbg(this, '#63A58C')\" ");    }
 else 
   {  document.write("<td bgcolor=#FFFFFF width=146 class=menutop onMouseOver=\"pviiW3Cbg(this, \'#efefff\')\" onMouseOut=\"pviiW3Cbg(this, 'FFFFFF')\" ");    }
 
 document.write(" height=16 align=CENTER><a href=22_implantes_dentales.html onMouseOver=\"P7_autoLayers('Modontologia','menucloser')\"    onFocus=\"if(this.blur)this.blur()\">  ");
 
  if ( option == 5 ) 
   {  document.write("<img src='icon2/b_implantesdentales_act.gif' ");     }
 else 
   {  document.write("<img src='icon2/b_implantesdentales.gif' ");     }

 document.write("width=144 height=16  border=0 ALT=\"Implantes dentales\"></a></td>");
 document.write("<td bgcolor=#63A58C  width=1 ><img src=icon/nada.gif width=1 height=16 ></td>");
 document.write("</tr>");
 document.write("<tr><td bgcolor=#63A58C colspan=3><img src=icon/nada.gif width=1 height=1 ></td></tr>");
 document.write(" </table></div>"); 




//MENÚ NIVEL 2 NUESTRA CLÍNICA
 
document.write("<div id=\"Mnuestraclinica\" style=\"position:absolute; width:150px; height:108px; z-index:2; left: 10px; top: 124px; visibility: hidden\"> ");
document.write("<table width='149' border='0' cellspacing='0' cellpadding='0'>");
menuitem( "01_palabraspresentacion.html" , "Palabras de presentación" , 143 ); 
menuitem( "01_actividades0.htm" , "Actividades de la Clínica" , 143 ); 
menuitem( "01_localiza.html" , "Localización y horarios" , 143 );  
menuitem( "01_honorarios.html" , "Honorarios y costes" , 143 );  
menuitem( "01_equipo.htm" , "Equipo médico" , 143 );  
menuitem( "01_clinicas.htm" , "Clínicas donde operamos" , 143 );  
document.write("</table></div>");
//fin menú segundo nivel nuestra clínica





 //MENÚ NIVEL 2 CIRUGÍA BUCAL
 
 document.write("<div id=\"Mcirugiabucal\" style=\"position:absolute; width:150px; height:108px; z-index:2; left: 306px; top: 124px; visibility: hidden\"> ");
document.write("<table width='149' border='0' cellspacing='0' cellpadding='0'>");
menuitem( "22_cirugia_tercerosmolares.htm" , "Extracción muelas del juicio" , 143 );
menuitem( "25_enfermedadperiodontal.htm" , "Enfermedad periodontal" , 143 );

document.write("</table></div>");
//fin menú segundo nivel Cirugía BUCAL






 //MENÚ NIVEL 2 CIRUGÍA MAXILOFACIAL
document.write("<div id=\"Mcirugiamaxilofacial\" style=\"position:absolute; width:150px; height:108px; z-index:2; left: 158px; top: 124px; visibility: hidden\"> ");
document.write("<table width='149' border='0' cellspacing='0' cellpadding='0'>");
menuitem( "23_bruxismo.htm" , "Bruxismo" , 143 );
menuitem( "24_cirugia_ortognatica.htm" , "Cirugía Ortognática" , 143 );
menuitem( "23_atm.htm" , "Art. temporomandibular" , 143 );
document.write("</table></div>");
 //fin menú segundo nivel Cirugía corporal
 
 
 
 

//MENÚ NIVEL 2 ESTETICA DENTAL
document.write("<div id=\"Mesteticadental\" style=\"position:absolute; width:150px; height:108px; z-index:2; left: 454px; top: 124px; visibility: hidden\"> ");
document.write("<table width='149' border='0' cellspacing='0' cellpadding='0'>");
menuitem( "25_blanqueamientodental.htm" , "Blanqueamiento dental" , 143 );  
menuitem( "25_carillasdentales.htm" , "Carillas dentales" , 143 ); 
menuitem( "25_carillascomposite.htm" , "Carillas de composite" , 143 ); 
menuitem( "25_carillasporcelana.htm" , "Carillas de porcelana" , 143 ); 
menuitem( "25_biomateriales.htm" , "Coronas cerámicas" , 143 ); 
menuitem( "25_odontologiarestauradora.htm" , "Odontología restauradora" , 143 ); 
document.write("</table></div>");
//fin menú segundo nivel cirugia ortognatica



 
//MENÚ NIVEL 2 IMPLANTES DENTALES
document.write("<div id=\"Modontologia\" style=\"position:absolute; width:150px; height:108px; z-index:2; left: 602px; top: 124px; visibility: hidden\"> ");
document.write("<table width='148' border='0' cellspacing='0' cellpadding='0'>");
menuitem( "22_cirugia_cirugiapreprotesica.htm" , "Cirugía preprotésica" , 146 );
document.write("</table></div>");
//fin menú segundo nivel ODONTOLOGIA



//Capa auxiliar menucloser
document.write("<div id=\"menucloser\" style=\"position:absolute; width:98%; height:400; z-index:1; left: 0; top: 0; visibility: hidden\"><a href=\"javascript:;\" onMouseOver=\"P7_autoLayers()\" onFocus=\"if(this.blur)this.blur()\"><img src='icon/nada.gif' width='100%' height='500' border='0'></a></div>");

 
}

//FIN MENÚ






// funcion autolayers
function P7_autoLayers() 
{
 var g,b,k,f,args=P7_autoLayers.arguments;
 if(!document.p7setc) {p7c=new Array();document.p7setc=true;}
 for(k=0; k<p7c.length; k++) {
  if((g=MM_findObj(p7c[k]))!=null) {
   b=(document.layers)?g:g.style;b.visibility="hidden";}}
 for(k=0; k<args.length; k++) {
  if((g=MM_findObj(args[k])) != null) {
   b=(document.layers)?g:g.style;b.visibility="visible";f=false;
   for(j=0;j<p7c.length;j++) {
    if(args[k]==p7c[j]) {f=true;}}
  if(!f) {p7c[p7c.length++]=args[k];}}}
}


function pviiW3Cbg(obj, pviiColor) 
{ 
	obj.style.backgroundColor=pviiColor;
}




