/*
	www.darylbeattie.com JavaScript
	Copyright 2003/2004 Daryl Beattie.
*/

// Used to obfuscate e-mail address from web scouring programs.
var emailAddr = "daryl" + "@";
emailAddr += "darylbeattie" + ".com";

// From Index page.
var forumHTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ A place where you can chat, and a place where I post news. ]";
var musicHTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ Browse my music collection. ]";
var photoHTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ View my photo albums. ]";
var miscHTML  = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ See a variety of miscellaneous sites and other stuff. ]";
var emailHTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ E-mail me. ]";

// From Misc page.
var wishListHTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ A web application that allows many users to reserve wish-list items for each other secretly. ]";
var foos2002HTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ The official website of the 2002 InSystems Foosball Cup. ]";
var foos2003HTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ The official website of the 2003 InSystems Foosball Cup. ]";
var foos2004HTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ The official website of the 2004 InSystems Foosball Cup. ]";
var musicdbHTML  = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ The documentation site for a music database project I worked on. ]";
var wdhftsHTML   = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ A mailing list where people post interesting links. ]";
var usaorcaHTML  = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ A parody site that determines if you can visually distinguish North Americans. ]";
var id3HTML      = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ A program that allows you to edit MP3s' ID3 tags. ]";
var audiPartsHTML = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[ Some Audi parts I have for sale currently. ]";

/*
 * This function sets the content of the span (whose
 * id is passed to this function) to the string
 * parameter.
 *
 * id  - The Id of the SPAN whose content to set.
 * str - The string to set the content to.
 */
function display(id, str) {
	if (document.getElementById) {
		document.getElementById(id).innerHTML = str;
	}
	else {
		if (document.layers) {
			with (document[id].document) {
				open();
				write(str);
				close();
			}
		}
		else {
			document.all[id].innerHTML = str;
		}
	}
}

/*
 * This is basically here to try to hide my e-mail address
 * from web scouring programs.
 */
function doEmail() {
	location.replace("mailto:" + emailAddr);
}

/*
 * This is basically here to try to hide my e-mail address
 * from web scouring programs.
 */
function writeAddress() {
	document.open();
	document.write(emailAddr);
	document.close();
}
