function toggleDiv(element){
      if(document.getElementById(element).style.display = 'none')
      {
        document.getElementById(element).style.display = 'block';
      }
      else if(document.getElementById(element).style.display = 'block')
      {
        document.getElementById(element).style.display = 'none';
      }
}

function changeUpdate(werkmap, image){	
	var imgNew = new Image();
	imgNew.src = '/uploads/produktlijst/'+werkmap+'/'+image+'';
	document['largeUpdate'].src = imgNew.src;
}

function slideFolio(col){
	var x = ((col-1)*-330)
	var folioChange = new Fx.Tween('folio', {duration:2000});
	folioChange.start('left',x);
	var cur = "trigger"+col;
	$(cur).addClass('current');

	for (i=1;i<=8;i++){
		var loopLI = "trigger"+i;
		if (cur==loopLI){}else{
			$(loopLI).removeClass('current');
		}
	}
}

function preload()
{
 if (document.images)
 {
   preload_image_object = new Image();
   // set image url
   image_url = new Array();
   image_url[0] = "http://www.worldwidewad.nl/style/images/hover_home.png";
   image_url[1] = "http://www.worldwidewad.nl/style/images/hover_wie.png";
   image_url[2] = "http://www.worldwidewad.nl/style/images/hover_wat.png";
   image_url[3] = "http://www.worldwidewad.nl/style/images/hover_werk.png";
   image_url[4] = "http://www.worldwidewad.nl/style/images/hover_klanten.png";
   image_url[5] = "http://www.worldwidewad.nl/style/images/hover_contact.png";
   image_url[6] = "http://www.worldwidewad.nl/style/images/hover_linkedin.png";
   image_url[7] = "http://www.worldwidewad.nl/style/images/hover_facebook.png";

    var i = 0;
    for(i=0; i<=7; i++) 
      preload_image_object.src = image_url[i];
 }
}

function relink( link )
{
        document.location.href = link;
}
