// Funciones de Menú

function sobre(src,Color) {
    if (!src.contains(event.fromElement)) {
	  src.style.cursor = 'hand';
	  src.bgColor = Color;}}
function fuera(src,Color2) {
	if (!src.contains(event.toElement)) {
	  src.style.cursor = 'default';
	  src.bgColor = Color2;}}
function pulsar(src) {
    if(event.srcElement.tagName=='TD'){
          src.children.tags('A')[0].click();}}

function BeginMenu(ancho) {
 document.write('<table width="'+ancho+'" border="0" cellspacing="0" cellpadding="2" bgcolor="#000000">');
}
//06-03-08
//CAMBIO EN VIÑETA
function ItemMenu(nombre, url, target, label){
 document.write('<tr><td onClick="pulsar(this)" onMouseOut="fuera(this,');
 document.write("'#F3F4F5'");
 document.write(');" onMouseOver="sobre(this,');
 document.write("'#CDDBEB'");
 document.write(');" bgcolor="#F3F4F5">&nbsp;<img src="imagenes/opcion.gif" border="0" width="7" height="11"/> <a class="menu" href="');
 document.write(url+'"');
 if (target == "_blank") { document.write('target="'+target+'"'); }
 document.write('><font color="#336699">');
 if (label != "") { document.write('<acronym title="'+label+'">'); }
 document.write(nombre);
 if (label != "") { document.write('</acronym>'); }
 document.write('</font></a></td></tr>');
}

function EndMenu(){
 document.write('</table>');
}


function BeginBarra(titulo) {
 if (! titulo) {titulo = '';}
 document.write('<table width="100%" height="20" border="0" cellspacing="1" cellpadding="0" bgcolor="#336699"><tr>');
}

function ItemBarra(nombre, url, target, anchocelda, img_url, img_width, img_height, label){
 document.write('<td onClick="pulsar(this)" onMouseOut="fuera(this,');
 document.write("'#CDDBEB'");
 document.write(');" onMouseOver="sobre(this,');
 document.write("'#FFFFFF'");
 document.write(');" bgcolor="#CDDBEB" width="'+anchocelda+'"><div align="center"><a class="menu" href="');
 document.write(url+'"');
 if (target == "_blank") { document.write('target="'+target+'"'); }
 document.write('><font color="#336699">');

 if (label != "") { document.write('<acronym title="'+label+'">'); }
 if (img_url != "") { document.write('<img src="'+img_url+'" width="'+img_width+'" height="'+img_height+'" border="0">'); }
 document.write(nombre);
 if (label != "") { document.write('</acronym>'); }
 document.write('</font></a></div></td>');
}

function EndBarra(){
 document.write('</tr></table>');
}

function BeginTruco() {
 document.write('<table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#000000">');
}

function ItemTruco(nombre, url, target, img_url, img_width, img_height, label){
 document.write('<tr><td onClick="pulsar(this)" onMouseOut="fuera(this,');
 document.write("'#5d7790'");
 document.write(');" onMouseOver="sobre(this,');
 document.write("'#800000'");
 document.write(');" bgcolor="#5d7790" ><a class="menu" href="');
 document.write(url+'"');
 if (target == "_blank") { document.write('target="'+target+'"'); }
 document.write('><font face="Arial" size="2" color="#FFFFFF">');

 if (label != "") { document.write('<acronym title="'+label+'">'); }
 if (img_url != "") { document.write('<img src="'+img_url+'" width="'+img_width+'" height="'+img_height+'" border="0">'); }
 document.write(nombre);
 if (label != "") { document.write('</acronym>'); }
 document.write('</font></a></div></td></tr>');
}

function EndTruco(){
 document.write('</table>');
}


function imprSelec(opcion,titulo)
{
	switch(opcion){
		case "1":
			nombre = 'contenido';
			break;	
		default:
			nombre = 'contenido';
			break;	
	}
	fecha = new Date();
	var aux = fecha.toLocaleString();
  	var ficha = document.getElementById(nombre);
 	var ventimp = window.open(' ', 'popimpr');
	ventimp.document.write( '<head><link rel="stylesheet" href="css/2008/estilo.css" type="text/css" /></head><body bgcolor="#FFFFFF" style="background:none;"><p class="titulo_impresion"><strong>'+titulo+'</strong><br><br></p>');
	ventimp.document.write( ficha.innerHTML );
	ventimp.document.write( '<p align="right">'+aux+'</p>');
	ventimp.document.write( '<p class="pie_impresion" align="center"><br><hr>Copyright &copy; 2008 - Dirección de Tecnolog&iacute;as de Informaci&oacute;n y Comunicaci&oacute;n - Facultad de Medicina</p></body>' );
	ventimp.document.close();
	ventimp.print();
	ventimp.close();
} 
function ventana(){
	var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, width=508, height=365, top=85, left=140";
	window.open("carrera_0/creditos.html","",opciones);	
}
function ocultar(id_div1){
  	var id_div = document.getElementById(id_div1);
	id_div.style.display='none';
	id_div.style.visibility='hidden';

	if(id_div1=='enlace_biblioteca')
		if(document.getElementById('animacion')){
			id_div = document.getElementById('animacion');
			id_div.style.visibility='';
		}
}