window.onload = prep;

function prep()
{
	document.getElementById("public").getElementsByTagName("select")[0].onchange = redirectPublic;
	document.getElementById("professional").getElementsByTagName("select")[0].onchange = redirectProfessional;
	document.getElementById("psp").getElementsByTagName("select")[0].onchange = redirectPsp;
}

function redirectPublic(e)
{
	if (!e) e = window.event;
	
	e = (window.event) ? e.srcElement : e.target;
	
	if (e.value != "select")
		location.href = "/redirect.jsp?target=" + e.value;
}

function redirectProfessional(e)
{
	if (!e) e = window.event;
	
	e = (window.event) ? e.srcElement : e.target;
	
	if (e.value != "select")
		location.href = "/redirect.jsp?target=" + e.value;
}

function redirectPsp(e)
{
	if (!e) e = window.event;
	
	e = (window.event) ? e.srcElement : e.target;
	
	if (e.value != "select")
	{
		if (e.value != "france")
		{
			location.href = "/redirect.jsp?target=" + e.value;
		}
		else
		{
			window.open("/media/downloads/fr/RCP.pdf");
		}
	}
}
