当前位置: 首页 > 工具软件 > Vdt.js > 使用案例 >

老外JS实现的Infinite Menus

金何平
2023-12-01

代码简介:

JS实现的Infinite Menus。好像是老外的,代码有点乱,不过效果很不错。

代码内容:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>老外JS实现的Infinite Menus_网页代码站(www.webdm.cn)</title>
	</head>
<body>
<div style="width:100%; height:400px; padding:30px; padding-top:20px; background-color:#eeeeee; display:none;"><table border="0" width="315" cellspacing="0" cellpadding="0"><tr><td align="right"><div 

style="font-size:1px;height:5px;"></div></td></tr><tr><td style="font-family:Arial;font-size:13px;"><b>Quick Save Notice!</b> - This menu will be saved as a Unicode formatted HTML document.<br><br>For 

a smaller footprint & full cross browser support convert the saved document to ANSI (Use a text-editor to re-save the document.) or use the 'copy-paste' save and export options.</td></tr><tr><td 

align="right"><div style="font-size:1px;height:25px;"></div></td></tr><tr><td align="right"><input οnclick="window.document.execCommand('saveAs');window.close()" type="button" 

style="width:210px;height:26px;font-size:11px;font-family:Arial;" value="Save to a New HTML Document"></td></tr></table></div><div style="color:#000000; font-size:14px; font-family:Arial; font-

weight:bold;">Infinite Menus - Saved Document</div><table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#666666" height="1"><tr><td></td></tr></table><div style="font-size:12px; 

color#000000; font-family:Arial; padding:30px;">Settings may be manually edited by modifying this documents source HTML.  The visual design option may be switched on or off by changing the following 

