// mastern.js by Matthew Arnold Stern
// Copyright © 2002--2003, Matthew Arnold Stern
//
// Release history
//
// 1.1  12-Aug-03	Added support for Support this Web Site button.
//
// 1.0	25-Apr-02	Initial release. Provides JavaScript for bookmark and
//			e-mail buttons.

var sendsubject = "Here is a page I thought would interest you."
var sendurl = window.location
var sendtitle = document.title
var sendmsg = "I found this page that I think you will enjoy. The title is:&nbsp;" +sendtitle+ ".&nbsp;The address is:&nbsp;" +sendurl+ ".&nbsp;For more information about speaking and writing, visit www.matthewarnoldstern.com.";

function btnCreateBookmark_onclick()
{
if (navigator.appName=="Microsoft Internet Explorer" && navigator.appVersion >= "4") { 
		window.external.AddFavorite(sendurl,sendtitle);
	}

	else if (navigator.appName=="Netscape") {
		alert("To create a bookmark for this site, click Bookmarks and then select Add Bookmark, or press Ctrl+D.");
		}

	else {
		alert("See your browser's online help for instructions on creating a bookmark.");
 		}
}

function btnTellFriend_onclick()
{
emailaddress=prompt("Type the e-mail address of the person with whom you want to share this page. A new e-mail message will open.");
window.location = "mailto:"+emailaddress+"?subject="+sendsubject+"&body="+sendmsg
}

function btnNewsletter_onclick()
{
	location.href="http://www.matthewarnoldstern.com/newsletter.html"
}

function btnSupportSite_onclick()
{
	location.href="http://www.matthewarnoldstern.com/sitesupport.html"
}