//ICMap, Copyright 2006, clifford L. Collins, Collins Software, all rights reserved, http://collinssoftware.com, not for distribution or resale, use License is required: icmenu var $main; var ICON_ROOT="images/icons/"; function onSwitchMenu() { var xitem; xitem=event.srcElement; $main.switchMenu(xitem); } function onHighlight() { var xitem; xitem=event.srcElement; $main.highlight(xitem); } function ic$menu() { var text; var obj; var ss; $main=this; ss=document.createStyleSheet() ss.addRule(".menucontainer",'position: absolute; top:; left: 0; width:400; height:24; font-family: Arial; font-size: 10pt; background-color: #cfcfCF; border: "1 solid"; '+' border-top-color: #CFCFCF; border-left-color: #CFCFCF; border-right-color: #505050; border-bottom-color: #505050; z-index: 200;'); ss.addRule(".menucontainer2",'position: absolute; top:1; left: 300; width:200; height:22; font-family: Arial; font-size: 10pt; background-color: #cfcfCF; border:"0 solid"; z-index:330;'); ss.addRule(".menulabel1",'position: absolute; cursor: hand; padding:1; color:black; text-align: left; background-color: #CFcfcf; z-index: 300'); ss.addRule(".menulabel2",'position: absolute; cursor: hand; padding:1; color:black; text-align: left; background-color: #CFCFCF; border: "1 solid grove"; border-color:gray; z-index: 320;'); ss.addRule(".menuitem1",'cursor: hand; padding:1; color:black; text-align: left; background-color: #CFcfcf; z-index: 300'); ss.addRule(".menuitem2",'cursor: hand; padding:1; color:white; text-align: left; background-color:navy; z-index: 320;'); ss.addRule(".menugroup",'display: none; padding-top: 0px; padding-bottom: 0px; padding-left: 0px; position: absolute; top: 0; left: 0; width: 140; font-family: Arial; font-size: 10pt; background-color:#cfcfcf; border: "0 solid"; border-top-color: #CFCFCF; border-left-color: #CFCFCF; border-right-color: #505050; border-bottom-color: #505050; z-index: 320;'); this.preMenu=document.createElement('
'); document.body.appendChild(this.preMenu); this.preMenu.style.width=document.body.clientWidth-2; this.preMenu.style.top=0; this.preMenu.style.left=600; this.mainMenu=document.createElement(''); document.body.appendChild(this.mainMenu); this.mainMenu.style.width=document.body.clientWidth-2; this.mainMenu.style.top=0; this.groupCount=0; this.itemCount=0; this.subCount=0; this.imageCount=0; this.ipos=0; this.mpos=5; this.activeMenu=""; this.activeGroup=""; this.activeItem=''; this.activeSubmenu=''; this.isMenuOpen=false; this.zbase=parseInt(this.mainMenu.currentStyle.zIndex); this.ng=0; this.groupStack=new Array(); this.addGroup=$557; this.addItem=$563; this.addItemRadio=$563Radio; this.addItemCheckbox=$563Checkbox; this.addSubmenu=$564; this.endSubmenu=$565; this.addSeperator=$569; this.addTransparent=$560; this.addLevelButtons=$559; this.addImage=$561; this.addRadio=$562; this.switchMenu=$555; this.highlight=$556; this.position=$570; this.align=$558; this.hide=$571; this.show=$572; this.pushGroup=$566; } function $555(xitem) { var checked; var action; if(xitem.component=="menuTransparent")return; if(xitem.component=="menuLevelButtons")return; if(xitem.component=="menulabel1") { if((this.activeMenu !=xitem)&&(this.activeMenu)) { this.activeGroup=eval("group"+this.activeMenu.groupid); this.activeGroup.style.display="none"; this.activeMenu.menustatus="closed"; this.activeMenu.className="menulabel1"; } this.activeMenu=xitem; this.activeGroup=eval("group"+xitem.groupid); if(this.activeMenu.menustatus=="closed") { this.activeMenu.menustatus="open"; this.activeMenu.className="menulabel2"; this.activeGroup.style.display="block"; if(! this.isMenuOpen) { this.isMenuOpen=true; this.mainMenu.setCapture(); } } else { this.isMenuOpen=false; this.mainMenu.releaseCapture(); this.activeMenu.menustatus="closed"; this.activeGroup.style.display="none"; } return; } if(xitem.component=="menuitem") { this.mainMenu.releaseCapture(); this.activeMenu.click(); this.activeMenu.className="menulabel1"; xitm=eval("Item"+this.itemCount); if(xitem.menuaction)eval( xitem.menuaction); return; } if(xitem.component=="menuitemradio") { this.mainMenu.releaseCapture(); this.activeMenu.click(); this.activeMenu.className="menulabel1"; xitem.className="menuitem1"; xitm=eval('itemRadio'+xitem.itemid); xitm.checked=true; if(xitem.menuaction)window.eval(xitem.menuaction); return; } if(xitem.component=="menuradio") { this.mainMenu.releaseCapture(); this.activeMenu.click(); this.activeMenu.className="menulabel1"; xitem.className="menuitem1"; xitem.checked=true; xitm=eval('Item'+xitem.itemid); if(xitm.menuaction)eval( xitm.menuaction); return; } if(xitem.component=="menuitemcheckbox") { this.mainMenu.releaseCapture(); this.activeMenu.click(); this.activeMenu.className="menulabel1"; xitem.className="menuitem1"; return; } if(xitem.component=="menucheckbox") { this.mainMenu.releaseCapture(); this.activeMenu.click(); this.activeMenu.className="menulabel1"; xitem.checked=!xitem.checked; xitm=eval('Item'+xitem.itemid); xitm.className="menuitem1"; if(xitm.menuaction) { action=xitm.menuaction.replace("this.checked",xitem.checked); eval( action); } return; } if(! xitem.component) { if(this.isMenuOpen==true){ this.activeMenu.className="menulabel1"; this.mainMenu.releaseCapture(); this.activeMenu.click(); event.returnValue=false; } } } function $556(xitem) { var submenu; try { if(xitem.component=="menuTransparent")return; if(xitem.component=="menuLevelButtons")return; if((event.clientX >0)&&(event.clientY >0)&&(event.clientX