//Formato base con respecto a la hoja actual
function tmc(i, a, n, l) { return '<td><a href="' + l + '"' + (a == i ? '' : ' onmouseover="tm_' + i + '.src = \'bot_i.gif\'" onmouseout="tm_' + i + '.src = ' + (a == i ? '\'bot_i.gif\'' : '\'bot_o.gif\'') + '"') + '>' + n + '</a></td><td><a href="' + l + '" onmouseover="tm_' + i + '.src = \'bot_i.gif\'" onmouseout="tm_' + i + '.src = ' + (a == i ? '\'bot_i.gif\'' : '\'bot_o.gif\'') + '"><img src="bot_' + (a == i ? 'i' : 'o') + '.gif" alt="" id="tm_' + i + '" /></a></td>'; }
function for_bas(a) { document.write('<table cellspacing="1"><tr><td></td><td class="h_3"></td><td></td></tr><tr><td></td><td class="top"><a href="javascript:var nueva = window.open(\'http://www.unam.mx\',\'_new\')"><img src="unam_link.png" alt="Universidad Nacional Aut&#243;noma de M&#233;xico" /></a></td><td></td></tr><tr><td></td><td class="h_3"></td><td></td></tr><tr><td></td><td class="top_menu"><table cellspacing="1" class="top_menu_cells"><tr><td class="top_menu_cells_lat"></td>' + tmc(1, a, 'Integrantes', 'responsable.htm') + tmc(2, a, 'Investigaci&#243;n', 'bioinformatica.htm') + tmc(3, a, 'Docencia', 'tesis.htm') + tmc(4, a, 'Proyectos', 'investigacion.htm') + tmc(5, a, 'Software', 'integra.htm') + tmc(6, a, 'Colaboraci&#243;n', 'colaboracion.htm') + tmc(7, a, 'Inicio', '../index.html') + '<td class="top_menu_cells_lat"></td></tr></table></td><td></td></tr></table>'); }

//Menu lateral
function ml(i, a, n, l) { return '<tr><td></td><td id="ml_' + i + '" class="lat_bot_' + (navigator.appName.indexOf('Explorer') == -1 ? (i == a ? 'i' : 'o') : 'c') + '"><a href="' + l + '" onmouseover="ml_' + i + '.background = \'lat_boton_i.png\'" onmouseout="ml_' + i + '.background = \'' + (i == a ? 'lat_boton_i.png' : 'lat_boton_o.png') + '\'">' + n + '</a></td><td></td></tr>'; }
function ml_c() { return '<table cellspacing="1" class="lat_bot"><tr><td></td><td class="lat_bot_s"></td><td></td></tr>'; }
function ml_i() { return '<tr><td></td><td class="lat_bot_s"></td><td></td></tr>'; }
function ml_f() { return '<tr><td></td><td></td><td></td></tr></table>'; }

function ml_responsable(a) { document.write(ml_c() +
ml(1, a, "Principal", "hc_principal.htm") + ml_i() +
ml(2, a, "Semblanza", "hc_semblanza.htm") + ml_i() +
ml(3, a, "Publicaciones", "hc_publicaciones.htm") + ml_f());
ml_1.background = a == 1 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_2.background = a == 2 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_3.background = a == 3 ? "lat_boton_i.png" : "lat_boton_o.png";
}

function ml_integrantes(a) { document.write(ml_c() +
ml(1, a, "Responsable", "responsable.htm") + ml_i() +
ml(2, a, "Miembros", "miembros.htm") + ml_i() +
ml(3, a, "Coautores", "coautores.htm") + ml_i() +
ml(4, a, "Estudiantes", "estudiantes.htm") + ml_i() +
ml(5, a, "Galer&#237;a de fotos", "galeria_de_fotos.htm") + ml_f());
ml_1.background = a == 1 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_2.background = a == 2 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_3.background = a == 3 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_4.background = a == 4 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_5.background = a == 5 ? "lat_boton_i.png" : "lat_boton_o.png";
}

