function fav() {

/* Source of JS content is from http://javascript.about.com/library/blufav.htm
If the browser supports javascript and there is a div id of 'fav' a link will be displayed on the homepage */

var newT = document.createTextNode('Bookmark page');
var s = document.getElementById('fav');
var title = 'Tried & Tested';
var url = 'http://www.nutrientmanagement.org';

/* Firefox (and similar) browsers use window.sidebar.addPanel() to add the specified page into the bookmarks list that is available from the browser sidebar */
if (window.sidebar) {
s.appendChild(newT);
/*s.onclick = function() {window.sidebar.addPanel(document.title,self.location,'')};*/
s.onclick = function() {window.sidebar.addPanel(title,url,'')};
} 
/* Internet Explorer uses window.external.AddFavorite() to add the specified page to the Favourites menu. We therefore test for the browser supporting window.external in order to select those browsers that support this method.  */
else if (window.external) {
s.appendChild(newT);

/*s.onclick = function() {window.external.AddFavorite(self.location,document.title)};*/
s.onclick = function() {window.external.AddFavorite(url,title)};
} 

/* Latest versions of Opera */
	/*else if (window.opera) {
	s.appendChild(newT);
	
		s.onclick = function() {
		     var e = document.createElement('a');
		     e.setAttribute('href',self.location);
		     e.setAttribute('title',document.title);
		     e.setAttribute('href',url);
		     e.setAttribute('title',title);
		     e.setAttribute('rel','sidebar');
		     e.click();
		  }
	}*/
}//End funciton fav

var pageLoaded = 0;
window.onload = function() {pageLoaded = 1;}
function loaded(i,f) {
if (document.getElementById && document.getElementById(i) != null) f();
else if (!pageLoaded) setTimeout('loaded(\''+i+'\','+f+')',100);
}
loaded('fav',fav);