if (document.images)
{
homeon= new Image(94,18);
homeon.src="Media/images/1_down.gif";
homeoff= new Image(94,18);
homeoff.src="Media/images/1_up.gif";

overonson= new Image(94,18);
overonson.src="Media/images/2_down.gif";
overonsoff= new Image(94,18);
overonsoff.src="Media/images/2_up.gif";

productoverzichton= new Image(94,18);
productoverzichton.src="Media/images/btn_productoverzicht_down.gif";
productoverzichtoff= new Image(94,18);
productoverzichtoff.src="Media/images/btn_productoverzicht_up.gif";

fotoson= new Image(94,18);
fotoson.src="Media/images/btn_fotos_down.gif";
fotosoff= new Image(94,18);
fotosoff.src="Media/images/btn_fotos_up.gif";

informatieon= new Image(94,18);
informatieon.src="Media/images/btn_informatie_down.gif";
informatieoff= new Image(94,18);
informatieoff.src="Media/images/btn_informatie_up.gif";

extraon= new Image(94,18);
extraon.src="Media/images/btn_extra_down.gif";
extraoff= new Image(94,18);
extraoff.src="Media/images/btn_extra_up.gif";
}

function lightup(imgName)
{
if (document.images)
{
imgOn=eval(imgName + "on.src");
document[imgName].src= imgOn;
}
}

function turnoff(imgName)
{
if (document.images)
{
imgOff=eval(imgName + "off.src");
document[imgName].src= imgOff;
}
}
//  Plaats hieronder de Images met of zonder de href  //

var imageblock=new Array()
imageblock[0]='<img src="Media/images/header_image_1.jpg" width="441" height="160" border="0" /></a>'
imageblock[1]='<img src="Media/images/header_image_2.jpg" width="441" height="160" border="0" /></a>'
imageblock[2]='<img src="Media/images/header_image_3.jpg" width="441" height="160" border="0" /></a>'
imageblock[3]='<img src="Media/images/header_image_4.jpg" width="441" height="160" border="0" /></a>'
imageblock[4]='<img src="Media/images/header_image_5.jpg" width="441" height="160" border="0" /></a>'
imageblock[5]='<img src="Media/images/header_image_6.jpg" width="441" height="160" border="0" /></a>'
imageblock[6]='<img src="Media/images/header_image_7.jpg" width="441" height="160" border="0" /></a>'

//  Om één Image te tonen moet z= gelijk zijn aan het aantal images -1  //

function randomorder(targetarray, spacing) {
  var randomorder=new Array()
  var the_one
  var z=6
  for (i=0;i<targetarray.length;i++)
  randomorder[i]=i

  while (z<targetarray.length) {
    the_one=Math.floor(Math.random()*targetarray.length)
    if (targetarray[the_one]!="_selected!"){
      document.write(targetarray[the_one]+spacing)
      targetarray[the_one]="_selected!"
      z++
    }
  }
}
/* ------------ BEGIN FOTOSLIDE SCRIPT ---------------*/

window.addEventListener?window.addEventListener("load",so_init,false):window.attachEvent("onload",so_init);

var d=document, imgs = new Array(), zInterval = null, current=0, pause=false;

function so_init() {
	if(!d.getElementById || !d.createElement)return;
	
	//css = d.createElement("link");
	//css.setAttribute("href","css.css");
	//css.setAttribute("rel","stylesheet");
	//css.setAttribute("type","text/css");
	//d.getElementsByTagName("head")[0].appendChild(css);
	
	imgs = d.getElementById("imageContainer").getElementsByTagName("img");
	for(i=1;i<imgs.length;i++) imgs[i].xOpacity = 0;
	imgs[0].style.display = "block";
	imgs[0].xOpacity = .99;
	
	setTimeout(so_xfade,3000);
}

function so_xfade() {
	cOpacity = imgs[current].xOpacity;
	nIndex = imgs[current+1]?current+1:0;

	nOpacity = imgs[nIndex].xOpacity;
	
	cOpacity-=.05; 
	nOpacity+=.05;
	
	imgs[nIndex].style.display = "block";
	imgs[current].xOpacity = cOpacity;
	imgs[nIndex].xOpacity = nOpacity;
	
	setOpacity(imgs[current]); 
	setOpacity(imgs[nIndex]);
	
	if(cOpacity<=0) {
		imgs[current].style.display = "none";
		current = nIndex;
		setTimeout(so_xfade,3000);
	} else {
		setTimeout(so_xfade,50);
	}
	
	function setOpacity(obj) {
		if(obj.xOpacity>.99) {
			obj.xOpacity = .99;
			return;
		}
		obj.style.opacity = obj.xOpacity;
		obj.style.MozOpacity = obj.xOpacity;
		obj.style.filter = "alpha(opacity=" + (obj.xOpacity*100) + ")";
	}
	
}
/* ------------ EINDE FOTOSLIDE SCRIPT ---------------*/
function doSearchBox_onclick() {
	if (document.getElementById('zoekwoord').value == "zoekwoord") {
		document.getElementById('zoekwoord').value = "";
	}
	document.getElementById('zoekwoord').style.color = "#000";
}

function doSearchBox_onblur() {
	if (document.getElementById('zoekwoord').value == "") {
		document.getElementById('zoekwoord').value = "zoekwoord";
	}
  document.getElementById('zoekwoord').style.color = "#b4b4b4";
}
