var SlideShowSpeed = 10000;

var CrossFadeDuration = 20;



var Picture = new Array();

var Navigatie = new Array(); 

var Caption = new Array();

var Weblink = new Array();





Picture[1]  = '/images/ipad2_white.jpg';

Picture[2]  = '/images/hp workstation.jpg';

Picture[3]  = '/images/Switch banner.jpg';

Picture[4]  = '/images/switchon banner.jpg';



Navigatie[1]  = 'aanbieding_navigatie_item1';

Navigatie[2]  = 'aanbieding_navigatie_item2';

Navigatie[3]  = 'aanbieding_navigatie_item3';

Navigatie[4]  = 'aanbieding_navigatie_item4';

Caption[1]  = 'achtergrond5.jpg';

Caption[2]  = "This is the first caption.";

Caption[3]  = "This is the first caption.";

Caption[4]  = "This is the first caption.";



var tss;

var iss;

var jss = 1;

var pss = Picture.length-1;

var tl = 0;

var last=0;

var tllast=3;

var mt=0;

var keuze=0;

var navkeuze=0;

var preLoad = new Array();

var pause = false;

for (iss = 1; iss < pss+1; iss++){

preLoad[iss] = new Image();

preLoad[iss].src = Picture[iss];}



function runSlideShow(){

if (document.getElementById('aanbieding_top')) {

if (document.all){

document.images.PictureBox.style.filter="blendTrans(duration=2)";

document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";

document.images.PictureBox.filters.blendTrans.Apply();}

document.images.PictureBox.src = preLoad[jss].src;

if (document.all) document.images.PictureBox.filters.blendTrans.Play();

jss = jss + 1;



if (tl>3) tl=0;

if (jss > (pss)) jss=1;



tss = setTimeout('runSlideShow()', SlideShowSpeed);

document.getElementById(Navigatie[1]).style.background ='white'; 

document.getElementById(Navigatie[2]).style.background ='white'; 

document.getElementById(Navigatie[3]).style.background ='white'; 

document.getElementById(Navigatie[4]).style.background ='white'; 

document.getElementById(Navigatie[tl+1]).style.background ='#CBD8DC'; 



tl = tl +1;

}

}



function navigatie_click() {

 if (tl==1) location.href='http://www.switch.nl/nieuws-detailspagina/items/ipad-ontbijtsessie-enorm-succes.html';

 if (tl==2) location.href='http://www.switch.nl/referenties.html';

 if (tl==3) location.href='http://www.switch.nl';

 if (tl==0) location.href='http://www.switch.nl/aanmeldformulier.html';

}



function navigatie_item_click(keuze) {

   document.getElementById(Navigatie[1]).style.background ='white'; 

   document.getElementById(Navigatie[2]).style.background ='white'; 

   document.getElementById(Navigatie[3]).style.background ='white'; 

   document.getElementById(Navigatie[4]).style.background ='white'; 

   document.getElementById(Navigatie[keuze]).style.background ='#CBD8DC'; 

   if (document.all){

	document.images.PictureBox.style.filter="blendTrans(duration=2)";

	document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";

	document.images.PictureBox.filters.blendTrans.Apply();}

	document.images.PictureBox.src = preLoad[keuze].src;

   if (document.all) document.images.PictureBox.filters.blendTrans.Play();

   if (keuze==4) keuze=0;

   tl = keuze;

   jss = keuze+1;   

}





function hideDivNew() { 

	if (document.getElementById) { // DOM3 = IE5, NS6 

		document.getElementById('hideshow').style.visibility = 'hidden'; 

	} else { 

		if (document.layers) { // Netscape 4 

			document.hideshow.visibility = 'hidden'; 

		} else { // IE 4 

			document.all.hideshow.style.visibility = 'hidden'; 

		} 

	} 

}

 

function showDivNew() { 

	if (document.getElementById) { // DOM3 = IE5, NS6 

		document.getElementById('hideshow').style.visibility = 'visible'; 

	} else { 

		if (document.layers) { // Netscape 4 

			document.hideshow.visibility = 'visible'; 

		} else { // IE 4 

			document.all.hideshow.style.visibility = 'visible'; 

		} 

	} 

} 



function hideDivNew2() { 

	if (document.getElementById) { // DOM3 = IE5, NS6 

		document.getElementById('hideshow2').style.visibility = 'hidden'; 

	} else { 

		if (document.layers) { // Netscape 4 

			document.hideshow2.visibility = 'hidden'; 

		} else { // IE 4 

			document.all.hideshow2.style.visibility = 'hidden'; 

		} 

	} 

}

 

function showDivNew2() { 

	if (document.getElementById) { // DOM3 = IE5, NS6 

		document.getElementById('hideshow2').style.visibility = 'visible'; 

	} else { 

		if (document.layers) { // Netscape 4 

			document.hideshow2.visibility = 'visible'; 

		} else { // IE 4 

			document.all.hideshow2.style.visibility = 'visible'; 

		} 

	} 

} 



function leegAfleveradres(){

	document.getElementById('aflever_tav').value='';

	document.getElementById('aflever_straat').value='';

	document.getElementById('aflever_postcode').value='';

	document.getElementById('aflever_plaats').value='';	

}



function showdiv(objectDiv) {

	//safe function to show an element with a specified id

    var showT = objectDiv.concat('1');

	var hideT = objectDiv.concat('2');

	var valueT = objectDiv.concat('status');

	if(!document.getElementById) {

          return;

    }

	document.getElementById(showT).style.display="block";	

	document.getElementById(hideT).style.display="none";	

	document.getElementById(valueT).value = '1';	

		//document.getElementById(id).style.display = 'block';

}

function showKlantType(objectDiv) {

	//safe function to show an element with a specified id



	if(!document.getElementById) {

          return;

    }

	document.getElementById('zakelijk').style.display="none";

	document.getElementById('particulier').style.display="none";

	document.getElementById('overheid').style.display="none";

	document.getElementById(objectDiv).style.display="block";	

		

		//document.getElementById(id).style.display = 'block';

}



function showElement(layer){

	var myLayer = document.getElementById(layer);

	if(myLayer.style.display=="none"){

		myLayer.style.display="block";

		myLayer.backgroundPosition="top";

	} else { 

		myLayer.style.display="none";

	}

}


