function nl2br( str ) {
    // http://kevin.vanzonneveld.net
    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // *     example 1: nl2br('Kevin\nvan\nZonneveld');
    // *     returns 1: 'Kevin<br/>van<br/>Zonneveld'
 
    return str.replace(/([^>])\n/g, '$1<br/>');
}

function print_r(theObj){
  if(theObj.constructor == Array ||
     theObj.constructor == Object){
    document.write("<ul>")
    for(var p in theObj){
      if(theObj[p].constructor == Array||
         theObj[p].constructor == Object){
document.write("<li>["+p+"] => "+typeof(theObj)+"</li>");
        document.write("<ul>")
        print_r(theObj[p]);
        document.write("</ul>")
      } else {
document.write("<li>["+p+"] => "+theObj[p]+"</li>");
      }
    }
    document.write("</ul>")
  }
}



sfHover = function() {

	var sfEls = document.getElementById("header").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);