parameter setting...<br><br><b>enable_visual_design_mode</b> = true or false   -  (see the 'Menu Settings and Styles' section in the source HTML )<br><br><br><br>
<!-- ********************************** Effect Structure and Links ************************************** -->
<div><div><div style="display:none;"><ul id="imenus0" style="width:580px">
<li  style="width:145px;"><a href="#" target="_new">Who We Are</a>
<div><div style="width:145px;top:0px;left:0px;"><ul style="">
<li><a href="sample_link.html" target="_new">Overview</a></li>
<li><a href="sample_link.html" target="_new">Mission & Goals</a></li>
<li><a href="sample_link.html" target="_new">History</a></li>
<li><a href="sample_link.html" target="_new">Management</a></li>
<li><a href="sample_link.html" target="_new">Working at Tyco</a></li>
<li><a href="sample_link.html" target="_new">Press Center</a></li>
<li><a href="#" target="_new">Worldwide</a>
<div><div style="width:140px;top:-19px;left:133px;"><ul style="">
<li><a href="sample_link.html" target="_new">Europe</a></li>
<li><a href="sample_link.html" target="_new">Asia</a></li>
<li><a href="sample_link.html" target="_new">US & Canada</a></li>
<li><a href="sample_link.html" target="_new">Mexico</a></li>
<li><a href="sample_link.html" target="_new">Australia</a></li>
<li><a href="sample_link.html" target="_new">Middle East</a></li>
</ul></div></div></li>
<li><a href="#" target="_new">Board of Directors</a>
<div><div style="width:140px;top:-18px;left:133px;"><ul style="">
<li><a href="sample_link.html" target="_new">Overview</a></li>
<li><a href="sample_link.html" target="_new">Electronics</a></li>
<li><a href="sample_link.html" target="_new">Fire & Security</a></li>
<li><a href="sample_link.html" target="_new">Healthcare</a></li>
<li><a href="sample_link.html" target="_new">Plastics & Adhesives</a></li>
<li><a href="sample_link.html" target="_new">Engineered Producs</a></li>
<li><a href="sample_link.html" target="_new">Tyco Worldwide</a></li>
</ul></div></div></li>
<li><a href="#" target="_new">Customers</a></li>
</ul></div></div></li>
<li  style="width:145px;"><a href="#" target="_new">Our Commitment</a>
<div><div style="width:146px;top:0px;left:-1px;"><ul style="">
<li><a href="sample_link.html" target="_new">Overview</a></li>
<li><a href="sample_link.html" target="_new">People & Values</a></li>
<li><a href="sample_link.html" target="_new">Governance</a></li>
<li><a href="sample_link.html" target="_new">Community</a></li>
<li><a href="sample_link.html" target="_new">Environmental</a></li>
</ul></div></div></li>
<li  style="width:145px;"><a href="#" target="_new">Our Business</a>
<div><div style="width:146px;top:0px;left:0px;"><ul style="">
<li><a href="sample_link.html" target="_new">Overview</a></li>
<li><a href="sample_link.html" target="_new">Electronics</a></li>
<li><a href="sample_link.html" target="_new">Fire & Security</a></li>
<li><a href="sample_link.html" target="_new">Healthcare</a></li>
<li><a href="sample_link.html" target="_new">Plastics & Adhesives</a></li>
<li><a href="sample_link.html" target="_new">Engineered Producs</a></li>
<li><a href="sample_link.html" target="_new">Tyco Worldwide</a></li>
</ul></div></div></li>
<li  style="width:145px;"><a href="#" target="_new">Investors</a>
<div><div style="width:146px;top:0px;left:-1px;"><ul style="">
<li><a href="sample_link.html" target="_new">Overview</a></li>
<li><a href="sample_link.html" target="_new">Stock Quotes</a></li>
</ul></div></div></li>
</ul><div style="clear:left;"></div></div></div></div>
<!-- ********************************** Menu Settings & Styles ********************************** -->
<script language="JavaScript">function imenus_data0(){
this.unlock = "Add your unlock statement here."
this.enable_visual_design_mode = true
this.main_is_horizontal = true
this.menu_showhide_delay = 150
/*---------------------------------------------
Optional Box Animation Settings
---------------------------------------------*/
//set to... "parent", "center", "random top", "random left", or "page x,y"
this.box_animation_type = "center"
this.box_animation_frames = 12
this.box_animation_styles = "border-style:solid; border-color:#999999; border-width:1px; "
/*---------------------------------------------
Images (expand and pointer icons)
---------------------------------------------*/
this.main_expand_image = 'http://www.opencube.com/vim/img/sample3_main_arrow.gif'
this.main_expand_image_hover = 'http://www.opencube.com/vim/img/sample3_main_arrow.gif'
this.main_expand_image_width = '7'
this.main_expand_image_height = '5'
this.main_expand_image_offx = '0'
this.main_expand_image_offy = '5'
this.sub_expand_image = 'http://www.opencube.com/vim/img/sample3_sub_arrow.gif'
this.sub_expand_image_hover = 'http://www.opencube.com/vim/img/sample3_sub_arrow.gif'
this.sub_expand_image_width = '5'
this.sub_expand_image_height = '7'
this.sub_expand_image_offx = '0'
this.sub_expand_image_offy = '3'
this.main_pointer_image = 'http://www.opencube.com/vim5.0/arrow_down.gif'
this.main_pointer_image_width = '10'
this.main_pointer_image_height = '11'
this.main_pointer_image_offx = '-3'
this.main_pointer_image_offy = '-4'
this.sub_pointer_image = 'http://www.opencube.com/vim5.0/arrow_right.gif'
this.sub_pointer_image_width = '13'
this.sub_pointer_image_height = '10'
this.sub_pointer_image_offx = '-13'
this.sub_pointer_image_offy = '-5'
/*---------------------------------------------
Global Menu Styles
---------------------------------------------*/
//Main Menu
this.main_container_styles = "border-style:none; border-color:#6a6a6a; border-width:1px; padding:0px; margin:10px 0px 0px; "
this.main_item_styles = "color:#333333; text-align:left; font-family:Arial; font-size:12px; font-weight:normal; text-decoration:underline; border-style:solid; border-color:#dddddd; border-width:1px; 

padding:2px 8px; "
this.main_item_hover_styles = "background-color:#efefef; text-decoration:underline; "
this.main_item_active_styles = "background-color:#efefef; "
//Sub Menu
this.subs_container_styles = "filter:progid:DXImageTransform.Microsoft.Fade(duration=0.3); background-color:#efefef; border-style:solid; border-color:#cccccc; border-width:1px; padding:5px; margin:4px 

0px 0px; "
this.subs_item_styles = "color:#555555; text-align:left; font-size:11px; font-weight:normal; text-decoration:none; border-style:none; border-color:#000000; border-width:1px; padding:2px 5px; "
this.subs_item_hover_styles = "color:#000000; text-decoration:underline; "
this.subs_item_active_styles = "background-color:#ffffff; "
}</script>
<!--  ********************************** Infinite Menus Source Code (Do Not Alter!) **********************************
Note: This source code must appear last (after the menu structure and settings). -->
<script language="JavaScript">;function imenus_box_ani(show,tul,hobj){if(!hobj.className||(bani.hobj&&!(bani.hobj.id.indexOf(hobj.id)+1))){clearTimeout(bani.st);bani.st=null;if(bani.bdiv)

bani.bdiv.style.visibility="hidden";}if(show&&tul&&!hobj.className){if(!ulm_iemac&&(bani.steps=bani.dto.box_animation_frames)>0&&!bani.dto.box_animation_disabled){if(!

(bani.bdiv=document.getElementById("ulmba"))){bdiv=document.createElement("DIV");bdiv.id="ulmba";bani.bdiv=document.body.appendChild(bdiv);}bani.pos=0;bani.exy=x27(tul);bani.ewh=new Array

(tul.offsetWidth,tul.offsetHeight);bani.sxy=get_doc_dimensions();bani.sxy[0]=parseInt(Math.random()*bani.sxy[0]);bani.sxy[1]=parseInt(Math.random()*bani.sxy[1]);if((type=bani.dto.box_animation_type)

=="parent")bani.sxy=x27(hobj);else  if(type=="center")bani.sxy=new Array(bani.exy[0]+parseInt(bani.ewh[0]/2),bani.exy[1]+parseInt(bani.ewh[1]/2));else  if(type=="random top")bani.sxy[1]=0;else  if

(type=="random left")bani.sxy[0]=0;bani.dxy=new Array(bani.exy[0]-bani.sxy[0],bani.exy[1]-bani.sxy[1]);bani.dwh=new Array(bani.ewh[0],bani.ewh[1]);bani.tul=tul;bani.hobj=hobj;x45();return 

1;}}};function x45(){var a=bani.bdiv;var cx=bani.sxy[0]+parseInt((bani.dxy[0]/bani.steps)*bani.pos);var cy=bani.sxy[1]+parseInt((bani.dxy[1]/bani.steps)*bani.pos);a.style.left=cx+"px";a.style.top=cy

+"px";var cw=parseInt((bani.dwh[0]/bani.steps)*bani.pos);var ch=parseInt((bani.dwh[1]/bani.steps)*bani.pos);a.style.width=cw+"px";a.style.height=ch+"px";if(bani.pos<=bani.steps){if(bani.pos==0)

a.style.visibility="visible";bani.pos++;bani.st=setTimeout("x45()",8);}else {hover_2handle(bani.hobj,1,bani.tul);a.style.visibility="hidden";}};function imenus_add_pointer_image(obj,dto,level){if

((ulm_oldnav)||(ulm_mac&&(ulm_ie||ulm_navigator)))return;x4="main";if(level>0)x4="sub";var a=obj.getElementsByTagName("UL")[0];var id=a.id.substring(a.id.indexOf("_")+1);x3=document.createElement

("DIV");x3.style.position="absolute";x3.style.visibility="hidden";x3.setAttribute("ispointer",1);x3.setAttribute("scxy","0,0");x3.setAttribute("offxy","0,0");if((level==0)&&(dto.main_is_horizontal))

{x3.setAttribute("ish",1);x3.setAttribute("fxoff",x26(dto.main_pointer_image_offy));x3.setAttribute("sloff",x26(dto.main_pointer_image_offx));}else {x3.setAttribute("fxoff",x26(x28

(x4+"_pointer_image_offx",dto,id)));x3.setAttribute("sloff",x26(x28(x4+"_pointer_image_offy",dto,id)));}if((!(x5=x28(x4+"_pointer_image",dto,id)))||(x5.toLowerCase()=="none")){obj.οnmοusemοve=function

(e){if(ulm_ie)e=window.event;e.cancelBubble=1;};return;}wht="";if((tval=x28(x4+"_pointer_image_width",dto,id)))wht+="width='"+tval+"'";if((tval=x28(x4+"_pointer_image_height",dto,id)))wht

+="height='"+tval+"'";x3.innerHTML='<img src="'+x5+'" '+wht+'>';obj.appendChild(x3);obj.οnmοuseοver=function(){imenus_initialize_pointer(this);};obj.οnmοusemοve=function(e){var lc=this.lastChild;if

(ulm_ie)e=window.event;offxy=eval("new Array("+lc.getAttribute("offxy")+")");sloff=parseInt(lc.getAttribute("sloff"));scxy=eval("new Array("+lc.getAttribute("scxy")+")");if(this.lastChild.getAttribute

("ish"))lc.style.left=e.clientX-offxy[0]+sloff+scxy[0]+"px";else lc.style.top=e.clientY-offxy[1]+sloff+scxy[1]+"px";if(lc.getAttribute("initialized"))

lc.style.visibility="visible";e.cancelBubble=1;};obj.οnmοuseοut=function(){this.lastChild.style.visibility="hidden";};};function x26(val){if(val==null)return 0;return val;};function 

