/*
---SYGNATURA-BEGIN---
Copyright: Internet Designers SA
Projekt: artnewmedia
Program: menu.js
Autor: Piotr Machura [pmac]
Utworzenie: 2003-01-07
Opis: Obiekt realizuje jednopoziomowe menu rozwijane. Działa pod IE5.0+, Netscape5+

Modyfikacja: 2003-02-18 [pmac] (Poprawione pozycjonowanie, Mozilla)
---SYGNATURA-END---

Identyfikatory warstw menu mają postać: prefix + numer warstwy (np. divMenu23)
Poszczególne warstwy są numerowane od 0.
*/
function Menu($a,$b,$z){var $a=$a;var $d="divMenu";var $b=$b;var $e=null;var $f=false;this.Show=function($g){if(!$f)return;var $h=document.getElementById($d+$g);$h.style.visibility="visible";};this.Enable=function(){var $i=parseInt(navigator.appVersion);if(navigator.appVersion.indexOf('5.')>-1){$i=5};if(navigator.appVersion.indexOf('6.')>-1){$i=6};if(navigator.appVersion.indexOf('7.')>-1){$i=7};var $j='';if(navigator.appName=='Netscape'){$j='NS';};if(navigator.appName=='Microsoft Internet Explorer'){$j='MSIE';};if(navigator.appVersion.indexOf('MSIE 3')>0){return;};if(($j=='')||($i<5))return;$f=true;$e=document.getElementById($z);this.Position();};this.Disable=function(){$f=false;};this.ShowAll=function(){for(var i=0;i<$a;i++)this.Show(i);};this.Position=function(){if(!$f)return;for(var i=0;i<$a;i++){var $h=document.getElementById($d+i);$h.style.pixelLeft=$b[i][0]+this.GetX($e);$h.style.left=$b[i][0]+this.GetX($e);$h.style.pixelTop=$b[i][1]+this.GetY($e);$h.style.top=$b[i][1]+this.GetY($e);}};this.Hide=function(){if(!$f)return;for(var i=0;i<$a;i++){var $h=document.getElementById($d+i);$h.style.visibility="hidden";}};this.GetX=function($k){var x=$k.offsetLeft;if($k.offsetParent.tagName!="BODY")x+=this.GetX($k.offsetParent);return x;};this.GetY=function($k){var y=$k.offsetTop;if($k.offsetParent.tagName!="BODY")y+=this.GetY($k.offsetParent);return y;}}


