<!--
	// Abre una ventana de confirmacion al pulsar un enlace
	// idenlace: id del enlace que se quiera confirmar
	// msg: mensaje de confirmacion
    function confirmarEnlace (idenlace, msg)
    {
        addFuncionOnLoad (function() {
            var link = getObj(idenlace);
            var uri = link.href;
            link.onclick = function() {
                if (confirm (msg)) {
                    link.href = uri;
                }
            }
            link.href = "#";
        });
    }

	// Auxiliar para la siguiente
	var funciones_onload = new Array();
	function runMultipleOnLoad()
	{
		for(i=0; i<funciones_onload.length; i++)
			funciones_onload[i]();
			
		 funciones_onload=void 0;
	}
	
	// *** Aņade una funcion para que se ejecute al cargar una pagina
	function addFuncionOnLoad (funcion)
	{
		var old_onload = window.onload;
		if (old_onload == null) {
			window.onload = funcion;
		} else if (old_onload == runMultipleOnLoad) {
			funciones_onload.push (funcion);
		} else {
			window.onload = runMultipleOnLoad;
			funciones_onload.push (old_onload);
			funciones_onload.push (funcion);
		}
	}
	
	// Abre una nueva ventana para mostrar una imagen, sin modificar la ventana principal
	function PopUp(url) {
	  //posLeft = (screen.availWidth / 2) - (600 / 2);
	  //posTop = (screen.availHeight / 2) - (400 / 2);
	  //window.open (url, "Imagen", "width=600,height=400,left="+posLeft+",top="+posTop+",toolbar=1,location=0,resizable=1,scrollbars=1");
	  window.open (url);
	}

	function frameOrPopup (frame, url, urlPopup, width, height) {
		if (!urlPopup)  urlPopup = url;
		if (parent.frames && parent.frames[frame]) {
			parent.frames[frame].location = url;
		} else {
			var config = "location=1,menubar=1,resizable=1,scrollbars=1,status=1,titlebar=1,toolbar=1";
			if (width) {
			    config = config + ",width=" + width;
			    var sx = (screen.availWidth / 2) - (width / 2);
			    if (screen.availWidth)  config = config + ",left=" + sx + ",screenX=" + sx;
			}
			if (height) {
			    config = config + ",height=" + height;
			    var sy = 10;
//			    var sy = (screen.availHeight / 2) - (height / 2);
			    if (screen.availHeight)  config = config + ",top=" + sy + ",screenY=" + sy;
			}
			window.open (urlPopup, "", config);
		}
	}
//-->

