window.addEventHandler = function(eventName,handler){if(window.eventHandlers == undefined){window.eventHandlers = {};};if(window.eventHandlers[eventName] == undefined){window.eventHandlers[eventName] = {};window[eventName] = function(e){var en;for(var i in window.eventHandlers){en = "on"+((navigator.appName.match(/Microsoft/i))?event:e).type;if(i == en){for(var j in window.eventHandlers[i]){if(window.eventHandlers[i][j] != null){window.eventHandlers[i][j].handler.call(window);};};};};};};window.eventHandlers[eventName][handler.toString().match(/^(function |)([a-z0-9_]+)( ?\(.*?\)|)/i)[2]] = {"handler":handler};};window.removeEventHandler = function(eventName,handler){window.eventHandlers[eventName][handler.toString().match(/^(function |)([a-z0-9_]+)( ?\(.*?\)|)/i)[2]] = null;};window.DivPopUp = function(width,height){window.DivPopUp.prototype .width = width;window.DivPopUp.prototype.height = height;window.DivPopUp.prototype.isIE = navigator.appName.match(/Microsoft/i);window.DivPopUp.prototype.fondo = document.createElement("div");window.DivPopUp.prototype.fondo.onclick = window.DivPopUp.prototype.hide;window.DivPopUp.prototype.fondo.style.zIndex = "1000";window.DivPopUp.prototype.fondo.style.position = "absolute";window.DivPopUp.prototype.fondo.style.backgroundColor = "#000000";window.DivPopUp.prototype.fondo.style.opacity = "0.5";window.DivPopUp.prototype.fondo.style.filter = "alpha(opacity=50)";window.DivPopUp.prototype.fondo.style.position = "absolute";window.DivPopUp.prototype.popUp = document.createElement("div");window.DivPopUp.prototype.popUp.style.zIndex = "1001";window.DivPopUp.prototype.popUp.style.position = "absolute";window.DivPopUp.prototype.popUp.style.backgroundColor = "#ffffff";window.DivPopUp.prototype.popUp.style.width = window.DivPopUp.prototype.width.toString()+"px";window.DivPopUp.prototype.popUp.style.height = window.DivPopUp.prototype.height.toString()+"px";window.DivPopUp.prototype.toolbar = document.createElement("div");window.DivPopUp.prototype.toolbar.style.backgroundColor = "#000000";window.DivPopUp.prototype.toolbar.style.textAlign = "right";window.DivPopUp.prototype.closeButton = document.createElement("a");window.DivPopUp.prototype.closeButton.href = "javascript:;";window.DivPopUp.prototype.closeButton.onclick = window.DivPopUp.prototype.hide;window.DivPopUp.prototype.closeButton.style.color = "#ffffff";window.DivPopUp.prototype.closeButton.innerHTML = "cerrar";window.DivPopUp.prototype.toolbar.appendChild(window.DivPopUp.prototype.closeButton);window.DivPopUp.prototype.popUp.appendChild(window.DivPopUp.prototype.toolbar);window.DivPopUp.prototype.contenido = document.createElement("div");window.DivPopUp.prototype.popUp.appendChild(window.DivPopUp.prototype.contenido);};window.DivPopUp.prototype.center = function center(){var xOffset = ((window.DivPopUp.prototype.isIE)?document.body.scrollLeft:window.pageXOffset);var yOffset = ((window.DivPopUp.prototype.isIE)?document.body.scrollTop:window.pageYOffset);var fondoWidth = ((window.DivPopUp.prototype.isIE)?document.body.clientWidth:window.innerWidth);var fondoHeight = ((window.DivPopUp.prototype.isIE)?document.body.clientHeight:window.innerHeight);window.DivPopUp.prototype.fondo.style.left = xOffset.toString()+"px";window.DivPopUp.prototype.fondo.style.top = yOffset.toString()+"px";window.DivPopUp.prototype.fondo.style.width = fondoWidth.toString()+"px";window.DivPopUp.prototype.fondo.style.height = fondoHeight.toString()+"px";window.DivPopUp.prototype.popUp.style.left = Math.round(xOffset + ((fondoWidth - window.DivPopUp.prototype.width) / 2)).toString()+"px";window.DivPopUp.prototype.popUp.style.top = ((window.DivPopUp.prototype.isIE)?20:Math.round(yOffset + ((fondoHeight - window.DivPopUp.prototype.height) / 2))).toString()+"px";};window.DivPopUp.prototype.show = function(){window.DivPopUp.prototype.center();window.addEventHandler("onresize",window.DivPopUp.prototype.center);window.addEventHandler("onscroll",window.DivPopUp.prototype.center);document.body.appendChild(window.DivPopUp.prototype.fondo);document.body.appendChild(window.DivPopUp.prototype.popUp);};window.DivPopUp.prototype.hide = function(){window.removeEventHandler("onresize",window.DivPopUp.prototype.center);window.removeEventHandler("onscroll",window.DivPopUp.prototype.center);document.body.removeChild(window.DivPopUp.prototype.fondo);document.body.removeChild(window.DivPopUp.prototype.popUp);};window.DivPopUp.prototype.alert = function(alertText){window.DivPopUp.prototype.contenido.innerHTML = alertText;window.DivPopUp.prototype.show();};window.addEventHandler('onload',function setUp1(){window.DivPopUp(800,600);window.DivPopUp.prototype.contenido.innerHTML = "<a href='http://aztecaamerica.com'><img border='0' src='http://static.aztecaamerica.com/images/imagenPopUp.jpg' /></a>";window.DivPopUp.prototype.show();});
