function clickIE4(){
	if (event.button==2){
		return false;
	}
}

function clickNS4(e){
	if (document.layers||document.getElementById&&!document.all){
		if (e.which==2||e.which==3){
			return false;
		}
	}
}

if (document.layers){
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
	document.onmousedown=clickIE4;
}

document.oncontextmenu = new Function("return false");

function toggleOptions(l, m, alt_open, alt_close) {
	var obj = document.getElementById(l);
	var img = document.getElementById(m);
	if (obj.style.display == "block") {
		obj.style.display = "none";
		img.src = "images/icons/arrow-open.gif";
		img.alt = alt_open;
	} else {
		obj.style.display = "block";
		img.src = "images/icons/arrow-close.gif";
		img.alt = alt_close;
	}
}

var infoLayer = new Array();
infoLayer[0]="Divisie Klantkaart"; 
infoLayer[1]="Incidenten"; 
infoLayer[2]="Changes"; 
infoLayer[3]="Standaard Leveringen"; 
infoLayer[4]="Maatwerk"; 
infoLayer[5]="Projecten"; 
infoLayer[6]="Beschikbaarheid"; 
infoLayer[7]="Klanttevredenheid"; 
infoLayer[8]="Toelichting"; 



var currentLayer = 8;

var isSlideShowRunning = true;

function showSlideLayer(i) {
    currentLayer = i;
    if (hideAllLayers()) {
        hideAllMenuHover();
        showMenuHover(infoLayer[i]);
        showLayer(infoLayer[i]);
    }
}

function showMenuHover(whichLayer) {
    var obj = document.getElementById("menu" + whichLayer);
    if (obj != null) obj.className = "table-row-hover";
}

function hideMenuHover(whichLayer) {
    var obj = document.getElementById("menu" + whichLayer);
    if (obj != null) obj.className = "table-row";
}

function hideAllMenuHover() {
    for (x=0; x<infoLayer.length; x++) { 
        hideMenuHover(infoLayer[x]);
    }
}

function hideAllLayers() {
    for (x=0; x<infoLayer.length; x++) { 
        hideLayer(infoLayer[x]);
    } 
    return true;
}

function slideShowLayer() {
    if (isSlideShowRunning == true) {
        if (currentLayer == infoLayer.length) currentLayer = 0;
        if (hideAllLayers()) showSlideLayer(currentLayer);
        currentLayer++;
    }
    //setTimeout("slideShowLayer()",10000); 
}

function resumeSlideShow() {
    isSlideShowRunning = true;
}

function stopSlideShow() {
    isSlideShowRunning = false;
}

function hideLayer(whichLayer) {
    var obj = document.getElementById(whichLayer);
    if (obj != null) obj.style.display = "none";
}

function showLayer(whichLayer) {
    var obj = document.getElementById(whichLayer);
    if (obj != null) obj.style.display = "block";
}

function toggleLayer(whichLayer) {
    var obj = document.getElementById(whichLayer);
    if (obj != null) obj.style.display = style2.display? "":"block";
}

