// Collected site-wite scripts for Lifespan templates
function ls_site_init() {
    if (document.getElementById('queryForm')) {
        document.getElementById('queryForm').w.focus(); //search box in header
    }
}

if (window.attachEvent) {
    // IE compatibility for CSS hover
    sfHover = function() {
       var sfEls = document.getElementById("subnav").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"), "");
            }
       }
       window.attachEvent("onload", sfHover);
    }
    window.attachEvent("onload", ls_site_init);
}
else if (window.addEventListener) {
    window.addEventListener("load", ls_site_init, false);
}

function wopen(url, name, w, h)
{
// Fudge factors for window decoration space.
 // In my tests these work well on all platforms & browsers.
w += 32;
h += 96;
 var win = window.open(url,
  name, 
  'width=' + w + ', height=' + h + ', ' +
  'location=no, menubar=no, ' +
  'status=no, toolbar=no, scrollbars=no, resizable=no');
 win.resizeTo(w, h);
 win.focus();
}
