/**
 * $Id: productkader.js 17 2011-04-14 11:50:17Z projects $
 * 
 * js/productkader.js
 */

function init_productkader() {
	var productkeuze = document.getElementById('productkader');
	
	if (productkeuze) {
		
		var producten = productkeuze.getElementsByTagName('li');
		
		if (producten && producten.length > 0) {
			for (var i = 0; i < producten.length; i++) {
				producten[i].onclick = product_onclick;
				producten[i].onmouseover = product_onmouseover;
				producten[i].onmouseout = product_onmouseout;
			}
		}
	}
}

function product_onclick() {
	var ahrefs = this.getElementsByTagName('a');
	
	if (ahrefs && ahrefs.length > 0) {
		document.location = ahrefs[0].href;
	}
}

function product_onmouseover() {
	var ahrefs = this.getElementsByTagName('a');
	
	if (ahrefs && ahrefs.length > 0) {
		ahrefs[0].className = 'hover';
	}
}

function product_onmouseout() {
	var ahrefs = this.getElementsByTagName('a');
	
	if (ahrefs && ahrefs.length > 0) {
		ahrefs[0].className = '';
	}
}
