	function NeatDialog(sHTML, sTitle, bCancel)
	{
	window.neatDialog = null;
	this.elt = null;
	if (document.createElement && document.getElementById)
	{
		var dg = document.createElement("div");
		dg.className = "neat-dialog";

		sHTML = '<p>' + sHTML + '</p>'; //Images/w5.jpg
		if (sTitle)
		sHTML ='<div >'+sTitle+
				((bCancel)?
				'<img src="'+sTitle+'" id="nd-cancel"  alt="Cancel" class="nd-cancel" />':'')+
					'</div>' ; 

		dg.innerHTML = sHTML;
		
		var dbg = document.createElement("div");
		dbg.id = "nd-bdg";
		dbg.className = "neat-dialog-bg";

		var ifrm = '<iframe  style="position:absolute;z-index:9;width:expression(this.nextSibling.offsetWidth);'
				+ 'height:expression(this.nextSibling.offsetHeight);top:expression(this.nextSibling.offsetTop);'
				+ 'left:expression(this.nextSibling.offsetLeft);" frameborder="0" ></iframe>';
			
		var dgc = document.createElement("div");
		dgc.className = "neat-dialog-cont";
		
		dgc.appendChild(dbg);
			        
		dgc.innerHTML += ifrm;
		dgc.appendChild(dg);

		//adjust positioning if body has a margin
		if (document.body.offsetLeft > 0)
		dgc.style.marginLeft = document.body.offsetLeft + "px";

		document.body.appendChild(dgc);
		if (bCancel) document.getElementById("nd-cancel").onclick = function()
		{
		window.neatDialog.close();
		};

		this.elt = dgc;
		dgc.focus();
		window.neatDialog = this;
		document.body.style.overflow="visible";
	}
	}

	NeatDialog.prototype.close = function()
	{
	if (this.elt)
	{
		this.elt.style.display = "none";
		this.elt.parentNode.removeChild(this.elt);
	}
	window.neatDialog = null;
	document.body.style.overflow="";
	}

	function openDialog(imgUrl)
	{

		var sHTML = '1';
		new NeatDialog(sHTML, imgUrl, true);
	}