// JavaScript Document

function makeImage(titulo, imagen, diametros){
		var fDiv = document.createElement("div");
		
		var fId = document.createAttribute("id");
		fId.nodeValue = "fly";
		fDiv.setAttributeNode(fId);
		
		var hh = document.createElement("h2");
		hh.innerHTML = titulo;
		
		fDiv.appendChild(hh);
		
		var a = document.createElement("a");
		a.innerHTML = "X";
		var hRef = document.createAttribute("href");
		hRef.nodeValue = "javascript:closeWindow()";
		a.setAttributeNode(hRef);
		
		
		fDiv.appendChild(a);
		
		var img = document.createElement("img");
		
		var imgSrc = document.createAttribute("src");
		imgSrc.nodeValue = imagen;
		
		var imgW = document.createAttribute("width");
		imgW.nodeValue = "318";
		
		var imgH = document.createAttribute("height");
		imgH.nodeValue = "318";
		
		img.setAttributeNode(imgSrc);
		img.setAttributeNode(imgW);
		img.setAttributeNode(imgH);
		
		fDiv.appendChild(img);
		
		var hhh = document.createElement("h4");
		hhh.innerHTML = "Diametros";
		
		
		fDiv.appendChild(hhh);
		
		var p = document.createElement("p");
		p.innerHTML = diametros;
		
		fDiv.appendChild(p);
		
		//estilos
		fDiv.style.backgroundColor = "#FFFFFF";
		fDiv.style.width = "360px";
		fDiv.style.height = "400px";
		fDiv.style.border = "thin solid #BABABA";
		fDiv.style.color = "#444444";
		fDiv.style.zIndex = "100000";
		fDiv.style.position = "absolute";
		fDiv.style.top = "25%";
		fDiv.style.left = "42%";
		
		a.style.color = "#444444";
		a.style.font = "bold 12px Verdana, Arial, Helvetica, sans-serif";
		a.style.position = "absolute";
		a.style.top = "15px";
		a.style.left = "335px";
		
		img.style.margin = "10px 0px 0px 20px";
		
		hh.style.font = "bold 12px Verdana, Arial, Helvetica, sans-serif";
		hh.style.margin = "0px 0px 0px 20px";
		hh.style.paddingTop = "15px";
		
		hhh.style.font = "bold 10px Verdana, Arial, Helvetica, sans-serif";
		hhh.style.margin = "0px 0px 0px 20px";
		
		p.style.font = "normal 10px Verdana, Arial, Helvetica, sans-serif";
		p.style.textAlign = "left";
		p.style.paddingTop = "3px";
		p.style.margin = "0px 0px 0px 20px";
		
		var ubicacion =  document.getElementById("central");
		ubicacion.appendChild(fDiv);

		}
		
function closeWindow(){
			var ubicacion = document.getElementById("central");
			var ubicacion2 = document.getElementById("fly");
			ubicacion.removeChild(ubicacion2);
			}							
