var myrules = {
		'#homecontent1' : function(element){
					element.onmouseover = function(){over(1);};
					element.onmouseout = function(){out(1);};
				},
		'#homecontent2' : function(element){
					element.onmouseover = function(){over(2);};
					element.onmouseout = function(){out(2);};
				},
		'#homecontent3' : function(element){
					element.onmouseover = function(){over(3);};
					element.onmouseout = function(){out(3);};
				},
		'#nl-menu-item1 a' : function(element){
					element.onmouseover = function(){over(1);};
					element.onmouseout = function(){out(1);};
				},
		'#nl-menu-item2 a' : function(element){
					element.onmouseover = function(){over(2);};
					element.onmouseout = function(){out(2);};
				},
		'#nl-menu-item3 a' : function(element){
					element.onmouseover = function(){over(3);};
					element.onmouseout = function(){out(3);};
				}		
	};
	
Behaviour.register(myrules);

function over(nr)
{
	switch(nr)
	{
	case 1:	
		var menu = document.getElementById("nl-menu-item1").getElementsByTagName("a");
		menu[0].style.background = "transparent url(uploads/images/menu/keurmerk/menu-nl.jpg) 0 -43px no-repeat";
		var pane = document.getElementById("homecontent1").getElementsByTagName("div");
		pane[0].style.backgroundColor = "#ebf8fd";
		pane[0].style.borderBottom = "4px solid #359446"; 
		break;
	case 2:
		var menu = document.getElementById("nl-menu-item2").getElementsByTagName("a");
		menu[0].style.background = "transparent url(uploads/images/menu/keurmerk/menu-nl.jpg) -254px -43px no-repeat";
		var pane = document.getElementById("homecontent2").getElementsByTagName("div");
		pane[0].style.backgroundColor = "#f4f3f9";
		pane[0].style.borderBottom = "4px solid #167cab"; 
		break;
	case 3:
		var menu = document.getElementById("nl-menu-item3").getElementsByTagName("a");
		menu[0].style.background = "transparent url(uploads/images/menu/keurmerk/menu-nl.jpg) -505px -43px no-repeat";
		var pane = document.getElementById("homecontent3").getElementsByTagName("div");
		pane[0].style.backgroundColor = "#f7ebeb";
		pane[0].style.borderBottom = "4px solid #d63558"; 
		break;
	}	
}

function out(nr)
{
	switch(nr)
	{
	case 1:	
		var menu = document.getElementById("nl-menu-item1").getElementsByTagName("a");
		menu[0].style.background = "transparent url(uploads/images/menu/keurmerk/menu-nl.jpg) 0 0px no-repeat";
		var pane = document.getElementById("homecontent1").getElementsByTagName("div");
		pane[0].style.backgroundColor = "#ffffff";
		pane[0].style.borderBottom = "4px solid #ffffff"; 
		break;
	case 2:
		var menu = document.getElementById("nl-menu-item2").getElementsByTagName("a");
		menu[0].style.background = "transparent url(uploads/images/menu/keurmerk/menu-nl.jpg) -254px 0px no-repeat";
		var pane = document.getElementById("homecontent2").getElementsByTagName("div");
		pane[0].style.backgroundColor = "#ffffff";
		pane[0].style.borderBottom = "4px solid #ffffff"; 
		break;
	case 3:
		var menu = document.getElementById("nl-menu-item3").getElementsByTagName("a");
		menu[0].style.background = "transparent url(uploads/images/menu/keurmerk/menu-nl.jpg) -505px 0px no-repeat";
		var pane = document.getElementById("homecontent3").getElementsByTagName("div");
		pane[0].style.backgroundColor = "#ffffff";
		pane[0].style.borderBottom = "4px solid #ffffff"; 
		break;
	}	
}
