function openNewWindow(aWin,aName,aSize){
window.open(aWin,aName,aSize);
}

function popup(src, w, h, title)
{
	var sw = 0, sh = 0;
	if (typeof (window.innerWidth) == 'number')
	{
		//Non-IE
		sw = window.innerHeight;
		sh = window.innerWidth;
	}
	else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
	{
		//IE 6+ in 'standards compliant mode'
		sw = document.documentElement.clientHeight;
		sh = document.documentElement.clientWidth;
	}
	else if (document.body && (document.body.clientWidth || document.body.clientHeight))
	{
		//IE 4 compatible
		sw = document.body.clientHeight;
		sh = document.body.clientWidth;
	}
	//alert('Width = '+sh+'Height = '+myHeight); 
	//var sh = Number(screen.height);
	//var sw = screen.width;
	var t = (sh-h)/2;
	var l = (sw-w)/2;
	var ww = w;
	var wh = h;
	//alert("Y: "+sh+" - G: "+sw+"\nh: "+h+" - w: "+ww+"\nt: "+t+" - l: "+l);
	nw = window.open("", "imagegallery", "width="+ww+",height="+wh+",left="+l+",top="+t+",directories=no,location=no,menubar=no,resizable=no,scrollbars=0,status=no,toolbar=no'");
	nw.document.writeln("<html>");
	nw.document.writeln("<head>");
	nw.document.writeln("<title>"+title+"</title>");
	nw.document.writeln("</head>");
	nw.document.writeln("<body topmargin='0' leftmargin='0' bottommargin='0' rightmargin='0' bgcolor='#ffffff'>");
	nw.document.writeln("<a href='javascript:window.close()\;'><img src='"+src+"' width='"+w+"' height='"+h+"' border='0' alt='Close!'></a>");
	nw.document.writeln("</body>");
	nw.document.writeln("</html>");
	nw.document.close();
}
