
// variables para la visualización de imágenes ampliadas
imagen = '';
tituloi = '';
extrasi = '';
anchoi = '';
altoi = '';

function abrir_img(im,ti,ex,ancho,alto){
	imagen=im;
	tituloi=ti;
	extrasi=ex;
	anchoi=ancho;
	altoi=alto;
	masAlto=alto+11;
	features = "width="+ancho+",height="+masAlto;	
	window.open("verimagen.htm",ancho+alto,features);
}

function imprimir(pag_imprimir){
window.open(pag_imprimir,'Impresion','toolbar=yes,location=no,directories=no,status=no, menubar=no,scrollbars=yes,resizable=no,width=660,height=450');
}


function miniventana(pag_imprimir){
window.open(pag_imprimir,'Impresion','toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=no,resizable=no,width=300,height=150');
}

function anuncio(pag_imprimir){
window.open(pag_imprimir,'Impresion','toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=no,resizable=no,width=400,height=400');
}

function selecciona(sitio) 
{ if (sitio!="0") window.location.href=sitio; }

function openWindow(url, name) {popupWin = window.open(url, name, 'scrollbars,resizable,width=400,height=350')}



function mOvr(src,clrOver) {
    if (!src.contains(event.fromElement)) {
	  src.style.cursor = 'hand';
	  src.bgColor = clrOver;
	}
  }
  function mOut(src,clrIn) {
	if (!src.contains(event.toElement)) {
	  src.style.cursor = 'default';
	  src.bgColor = clrIn;
	}
  }
  function mClk(src) {
    if(event.srcElement.tagName=='TD'){
	  src.children.tags('A')[0].click();
    }
  }


var monthNames = new makeArray(12);
monthNames[0] = "enero";
monthNames[1] = "febrero";
monthNames[2] = "marzo";
monthNames[3] = "abril";
monthNames[4] = "mayo";
monthNames[5] = "junio";
monthNames[6] = "julio";
monthNames[7] = "agosto";
monthNames[8] = "septiembre";
monthNames[9] = "octubre";
monthNames[10] = "noviembre";
monthNames[11] = "diciembre";

// Array of day names

var dayNames = new makeArray(7);
dayNames[0] = "Domingo";
dayNames[1] = "Lunes";
dayNames[2] = "Martes";
dayNames[3] = "Mi&eacute;rcoles";
dayNames[4] = "Jueves";
dayNames[5] = "Viernes";
dayNames[6] = "S&aacute;bado";

var now = new Date();
var year = now.getYear();

if (year < 2000) year = year + 1900;

function makeArray(len) 
{
    for (var i = 0; i < len; i++) this[i] = null;
    this.length = len;
}

function ventana(archivo,ancho,alto){
		window.open(archivo,"Encuesta","toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=yes, resizable=0, copyhistory=0, width=" + ancho + ", height=" + alto);
	}

function autoventana(archivo,ancho,alto){
		window.open(archivo,"Avisos","toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0, copyhistory=0, width=" + ancho + ", height=" + alto);
	}

function ventanachat(archivo,ancho,alto){
		window.open(archivo,"Encuesta","toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=yes, resizable=yes, copyhistory=0, width=" + ancho + ", height=" + alto);
	}

function newWin(archivo,ancho,alto){
		window.open(archivo,"Agenda","toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=no, resizable=no, copyhistory=0, width=" + ancho + ", height=" + alto);
	}

function looknoti(archivo,ancho,alto){
		window.open(archivo,"Noticias","toolbar=yes, location=0, directories=0, status=0, menubar=0, scrollbars=yes, resizable=0, copyhistory=0, width=" + ancho + ", height=" + alto);
	}

function encuestas(){
		window.open("resultado.htm","Encuesta","toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=yes, resizable=0, copyhistory=0, width=400, height=300");
	}

function IniciarLista() {
	document.forms["FormLista"].lista.options.selectedIndex = -1
}

function IrURL(formulario) {
	indice = formulario.lista.selectedIndex
	if (indice == -1)
		alert('Debe seleccionar una sección de la lista desplegable.')
	else
		window.open(formulario.lista.options[indice].value, "_self")
}

function fullscreen() {
  window.open( document.location.href, 'full', 'fullscreen=1' )
}

function normalscreen() {
if ( opener && !opener.closed ) {
  opener.document.location.href = document.location.href
  opener.focus()
	}
window.close()
}

function showmenuie5(){
		var rightedge=document.body.clientWidth-event.clientX
		var bottomedge=document.body.clientHeight-event.clientY
		if (rightedge<ie5menu.offsetWidth)
			ie5menu.style.left=document.body.scrollLeft+event.clientX-ie5menu.offsetWidth
		else
			ie5menu.style.left=document.body.scrollLeft+event.clientX
		if (bottomedge<ie5menu.offsetHeight)
			ie5menu.style.top=document.body.scrollTop+event.clientY-ie5menu.offsetHeight
		else
			ie5menu.style.top=document.body.scrollTop+event.clientY
		ie5menu.style.visibility="visible"
		return false
}
function hidemenuie5(){
		ie5menu.style.visibility="hidden"
}
function highlightie5(){
		if (event.srcElement.className=="menuitems"){
			event.srcElement.style.backgroundColor="800000"
			event.srcElement.style.color="#FF0000"
		}
}
function lowlightie5(){
		if (event.srcElement.className=="menuitems"){
			event.srcElement.style.backgroundColor=""
			event.srcElement.style.color="#FFFFFF"
		}
} 
function jumptoie5(){
		if (event.srcElement.className=="menuitems"){
			if (event.srcElement.url != ''){
				if (event.srcElement.getAttribute("target")!=null)
					window.open(event.srcElement.url,event.srcElement.getAttribute("target"))
				else
					window.location=event.srcElement.url
			}
		}
}
