window.onload = function()
{
	var groothandeltitles = $$('#groothandel-landkeuzes h1');
	var groothandelsubtitles = $$('#groothandel-landkeuzes p');
	var groothandelhrefs = $$('#groothandel-landkeuzes a');	
	for(var i = 0; i<groothandeltitles.length;i++)
	{		
		groothandelhrefs[i].setAttribute("hovertext",groothandeltitles[i].innerHTML);
		groothandelhrefs[i].setAttribute("hoversubtext",groothandelsubtitles[i].innerHTML);
		groothandelhrefs[i].onmouseover = SetWholeSaleHeaderText;
		groothandelhrefs[i].onclick=SetCookie;
	}	
	groothandeltitles.invoke('hide');
	groothandelsubtitles.invoke('hide');
	
	var fundraisingtitles = $$('#bloembollenactie-landkeuzes h1');
	var fundraisingsubtitles = $$('#bloembollenactie-landkeuzes p');	
	var fundraisinghrefs = $$('#bloembollenactie-landkeuzes a');		
	for(var i = 0; i<fundraisingtitles.length;i++)
	{		
		fundraisinghrefs[i].setAttribute("hovertext",fundraisingtitles[i].innerHTML);		
		fundraisinghrefs[i].setAttribute("hoversubtext",fundraisingsubtitles[i].innerHTML);
		fundraisinghrefs[i].onmouseover = SetFundraisingHeaderText;
		fundraisinghrefs[i].onclick=SetCookie;
	}	
	fundraisingtitles.invoke('hide');
	fundraisingsubtitles.invoke('hide');
	return true;
}
function SetWholeSaleHeaderText(e)
{
	if (!e) var e = window.event;
	e.cancelBubble = true;
	if (e.stopPropagation) e.stopPropagation();
	var tg = (window.event) ? e.srcElement : e.target;		
	$('wholesale-head').innerHTML = "<h1>" + tg.attributes['hovertext'].nodeValue + "</h1>" + "<p>" + tg.attributes['hoversubtext'].nodeValue + "</p>";
}
function SetFundraisingHeaderText(e)
{	
	if (!e) var e = window.event;
	e.cancelBubble = true;
	if (e.stopPropagation) e.stopPropagation();
	var tg = (window.event) ? e.srcElement : e.target;		
	$('bloembollenactie-head').innerHTML = "<h1>" + tg.attributes['hovertext'].nodeValue + "</h1>" + "<p>" + tg.attributes['hoversubtext'].nodeValue + "</p>";
}

function SetCookie(e)
{	
	if (!e) var e = window.event;
	e.cancelBubble = true;
	if (e.stopPropagation) e.stopPropagation();	
	var tg = (window.event) ? e.srcElement : e.target;	
	if(document.getElementById("rememberchoice").checked)
	{
		createCookie('language',tg.href,90);
	}
}

