var iframes = new Array();
function createIFrame(id,source, x,y, width, height)
{
	if (iframes[id]) {
		//alert("overriding second create");
		loadIFrame (id, source);
	}
	//alert("Running. Now what?");
	var iframe = document.createElement("iframe");
	iframe.id = id;
	iframe.style.position = "absolute";
	iframe.width = width;
	iframe.height = height;
	iframe.src = source;
	iframe.frameBorder = "0";
	iframe.allowTransparency = "true";
	iframe.scrolling = "no";
	iframe.zIndex = "100";
	document.body.appendChild(iframe);
	iframe.style.top=y;
	iframe.style.left=x;
	iframe.style.zIndex = "-1";
	iframes[id] = iframe;

};

function showIFrame (id) {
	iframes[id].style.zIndex = "1";
}

function hideIFrame (id) {
	var d = document.getElementById(id);
	d.parentNode.removeChild(d);
}

function loadIFrame (id, source) {
	iframes[id].src = source;
}