function ml_investigacion(a) { document.write(ml_c() +
ml(1, a, "Bioinform&#225;tica", "bioinformatica.htm") + ml_i() +
ml(2, a, "Neuroinform&#225;tica", "neuroinformatica.htm") + ml_i() +
ml(3, a, "Sistemas Din&#225;micos", "sistemas_dinamicos.htm") + ml_i() +
ml(4, a, "Miner&#237;a de datos", "mineria_de_datos.htm") + ml_i() +
ml(5, a, "Software", "integra.htm") + ml_f());
ml_1.background = a == 1 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_2.background = a == 2 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_3.background = a == 3 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_4.background = a == 4 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_5.background = a == 5 ? "lat_boton_i.png" : "lat_boton_o.png";
}

function ml_docencia(a) { document.write(ml_c() +
ml(1, a, "Tesis", "tesis.htm") + ml_i() +
ml(2, a, "Seminarios", "seminarios.htm") + ml_i() +
ml(3, a, "Talleres", "talleres.htm") + ml_i() +
ml(4, a, "Servicio social", "servicio_social.htm") + ml_f());
ml_1.background = a == 1 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_2.background = a == 2 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_3.background = a == 3 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_4.background = a == 4 ? "lat_boton_i.png" : "lat_boton_o.png";
}

function ml_proyectos(a) { document.write(ml_c() +
ml(1, a, "Investigaci&#243;n", "investigacion.htm") + ml_i() +
ml(2, a, "Docencia", "docencia.htm") + ml_i() +
ml(3, a, "C&#225;tedras REDII", "catedras_redii.htm") + ml_f());
ml_1.background = a == 1 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_2.background = a == 2 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_3.background = a == 3 ? "lat_boton_i.png" : "lat_boton_o.png";
}

function ml_software(a) { document.write(ml_c() +
ml(1, a, "Integra", "integra.htm") + ml_i() +
ml(2, a, "Circle", "circle.htm") + ml_i() +
ml(3, a, "Fractal", "fractal.htm") + ml_i() +
ml(4, a, "Diente de sierra", "diente_de_sierra.htm") + ml_i() +
ml(5, a, "Integra Fire Systems", "integra_fire_systems.htm") + ml_i() +
ml(6, a, "Integra DOS", "integra_dos.htm") + ml_i() +
ml(7, a, "DataSOMining", "datasomining.htm") + ml_i() +
ml(8, a, "LabSOM", "labsom.htm") + ml_i() +
ml(9, a, "Bansy 3", "bansy3.htm") + ml_i() +
ml(10, a, "ViBlioSOM", "vibliosom.htm") + ml_i() +
ml(11, a, "Foro", "javascript:var nueva = window.open('http://www.dynamics.unam.edu/DinamicaNoLineal2/investigacion/software/foro/index.php','_new')") + ml_f());
ml_1.background = a == 1 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_2.background = a == 2 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_3.background = a == 3 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_4.background = a == 4 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_5.background = a == 5 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_6.background = a == 6 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_7.background = a == 7 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_8.background = a == 8 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_9.background = a == 9 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_10.background = a == 10 ? "lat_boton_i.png" : "lat_boton_o.png";
}

function ml_colaboracion(a) { document.write(ml_c() +
ml(1, a, "Colaboraci&#243;n", "colaboracion.htm") + ml_i() +
ml(2, a, "Ligas de inter&#233;s", "ligas.htm") + ml_f());
ml_1.background = a == 1 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_2.background = a == 2 ? "lat_boton_i.png" : "lat_boton_o.png";
}

function ml_correo(a) { document.write(ml_c() +
ml(1, a, "Gmail", "javascript:var nueva = window.open('https://www.gmail.com/','gmail')") + ml_i() +
ml(2, a, "Foro TIC", "javascript:var nueva = window.open('http://www.dynamics.unam.edu/ptid/redinformatica/foro/','foro')") + ml_f());
ml_1.background = a == 1 ? "lat_boton_i.png" : "lat_boton_o.png";
ml_2.background = a == 2 ? "lat_boton_i.png" : "lat_boton_o.png";
}