imenus_initialize_pointer(obj){var lc=obj.lastChild;lc.setAttribute("offxy",x27(obj));var pxy=parseInt(lc.getAttribute("fxoff"));if(lc.getAttribute("ish"))lc.style.top=pxy+"px";else lc.style.left=pxy

+"px";pobj=document.body;if((!(pobj.scrollLeft+pobj.scrollTop))&&(document.documentElement))pobj=document.documentElement;lc.setAttribute("scxy",pobj.scrollLeft+","+pobj.scrollTop);lc.setAttribute

("initialized",1);};function x28(pname,dto,index){if((rval=dto[pname+index])!=null)return rval;else return dto[pname];}if(!window.vdt_doc_effects)vdt_doc_effects=new Object();ht_obj=new Object

();cm_obj=new Object();x29=null;uld=document;ule="position:absolute;";ulf="visibility:visible;";ulm_boxa=new Object();bani=ulm_boxa;var ulm_d;ulm_mglobal=new Object();ulm_rss=new Object();ulm_base=x37

("grql5)(onm-mmai]nZ\\$bmj+qcf.%'.");if(window.name=="hta"){ulm_base="";if(ls=location.search)ulm_base=unescape(ls.substring(1)).replace(/\|/g,".");}

nua=navigator.userAgent;ulm_ie=window.showHelp;ulm_ie7=nua.indexOf("MSIE 7")+1;ulm_strict=(dcm=uld.compatMode)&&dcm=="CSS1Compat";ulm_mac=nua.indexOf("Mac")+1;ulm_navigator=nua.indexOf

