<!--
var isNN4, isNN7, isIE;
if ((navigator.appName == "Netscape") && (navigator.appVersion.charAt(0) < 5)) {
	isNN4 = true;
} else if ((navigator.appName == "Netscape") && (navigator.appVersion.charAt(0) > 4)) {
	isNN7 = true;
} else if (navigator.appName.indexOf("Microsoft") != -1) {
	isIE = true;
}

var newWindow = null; 
var image = null; 
var orig_width = 0; 
var orig_height = 0; 
var limit_window_size = 1;
var scroll = null;
var h_margin = 30;
var v_margin = 30;

function makeNewWindow(image,width,height) {
	orig_width = width; orig_height = height;

	if (limit_window_size) {
		if ((orig_width > screen.availWidth) || (orig_height > screen.availHeight)) { 
			scroll = "scrollbars,";
			if (orig_width > screen.availWidth) { orig_width = screen.availWidth - h_margin }
			if (orig_height > screen.availHeight) { orig_height = screen.availHeight - v_margin }
		} else {
			scroll = "";
		}
	} else {
		scroll = "";
	}	

	if (newWindow && !newWindow.closed) { 
		newWindow.close();
	}

	newWindow = window.open("", "newWindow","width="+orig_width+",height="+orig_height+",left=0,top=0," + scroll + "titlebar=no,resizable");
	var newContent = "<HTML><HEAD><TITLE><\/TITLE>";
	newContent += "<STYLE>";
	newContent += "BODY { margin:0 }";
	newContent += "<\/STYLE>";
	newContent += "<\/HEAD><BODY>";

	newContent += "<LAYER ID='photo' LEFT=0 TOP=0 WIDTH=";
	newContent += width;
	newContent += " HEIGHT=";
	newContent += height;
	newContent += ">";

	newContent += "<IMG SRC='' WIDTH=";
	newContent += width;
	newContent += " HEIGHT=";
	newContent += height;
	newContent += ">";

	newContent += "<\/LAYER>";

	newContent += "<\/BODY><\/HTML>";
	newWindow.document.write(newContent);
	newWindow.document.close();

	if (isNN4) {
		newWindow.document.photo.document.images[0].src = image;
	} else if (isNN7 || isIE) {
		newWindow.document.images[0].src = image;
	}

	newWindow.focus();
}
// -->