    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 fnSetProductImageType(typeID) {
    for ( n=1; n<4; n++ ) {
        var e = document.getElementsByName("imgItem" + n);
        if ( n == typeID ) {
            for(var i=0; i<e.length; i++) { e[i].style.display = "block"; }
        } else {
            for(var i=0; i<e.length; i++) { e[i].style.display = "none"; }
        }
    }
}

function fnSetProductImageMainType(typeID) {
    var e = document.getElementsByName("imgMain_type1");
    var m = document.getElementById("hdImgMain");
    
    for(var i=0; i<e.length; i++) 
    {
        if(!e[i].src.match(typeID))
        {
            e[i].style.display = "none";
        }
        else
        {
            e[i].style.display = "block";
            m.value = e[i].src;
        }
    }
}


function openPrintWin() {
	var	W = 600;
	var H = 500;
	var L = (screen.width - W) / 2;
	var T = (screen.height - H) / 2;
	day = new Date();
	id = day.getTime();
	var sRef = "PrintContent.aspx";
	eval("page" + id + " = window.open(sRef, '" + id + "', 'toolbar=1,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+W+',height='+H+',left ='+L+',top ='+T+'');");
}

function CreateWindow(name,url) {
    //get the radWindowManager object
    var oManager = GetRadWindowManager();
    if (oManager) {
        if (oManager.GetWindowByName("Window")) {
            var oWnd = oManager.GetWindowByName("Window");
            oWnd.SetTitle(name);
            oWnd.Status = false;
            oWnd.VisibleStatusbar = false;
            oWnd.VisibleTitlebar = false;
            oWnd.BackColor = "#E0E1C1";
            oWnd.SetUrl(url);
            oWnd.SetModal(true);
            oWnd.SetSize(486, 380);
            oWnd.Show();
         }
    } else {
        //create new radWindow
        var oNew = oManager.Open(url, "Window");
        if (oNew){
            //set radWindow properties
            oNew.Status = false;
            oNew.SetModal(true);
            oNew.BackColor="#E0E1C1";
            oNew.VisibleStatusbar = false;
            oNew.VisibleTitlebar = false;
            oNew.BorderStyle = "None";
            oNew.SetTitle(name);
            oNew.SetSize(486, 380);
            oNew.Show();
        }
    }
}

//set the window content to nothing on close
function OnClientClose(radWindow) { radWindow.SetContent("<br/>"); }

//set the radWindow status to empty
function OnClientPageLoad(radWindow) { radWindow.SetStatus(" "); }

function GetChannel( channelID )
{
    alert(channelID);
    window.location.href = "Default.aspx?ch=" + channelID;
    return false;
}

function AddToCart()
{
    return confirm("Dit product wordt in uw winkelwagen geplaatst!");
}

// Main Navigation Start
function setButtonModeOn(itemID)
{
    var baseID = itemID.replace("lbMenu", "");
    var baseID = baseID.replace("left", "");
    var baseID = baseID.replace("right", "");

    if(baseID)
    {
        linkBtn = itemID;
        var leftBtn = document.getElementById(baseID + 'left');
        var rightBtn = document.getElementById(baseID + 'right');
        var middleBtn = document.getElementById(baseID + 'middle');
	    
        if(leftBtn != null)
        {
            leftBtn.src = "../App_Images/Global/Menu/menu_left_on.gif";
        }
        if(rightBtn != null)
        {
            rightBtn.src = "../App_Images/Global/Menu/menu_right_on.gif";
        }
        if(middleBtn != null)
        {
            middleBtn.style.backgroundImage = "url(../App_Images/Global/Menu/menu_middle_on.gif)";
        }
    }
}
// Main Navigation End
