function postCartForm(action, prod_id){
	$('cart_action').value = action;
	$('prod_id').value = prod_id;
	$('cart_form').submit();
}

function tabblad (activeTab) {
	for (i = 1; i <= 10; i++) {
		if (document.getElementById('tab_' + i)) {
			if (i == activeTab) {
				document.getElementById('tab_' + i).className = 'select';
				document.getElementById('inhoud_' + i).className = 'tonen';
			}

			else {
				document.getElementById('tab_' + i).className = '';
				document.getElementById('inhoud_' + i).className = 'verstoppen';
			}
		}
	}
}

Event.observe(window, 'load', function() {
	var as = $$('.related dt a');
	var top_height = 0;
	as.each(function (me) {
		var theight = me.getHeight();
		if (theight > top_height) {
			top_height = theight;
		}
	});
	top_height += 4;
	as.each(function (me) {
		me.parentNode.style.top = '-'+top_height+'px';
		me.parentNode.parentNode.style.top = top_height+'px';
	});
});

Event.observe(window, 'load', function() {
    $$('a[rel="external"]').each(function(link){
        if(link.readAttribute('href') != '' && link.readAttribute('href') != '#'){
            link.writeAttribute('target','_blank');
        }
    });
});
