var shownSubNavIdNr = -1;
var themePath = "";

function setPath(path) {
	themePath = path;
}

function hideSubNav() {
	document.getElementById("subcategory-3").style.display = "none";
	document.getElementById("subcategory-18").style.display = "none";
}

function showSubNav(idNr) {
	hideSubNav();
	if (shownSubNavIdNr != idNr) {
		shownSubNavIdNr = idNr;
		var id = "subcategory-" + idNr;
		document.getElementById(id).style.display = "inline";
	}
	else {
		shownSubNavIdNr = -1;	
	}
}

function selectCategory(name) {
	hideSubNav();
	window.location.href = name;
}	

function showImage ( imageURL ) {
	document.getElementById("attachment-full").src = imageURL;
}

function decryptCharacter(x) {
	return String.fromCharCode(x-2);	
}

function linkEmail() {
	var encrypted = "88*88*111*99*107*110*118*113*60*113*104*104*107*101*103*66*118*116*103*100*103*116*117*114*119*116*105*48*99*118*110*66*113*116*105";
	var decrypted = "";
	var temp = encrypted.split("*");
	for(var i=2; i < 30; i++)	{
		decrypted = decrypted + decryptCharacter(temp[i]);
	}
	location.href = decrypted;
}