var isDOM=document.getElementById?1:0;
var isIE=document.all?1:0;
var isNS4=navigator.appName=='Netscape'&&!isDOM?1:0;
var hideTimer = null;
function getRef(id){
	return (isDOM ? document.getElementById(id) : 
	(isIE ? document.all[id] : document.layers[id]));}
function getSty(id){ 
  var ref = getRef(id);
  return isNS4 ? ref : ref.style;}
function showMenu(menuName){
	clearTimeout(hideTimer);
	for (var i = 0; i < menus.length; i++)
	{
		getSty(menus[i]).visibility = (menus[i]==menuName ? 'visible' : 'hidden');
		if (menus[i]==menuName){
		  if (isIE){
			document.getElementById(menuName).style.top=getPos(document.getElementById(menuName+'link')).y+11+'px';
		  } else {
				if (navigator.userAgent.indexOf("Firefox")!=-1){
				document.getElementById(menuName).style.top=getPos(document.getElementById(menuName+'link')).y+20+'px';
				} else {
				document.getElementById(menuName).style.top=getPos(document.getElementById(menuName+'link')).y+0+'px';
				}
			}
		}
		var div = getRef(menus[i]);
		if (!div.onmouseover){
			if (isNS4) div.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
				div.onmouseover = new Function('showMenu("' + menus[i] + '")');
				div.onmouseout = new Function('hideMenus()');}}}
function hideMenus(){
	hideTimer = setTimeout('showMenu()', 500);}

function imgover(imgname){
//imgname.src = "http://www.williamblair.com/images/dot.gif"
}
function imgout(imgname){
//imgname.src = "http://www.williamblair.com/images/shim.gif"
}

function getPos(inputElement) {
    var coords =  new Object();
    coords.x = 0;
    coords.y = 0;
    try {
        targetElement = inputElement;
        if(targetElement.x && targetElement.y) {
            coords.x = targetElement.x;
            coords.y = targetElement.y;
        } else {
            if(targetElement.offsetParent) {
                coords.x += targetElement.offsetLeft;
                coords.y += targetElement.offsetTop;
                while(targetElement = targetElement.offsetParent) {
                    coords.x += targetElement.offsetLeft;
                    coords.y += targetElement.offsetTop;
                }
            } else {
                //alert(\"Could not find any reference for coordinate positioning.\");
            }
        }
        return coords;
    } catch(error) {
        //alert(error.msg);
        return coords;
    }
}

function LeavingSiteAlert()
{
	window.alert('Attention:  You are exiting www.williamblair.com. \n\nInformation contained on the Internet is not\nsubject to William Blair & Company\’s control\nor review, and may not be accurate. For disclosure\ninformation, please visit www.williamblair.com.');
return true;
}
