//images.js adk 9/18/2002

// --- begin clicktrap code
 var today= new Date();
 var thisYear = today.getYear();
 if (thisYear < 1000) thisYear += 1900; // Netscape quirk
 var message='All Website Content Copyright 1994 - ' + thisYear + '\n"MrTitanium" -- A Daniel Klarmann\nALL RIGHTS RESERVED';
 function clicktrap(e) {
   if (document.all) { // i.e: IE
      if (event.button==2||event.button==3) {
         alert(message);
         return false;
      }
   }
   if (document.layers) { // NS
      if (e.which == 3) {
         alert(message);
         return false;
      }
   }
 }
 if (document.layers) {
   document.captureEvents(Event.MOUSEDOWN);
 }
 document.onmousedown=clicktrap;

// --- end clicktrap code

var wdoPix, arImages = new Array(), iImages=0;

function defPix (strNewImg, strNewS, strNewCap, iNewCol){ //object def for all basic images
  //special case, strImg = '<hr>' draws <hr> and long caption
  this.strImg = strNewImg; //image filespec
  this.strS = strNewS;  //image short caption
  this.strCap = strNewCap; //image long caption
  this.iCol = iNewCol; // table column ID {1,2,...} 0=not in a table
}//defPix

function closer(){
  if (wdoPix) {
    wdoPix.close();
  }
}

function picWin(strImg, strCap){
  wdoPix = window.open("",'wdoPix','scrollbars,resizable,status');
  with (wdoPix.document){
    open();
    writeln('<html><head>');
    writeln('<style>p {align:center; text-align:center;}');
    writeln('a  {color: #A0FFA0;}');
    writeln('p  {font-weight:bold;}');
    writeln('a:hover {color: #FFFFFF}');
    writeln('img {border-color:#F0C080; border-width:7; border-style:ridge;}');
    writeln('</style>');
    writeln('</head>');

    writeln('<body bgcolor="#60A060">');
    writeln('<div style="margin-left:5%;margin-right:5%; align:center">');

    writeln('<p>',strCap);
    writeln('<br /><a href="javascript:opener.focus();">Show Thumbnails</a></p>');
    writeln('<p><img src="images/', strImg,'.jpg" />');
    writeln('<br />To get an uncropped, unshrunken version of <font size="+1">',strImg,'.jpg</font>, just email <a href="mailto:Artist@DanKlarmann.com">Artist@DanKlarmann.com</a></p>');
    writeln('</p></div></body></html>');
    close();
  } // endwith
  wdoPix.focus();
}//picWin

function picWinI(i){
  picWin(arImages[i].strImg,arImages[i].strCap);
  wdoPix = window.open("",'wdoPix','scrollbars,resizable,status');
  with (wdoPix.document){
    open();
    writeln('<html><head>');
    writeln('<style>p {align:center; text-align:center;}');
    writeln('a  {color: #A0FFA0;}');
    writeln('p  {font-weight:bold;}');
    writeln('a:hover {color: #FFFFFF}');
    writeln('img {border-color:#F0C080; border-width:7; border-style:ridge;}');
    writeln('</style>');
    writeln('</head>');

    writeln('<body bgcolor="#60A060">');
    writeln('<div style="margin-left:5%;margin-right:5%; align:center">');

    writeln('<p align="center">',arImages[i].strCap,'<br />');

    var p = i-1;
    if (p >= 0){
      if (arImages[p].strImg == '<hr>'){
        p--;
      }
    }
    if (p>=0){
      writeln('<a href="javascript:opener.picWinI(',p,');">&lt;&lt;prev</a> - ');
    }
    writeln('<a href="javascript:opener.focus();">Show Thumbnails</a>');
    p = i+1;
    if (p >= arImages.length){
      p = -1
    } else if (arImages[p].strImg == '<hr>'){
      p++;
      if (p >= arImages.length){
        p = -1
      }
    }
    if (p>=0){
      writeln(' - <a href="javascript:opener.picWinI(',p,');">next&gt;&gt;</a>');
    }

    writeln('</p><p><img src="images/', arImages[i].strImg,'.jpg" />');
    writeln('<br />For info, just email <a href="mailto:Artist@DanKlarmann.com">Artist@DanKlarmann.com</a></p>');
    writeln('</p></div></body></html>');
    close();
  } // endwith
  wdoPix.focus();
}//picWinI

function showThumbs(){
  var lastCol = 0;
  var idImg; // current element of arImages[]
  with (document){
    for (var i=0;i<arImages.length; i++){
      idImg = arImages[i];
      var strCap = idImg.strCap.replace(/"/g,"&quot;"); // safely remove internal double quotes
      if (idImg.iCol == 1 && lastCol == 0){
        writeln('<table border="0" width="90%"><tr><td>'); // start a table thru <td>
      } else if (idImg.iCol == 1 && lastCol > 0){
        writeln('</td></tr><tr><td>'); // start a new row thru <td>
      } else if (idImg.iCol > 1) {
        writeln('</td><td>'); // next <td>
      } else if (lastCol > 0) {
        writeln('</td></tr></table>'); // end a table
      }
      lastCol = idImg.iCol;
      if (idImg.strImg == '<hr>'){ // special case
        writeln('<hr><center><b>',strCap,'</b></center>');
      } else {
        var re = /'/g ;
        writeln('<a href="javascript:picWinI(',i,');"  onMouseOver="overlib(\'',strCap.replace(/'/g,"\\'"),'\',FGCOLOR,\'#40d040\',BGCOLOR,\'#008000\');" onMouseOut="nd();" >');
        writeln('<img src="images/',idImg.strImg,'-t.jpg" align="left" hspace="15" />',idImg.strS,'</a>');
      }
    }//endfor

    if (lastCol > 0){
      writeln('</td></tr></table>'); // end a table
    }
  } //endwith
}//showThumbs()
