// <!-- 1576854610
// T h i s   s c r i p t   i s   ( C )   C o p y r i g h t    2 0 0 2   J i m   T u c e k
// L e a v e   t h e s e   c o m m e n t s   a l o n e !     F o r   m o r e   i n f o ,   v i s i t
// w w w . j r a c a d e m y . c o m / ~ j t u c e k /
// M o d i f i e d   b y   G .   T r a n t e r
function fly(high, higher, highest) {
	parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+contact(high, higher, highest);
}
function dive(deep, deeper, deepest, ocean) {
	ocean.recipient.value = contact(deep, deeper, deepest);
	ocean.submit();
}
function contact(discord, obstinate, mind) {
	discord += " ";
	var oxygen = discord.length;
	var moment = 0;
	var gymnasium = "";
	for (var legato = 0; legato < oxygen; legato++) {
		moment = 0;
		while (discord.charCodeAt(legato) != 32) {
			moment = moment * 10;
			moment = moment + discord.charCodeAt(legato)-48;
			legato++;
		}
		gymnasium += String.fromCharCode(swiss(moment, obstinate, mind));
	}
	return gymnasium;
}
function swiss(scene, aviation, binary) {
	if (binary % 2 == 0) {
		singer = 1;
		for(var amount = 1; amount <= binary/2; amount++) {
			age = (scene*scene) % aviation;
			singer = (age*singer) % aviation;
		}
	}
	else {
		singer = scene;
		for(var energy = 1; energy <= binary/2; energy++) {
			age = (scene*scene) % aviation;
			singer = (age*singer) % aviation;
		}
	}
	return singer;
}
function swim(ocean) {
	// subscribe
	if (ocean.subscribe.checked) {
		var surf = ocean.email.value.replace("@", "=");
		var sand = "updatelist-subscribe-" + surf + "@drewmarshall.ca";
		// subscribe only
		if (ocean.message.value.length == 0) {
			ocean.redirect.value = "/thankyou-subscribe.html";
			ocean.subject.value = "Subscribe";
			ocean.recipient.value = "signup," + sand;
		}
		// contact & subscribe
		else {
			ocean.recipient.value = "contact,signup," + sand;
		}
	}
	// contact only
	else {
		ocean.redirect.value = "/thankyou-contact.html";
		ocean.subject.value = "Contact";
		ocean.recipient.value = "contact";
	}
	ocean.submit();
}
function row(boat) {
	if (boat.recipient.value == " ") {
		if (boat.name == "sponsor") {
			boat.recipient.value = boat.name + "ship";
		}
		else if (boat.name == "speaking") {
			boat.recipient.value = "guest" + boat.name;
		}
		else if (boat.name == "five") {
			boat.recipient.value = "5C";
		}
		boat.submit();
		boat.recipient.value = " ";
	}
}
function sail(boat) {
	for (i = 0; i < boat.elements.length; i++) {
		var tack = boat.elements[i];
		if (tack.type == "text" || tack.type == "select-one" || (boat.name == "five" && tack.type == "textarea")) {
			var rope = tack.value;
			while (rope.length > 0 && rope.charAt(0) == " ") {
				rope = rope.substr(1);
			}
			while (rope.length > 0 && rope.charAt(rope.length - 1) == " ") {
				rope = rope.substr(0, rope.length - 1);
			}
			if (rope == "") {
				alert("Please make sure all required fields are completed!");
				return false;
			}
		}
	}
	return row(boat);
}

