var br="";if($.browser.msie&&$.browser.version<7){br="ie6"}var mapMaker={offsetX:-16,offsetY:16,element:false,DLs:false,DTs:false,on:false,init:function(){var i=0;var ii=0;var currentLocation=0;mapMaker.DLs=document.getElementsByTagName("dl");mapMaker.DTs=document.getElementsByTagName("dt");if(mapMaker.on==false){while(mapMaker.DLs.length>i){if(mapMaker.DLs[i].className=="map"){mapMaker.DLs[i].className="map on";mapMaker.stripWhitespace(mapMaker.DLs[i]);mapMaker.stripWhitespace(mapMaker.DTs[i]);while(mapMaker.DTs.length>ii){currentLocation=mapMaker.DTs[ii].firstChild;mapMaker.addEvt(currentLocation,"mouseover",mapMaker.showTooltip);mapMaker.addEvt(currentLocation,"mouseout",mapMaker.hideTooltip);mapMaker.addEvt(currentLocation,"mouseover",mapMaker.showItem);mapMaker.addEvt(currentLocation,"mouseout",mapMaker.hideItem);mapMaker.addEvt(currentLocation,"focus",mapMaker.showTooltip);mapMaker.addEvt(currentLocation,"blur",mapMaker.hideTooltip);ii++}ii=0}i++}mapMaker.on=true}},showTooltip:function(){var evt=this;var i=0;var objid=evt.parentNode.nextSibling;mapMaker.element=objid;var mapWidth=objid.parentNode.offsetWidth;var mapHeight=objid.parentNode.offsetHeight;var toopTipWidth=objid.offsetWidth;var toopTipHeight=objid.offsetHeight;var newX=evt.offsetLeft+mapMaker.offsetX;var newY=evt.offsetTop+mapMaker.offsetY;newX=10;newY=420;if((newX+toopTipWidth)>mapWidth){}if((newY+toopTipHeight)>mapHeight){}objid.style.left=newX+"px";objid.style.top=newY+"px";$("#map dd").hide();objid.style.display="block"},hideTooltip:function(){if($("#"+mapMaker.element.id).length>0){mapMaker.element.style.display="none"}},showItem:function(){var evt=this;var objid=evt.id;itemId=objid+"_listItem";$("#"+containerID+" li").removeClass("activeAlways");$("#"+itemId).addClass("active");if(br!="ie6"){$("#"+objid+"_line").show()}},hideItem:function(){var evt=this;var objid=evt.id;itemId=objid+"_listItem";$("#"+containerID+" li").removeClass("active");if(br!="ie6"){$("#"+objid+"_line").hide()}},addEvt:function(element,type,handler){if(!handler.$$guid){handler.$$guid=mapMaker.addEvt.guid++}if(!element.events){element.events={}}var handlers=element.events[type];if(!handlers){handlers=element.events[type]={};if(element["on"+type]){handlers[0]=element["on"+type]}}handlers[handler.$$guid]=handler;element["on"+type]=mapMaker.handleEvent},handleEvent:function(event){var returnValue=true;event=event||mapMaker.fixEvent(window.event);var handlers=this.events[event.type];for(var i in handlers){this.$$handleEvent=handlers[i];if(this.$$handleEvent(event)===false){returnValue=false}}return returnValue},fixEvent:function(event){event.preventDefault=mapMaker.fixEvent.preventDefault;event.stopPropagation=mapMaker.fixEvent.stopPropagation;return event},stripWhitespace:function(el){for(var i=0;i<el.childNodes.length;i++){var node=el.childNodes[i];if(node.nodeType==3&&!/\S/.test(node.nodeValue)){node.parentNode.removeChild(node)}}}};mapMaker.fixEvent.preventDefault=function(){this.returnValue=false};mapMaker.fixEvent.stopPropagation=function(){this.cancelBubble=true};mapMaker.addEvt.guid=1;jQuery(document).ready(initMap);function initMap(){containerID="anatomyList_";liSelector="#anatomyList_ li";if($("#"+containerID).length){$("#"+containerID).delegate("li","mouseover",function(event){pointId=this.id.replace("_listItem","");$("#"+this.id).toggleClass("active");var cssObj={backgroundImage:"url(../img/map/pre_circle.gif)",backgroundRepeat:"no-repeat",width:"16px",height:"16px"};$("#"+pointId).css(cssObj);if(br!="ie6"){$("#"+pointId+"_line").show()}});$("#"+containerID).delegate("li","mouseout",function(event){pointId=this.id.replace("_listItem","");$("#"+this.id).toggleClass("active");$("#"+pointId).css("backgroundImage","none");$("#"+pointId+"_line").hide()});$("#"+containerID).delegate("li","click",function(event){pointId=this.id.replace("_listItem","");$(liSelector).removeClass("activeAlways");$("#"+this.id).toggleClass("activeAlways");var cssObj={backgroundImage:"url(../img/map/pre_circle.gif)",backgroundRepeat:"no-repeat",width:"16px",height:"10px"};$("#"+pointId).css(cssObj);$("#map dd").hide();if(br!="ie6"){$("#"+pointId+"_line").show()}var overlayerVersion=1;if(overlayerVersion==1){$("#explicatie-"+pointId).show()}else{$("a#details_"+pointId).colorbox({transition:"fade",innerWidth:"900px",initialHeight:"800px"}).resize()}})}if($("#map").length){mapMaker.init()}};
