动态多层菜单

其实这个应该不算.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) * +  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.οnerrοr=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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值