  // This function assigns a style to the menu items in order to 
  // fix the drop-down lists for IE6, which don't support "li:hover"
  sfHover = function() {
    if (document.getElementById("nav") != null){
    	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
    	for (var i=0; i < sfEls.length; i++) {
    		sfEls[i].onmouseover=function() {
    			this.className+=" sfhover";
    		}
    		sfEls[i].onmouseout=function() {
    			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
    		}
    	}
    }
    if (document.getElementById("nav-side") != null){
    	var sfEls = document.getElementById("nav-side").getElementsByTagName("LI");
    	for (var i=0; i < sfEls.length; i++) {
    		sfEls[i].onmouseover=function() {
    			this.className+=" sfhover";
    		}
    		sfEls[i].onmouseout=function() {
    			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
    		}
    	}
    }    
  }
  if (window.attachEvent) window.attachEvent("onload", sfHover);
  
  
  
function padSubsequentLines(element){
    var words = element.innerHTML.split(' ');
    element.innerHTML = '';
    for (var i = 0; i < words.length; i++)
    {
        element.innerHTML += '<span>' + words[i] + '</span> ';
    }
    var spans = element.childNodes;
    var currentOffset = spans[0].offsetTop;
    var html = '<span class=line>';
    for (var i = 0; i < spans.length; i++)
    {
        if (spans[i].nodeType === 3)
            continue;
        if (spans[i].offsetTop > currentOffset)
        {     
            html += '</span><span class="line">';
            currentOffset = spans[i].offsetTop;
        }
       html += spans[i].innerHTML + ' ';
    }
    html += '</span>';
    element.innerHTML = html;
}
