// JavaScript Document
function switchMenu(menu, ext){
	document.getElementById(menu).src = "/v5/images/menu/" + menu + ext + ".jpg";
}

function showMail(newText, firstline, lastline){
	if(newText==""){
		newText = firstline + "@" + lastline;
	}
	mail = "<A href=\"mailto:" + firstline + "@" + lastline + "\">" +newText + "</A>";
	document.write(mail);
}

function toonCat(cpage, value){
	document.location = "?P=" + cpage + "&CAT=" + value;	
}

function changeIyear(year, act, cpage){
	document.location =	"?P=" + cpage + "&ACT=" + act + "&year=" + year;
}

function initImage(imageID) {
	image = document.getElementById(imageID);
	setOpacity(image, 100);
	image.style.visibility = "visible";
	fadeIn(imageID,100);
}
function fadeIn(objId,opacity) {
	if (document.getElementById) {
		obj = document.getElementById(objId);
		if (opacity >= 0) {
			setOpacity(obj, opacity);
			opacity--;
			window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 20);
		} else {
			document.getElementById("fadeImg").style.display="none";
		}
	}
}
function setOpacity(obj, opacity) {
	opacity = (opacity == 100)?99.999:opacity;
	// IE/Win
	obj.style.filter = "alpha(opacity:"+opacity+")";
	// Safari<1.2, Konqueror
	obj.style.KHTMLOpacity = opacity/100;
	// Older Mozilla and Firefox
	obj.style.MozOpacity = opacity/100;
	// Safari 1.2, newer Firefox and Mozilla, CSS3
	obj.style.opacity = opacity/100;
}

function hideMessage(){
	document.getElementById("cMessage").style.display = "none";
}

function hideBox(boxId){
	document.getElementById(boxId).style.display = "none";	
}
function switchLink(id){
	hideBox('clubs');hideBox('fed');hideBox('info');
	document.getElementById(id).style.display = "block";
}

function switchPw()
{
	stat = document.getElementById("frmPw").style.display;
	(stat=="block")?stat="none":stat="block";
	document.getElementById("frmPw").style.display = stat;
}
// -->
