function initLayer(){

	var top = 314;
	if(navigator.userAgent.indexOf("Macintosh") != -1)
		top = 311;

	document.write('<div onMouseOver=\"divOn()\" onMouseOut=\"toHideDiv(\'newProtocol\')\" id=\"newProtocol\" style=\"top: ' + top + 'px; left: 0;background-color: #517c9e; position:absolute; width:178px; height:120px; z-index:1; visibility:hidden\">');
	document.write('<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">');
	document.write('<tr><td>&nbsp;</td></tr>');
	document.write('<tr><td class=\"white\" style="padding-top: 5px; padding-bottom: 5px; padding-left: 23px"><strong><a href=\"/mdct/eng/protocols/research1.jsp?tr=1\">Listed by Body Region</a></strong></td></tr>');
	document.write('<tr><td class=\"white\" style="padding-top: 5px; padding-bottom: 5px; padding-left: 23px"><strong><a href=\"/mdct/eng/protocols/research1.jsp?tr=2\">Listed by Scanner Type</a></strong></td></tr>');
	document.write('<tr><td class=\"white\" style="padding-top: 5px; padding-bottom: 5px; padding-left: 23px"><strong><a href=\"/mdct/eng/protocols/research1.jsp?tr=3\">Listed by Manufacturer</a></strong></td></tr>');
	document.write('</table>');
	document.write('</div>');
}

function showDiv(d){

	divOn();
	
	shLeft = setLeft() + 681;
	document.getElementById(d).style.left = shLeft + "px";
	document.getElementById(d).style.visibility= "visible";
}

function toHideDiv(d){
	eval("npTimeout = setTimeout(\"hideDiv('" + d + "')\", 40);");
}

function hideDiv(d){
	document.getElementById(d).style.visibility = "hidden";
}

function divOn(){
	toType = typeof(npTimeout);
	if(toType != "undefined"){
		clearTimeout(npTimeout);
	}
}

function setLeft(){

            if(navigator.appName.indexOf("Netscape")!=-1){
                    if(window.innerWidth < 860)
                            return 0;
                    else if (navigator.userAgent.indexOf("Safari") != -1){
                            return ((window.innerWidth - 860)/2) + 1;
		    }else{
			    return ((window.innerWidth - 860)/2) - 7;
		    }
            }
            else{
                    if(window.innerWidth < 860)
                            return 0;
                    else
                            return ((document.body.offsetWidth - 860)/2) + 1;

            }
    }

