
var newsitem=0;

var bgsleight	= function() {
	
	function addLoadEvent(func) {
		var oldonload = window.onload;
		if (typeof window.onload != 'function') {
			window.onload = func;
		} else {
			window.onload = function() {
				if (oldonload) {
					oldonload();
				}
				func();
			}
		}
	}
	
	function fnLoadPngs() {
		var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
		var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
		for (var i = document.all.length - 1, obj = null; (obj = document.all[i]); i--) {
			if (itsAllGood && obj.currentStyle.backgroundImage.match(/\.png/i) != null) {
				fnFixPng(obj);
				obj.attachEvent("onpropertychange", fnPropertyChanged);
			}
		}
	}

	function fnPropertyChanged() {
		if (window.event.propertyName == "style.backgroundImage") {
			var el = window.event.srcElement;
			if (!el.currentStyle.backgroundImage.match(/images\/empty\.gif/i)) {
				var bg	= el.currentStyle.backgroundImage;
				var src = bg.substring(5,bg.length-2);
				el.filters.item(0).src = src;
				el.style.backgroundImage = "url(images/empty.gif)";
			}
		}
	}

	function fnFixPng(obj) {
		var bg	= obj.currentStyle.backgroundImage;
		var src = bg.substring(5,bg.length-2);
		obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
		obj.style.backgroundImage = "url(images/empty.gif)";
	}
	
	
	
	
	return {
		
		init: function() {
			
			if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
				addLoadEvent(fnLoadPngs);
			}
			
		}
	}
	
}();

bgsleight.init();

 
Behaviour.register({
	'div.menuitem': function (el) {
		Event.observe(el, 'mouseover', function() {
			$(el).addClassName('menuon');
		});
		Event.observe(el, 'mouseout', function() {
			$(el).removeClassName('menuon');
		});
		
	},
	
	'div.top10_stuur': function (el) {
		Event.observe(el, 'mouseover', function() {
			$(el).addClassName('top10_stuur_over');
		});
		Event.observe(el, 'mouseout', function() {
			$(el).removeClassName('top10_stuur_over');
		});
		
	},
	
	'div.games_title': function (el) {
		Event.observe(el, 'mouseover', function() {
			$('games_link').className='games_link_on';
		});
		Event.observe(el, 'mouseout', function() {
			$('games_link').className='games_link';
		});
		
	},
	'div.top10_meer': function (el) {
		Event.observe(el, 'mouseover', function() {
			$(el).className='top10_meer_over';
		});
		Event.observe(el, 'mouseout', function() {
			$(el).className='top10_meer';
		});
		
	},

	'div.game2-button': function (el) {
		Event.observe(el, 'mouseover', function() {
			$(el).className='game2-button_over';
		});
		Event.observe(el, 'mouseout', function() {
			$(el).className='game2-button';
		});
		
	},	
	'div.game-button': function (el) {
		Event.observe(el, 'mouseover', function() {
			$(el).className='game-button_over';
		});
		Event.observe(el, 'mouseout', function() {
			$(el).className='game-button';
		});
		
	},
	'div.top10_laatste': function (el) {
		Event.observe(el, 'mouseover', function() {
			$(el).className='top10_laatste_over';
		});
		Event.observe(el, 'mouseout', function() {
			$(el).className='top10_laatste';
		});
		
	},
	
	'div.top10_stem': function (el) {
		Event.observe(el, 'mouseover', function() {
			$(el).className='top10_stem_over';
		});
		Event.observe(el, 'mouseout', function() {
			$(el).className='top10_stem';
		});
		Event.observe(el, 'click', function() {
			$(stem).submit();
		});
		
	},
	'div.faq_verstuur': function (el) {
		Event.observe(el, 'mouseover', function() {
			$(el).className='faq_verstuur_over';
		});
		Event.observe(el, 'mouseout', function() {
			$(el).className='faq_verstuur';
		});
		Event.observe(el, 'click', function() {
			$(stuur).submit();
		});
		
	},
	'div.faq_terug': function (el) {
		Event.observe(el, 'mouseover', function() {
			$(el).className='faq_terug_over';
		});
		Event.observe(el, 'mouseout', function() {
			$(el).className='faq_terug';
		});
		
	},
	'div.top10_terug': function (el) {
		Event.observe(el, 'mouseover', function() {
			$(el).className='top10_terug_over';
		});
		Event.observe(el, 'mouseout', function() {
			$(el).className='top10_terug';
		});
	
	},
	'div.food-item': function (el) {
		Event.observe(el, 'mouseover', function() {
			$(el).className='food-item_over';
		});
		Event.observe(el, 'mouseout', function() {
			$(el).className='food-item';
		});
		
	},

	'div.news_item': function (el) {
		newsitem= newsitem+1;
		if ((newsitem/2) == Math.round(newsitem/2)) $(el).addClassName('news_item_red');
		 $(el).style.height = Math.round(($(el).getHeight()+30)/41)*41;
	},
	
	
	'div.startagline': function (el) {
		Event.observe(el, 'mouseover', function() {
			$('sterreneten').className='leesmeer_over';
		});
		Event.observe(el, 'mouseout', function() {
			$('sterreneten').className='leesmeer';
		});
		
	},
	'div.bekijkallenieuws': function (el) {
		Event.observe(el, 'mouseover', function() {
			$(el).className='bekijkallenieuws_over';
		});
		Event.observe(el, 'mouseout', function() {
			$(el).className='bekijkallenieuws_out';
		});
		
	},
	'div.lees_meer': function (el) {
		Event.observe(el, 'mouseover', function() {
			$(el).className='lees_meer_over';
		});
		Event.observe(el, 'mouseout', function() {
			$(el).className='lees_meer_out';
		});
		
	},	
	'div.back_home': function (el) {
		Event.observe(el, 'mouseover', function() {
			$(el).className='back_home_over';
		});
		Event.observe(el, 'mouseout', function() {
			$(el).className='back_home_out';
		});
		
	}	

});

function popupBasic( url, widthPX, heightPX ){
	
	day = new Date();
	id = day.getTime();
	
	if( !widthPX ) widthPX=800;
	if( !heightPX ) heightPX=600;
	
	//eval("page" + id + " = window.open("+url+", '" + id + "', 'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width="+widthPX+",height="+heightPX+"');");
	window.open(url, id , 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width='+widthPX+',height='+heightPX);
}

function popupHapStap( url, widthPX, heightPX ){
	
	day = new Date();
	id = day.getTime();
	
	//eval("page" + id + " = window.open("+url+", '" + id + "', 'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width="+widthPX+",height="+heightPX+"');");
	window.open(url, id , 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+widthPX+',height='+heightPX);
}



