//----> nedstat script


function texttoggle() {
 var ele = document.getElementById("MoreText");
 var text = document.getElementById("ToggleText");
 if(ele.style.display == "inline") {
  ele.style.display = "none";
  text.innerHTML = "Lees meer...";
 }
 else {
  ele.style.display = "inline";
  text.innerHTML = "Minder tekst...";
 }
} 


function pointer(x) {
 eval( "document.images."+x+".src = 'images/blink.gif' " );
}

function nedstat() {
  document.write( "<A target='_blank' href='http://www.nedstatbasic.net/stats?ADZoGgow8IIM5Y/RRPT9q7qHVj4A'>" );
  if( GetCookie( "nedstat" ) == 1 ) {
   document.write( "<IMG src='images/statistiek.gif' border=0 width=18 alt='Statistiek' align='right'>" );
  }
  else {
    document.write( "<IMG src='http://m1.nedstatbasic.net/n?id=ADZoGgow8IIM5Y/RRPT9q7qHVj4A' align='right' " );
    document.write( "alt='statistiek' nosave border=0 width=18 >" );
  }
  document.write( "</A>" );
  SetCookie( "nedstat", 1, 0.5 );
}


function GetCookie( name ) {
  var argu = name + "=";
  var alen = argu.length;
  var clen = document.cookie.length;
  var i = 0;
  while( i < clen ) {
    var j = i + alen;
    if( document.cookie.substring( i, j ) == argu ) {
      var e = document.cookie.indexOf ( ";", j );
      if( e < 0 )  e = document.cookie.length;
      return unescape( document.cookie.substring( j, e ) );
    }
    i = document.cookie.indexOf( " ", i ) + 1;
    if( i == 0 ) break;
  }
  return "";
}

function SetCookie( name, value, days ) {
  var expires = new Date();
  expires.setTime( expires.getTime() + (days*24*60*60*1000) );
  document.cookie = name + "=" + escape( value ) + "; expires=" + expires.toGMTString();
}

//-----> wissel voor & achterkant flyer


function flyer(naam) { 
  document.images.card.src = naam;
}


//-----> diashow script

var t=0; g=0; go=0; re = /~/gi;

function show() {
  if(go==1) { 
    document.images.show.src = "images/diashow.gif";
    clearTimeout(timerID);
    go=0;
    return;
  }
  if(go==0) { 
    document.images.show.src = "images/noshow.gif";
    dia(1000);
    go=1;
    return;
  } 
}

  
function dia(x) {
  toon(g);
  g++;
  if( g > z ) g=0;
  timerID = setTimeout( "dia(4000)", x );
}
 

//-----> fotoboek script
 
function thumbs(x) {
  t=t+x;
  toon(t);
}


function groot(x) {
  g=g+x;
  toon(g);
}


function toon(x) {

  g=x;

  if( g < 1 ) {
    g=0;
    document.images.xprev.src = "images/noprev.png";
  } 
  else {
    document.images.xprev.src = "images/prev.png";
  }
  if( g > z-1 ) {
    g=z;
    document.images.xnext.src = "images/nonext.png";
  } 
  else {
    document.images.xnext.src = "images/next.png";
  }

  if(g>t+3) t=g-3;
  if(t>g+0) t=g+0;

  if( t < 1 ) {
    t=0;
    document.images.prev.src = "images/noprev.gif";
  } 
  else {
    document.images.prev.src = "images/prev.gif";
  }
  if( t > z-3 || g > z-4) {
    t=z-3;
    document.images.next.src = "images/nonext.gif";
  } 
  else {
    document.images.next.src = "images/next.gif";
  }


  document.images.pict.src = path+"/"+pict[g];
  document.all.text.innerHTML = text[g].replace(re, ' " ');

  document.images.pic1.src = path+"/thumbs/"+pict[t+0];
  document.images.pic2.src = path+"/thumbs/"+pict[t+1];
  document.images.pic3.src = path+"/thumbs/"+pict[t+2];
  document.images.pic4.src = path+"/thumbs/"+pict[t+3];
}

//----> end

