LEFTPOS = 0; // Fixe Positition von links in Pixel BOTTOMPOS = 0; // Position von unten in Pixel BARHEIGHT = 0; MINTOPPOS = 50; // Mindesabstand von oben in Pixel REFRESHINTERVAL = 100; // REFRESHINTERVAL in mms //Settings fuer Extra Layer TIMEDELAY = 2000; //Time in mms after that the layer disappears LAYERNAME = 'servicio'; //Layer an dessen Position der extra Layer ausgerichtet werden soll EXTRALAYERNAME = 'servicio_info'; DIFX =12;// horizontale verschiebung des extra Layers zum LAYERNAME Layer DIFY = -104; // verticale verschiebung des extra Layers zum LAYERNAME Layer switchOffService =0; //Voreinstellung fuer den zusaetzlichen Layer (muss immer 0 sein!) //Layer positionieren function setPos(layerToSet){ //alert('in setPos'); with(layerToSet.style) { display="block"; visibility="visible"; position="absolute"; left= LEFTPOS; top = getNewTop(); } } // Intervall initialisieren, indem der Layer positioniert werden soll function startPos (layerName){ //setPos(layerToSet); layerToSet = document.getElementById(layerName); layerPosControl = window.setInterval("setPos(layerToSet)",REFRESHINTERVAL); } // Richtigen Position berechnen function getNewTop(){ if (document.all){ height = document.body.offsetHeight; } if (!document.all){ height = window.innerHeight; } //newHeight = height - BOTTOMPOS - BARHEIGHT; //newTopPos = newHeight + document.body.scrollTop; //if (newTopPos > newHeight) newTopPos = newHeight; newTopPos = height - 280 + document.body.scrollTop; return newTopPos; } //============ START Zusaetzlichen Layer darstellen function mouseOnService(layerName){ if (switchOffService!=0)clearSwitchOffService(); if (document.getElementById(layerName)) { layerToShow = document.getElementById(layerName); with (layerToShow.style){ top = getYPos(); right = getXPos(); visibility="visible"; } } } function mouseOffService(layerName){ newLayerName = layerName; switchOffService = window.setTimeout("closeService(newLayerName)",TIMEDELAY); } function clearSwitchOffService(){ window.clearTimeout(switchOffService); switchOffService =0; } function closeService(layerName){ if (document.getElementById(layerName)) { document.getElementById(layerName).style.visibility="hidden"; } } function getXPos(){ rightPos = RIGHTPOS + DIFX; return rightPos; } function getYPos(){ topPos = getNewTop()+ DIFY; return topPos; } //============ ENDE Zusaetzlichen Layer darstellen