// javascript script/slides.js
//

var nextSlide = null;
var wcl = new Array( 'red','shadow','tb10','tb12','tb18','tb21' );
var slidehtml = '<span class="tn10"><img src="*1" width="*2" height="*3" border="0"><br clear="all">\n*4</span>';
var nknob     = false;

function nextKnob(s)
{
 t =  '<div id="cnext" style="position:absolute;visibility:hidden;'+s+'"><a ';
 t += 'href="#" onclick="shownext();" ';
 t += 'onmouseover="return roStatus(\'\')" class="more">[more/mehr]</a></div>';
 document.write(t);
 //nknob = true;
}

function doWrite(o,s)
{
 if (ns)
 { 
  o.document.write(s);
  o.document.close();
 }
 else if (s)
   o.innerHTML = s;
 else
   o.innerText = ' ';
}

function shadowWrite(n,s,c)
{
 for (i = 1; i >= 0; i--)
 {
  o = divObj(n+i,0);

  if (s)
   doWrite(o,'<span class="'+wcl[c+i]+'"><p class="'+wcl[i]+'">'+s+'</p></span>');
  else
   doWrite(o,s);
 }
}

function makecode()
{
 if (nknob)
 { 
  if (this.more)
   nextSlide = this.more;

  showObj(divObj('cnext',0),this.more);
 }

 s = slidehtml; 
 s = s.replace('*1',this.img);
 s = s.replace('*2',this.w);
 s = s.replace('*3',this.h);

 return s.replace('*4',this.txt);
}




function showSlide(o)
{
 if (o.name)
   shadowWrite('b',o.name,4);

 doWrite(divObj('sbox',0),o.code());  
}

function Slide(img,w,h,name,d,more,big)
{
 this.img  = img;
 this.w    = w;
 this.h    = h;
 this.txt  = d;
 this.code = makecode;

 if (name)
   this.name = name;

 if (more)
   this.more = more;

 if (big)
   this.big = big;

 return this;
}

