// JavaScript Document

function newWindow(url,name,width,height){
	if(name == "") name = "_blank";
	if(!(width > 0)) width = 630;
	if(!(height > 0)) height = Math.round(screen.availHeight*0.75);
	var win = window.open(url,name,"menubar=0,toolbar=0,scrollbars=1,resizable=1,width=" + width + ",height=" + height);
	win.focus();
	return win;
}
function newWindowImage(url,name,title) {
	if(name == "") name = "_blank";
	if(title == "") title = "View images";
	var win = window.open("",name,"menubar=0,toolbar=0,scrollbars=0,resizable=0,noresize");
	win.document.open("text/html");
	win.document.writeln("<html>\n<head>\n<title>" + title + "<\/title>");
	win.document.writeln("<script language=\"javascript\">\n\<!--\nfunction sizebyimage() {");
	win.document.writeln("isNav4 = (navigator.appName == \"Netscape\") ? 1 : 0;");
	win.document.writeln("if (isNav4) {\nwindow.innerWidth = window.document.images[0].width;");
	win.document.writeln("window.innerHeight = window.document.images[0].height;\n}");
	win.document.writeln("else {\nwindow.resizeTo(window.document.images[0].width,window.document.images[0].height);");
	win.document.writeln("w = window.document.images[0].width - window.document.body.clientWidth;");
	win.document.writeln("h = window.document.images[0].height - window.document.body.clientHeight;");
	win.document.writeln("window.resizeBy(w,h);\n}\n}\n\/\/--\>\n<\/script>");
	win.document.writeln("<\/head>\n<body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0"+(navigator.appName.indexOf("Netscape") >=0 ? " onResize=\"sizebyimage();\" " : " ")+"onLoad=\"sizebyimage();\">");
	win.document.writeln("<img src=\"" + url + "\">\n<\/body>\n<\/html>");
	win.document.close();
	win.focus();
}
