function getAjax(){try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(a){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){}try{return new XMLHttpRequest()}catch(a){}alert("Geen Ajax");return null}var ajax=getAjax();function get(b,c){ajax.open("get","ajax.php?part="+b+"&page="+c,true);var a="";if(b=="zonnepanelen"){a="color:#FF9900;"}else{if(b=="ledverlichting"){a="color:#339933;"}}ajax.onreadystatechange=function(){if(ajax.readyState==4){document.getElementById("tekst").innerHTML=ajax.responseText;document.getElementById("ai").innerHTML="#"+c+"ai{font-weight:bold;"+a+"}";if(b=="ledverlichting"&&c=="prod_led"&&document.cookie!=""){prod_led(document.cookie)};Shadowbox.clearCache();Shadowbox.init({skipSetup:true});Shadowbox.setup()}};ajax.send(null)}var hover=false;function l1(){if(hover){return}$("#i1").fadeToggle("slow","linear");$("#i2").fadeToggle("slow","linear");$("#li1").css("background","url('img/wit.png') transparent no-repeat");$("#li2").css("background","url('img/grijs.png') transparent no-repeat");clearTimeout(t);t=setTimeout(l2,5000)}function l2(){if(hover){return}$("#i2").fadeToggle("slow","linear");$("#i3").fadeToggle("slow","linear");$("#li2").css("background","url('img/wit.png') transparent no-repeat");$("#li3").css("background","url('img/grijs.png') transparent no-repeat");clearTimeout(t);t=setTimeout(l3,5000)}function l3(){if(hover){return}$("#i3").fadeToggle("slow","linear");$("#i4").fadeToggle("slow","linear");$("#li3").css("background","url('img/wit.png') transparent no-repeat");$("#li4").css("background","url('img/grijs.png') transparent no-repeat");clearTimeout(t);t=setTimeout(l4,5000)}function l4(){if(hover){return}$("#i4").fadeToggle("slow","linear");$("#i1").fadeToggle("slow","linear");$("#li4").css("background","url('img/wit.png') transparent no-repeat");$("#li1").css("background","url('img/grijs.png') transparent no-repeat");clearTimeout(t);t=setTimeout(l1,5000)}var t=setTimeout(l1,5000);function h1(){$("#i1").fadeIn("slow","linear");$("#li1").css("background","url('img/grijs.png') transparent no-repeat");$("#i2").fadeOut("slow","linear");$("#i3").fadeOut("slow","linear");$("#i4").fadeOut("slow","linear");$("#li2").css("background","url('img/wit.png') transparent no-repeat");$("#li3").css("background","url('img/wit.png') transparent no-repeat");$("#li4").css("background","url('img/wit.png') transparent no-repeat");hover=true}function h2(){$("#i2").fadeIn("slow","linear");$("#li2").css("background","url('img/grijs.png') transparent no-repeat");$("#i1").fadeOut("slow","linear");$("#i3").fadeOut("slow","linear");$("#i4").fadeOut("slow","linear");$("#li1").css("background","url('img/wit.png') transparent no-repeat");$("#li3").css("background","url('img/wit.png') transparent no-repeat");$("#li4").css("background","url('img/wit.png') transparent no-repeat");hover=true}function h3(){$("#i3").fadeIn("slow","linear");$("#li3").css("background","url('img/grijs.png') transparent no-repeat");$("#i1").fadeOut("slow","linear");$("#i2").fadeOut("slow","linear");$("#i4").fadeOut("slow","linear");$("#li1").css("background","url('img/wit.png') transparent no-repeat");$("#li2").css("background","url('img/wit.png') transparent no-repeat");$("#li4").css("background","url('img/wit.png') transparent no-repeat");hover=true}function h4(){$("#i4").fadeIn("slow","linear");$("#li4").css("background","url('img/grijs.png') transparent no-repeat");$("#i1").fadeOut("slow","linear");$("#i2").fadeOut("slow","linear");$("#i3").fadeOut("slow","linear");$("#li1").css("background","url('img/wit.png') transparent no-repeat");$("#li2").css("background","url('img/wit.png') transparent no-repeat");$("#li3").css("background","url('img/wit.png') transparent no-repeat");hover=true}function o1(){hover=false;clearTimeout(t);t=setTimeout(l1,5000)}function o2(){hover=false;clearTimeout(t);t=setTimeout(l2,5000)}function o3(){hover=false;clearTimeout(t);t=setTimeout(l3,5000)}function o4(){hover=false;clearTimeout(t);t=setTimeout(l4,5000)};
function prod_led(id){
	var all=document.querySelectorAll('#prod_led_wrapper div.prods');
	for(one in all){
		if(all[one].style) all[one].style.display='none';
	}
	document.getElementById(id).style.display='block';
	document.cookie=id;
	all=document.querySelectorAll('#prod_led_menu a');
	for(one in all){
		if(all[one].style) all[one].style.opacity='0.5';
	}
	document.getElementById("a_"+id).style.opacity='1';
}
