?? menu10_com.js
字號(hào):
if(ShwFlg)AfterCloseAll();ShwFlg=M_Clckd=false}}
function Rmbr(CntPtr){
var Mbr=CntPtr.FrstMbr,St;
while(Mbr!=null){
if(Mbr.DoRmbr){
HiliteItem(Mbr);if(Mbr.CCn&&RememberStatus==1){St=Mbr.CCn.style;St.visibility=M_Show;Rmbr(Mbr.CCn)}break}
else Mbr=Mbr.PrvMbr}}
function Init(CPt){
var Mb=CPt.FrstMbr;
RLvl++;
CPt.style.visibility=CPt.mif.style.visibility=RLvl==1?M_Show:M_Hide;
CPt.Shw=RLvl==1?1:0;
while(Mb!=null){if(Mb.Hilite)LowItem(Mb);if(Mb.CCn)Init(Mb.CCn);Mb=Mb.PrvMbr}
RLvl--}
function ClrAllChlds(Pt){
var PSt,Pc;
while(Pt){
if(Pt.Hilite){
Pc=Pt;if(Pc!=CurOvr)LowItem(Pt);
if(Pt.CCn) {PSt=Pt.CCn.style;if(Pc!=CurOvr){PSt.visibility=Pt.CCn.mif.style.visibility=M_Hide;Pt.CCn.Shw=0}ClrAllChlds(Pt.CCn.FrstMbr)}
break}
Pt=Pt.PrvMbr}}
function SetItem(Pntr,x){while(Pntr!=null){Pntr.DoRmbr=x;Pntr=Pntr.Ctnr.Cllr}}
function GoTo(){
if(UnfoldsOnClick&&!M_Clckd&&this.Arr[3]){M_Clckd=true;OpenMenuII(this)}
else if(this.Arr[1]){
status="";LowItem(this);IniFlg=true;Initiate();
if(this.Arr[1].indexOf("javascript:")!=-1)eval(this.Arr[1]);
else if(DcLoc.location.href!=BaseHref+this.Arr[1])DcLoc.location.href=BaseHref+this.Arr[1]}}
function HiliteItem(P){
if(P.rob)P.style.backgroundImage="url(\""+P.rib2+"\")";
if(P.ro){var Lc=P.Lvl==1?FLoc:ScLoc;Lc.document.images[P.rid].src=P.ri2}
else{ if(P.Arr[7])P.style.backgroundColor=P.Arr[7];if(P.Arr[9])P.style.color=P.Arr[9];
if(HoverBold)P.style.fontWeight="bold";if(HoverItalic)P.style.fontStyle="italic";
if(HoverUnderLine)P.style.textDecoration="underline";
if(HoverTextSize)P.style.fontSize=parseInt(P.style.fontSize)+HoverTextSize+P_X;
if(HoverVariant)P.style.fontVariant="small-caps"}
if(HoverBorder){P.style.borderColor=HoverBorderColor;P.style.borderWidth=BorderWidthHover;P.style.borderStyle='solid';}
P.Hilite=1}
function LowItem(P){
P.Hilite=0;
if(P.rob)P.style.backgroundImage="url(\""+P.rib1+"\")";
if(P.ro){var Lc=P.Lvl==1?FLoc:ScLoc;Lc.document.images[P.rid].src=P.ri1}
else{ if(P.Arr[6])P.style.backgroundColor=P.Arr[6];if(P.Arr[8])P.style.color=P.Arr[8];
if(HoverBold)P.style.fontWeight="normal";if(HoverItalic)P.style.fontStyle="normal";
if(HoverUnderLine)P.style.textDecoration="none";
if(HoverTextSize)P.style.fontSize=parseInt(P.style.fontSize)-HoverTextSize+P_X;
if(HoverVariant)P.style.fontVariant="normal"}
if(HoverBorder){P.style.borderColor=P.style.backgroundColor;P.style.borderWidth=0;P.style.borderStyle='none';}
}
function OpenMenu(){
if(Ldd&&Crtd){
if(UnfoldsOnClick&&!M_Clckd){CurOvr=this;IniFlg=false;ClrAllChlds(this.Ctnr.FrstMbr);HiliteItem(this);status=this.Arr[16]}
else OpenMenuII(this)}}
function OpenMenuII(Ptr){
if(OpnTmr)clearTimeout(OpnTmr);
if(Ptr.Arr[3]&&!Ptr.CCn){
RLvl=Ptr.Lvl;
Ptr.CCn=CreateMenuStructure(Ptr.MN+"_",Ptr.Arr[3],Ptr);
SizeMenu(Ptr.CCn);
var Ti,Li,Hi,CCw,CCh,STp,SLt,
MWt=parseInt(Ptr.style.width)+Ptr.lx,MHt=parseInt(Ptr.style.height)+Ptr.tx,BRW=RLvl==1?BorderWidthMain:BorderWidthSub;
if(RightToLeft)CCw=parseInt(Ptr.CCn.style.width);
if(BottomUp)CCh=parseInt(Ptr.CCn.style.height);
if(RLvl<=FirstLineHorizontal){Hi=1;Li=parseInt(Ptr.style.left)-BRW;Ti=0}
else{Hi=Li=0;Ti=parseInt(Ptr.style.top)-BRW}
if(Hi){STp=BottomUp?Ti-CCh:Ti+MHt+2*BRW;SLt=RightToLeft?Li+MWt-CCw:Li}
else{ SLt=RightToLeft?Li-CCw+ChildOverlap*MWt+BRW:Li+(1-ChildOverlap)*MWt;
STp=RLvl==1&&AcrssFrms?BottomUp?Ti-CCh+MHt:Ti:BottomUp?Ti-CCh+(1-ChildVerticalOverlap)*MHt+2*BRW:Ti+ChildVerticalOverlap*MHt+BRW}
PosMenu(Ptr.CCn,STp,SLt);
RLvl=0}
CurOvr=Ptr;
IniFlg=false;ClrAllChlds(Ptr.Ctnr.FrstMbr);
if(!Ptr.Hilite)HiliteItem(Ptr);
//if(Exp6Plus){FStr="";if(MenuShadow)FStr+=MenuShadow;if(FStr!="")Ptr.filter=FStr}
if(Ptr.CCn!=null&&!Ptr.CCn.Shw)RememberStatus?Unfld():OpnTmr=setTimeout("Unfld()",UnfoldDelay);
status=Ptr.Arr[16]}
function Unfld(){
var P=CurOvr,CSt=P.Ctnr.style,CCnt=P.CCn,CCSt=CCnt.style,CCmSt=CCnt.mif.style,
THt=parseInt(P.style.height),TWt=parseInt(P.style.width),TLt=AcrssFrms&&P.Lvl==1&&!FirstLineHorizontal?0:parseInt(CSt.left),
TTp=AcrssFrms&&P.Lvl==1&&FirstLineHorizontal?0:parseInt(CSt.top),CCW=parseInt(CCSt.width),CCH=parseInt(CCSt.height),
TS=ExpYes?SCmplnt?ScHtml.scrollTop:ScLoc.document.body.scrollTop:ScLoc.pageYOffset,
LS=ExpYes?SCmplnt?ScHtml.scrollLeft:ScLoc.document.body.scrollLeft:ScLoc.pageXOffset,
SLt=AcrssFrms&&P.Lvl==1?CCnt.OrgLeft+TLt+LS:CCnt.OrgLeft+TLt, STp=AcrssFrms&&P.Lvl==1? CCnt.OrgTop+TTp+TS:CCnt.OrgTop+TTp;
if(!ShwFlg){ShwFlg=true;BeforeFirstOpen()}
if(MenuWrap){
if(RightToLeft){if(SLt<LS)SLt=P.Lvl==1?LS:SLt+(CCW+(1-2*ChildOverlap)*TWt);if(SLt+CCW>SWinW+LS)SLt=SWinW+LS-CCW}
else{if(SLt+CCW>SWinW+LS)SLt=P.Lvl==1?SWinW+LS-CCW:SLt-(CCW+(1-2*ChildOverlap)*TWt);if(SLt<LS)SLt=LS}
if(BottomUp){if(STp<TS)STp=P.Lvl==1?TS:STp+(CCH-(1-2*ChildVerticalOverlap)*THt);if(STp+CCH>SWinH+TS)STp=SWinH+TS-CCH+0}
else{if(STp+CCH>TS+SWinH)STp=P.Lvl==1?STp=TS+SWinH-CCH:STp-CCH+(1-2*ChildVerticalOverlap)*THt;if(STp<TS)STp=TS}}
CCSt.top=CCmSt.top=STp+P_X;CCSt.left=CCmSt.left=SLt+P_X;
if(Exp6Plus&&MenuSlide){CCnt.filters[0].Apply();CCnt.filters[0].play()}
CCSt.visibility=CCmSt.visibility=M_Show}
function CloseMenu()
{
if(Ldd&&Crtd){status="";
if(this==CurOvr) {
if(OpnTmr)clearTimeout(OpnTmr);
if(CloseTmr)clearTimeout(CloseTmr);
IniFlg=true;
CloseTmr=setTimeout("Initiate(CurOvr)",DissapearDelay)
//if(Exp6Plus)TS.filter=""
}}}
function CntnrSetUp(NoOff,WMu,Mc,TL){
var x=eval(WMu+"[10]")!=""?eval(WMu+"[10]"):BorderColor,TS=this.style;
this.Lvl=RLvl;this.FrstMbr=null;this.NrItms=NoOff;this.Cllr=Mc;this.Shw=0;this.OrgLeft=this.OrgTop=0;
if(x)TS.backgroundColor=x;
TS.zIndex=RLvl+Ztop;if(ExpYes&&!MacExp5)this.mif.style.zIndex=TS.zIndex-1;
if(Nav_Op&&!Opr7&&MenuOpacity)TS.MozOpacity=parseInt(MenuOpacity.substring(MenuOpacity.indexOf("=")+1,MenuOpacity.indexOf(")")))/105;
if(Exp6Plus)
{
if (!TL) {
FStr="";
if(MenuSlide&&RLvl!=1)FStr=MenuSlide;
if(DropMenuShadow)FStr+=DropMenuShadow;
if(MenuOpacity)FStr+=MenuOpacity;
if(FStr!="")TS.filter=FStr
}
}
if(ExpYes&&!MacExp5&&OverFormElements)this.mif.style.filter="Alpha(Opacity=0)"}
function MbrSetUp(MbC,PrMmbr,WMu,TL){
var Lctn=RLvl==1?FLoc:ScLoc,t,a,ta2=this.Arr[2],Tfld=this.Arr[0];
this.PrvMbr=PrMmbr;this.Lvl=RLvl;this.Ctnr=MbC;this.CCn=this.ai=null;this.Hilite=this.DoRmbr=this.Clckd=this.ro=this.rob=this.lx=this.tx=this.ltp=this.tpd=0;
this.OM=OpenMenu;this.MN=WMu;this.style.overflow="hidden";
this.style.cursor=(this.Arr[1]||(RLvl==1&&UnfoldsOnClick))?ExpYes?"hand":"pointer":"default";
if(Tfld.indexOf("rollover")!=-1){
this.ro=1;this.ri1=Tfld.substring(Tfld.indexOf("?")+1,Tfld.lastIndexOf("?"));this.ri2=Tfld.substring(Tfld.lastIndexOf("?")+1,Tfld.length);this.rid=WMu+"i";
Tfld="<img src=\""+this.ri1+"\" name=\""+this.rid+"\">"}
this.value=Tfld;
if(!this.Arr[6])this.Arr[6]=LowBgColor;if(this.Arr[6]&&!this.ro)this.style.backgroundColor=this.Arr[6];
if(!this.Arr[7])this.Arr[7]=HighBgColor;
if(!this.Arr[8])this.Arr[8]=FontLowColor;this.style.color=this.Arr[8];
if(!this.Arr[9])this.Arr[9]=FontHighColor;
if(!this.Arr[11])this.Arr[11]=FontFamily;this.style.fontFamily=this.Arr[11];
if(this.Arr[12]==-1)this.Arr[12]=FontSize;this.style.fontSize=this.Arr[12]*(NavYes?1:FntFc)+"px";
if(this.Arr[13]==-1)this.Arr[13]=FontBold;this.style.fontWeight=this.Arr[13]?"bold":"normal";
if(this.Arr[14]==-1)this.Arr[14]=FontItalic;this.style.fontStyle=this.Arr[14]?"italic":"normal";
if(!this.Arr[15])this.Arr[15]=MenuTextCentered;this.style.textAlign=this.Arr[15];
if(!this.Arr[16])this.Arr[16]=this.Arr[1];
if(ta2){ if(ta2.indexOf("rollover")==-1)this.style.backgroundImage="url(\""+ta2+"\")";
else{ this.rob=1;this.rib1=ta2.substring(ta2.indexOf("?")+1,ta2.lastIndexOf("?"));this.rib2=ta2.substring(ta2.lastIndexOf("?")+1,ta2.length);
this.style.backgroundImage="url(\""+this.rib1+"\")";
this.style.backgroundRepeat="no-repeat";
this.style.backgroundPosition=BgImgLeftOffset+"px"}}
if(Tfld.indexOf("<")==-1){t=Lctn.document.createTextNode(Tfld);this.appendChild(t)}
else this.innerHTML=Tfld;
if(this.Arr[3]){
a=RLvl<=FirstLineHorizontal?BottomUp?9:3:RightToLeft?6:0;
if(Arrws[a]){
t=Lctn.document.createElement("img");this.appendChild(t);
t.style.position="absolute";t.src=Arrws[a];t.style.width=Arrws[a+1]*FntFc+P_X;t.style.height=Arrws[a+2]*FntFc+P_X;this.ai=t}}
if(ExpYes){this.onselectstart=CnclSlct;this.onmouseover=OpenMenu;this.onmouseout=CloseMenu;this.onclick=GoTo}
else{this.addEventListener("mouseover",OpenMenu,false); this.addEventListener("mouseout",CloseMenu,false);
this.addEventListener("click",GoTo,false)}
}
function CreateMenuStructure(MNm,No,Mcllr){
RLvl++;
var i,Mbr,PMb=null,WMnu=MNm+"1",MWd=eval(WMnu+"[5]")*FntFc,MHt=eval(WMnu+"[4]")*FntFc,
Lctn=RLvl==1?FLoc:ScLoc,MbC=Lctn.document.createElement("div"),MIF=!ExpYes||MacExp5||!OverFormElements?MbC:Lctn.document.createElement("iframe");
Lctn.document.body.appendChild(MbC);
if(ExpYes&&!MacExp5&&OverFormElements){MIF.src="http://www.codeproject.com/script/HVMenu/blank.html";Lctn.document.body.appendChild(MIF)}
MbC.style.position=MIF.style.position="absolute";
MbC.style.visibility=MIF.style.visibility=M_Hide;
MbC.mif=MIF;
MbC.SetUp=CntnrSetUp;MbC.SetUp(No,MNm+"1",Mcllr,(MNm=="Menu"));
for(i=1;i<No+1;i++){
WMnu=MNm+eval(i);
Mbr=Lctn.document.createElement("div");Mbr.style.position="absolute";Mbr.style.visibility="inherit";MbC.appendChild(Mbr);
Mbr.Arr=eval(WMnu);if(!Mbr.Arr[4])Mbr.Arr[4]=MHt;if(!Mbr.Arr[5])Mbr.Arr[5]=MWd;
Mbr.SetUp=MbrSetUp;Mbr.SetUp(MbC,PMb,WMnu, (MNm=="Menu"));
if(Mbr.Arr[3]&&!BuildOnDemand){Mbr.CCn=CreateMenuStructure(WMnu+"_",Mbr.Arr[3],Mbr)}
PMb=Mbr}
MbC.FrstMbr=Mbr;
RLvl--;return(MbC)}
function CreateMenuStructureAgain(MNm,No){
var Mbr=FrstCntnr.FrstMbr,i,WMnu;
if(!BuildOnDemand) {RLvl++;for(i=No;i>0;i--){WMnu=MNm+eval(i);if(Mbr.Arr[3])Mbr.CCn=CreateMenuStructure(WMnu+"_",Mbr.Arr[3],Mbr);Mbr=Mbr.PrvMbr}RLvl--}
else{while(Mbr){Mbr.CCn=null;Mbr=Mbr.PrvMbr}}}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -