您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息

下拉透明菜单二

2024/4/25 15:03:06发布5次查看
function mmenu(caption,command,target,img,sizex,sizey,pos){
 this.items = new array();
 this.caption=caption;
 this.command=command;
 this.target=target;
 this.img=img;
 this.sizex=sizex;
 this.sizey=sizey;
 this.pos=pos;
 this.id=mmenuregister(this);
}
function mmenuadditem(item)
{
  this.items[this.items.length] = item
  item.parent = this.id;
  this.children=true;
}
mmenu.prototype.additem = mmenuadditem;
mmenuitem.prototype.addsubitem = mmenuadditem;
function mtoout(src){
src.style.borderleftcolor=mmenuoutbordercolor;
src.style.borderrightcolor=mmenuinbordercolor;
src.style.bordertopcolor=mmenuoutbordercolor;
src.style.borderbottomcolor=mmenuinbordercolor;
src.style.backgroundcolor=mmenuoutcolor;
src.style.color=mmenuovercolor;
}
function mtoin(src){
src.style.borderleftcolor=mmenuinbordercolor;
src.style.borderrightcolor=mmenuoutbordercolor;
src.style.bordertopcolor=mmenuinbordercolor;
src.style.borderbottomcolor=mmenuoutbordercolor;
src.style.backgroundcolor=mmenuincolor;
src.style.color=mmenuovercolor;
}
function mnochange(src){
src.style.borderleftcolor=mmenucolor;
src.style.borderrightcolor=mmenucolor;
src.style.bordertopcolor=mmenucolor;
src.style.borderbottomcolor=mmenucolor;
src.style.backgroundcolor='';
src.style.color=mfontcolor;
}
function mallhide(){
 for(var nummenu=0;nummenu  var themenu=document.all['mmenu'+nummenu]
  var themenudiv=document.all['mmenudiv'+nummenu]
                mnochange(themenu);
                mmenuhide(themenudiv);
                }
        for(nummenu=1;nummenu         var thesub=document.all['msubmenudiv'+nummenu]     
         msubmenuhide(thesub);
         mnochange(document.all['mp'+nummenu]);
         document.all[mitem+nummenu].style.color=mfontcolor;
         }
}
function mmenuhide(menuid){
menuid.style.filter='alpha(opacity=100)';
hideswipe(menuid);
misshow=false;
}
function msubmenuhide(menuid){
menuid.style.filter='alpha(opacity=100)';
menuid.style.visibility='hidden';
}
function mmenushow(menuid,pid){
menuid.style.filter='alpha(opacity=80)';
menuid.style.left=mposflag.offsetleft+pid.offsetleft+mmenuadjust;menuid.style.top=mposflag.offsettop+mmenutable.offsetheight+mmenuadjustv;
if(mmenuitemwidth+parseint(menuid.style.left)>document.body.clientwidth+document.body.scrollleft)
menuid.style.left=document.body.clientwidth+document.body.scrollleft-mmenuitemwidth;
mtmpleft=menuid.style.left;mtmptop=menuid.style.top;swipe(menuid,2,4);
misshow=true;
}
function mshowsubmenu(menuid,pid,rid){
menuid.style.filter='alpha(opacity=80)';
menuid.style.left=pid.offsetwidth+rid.offsetleft;
menuid.style.top=pid.offsettop+rid.offsettop-3;
if(mmenuitemwidth+parseint(menuid.style.left)>document.body.clientwidth+document.body.scrollleft)
menuid.style.left=document.body.clientwidth+document.body.scrollleft-mmenuitemwidth;
menuid.style.visibility='visible';
}
function mmenu_over(menuid,x){
toel = getreal(window.event.toelement, classname, coolbutton);
fromel = getreal(window.event.fromelement, classname, coolbutton);
if (toel == fromel) return;
if(x  misshow = false;
  mallhide();
  mtoout(eval(mmenu+x));
}else{
  mallhide();
  mtoin(eval(mmenu+x));
  mmenushow(menuid,eval(mmenu+x));
}
cleartimeout(mpoptimer);
}
function mmenu_out(x){
toel = getreal(window.event.toelement, classname, coolbutton);
fromel = getreal(window.event.fromelement, classname, coolbutton);
if (toel == fromel) return;
if (misshow){
mtoin(eval(mmenu+x));
}else{
mnochange(eval(mmenu+x));
}
mpopout()
}
function mmenu_down(menuid,x){
  if(misshow){
  mmenuhide(menuid);
  mtoout(eval(mmenu+x));
  }
  else{
  mtoin(eval(mmenu+x));
  mmenushow(menuid,eval(mmenu+x));
  misdown=true;
  }
}
function mmenu_up(){
  misdown=false;
}
function mmenuitem_over(menuid,item,x,j,i){
toel = getreal(window.event.toelement, classname, coolbutton);
fromel = getreal(window.event.fromelement, classname, coolbutton);
if (toel == fromel) return;
srcel = getreal(window.event.srcelement, classname, coolbutton);
        for(nummenu=1;nummenu         var thesub=document.all['msubmenudiv'+nummenu]
         if(!(menuid==thesub||menuid.style.tag>=thesub.style.tag)){
         msubmenuhide(thesub);
         mnochange(document.all['mp'+nummenu]);
         document.all[mitem+nummenu].style.color=mfontcolor;
         }
        }
if(item)document.all[mitem+item].style.color=mmenuovercolor;
if(misdown||item){
 mtoin(srcel);
}
else{
 mtoout(srcel);
}
if(x==-1)mthestatus=eval(msub+j).items[i].statustxt;
if(j==-1)mthestatus=mmenus[x].items[i].statustxt;
if(mthestatus!=){
 musestatus=true;
 window.status=mthestatus;
}
cleartimeout(mpoptimer);
}
function mmenuitem_out(hassub){
toel = getreal(window.event.toelement, classname, coolbutton);
fromel = getreal(window.event.fromelement, classname, coolbutton);
if (toel == fromel) return;
srcel = getreal(window.event.srcelement, classname, coolbutton);
if(!hassub)mnochange(srcel);
if(musestatus)window.status=;
mpopout()
}
function mmenuitem_down(){
srcel = getreal(window.event.srcelement, classname, coolbutton);
mtoin(srcel)
misdown=true;
}
function mmenuitem_up(){
srcel = getreal(window.event.srcelement, classname, coolbutton);
mtoout(srcel)
misdown=false;
}
function mexec3(j,i){
var cmd;
if(eval(msub+j).items[i].target==blank){
  cmd = window.open('+eval(msub+j).items[i].command+');
}else{
  cmd = eval(msub+j).items[i].target+.location=\+eval(msub+j).items[i].command+\;
}
eval(cmd);
}
function mexec2(x){
var cmd;
if(mmenus[x].target==blank){
  cmd = window.open('+mmenus[x].command+');
}else{
  cmd = mmenus[x].target+.location=\+mmenus[x].command+\;
}
eval(cmd);
}
function mexec(x,i){
var cmd;
if(mmenus[x].items[i].target==blank){
  cmd = window.open('+mmenus[x].items[i].command+');
}else{
  cmd = mmenus[x].items[i].target+.location=\+mmenus[x].items[i].command+\;
}
eval(cmd);
}
function mbody_click(){
if (misshow){
 srcel = getreal(window.event.srcelement, classname, coolbutton);
 for(var x=0;x  if(srcel.id==mmenu+x)
  return;
 }
 for(x=1;x  if(srcel.id==mp+x)
  return;
 }
 mallhide();
}
}
document.onclick=mbody_click;
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录