// declare images
var Pic = new Array();

// Pic[0] = 'images/cancan_240_320.jpg';
// Pic[1] = 'images/rokken_240_320.jpg';
// Pic[2] = 'images/masker_240_320.jpg';

// februari 2008, nieuwe slideshow
// april 2010, aangepast met 3 reli-foto's, 2 andere weggehaald
Pic[0] = 'images/slide0.jpg';
Pic[1] = 'images/slide6.jpg';
Pic[2] = 'images/slide1.jpg';
Pic[3] = 'images/slide2.jpg';
Pic[4] = 'images/slide7.jpg';
Pic[5] = 'images/slide3.jpg';
Pic[6] = 'images/slide8.jpg';

// declare some stuff to work with
var i, t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
   preLoad[i] = new Image();
   preLoad[i].src = Pic[i];
}

/*
 * This function performs a slideshow
*/
function runSlideShow() {
   if (document.all) {
      document.images.SlideShow.style.filter="blendTrans(duration=3)";
      document.images.SlideShow.filters.blendTrans.Apply();
   }
   document.images.SlideShow.src = preLoad[j].src;
   if (document.all) {
      document.images.SlideShow.filters.blendTrans.Play();
   }
   j = j + 1;
   if (j > (p - 1)) j = 0;
   t = setTimeout('runSlideShow()', 4000);
}


/*
 * This function shows an image in a cool looking new window,
 * with or whitout any text under it. The choice is yours.
 *
 * param1 = url of the image
 * param2 = width of the image in pixels
 * param3 = height of the image in pixels
 * param4 = text under image, this is optional
*/
function showpict( cImage, nWidth, nHeight, cTxt ) {
   // declare some stuff to work with
   var bShowTxt    = (cTxt != "");
   var nTableWidth = nWidth;
   var nTopMarg    = 0;
   var nLeftMarg   = 0;
   var cFeatures;
   var oImageWin;
   var f;

   // if we have some text to display we make the window a bit bigger than the image-size
   // and play a bit with the margins to create a nice looking small border round the image
   if (bShowTxt) {
      nWidth    = nWidth  + 20;
      nHeight   = nHeight + 70;
      nTopMarg  = 10;
      nLeftMarg = 10;
   }

   // a bit complicated way to create the 3rd parameter needed for the window.open call
   cFeatures = "width="+nWidth+",height="+nHeight+",screenX=20,screenY=20,left=20,top=20";

   oImageWin = window.open("","photo",cFeatures);
   f = oImageWin.document;

   // write the html-code
   f.write('<HTML><HEAD><TITLE>angel of the day</TITLE>');
   f.write('<LINK HREF="style/angelstyle.css" REL="stylesheet" TYPE="text/css">');
   f.write('<META HTTP-EQUIV="imagetoolbar" CONTENT="no"></HEAD>');
   f.write('<BODY TOPMARGIN="' + nTopMarg + '" LEFTMARGIN="' + nLeftMarg);
   f.write('<DIV ALIGN="center">');
   f.write('<TABLE BORDER="0" WIDTH="' + nTableWidth + '" CELLPADDING="0" CELLSPACING="0">');
   f.write('<TR><TD CLASS="paint" ALIGN="center"><IMG SRC="' + cImage + '">');
   if (bShowTxt) { f.write('<BR><BR>' + cTxt); }
   f.write('</TD></TR></TABLE></DIV></BODY></HTML>');
   f.close();

   // bring window to the front if NetScape rulez here
   if (navigator.appName.substring(0,8) == "Netscape") oImageWin.focus();
}
