

<!-- this builds the preview popup windows to the specs defined in the call -->
<!-- i wanted the windows to be 20 larger than the image on height and width.  you can change this to your preference when you define sizew and sizeh -->
<!-- the new window is named "photo"- if this conflicts (or you just feel like changing it), change it when called in newwin -->
<!-- (at least mac) netscape also appears to have a bug (big surprise) and won't load the images if they are not wide enough.  88 is wide enough, but 78 is not (and i haven't bothered to hunt down any more specific than that)

function previewimages(file, title, bgcolor, imgWidth, imgHeight) {
        sizew = imgWidth + 14;
        sizeh = imgHeight + 14;
        divright = imgWidth - 18;
        divbot = imgHeight - 18;
        newwin = window.open('','photo' ,'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=' + sizew + ',height=' + sizeh);
        newwin.document.writeln('<html><head><title>' + title + '</title>');
        newwin.document.writeln('<link rel="stylesheet" href="stylish.css" type="text/css" media="screen">');
        newwin.document.writeln('</head>');
        newwin.document.writeln('<body bgcolor="' + bgcolor + '" marginheight="10" topmargin="10" link="#666666">');
newwin.document.write('<script language=JavaScript>\n');
newwin.document.write('function clickIE() {if (document.all) {self.close();}}\n');
newwin.document.write('function clickNS(e) {if (document.layers||(document.getElementById&&!document.all)) {\n');
newwin.document.write('if (e.which==2||e.which==3) {self.close();}}}\n');
newwin.document.write('if (document.layers) \n');
newwin.document.write('{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}\n');
newwin.document.write('else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}\n');
newwin.document.write('document.oncontextmenu=new Function("self.close();return false")\n');
newwin.document.write('<\/script>\n');
        newwin.document.writeln('<center>');
    if (!document.layers) {
        newwin.document.writeln('<div style="position: relative; height: ' + imgHeight + '; width: ' + imgWidth + ';">');
        newwin.document.writeln('<div style="position: absolute; height: 20; width: 20; left: -2px; top: -2px;">');
        newwin.document.writeln('<img src="img/tla.gif" lowsrc="../pics/blank.gif" width="20" height="20">');
        newwin.document.writeln('</div>');
        newwin.document.writeln('<div style="position: absolute; height: 20; width: 20; left: ' + divright + 'px; top: -2px;">');
        newwin.document.writeln('<img src="img/tra.gif" lowsrc="../pics/blank.gif" width="20" height="20">');
        newwin.document.writeln('</div>');
        newwin.document.writeln('<div style="position: absolute; height: 20; width: 20; left: -2px; top: ' + divbot + 'px;">');
        newwin.document.writeln('<img src="img/bla.gif" lowsrc="../pics/blank.gif" width="20" height="20">');
        newwin.document.writeln('</div>');
        newwin.document.writeln('<div style="position: absolute; height: 20; width: 20; left: ' + divright + 'px; top: ' + divbot + 'px;">');
        newwin.document.writeln('<img src="img/bra.gif" lowsrc="../pics/blank.gif" width="20" height="20">');
        newwin.document.writeln('</div>');
        newwin.document.writeln('<a href="javascript:self.close()"><img src="' + file + '" width="' + imgWidth + '" height="' + imgHeight + '" border="0" alt="click to close"></a>');
        newwin.document.writeln('</div>');
    } else {
        newwin.document.writeln('<a href="javascript:self.close()"><img src="' + file + '" width="' + imgWidth + '" height="' + imgHeight + '" border="0" alt="click to close"></a>');
}
        newwin.document.write('</center>');
        newwin.document.write('</body></html>');
}

// repeaty bits for div stuff follows- none of this would be necessary if it weren't for ns4 being a brat with my divs.

// function to accomodate your own width/height

function corners(imgWidth, imgHeight,blankTop) {
top2 = blankTop - 2;
height2 = imgHeight + blankTop - 13;
width2 = imgWidth - 13;
if (!document.layers) {
    document.write('<div id="tabl" style="height: ' + imgHeight + '; width: ' + imgWidth + ';">\n');
    document.write('<div id="cornr" style="left: -2px; top: ' + top2 + 'px;">\n');
    document.write('<img src="img/tl.gif" lowsrc="../img/blank.gif" width="15" height="15" border="0">\n');
    document.write('</div>\n');
    document.write('<div id="cornr" style="left: ' + width2 + 'px; top: ' + top2 + 'px;">\n');
    document.write('<img src="img/tr.gif" lowsrc="../img/blank.gif" width="15" height="15" border="0">\n');
    document.write('</div>\n');
    document.write('<div id="cornr" style="left: -2px; top: ' + height2 + 'px;">\n');
    document.write('<img src="img/bl.gif" lowsrc="../img/blank.gif" width="15" height="15" border="0">\n');
    document.write('</div>\n');
    document.write('<div id="cornr" style="left: ' + width2 + 'px; top: ' + height2 + 'px;">\n');
    document.write('<img src="img/br.gif" lowsrc="../img/blank.gif" width="15" height="15" border="0">\n');
    document.write('</div>');
}
}

function closediv() {
if (!document.layers) {
    document.write('</div>');
}
}

//-->
