var bEntra=0;
function Inicio(){Inicia_Menu(-1);Inicia_Idioma(numIdioma);Muestra_Idioma();hm_Muestra();Inicia_mhotel(mh_numOpcion,mh_numOpcion2);Muestra_mhotel();}
function hm_Chequea(nOp){hm_numOpcion=nOp;hm_Muestra();if(hm_opciones_submenu[nOp]==0){window.location.href=hm_opciones_links[nOp];}}
function hm_MiPortal(){window.location.href="http://"+gServer+"/Barcelo/"+gIdioma+"/MiPortal/Default";}
function hm_ServiciosProf(){window.location.href="http://"+gServer+"/Barcelo/"+gIdioma+"/AccesoProfesionales/Default";}
function hm_SubMenu(nOp){hm_numOpcion=nOp;hm_Muestra();}
function hm_Enlace(nOp){window.location.href=hm_opciones_links[nOp];}
function cambioImagen(iNum){for(i=0;i<hm_opciones.length;i++){if(iNum==i){eval("tipo_img"+i+"='"+hm_opciones_sel[i]+"'")}else{eval("tipo_img"+i+"='"+hm_opciones[i]+"'")}}}

for(i=0;i<hm_opciones.length;i++){eval("var tipo_img"+i+"=0");}

function hm_Muestra(){
var htm_out="";var i=0;var param="'";
htm_out='<table width="617px" height="48px" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"><tr><td height="48px" valign="top"><table width="617px" height="28px" border="0" cellpadding="0" cellspacing="0" bgcolor="#1c60ab"><tr><td width="455px" height="28px">';
for(i=0;i<hm_opciones.length;i++){
 if(eval("tipo_img"+i+"==0")){eval("tipo_img"+i+"='"+hm_opciones[i]+"'")};
 htm_out+='<a href="javascript:hm_SubMenu('+i+')"><img id="imgMenuSup'+i+'" name="imgMenuSup'+i+'" border="0" src="'+hm_imgraiz_op+eval("tipo_img"+i)+'" onClick="javascript:cambioImagen('+i+');"></a>';
}
htm_out+='</td>';
if(hm_USUARIOREGISTRADO!=""){
 
 if(hm_ImagenP==0){
  htm_out=htm_out+'<td width="160px" style="cursor:hand" bgcolor="#C8DEEF" class="textousuarioMiBarcelo" align="right" valign="bottom" ';
  htm_out+=' onclick="hm_MiPortal();"';
  if(!ie4)htm_out+=' onmouseover="style.cursor=(\'pointer\');"';
  htm_out+=' background="'+hm_imgraiz+'btn_miportal.gif">&nbsp;';
 }
 else{
  htm_out=htm_out+'<td width="160px" style="cursor:hand" bgcolor="#C8DEEF" class="textousuario" align="right" valign="bottom" ';
  htm_out+=' onclick="hm_ServiciosProf();"';
  if(!ie4)htm_out+=' onmouseover="style.cursor=(\'pointer\');"';
  htm_out+=' background="'+hm_imgraiz+'servicios_profesionales.gif">&nbsp;';
 }
 if (Apellidos_Temp.length!=""){
	if(Apellidos_Temp.length<25){htm_out+=Trato_Temp+" "+Apellidos_Temp;}
	else{
	 var ultimCop=Apellidos_Temp.lastIndexOf(" ");
	 if(ultimCop>23){Apellidos_Temp=Apellidos_Temp.substr(0,23);ultimCop=Apellidos_Temp.lastIndexOf(" ");htm_out=htm_out+Trato_Temp+". "+Apellidos_Temp.substr(0,ultimCop);}
	 else{
	  if(ultimCop!=-1){htm_out+=Trato_Temp+". "+Apellidos_Temp.substr(0,ultimCop);}
	  else{Apellidos_Temp=Apellidos_Temp.substr(0,23);htm_out+=Trato_Temp+" "+Apellidos_Temp;}
	 }
	}
 }
}
else{
 htm_out+='<td width="160px" bgcolor="#C8DEEF" class="textousuarioMiBarcelo" align="right" onclick="javascript:window.location=\'http://'+gServer+'/Barcelo/'+gIdioma+'/Registro/particular?hPantalla=PARTICULAR&hTipo=CREACION\'" style="cursor:hand" valign="bottom"';
 if(!ie4){htm_out+=' onmouseover="style.cursor=(\'pointer\');"'}; 			
 htm_out+=' background="'+hm_imgraiz+'btn_miportal.gif">&nbsp;';
}
htm_out+='</td></tr></table><table width="617px" height="1px" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">';
htm_out+='<tr><td width="617px" class="'+hm_estilo_loc+'" bgcolor="#ffffff"><img src="'+hm_imgraiz+'espacio.gif" border="0" width="617px" height="1px"></td></tr></table>';
htm_out+='<table width="617px" height="16px" border="0" cellpadding="0" cellspacing="0" bgcolor="#e0edf6"><tr>';
if(hm_opciones_submenu[hm_numOpcion]!=1){
 htm_out+='<td width="1px" height="17px"class="'+hm_estilo_loc+'" bgcolor="#ffffff"><img src="'+hm_imgraiz+'espacio.gif" border="0" width="1px" height="17px"></td><td width="450px" height="17px" bgcolor="'+hm_localizadorcolor+'" height="18px" class="textolocalizador">'+strEstaUd+'<a href="http://'+gServer+'/barcelo/'+gIdioma+'/default" class="'+hm_estilo_lochref+'">Home</a>'+hm_Texto_Barra_Ubic;
 htm_out+='</td><td height="17px" bgcolor="#FFFFFF" class="textolocalizador" align="right" width="67px"><img src="'+hm_imgraiz+'botones/btn_desconexion1.gif" border="0"></td><td><a href="javascript:Desconexion();"><img src="'+hm_imgraiz+'botones/btn_desconexion2.gif" width="96px" border="0" alt="'+strDesconexion+'"></a>';
}
else{
 fondolocalizador=eval("hm_opciones"+hm_numOpcion+"_bgcolor");htm_out+='<td width="610px" height="18px" class="'+hm_estilo_loc+'">';
 for(i=0;i<eval("hm_opciones"+hm_numOpcion+".length");i++){htm_out+='<a href="'+eval('hm_opciones'+hm_numOpcion+'_links['+i+']')+'" class="'+hm_estilo+'" target="_top"><img src="'+hm_imgraiz_op+eval('hm_opciones'+hm_numOpcion+'['+i+']')+'" border="0"></a>';}
 htm_out+='</td>';
}
htm_out+='</tr></table>';
EscribeCapa(hm_capaMenu,hm_capaMenuPadre,hm_capaMenu,htm_out);
}