﻿
//function addFavorite()
//{
//var browser=navigator.appName;
//if (browser=="Microsoft Internet Explorer")   
//     // Add the document location and title to the AddFavorite window
//     external.AddFavorite(location.href, document.title)        
//else if (browser=="Netscape")
//     window.sidebar.addPanel(document.title, location.href,"")
//else
//     // Display alert box for any other browsers.
//     alert('Sorry, your browser does not support this feature.' +
//     '\nPlease use the bookmark feature of your browser to save the location of this page.')
//}

function addFavorite()
{
//test for MSIE x.x;
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent))      
     external.AddFavorite(location.href, document.title); // Add the document location and title to the AddFavorite window
     
//test for Firefox/x.x or Firefox x.x (ignoring remaining digits);        
else if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent))
     window.sidebar.addPanel(document.title, location.href,""); // Add the document location and title to the Bookmarks window
     
else
     // Display alert box for any other browsers.
     alert('Sorry, your browser does not support this feature.' +
     '\nPlease use the bookmark feature of your browser to save the location of this page.');
}