﻿function addLoadListener(fn)
{
 if (typeof window.addEventListener != 'undefined')
 {
 window.addEventListener('load', fn, false);
}
else if (typeof document.addEventListener != 'undefined')
{
document.addEventListener('load', fn, false);
 }
 else if (typeof window.attachEvent != 'undefined')
 {
 window.attachEvent('onload', fn);
}
 else
{
 return false;
}

return true;
};


//attachEventListener(window, "resize", checkBrowserWidth, false);

function attachEventListener(target, eventType, functionRef, capture)
{
 if (typeof target.addEventListener != "undefined")
{
 target.addEventListener(eventType, functionRef, capture);
 }
 else if (typeof target.attachEvent != "undefined")
 {
 target.attachEvent("on" + eventType, functionRef);
 }
 else
 {
 return false;
 }

 return true;
};

/*------------------------------------------------------------------------------------*/
/*function highlightRows() {
		
    if(!document.getElementsByTagName) return false;
    var rows = document.getElementsByTagName("dl");
    
     for (var i=0; i<rows.length; i++) {
            
                var answer = rows[i].getElementsByTagName("dd")
                rows[i].onmouseover = function(){
                answer.style.border = "1px solid red;";
                        
                   
                }
                //rows[i].onmouseout = function() {
                   // this.getElementsByTagName("dd").style.display = "none";
               // }
            
           
        }
    
  }
addLoadListener(highlightRows);*/

sfHover = function() {
	var sfEls = document.getElementById("main-content").getElementsByTagName("DL");
	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);

sethoverid = function() {
    var mc = document.getElementById("main-content")
    mc.className+=" has_script";
    
}
addLoadListener(sethoverid);
