// JScript File

// Page Init
pageInit = function() {
	var sfNavLi = document.getElementById("navigation").getElementsByTagName("LI");
	for (var i=0; i < sfNavLi.length; i++) {
		sfNavLi[i].onmouseover = function() {
			this.className += " sfhover";
		}
		sfNavLi[i].onmouseout = function() {
			this.className = this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
	var sfInput = document.getElementsByTagName("input");
	for (var i=0; i < sfInput.length; i++) {
		sfInput[i].onfocus=function() {
			this.className += " sffocus";
		}
		sfInput[i].onblur = function() {
			this.className = this.className.replace(new RegExp(" sffocus\\b"), "");
		}
	}
	var sfTextarea = document.getElementsByTagName("textarea");
	for (var i=0; i < sfTextarea.length; i++) {
		sfTextarea[i].onfocus=function() {
			this.className += " sffocus";
		}
		sfTextarea[i].onblur = function() {
			this.className = this.className.replace(new RegExp(" sffocus\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", pageInit);

// Content Page Font Resizer
function fontResize(size) {
    var litContent = document.getElementById("litContent");
    switch (size) {
        case "normal":
            litContent.style.fontSize = "1em";
            break;
        case "medium":
            litContent.style.fontSize = "1.2em";
            break;
        case "large":
            litContent.style.fontSize = "1.4em";
            break;
    }
}

// Bookmark
function bookmarkpage(bookmarkUrl){
    var bookmarkTitle = document.title;
    
    if (window.sidebar) { // Mozilla Firefox Bookmark
        window.sidebar.addPanel(bookmarkTitle,bookmarkUrl,"");
        
    } else if (window.external) { // IE Favorite
        window.external.AddFavorite(bookmarkUrl,bookmarkTitle);
        
    } else if (window.opera && window.print) { // Opera Hotlist
        var elem = document.getElementById('menu_bookmark');
        elem.setAttribute('href',bookmarkUrl);
        elem.setAttribute('title',bookmarkTitle);
        elem.setAttribute('rel','sidebar');
        elem.click();
    }
}