
function addFavorite()
{
	var IE = navigator.appName.match(/(Microsoft Internet Explorer)/gi),
		NS = navigator.appName.match(/(Netscape)/gi),
		OP = navigator.appName.match(/(Opera)/gi),
		FF = navigator.appName.match(/(Firefox)/gi);
		//BK = document.getElementById('bookmark')
		
		
		if (IE && document.uniqueID)
		{
			saveFavorite(location.href, document.title);		
		}
		
		else if(OP || IE && !document.uniqueID){
			showBrowserMessage("opera");
		}
		
		else if(NS){
			showBrowserMessage("netscape");
		}
		
		else if(FF){
			showBrowserMessage("firefox");
		}				
}


function saveFavorite(link, title)
{
	window.external.AddFavorite(link, title);
}


function showBrowserMessage(browser)
{
	switch (browser)
	{
		case "IE": alert("Bookmark added");	
		case "opera": alert("Please press CTRL+T to bookmark this page");
		case "firefox": alert("Please press CTRL+D to bookmark this page");
		case "netscape": alert("Netscape/Firefox users please press CTRL+D to bookmark this page");		
		default: "";
	}	
}