// Cascading Popup Menus v5.2 - Single Frame Menu example script.
var hBar = new ItemStyle(160, 0, '', 0, 4, '15#CCCCFF', '10#6699CC', 'highTextLight', 'highTextLight', '', '',
 null, null, 'hand', 'default');

// The 'sub Menu' items: these have popout indicators of "Greater Than" signs ">" 15px from their
// right edge, and CSS borders. Text class also changes on mouseover.
var subM = new ItemStyle(22, 0, '&gt;', -15, 3, '#CCCCFF', '#8DA0B8', 'lowTextLight', 'lowTextLight',
 'itemBorder', 'itemBorder', null, null, 'hand', 'default');

// 'subBlank' is similar, but has an 'off' border the same colour as its background so it
// appears borderless when dim, and 1px spacing between items to show the hover border.
//var subBlank = new ItemStyle(22, 1, '&gt;', -15, 3, '#CCCCDD', '#6699CC', 'lowText', 'highText',
// 'itemBorderBlank', 'itemBorder', null, null, 'hand', 'default');

// The purplish 'button' style also has 1px spacing to show up the fancy border, and it has
// different colours/text and less padding. They also have translucency set -- these items
// are 80% opaque when dim and 95% when highlighted. It uses the 'crosshair' cursor for items.
//var button = new ItemStyle(22, 1, '&gt;', -15, 2, '10#006633', '10#CC6600', 'buttonText', 'buttonHover',
// 'buttonBorder', 'buttonBorderOver', 80, 95, 'crosshair', 'default');


var isIE	= document.all;
var isIE6	= isIE && document.implementation;
var isIE5	= isIE && window.print && !isIE6;
var isIEDOM2	= isIE5 || isIE6;
var isIE4	= isIE && !isIEDOM2 && navigator.cookieEnabled;
var isIE3	= isIE && !isIE4 && !isIEDOM2;

var isNS	= navigator.mimeTypes && !isIE;
var isNS3	= isNS && !navigator.language;
var isNS4	= document.layers;
var isNS6	= document.getElementById && !isIE;
var isNS7	= isNS6;
var isNS71	= document.designMode;

var pMenu = new PopupMenu('pMenu');
with (pMenu)
{
startMenu('root', false, 'page.elmPos("xxx").x', 'page.elmPos("xxx").y-3', 23, hBar, '', false);
addItem('&nbsp; Home', 'Home.html', '', null, 85);
addItem('&nbsp; Produkte und Dienstleistungen', 'mProdukt', 'sm:', null, 265);
addItem('&nbsp; Kontakt', 'mKontakt', 'sm:', null, 80);
addItem('&nbsp; Ueber uns', 'mUeberuns', 'sm:', null, 90);
startMenu('mProdukt', true, 0, 24, 140, subM, '', false);
addItem('Elektro Engineering &amp;<br/>Anlagen Bau', 'data/Praesentation_2010.pdf#page=4', '', null, 38);
addItem('Elektro Installation', 'data/Praesentation_2010.pdf#page=3', '');
addItem('Bestellung', 'mBestellung', 'sm:');
startMenu('mBestellung', true, 140, 0, 90, subM, '', false);
addItem('Messkoffer', 'Bestellung_Messkoffer.html', '');
startMenu('mKontakt', true, 0, 24, 80, subM, '', false);
addItem('Lageplan', 'Lageplan.html', '');
addItem('Formular', 'mFormular', 'sm:');
startMenu('mFormular', true, 80, 0, 80, subM, '', false);
addItem('Mitteilung', 'Mitteilung.html', '');
startMenu('mUeberuns', true, 0, 24, 90, subM, '', false);
addItem('Mitarbeiter', 'Mitarbeiter.html', '');
}

// ******************** FUNCTIONS CALLED BY THE EFFECTS SECTION ********************

page.elmPos=function(e,p)
{
 var x=0,y=0,w=p?p:this.win;
 e=e?(e.substr?(isNS4?w.document.anchors[e]:getRef(e,w)):e):p;
 if(isNS4){if(e&&(e!=p)){x=e.x;y=e.y};if(p){x+=p.pageX;y+=p.pageY}}
 if (e && this.MS && navigator.platform.indexOf('Mac')>-1 && e.tagName=='A')
 {
  e.onfocus = new Function('with(event){self.tmpX=clientX-offsetX;' +
   'self.tmpY=clientY-offsetY}');
  e.focus();x=tmpX;y=tmpY;e.blur()
 }
 else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent}
 return{x:x,y:y};
};


