/*<![CDATA[*/
<!-- Hide from older browsers

var isDHTML = 0;
var isID = 0;
var isAll = 0;
var isLayers = 0;
var hincrease=20;

/* if (navigator.userAgent.indexOf('Firefox/1.0') != -1) */
    hincrease=42;

var versionIE = -1;
if (navigator.appName == 'Microsoft Internet Explorer')
{
  var ua = navigator.userAgent;
  var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
  if (re.exec(ua) != null)
    versionIE = parseFloat( RegExp.$1 );
}

/*
alert("navigator.appName = " + navigator.appName + "\n" +
      "navigator.userAgent = " + navigator.userAgent + "\n" +
      "versionIE = " + versionIE);
*/

if (versionIE >= 7)
    hincrease=82;

if (document.getElementById) {
    isID = 1;
    isDHTML = 1;
}
else if (document.all) {
    isAll = 1;
    isDHTML = 1;
}
else {
    browserVersion = parseInt(navigator.appVersion);

    if ((navigator.appName.indexOf('Netscape') != -1)
    && (browserVersion == 4)) {
        isLayers = 1;
        isDHTML = 1;
    }
}

function findDOM(objectID, withStyle) {
    if (withStyle == 1) {
        if (isID)
            return document.getElementById(objectID).style;
        else if (isAll)
            return document.all[objectID].style;
        else if (isLayers)
            return document.layers[objectID];
    }
    else {
        if (isID)
            return document.getElementById(objectID);
        else if (isAll)
            return document.all[objectID];
        else if (isLayers)
            return document.layers[objectID];
    }
}

function focusme() {
    window.focus();
}

function focusresize(width, height) {
    /* needed when clicking to enlarge another photo from parent page */
    if (window.name == "popupwindow") {
        window.focus();
        window.resizeTo(width, height+hincrease);
    }
}

function outline_on(id){
    if (isID) {
        var obj = findDOM(id, 1);
        obj.borderColor = "#CC0000"; 

        /* "#9999ff" blue-lt */
        /* "#ff00ff" cyan */
        /* "#ff99cc" pink */
        /* "#FF93BF" pink */
        /* "#666666" gray-med */
        /* "#990000" maroon */
        /* "#ff99ff" purple-lt*/
        /* "#cc00ff" purple-med */
        /* "#9900ff" purple-med */
        /* "#990099" purple-med */
        /* "#660066" purple-dark */
        /* "#ff0000" red */
    }
}
	
function outline_off(id){
    if (isID) {
        var obj = findDOM(id, 1);
        obj.borderColor = "#333333";
    }
}

function popupwindow(url, width, height, left, top) {
    if ((navigator.appName.indexOf('Netscape') != -1)
    && (parseInt(navigator.appVersion) <= 4))
        seedpopup(url, width, height, left, top);
    else {
        /* following needed when clicking on Prev/Next */
        if (window.name == "popupwindow") {
            window.focus();
            window.resizeTo(width, height+hincrease);
        }

        window.open(url, "popupwindow", 'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',resizable=0');
    }
}

function seedpopup(url, width, height, left, top) {
    /* With Netscape 4.7, a window opened with window.open cannot
       be resized.  This opens a seed window which closes the
       original popupwindow, opens a newly redimensioned one,
       then closes itself. */

    var windowseed = window.open("", "popupseed", "width=10,height=10,left=15,top=15");

    windowseed.document.writeln('<html><head><title></title></head>');
    windowseed.document.writeln('<script language="JavaScript" type="text/javascript">');
    windowseed.document.writeln('<!-- ');
    windowseed.document.writeln('function loadpopup() {');
    windowseed.document.writeln('var windowpopup = window.open("", "popupwindow", "width=10,height=10,left=15,top=15");');
    windowseed.document.writeln('windowpopup.close();');
    windowseed.document.writeln('window.open("' + url + '", "popupwindow", "width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',resizable=0");');
    windowseed.document.writeln('window.close(); }');
    windowseed.document.writeln('    // Stop hiding --></script>');

    /* setTimeout is required for IE and Netscape 6.2.  Without it, 
       closing popupwindow also closes popupseed */
    windowseed.document.writeln('<body bgcolor="#000000" onload="setTimeout(\'loadpopup();\',0);">');

    windowseed.document.writeln('</body></html>');
    windowseed.document.close();
}

// Stop hiding -->
/*]]>*/
