I am in the process of cleaning up my theme and my code-handicap has brought me here to ask this {stupid|simple|basic|n00b} question.

I am using the theme: Infrared | web2feel.com

which has a javascript code in the header. I want to know what is the purpose of this code and what would happen if I remove it.


Code:
<script type="text/javascript"><!--//--><![CDATA[//><!--
sfHover = function() {
    if (!document.getElementsByTagName) return false;
    var sfEls1 = document.getElementById("catmenu").getElementsByTagName("li");
    for (var i=0; i<sfEls1.length; i++) {
        sfEls1[i].onmouseover=function() {
            this.className+=" sfhover1";
        }
        sfEls1[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" sfhover1\\b"), "");
        }
    }
        var sfEls1 = document.getElementById("menu").getElementsByTagName("li");
    for (var i=0; i<sfEls1.length; i++) {
        sfEls1[i].onmouseover=function() {
            this.className+=" sfhover";
        }
        sfEls1[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
        }
    }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
//--><!]]></script>