function bookmarkUrl() { 
    if (window.external)
    {
        window.external.AddFavorite(document.URL, document.title);
    }
}
function emailUrl()
{
    var sSubject = "Check this site out: ";
    sSubject += document.title;
        
    var sBody = "Here's a great site you might be interested in: ";
    sBody += document.title;
    sBody += String.fromCharCode(13) + String.fromCharCode(13);
    sBody += "URL: " + document.URL;
        
    var sUrl = "mailto:?Subject=" + escape(sSubject);
    sUrl += "&Body=" + escape(sBody);
        
    location.href = sUrl;
}

function createMailTo(name, address, subject, link)
{
	document.write("<a href='mailto:" + name + "@" + address + "?subject=" + subject + "'>" + link + "</a>");
}
	
function setYear()
{ 
	document.write(new Date().getFullYear()); 
}

// mailing list code
function submitForms() {
	if (isEmail())
		if (confirm("\n You are about to e-mail your submission to The Walleyes' mailing list! \n\nYES to submit.    NO to abort."))
		{
			alert("\nYour submission will now be sent. \n\n\n Thank you for joining The Walleyes's mailing list!");
			return true;
		}
		else
		{
			alert("\n You have chosen to abort the submission.");
			return false
		}
	else 
		return false;
}
function isEmail() {
	if (document.forms[0].elements[2].value == "") {
		alert ("\n The email field is blank. \n\n Please enter your email address.")
		document.forms[0].elements[2].focus();
		return false;
	}
	if (document.forms[0].elements[2].value.indexOf ('@',0) == -1 ||
		document.forms[0].elements[2].value.indexOf ('.',0) == -1) {
		alert ("\n The email field requires a \"@\" and a \".\" be used. \n\nPlease re-enter your email address.")
		document.forms[0].elements[2].select();
		document.forms[0].elements[2].focus();
		return false;
	}
	return true;
}
