// from http://javascript.about.com/library/blufav.htm

function bookmark() {
	var s = document.getElementById('bookmark');
//  var t = document.createTextNode('text');
	var i = document.createElement('img');

	i.src = 'images/link-arrow.gif';

	if (window.sidebar) {			// Firefox and similar
//		s.appendChild(t);
		s.appendChild(i);
		s.style.cursor = 'pointer';
		s.onclick = function() {
			window.sidebar.addPanel(document.title,self.location,'');
			}
		}
	else if (window.external) {		// IE and similar
//		s.appendChild(t);
		s.appendChild(i);
		s.style.cursor = 'pointer';
		s.onclick = function() {
			window.external.AddFavorite(self.location,document.title);
			}
		}
	else if (window.opera) {		// Opera and similar
//		s.appendChild(t);
		s.appendChild(i);
		s.style.cursor = 'pointer';
		s.onclick = function() {
	    	var e = document.createElement('a');
	    	e.setAttribute('href',self.location);
        	e.setAttribute('title',document.title);
	    	e.setAttribute('rel','sidebar');
	    	e.click();
			}
		}
	}

function pageloaded(i) {
	if (document.getElementById && document.getElementById('bookmark') != null)
		bookmark();
	else if (!pageisloaded)
		setTimeout('pageloaded()',100);
		}

var pageisloaded = 0;

window.onload = function() {
	pageisloaded = 1;
	}

pageloaded();


