  //////////////////////////////////////
 // (C) 2002, Copyright by F.Cardoza //
//////////////////////////////////////

function ShowPicture (PicName, PicLen) {
     var winPhoto;
     var tTempVar1;
     var tTempVar2;
     var tTemp = '"';

     winPhoto = window.open("", "", "fullscreen=1, left=0, top=0, scrollbars=0, resizable=0, menubar=0, toolbar=0, status=0, location=0, directories=0");
     winPhoto.document.write("<HTML><HEAD><TITLE></TITLE><SCRIPT language='JavaScript' SRC='photoload.js'></SCRIPT></HEAD><BODY BGCOLOR=#FFFFFF>");

     winPhoto.document.write("<CENTER><img src='"+PicName+"' name='photoholder'>");
     winPhoto.document.write("<BR>(C) 2002, Copyright by F.Cardoza<BR><BR>");
     winPhoto.document.write('<A HREF="javascript:NewPicture(' + PicLen + ', 1);" NAME="B1">&lt&lt</A> ');
     winPhoto.document.write('<A HREF="javascript:NewPicture(' + PicLen + ', 2);" NAME="B2">&gt&gt</A> ');
     winPhoto.document.write('<A HREF="javascript:self.close();">Close</A>');
     winPhoto.document.write("</CENTER></BODY></HTML>");
     winPhoto.location.reload();
}

function NewPicture (MaxPic, PrevNext) {
     var tCurrentPic = document.photoholder.src;
     var tTempRGVar1;

     tTempRGVar1 = tCurrentPic.substring(tCurrentPic.length - 8, tCurrentPic.length - 4).valueOf();
     if ((tTempRGVar1 == 1) && (PrevNext == 1)) {
         alert("Already at beginning!")
     }
     else
     {
         if ((tTempRGVar1 == MaxPic) && (PrevNext == 2)) {
             alert("Already at end!")
         }
         else
         {
             (PrevNext == 1) ? tTempRGVar1-- : tTempRGVar1++
         }
     }
     tTempRGVar1 = tTempRGVar1.toString();
     for (var i = tTempRGVar1.length; i < 4; i++) { tTempRGVar1 = "0" + tTempRGVar1}

     document.photoholder.src=tCurrentPic.substring(0, tCurrentPic.length - 8) + tTempRGVar1 + 
tCurrentPic.substring(tCurrentPic.length - 4, tCurrentPic.length);
}


