/*	code adapted from http://regretless.com/dodo/newworld */
function MDHPopUp(url,w,h,windowName) {
	var windowRef = 'ImagePopup';
	var features =
		',directories=no' + 
		',location=no'    + 
		',menubar=no'     + 
		',scrollbars=no'  + 
		',status=no'      + 
		',toolbar=no'     + 
		',resizable=no';
	features += ',width='+w;
	features += ',height='+h;
	
	var htmlout = '<html><head><title>'+windowName+'</title><style type=\"text/css\">body{margin:0;padding:0;}</style></head>';
		htmlout +=	'<body marginheight=0 topmargin=0 vspace=0 marginwidth=0 leftmargin=0 hspace=0>';
		htmlout += 	'<div style=\"position:absolute;top:0px;left:0px\"><img vspace=0 hspace=0 src=\"'+url+'\" onclick=\"javascript:window.close()\"/></div></body></html>';
	
	//var win=window.open(url,windowRef,features);
	var win=window.open('',windowRef,features);
	win.document.open();
	win.document.write(htmlout);
	win.document.close();
	win.focus();
}
