String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}

//Bookmarks

function addBookmark(title, url) {
        if (window.sidebar) { // firefox
              window.sidebar.addPanel(title, url,"");
        } else if( document.all ) { //MSIE
                window.external.AddFavorite( url, title);
        } else {
               alert("Sorry, your browser doesn't support this");
        }
}
menuLi = function() {
	var sfEls = document.getElementById("header").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" menuLiOver";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" menuLiOver\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", menuLi);