// Layers code for left hand navigation sub menus
function toggle_visibility(id) {
	var e = document.getElementById(id);
	if(e.style.display == 'block') e.style.display = 'none';
	else e.style.display = 'block';
}
// email address encryption codes
function books(anthroposophy,rudolf,read) {
	anthroposophy += ' ';
	var notelength = anthroposophy.length;
	var crotchet = 0;
	var quaver = '';
	for(var minim = 0; minim < notelength; minim++) {
		crotchet = 0;
		while(anthroposophy.charCodeAt(minim) != 32) {
			crotchet = crotchet * 10;
			crotchet = crotchet + anthroposophy.charCodeAt(minim)-48;
			minim++;
		}
	quaver += String.fromCharCode(steiner(crotchet,rudolf,read));
	}
	parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+quaver;
}
function steiner(pitching,timing,phrasing) {
	if (phrasing % 2 == 0) {
		harmony = 1;
		for(var doubletrack = 1; doubletrack <= phrasing/2; doubletrack++) {
			unison = (pitching*pitching) % timing;
			harmony = (unison*harmony) % timing;
		}
	} else {
		harmony = pitching;
		for(var chorus = 1; chorus <= phrasing/2; chorus++) {
			unison = (pitching*pitching) % timing;
			harmony = (unison*harmony) % timing;
		}
	}
	return harmony;
}

