// -- This is a modified version of the original script 
// -- from CodeLifter.com, in order to fit in SPGM

// SlideShow with Captions and Cross-Fade
// (C) 2002 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header.

// ==============================
// Set the following variables...
// ==============================

// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = 3000;

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;


var tss;
var jss = 1;
var iss = 1;

var preLoad = new Array();
var arrCaptions = new Array();
var arrWidth = new Array();
var arrHeight = new Array();

function runSlideShow() {

  if ( document.getElementById('picture') ) {
    if (document.all && !window.opera){
      document.getElementById('picture').style.filter="blendTrans(duration=2)";
      document.getElementById('picture').style.filter="blendTrans(duration=CrossFadeDuration)";
      document.getElementById('picture').filters.blendTrans.Apply();
    }
    document.getElementById('picture').setAttribute('width', arrWidth[jss]);
    document.getElementById('picture').setAttribute('height', arrHeight[jss]);
    document.getElementById('picture').src = preLoad[jss].src;
    if (document.all && !window.opera){
      document.getElementById('picture').filters.blendTrans.Play();
    }
    if ( document.getElementById('picture-caption') ) {
      document.getElementById('picture-caption').innerHTML = arrCaptions[jss];
    }
  }

  jss = jss + 1;
  if (jss > (iss - 1)) jss=1;
  tss = setTimeout('runSlideShow()', SlideShowSpeed);
}

function addPicture(pictureURL, caption, width, height) {
  preLoad[iss] = new Image();
  preLoad[iss].src = pictureURL;
  arrCaptions[iss] = caption;
  arrWidth[iss] = width;
  arrHeight[iss] = height;
  iss = iss + 1;
}

function popupPicture(pictureURL, width, height, justPicture) {
  if (justPicture) {
    var frame = document.open('', '', 'width=800,height=800,scrollbars=0,location=0,menubar=0,resizable=1');
    frame.document.write(
      '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" '
      +'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n'
      +'<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n'
      +'  <head>\n'
      +'    <title>Die-GBBilder.com '+pictureURL+'</title>'
      +'    <style type="text/css">body {margin: 0px}</style>\n'
      +'    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />\n'
      +'  </head>\n'
	  +'<link rel="stylesheet" href="http://www.die-gbbilder.com/include/designs/a/format.css" type="text/css">\n'
	  +'  <link rel="Stylesheet" href="flavors/default/gallerycss.css" />\n'
      +'  <body onMouseUp="return false" ondragstart="return false"">\n'
      +'    <div style="margin: 0px;">\n'
        +' <table width="800"><tr><td width="450"><img src="'+pictureURL+'" alt="'+pictureURL+'"  class="bild1" oncontextmenu="return false" /></td><td width="350"><div align="center"><A HREF="#"></A><br></div>\n'
 +'<br><form><div align="center"><p><span class="style321">Code f&uuml;r G&auml;stebücher z.B. Für Jappy.de, <br>SnapScout.de, Yubbi.de</span> OHNE LINK<br> <span class="style336">Und Die-GBBilder.com </span><br><textarea name="code1" readonly="readonly" rows="1" cols="25" onClick="this.form.code1.select(); this.form.code1.focus()" >[url=www.die-gbbilder.com][IMG]http://www.die-gbbilder.com/'+pictureURL+'[/IMG][/url]</textarea></div></form>\n'
 +'<br><form><div align="center"><span class="style321">HTML Code für z.B. Kwick.de</span><br><textarea name="code3" readonly="readonly" rows="1" cols="25" onClick="this.form.code3.select(); this.form.code3.focus()" ><a href="http://www.die-gbbilder.com/"><img src="http://www.die-gbbilder.com/'+pictureURL+'" border=0 alt="Die-GBBilder.com"></a><br><a href="http://www.die-gbbilder.com/">GB Bilder & Grußkarten Versand</a> </textarea></div></form>\n'
 +'<br><form><div align="center">\n'
 +'<p><span class="style321">Bild URL</span><br><textarea name="code3" readonly="readonly" rows="1" cols="25" onClick="this.form.code3.select(); this.form.code3.focus()" >http://www.die-gbbilder.com/'+pictureURL+'</textarea></div></form>\n'
 +'</td></tr></table>\n'
      +'    </div>\n'
      +'  </body>\n'
      +'</html>'
	  
	  
	  

	  
	  
	  
	  
	  
	  
	  
	  
	  
    );
    frame.document.close();
    return true;
  } else {
    document.open(pictureURL, '', 'width='+width+',height='+height+',scrollbars=1,location=0,menubar=0,resizable=1');
  }
}


