Files
tarisan_gitea/js/bloques_tarisan.js
2025-06-09 13:54:42 +02:00

66 lines
4.7 KiB
JavaScript

function bloques()
{
var color="#C02331";
var deshabilitado="#FFAAAA";
stCaja = '';
//stCaja += ' <table cellpadding="0" cellspacing="0" border="0">\n';
stCaja += ' <table cellpadding="0" cellspacing="0" border="0" width="100%">\n';
/*stCaja += ' <tr>\n';
stCaja += ' <td bgcolor="' + color + '"><img src="./img/sp.gif" width="1" height="1" border="0"></td>\n';
stCaja += ' <td bgcolor="' + color + '"><img src="./img/sp.gif" width="744" height="1" border="0"></td>\n';
stCaja += ' <td bgcolor="' + color + '"><img src="./img/sp.gif" width="1" height="1" border="0"></td>\n';
stCaja += ' </tr>\n';*/
stCaja += ' <tr>\n';
//stCaja += ' <td bgcolor="' + color + '"><img src="./img/sp.gif" width="1" height="18" border="0"></td>\n';
stCaja += ' <td >\n';
//stCaja += ' <table cellpadding="0" cellspacing="1" border="0" width="744" >\n';
stCaja += ' <table cellpadding="0" cellspacing="1" border="0" width="100%" >\n';
stCaja += ' <tr>\n';
//Enlaces de secciones
//var mostrarSeccion = seccionesAMostrar( pNG );
var seccionSeleccionada = getSeccion();
if(seccionSeleccionada == SECCION_MEDICOS)
{
// stCaja += ' <td class="txtBlqColor" width="150" bgcolor="' + deshabilitado + '"><img src="./img/sp.gif" width="15" height="1" border="0"><b>Gesti&oacute;n de M&eacute;dicos</b></a></td>';
// stCaja += ' <td width="150" bgcolor="' + color + '"><img src="./img/sp.gif" width="15" height="1" border="0"><a class="txtBlq" href="javascript:setSeccion(SECCION_PACIENTES);" onMouseOver="self.status=\'Gesti&oacute;n de Pacientes\'; return true;" onMouseOut="self.status=\'\'; return true;"><b>Gesti&oacute;n de Pacientes</b></a></td>';
stCaja += ' <td class="txtBlqColor" width="33%" bgcolor="' + deshabilitado + '" style="text-align:center"><b>Gesti&oacute;n de M&eacute;dicos</b></a></td>';
stCaja += ' <td width="33%" bgcolor="' + color + '" style="text-align:center"><a class="txtBlq" href="javascript:setSeccion(SECCION_PACIENTES);" onMouseOver="self.status=\'Gesti&oacute;n de Pacientes\'; return true;" onMouseOut="self.status=\'\'; return true;"><b>Gesti&oacute;n de Pacientes</b></a></td>';
}
else if(seccionSeleccionada == SECCION_PACIENTES)
{
// stCaja += ' <td width="150" bgcolor="' + color + '"><img src="./img/sp.gif" width="15" height="1" border="0"><a class="txtBlq" href="javascript:setSeccion(SECCION_MEDICOS);" onMouseOver="self.status=\'Gesti&oacute;n de M&eacute;dicos\'; return true;" onMouseOut="self.status=\'\'; return true;"><b>Gesti&oacute;n de M&eacute;dicos</b></a></td>';
// stCaja += ' <td class="txtBlqColor" width="150" bgcolor="' + deshabilitado + '"><img src="./img/sp.gif" width="15" height="1" border="0"><b>Gesti&oacute;n de Pacientes</b></a></td>';
stCaja += ' <td width="33%" bgcolor="' + color + '" style="text-align:center"><a class="txtBlq" href="javascript:setSeccion(SECCION_MEDICOS);" onMouseOver="self.status=\'Gesti&oacute;n de M&eacute;dicos\'; return true;" onMouseOut="self.status=\'\'; return true;"><b>Gesti&oacute;n de M&eacute;dicos</b></a></td>';
stCaja += ' <td class="txtBlqColor" width="33%" bgcolor="' + deshabilitado + '" style="text-align:center"><b>Gesti&oacute;n de Pacientes</b></a></td>';
}
else if(seccionSeleccionada == SECCION_ADMINISTRADOR)
{
// stCaja += ' <td colspan="2" class="txtBlqColor" width="300" bgcolor="' + deshabilitado + '"><img src="./img/sp.gif" width="15" height="1" border="0"><b>Administraci&oacute;n de Usuarios</b></a></td>';
stCaja += ' <td colspan="2" class="txtBlqColor" width="66%" bgcolor="' + deshabilitado + '" style="text-align:center"><b>Administraci&oacute;n</b></a></td>';
}
//stCaja += ' <td width="150" bgcolor="' + color + '"><img src="./img/sp.gif" width="15" height="1" border="0"><a class="txtBlq" href="javascript:setSeccion(SECCION_SALIR);" onMouseOver="self.status=\'Salir\'; return true;" onMouseOut="self.status=\'\'; return true;"><b>Salir</b></a>';
stCaja += ' <td width="33%" bgcolor="' + color + '" style="text-align:center"><a class="txtBlq" href="javascript:setSeccion(SECCION_SALIR);" onMouseOver="self.status=\'Salir\'; return true;" onMouseOut="self.status=\'\'; return true;"><b>Salir</b></a>';
stCaja += ' </td>\n';
stCaja += ' </tr>\n';
stCaja += ' </table>\n';
stCaja += ' </td>';
//stCaja += ' <td bgcolor="' + color + '"><img src="img/sp.gif" width="1" height="18" border="0"></td>\n';
stCaja += ' </tr>\n';
/*stCaja += ' <tr>\n';
stCaja += ' <td colspan="3" bgcolor="' + color + '"><img src="img/sp.gif" width="746" height="1" border="0"></td>\n';
stCaja += ' </tr>\n';*/
stCaja += ' </table>\n';
var rutaPagHTML = window.location.href;
//si la pagina que incluye este js es path.html.... no dibuja el bloque.
//if ( rutaPagHTML.indexOf("path.html")<0 )
document.write(stCaja);
}