if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
{ //IE 6+ in 'standards compliant mode'
	var myWidth = document.documentElement.clientWidth;
	var myHeight = document.documentElement.clientHeight;
} 
else {
	if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible
		var myWidth = document.body.clientWidth;
		var myHeight = document.body.clientHeight;
	}
}

var newWindow;

function OpenThumb(src, title) {
	var width = 1045;
	var height = 768;
        if (newWindow)
        	newWindow.close();
        var properties = "width="+width+", height="+height+", toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, top="+(parseInt((myHeight-height)/2))+", left="+(parseInt((myWidth-width)/2));
        newWindow = window.open(src, "PhotoWindow", properties);
        newWindow.document.write("<html>");
        newWindow.document.write("<head>");
        newWindow.document.write("<title>"+title+"</title>");
        newWindow.document.write("<meta http-equiv=\"imagetoolbar\" content=\"no\" />");
        newWindow.document.write("</head>");
        newWindow.document.write("<body topmargin=\"0\" bottommargin=\"0\" leftmargin=\"0\" rightmargin=\"0\" marginheight=\"0\" marginwidth=\"0\" >");
        newWindow.document.write("<img src=\""+src+"\" border=\"0\" alt=\"\" />");
        newWindow.document.write("</body>");
        newWindow.document.write("</html>");
        newWindow.focus();
        newWindow.document.close();
}