//E-mail
function E_mail() { document.write('<table cellspacing="1"><tr><td></td><td rowspan="3" class="E-mail_mac"><a href="javascript:var nueva = window.open(\'http://www.dynamics.unam.edu/ptid/redinformatica/\',\'_new\')"><img src="macroproyecto.png" alt="" /></a></td><td class="E-mail_int"></td><td class="E-mail_top"></td></tr><tr><td></td><td></td><td class="E-mail_ctr"><a href="correo.htm"><img src="sobre.gif" alt="E-mail" /></a></td></tr><tr><td></td><td></td><td class="E-mail_bot"></td></tr></table>'); }

//Aplicada en sub_links
function sl(i, a, n, l) { return (a == 0 && n.length == 0) ? i == 1 ? '<td></td>' : '' : n.length == 0 ? '' : '<td><img src="punto_' + (i == a ? 'i' : 'o') + '.gif" id="sl_' + i + '" alt="" /> <a href ="' + l + '"' + (i == a ? '' : ' onmouseover="sl_' + i + '.src=\'punto_i.gif\'" onmouseout="sl_' + i + '.src=\'punto_o.gif\'"') + '>' + n + '</a></td>'; }
function sub_links(act, nl1, dl1, nl2, dl2, nl3, dl3, nl4, dl4, nl5, dl5) { document.write('<table cellspacing="1" class="sub_links"><tr>' + sl(1, act, nl1, dl1) + sl(2, act, nl2, dl2) + sl(3, act, nl3, dl3) + sl(4, act, nl4, dl4) + sl(5, act, nl5, dl5) + '</tr></table>'); }

//Aplicada en seccion Integrantes
function colaboraciones(nombre, p_nombre, mail_a, mail_b, ubicacion, p_ubicacion, facultad, p_facultad, univ, p_univ) { document.write('<p>' + (p_nombre.length == 0 ? '<span class="content_nombre">' + nombre + '</span>' : '<a href="javascript:var nueva = window.open(\'' + p_nombre + '\',\'_self\')">' + nombre + '</a>') + ((nombre.length == 0) && (ubicacion.length == 0) && (facultad.length == 0) && (univ.length == 0) ? '' : '<br /><span class="ligas_txt">') + (mail_a.length == 0 ? "" : '<a href="mailto:' + mail_a + '&#64;' + mail_b + '">' + mail_a + '&#64;' + mail_b + '</a><br /><br />') + (ubicacion.length == 0 ? "" : (p_ubicacion.length == 0 ? ubicacion : '<a href="javascript:var nueva = window.open(\'' + p_ubicacion + '\',\'_new\')">' + ubicacion + '</a>') + "<br />") + (facultad.length == 0 ? "" : (p_facultad.length == 0 ? facultad : '<a href="javascript:var nueva = window.open(\'' + 
p_facultad + '\',\'_new\')">' + facultad + '</a>') + "<br />") + (univ.length == 0 ? "" : (p_univ.length == 0 ? univ : '<a href="javascript:var nueva = window.open(\'' + p_univ + '\',\'_new\')">' + univ + '</a>') + "<br />") + ((nombre.length == 0) && (ubicacion.length == 0) && (facultad.length == 0) && (univ.length == 0) ? '' : '</span>') + '</p><br /><br />'); }

//Aplicada en index
function carga() { window.open('DinamicaNoLineal3/portada.htm','_self'); }

//Esconde mails
function correo(mail_a, mail_b) { document.write('<span class="ligas_txt"><a href="javascript:var nueva = window.open(\'mailto:' + mail_a + '&#64;' + mail_b + '\',\'_new\')">' + mail_a + '&#64;' + mail_b + '</a></span>'); }



