{ //class SpreadMenu function SpreadMenu(posElement, numElement) { this.mo_menu = null; this.mo_shadow = null; this.ma_entities = new Array(); this.mo_posElement = posElement; this.mi_numElement = numElement; this.setMenuFrame(posElement, numElement); } SpreadMenu.prototype = { setMenuFrame: function(posElement, numElement) { try { this.closeMenu(); } catch(e) {} var pos = Element.cumulativeOffset(posElement); //if (navigator.appVersion.indexOf("MSIE 6") > -1) { pos[1] -= document.body.scrollTop; } // IE 6.0 //alert(document.body.scrollTop); this.mo_menu = document.createElement("DIV"); this.mo_menu.setAttribute("id", "spreadMenu"); this.mo_menu.style.position = "absolute"; this.mo_menu.style.left = pos[0] + "px"; this.mo_menu.style.top = (pos[1] - (22 * Math.floor(numElement / 2))) + "px"; this.mo_menu.style.width = "auto"; this.mo_menu.style.height = "auto"; this.mo_menu.style.border = "1px solid #C44977"; this.mo_menu.style.backgroundColor = "#FFFFFF"; this.mo_menu.style.fontSize = "12px"; this.mo_menu.style.color = "#676767"; this.mo_menu.style.fontFamily = "verdana, gulim"; this.mo_menu.style.zIndex = "1000"; document.body.appendChild(this.mo_menu); var thisElement = this; this.mo_menu.focus(); this.mo_menu.onblur = function() { thisElement.closeMenu(); } }, setEntities: function(entities) { var thisElement = this; for (var i=0; i0; i-=2) { this.mo_menu.appendChild(this.ma_entities[i]); } var btnSpread = document.createElement("DIV"); btnSpread.innerHTML = this.mo_posElement.innerHTML; btnSpread.style.clear = "both"; btnSpread.style.padding = "5px 5px 3px 5px"; btnSpread.style.backgroundColor = "#F1F1F1"; btnSpread.style.color = "#C44977"; btnSpread.style.cursor = "pointer"; try { btnSpread.lastChild.style.color = "#676767"; } catch(e) {} btnSpread.onclick = function() { thisElement.closeMenu(); } this.mo_menu.appendChild(btnSpread); for (var i=0; i -1) { pos[1] -= document.body.scrollTop; } // IE 6.0 this.mo_shadow.setAttribute("id", "spreadMenuShadow"); this.mo_shadow.style.zIndex = "999"; this.mo_shadow.style.filter = " progid:DXImageTransform.Microsoft.alpha(opacity=30) progid:DXImageTransform.Microsoft.Blur(pixelradius=4)"; this.mo_shadow.style.backgroundColor = "#C44977"; this.mo_shadow.style.position = "absolute"; this.mo_shadow.style.left = (pos[0] - 6) + "px"; this.mo_shadow.style.top = (pos[1] - 7) + "px"; this.mo_shadow.style.width = (Element.getWidth(this.mo_menu) + 4) + "px"; this.mo_shadow.style.height = (Element.getHeight(this.mo_menu) + 4) + "px"; document.body.appendChild(this.mo_shadow); }, setPosition: function(posLeft, posTop) { var pos = Element.cumulativeOffset(this.mo_menu); if (navigator.appVersion.indexOf("MSIE 6") > -1) { pos[1] -= document.body.scrollTop; } // IE 6.0 this.mo_menu.style.left = pos[0] + posLeft; this.mo_menu.style.top = pos[1] + posTop; }, closeMenu: function() { try { document.body.removeChild(document.getElementById("spreadMenuShadow")); } catch(e) {} try { document.body.removeChild(document.getElementById("spreadMenu")); } catch(e) {} } } }