1//--------------------------------------------------------------------------------------------------------- 2//Menu Class Object 3//--------------------------------------------------------------------------------------------------------- 4 5var zIndex=1000; 6function CreateMenuClass(){ 7 return new clsMenu(); 8} 9 10function clsMenu(){ 11 this.Name=""; 12 this.RootName=""; 13 this.hv="|"; 14 this.ItemCount=0; 15 this.MenuClass=""; 16 this.ItemSeparatorClass=""; 17 this.sHTML=""; 18 this.bIsFirst=true; 19 this.CreateMenu=CreateMenu; 20 this.CreateSubMenu=CreateSubMenu; 21 this.OpenSubMenu=OpenSubMenu; 22 this.AddItem=AddItem; 23 this.MakeItemSeparator=MakeItemSeparator; 24 this.WrapMenu=WrapMenu; 25 this.CloseMenu=CloseMenu; 26 this.CloseSubMenu=CloseSubMenu; 27 this.ExpanderArrow="V"; 28 this.AbsolutePosition=false; 29 this.Attributes=""; 30 31 if(navigator.userAgent.toLowerCase().indexOf("touch")>0)this.Attributes+=" aria-haspopup='true' "; 32} 33 34function CreateMenu(sName,sDirection,sClass,sExpanderArrow,sItemSeparatorClass){ 35 this.Name=sName; 36 this.RootName=sName; 37 this.hv=sDirection; 38 this.MenuClass=sClass; 39 this.ItemSeparatorClass=sItemSeparatorClass; 40 this.ExpanderArrow=sExpanderArrow; 41 42 43 if((!this.AbsolutePosition)&&(this.hv=="|")){var sWidth=" width=\"100%\" "}else{var sWidth=""} 44 45 if(this.AbsolutePosition){var sAbs="position:absolute;top:0px;left:0px;visibility:hidden;"}else{var sAbs=""} 46 47 this.sHTML+="<table "+this.Attributes+sWidth+" onselectstart=\"return false\" class=\""+ this.MenuClass +"\" style=\"border-collapse:separate;"+sAbs+"\" hv=\""+ 48 sDirection +"\" id="+ sName +" rid="+ this.RootName +" onmousemove=\"pw.doClearHideTimer('"+ sName +"')\" onmouseout=\"pw.doSetHideTimer('"+ sName +"')\" border=0 cellPadding=0 cellSpacing=0>\n"; 49 if(this.hv=="-"){ 50 this.sHTML+="<tr><td><table width=\"100%\" onselectstart=\"return false\" class=\""+ this.MenuClass +"\" style=\"border-collapse:separate;margin:0px;padding:0px;border:0px;background:none;\" border=0 cellPadding=0 cellSpacing=0><tr>\n"; 51 } 52} 53 54function CreateSubMenu(sDirection,sLink,sTitle,sClass,sItemClass,sItemClassOver,sItemSeparatorClass,sID){ 55 var sText=""; 56 sText=sTitle; 57 zIndex+=1; 58 59 sName=this.Name + "_" + zIndex; 60 if(!sID)sID="it"+sName; 61 62 if (this.hv=="|"){ 63 //--- expander arrow vertical 64 if (this.ExpanderArrow.indexOf("V")>-1){ 65 if (this.ExpanderArrow.indexOf("C")>-1) { 66 sText="<img class=mnuArrowV width=12 height=12 border=0 align=right src=\"/fw/_icons/pt.gif\">"+ sText; 67 }else{ 68 sText="<img width=10 height=10 border=0 style=\"margin-left:0px;margin-top:2px;padding:0px;\" align=right src=\"/fw/_icons/ico_arrow_right_small.gif\">"+ sText; 69 } 70 } 71 }else{ 72 //--- expander arrow horizontal 73 if (this.ExpanderArrow.indexOf("H")>-1) { 74 if (this.ExpanderArrow.indexOf("C")>-1) { 75 sText=sText +" <img class=mnuArrowH width=12 height=12 border=0 align=absmiddle src=\"/fw/_icons/pt.gif\">"; 76 }else{ 77 sText=sText +" <img width=10 height=10 border=0 align=absmiddle src=\"/fw/_icons/ico_arrow_down_small.gif\">"; 78 } 79 } 80 } 81 82 this.AddItem(sLink,sText,sItemClass,sItemClassOver,sID,sName); 83 84 var rCreateSubMenu=new clsMenu(); 85 rCreateSubMenu.ExpanderArrow=this.ExpanderArrow; 86 rCreateSubMenu.ItemSeparatorClass=sItemSeparatorClass; 87 rCreateSubMenu.OpenSubMenu(sName,this.RootName,sDirection,sClass); 88 return rCreateSubMenu; 89} 90 91function DisableLink(){ 92 return false; 93} 94 95function OpenSubMenu(sName,sRootName,sDirection,sClass){ 96 this.hv=sDirection; 97 this.Name=sName; 98 this.RootName=sRootName; 99 this.sHTML+="<table "+this.Attributes+" width=150 id="+ this.Name +" hv=\""+ this.hv +"\" rid="+ this.RootName +" class=\""+ sClass +"\" border=0 cellPadding=0 cellSpacing=0 style=\"z-index:"+ 100 zIndex +";position:absolute;top:0px;left:0px;visibility:hidden;border-collapse:separate;\" "+ 101 " onmousemove=\"pw.doClearHideTimer('"+ this.Name +"')\" onmouseout=\"pw.doSetHideTimer('"+ this.Name +"')\" >\n"; 102 if(this.hv=="-") {this.sHTML+="<tr>\n"} 103} 104 105function AddItem(sLink,sTitle,sClass,sClassOver,sID,sSubName){ 106 107 var sTarget=""; 108 var aLink=sLink.split("^*^");sLink=aLink[0];if(aLink.length>1){sTarget=" target=\""+aLink[1]+"\" "} else {if(document.all) sTarget=" target=\"_parent\" "}; 109 if(sID){var strID=" id="+sID+" "}else{var strID=""} 110 if(!sSubName)sSubName=""; 111 var sText=sTitle;
112 this.ItemCount+=1; 113 this.MakeItemSeparator(this.ItemSeparatorClass); 114 if(this.hv=="|") {this.sHTML+="<tr"+strID+">\n";strID="";} 115 if(sSubName){var MobileClick="pw.doEnableLink('"+sID+"',false);"}else{var MobileClick=""} 116 117 if(sLink.indexOf("onclick:")==0){ 118 this.sHTML+="<td"+this.Attributes+strID+" mid="+ this.Name +" onmouseover=\"pw.doMouseOverItem(this,'"+ sClassOver +"','"+ sSubName +"')\" class=\""+ sClass +"\" style=\"cursor:pointer\" onClick=\"pw."+ sLink.substr(8) +"\">"+ sText +"</td>\n"; 119 }else{ 120 this.sHTML+="<td"+this.Attributes+strID+" mid="+ this.Name +" onmouseover=\""+MobileClick+"pw.doMouseOverItem(this,'"+ sClassOver +"','"+ sSubName +"')\" class=\""+ sClass +"\"><a href=\""+ sLink +"\" "+sTarget+"><div>"+ sText +"</div></a></td>\n"; 121 } 122 if(this.hv=="|") {this.sHTML+="</tr>\n"} 123} 124 125//default separator 126function MakeItemSeparator(sClass,sID){ 127 if(sID){sID=" id="+sID+" "}else{sID=""} 128 129 //make default item separator 130 if(!this.bIsFirst) { 131 if(this.hv=="-") { 132 this.sHTML+="<td"+sID+" height=100% valign=middle class=\""+ sClass +"\" style=\"margin:0px;padding:0px;border:0px;\"><img style=\"display:none;\" width=\"1\" height=\"100%\" alt=\"\" src=\"/fw/_icons/pt.gif\"></td>"; 133 }else{ 134 this.sHTML+="<tr"+sID+" class=\""+ sClass +"\" style=\"margin:0px;padding:0px;border:0px;\"><td align=center><img style=\"display:none;\" width=\"100%\" height=\"1\" alt=\"\" src=\"/fw/_icons/pt.gif\"></td></tr>"; 135 } 136 }else{ 137 this.bIsFirst=false; 138 } 139} 140 141function WrapMenu(){ 142 if(this.hv=="-") { 143 this.sHTML+="</tr></table><table width=\"100%\" onselectstart=\"return false\" class=\""+ this.MenuClass +"\" style=\"border-collapse:separate;margin:0px;padding:0px;border:0px;background:none;\" border=0 cellPadding=0 cellSpacing=0><tr>\n"; 144 this.bIsFirst=true; 145 } 146} 147 148function CloseMenu(){ 149 if(this.hv=="-") {this.sHTML+="</tr></table></td></tr>\n"} 150 this.sHTML +="</table>\n"; 151 return this.sHTML; 152} 153 154function CloseSubMenu(){ 155 if(this.hv=="-") {this.sHTML+="</tr>\n"} 156 this.sHTML+="</table>\n"; 157 return this.sHTML; 158}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.