function changeBackground(A,B){A.style.backgroundImage=B?"url(/images/menu_item_bgrd_a.gif)":"url(/images/menu_item_bgrd.gif)";return true;};var isIE=(navigator.appName=='Microsoft Internet Explorer');function getOffset(a,b){var c=0;while (a!=null){c+=a['offset'+(b?'Left':'Top')];a=a.offsetParent;};return c;};function genElements(A,B){var C=B.coords.split(',');var D=C.length;if(D>3){var E=maxX=C[0];var F=maxY=C[1];for(var j=2;j<D;j+=2){E=Math.min(E,C[j]);maxX=Math.max(maxX,C[j]);};for(var j=3;j<D;j+=2){F=Math.min(F,C[j]);maxY=Math.max(maxY,C[j]);}};var G=document.createElement('div');G.style.left=(E+getOffset(A,true))+'px';G.style.top=(F+getOffset(A,false))+'px';G.style.width=(maxX-E)+'px';G.style.height=(maxY-F)+'px';G.style.position='absolute';G.style.cursor='pointer';G.style.backgroundColor='#f90';G.style.zIndex=100;if(isIE) G.style.filter='alpha(Opacity=0)';else     G.style.opacity='0';G.innerHTML='&nbsp;';document.body.appendChild(G);G.onclick=B.onclick=function(){location=B.href;};G.onmouseover=function(){if(isIE) G.style.filter='alpha(Opacity=30)';else     G.style.opacity='0.3';};G.onmouseout=function(){if(isIE) G.style.filter='alpha(Opacity=0)';else     G.style.opacity='0';};};function addScript(A,B,C){var D=document.getElementsByTagName("head")[0];var E=document.createElement("script");E.id=B;E.type="text/javascript";D.appendChild(E);E.src=A;if(typeof(C)=='function'){E.onload=E.onreadystatechange=function(){if(!this.readyState||this.readyState=="loaded"||this.readyState=="complete") C();}}};function getCookie(A){var B=A+'=';var C=B.length;var D=document.cookie.length;var E=sep=0;var F=false;while (!F){E=document.cookie.indexOf(B,E);if (E==-1) break;else{var G=E?document.cookie.charAt(E-1):';';if (G==';'||G==' '||G=='\n'){E+=C;sep=document.cookie.indexOf(';',E);if (sep==-1) sep=D;return document.cookie.substr(E,sep-E);}}};return null;};function setCookie(A,B,C,D,E,F){document.cookie=A+'='+escape(B)+((C)?'; expires='+C.toGMString():'')+((D)?'; path='+D:'')+((E)?'; domain='+E:'')+((F)?'; secure':'');};function closeTopBanner(){var A=document.getElementById('map_hint');if (A) A.parentNode.removeChild(A);setCookie('map_hint','closed',0,'/');};window.onload=function(){var A,id;var B=document.getElementsByTagName('IMG');for(var i=B.length-1;i>=0;i--){if(typeof(B[i].useMap)!='undefined'&&B[i].useMap.length){id=B[i].useMap.replace(/^#/g,'');A=document.getElementById(id);if(A){var C=A.childNodes;var D=C.length;for(var j=0;j<D;j++) if(C[j].tagName=='AREA') genElements(B[i],C[j]);}}};if (typeof(hasMap)!='undefined'&&hasMap){if (getCookie('map_hint')==null){var E=623;var F=document.createElement('DIV');F.style.position='absolute';F.id='map_hint';F.style.top='190px';F.style.left='10px';var G=document.body.clientWidth-244;F.style.width='200px';F.style.backgroundColor='#f90';var H=(Math.floor(Math.random()*1024)+1);F.innerHTML='<div style="font-size:11px;padding:2px;"><p align="right"><a style="color:white;font-weight:bold;" href="javascript:closeTopBanner()">Закрыть<\/a><div style="font-size:11px;background-color:#fff;padding:10px;margin-top:2px;">Для перехода по разделам книги воспользуйтесь интерактивным содержанием<\/div><\/div>';document.getElementById('main').appendChild(F);window.onresize=function(){var G=document.body.clientWidth-244;F.style.width=(G>E?G:E)+'px';}}}};
