// JavaScript for an image window

var imgwin = null;
var delta = 25;
if (navigator.appName == "Netscape") delta = window.outerWidth - window.innerWidth;
// else delta = (document.body.width - document.body.clientWidth) / 2;

// alert("innerWidth = " + document.clientWidth);

function jpg(url, w, h) {
if (imgwin !== null) imgwin.close();
ww = w + delta;
hh = h + delta;
imgwin = window.open(url, "image", "width=" + ww + ",height=" + hh +
         ",screenX=1,screenY=1,personalbar=no,toolbar=no");
}

function closejpg() {
if (imgwin !== null) imgwin.close();
}

function img(src, width, height, link, lw, lh, other) {
if (navigator.appName == "Netscape" && navigator.appVersion < "5.") {
document.writeln('<a href="' + link + '" target="image">');
document.writeln('<img src="' + src + '" border=2 hspace=5 vspace=1 width="' + width + '" height="' + height + '"'
  + other + '>');
}
else {
document.writeln('<a href="#" onClick="return false;">');
document.writeln('<img src="' + src + '" border=2 hspace=5 vspace=1 width="' + width + '" height="' + height + '"'
  + other + ' onClick="jpg(' + "'" + link + "'" + ',' + lw + ',' + lh + ')">');
}
document.writeln("</a>");
}
