﻿// JScript File

/* For this script to work properly, the image name of the large image must
be the same as that of the thumbnail image (-small), with the only difference being the removal of the word 'small'

For example:

co1998-2small
and
co1998-2
*/

    // Script modified heavily from that on CodeLifter.com
    // Copyright 2003
    // Do not remove this notice.

    // SETUPS:
    // ===============================

    // Set autoclose true to have the window close automatically
    // Set autoclose false to allow multiple popup windows


function imgWindow (img, imageTitle){

    // Set the horizontal and vertical position for the popup
    
    PositionX = 100;
    PositionY = 100;

    // Set these value approximately 20 pixels greater than the
    // size of the largest image to be used (needed for Netscape)

    defaultWidth  = 550;
    defaultHeight = 400;

    var AutoClose = true;

    if (parseInt(navigator.appVersion.charAt(0))>=4){
        var isNN=(navigator.appName=="Netscape")?1:0;
        var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
    }
    var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
    var optIE='menubar=yes,location=no,channelmode=no,scrollbars=no,width=550,height=400,left='+PositionX+',top='+PositionY;
    if (isNN){imgWin=window.open('about:blank','',optNN);}
    if (isIE){imgWin=window.open('about:blank','',optIE);}
    imgNam = img.src.replace("small", "");
    with (imgWin.document){
        writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
        writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
        writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
        writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(550,400)};');
        writeln('else {if (isNN){');       
        writeln('window.innerWidth=550px;');writeln('window.innerHeight=document.400px;}}}');
        writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
        if (!AutoClose) { writeln('</head><body bgcolor=000000 scroll="no" onload="resizeToImage();doTitle();self.focus()">') }
        else {writeln('</head>');writeln('<body onload="self.focus()" onblur="self.close()">');}
        writeln('<img name="RAMHSSimg" src=' + imgNam + ' style="display:block; width: 550px; height: 400px;"></body></html>');
        close();
    }
}


function setImgEv () {
    var imgTable;
    if (document.getElementById) { imgDiv = document.getElementById('assistantimgs');  }
    else if (document.all) { imgDiv = document.all['assistantimgs']; }
    var imgArray = imgDiv.getElementsByTagName ('img');
    for (var i=0; i < imgArray.length; i++) {
        imgArray[i].onmousedown = function () { imgWindow (this, ''); }
    }
}

window.onload=function() {
    if (document.all) {window.event.cancelBubble=true;}
    if (navigator.appVersion.indexOf('MSIE')!=-1) IEMenu();
    setImgEv ();
}