<!-- Copyright 2000 William Bontrager
//
// This JavaScript will let you put a "bookmark me" instructional prompt
//      on your web pages. Because different browsers handle bookmarks
//      differently, the prompt can be different depending on the browser.
//      You can construct either a clickable link or a button when the
//      browser is IE. When the browser is Netscape, you can instruct the
//      visitor that the "Control" and "D" combination will bookmark the
//      page. You can specify a different text prompt when the browser is
//      neither Netscape nor IE. (Note: The IE versions we tested on
//      Macintosh does not act the same as IE versions on PC. Thus, the Mac
//      gets its own text prompt.)
//
// Customization of this JavaScript code is only two steps. Then, wherever
//      you want the bookmark prompt, use the example code presented in the
//      BODY section of this example web page.
//


// Step 1:
// Specify the text prompt for Macintosh and the different PC browsers.
TextPromptMacintosh = "<b>Use Command/Apple-D to bookmark this page.</b>";
TextPromptIE = "Bookmark !";
TextPromptNetscape = "<b>Use Control-D to bookmark this page.</b>";
TextPromptOther = "<b>Don't forget to bookmark us!</b>";


// Step 2:
// The PC IE prompt can be a link or a button; specify "yes" or "no" for each.
IElinkPrompt = "no";
IEbuttonPrompt = "yes";


// End of customization.


// PrintPrompt() determines which prompt is appropriate and writes it.
function PrintPrompt() {
if((navigator.userAgent.indexOf('Mac') != -1) && ((navigator.appName.indexOf('Netsca') != -1) || (navigator.appName.indexOf('Naviga') != -1) || (navigator.appName.indexOf('Micros') != -1))) {
	document.write(TextPromptMacintosh);
	return;
	}
if((navigator.appName.indexOf('Netsca') != -1) || (navigator.appName.indexOf('Naviga') != -1)) {
	document.write(TextPromptNetscape);
	return;
	}
if(navigator.appName.indexOf('Micros') != -1) {
	if((IElinkPrompt == 'yes') || (IEbuttonPrompt != 'yes')) { document.write('<a href="javascript:BookmarkIEonPC()">' + TextPromptIE + '</a>'); }
	if(IEbuttonPrompt == 'yes') { document.write('<form><input type="button" value="' + TextPromptIE + '" onClick="BookmarkIEonPC()"></form>'); }
	return;
	}
document.write(TextPromptOther);
}

// BookmarkIEonPC() launches IE's bookmark dialog box (on PC only).
function BookmarkIEonPC() {
if(navigator.appName.indexOf('Microsoft') != -1) { window.external.AddFavorite(location.href,document.title); }
}


//-->