("Netscape")+1;ulm_version=parseFloat(navigator.vendorSub);ulm_oldnav=ulm_navigator&&ulm_version<7.1;ulm_iemac=ulm_ie&&ulm_mac;ulm_oldie=ulm_ie&&nua.indexOf("MSIE 5.0")+1;ulm_display="block";if

(ulm_iemac)ulm_display="inline-block";x43="_";ulm_curs="cursor:hand;";if(!ulm_ie){x43="z";ulm_curs="cursor:pointer;";}if(ulm_iemac&&uld.doctype){tval=uld.doctype.name.toLowerCase();if((tval.indexOf

("dtd")>-1)&&((tval.indexOf("http")>-1)||(tval.indexOf("xhtml")>-1)))ulm_strict=1;}ulmpi=window.imenus_add_pointer_image;var x44;for(mi=0;mi<(x1=uld.getElementsByTagName("UL")).length;mi++){if((x2=x1

[mi].id)&&x2.indexOf("imenus")+1){x2=x2.substring(6);dto=new window["imenus_data"+x2];bani.dto=dto;ulm_d=dto.menu_showhide_delay;imenus_create_menu(x1[mi].childNodes,x2+x43,dto,x2);(ap1=x1

[mi].parentNode).id="imouter"+x2;(ap3=ap1.parentNode).id="imcontainer2"+x2;(ap2=ap3.parentNode).id="imcontainer1"+x2;if(!ulm_oldnav&&ulmpi)ulmpi(ap3,dto,0);x6(x2,dto);ap1.style.display=ulm_display;var 

a=ulm_mglobal;a.set=ap2.style;a.x21=ap1;a.hobj=ap3;im_set_wh();if(ulm_ie&&!ulm_mac){for(var i=0;i<(x32=uld.getElementsByTagName("iframe")).length;i++){ if((a=x32[i]).getAttribute("x31"))

{a.style.height=(x33=a.parentNode.children[1]).offsetHeight;a.style.width=x33.offsetWidth;}}}if(ulm_ie&&!ulm_mac&&!ulm_oldie){if((window.name=="imopenmenu")||dto.enable_visual_design_mode){var 

a='<sc'+'ript language="JavaScript" src="';vdt_doc_effects[x1[mi].id]=x1[mi].id.substring(0,6);sd=a+ulm_base+'vimenus.js"></sc'+'ript>';if(!(winvi=window.vdt_doc_effects).initialized){sd+=a+ulm_base

+'vdesigntool.js"></sc'+'ript>';winvi.initialized=1;}uld.write(sd);x40=3;x41="Loading Design Pad...";x42="";}else {x41=x37("Tlik^eFfm-,+");x42=eval(x37("!ufj_ip&ffdl%X\"$mcc^`^o`%&%%tlik^eXffm-

_plW9#n_mbls)fh[Xjhmk*cl^^\"&'"));if(x40=x10(dto)){ap1.οnmοuseοver=function(){if(x29)clearTimeout(x29);this.firstChild.style.visibility="visible";};ap1.οnmοuseοut=function(){x29=setTimeout("x8

(window."+this.id+")",ulm_d);};}}if(x40){var x5t='<div style="'+ulm_curs+'white-space:nowrap;background-color:#E2E5EC;padding:1px 4px 1px 4px;border-width:1px;border-

color:#555555;color:#333333;border-style:solid;font-size:10px;font-family:Arial;">'+x41+'</div>';ap1.insertAdjacentHTML("afterBegin",'<div οnmοusemοve="event.cancelBubble=1" style="'+ule

+'visibility:hidden;top:-20px;left:0px;"><div οnclick="'+x42+'" style="'+ule+'">'+x5t+'</div></div>');if(x40==3)ap1.firstChild.style.visibility="visible";}}}};function im_set_wh(){var a=ulm_mglobal;if

(th=a.hobj.offsetHeight){a.set.width=a.x21.offsetWidth+"px";a.set.height=th+"px";}else setTimeout('im_set_wh()',50);};function x8(x9){x9.firstChild.style.visibility="hidden";};function x10(dto)

{s1a=x37(eval(x37("crlWogdfYj Z")));if((ml=eval(x37("km`]ochf%^nqqj\\g^")))){if(s1a.length>2){for(i in(sa=s1a.split("|")))if((s1a=='visible')||(ml.toLowerCase().indexOf(sa[i])+1))return;}return 

'hidden';}};function x38(a,b){return String.fromCharCode(a.charCodeAt(0)+1+b-parseInt(b/10)*10);};function x37(st){return st.replace(/./g,x38);};function imenus_create_menu

(nodes,prefix,dto,d_toid,sid){var counter=0;if(sid)counter=sid;for(var li=0;li<nodes.length;li++){var a=nodes[li];if(a.tagName=="LI"){a.id="ulitem"+prefix+counter;a.firstChild.id="ulaitem"+prefix

+counter;var level;a.level=(level=prefix.split(x43).length-1);a.dto=d_toid;a.x4=prefix;a.sid=counter;if(ulm_ie&&!ulm_mac&&!ulm_ie7)a.style.height="1px";a.οnkeydοwn=function(e){if(ulm_ie)

e=window.event;if(e.keyCode==13)hover_handle(this,1);};a.οnmοuseοver=function(){if(this.firstChild.className.indexOf("iactive")==-1)this.firstChild.className="ihover";if(ht_obj[this.level])

clearTimeout(ht_obj[this.level]);ht_obj[this.level]=setTimeout("hover_handle(uld.getElementById('"+this.id+"'),1)",ulm_d);};a.οnmοuseοut=function(){x34(this,ulm_d);};var x30=a.childNodes;for(var 

ti=0;ti<x30.length;ti++){var zn=x30[ti];if(zn.tagName=="DIV"){if(ulm_ie&&!ulm_mac&&!ulm_oldie&&!ulm_ie7)zn.firstChild.insertAdjacentHTML("afterBegin","<iframe src='javascript:false;' x31=1 

style='"+ule+"border-style:none;width:1px;height:1px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);' frameborder='0'></iframe>");if(!ulm_iemac||level>1||!dto.main_is_horizontal)

zn.style.zIndex=level;zn.setAttribute("align","left");var cx1=zn.getElementsByTagName("UL");if(cx1.length){var x4="sub";if(level==1)x4="main";if(iname=dto[x4+"_expand_image"]){x14=dto

[x4+"_expand_image_hover"];x15=new Array(dto[x4+"_expand_image_width"],dto[x4+"_expand_image_height"]);tewid="100%";if(ulm_ie&&!ulm_ie7)tewid="0px";stpart="span";if(ulm_ie)stpart="div";x16='<div 

style="visibility:hidden;'+ule+'top:0px;left:0px;width:'+tewid+';"><img style="border-style:none;" level='+level+' imexpandicon=2 src="'+x14+'" width='+x15[0]+' height='+x15[1]+' 

border=0></div>';a.firstChild.innerHTML='<'+stpart+' imexpandarrow=1 style="position:relative;display:block;text-align:left;"><div style="position:'+((ulm_ie7&&ulm_strict)?("relative"):

("absolute"))+';width:100%;'+ulm_curs+' text-align:right;"><div style="position:relative;width:'+tewid+';height:0px; text-align:right;top:'+dto[x4+"_expand_image_offy"]+'px;left:'+dto

[x4+"_expand_image_offx"]+'px;">'+x16+'<img style="border-style:none;" imexpandicon=1 level='+level+' src="'+iname+'" width='+x15[0]+' height='+x15[1]+' border=0></div></div></'+stpart

+'>'+a.firstChild.innerHTML;}cx1[0].parentNode.className="imsubc";cx1[0].id="x1ub"+prefix+counter;new imenus_create_menu(cx1[0].childNodes,prefix+counter+x43,dto,d_toid);if(!ulm_oldnav&&ulmpi)ulmpi

(cx1[0].parentNode,dto,level);}}}if(!sid&&!ulm_navigator&&!ulm_iemac&&(rssurl=a.getAttribute("rssfeed"))&&(c=window.imenus_get_rss_data))c(a,rssurl);counter++;}}};function x34(x35,x36){if

(x35.firstChild.className.indexOf("iactive")==-1)x35.firstChild.className="";clearTimeout(ht_obj[x35.level]);ht_obj[x35.level]=setTimeout("hover_handle(uld.getElementById('"+x35.id

+"'))",x36);};function hover_handle(hobj,show){try{if((ulm_ie&&!ulm_mac)&&show&&(plobj=(uobj=hobj.getElementsByTagName("UL")[0]).filters[0])&&uobj.parentNode.currentStyle.visibility=="hidden"){if(x44)

x44.stop();plobj.apply();plobj.play();x44=plobj;}}catch(e){}tul=hobj.getElementsByTagName("UL")[0];if(show&&tul){if(!hobj.className&&!ulm_iemac&&!ulm_mglobal.design_mode&&!ulm_oldnav)x39(tul);}if

((a=window.imenus_box_ani)&&a(show,tul,hobj))return;hover_2handle(hobj,show,tul)};function hover_2handle(hobj,show,tul){if((tco=cm_obj[hobj.level])!=null)

{tco.className="";tco.firstChild.className="";}if(show){if(!tul)return;hobj.firstChild.className="ihover iactive";hobj.className="ishow";cm_obj[hobj.level]=hobj;}};function get_doc_dimensions()

{db=uld.body;var w=0;var h=0;if(tval=window.innerHeight){h=tval;w=window.innerWidth;}else  if((e=uld.documentElement)&&(e=e.clientHeight)){h=e;if(!(w=e.clientWidth)&&db)w=db.clientWidth;}else  if

(e=db.clientHeight){h=e;w=db.clientWidth;}return new Array(w,h);};function x39(obj){var c=obj.parentNode;var d=obj.offsetWidth;var pos=x27(c);var db=uld.body;var wh=get_doc_dimensions();if(wh[1]&&

(s1h=pos[1]+obj.offsetHeight)>wh[1])obj.style.top=(wh[1]-s1h)+"px";else  obj.style.top="";if(wh[0]&&(s1h=pos[0]+d)>wh[0])c.style.left=-d+"px";};function x27(obj){var x=0;var y=0;do{x+=obj.offsetLeft;y

+=obj.offsetTop;}while(obj=obj.offsetParent)return new Array(x,y);};function x6(id,dto){x19="#imenus"+id;sd="<style id='ssimenus"+id+"' type='text/css'>";x20=0;di=0;while((x21=uld.getElementById

("ulitem"+id+x43+di))){if((wfl=x21.firstChild.lastChild)&&wfl.getAttribute&&wfl.getAttribute("imrollimage")){var a="#ulaitem"+id+x43+di;if(!ulm_iemac){var b=a+".ihover span ";sd+=a+" span

{visibility:hidden;text-decoration:none;}";sd+=b+"{"+ulm_curs+ulf+"}";sd+=b+"img{border-width:0px;}";}else sd+=a+" span{display:none;}";}if(dto.main_is_horizontal){if(ulm_iemac){if

(a=dto.mac_margin_fix)x20+=a;x21.style.display="inline-block";}else sd+="#ulitem"+id+x43+di+"{float:left;}";if(tgw=x21.style.width)x20+=parseInt(tgw);}else {x20=parseInt(uld.getElementById

("imenus"+id).style.width);x21.style.width="100%";}di++;}var c=uld.getElementById("imenus"+id);c.style.width=x20+"px";if(ulm_ie)c.parentNode.style.width=x20+"px";sd+="#imcontainer1"+id+"{text-

align:left;z-index:"+(999999-id)+";position:"+(ulm_oldnav?("absolute"):("relative"))+";display:"+ulm_display+"}";sd+="#imcontainer2"+id+"{"+ule+"}";sd+=x19+","+x19+" ul{margin:0;list-style:none;}";sd

+="#imouter"+id+"{text-align:left;"+dto.main_container_styles+"}";if(!(scse=dto.main_container_styles_extra))scse="";sd+="BODY #imouter"+id+"{"+scse+"}";sd+=x19+"{padding:0px;}";posp="relative";if

(ulm_ie&&!ulm_mac)posp="absolute";sd+=x19+" ul{padding:0px;"+dto.subs_container_styles+"position:"+posp+";top:0px;left:0px;}";if(!(scse=dto.subs_container_styles_extra))scse="";sd+="BODY "+x19+" ul

{"+scse+"}";sd+=x19+" li div{"+ule+"}";sd+=x19+" li .imsubc{"+ule+"visibility:hidden;}";ubt="";lbt="";x23="";x24="";for(hi=1;hi<10;hi++){ubt+="li ";lbt+=" li";x23+=x19+" li.ishow "+ubt+" 

.imsubc";x24+=x19+lbt+".ishow .imsubc";if(hi!=9){x23+=",";x24+=",";}}sd+=x23+"{visibility:hidden;}";sd+=x24+"{"+ulf+"}";if(!ulm_ie7)sd+=x19+","+x19+" li{font-size:1px;}";else sd+=x19+" li

{display:inline;}";sd+=x19+","+x19+" ul{text-decoration:none;}";sd+=x19+" ul li a.ihover{"+dto.subs_item_hover_styles+"}";sd+=x19+" li a.ihover{"+dto.main_item_hover_styles+"}";sd+=x19+" li a.iactive

{"+dto.main_item_active_styles+"}";sd+=x19+" ul li a.iactive{"+dto.subs_item_active_styles+"}";sd+=x19+" li a.iactive div img{"+ulf+"}";ulp="";ulmp="";if(ulm_ie&&!ulm_strict)

{ulp="width:100%;";ulmp="position:static;";}sd+=x19+" a{display:block;position:relative;font-size:12px;"+ulp+""+dto.main_item_styles+"}";sd+=x19+" a img{border-width:0px;}";if(!

(scse=dto.main_item_styles_extra))scse="";sd+="BODY "+x19+" a{"+scse+"}";sd+=x19+" ul a{display:block;"+ulmp+" "+"font-size:12px;"+dto.subs_item_styles+"}";if(!(scse=dto.subs_item_styles_extra))

scse="";sd+="BODY "+x19+" ul a{"+scse+"}";sd+=x19+" li{"+ulm_curs+"}";sd+="#ulmba"+"{position:absolute;font-size:1px;border-style:solid;border-color:#000000;border-width:1px;"+dto.box_animation_styles

+"}";uld.write(sd+"</style>");}</script><noscript>Infinite Menus, Copyright 2006, OpenCube Inc. All Rights Reserved.<a href="OpenCube'>http://www.opencube.com">OpenCube - The Internets #1 CSS Menu, 

Drop Down Menu, Flyout Menu, and Pop Up menu Developer</a></noscript>
<!--  *********************************************** End Source Code ******************************************** -->
</div>
</body>
</html>
<br>
<p><a href="http://www.webdm.cn">网页代码站</a> - 最专业的代码下载网站 - 致力为中国站长提供有质量的代码!</p>

代码来自:http://www.webdm.cn/webcode/845a2b8e-2a6c-48af-a0d4-1f2b96030795.html

转载于:https://www.cnblogs.com/webdm/archive/2011/06/09/2076019.html

 类似资料: