function steiner_email(rudolf,house,library) {
	rudolf += ' ';
	var theatre = rudolf.length;
	var events = 0;
	var speech = '';
	for(var drama = 0; drama < theatre; drama++) {
		events = 0;
		while(rudolf.charCodeAt(drama) != 32) {
			events = events * 10;
			events = events + rudolf.charCodeAt(drama)-48;
			drama++;
		}
		speech += String.fromCharCode(workshop(events,house,library));
	}
	parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+speech;
}
function workshop(meeting,language,discuss) {
	if (discuss % 2 == 0) {
		perform = 1;
		for(var world = 1; world <= discuss/2; world++) {
			eurhythmy = (meeting*meeting) % language;
			perform = (eurhythmy*perform) % language;
		}
	} else {
		perform = meeting;
		for(var stage = 1; stage <= discuss/2; stage++) {
			eurhythmy = (meeting*meeting) % language;
			perform = (eurhythmy*perform) % language;
		}
	}
	return perform;
}

var statusCheck = null;
function dpactWindow(url) {
   if (statusCheck == null) {
      mywin = open(url,"mywin",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=575,height=202,top=20,left=20,screeny=20,screenx=20');
      statusCheck = 1;
   }
   else {
         mywin.close();
         mywin = open(url,"mywin",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=575,height=202,top=20,left=20,screeny=20,screenx=20');
         statusCheck = 1;
   }
}
var winstatusCheck = null;
function open_window(url) {
   if (winstatusCheck == null) {
		mywin2 = window.open(url,"win2",'toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=717,height=420,top=1,left=1');
      winstatusCheck = 1;
   }
   else {
         mywin2.close();
		mywin2 = window.open(url,"win2",'toolbar=1,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=717,height=420,top=1,left=1');
         winstatusCheck = 1;
   }
}

// Layers code for training dates and workshops
function toggle_visibility(id) {
	var e = document.getElementById(id);
	if(e.style.display == 'block') e.style.display = 'none';
	else e.style.display = 'block';
}

