/*--------------Clare's Javascript Library-----------------------*/
/*--------------Created 24th May 2007 ---------------------------*/

//Add Event Listener - Cross browser adding of onload events

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("ul");
    for (var i=0; i<rows.length; i++) {
        //if(rows.getAttribute){
           var relAttribute =rows[i].className;
            if (relAttribute.toLowerCase().match('hover')){
                
                rows[i].onmouseover = function() {
                    this.style.backgroundImage = "url(../images/generic/secondary_content.gif)";
                }
                rows[i].onmouseout = function() {
                    this.style.backgroundImage = "none";
                }
            }
            
        //}
    }
  }
addLoadListener(highlightRows);
