<!-- Copyright 2000 William Bontrager
// the guts of the email creation code came from William Bontrager
// in WillMaster Possibilities issue # 74 on December 19, 2000.
// See     http://willmaster.com/possibilities.         Thank you/

// Update the generated link form fields:
function UpdateLinks() {
if(document.aelgwase.addy.value.indexOf('@') == -1) {
	alert('Required:\nEmail "To:" Address\n\nFormat:\nname@domain.com');
	document.aelgwase.html.value = '';
	document.aelgwase.text.value = '';
	return false;
}
var s = UpdateHTML();
document.aelgwase.html.value = s;
s = UpdateText();
document.aelgwase.text.value = s;
return true;
}

// Generate the HTML link:
function UpdateHTML() {
var s = GenerateURL();
s = '<a href="' + s + '">';
document.aelgwase.anti.checked = true
if(document.aelgwase.link.value.search(/\w/) != -1) {
	var ss = document.aelgwase.link.value;
	if((ss.indexOf('@') > -1) && (document.aelgwase.anti.checked == true)) { ss = EncodeString(ss); }
	s = s + ss;
}
else { s = s + '[IMAGE]'; }
s = s + '</a>';
return s;
}

// Generate the text link:
function UpdateText() {
var s = GenerateURL();
return s;
}

// Generate the URL:
function GenerateURL() {
var s = document.aelgwase.addy.value.replace(/ /g,'');
s = 'mailto:' + s;
document.aelgwase.anti.checked = true
if(document.aelgwase.anti.checked == true) { s = EncodeString(s); }
var first = true;
if(document.aelgwase.cc.value.indexOf('@') > -1) {
	s = s + '?CC=';
	first = false;
	var ss = document.aelgwase.cc.value.replace(/ /g,'');
	ss = ss.replace(/\"/g,'%22');
document.aelgwase.anti.checked = true
	if(document.aelgwase.anti.checked == true) { ss = EncodeString(ss); }
	s = s + ss;
}
if(document.aelgwase.bcc.value.indexOf('@') > -1) {
	if(first == true) { s = s + '?BCC='; }
	else { s = s + '&BCC='; }
	first = false;
	var ss = document.aelgwase.bcc.value.replace(/ /g,'');
	ss = ss.replace(/\"/g,'%22');
document.aelgwase.anti.checked = true
	if(document.aelgwase.anti.checked == true) { ss = EncodeString(ss); }
	s = s + ss;
}
if(document.aelgwase.sub.value.search(/\w/) != -1) {
	if(first == true) { s = s + '?Subject='; }
	else { s = s + '&Subject='; }
	first = false;
	var ss = document.aelgwase.sub.value.replace(/\%/g,'%25');
	ss = ss.replace(/ /g,'%20');
	ss = ss.replace(/\"/g,'%22');
	ss = ss.replace(/\&/g,'');
	ss = ss.replace(/\;/g,'%3B');
	ss = ss.replace(/\=/g,'');
	ss = ss.replace(/\?/g,'');
	ss = ss.replace(/\+/g,'%2B');
	s = s + ss;
}
if(document.aelgwase.body.value.search(/\w/) != -1) {
	if(first == true) { s = s + '?body='; }
	else { s = s + '&body='; }
	first = false;
	var ss = document.aelgwase.body.value.replace(/\%/g,'%25');
	ss = ss.replace(/ /g,'%20');
	ss = ss.replace(/\"/g,'%22');
	ss = ss.replace(/\&/g,'');
	ss = ss.replace(/\;/g,'%3B');
	ss = ss.replace(/\=/g,'');
	ss = ss.replace(/\?/g,'');
	ss = ss.replace(/\+/g,'%2B');
	ss = ss.replace(/\n/g,'%0a%0a');
	ss = ss.replace(/\r/g,'%0d%09');
	s = s + ss;
}
return s;
}

// Encoded a string with the ISO-Latin-1 codeset:
function EncodeString(s) {
var ss = '';
for( i = 0; i < s.length; i++) {
	var fs = s.charCodeAt(i);
	ss = ss + '&#' + fs + ';';
}
return ss;
}

// Display the generated HTML code in a popup window:
function ExcelPortfolioTracker() {
var pDemo = window.open('','','height=200,width=400,scrollbars=no,resizable=no');
pDemo.document.writeln('<html><body bgcolor="green" onLoad="setTimeout(self.close, 10000)">');
pDemo.document.writeln('<TABLE WIDTH="100%" HEIGHT="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">');
pDemo.document.writeln('<TR><TD WIDTH="100%" HEIGHT="100%" ALIGN="CENTER" VALIGN="MIDDLE"><br><br><br>');
pDemo.document.writeln(document.aelgwase.html.value);
pDemo.document.writeln('</TD></TR></TABLE>');
pDemo.document.writeln('<\/body><\/html>');
pDemo.document.close();
}

//-->// <!-- 1738203446
// This script is (C) Copyright 2002 Jim Tucek
// Leave these comments alone!  For more info, visit
// www.jracademy.com/~jtucek/

function hang(grandfather,friendship,previous) {
grandfather += ' ';
var apartment = grandfather.length;
var squeeze = 0;
var squirrel = '';
for(var sand = 0; sand < apartment; sand++) {
squeeze = 0;
while(grandfather.charCodeAt(sand) != 32) {
squeeze = squeeze * 10;
squeeze = squeeze + grandfather.charCodeAt(sand)-48;
sand++;
}
squirrel += String.fromCharCode(shoe(squeeze,friendship,previous));
}
parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+squirrel;
}

function have(horse,way,song) {
horse += ' ';
var food = horse.length;
var notice = 0;
for(var crystal = 0; crystal < food; crystal++) {
notice = 0;
while(horse.charCodeAt(crystal) != 32) {
notice = notice * 10;
notice = notice + horse.charCodeAt(crystal)-48;
crystal++;
}
document.write('&');
document.write('#');
document.write(shoe(notice,way,song));
}
}

function shoe(energy,scene,hero) {
if (hero % 2 == 0) {
icon = 1;
for(var reason = 1; reason <= hero/2; reason++) {
pencil = (energy*energy) % scene;
icon = (pencil*icon) % scene;
}
} else {
icon = energy;
for(var object = 1; object <= hero/2; object++) {
pencil = (energy*energy) % scene;
icon = (pencil*icon) % scene;
}
}
return icon;
}
// -->