var Titulo = "Www.ratondebiblioteca.es";
var Texto = "Aceptar";

if(document.getElementById) {
	window.alert = function(txt) {
		Customizar(txt);
	}
}

function Customizar(txt) {
	documento = document;

	if(documento.getElementById("contenedor")) return;

	objeto = documento.getElementsByTagName("body")[0].appendChild(documento.createElement("div"));
	objeto.id = "contenedor";
	objeto.style.height = document.documentElement.scrollHeight + "px";

	cuidado = objeto.appendChild(documento.createElement("div"));
	cuidado.id = "alerta";
	if(documento.all && !window.opera) cuidado.style.top = document.documentElement.scrollTop + "px";
	cuidado.style.left = (documento.documentElement.scrollWidth - cuidado.offsetWidth)/2 + "px";

	h1 = cuidado.appendChild(documento.createElement("h1"));
	h1.appendChild(documento.createTextNode(Titulo));

	mensaje = cuidado.appendChild(documento.createElement("p"));
	mensaje.innerHTML = txt;
	
	llamador = cuidado.appendChild(documento.createElement("a"));
	llamador.id = "cerrar";
	llamador.appendChild(documento.createTextNode(Texto));
	llamador.onclick = function() { Borrar();return false; }

}

function Borrar() {
	document.getElementsByTagName("body")[0].removeChild(document.getElementById("contenedor"));
}

