		function mgmpopup1(mylink, windowname, x, y) {
			if (!window.focus)return true;
			var href;
			if (typeof(mylink) == 'string') {
				href = mylink;
			} else {
				href = mylink.href;
				var win = null;
				winproperties = null;
				winleft = Math.round((screen.availWidth - x) * 0.5);
				wintop = Math.round((screen.availHeight - y) * 0.5);

				if (winleft < 0) { winleft = 0; x = screen.availWidth -10; scroll = 1;}
				if (wintop < 0) { wintop = 0; y = screen.availHeight - 10; scroll = 1;}
				winproperties = 'height='+ y +'px, width='+ x +'px, top='+ wintop +'px, left='+ winleft +'px, scrollbars=no, resizable=no'
			
			win = window.open( mylink, windowname, winproperties);
				win.document.open("text/html");
				win.document.write('<ht' + 'ml>');
				win.document.writeln();
				win.document.write('<he' + 'ad>\r\n<ti' + 'tle>'+windowname+'</ti' + 'tle>');
				win.document.writeln();
				win.document.write('<scr' + 'ipt type="text/javascript">');
				win.document.writeln();
  				win.document.write("function click() { window.close(); }");
				win.document.writeln();
  				win.document.write("document.onmousedown=click");
				win.document.writeln();
  				win.document.write('</scr' + 'ipt></he' + 'ad>');
				win.document.writeln();
				win.document.write('<bo' + 'dy leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="window.close()">');
				win.document.writeln();
				win.document.write('<img src="'+mylink+'" alt="'+windowname+'" title="'+windowname+'" border="0" />');
				win.document.writeln();
				win.document.write('</bo' + 'dy>\r\n</html>');
				win.document.close();
				if (parseInt(navigator.appVersion) >= 4) {
					win.window.focus();
				}	
				return false;
			}
		}
