动态多层菜单

其实这个应该不算.NET方面的东西,只是个asp+js的,而且代码的来源是COOLMENU( http://www.dhtmlcentral.com)只是自己完全研究了一下,并准备在下步的工作中,在asp.net中实现它,可能已经有了这方面好的东西了,如果有,希望大家告诉一下,谢谢先

最终效果:
menu.gif

核心代码
1 js包含文件
None.gif function  makePageCoords(win,fr){
None.gif    
if ( ! win) win = window
None.gif    
this .x = 0 ; this .x2 = (bw.ns4  ||  bw.ns6) ? win.innerWidth - 1 :win.document.body.offsetWidth;
None.gif    
if ( ! fr && bw.ie)  this .x2 -= 20 ;  else   if ( ! fr && bw.ns4)  this .x2 -= 4 ;  else   if (bw.ns6)  this .x2 += 1
None.gif    
this .y = 0 ; this .y2 = (bw.ns4  ||  bw.ns6) ? win.innerHeight:win.document.body.offsetHeight;
None.gif    
if (bw.ns4 &&! win.rows)  this .x2 += 5 ;  if ( ! fr && bw.ie)  this .y2 -= 4 ;  else   if (bw.ns4 && fr)  this .y2 += 4
None.gif    
this .y2orig = this .y2;  this .x50 = this .x2 / 2 ;  this .y50 = this .y2 / 2 ;  return   this ;
None.gif}
None.gif
/* ************
None.gifDebugging function
None.gif**************
*/
None.gif
function  debug(txt,ev){ if (mDebugging == 2 ) self.status = txt;  else  alert(txt);  if (ev) eval(ev);  return   false }
None.gif
/* ***********
None.gifScroll function
None.gif************
*/
None.gif
function  cm_checkScrolled(obj){
None.gif    
if (bw.ns4  ||  bw.ns6) obj.scrolledY = obj.win.pageYOffset
None.gif    
else  obj.scrolledY = obj.win.document.body.scrollTop
None.gif    
if (obj.scrolledY != obj.lastScrolled){
None.gif        
if ( ! obj.useframes){
None.gif            
for (i = 0 ;i < obj.l[ 0 ].num;i ++ ){ var  sobj = obj.l[ 0 ].o[i].oBorder; sobj.moveY(sobj.y + (obj.scrolledY - obj.lastScrolled))}
None.gif            
if (obj.usebar) obj.oBar.moveY(obj.oBar.y + (obj.scrolledY - obj.lastScrolled))
None.gif        }
None.gif        obj.lastScrolled
= obj.scrolledY; page.y = obj.scrolledY; page.y2 = page.y2orig + obj.scrolledY
None.gif        
if ( ! obj.useframes  ||  bw.ie){ clearTimeout(obj.tim); obj.isover = 0 ; obj.hideSubs( 1 , 0 )}
None.gif    }
if ((bw.ns4  ||  bw.ns6)  &&   ! obj.useframes) setTimeout( " cm_checkScrolled( " + obj.name + " ) " , 200 )
None.gif}
None.gif
/* **********************
None.gifChecking if the values are % or not.
None.gif**************
*/
None.gif
function  cm_checkp(num,w,check,istop,ds){
None.gif    
if (num){  var  p = istop ? toppage:page
None.gif        
if (num.toString().indexOf( " % " ) !=- 1 ){ if (w  ||  (check  &&   this .rows)) num = (p.x2 * parseFloat(num) / 100 )
None.gif        
else  num = (p.y2 * parseFloat(num) / 100 )
None.gif        }
else  num = eval(num)
None.gif    }
else  num = 0 ;  return  num
None.gif}
None.gif
/* ***********
None.gifMaking DIV objects + DIV objects code
None.gif************
*/
None.gif
function  cm_makeObj(obj,name,level,win,nest,o){
None.gif    
if (o && (bw.ns4 || bw.ns6))  this .evnt = o
None.gif    
else   this .evnt = bw.dom ? win.document.getElementById(obj):bw.ie4 ? win.document.all[obj]:bw.ns4 ? nest ? win.document[nest].document[obj]:win.document[obj]: 0 ;
None.gif    
if ( ! this .evnt)  return  debug('There seems to be an error  with   this  layer:\nFrame: ' + win + '\nLayer: ' + nest  +   " . "   +  obj)
None.gif  
this .ref = bw.dom ? document: this .evnt.document;  this .css = bw.ns4 ? this .evnt: this .evnt.style
None.gif  
this .w = this .evnt.offsetWidth || this .css.clip.width || this .ref.width || this .css.pixelWidth || 0 ; 
None.gif  
this .h = this .evnt.offsetHeight || this .css.clip.height || this .ref.height || this .css.pixelHeight || 0
None.gif    
this .css = bw.dom || bw.ie4 ? this .evnt.style:bw.ns4 ? this .evnt: 0 ;     this .ref = bw.dom  ||  bw.ie4 ? win.document:bw.ns4 ? this .css.document: 0 ;
None.gif    
this .hideIt = cm_hideIt;  this .showIt = cm_showIt;  this .writeIt = cm_writeIt;  this .setactive = cm_setactive;  this .addEvents = cm_addEvents; 
None.gif    
this .moveIt = cm_moveIt;  this .clipTo = cm_clipTo;  if (name)  this .parent = name;  this .moveY = cm_moveY;  this .l = level;  this .clipOut = cm_clipOut; 
None.gif    
this .filterIt = cm_filterIt;  this .slide = cm_slide;  this .obj  =  obj  +   " Object " ;     eval( this .obj  +   " =this " );  this .tim = 10 ;  this .clipy = 0 ;  return   this
None.gif}
None.gif
function  cm_writeIt(text){ if ( ! this .img1){ if (bw.ns4){ this .ref.write(text);
None.gif
this .ref.close()} else   this .evnt.innerHTML = text}};  function  cm_moveY(y){ this .y = y;  this .css.top = y}
None.gif
function  cm_moveIt(x,y){ this .x = x;  this .y = y;  this .css.left = this .x; this .css.top = this .y}
None.gif
function  cm_showIt(){ this .css.visibility = " visible " ;  this .vis = 1 };  function  cm_hideIt(){ this .css.visibility = " hidden " ;  this .vis = 0 }
None.gif
function  cm_clipOut(px,w,ystop,tim,name){
None.gif    
if ( ! this .vis)  return ;  if ( this .clipy < ystop - px){ this .clipy += px;  this .clipTo( 0 ,w, this .clipy, 0 , 1 )
None.gif        
this .tim = setTimeout( this .obj + " .clipOut( " + px + " , " + w + " , " + ystop + " , " + tim + " ,' " + name + " ') " ,tim)
None.gif    }
else { if (bw.ns6){ this .hideIt();};  this .clipTo( 0 ,w,ystop, 0 , 1 );  if (bw.ns6){ this .showIt()}}
None.gif}
None.gif
function  cm_slide(end,px,tim,w,h){
None.gif    
if ( ! this .vis)  return ;
None.gif    
if ( this .y < end - px){
None.gif        
if ( this .y > (end - px * px - px)  &&  px > 1 ) px -= px / 5 ;  this .moveIt( this .x, this .y + px)
None.gif        
this .clipTo(end - this .y, this .width, this .height, 0 )
None.gif        
this .tim = setTimeout( this .obj + " .slide( " + end + " , " + px + " , " + tim + " , " + w + " , " + h + " ) " ,tim)
None.gif    }
else { this .clipTo( 0 , this .width, this .height, 0 );  this .moveIt( this .x,end)}
None.gif}
None.gif
function  cm_filterIt(f){ if ( this .evnt.filters[ 0 ])  this .evnt.filters[ 0 ].Stop();  else   this .css.filter = f;  this .evnt.filters[ 0 ].Apply();  this .showIt();  this .evnt.filters[ 0 ].Play();}
None.gif
function  cm_setactive(on,name,frmmouse){
None.gif    
if ( ! name) name = this .name;  var  tobj = this .parent.m[name]
None.gif    
if (tobj.img){ if (tobj.img2){ if (on)  this .ref.images[tobj.img].src = tobj.img2;  else   this .ref.images[tobj.img].src = tobj.img1}
None.gif    }
else {
None.gif        
if (on){ var  color = tobj.c2;  var  fcolor = tobj.c4;  var  re = tobj.c3} else { var  color = tobj.c1;  var  fcolor = tobj.c3;  var  re = tobj.c4}
None.gif        
if (color){ if (bw.dom  ||  bw.ie4)  this .css.backgroundColor = color;  else   if (bw.ns4)  if (color == " transparent " ) color = null ;  this .css.bgColor = color}
None.gif        
if (fcolor  &&   ! bw.ns4){ if (bw.ie4)  this .evnt.style.color = fcolor;  else   if ( this .evnt.childNodes[ 0 ])  this .evnt.style.color = fcolor
None.gif        }
else   if (fcolor && frmmouse){t = this .parent.m[name].text; t = t.replace(re,fcolor);  this .writeIt(t);  if (on)  this .addEvents(name, this .parent.name,tobj.lnk, this .parent.useclick)}
None.gif        
if (tobj.l == 0 && bw.ns6){ this .parent.l[ 0 ].o[tobj.num].oBorder.hideIt();  this .parent.l[ 0 ].o[tobj.num].oBorder.showIt();}  // Stupid fix for netscape 6dot.gif.
None.gif
    }
None.gif}
None.gif
function  cm_clipTo(t,r,b,l,w){ if (bw.ns4){ this .css.clip.top = t; this .css.clip.right = r;  this .css.clip.bottom = b; this .css.clip.left = l
None.gif}
else { this .css.clip = " rect( " + t + " , " + r + " , " + b + " , " + l + " ) " ;  if (w){ this .css.width = r;  this .css.height = b}};  this .width = r;  this .height = b}
None.gif
function  cm_addEvents(n,name,url,useclick){
None.gif    
this .evnt.onmouseover = new  Function(name + " .mover(' " + n + " ') " ); 
None.gif    
this .evnt.onmouseout = new  Function(name + " .mmout(' " + n + " ') " )
None.gif    
if ( ! url  &&  useclick) ev = new  Function(name + " .mover(' " + n + " ',1) " )
None.gif    
else  ev = new  Function(name + " .go(' " + n + " ') " )
None.gif    
if (bw.ns4){ this .ref.captureEvents(Event.MOUSEDOWN);  this .ref.onmousedown = ev}
None.gif    
else   this .evnt.onclick = ev
None.gif}
None.gif
/* ***********
None.gifMaking menu object
None.gif************
*/
None.gif
function  cm_makeMenu(name,parent,text,link,target,width,height,img1,img2,bgcoloroff,bgcoloron,textcolor,hovercolor,onclick,onmouseover,onmouseout){
None.gif    
this .m[name] = new  Object();  var  obj = this .m[name]; obj.name = name;    obj.subs = new  Array(); obj.parent = parent;  var  tt
None.gif    obj.lnk
= (link == 0 || link == '') ? "" :link; obj.target = target
None.gif    
if (parent != ""   &&  parent){ this .m[parent].subs[ this .m[parent].subs.length] = name; l = this .m[parent].l + 1 }  else  l = 0
None.gif    obj.l
= l; prop1 = l < this .level.length ? this .level[l]: this .level[ this .level.length - 1 ]; prop2 = this .level[ 0 ]
None.gif    
if ( this .l.length <= l){
None.gif        
this .l[l] = new  Object();  this .l[l].num = 0 ;  if (l == 0 )  this .l[l].names = new  Array()
None.gif        
this .l[l].slide = prop1[ " slide " ] || prop2[ " slide " ] || 0 ;
None.gif        
this .l[l].clip = prop1[ " clip " ] || prop2[ " clip " ] || 0 ;  this .l[l].clippx = prop1[ " clippx " ] || prop2[ " clippx " ] || 0
None.gif        
this .l[l].cliptim = prop1[ " cliptim " ] || prop2[ " cliptim " ] || 0 ;  this .l[l].filter = prop1[ " filter " ] || prop2[ " filter " ] || 0
None.gif        
this .l[l].border = prop1[ " border " ] || prop2[ " border " ];  this .l[l].maxnum = 0
None.gif        
this .l[l].bordercolor = prop1[ " bordercolor " ] || prop2[ " bordercolor " ];
None.gif        s
= prop1[ " align " ] || prop2[ " align " ];  if (s == " left " ) s = 1 ;  else   if (s == " right " ) s = 0 ; 
None.gif        
else   if (s == " top " ) s = 3 ;  else   if (s == " bottom " ) s = 2 ;  this .l[l].align = s;  this .aobj[l] =- 1 ;
None.gif        
this .l[l].height = prop1[ " height " ] || prop2[ " height " ];  this .l[l].width = prop1[ " width " ] || prop2[ " width " ];
None.gif        
this .l[l].style = prop1[ " style " ] || prop2[ " style " ];  this .l[l].tc = textcolor || prop1.textcolor || prop2.textcolor; 
None.gif        
this .l[l].offsetX = String(prop1[ " offsetX " ]) != " undefined " ? prop1[ " offsetX " ]:prop2[ " offsetX " ]
None.gif        
this .l[l].offsetY = String(prop1[ " offsetY " ]) != " undefined " ? prop1[ " offsetY " ]:prop2[ " offsetY " ]
None.gif    }
if (l == 0 )  this .l[l].names[ this .l[l].names.length] = name
None.gif    
if (parent != ""   &&  parent){obj.num = this .m[parent].subs.length - 1 } else  obj.num = this .l[l].num
None.gif    
this .l[l].num ++ ; prop = l < this .level.length ? this .level[l]: this .level[ this .level.length - 1 ]
None.gif    obj.width
= this .checkp(width ? width:prop1.width ? prop1.width:prop2.width, 1 , 0 , 1 );
None.gif    obj.height
= this .checkp(height ? height:prop1.height ? prop1.height:prop2.height, 0 , 0 , 1 );
None.gif    
if (parent != ""   &&  parent){ if ( this .m[parent].subs.length > this .l[l].maxnum)  this .l[l].maxnum = this .m[parent].subs.length 
None.gif        
if ( this .m[parent].totheight == 0 )  this .m[parent].totheight = this .l[l].border
None.gif        
this .m[parent].totheight += obj.height +   this .l[l].border
None.gif        
if ( this .m[parent].maxwidth < obj.width)  this .m[parent].maxwidth = obj.width + this .l[l].border * 2
None.gif    }
else { this .l[l].maxnum = this .l[l].names.length;  this .totwidth += obj.width;  this .totheight += obj.height
None.gif        
this .maxwidth = this .maxwidth > obj.width ? this .maxwidth:obj.width;  this .maxheight = this .maxheight > obj.height ? this .maxwidth:obj.height
None.gif    }
if (img1) text = ' < img src = " '+img1+' "  border = " 0 "  name = " imgCMenu'+name+' " > '
None.gif    
else   if (bw.ns4){text = ' < font size = " '+(prop1.NS4fontSize||prop2.NS4fontSize)+' "  face = " '+(prop1.NS4font||prop2.NS4font)+' "  color = " '+(textcolor||this.l[l].tc)+' " > ' + text + ' </ font > '}
None.gif    
if (bw.ns4 && this .useNS4links && (l == 0 ||! this .useframes)  || (l == 0 && img1)){tt = img1 && l == 0 ? this .useclick ? this .name + " .mover(' " + name + " ',1); " : this .name + " .go(' " + name + " '); " : "" ;text = ' < a href = " # "  onclick = " '+tt+'return false "  class = " clNS4 " > ' + text + ' </ a > '}
None.gif    
if (img1){obj.preimg1 = new  Image(); obj.preimg1.src = img1};  if (img2){obj.preimg2 = new  Image(); obj.preimg2.src = img2}
None.gif    
if (img2) obj.img = " imgCMenu " + name;  else  obj.img = 0 ; obj.img1 = img1 || "" ; obj.img2 = img2 || "" ; obj.text = text; obj.subx =- 1 ;
None.gif    obj.c1
= bgcoloroff || prop1.bgcoloroff || prop2.bgcoloroff; obj.c2 = bgcoloron || prop1.bgcoloron || prop2.bgcoloron;
None.gif    obj.c3
= textcolor || this .l[l].tc; obj.c4 = hovercolor || prop1.hovercolor || prop2.hovercolor;  obj.suby =- 1 ;
None.gif    obj.mclick
= onclick || "" ; obj.mover = onmouseover || "" ; obj.mout = onmouseout || "" ;    obj.totheight = 0 ; obj.maxwidth = 0 ; 
None.gif}
None.gif
/* ***********
None.gifOnmouseout
None.gif************
*/
None.gif
function  cm_mout(name,cl){
None.gif    
if ( ! name && cl &&! this .isover){ this .isclicked = 0 ;  this .hideSubs( 1 , 0 , 0 , 0 , 1 );   this .aobj[ 0 ] =- 1 ;  return }
None.gif    
if ( ! name)  return ;  var  l = this .m[name].l;
None.gif    
if (( this .m[name].subs.length == 0 ||! this .loaded) || ( this .useclick &&! this .isclicked)){ if (( this .aobj[l + 1 ] ==- 1 || l >= this .l.length - 1 ) && this .aobj[l] !=- 1 ){ this .aobj[l].setactive( 0 , 0 , 1 );  this .aobj[l] =- 1 ;}}
None.gif    
if ( this .m[name].mout != "" ) eval( this .m[name].mout)
None.gif    
if ( this .useclick){ this .isover = 0 ;  return }; clearTimeout( this .tim); 
None.gif    
if ( ! ( ! bw.ie && this .useframes && l == 0 && this .aobj1)){  this .isover = 0 ;  this .aobj1 = 0 ;  this .tim = setTimeout( this .name + " .hideSubs(1,0,0,0,1) " , this .wait)} 
None.gif}
None.gif
/* ***********
None.gifOnmouseover
None.gif************
*/
None.gif
function  cm_mover(name,cl){
None.gif    clearTimeout(
this .tim);  this .isover = 1 ;  var  l = this .m[name].l;
None.gif    
if ( this .aobj[l].name == name){
None.gif        
if ( this .aobj[l + 1 ] !=- 1   &&  l < this .l.length - 1 ){
None.gif            
this .aobj[l + 1 ].setactive( 0 , 0 , 1 );  this .aobj[l + 1 ] =- 1 ;  this .hideSubs(l + 2 , 1 );  return
None.gif        }
else   if (( ! this .useclick) || ( this .useclick && this .isclicked))  return
None.gif    }
if ( this .m[name].mover != "" ) eval( this .m[name].mover)
None.gif    
var  num = this .m[name].num;  var  obj = this .l[l].o[num]
None.gif    
if ( this .aobj[l].name != name){ if ( this .aobj[l] !=- 1 )  this .aobj[l].setactive( 0 , 0 , 1 );  this .aobj[l] = obj;  this .aobj[l].name = name; obj.setactive( 1 , 0 , 1 )}
None.gif    
if (l == 1 ) this .aobj1 = 1 ;  if (l == 0   &&  cl  &&   this .useclick)  this .isclicked = 1 ; 
None.gif    
if ( ! this .isclicked && this .useclick)  return ;  if ( ! this .loaded)  return ;
None.gif    
this .showSubs(name,l,num,cl)
None.gif}
None.gif
/* ***********
None.gifHiding subelements
None.gif************
*/
None.gif
function  cm_hideSubs(l,system,cl,sys2,hc){
None.gif    
if ( this .isover  &&   ! system)  return
None.gif    
if (l == 1   &&   this .aobj[ 0 ] !=- 1 &&! sys2){ this .aobj[ 0 ].setactive( 0 , 0 , 1 ); this .aobj[ 0 ] =- 1 }
None.gif    
if ( ! this .loaded)  return ;  if (cl == 1 )  return
None.gif    
for (i = l;i < this .l.length;i ++ ){ if ( this .l[i].oBorder.vis == 0 )  break ;  this .l[i].oBorder.hideIt();  this .aobj[i] =- 1 ;}
None.gif    
if (hc && this .hcode){eval( this .hcode);  this .hcode = "" }
None.gif}
None.gif
/* ***********
None.gifGet x/y coords. Only the first time :)
None.gif************
*/
None.gif
function  cm_getCoords(name,l,num,topalign,align,ln,border,cn,lev1b){
None.gif    
if (cn == 5 ){  this .m[name].subx = 0 ;  this .m[name].suby = 0 ;  return  } // Just in case infinitive loops
None.gif
     if (l == 1 )  var  pobj = this .l[l - 1 ].o[num].oBorder
None.gif    
else   var  pobj = this .l[l - 1 ].oBorder
None.gif    
var  x = pobj.x;  var  y = pobj.y;
None.gif    
if (l != 1 ){y += this .l[l - 1 ].o[num].y}
None.gif    pborder
= this .l[l - 1 ].border; 
None.gif    lx
= x + pobj.width; rx = x - this .m[name].maxwidth -  ( this .l[l - 1 ].offsetX * 2 )
None.gif    
if (align == 0 ){ if (l == 1 ){y += border}  if (l == 1 && this .useframes) x = 0 ;  else  x = lx
None.gif    }
else   if (align == 1 ){x = rx;  if (l == 1 ){ if ( this .useframes) x = page.x2  -   this .m[name].maxwidth; y += border}}
None.gif    
if ((align == 2 || topalign == 2 ) && lev1b != 3 ){
None.gif        
if (l != 1   &&  (align != 1 && align != 0 )){ if (topalign == 1 ) x = rx;  else  x = lx}
None.gif        
if (l == 1 )  if ( this .useframes) y = 0 ;  else  y += this .m[name].height + border + pborder;
None.gif    }
if ((align == 3 || topalign == 3 ) && lev1b != 2 ){
None.gif        
if (l != 1 && align != 1 && align != 0 ){ if (topalign == 1 ) x = rx;  else  x = lx}
None.gif        
if ( this .useframes && l == 1 ) y = page.y2  -   this .m[name].totheight  -   this .l[l - 1 ].offsetY * 2
None.gif        
else  y -= this .m[name].totheight  -   this .l[l].offsetY * 2 ;  if (l != 1 || lev1b == 3 ) y += this .m[name].height
None.gif    }
this .m[name].scrollY = this .lastScrolled;  this .m[name].subx = x + this .l[l - 1 ].offsetX; 
None.gif    
this .m[name].suby = y + this .l[l - 1 ].offsetY;  if ( this .useframes && l == 1 && align != 3 )  this .m[name].suby += this .lastScrolled
None.gif    
if ( this .pagecheck && (l != 1 ||! this .useframes))  this .checkPage(name,l,num,topalign,align,ln,border,cn)
None.gif}
None.gif
/* ***********
None.gifChecking page coords
None.gif************
*/
None.gif
function  cm_checkPage(name,l,num,topalign,align,ln,border,cn){
None.gif    cn
++ ; 
None.gif    
if ( this .m[name].subx + this .m[name].maxwidth > page.x2){
None.gif        
if (align != 1 ){ if (align == 3 && topalign != 0 ) topalign = 3 ; align = 1 ;  this .getCoords(name,l,num,topalign,align,ln,border,cn)}
None.gif    }
else   if ( this .m[name].subx < page.x){
None.gif        
if (align != 0 ){ if (align == 3 ) topalign = 3 ; align = 0 ;  this .getCoords(name,l,num,topalign,align,ln,border,cn)}
None.gif    }
else   if (( this .m[name].suby + this .m[name].totheight) > page.y2){
None.gif        
if (l == 1 ){topalign = 3 ;  this .getCoords(name,l,num,topalign,align,ln,border,cn, 3 )}
None.gif        
else   if (align != 3 ){ align = 3 ;  this .getCoords(name,l,num,topalign,align,ln,border,cn)}
None.gif    }
else   if ( this .m[name].suby < page.y){
None.gif        
if (l == 1 ){topalign = 2 ;  this .getCoords(name,l,num,topalign,align,ln,border,cn, 2 )}
None.gif        
else   if (align != 2 ){align = 2 ;  this .getCoords(name,l,num,topalign,align,ln,border,cn)}
None.gif    }
None.gif}
None.gif
/* ***********
None.gifShowing subelements
None.gif************
*/
None.gif
function  cm_showSubs(name,l,num,cl){
None.gif    l
+= 1 ;  if (l >= this .l.length)  return ; ln = this .m[name].subs.length
None.gif    
if (ln == 0 ){ this .hideSubs(l, 1 , 0 , 1 );  return }
None.gif    
else   this .hideSubs(l + 1 , 1 );  var  border = this .l[l].border;  this .aobj[l] =- 1
None.gif    
if ( this .useframes && (bw.ns4 || bw.ns6)) cm_checkScrolled( this )
None.gif    
if (( this .m[name].subx ==- 1   ||   this .m[name].suby ==- 1 )  ||   this .m[name].scrollY != this .lastScrolled  ||   this .isresized){
None.gif        
var  topalign = this .l[ 0 ].align;  var  align = this .l[l - 1 ].align; 
None.gif        
this .getCoords(name,l,num,topalign,align,ln,border, 0 )
None.gif    }
var  x = this .m[name].subx;  var  y = this .m[name].suby;
None.gif    
var  bobj = this .l[l].oBorder; bobj.hideIt(); 
None.gif
None.gif    
if ( this .l[l - 1 ].clip &&! ( this .l[l - 1 ].filter && bw.filter)){
None.gif        clearTimeout(bobj.tim); bobj.clipy
= 0 ; bobj.clipTo( 0 , this .m[name].maxwidth, 0 , 0 ); bobj.moveIt(x,y); 
None.gif    }
else   if ( this .l[l - 1 ].slide &&! ( this .l[l - 1 ].filter && bw.filter)){
None.gif        clearTimeout(bobj.tim); bobj.clipTo(
0 , this .m[name].maxwidth, this .m[name].totheight, 0 , 1 )
None.gif        bobj.moveIt(x,y
- this .m[name].totheight)
None.gif    }
else {
None.gif        bobj.clipTo(
0 , this .m[name].maxwidth, this .m[name].totheight, 0 , 1 )
None.gif        bobj.moveIt(x,y); 
None.gif    }
None.gif    
var  yy = border
None.gif    
for (i = 0 ;i < this .l[l].maxnum;i ++ ){
None.gif        
var  obj = this .l[l].o[i]
None.gif        
if (i < ln){
None.gif            
var  n = this .m[name].subs[i]; obj.aname = n;  if ( ! bw.ns4 ||! this .NS4hover) obj.writeIt( this .m[n].text)
None.gif            obj.addEvents(n,
this .name, this .m[n].lnk, this .useclick);  var  w = this .m[n].width;  var  h = this .m[n].height
None.gif            
if (obj.y != yy) obj.moveY(yy); yy += h + border;  if ( ! obj.img) obj.setactive( 0 ,n, 1 ); 
None.gif            
if (obj.width != w || obj.height != h) obj.clipTo( 0 ,w,h, 0 , 1 ); obj.css.visibility = " inherit "
None.gif        }
else  obj.hideIt()
None.gif    }
if ( this .l[l - 1 ].filter && bw.filter) bobj.filterIt( this .l[l - 1 ].filter)
None.gif    
else   if ( this .l[l - 1 ].clip){bobj.showIt(); bobj.clipOut( this .l[l - 1 ].clippx, this .m[name].maxwidth, this .m[name].totheight, this .l[l - 1 ].cliptim,name);}
None.gif    
else   if ( this .l[l - 1 ].slide){bobj.showIt(); bobj.slide(y, 15 , 30 , this .m[name].maxwidth, this .m[name].totheight)}
None.gif    
else  bobj.showIt(); 
None.gif    
if ( ! bw.ns4 && this .checkselect){  // CHECKING FOR SELECT BOXES
None.gif
         for (i = 0 ;i < this .sel.length;i ++ ){
None.gif            selx
= 0 ; sely = 0 ;  var  selp;
None.gif            
if ( this .sel[i].offsetParent){selp = this .sel[i];  while (selp.offsetParent){selp = selp.offsetParent; selx += selp.offsetLeft; sely += selp.offsetTop;}}
None.gif            selx
+= this .sel[i].offsetLeft; sely += this .sel[i].offsetTop
None.gif            selw
= this .sel[i].offsetWidth; selh = this .sel[i].offsetHeight
None.gif            
if (((selx + selw) > this .m[name].subx  &&  selx < ( this .m[name].subx + this .m[name].maxwidth))
None.gif            
&& ((sely + selh) > this .m[name].suby  &&  sely < ( this .m[name].suby + this .m[name].totheight))){
None.gif                
if ( this .sel[i].style.visibility != " hidden " ){ this .sel[i].level = l;  this .sel[i].style.visibility = " hidden " ;  this .hcode += this .name + " .sel[ " + i + " ].style.visibility='visible'; " }
None.gif            }
else   if (l <= this .sel[i].level)  this .sel[i].style.visibility = " visible "
None.gif        }
None.gif    }
else   if (bw.ns4 && this .hideForm){eval( this .hideForm + " .visibility='hide' " );  this .hcode = this .hideForm + " .visibility='show' " }
None.gif}
None.gif
/* ***********
None.gifMaking all top elements
None.gif************
*/
None.gif
function  cm_makeTop(rr){
None.gif    
var  m,rows,border,x,y,mpa
None.gif    m
= this .menuplacement; rows = this .rows;  this .pxbetween = this .checkp( this .pxbetween, 0 , 1 , 1 )
None.gif    border
= this .l[ 0 ].border;y = this .checkp( this .fromtop, 0 , 0 , 1 ) + border;x = this .checkp( this .fromleft, 0 , 0 , 1 ) + border
None.gif    
if (m == " bottomcenter " || m == " bottom " ){
None.gif        
if (m == " bottomcenter " ) x = toppage.x2 / 2 - ( this .totwidth + border * this .l[ 0 ].num + this .pxbetween * ( this .l[ 0 ].num - 1 )) / 2
None.gif        y
= toppage.y2 - this .maxheight - border
None.gif    }
else   if (m == " right " ) x = toppage.x2 - this .maxwidth - border * 2
None.gif    
else   if (m == " bottom " ) y = toppage.y2 - this .maxheight - border * 2
None.gif    
else   if (m == " center " ){ if (rows == 0 ) x = toppage.x2 / 2   -   ( this .maxwidth + border * 2 ) / 2 ;  else  x = toppage.x2 / 2   -  ( this .totwidth  +  border * this .l[ 0 ].num  + this .pxbetween * ( this .l[ 0 ].num - 1 )) / 2 }
None.gif    
else   if (m.toString().indexOf( " , " ) >- 1 ) mpa = 1
None.gif    
if ( this .usebar){  var  bx,by,bww,bh,oBb
None.gif        oNS
= bw.ns6 ? this .oNS[ this .l[ 0 ].maxnum]: 0
None.gif        
this .oBar = new  cm_makeObj('div' + this .name + 'Bar', 0 , 0 ,window, 0 ,oNS)
None.gif        
if ( this .barx == " menu " ) bx = mpa && rows ? this .checkp(m[ 0 ], 1 , 0 , 1 ) - border:x - border;  else { bx = this .checkp( this .barx, 1 , 0 , 1 ) }
None.gif        
if ( this .bary == " menu " ) by = mpa &&! rows ? this .checkp(m[ 0 ], 0 , 0 , 1 ) - border:y - border;  else  by = this .checkp( this .bary, 0 , 0 , 1 );   this .oBar.moveIt(bx,by)
None.gif        
if ( this .barwidth == " menu " ){bww = rows ? mpa ? ( this .checkp(m[m.length - 1 ], 1 , 0 , 1 ) - bx) + this .m[ this .l[ 0 ].names[ this .l[ 0 ].num - 1 ]].width + border:( this .totwidth  + this .pxbetween * ( this .l[ 0 ].num - 1 )): this .maxwidth; 
None.gif        bww
+=! rows ? border * 2 : 0 ;} else  bww = this .checkp( this .barwidth, 1 , 0 , 1 ); 
None.gif        
if (bw.ie && rows && this .barwidth == " 100% " && this .useframes) bww += parseInt(self.document.body.leftMargin) * 2
None.gif        
if ( this .barheight == " menu " ){bh =! rows ? mpa ? ( this .checkp(m[m.length - 1 ], 0 , 0 , 1 ) - by) + this .m[ this .l[ 0 ].names[ this .l[ 0 ].num - 1 ]].height + border:( this .totheight  +   this .pxbetween * ( this .l[ 0 ].num - 1 )): this .maxheight;
None.gif        bh
+= rows ? this .l[ 0 ].border * 2 : 0 ;}  else  bh = this .checkp( this .barheight, 0 , 0 , 1 );
None.gif        
this .oBar.clipTo( 0 ,bww,bh, 0 , 1 );
None.gif        
if ( this .barinheritborder && border){oBb = new  cm_makeObj('div' + this .name + 'Barb', 0 , 0 ,window,'div' + this .name + 'Bar'); 
None.gif        oBb.moveIt(border,border); oBb.clipTo(
0 ,bww - border * 2 ,bh - border * 2 , 0 , 1 ); oBb = null ;}
None.gif    }
this .l[ 0 ].o = new  Array();  if ( this .usetextwidth)  this .maxwidth = 0
None.gif    
for (j = 0 ;j < this .l[ 0 ].maxnum;j ++ ){
None.gif        
this .l[ 0 ].o[j] = new  cm_makeObj('div' + this .name + '0_' + j, this , 0 ,window,'div' + this .name + '0_' + j + 'b');  if (bw.ns6) oNS = this .oNS[j];  else  oNS = 0
None.gif        
this .l[ 0 ].o[j].oBorder = new  cm_makeObj('div' + this .name + '0_' + j + 'b', 0 , 0 ,window, 0 ,oNS)
None.gif        obj
= this .l[ 0 ].o[j]; w = this .m[ this .l[ 0 ].names[j]].width; h = this .m[ this .l[ 0 ].names[j]].height;  if ( this .usetextwidth == 1 ) w += obj.w
None.gif        obj.addEvents(
this .l[ 0 ].names[j], this .name, this .m[ this .l[ 0 ].names[j]].lnk, this .useclick); obj.clipTo( 0 ,w,h, 0 , 1 )
None.gif        
if (mpa){ if (rows == 1 ) x = this .checkp(m[j], 0 , 1 , 1 );  else  y = this .checkp(m[j], 0 , 0 , 1 )}
None.gif        obj.moveIt(border,border); 
None.gif        obj.setactive(
0 , this .l[ 0 ].names[j])
None.gif        obj.oBorder.moveIt(x
- border,y - border); obj.oBorder.clipTo( 0 ,w + border * 2 ,h + border * 2 , 0 , 1 ); obj.oBorder.showIt()
None.gif        
if (rows == 0 ) y += h + border + this .pxbetween      
None.gif      
else {
None.gif      x
+= w + border + this .pxbetween;
None.gif      
if ( this .usetextwidth)  this .maxwidth += w
None.gif    }
None.gif  }
if ( this .usetextwidth)  if (m == " center " ){ if (rows == 0 ) x = toppage.x2 / 2   -   ( this .maxwidth + border * 2 ) / 2 ;  else  x = toppage.x2 / 2   -  ( this .totwidth  +  border * this .l[ 0 ].num  + this .pxbetween * ( this .l[ 0 ].num - 1 )) / 2 }
None.gif  
if ( ! rr){
None.gif        
if ( this .useclick) coolFMouseup += this .name + " .mmout('',1); " ;  if ( ! this .useframes &&! bw.ns4)  this .refresh()
None.gif        
else   if ( ! this .useframes && bw.ns4){l = "" ;  if (onload){l = String(onload.toString()); l = l.replace( " function onload(event) " , "" ); l = l.slice( 25 ,l.length - 2 )} l += this .name +   " .refresh(); " ; onload = new  Function(l)}
None.gif        
if ( this .resizecheck) setTimeout('window.onresize = new  Function( " '+this.name+'.resized() " )', 500 )
None.gif        
if ( this .checkscroll){ if (bw.ns4  ||  bw.ns6){ if ( this .checkscroll != 2 && this .useframes != 1 ){setTimeout( " cm_checkScrolled( " + this .name + " ) " , 200 )}}}
None.gif        
if ( this .useframes &&! rr)  this .checkFrame( 0 );  else   this .win = window
None.gif    }
None.gif}
None.gif
/* ***********
None.gifRefreshing/making all sub elements
None.gif************
*/
None.gif
function  cm_refresh(ev){
None.gif    
var  border,obj,oNS,oNS2
None.gif    
if ( this .useframes) page = new  makePageCoords( this .win, this .useframes);  else  page = toppage
None.gif    
for (i = 1 ;i < this .l.length;i ++ ){
None.gif        
this .l[i].o = new  Array();
None.gif        border
= this .l[i].border; defheight = this .checkp( this .l[i].height)
None.gif        
if (bw.ns4){oNS = new  Layer( this .l[i].width, this .win); oNS.zIndex = ( 500 + i);   if ( this .l[i].border) oNS.bgColor = this .l[i].bordercolor;}
None.gif        
else   if (bw.ns6){oNS = document.createElement( " DIV " ); oNS.setAttribute( " style " , this .ns6styleb[i]);  this .win.document.body.appendChild(oNS)}
None.gif        
this .l[i].oBorder = new  cm_makeObj('div' + this .name + i + " b " , 0 , 0 , this .win, 0 ,oNS)
None.gif        
for (j = 0 ;j < this .l[i].maxnum;j ++ ){
None.gif            
if (bw.ns4){oNS2 = new  Layer( this .l[i].width,oNS);}
None.gif            
else   if (bw.ns6){oNS2 = document.createElement( " DIV " );    oNS2.setAttribute( " style " , this .ns6style[i]); oNS.appendChild(oNS2)}
None.gif            
this .l[i].o[j] = new  cm_makeObj('div' + this .name + i + '_' + j, this ,i, this .win, 0 ,oNS2)
None.gif            obj
= this .l[i].o[j];  if ( ! obj.addEvents)  return ; obj.moveIt(border,(border + defheight) * j  +  border)
None.gif        }    
None.gif    }
this .loaded = 1 ;
None.gif    
if ( this .checkscroll && bw.ie){ this .win.document.body.onscroll = new  Function( " cm_checkScrolled( " + this .name + " ) " ); cm_checkScrolled( this )}
None.gif    
if ( this .useclick){ this .win.document.onmouseup = new  Function(coolFMouseup);  if ( this .useframes) document.onmouseup = new  Function(coolFMouseup); }
None.gif    
if ( ! bw.ns4 && this .checkselect)  this .sel = bw.ie4 ? this .win.document.all.tags( " SELECT " ): this .win.document.getElementsByTagName( " SELECT " )
None.gif}
None.gif
function  cm_NS6_createElement(st,inn){el = document.createElement( " DIV " );  if (st) el.setAttribute( " style " ,st);  if (inn) el.innerHTML = inn; document.body.appendChild(el);  return  el}
None.gif
/* ***********
None.gifMaking code
None.gif************
*/
None.gif
function  cm_construct(){
None.gif    
this .level = null ;  var  str = "" ;  var  str2 = "" ;  var  frstr = "" ;  var  tempstr; num = bw.ie ? this .l.length: 1 ;
None.gif    
for (i = 0 ;i < num;i ++ ){
None.gif        
if (i != 0 ) frstr += ' < div id = " div'+this.name+i+'b "  style = " '+this.ns6styleb[i]+' "  class = " cl'+this.name+i+'b " > \n'
None.gif        
for (j = 0 ;j < this .l[i].maxnum;j ++ ){
None.gif            tempstr
= ' < div id = " div'+this.name+i+'_'+j+' "  ';  if (i != 0 ) tempstr += 'style = " '+this.ns6style[i]+' " '
None.gif            
if (i == 0 ){n = this .l[ 0 ].names[j]; txt = this .m[n].text
None.gif                
if ( ! bw.ns6){
None.gif                    str
+= ' < div id = " div'+this.name+'0_'+j+'b "  class = " cl'+this.name+'b'+i+' " > '
None.gif                    str
+= tempstr + ' class = " cl'+this.name+i+' " > ' + txt + ' </ div > '; str += ' </ div > \n'
None.gif                }
else   this .oNS[j] = cm_NS6_createElement( this .ns6styleb[i],tempstr + ' class = " cl'+this.name+i+' " > ' + txt + ' </ div > ')
None.gif            }
else  frstr += tempstr + ' " ></div>\n'
None.gif        }if(i!=0){frstr+='</div>\n'}
None.gif    }if(this.usebar){
None.gif        if(this.barinheritborder) str2='<div id=
" div' + this .name + 'Barb " ></div>'; 
None.gif        if(bw.ns6) this.oNS[this.l[0].maxnum]=cm_NS6_createElement(this.ns6styleb[this.ns6styleb.length-1],str2)
None.gif        else{str+='<div id=
" div' + this .name + 'Bar " >';str+=str2+'</div>\n'}
None.gif    }if(!this.useframes&&bw.ie) str+=frstr; else this.frstr=frstr; if(!bw.ns6) document.write(str)
None.gif    this.makeTop();    if(this.useframes) window.onerror=cm_check_error;
None.gif}
None.gifcoolFrameError=0//Trapping external pages in frame error!
None.giffunction cm_check_error(e){e=e.toLowerCase(); if(e.indexOf(
" access " )>-1||e.indexOf( " permission " )>-1){coolFrameError=1; return true;}else return false}
None.gif/**************
None.gifMake styles
None.gif**************/
None.giffunction cm_makeStyle(){
None.gif    var str=
" < style > \n " ; var zindex=150;  var c,w,st,bg
None.gif    this.ns6style=new Array(); this.ns6styleb=new Array()
None.gif    for(i=0;i<this.l.length;i++){
None.gif        if(i==0){if(bw.ns4){w=
" width: "  +this.l[0].width+ " ; " ; this.l[i].style= "" } else w= "" ; str+='.cl'+this.name+i+'{position:absolute; '+w+' background-color:transparent; color:'+this.l[i].tc+';'+this.l[i].style+'; cursor:pointer; cursor:hand; visibility:inherit; z-index:'+zindex+'}\n'}
None.gif        else{st='position:absolute; '+this.l[i].style+';  cursor:pointer; cursor:hand; visibility:inherit; z-index:'+zindex; this.ns6style[i]=st}
None.gif        bc=this.l[i].border?bw.ns4?'layer-background-color:'+this.l[i].bordercolor:'; background-color:'+this.l[i].bordercolor:
"" ;
None.gif        if(!bw.ns4) bc+=
" ; overflow:hidden "
None.gif        tempstr='position:absolute; clip:rect(0,0,0,0); visibility:hidden; '+bc+'; z-index:'+(zindex-50)
None.gif        if(i==0&&!bw.ns6) str+='.cl'+this.name+'b'+i+'{'+tempstr+'}\n'; 
None.gif        else this.ns6styleb[i]=tempstr; zindex+=100
None.gif    }    
None.gif    if(this.usebar){
None.gif    if(!this.barbackgroundimg){bg=this.barinheritborder?this.l[0].bordercolor:this.barcolor; st='z-index:80; position:absolute; background-color:'+bg+'; layer-background-color:'+bg
None.gif        }else{ st='z-index:80; position:absolute;'; st+=bw.ns4?
" layer - background - image " : " background - image " ; st+= " :url(' " +this.barbackgroundimg+ " '); " }
None.gif    if(!bw.ns6) str+='#div'+this.name+'Bar{'+st+'}\n'; else this.ns6styleb[this.ns6styleb.length]=st
None.gif        if(this.barinheritborder&&!this.barbackgroundimg){str+='#div'+this.name+'Barb{z-index:85; position:absolute; background-color:'+this.barcolor+'; layer-background-color:'+this.barcolor+'}\n'}
None.gif    }
None.gif    if(bw.ns4) str+=
" A.clNS4{text - decoration:none; padding: " +this.NS4padding+ " }\n " ; document.write(str+ " \n </ style > \n " )
None.gif}
None.gif/************
None.gifRefreshing page if it's resized
None.gif*************/
None.giffunction cm_resized(){
None.gif    page2=new makePageCoords(window,this.useframes); 
None.gif    if(page2.x2!=toppage.x2 || page2.y2!=toppage.y2){
None.gif        if(!bw.ns4){
None.gif            toppage=new makePageCoords(window,this.useframes); this.makeTop(1)
None.gif            if(!this.useframes) page=toppage; this.isresized=1; eval(this.resizecode)
None.gif        }else{this.win.location.reload(); location.reload()}
None.gif    }if(!bw.ns4&&this.useframes){page=new makePageCoords(this.win,this.useframes)}
None.gif}
None.gif/************
None.gifGoing to another page
None.gif*************/
None.giffunction cm_go(name){
None.gif    obj=this.m[name]; url=obj.lnk; target=obj.target; fc=obj.mclick
None.gif    if(url){
None.gif        if(this.useframes&&!coolFrameError) loc=this.win.location.href; else loc=location.href
None.gif        if(fc) eval(fc); url=this.checkFolder(loc.toString(),url); this.isover=0;
None.gif        this.hideSubs(1,0,1); this.isclicked=0; this.aobj[0]=-1
None.gif        if(String(target)==
" undefined "  || target== ""  || target==0 || target== " _self " ){
None.gif            this.win.location.href=url
None.gif        }else if(target==
" _blank " ) window.open(url)
None.gif        else if(target==
" _top "  || target== " window " ) top.location.href=url  
None.gif        else if(top[target]) top[target].location.href=url
None.gif        else{fr=findFrame(target); if(fr) fr.location.href=url}
None.gif    }else if(fc) eval(fc)
None.gif}
None.gif/************
None.gifGetting folders - THANKS TO DCAGE FOR THIS FIX
None.gif*************/
None.giffunction cm_checkFolder(tmp,url){
None.gif    if(url.indexOf(
" mailto: " )>-1 || url.indexOf( " / " )==0 || url.indexOf( " http: // ")==0) return url
None.gif
     else   if ( this .useframes  &&  bw.ie  ||  bw.ns6)  return  url
None.gif    
var  addr = '';  var  lvl = '';  var  off_cnt = 0 ;  var  cnt = 0 ;
None.gif    
if (tmp.indexOf('file:') >- 1   ||  tmp.charAt( 1 ) == ':') addr = this .offlineUrl;
None.gif    
else   if (tmp.indexOf('http:') >- 1 ) addr = this .onlineUrl;
None.gif    
for ( var  i = 0 ;i < addr.length;i ++ ){ if (addr.charAt(i) == '\ / ') off_cnt += 1 }
None.gif    
for ( var  i = 0 ;i < tmp.length;i ++ ){ if (tmp.charAt(i) == '\ / '){ cnt += 1 ;  if (cnt > off_cnt) lvl += '.. / '; }}
None.gif    
return  lvl  +  url
None.gif}
None.gif
/* ***********
None.gifCheckloaded for the frames version
None.gif************
*/
None.gif
function  cm_checkLoaded(ev,ns){
None.gif    coolFName
= eval(coolFName)
None.gif    
var  ok = 0
None.gif    
if (document.layers){ 
None.gif        
if (ns){coolFName.refresh(); coolFName.nsload = 1 ; ok = 1 ; coolFrameError = 0
None.gif        }
else   if (ev.target.name == coolFName.frame &&! coolFName.nsload){coolFName.refresh(); ok = 1 ; coolFrameError = 0 ; routeEvent(ev)}
None.gif    }
else   if (bw.ie){
None.gif        
if  (coolFName.win.document.readyState  ==   " complete " ){
None.gif            coolFName.win.document.body.insertAdjacentHTML(
" beforeEnd " ,coolFName.frstr)
None.gif            coolFName.win.document.body.onunload
= cm_unloaded; coolFName.refresh(); ok = 1 ; coolFrameError = 0
None.gif        }
else  setTimeout( " cm_checkLoaded() " , 200 )
None.gif    }
else   if (bw.ns6){ 
None.gif        
if (coolFName.win.document){
None.gif            
if (coolFName.win.document.body){coolFName.win.addEventListener( " unload " , cm_unloaded,  true ); coolFName.refresh(); ok = 1 ; coolFrameError = 0 }
None.gif            
else  setTimeout( " cm_checkLoaded() " , 200 )
None.gif        }
else  setTimeout( " cm_checkLoaded() " , 200 )
None.gif    }
None.gif}
None.gif
function  cm_unloaded(ev){coolFName = eval(coolFName);  if ( ! coolFName)  return ;  if (document.layers  &&  ev.target.name != coolFName.frame)  return ;  else  coolFName.nsload = 0 ; coolFName.loaded = 0 ;  if ( ! document.layers) setTimeout( " cm_checkLoaded() " , 200 )}
None.gif
/* ***********
None.gifMake menu object
None.gif************
*/
None.gif
var  coolFName = "" ;  var  onload;  var  coolFMouseup = "" ;
None.gif
function  makeCoolMenu(name){
None.gif    coolFName
= name;  this .name = name;  this .lastScrolled = 0 ;
None.gif    
this .win = window; toppage = new  makePageCoords(window,parent.frames.length);
None.gif    
this .aobj = new  Array();  this .m = new  Array();  this .l = new  Array()
None.gif    
this .level = new  Array();  this .resized = cm_resized;
None.gif    
this .makeMenu = cm_makeMenu;  this .showSubs = cm_showSubs;  this .makeTop = cm_makeTop;
None.gif    
this .getCoords = cm_getCoords;  this .checkPage = cm_checkPage;
None.gif    
this .mmout = cm_mout;  this .mover = cm_mover;  this .checkp = cm_checkp;
None.gif    
this .hideSubs = cm_hideSubs;  this .construct = cm_construct;
None.gif    
this .makeStyle = cm_makeStyle;  this .refresh = cm_refresh;
None.gif    
this .go = cm_go;  this .frstr = "" ;  this .mobj = new  Array()
None.gif    
this .totwidth = 0 ;  this .totheight = 0 ;  this .maxwidth = 0 ;  this .maxheight = 0
None.gif    
this .tim = 10 ;  this .loaded = 0 ;  this .isover = false ;  this .checkFrame = cm_checkFrame;
None.gif    
this .checkFolder = cm_checkFolder;  this .hcode = "" ;  this .oNS = new  Array();  this .oNS2 = new  Array()
None.gif    bw.filter
= (bw.ie6 || bw.ver.indexOf( " MSIE 5.5 " ) >- 1 )  &&   ! bw.mac
None.gif}
None.gif
/* ***********
None.gifFind frame
None.gif************
*/
None.gif
function  findFrame(frameName){
None.gif    obj
= top;  var  frameObj = 0 ;
None.gif    
for (i = 0 ;i < obj.frames.length;i ++ ){
None.gif        
if (obj.frames[i].name == frameName){frameObj = obj.frames[i];  break ;}; ln = obj.frames[i].frames.length
None.gif        
for (j = 0 ;j < ln;j ++ ){
None.gif            
if (obj.frames[i].frames[j].name == frameName){frameObj = obj.frames[i].frames[j];   break }; ln2 = obj.frames[i].frames[j].frames.length
None.gif            
for (a = 0 ;a < ln2;a ++ ){
None.gif                
if (obj.frames[i].frames[j].frames[a].name == frameName){frameObj = obj.frames[i].frames[j].frames[a];  break }
None.gif            }
None.gif        }
None.gif    }
return  frameObj
None.gif}
None.gif
/* ***********
None.gifChecking for frame
None.gif************
*/
None.gif
function  cm_checkFrame(num){
None.gif    
var  fr;  if (num == 10 ){debug('Frame: ' + this .frame + ' doesn\'t exist  -  Value: ' + fr  +   "  - Could not build menus. " );  return }
None.gif    
if ( ! top.frames[ this .frame]) fr = findFrame( this .frame);  else  fr = top.frames[ this .frame]
None.gif    
if ( ! fr){num ++ ; setTimeout( this .name + " .checkFrame( " + num + " ) " , 500 )
None.gif    }
else {  this .win = fr
None.gif        
if (bw.ns4){
None.gif            top.frames.captureEvents(Event.UNLOAD); top.frames.captureEvents(Event.LOAD); top.frames.onunload
= cm_unloaded;
None.gif            top.frames.onload 
=  cm_checkLoaded;    setTimeout( " cm_checkLoaded(0,1) " , 1000 )
None.gif        }
else   if ((bw.ie || bw.ns6)) setTimeout( " cm_checkLoaded() " , 200 )
None.gif    }
None.gif}    
None.gif

页面代码:(因为我只用到三层,所以也只定义了三层)
None.gif function  lib_bwcheck(){ 
None.gif    
this .ver = navigator.appVersion;  this .agent = navigator.userAgent
None.gif    
this .dom = document.getElementById ? 1 : 0
None.gif    
this .ie5 = ( this .ver.indexOf( " MSIE 5 " ) >- 1   &&   this .dom) ? 1 : 0 ;
None.gif    
this .ie6 = ( this .ver.indexOf( " MSIE 6 " ) >- 1   &&   this .dom) ? 1 : 0 ;
None.gif    
this .ie4 = (document.all  &&   ! this .dom) ? 1 : 0 ;
None.gif    
this .ie = this .ie4 || this .ie5 || this .ie6
None.gif    
this .mac = this .agent.indexOf( " Mac " ) >- 1
None.gif    
this .opera5 = this .agent.indexOf( " Opera 5 " ) >- 1
None.gif    
this .ns6 = ( this .dom  &&  parseInt( this .ver)  >=   5 )  ? 1 : 0 ; 
None.gif    
this .ns4 = (document.layers  &&   ! this .dom) ? 1 : 0 ;
None.gif    
this .bw = ( this .ie6  ||   this .ie5  ||   this .ie4  ||   this .ns4  ||   this .ns6  ||   this .opera5  ||   this .dom)
None.gif    
return   this
None.gif    }
None.gif    
var  bw = new  lib_bwcheck() 
None.gif    
var  mDebugging = 2  
None.gif    oCMenu
= new  makeCoolMenu( " oCMenu " ) 
None.gif    oCMenu.useframes
= 0  
None.gif    oCMenu.frame
= " frmMain "
None.gif    oCMenu.useclick
= 0  
None.gif    oCMenu.useNS4links
= 1  
None.gif    oCMenu.NS4padding
= 0  
None.gif    oCMenu.checkselect
= 0
None.gif    oCMenu.offlineUrl
= " file:///C|/Inetpub/wwwroot/ "  
None.gif    oCMenu.onlineUrl
= " http://www.dhtmlcentral.com/coolmenus/examples/withoutframes/ "  
None.gif    oCMenu.pagecheck
= 1  
None.gif    oCMenu.checkscroll
= 0  
None.gif    oCMenu.resizecheck
= 1  
None.gif    oCMenu.wait
= 500  
None.gif    oCMenu.usebar
= 0  
None.gif    oCMenu.barcolor
= " Navy "  
None.gif    oCMenu.barwidth
= " 740 "  
None.gif    oCMenu.barheight
= " menu "  
None.gif    oCMenu.barx
= 0  
None.gif    oCMenu.bary
= 0
None.gif    oCMenu.barinheritborder
= 0
None.gif    oCMenu.rows
= 1  
None.gif    oCMenu.fromleft
= 40  
None.gif    oCMenu.fromtop
= 120  
None.gif    oCMenu.pxbetween
= 3  
None.gif    oCMenu.menuplacement
= " left "
None.gif    oCMenu.level[
0 ] = new  Array() 
None.gif    oCMenu.level[
0 ].width = 120  
None.gif    oCMenu.level[
0 ].height = 20  
None.gif    oCMenu.level[
0 ].bgcoloroff = " #01A37A "  
None.gif    oCMenu.level[
0 ].bgcoloron = " #D4302E "  
None.gif    oCMenu.level[
0 ].textcolor = " White "  
None.gif    oCMenu.level[
0 ].hovercolor = " White "  
None.gif    oCMenu.level[
0 ].style = " padding:2px;text-align:center; font-family:tahoma,arial,helvetica; font-size:11px; font-weight:bold "   // The style for all level[0] (top) items. - Value: "style_settings"
None.gif
    oCMenu.level[ 0 ].border = 0  
None.gif    oCMenu.level[
0 ].bordercolor = " red "  
None.gif    oCMenu.level[
0 ].offsetX = 0  
None.gif    oCMenu.level[
0 ].offsetY =- 1  
None.gif    oCMenu.level[
0 ].NS4font = " tahoma,arial,helvetica "
None.gif    oCMenu.level[
0 ].NS4fontSize = " 2 "
None.gif    oCMenu.level[
0 ].clip = 1
None.gif    oCMenu.level[
0 ].clippx = 15  
None.gif    oCMenu.level[
0 ].cliptim = 50  
None.gif    oCMenu.level[
0 ].filter = " progid:DXImageTransform.Microsoft.Fade(duration=0.5) "  
None.gif    oCMenu.level[
0 ].align = " bottom "  
None.gif    oCMenu.level[
1 ] = new  Array() 
None.gif    oCMenu.level[
1 ].width = oCMenu.level[ 0 ].width - 2
None.gif    oCMenu.level[
1 ].height = 22
None.gif    oCMenu.level[
1 ].style = " padding:2px; font-family:tahoma, arial,helvetica; font-size:11px; "
None.gif    oCMenu.level[
1 ].align = " bottom "  
None.gif    oCMenu.level[
1 ].offsetX =- (oCMenu.level[ 0 ].width - 2 ) / 2 + 20
None.gif    oCMenu.level[
1 ].offsetY = 0
None.gif    oCMenu.level[
1 ].border = 1  
None.gif    oCMenu.level[
1 ].bordercolor = " #FFFFFF "
None.gif    oCMenu.level[
2 ] = new  Array() 
None.gif    oCMenu.level[
2 ].wi0099cc = 150
None.gif    oCMenu.level[
2 ].height = 20
None.gif    oCMenu.level[
2 ].bgcoloroff = " #01A37A "
None.gif    oCMenu.level[
2 ].bgcoloron = " #D4302E "
None.gif    oCMenu.level[
2 ].style = " padding:2px; font-family:tahoma,arial,helvetica; font-size:11px; "
None.gif    oCMenu.level[
2 ].align = " bottom "  
None.gif    oCMenu.level[
2 ].offsetX = 0
None.gif    oCMenu.level[
2 ].offsetY = 0
None.gif    oCMenu.level[
2 ].border = 1  
None.gif    oCMenu.level[
2 ].bordercolor = " #FFFFFF "
None.gif    oCMenu.level[
2 ].NS4font = " tahoma,arial,helvetica "
None.gif    oCMenu.level[
2 ].NS4fontSize = " 1 "
None.gif    oCMenu.level[
2 ].clip = 1  
None.gif    oCMenu.level[
2 ].clippx = 20
None.gif    oCMenu.level[
2 ].cliptim = 50
None.gif    
<% Set RsFirst = Server.CreateObject( " Adodb.RecordSet " )
None.gif    SqlFirst
= " Select Id,classname,classcode,PageUrl,ShowOrder,MenuWidth From [class] where Len(classcode)=3 Order by ShowOrder Asc "
None.gif    RsFirst.OPen SqlFirst,Conn,
1 , 3
None.gif    If Not RsFirst.Eof THen
None.gif        Do While Not RsFirst.EOf
%>
None.gif        oCMenu.makeMenu('
<%= RsFirst( " ShowOrder " ) %> ','',' < a href =<%= RsFirst( " PageUrl " ) %>><%= RsFirst( " ClassName " ) %></ a > ','', 740 , <%= RsFirst( " MenuWidth " ) %> )
None.gif        
<% Set RsPS = Server.CreateObject( " Adodb.RecordSet " )
None.gif        SqlPS
= " Select classname,classcode From [class] where Len(classcode)=6 and left(classcode,3)=' " & RsFirst( " ClassCode " ) & " ' "
None.gif        RsPS.OPen SqlPS,Conn,
1 , 3
None.gif        If Not RsPs.Eof THen
None.gif        I
= 0
None.gif            Do While Not RsPs.Eof
None.gif                    If RsFirst(
" ClassCode " ) = " 003 "  or RsFirst( " ClassCode " ) = " 004 "  then
None.gif                    
%>
None.gif                        oCMenu.makeMenu('sub
<%= RsFirst( " ShowOrder " ) %><%= I %> ',' <%= RsFirst( " ShowOrder " ) %> ',' & nbsp; & nbsp; <%= RsPs( " ClassName " ) %> ','Products.asp ? Cd =<%= RsPs( " ClassCode " ) %> ', 0 , 150 )        
None.gif                    
<% Else %>
None.gif                        oCMenu.makeMenu('sub
<%= RsFirst( " ShowOrder " ) %><%= I %> ',' <%= RsFirst( " ShowOrder " ) %> ',' & nbsp; & nbsp; <%= RsPs( " ClassName " ) %> ','Products.asp ? Cd =<%= RsPs( " ClassCode " ) %> ')        
None.gif                    
<% end If %>
None.gif            
// oCMenu.makeMenu('sub<%=RsFirst("ShowOrder")%><%=I%>','<%=RsFirst("ShowOrder")%>','&nbsp;&nbsp;<%=RsPs("ClassName")%>','Products.asp?Cd=<%=RsPs("ClassCode")%>')        
None.gif
             <% Set RsChild = Server.CreateObject( " Adodb.RecordSet " )
None.gif                SqlChild
= " Select classname,classcode From [class] where Len(classcode)=9 and left(classcode,6)=' " & RsPs( " ClassCode " ) & " ' "
None.gif                RsChild.OPen SqlChild,Conn,
1 , 3
None.gif                If Not RsChild.Eof THen
None.gif                J
= 0
None.gif                    Do While Not RsChild.Eof
None.gif                    If RsFirst(
" ClassCode " ) = " 003 "  then
None.gif                    
%>
None.gif                        oCMenu.makeMenu('sub
<%= RsFirst( " ShowOrder " ) %><%= I %><%= J %> ','sub <%= RsFirst( " ShowOrder " ) %><%= I %> ',' & nbsp; & nbsp; <%= RsChild( " ClassName " ) %> ','Products.asp ? Cd =<%= RsChild( " ClassCode " ) %> ', 0 , 180 )
None.gif                    
<% Else %>
None.gif                        oCMenu.makeMenu('sub
<%= RsFirst( " ShowOrder " ) %><%= I %><%= J %> ','sub <%= RsFirst( " ShowOrder " ) %><%= I %> ',' & nbsp; & nbsp; <%= RsChild( " ClassName " ) %> ','Products.asp ? Cd =<%= RsChild( " ClassCode " ) %> ')
None.gif                    
<% end If %>
None.gif                
<% J = J + 1
None.gif                    RsChild.MoveNext
None.gif                    Loop
None.gif                End If
None.gif            I
= I + 1
None.gif            RsPS.MoveNext
None.gif            Loop
None.gif        End If
None.gif    RsFirst.MoveNext
None.gif    Loop
None.gif    End If
%>
None.gif    oCMenu.makeStyle(); oCMenu.construct()            
None.gif
</ SCRIPT >
None.gif
< SCRIPT >
None.gif
function  changeFilter(filter){
None.gif    
if ( ! bw.filter){ alert('This feature only works on Explorer5. 5   +  ');  return }
None.gif    el
= oCMenu.l[ 1 ].oBorder
None.gif    
if (el.evnt.filters[ 0 ]) el.evnt.filters[ 0 ].Stop();
None.gif    el.css.filter
= filter
None.gif    
None.gif}
None.gif
</ SCRIPT >
None.gif

从asp代码中也可以看到我的数据库结构了,呵呵,我留在这里,为以后使用做准备,呵呵~~~`

转载于:https://www.cnblogs.com/yang_sy/archive/2005/08/05/208543.html

Vue - ElementUI实现el-menu无限级菜单组件,侧边栏菜单栏无限多层级分类,导航栏递归动态菜单和动态路由渲染示例源码(基于Menu封装左侧菜单栏组件,支持接口获取动态数据、懒加载菜单) Vue使用递归组件封装El-Menu多级菜单,Vue Element-ui和el-menu无限级菜单组件如何封装,el-menu 实现无线级菜单,完整demo源码,如何嵌套多个子菜单,vue element封装的无限多级导航菜单(递归循环)vue+element无限级菜单,elementui中el-menu如何实现多个子菜单el-menu-item,Vue Elementui el-menu无限级菜单组件封装,基于el-menu封装左侧菜单栏组件,递归型菜单组件封装,实现动态菜单和动态路由的渲染,归型菜单组 阅读详情

相关推荐

《Vue3笔记》第26节:Vue3项目实现多层级菜单功能

前一个小节的内容中,已经介绍了如何实现面包屑导航的功能。这个小节基于之前动态菜单的基础之上,添加多层级菜单的显示功能。在之前做的动态菜单中,会存在一个bug,那就是如果菜单层级超过2级,此时,菜单渲染就会报错,从而导致无法使用。这个小节就来解决多层级菜单的这个问题。

✅ Java 开发工程师 415

层级菜单动态效果的实现

 【文章标题】层级菜单动态效果的实现【文章作者】曾健生【作者邮箱】zengjiansheng1@126.com【作者QQ】190678908【作者博客】http://blog.youkuaiyun.com/newjueqi【编程环境】Dreamweaver【作者声明】欢迎转载文章,但转载请保留文章的完整性以及注明文章的出处。 ************************

曾健生的专栏 2269

layui三级动态菜单(SpringBoot)

layui三级动态菜单(SpringBoot项目)简单demo仅供参考。

动态生成多级菜单

以前,我是用数据表保存菜单项目及各个操作员的相应权限,并在vfp中编写了相应的程序来实现菜单、工具栏、Treeview   的生成。但由于vfp有一个叫宏替换的东东&,实现起来比较简单。     由于vb及.net的“对象”和“对象名称”是两种不同的数据类型,之间转换起来比较麻烦,以一直困扰了我很久了。 经过一段时间的努力,终于实现了上述的功能。具体做法是:  我把系统中使用的各级菜单的信

cdbqss1的专栏 2605

计算光刻效率革命:为什么Hopkins模型比Abbe模型快?深入解析TCC的魔力

本文深入解析了计算光刻中Hopkins模型相比Abbe模型的效率优势,重点探讨了TCC(透射交叉系数)的工程智慧。通过预计算光学系统特性并复用TCC矩阵,Hopkins模型实现了数量级的加速,特别适用于复杂照明条件下的光刻仿真。文章详细介绍了TCC的物理意义、模态分解技术以及GPU并行计算等关键加速策略,为半导体制造中的光刻工艺优化提供了实用见解。

weixin_33364627的博客 389

海量Embedding进行相似度查询和比较的方法

这个是在科研中的现实需求。例如每一个源代码文件,我们可以生成一个embedding,如果有超过5000万个embedding(例如用BERT生成5000万个embedding),怎么样有效地计算相似性呢(例如有5000个positive的embedding,想在5000万个中找到类似的)。 简单介绍一下我尝试的结果:如果直接用torch.cosine_similarity,我手里的数据估计至少要处理两个月。这时候就想到了用LSH -- Locality Sensitive Hashing,但是我之前并没怎

qysh123的专栏 4567

vue element 动态 多级导航菜单

vue的递归组件: &lt;template&gt; &lt;div&gt; &lt;!-- 根据实际情况做修改 --&gt; &lt;el-submenu v-for="(item,index) in navlist" :key="index" v-if="item.adminMenu.menuType=='list'" :index="item

qq_42076140的博客 9284

微信小程序中蓝牙打印机中文编码处理:使用iconv-lite库

本文介绍了微信小程序集成蓝牙打印机时中文乱码问题的解决方案。由于打印机通常仅支持GBK/GB2312编码,而小程序使用UTF-8,导致中文显示异常。通过引入轻量级iconv-lite库进行编码转换,可高效解决该问题。文章详细说明了从库安装、编码转换到蓝牙发送的实现步骤,并提供了完整代码示例。关键注意事项包括编码验证、分段发送和兼容性测试。该方法经实际验证,能有效保障中文打印的准确性,适用于零售、物流等场景。

canglingyue的专栏 1310

boostrap实现动态多级菜单

1.html页面 Bootstrap 3 的多级下拉菜单示例 .dropdown-submenu { position: relative; } .dropdown-submenu > .dropdown-menu

mingshen3的博客 4004

python抓取美团外卖的数据(商家、评分、评论)

本文详细介绍了如何使用Selenium和抓取美团外卖的商家、评分和评论数据。我们从基础的爬虫原理入手,分析了美团外卖的网页结构,提出了应对反爬虫机制的策略,并给出了详细的代码实现。通过使用Selenium,我们能够绕过动态加载内容的限制,直接抓取网页中的商家信息和评论。结合多线程和代理池等技术,我们可以进一步提高爬虫效率,并避免IP被封禁。未来,随着爬虫技术的发展,我们可以进一步探索深度抓取、数据清洗和数据分析等高级应用,以实现更智能的网页数据抓取。

2201_76125261的博客 2702

利用requests库下载bilibili字幕文件

文章目录1. 前言2. 程序下载大法好2.1 挖掘思路2.2 核心知识点2.3 汇总代码 1. 前言   之前的博客介绍了使用工具下载B站视频,但美中不足的是无法下载字幕。为了提高效率,将下载字幕的工作用程序自动化处理。 2. 程序下载大法好 2.1 挖掘思路   在谷歌浏览器中按下F12,打开谷歌开发者工具。搜索subtitle,则会得到一个json文件,如下图所示:   在网页中空白位置点击查看网页源代码,然后通过搜索(Ctrl+f)查找subtitle,则会发现在subtitle_url中包含了对应

herosunly的博客 4万+

Django动态渲染多层菜单

为后续给菜单设置权限管理方便,通过给页面模版菜单动态渲染,通过数据菜单表进行匹配需要渲染的菜单 1 #Django表结构 2 3 class Menus(models.Model): 4 5 name = models.CharField(max_length=32, verbose_name=u'菜单名') 6 parent = models...

weixin_30386713的博客 443

解决Gradle中NPM命令失效问题

摘要:本文分析了IntelliJ IDEA中Gradle执行npm命令失败的问题,报错显示"npm"文件不存在。通过确认npm安装路径、检查系统PATH与Gradle环境的差异,提出两种解决方案:1) 在build.gradle中使用npm绝对路径;2) 通过launchctl修改用户PATH。实例展示了如何修改Gradle脚本或系统配置来解决该问题,指出跨平台开发中环境变量配置的重要性。文章为开发者提供了处理类似问题的实用方法。

2501_90323865的博客 91

Extjs结合后台数据库动态生成多层菜单树

JS/Main.js//----------------------------------------------左边var root=new Ext.tree.AsyncTreeNode({        id:'0',        text:"####管理系统",

隋旭峰的专栏 1万+

Midscene.js(2):代码集成 + 桥接模式(Bridge Mode)的使用「喂饭教程」

本文将手把手教你从零开始搭建一个 Node.js 项目,集成 Midscene.js,并利用其桥接模式实现对 Chrome 浏览器的自动化操作。我们将通过具体的实例,来展示 Midscene.js 的便捷性与 AI 能力的结合。

blues_C的博客 1847

第一章 EB安装

1.DemoWorkspace 是基于EB当前组件配置下的例程,包含了启动文件和中断服务函数以及组件demo。2.Mclsar 下存放的是EB的插件包和静态MCAL的驱动文件。

舊梦的博客 1964

多层展开菜单,基于Bootstrap布局

多层展开菜单,基于Bootstrap布局 教程地址:原文地址(YouTube) B站教程:原文转载(bilibili) 两个视频的内容相同,第二个为转载 效果图 [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-KVJX4gpb-1581039558258)(演示.gif)] 代码区 html <div class="container"> <...

mengs 721

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

JS使用递归方法解析多层嵌套json接口的方法

实现:动态加载后台管理项目菜单功能,并且json为三层嵌套对象 如图所示json返回: 解析如上所示多层json对象,一开始我直接用each方法解析,发现不是name就是url获取不到一直报错undefined $.each(json, function (index) { var result = ''; var json = data.data; var name = json[index].name; var chil

Welcome to my blog 4467

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

vue通过自定义组件实现无限层级菜单动态渲染

如何优雅地实现无限层级菜单的动态渲染:VUE实现多层级菜单列表动态递归渲染

ButterPig 777

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

使用dojo下Menu和PopupMenuItem实现动态菜单

昨天早上来公司上班,上头抛给我一个加急任务,一个动态菜单的配置与实现。我想了想,类似功能很常见,并且在现已有的系统中已经有了一种模式的展现。 最开始,从已有系统中找到了一个右键菜单的功能实现,主要使用了dijit.Menu和dijit.MenuItem通过嵌套组合的方式来实现层级的菜单功能。但是后来通过观察发现,这一对标签的使用,需要结合页面...

weixin_30709929的博客 189

elementUI 动态渲染三级菜单

后台传的数据为 menuList: [ { name: "首页", pid: 0, id: 28, url: "/main" }, { name: "实时监测", pid: 0, id: 29, url: "/monitoring", childNode: [ { name: "实时监测首页", pid: 29, id: 34, url: "/monitoringHomepage" }, { na...

630

c# mvc5 view 多层_MVC5+EF6 入门完整教程13 -- 动态生成多级菜单

稍微有一定复杂性的系统,多级菜单都是一个必备组件。本篇专题讲述如何生成动态多级菜单的通用做法。我们不用任何第三方的组件,完全自己构建灵活通用的多级菜单。需要达成的效果:容易复用,可以根据model动态产生。文章提纲概述要点 && 理论基础详细步骤一、分析多级目录的html结构二、根据html结构构建data model三、根据data model动态生成树形结构四、解析树形结构成h...

weixin_39675178的博客 285

VC 动态生成菜单

动态生成菜单 这是一段根据字符串动态生成菜单的程序,字符串的格式是这样的:一个数字+一个字符串组成一个菜单项,一项一项的排开,用逗号,分隔,组成一个大字符串。数字表示菜单的层次,0是主菜单,1是1级子菜单...n+1是离它最近的左边的n级菜单的子菜单。最多可以表示9级子菜单,这已经足够了。字符串是菜单显示的内容。举个例子,比如0a,1b,1c,0d表示主菜单是a和d,a有2个子菜单b和c。

andyzhdd的专栏 624

JSON 无限折叠菜单

最近看了一篇关于JSON无限折叠菜单的文章 感觉写的不错,也研究了下代码,自己也实际应用到公司项目里了,很实用,推荐一下. 推荐地址:http://www.cnblogs.com/tugenhua0707/p/3474791.html 可根据自己想要的样式以及效果自定义更改。 js代码: /** * JSON无限折叠菜单 * @constructor {AccordionMenu} *...

梦和远方的博客 1593
上一篇: [Question]要建立这样一个网站,应该怎么建立架构?
下一篇: [讨论]MVC---->Model-->Data Manage--->Database:SQL Server VS Access
aoding8407
博客等级 码龄11年 2粉丝 0原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值