menu10_com.js
上传用户:benyan892
上传日期:2010-01-28
资源大小:158k
文件大小:21k
源码类别:

网络截获/分析

开发平台:

Visual C++

  1. /***********************************************
  2. * (c) Ger Versluis 2000 version 10.71 8 May 2004    *
  3. * You may use this script on non commercial sites.           *
  4. * www.burmees.nl/menu           *
  5. ************************************************/
  6. if(document.getElementById){
  7. var  AgntUsr=navigator.userAgent.toLowerCase(),
  8. AppVer=navigator.appVersion.toLowerCase(),
  9. Opr7=AgntUsr.indexOf("opera 7")!=-1||AgntUsr.indexOf("opera/7")!=-1?true:false;
  10. if((AgntUsr.indexOf("opera")==-1||Opr7)){
  11. var NavYes=((AgntUsr.indexOf("mozilla")!=-1&&AgntUsr.indexOf("compatible")==-1)||Opr7)?true:false,
  12. ExpYes=(AgntUsr.indexOf("msie")!=-1&&!Opr7)? true:false;
  13. if(MenuUsesFrames&&!parent.frames[0])MenuUsesFrames=0;
  14. var  Exp6Plus=((AppVer.indexOf("msie 6")!=-1||AppVer.indexOf("msie 7")!=-1)&&!Opr7)?true:false,
  15. MacExp5=(AppVer.indexOf("mac")!=-1&&AppVer.indexOf("msie 5")!=-1)?true:false,
  16. FLoc,ScLoc,DcLoc,SLdAgnWin,FWinH,FColW,SColW,DColW,
  17. SWinW,SWinH,FWinW,
  18. RLvl=0,FntFc=1,StaticPos=0,Ztop=100,
  19. FrstCreat=true,Ldd=false,Crtd=false,FCmplnt=false,SCmplnt=false,M_Clckd=false,IniFlg=false,ShwFlg=false,AcrssFrms=true,
  20. FrstCntnr=null,CurOvr=null,FHtml=null,ScHtml=null,CloseTmr=null,OpnTmr=null,RmbrNow=null,
  21. FStr="",M_Hide="hidden",M_Show="visible",P_X="px",
  22. M_StrtTp=StartTop,M_StrtLft=StartLeft,
  23. Par=MenuUsesFrames?parent:window,Doc=Par.document,Bod=Doc.body,Trigger=NavYes?Par:Bod,
  24. Nav_Op=NavYes&&AgntUsr.indexOf("gecko/")!=-1&&parseInt(AgntUsr.substring(AgntUsr.indexOf("gecko/")+6,AgntUsr.indexOf("gecko/")+12))>=200303?true:false,
  25. InitLdd,LdTmr=setInterval("ChckInitLd()",100)}}
  26. function ChckInitLd(){
  27. InitLdd=ExpYes?
  28. MenuUsesFrames?
  29. Par.frames[FirstLineFrame].document.readyState=="complete"&&Par.frames[SecLineFrame].document.readyState=="complete"?1:0:
  30. Par.document.readyState=="complete"?1:0:
  31. MenuUsesFrames?
  32. Par.frames[FirstLineFrame].document.body&&Par.frames[SecLineFrame].document.body?1:0:
  33. Par.document.body?1:0;
  34. if(InitLdd) {
  35. clearInterval(LdTmr);
  36. Go()}}
  37. function CnclSlct(){
  38. return false}
  39. function RePos(){
  40. FWinW=ExpYes?FCmplnt?FHtml.clientWidth:FLoc.document.body.clientWidth:FLoc.innerWidth;
  41. FWinH=ExpYes?FCmplnt?FHtml.clientHeight:FLoc.document.body.clientHeight:FLoc.innerHeight;
  42. SWinW=ExpYes?SCmplnt?ScHtml.clientWidth:ScLoc.document.body.clientWidth:ScLoc.innerWidth;
  43. SWinH=ExpYes?SCmplnt?ScHtml.clientHeight:ScLoc.document.body.clientHeight:ScLoc.innerHeight;
  44. if(MenuCentered.indexOf("justify")!=-1&&FirstLineHorizontal){
  45. ClcJus();
  46. var P=FrstCntnr.FrstMbr,W=Menu1[5], a=BorderBtwnMain?NoOffFirstLineMenus+1:2,i,
  47. LftXtra=(NavYes&&!Opr7)||MacExp5||FCmplnt?LeftPaddng:0;
  48. FrstCntnr.style.width=NoOffFirstLineMenus*W*FntFc+a*BorderWidthMain+P_X;
  49. for(i=0;i<NoOffFirstLineMenus;i++){
  50. P.style.width=W*FntFc-(P.value.indexOf("<")==-1?LftXtra:0)+P_X;
  51. if(P.ai&&!RightToLeft)P.ai.style.left=BottomUp?W-Arrws[10]-2+P_X:W-Arrws[4]-2+P_X;
  52. P=P.PrvMbr}}
  53. StaticPos=-1;
  54. ClcRl();
  55. if(TargetLoc)ClcTrgt();
  56. ClcLft();
  57. ClcTp();
  58. PosMenu(FrstCntnr,StartTop,StartLeft);
  59. if(RememberStatus)StMnu()}
  60. function UnLdd(){
  61. Ldd=Crtd=false;
  62. SetMenu="0";
  63. var M=FrstCntnr?FrstCntnr.FrstMbr:null;
  64. if(ExpYes){
  65. while(M!=null){
  66. if(M.CCn) {
  67. MakeNull(M.CCn);
  68. M.CCn=null}
  69. M=M.PrvMbr}}
  70. LdTmr=setInterval("ChckLdd()",100)}
  71. function UnLddTotal(){
  72. MakeNull(FrstCntnr);
  73. FrstCntnr=RmbrNow=FLoc=ScLoc=DcLoc=SLdAgnWin=CurOvr=CloseTmr=Doc=Bod=Trigger=null}
  74. function MakeNull(P){
  75. var M=P.FrstMbr,Mi;
  76. while(M!=null){
  77. Mi=M;
  78. if(M.CCn) {
  79. MakeNull(M.CCn);
  80. M.CCn=null}
  81. M=M.PrvMbr;
  82. Mi.PrvMbr=null;
  83. Mi=null}
  84. P.FrstMbr=null}
  85. function ChckLdd(){
  86. if(!ExpYes){
  87. if(ScLoc.document.body){
  88. clearInterval(LdTmr);
  89. Go()}}
  90. else if(ScLoc.document.readyState=="complete"){
  91. if(LdTmr) clearInterval(LdTmr);
  92. Go()}}
  93. function Go(){
  94. if(!Ldd){
  95. Crtd=false;
  96. Ldd=true;
  97. BeforeStart();
  98. if(ScaleMenu){
  99. if(document.defaultView&&document.defaultView.getComputedStyle)
  100. FntFc=parseInt(document.defaultView.getComputedStyle(document.body,'').getPropertyValue("font-size"))/16;
  101. else if(ExpYes&&document.body.currentStyle)
  102. FntFc=parseInt(document.body.currentStyle.fontSize)/12}
  103. status="Building menu";
  104. FLoc=MenuUsesFrames?parent.frames[FirstLineFrame]:window;
  105. ScLoc=MenuUsesFrames?parent.frames[SecLineFrame]:window;
  106. DcLoc=MenuUsesFrames?parent.frames[DocTargetFrame]:window;
  107. if(MenuUsesFrames){
  108. if(!FLoc)FLoc=window;
  109. if(!ScLoc)ScLoc=window;
  110. if(!DcLoc)DcLoc=window}
  111. if(FLoc==ScLoc)AcrssFrms=false;
  112. if(AcrssFrms)FirstLineHorizontal=MenuFramesVertical?0:FirstLineHorizontal?FirstLineHorizontal:1;
  113. if(Exp6Plus||Opr7){
  114. FHtml=FLoc.document.getElementsByTagName("HTML")[0];
  115. ScHtml=ScLoc.document.getElementsByTagName("HTML")[0];
  116. FCmplnt=FLoc.document.compatMode.indexOf("CSS")==-1?false:true;
  117. SCmplnt=ScLoc.document.compatMode.indexOf("CSS")==-1?false:true}
  118. FWinW=ExpYes?FCmplnt?FHtml.clientWidth:FLoc.document.body.clientWidth:FLoc.innerWidth;
  119. FWinH=ExpYes?FCmplnt?FHtml.clientHeight:FLoc.document.body.clientHeight:FLoc.innerHeight;
  120. SWinW=ExpYes?SCmplnt?ScHtml.clientWidth:ScLoc.document.body.clientWidth:ScLoc.innerWidth;
  121. SWinH=ExpYes?SCmplnt?ScHtml.clientHeight:ScLoc.document.body.clientHeight:ScLoc.innerHeight;
  122. FColW=FLoc.document.body;
  123. SColW=ScLoc.document.body;
  124. DColW=ScLoc.document.body;
  125. if(TakeOverBgColor)FColW.style.backgroundColor=AcrssFrms?SColW.bgColor:DColW.bgColor;
  126. if(MenuCentered.indexOf("justify")!=-1&&FirstLineHorizontal)ClcJus();
  127. if(FrstCreat||FLoc==ScLoc)FrstCntnr=CreateMenuStructure("Menu",NoOffFirstLineMenus,null);
  128. else CreateMenuStructureAgain("Menu",NoOffFirstLineMenus);
  129. ClcRl();
  130. if(TargetLoc)ClcTrgt();
  131. ClcLft();
  132. ClcTp();
  133. PosMenu(FrstCntnr,StartTop,StartLeft);
  134. Crtd=true;
  135. SLdAgnWin=ExpYes?ScLoc.document.body:ScLoc;
  136. SLdAgnWin.onunload=UnLdd;
  137. if(ExpYes)Trigger.onunload=UnLddTotal;
  138. Trigger.onresize=RePos;
  139. AfterBuild();
  140. if(RememberStatus)StMnu();
  141. FrstCreat=false;
  142. if(MenuVerticalCentered=="static"&&!AcrssFrms)setInterval("KeepPos()",250);
  143. if(!ExpYes)RePos();
  144. IniFlg=true;
  145. Initiate();
  146. status="Menu ready for use"}}
  147. function KeepPos(){
  148. var TS=ExpYes?SCmplnt?ScHtml.scrollTop:ScLoc.document.body.scrollTop:ScLoc.pageYOffset;
  149. if(TS!=StaticPos){
  150. FrstCntnr.OrgTop=StartTop+TS;
  151. FrstCntnr.style.top=FrstCntnr.OrgTop+P_X;
  152. StaticPos=TS}}
  153. function ClcRl(){
  154. StartTop=M_StrtTp<1&&M_StrtTp>0?M_StrtTp*FWinH:M_StrtTp;
  155. StartLeft=M_StrtLft<1&&M_StrtLft>0?M_StrtLft*FWinW:M_StrtLft}
  156. function ClcJus(){
  157. var a=BorderBtwnMain?NoOffFirstLineMenus+1:2,
  158. Sz=Math.round((PartOfWindow*FWinW-a*BorderWidthMain)/NoOffFirstLineMenus),i,j;
  159. for(i=1;i<NoOffFirstLineMenus+1;i++){
  160. j=eval("Menu"+i);
  161. j[5]=Sz}
  162. StartLeft=0}
  163. function ClcTrgt(){
  164. var TLoc=FLoc.document.getElementById(TargetLoc);
  165. while(TLoc){
  166. StartTop+=TLoc.offsetTop;
  167. StartLeft+=TLoc.offsetLeft;
  168. TLoc=TLoc.offsetParent}}
  169. function ClcLft(){
  170. if(MenuCentered.indexOf("left")==-1){
  171. var Sz=FWinW-parseInt(FrstCntnr.style.width);
  172. StartLeft+=MenuCentered.indexOf("right")!=-1?Sz:Sz/2;
  173. if(StartLeft<0)StartLeft=0}}
  174. function ClcTp(){
  175. if(MenuVerticalCentered!="top"&&MenuVerticalCentered!="static"){
  176. var Sz=FWinH-parseInt(FrstCntnr.style.height);
  177. StartTop+=MenuVerticalCentered=="bottom"?Sz:Sz/2;
  178. if(StartTop<0)StartTop=0}}
  179. function PosMenu(Ct,Tp,Lt){
  180. RLvl++;
  181. var Cmplnt=RLvl==1?FCmplnt:SCmplnt,
  182. LftXtra=(NavYes&&!Opr7)||MacExp5||Cmplnt?LeftPaddng:0,
  183. TpXtra=(NavYes&&!Opr7)||MacExp5||Cmplnt?TopPaddng:0,
  184. Mb=Ct.FrstMbr,CStl=Ct.style,MStl=Mb.style,
  185. PadL=Mb.value.indexOf("<")==-1?LftXtra:0,
  186. PadT=Mb.value.indexOf("<")==-1?TpXtra:0,
  187. MWt=parseInt(MStl.width)+PadL,
  188. MHt=parseInt(MStl.height)+PadT,
  189. CWt=parseInt(CStl.width),
  190. CHt=parseInt(CStl.height),
  191. CCw,CCh,STp,SLt,Ti,Li,Hi,
  192. BRW=RLvl==1?BorderWidthMain:BorderWidthSub,
  193. BTWn=RLvl==1?BorderBtwnMain:BorderBtwnSub;
  194. if(RLvl==1&&AcrssFrms)
  195. !MenuFramesVertical?Tp=BottomUp?DistFrmFrameBrdr:FWinH-CHt-DistFrmFrameBrdr:
  196. Lt=RightToLeft?DistFrmFrameBrdr:FWinW-CWt-DistFrmFrameBrdr;
  197. if(RLvl==2&&AcrssFrms)
  198. !MenuFramesVertical?Tp=BottomUp?SWinH-CHt:0:Lt=RightToLeft?SWinW-CWt:0;
  199. if(RLvl==2){
  200. Tp+=VerCorrect;
  201. Lt+=HorCorrect}
  202. CStl.top=RLvl==1?Tp+P_X:0;
  203. Ct.OrgTop=Tp;
  204. CStl.left=RLvl==1?Lt+P_X:0;
  205. Ct.OrgLeft=Lt;
  206. if(RLvl<=FirstLineHorizontal){
  207. Hi=1;
  208. Li=CWt-MWt-2*BRW;
  209. Ti=0}
  210. else{ Hi=Li=0;
  211. Ti=CHt-MHt-2*BRW}
  212. while(Mb!=null){
  213. MStl.left=Li+BRW+P_X;
  214. MStl.top=Ti+BRW+P_X;
  215. if(Mb.CCn){
  216. if(RightToLeft)CCw=parseInt(Mb.CCn.style.width);
  217. if(BottomUp)CCh=parseInt(Mb.CCn.style.height);
  218. if(Hi){ STp=BottomUp?
  219. Ti-CCh:Ti+MHt+2*BRW;
  220. SLt=RightToLeft?Li+MWt-CCw:Li}
  221. else{ SLt=RightToLeft?Li-CCw+ChildOverlap*MWt+BRW:Li+(1-ChildOverlap)*MWt+BRW;
  222. STp=RLvl==1&&AcrssFrms?
  223. BottomUp?Ti-CCh+MHt:Ti:
  224. BottomUp?Ti-CCh+(1-ChildVerticalOverlap)*MHt+2*BRW:Ti+ChildVerticalOverlap*MHt}
  225. PosMenu(Mb.CCn,STp,SLt)}
  226. Mb=Mb.PrvMbr;
  227. if(Mb){ MStl=Mb.style;
  228. PadL=Mb.value.indexOf("<")==-1?LftXtra:0;
  229. PadT=Mb.value.indexOf("<")==-1?TpXtra:0;
  230. MWt=parseInt(MStl.width)+PadL;
  231. MHt=parseInt(MStl.height)+PadT;
  232. Hi?Li-=BTWn?(MWt+BRW):(MWt):Ti-=BTWn?(MHt+BRW):MHt}}
  233. RLvl--}
  234. function StMnu(){
  235. if(Crtd){
  236. var i,Pntr=FrstCntnr,Str=ScLoc.SetMenu?ScLoc.SetMenu:"0";
  237. while(Str.indexOf("_")!=-1&&RememberStatus==1){
  238. i=Pntr.NrItms-parseInt(Str.substring(0,Str.indexOf("_")));
  239. Str=Str.slice(Str.indexOf("_")+1);
  240. Pntr=Pntr.FrstMbr;
  241. for(i;i;i--) Pntr=Pntr.PrvMbr;
  242. Pntr.OM();
  243. Pntr=Pntr.CCn}
  244. i=Pntr.NrItms-parseInt(Str);
  245. Pntr=Pntr.FrstMbr;
  246. for(i;i;i--) Pntr=Pntr.PrvMbr;
  247. if(RmbrNow!=null){
  248. SetItem(RmbrNow,0);
  249. RmbrNow.Clckd=0}
  250. if(Pntr!=null){
  251. SetItem(Pntr,1);
  252. Pntr.Clckd=1;
  253. if(RememberStatus==1)Pntr.OM()}
  254. RmbrNow=Pntr;
  255. ClrAllChlds(FrstCntnr.FrstMbr);
  256. Rmbr(FrstCntnr)}}
  257. function Initiate(){
  258. if(IniFlg&&Ldd){
  259. Init(FrstCntnr);
  260. IniFlg=false;
  261. if(RememberStatus)Rmbr(FrstCntnr);
  262. if(ShwFlg)AfterCloseAll();
  263. ShwFlg=false;
  264. M_Clckd=false}}
  265. function Rmbr(CntPtr){
  266. var Mbr=CntPtr.FrstMbr,St;
  267. while(Mbr!=null){
  268. if(Mbr.DoRmbr){
  269. HiliteItem(Mbr);
  270. if(Mbr.CCn&&RememberStatus==1){
  271. St=Mbr.CCn.style;
  272. St.visibility=M_Show;
  273. Rmbr(Mbr.CCn)}
  274. break}
  275. else Mbr=Mbr.PrvMbr}}
  276. function Init(CPt){
  277. var Mb=CPt.FrstMbr,MCSt=CPt.style;
  278. RLvl++;
  279. MCSt.visibility=RLvl==1?M_Show:M_Hide;
  280. CPt.Shw=RLvl==1?1:0;
  281. while(Mb!=null){
  282. if(Mb.Hilite)LowItem(Mb);
  283. if(Mb.CCn)Init(Mb.CCn);
  284. Mb=Mb.PrvMbr}
  285. RLvl--}
  286. function ClrAllChlds(Pt){
  287. var PSt,Pc;
  288. while(Pt){
  289. if(Pt.Hilite){
  290. Pc=Pt;
  291. if(Pc!=CurOvr)LowItem(Pt);
  292. if(Pt.CCn) {
  293. PSt=Pt.CCn.style;
  294. if(Pc!=CurOvr){
  295. PSt.visibility=M_Hide;
  296. Pt.CCn.Shw=0}
  297. ClrAllChlds(Pt.CCn.FrstMbr)}
  298. break}
  299. Pt=Pt.PrvMbr}}
  300. function SetItem(Pntr,x){
  301. while(Pntr!=null){
  302. Pntr.DoRmbr=x;
  303. Pntr=Pntr.Ctnr.Cllr}}
  304. function GoTo(){
  305. if(UnfoldsOnClick&&!M_Clckd&&this.Arr[3]){
  306. M_Clckd=true;
  307. OpenMenuII(this)}
  308. else if(this.Arr[1]){
  309. status="";
  310. LowItem(this);
  311. IniFlg=true;
  312. Initiate();
  313. if(this.Arr[1].indexOf("javascript:")!=-1)
  314. eval(this.Arr[1]);
  315. else if(DcLoc.location.href!=BaseHref+this.Arr[1]){
  316. DcLoc.location.href=BaseHref+this.Arr[1]}}}
  317. function HiliteItem(P){
  318. var PS=P.style;
  319. if(P.rob)PS.backgroundImage="url(""+P.rib2+"")";
  320. if(P.ro){ var Lc=P.Lvl==1?FLoc:ScLoc;
  321. Lc.document.images[P.rid].src=P.ri2}
  322. else{ if(P.Arr[7])PS.backgroundColor=P.Arr[7];
  323. if(P.Arr[9])PS.color=P.Arr[9];
  324. if(HooverBold)PS.fontWeight="bold";
  325. if(HooverItalic)PS.fontStyle="italic";
  326. if(HooverUnderLine)PS.textDecoration="underline";
  327. if(HooverTextSize)PS.fontSize=parseInt(PS.fontSize)+HooverTextSize+P_X;
  328. if(HooverVariant)PS.fontVariant="small-caps"}
  329. if(HoverBorder){PS.borderColor=HoverBorderColor;PS.borderWidth=BorderWidthHover;PS.borderStyle='solid';}
  330. P.Hilite=1}
  331. function LowItem(P){
  332. var PS=P.style;
  333. P.Hilite=0;
  334. if(P.rob)PS.backgroundImage="url(""+P.rib1+"")";
  335. if(P.ro){ var Lc=P.Lvl==1?FLoc:ScLoc;
  336. Lc.document.images[P.rid].src=P.ri1}
  337. else{ if(P.Arr[6])PS.backgroundColor=P.Arr[6];
  338. if(P.Arr[8])PS.color=P.Arr[8];
  339. if(HooverBold)PS.fontWeight="normal";
  340. if(HooverItalic)PS.fontStyle="normal";
  341. if(HooverUnderLine)PS.textDecoration="none";
  342. if(HooverTextSize)PS.fontSize=parseInt(PS.fontSize)-HooverTextSize+P_X;
  343. if(HooverVariant)PS.fontVariant="normal"}
  344. if(HoverBorder){PS.borderColor=PS.backgroundColor;PS.borderWidth=0;PS.borderStyle='none';}
  345. }
  346. function OpenMenu(){
  347. if(Ldd&&Crtd){
  348. if(UnfoldsOnClick&&!M_Clckd){
  349. CurOvr=this;
  350. IniFlg=false;
  351. ClrAllChlds(this.Ctnr.FrstMbr);
  352. HiliteItem(this);
  353. status=this.Arr[16]}
  354. else  OpenMenuII(this)}}
  355. function OpenMenuII(Ptr){
  356. if(OpnTmr)clearTimeout(OpnTmr);
  357. if(Ptr.NofChlds&&!Ptr.CCn){
  358. var Cmplnt=RLvl==1?FCmplnt:SCmplnt,
  359. LftXtra=(NavYes&&!Opr7)||MacExp5||Cmplnt?LeftPaddng:0,
  360. TpXtra=(NavYes&&!Opr7)||MacExp5||Cmplnt?TopPaddng:0;
  361. RLvl=Ptr.Lvl;
  362. Ptr.CCn=CreateMenuStructure(Ptr.MN+"_",Ptr.NofChlds,Ptr);
  363. var Ti,Li,Hi,MStl=Ptr.style,CCw,CCh,STp,SLt,
  364. PadL=Ptr.value.indexOf("<")==-1?LftXtra:0,
  365. PadT=Ptr.value.indexOf("<")==-1?TpXtra:0,
  366. MWt=parseInt(MStl.width)+PadL,
  367. MHt=parseInt(MStl.height)+PadT,
  368. BRW=RLvl==1?BorderWidthMain:BorderWidthSub;
  369. if(RightToLeft)CCw=parseInt(Ptr.CCn.style.width);
  370. if(BottomUp)CCh=parseInt(Ptr.CCn.style.height);
  371. if(RLvl<=FirstLineHorizontal){
  372. Hi=1;
  373. Li=parseInt(Ptr.style.left)-BRW;
  374. Ti=0}
  375. else{ Hi=Li=0;
  376. Ti=parseInt(Ptr.style.top)-BRW}
  377. if(Hi){ STp=BottomUp?Ti-CCh:Ti+MHt+2*BRW;
  378. SLt=RightToLeft?Li+MWt-CCw:Li}
  379. else{ SLt=RightToLeft?Li-CCw+ChildOverlap*MWt+BRW:Li+(1-ChildOverlap)*MWt;
  380. STp=RLvl==1&&AcrssFrms?
  381. BottomUp?Ti-CCh+MHt:Ti:
  382. BottomUp?Ti-CCh+(1-ChildVerticalOverlap)*MHt+2*BRW:Ti+ChildVerticalOverlap*MHt+BRW}
  383. PosMenu(Ptr.CCn,STp,SLt);
  384. RLvl=0}
  385. var CCnt=Ptr.CCn,HP=Ptr;
  386. CurOvr=Ptr;
  387. IniFlg=false;
  388. ClrAllChlds(Ptr.Ctnr.FrstMbr);
  389. if(!HP.Hilite)HiliteItem(HP);
  390. if(CCnt!=null&&!CCnt.Shw)RememberStatus?Unfld():OpnTmr=setTimeout("Unfld()",UnfoldDelay);
  391. status=HP.Arr[16]}
  392. function Unfld(){
  393. var P=CurOvr,PSt=P.style,CSt=P.Ctnr.style,CCnt=P.CCn,CCSt=CCnt.style,
  394. THt=parseInt(PSt.height),TWt=parseInt(PSt.width),
  395. TLt=AcrssFrms&&P.Lvl==1&&!FirstLineHorizontal?0:parseInt(CSt.left),
  396. TTp=AcrssFrms&&P.Lvl==1&&FirstLineHorizontal?0:parseInt(CSt.top),
  397. CCW=parseInt(CCSt.width),
  398. CCH=parseInt(CCSt.height),
  399. TS=ExpYes?SCmplnt?ScHtml.scrollTop:ScLoc.document.body.scrollTop:ScLoc.pageYOffset,
  400. LS=ExpYes?SCmplnt?ScHtml.scrollLeft:ScLoc.document.body.scrollLeft:ScLoc.pageXOffset,
  401. SLt=AcrssFrms&&P.Lvl==1?CCnt.OrgLeft+TLt+LS:CCnt.OrgLeft+TLt,
  402. STp=AcrssFrms&&P.Lvl==1? CCnt.OrgTop+TTp+TS:CCnt.OrgTop+TTp;
  403. if(!ShwFlg){
  404. ShwFlg=true;
  405. BeforeFirstOpen()}
  406. if(MenuWrap){
  407. if(RightToLeft){
  408. if(SLt<LS)SLt=P.Lvl==1?LS:SLt+(CCW+(1-2*ChildOverlap)*TWt);
  409. if(SLt+CCW>SWinW+LS)SLt=SWinW+LS-CCW}
  410. else{ if(SLt+CCW>SWinW+LS)SLt=P.Lvl==1?SWinW+LS-CCW:SLt-(CCW+(1-2*ChildOverlap)*TWt);
  411. if(SLt<LS)SLt=LS}
  412. if(BottomUp){
  413. if(STp<TS)STp=P.Lvl==1?TS:STp+(CCH-(1-2*ChildVerticalOverlap)*THt);
  414. if(STp+CCH>SWinH+TS)STp=SWinH+TS-CCH+0}
  415. else{ if(STp+CCH>TS+SWinH)STp=P.Lvl==1?STp=TS+SWinH-CCH:STp-CCH+(1-2*ChildVerticalOverlap)*THt;
  416. if(STp<TS)STp=TS}}
  417. CCSt.top=STp+P_X;
  418. CCSt.left=SLt+P_X;
  419. if(Exp6Plus&&MenuSlide){
  420. CCnt.filters[0].Apply();
  421. CCnt.filters[0].play()}
  422. CCSt.visibility=M_Show}
  423. function CloseMenu(){
  424. if(Ldd&&Crtd){
  425. status="";
  426. if(this==CurOvr){
  427. if(OpnTmr)clearTimeout(OpnTmr);
  428. if(CloseTmr)clearTimeout(CloseTmr);
  429. IniFlg=true;
  430. CloseTmr=setTimeout("Initiate(CurOvr)",DissapearDelay)}}}
  431. function CntnrSetUp(W,H,NoOff,WMu,Mc){
  432. var x=eval(WMu+"[10]")!=""?eval(WMu+"[10]"):BorderColor,TS=this.style;
  433. this.FrstMbr=null;
  434. this.NrItms=NoOff;
  435. this.Cllr=Mc;
  436. this.Shw=0;
  437. this.OrgLeft=this.OrgTop=0;
  438. if(x)TS.backgroundColor=x;
  439. TS.width=W+P_X;
  440. TS.height=H+P_X;
  441. TS.zIndex=RLvl+Ztop;
  442. if(Nav_Op&&!Opr7&&MenuOpacity)
  443. TS.MozOpacity=parseInt(MenuOpacity.substring(MenuOpacity.indexOf("=")+1,MenuOpacity.indexOf(")")))/125;
  444. if(Exp6Plus){
  445. FStr="";
  446. if(MenuSlide&&RLvl!=1)FStr=MenuSlide;
  447. if(MenuShadow)FStr+=MenuShadow;
  448. if(MenuOpacity)FStr+=MenuOpacity;
  449. if(FStr!="")TS.filter=FStr}}
  450. function MbrSetUp(MbC,PrMmbr,WMu,Wd,Ht,Nofs){
  451. var Cmplnt=RLvl==1?FCmplnt:SCmplnt,
  452. LftXtra=(NavYes&&!Opr7)||MacExp5||Cmplnt?LeftPaddng:0,
  453. TpXtra=(NavYes&&!Opr7)||MacExp5||Cmplnt?TopPaddng:0,
  454. Lctn=RLvl==1?FLoc:ScLoc,
  455. Tfld=this.Arr[0],t,T,L,a,
  456. TS=this.style,TA2=this.Arr[2];
  457. this.PrvMbr=PrMmbr;
  458. this.Lvl=RLvl;
  459. this.Ctnr=MbC;
  460. this.CCn=null;
  461. this.ai=null;
  462. this.Hilite=0;
  463. this.DoRmbr=0;
  464. this.Clckd=0;
  465. this.OM=OpenMenu;
  466. TS.overflow="hidden";
  467. this.MN=WMu;
  468. this.NofChlds=Nofs;
  469. TS.cursor=(this.Arr[1]||(RLvl==1&&UnfoldsOnClick))?ExpYes?"hand":"pointer":"default";
  470. this.ro=this.rob=0;
  471. if(Tfld.indexOf("rollover")!=-1){
  472. this.ro=1;
  473. this.ri1=Tfld.substring(Tfld.indexOf("?")+1,Tfld.lastIndexOf("?"));
  474. this.ri2=Tfld.substring(Tfld.lastIndexOf("?")+1,Tfld.length);this.rid=WMu+"i";
  475. Tfld="<img src=""+this.ri1+"" name=""+this.rid+"" width=""+Wd+"" height=""+Ht+"">"}
  476. this.value=Tfld;
  477. TS.color=this.Arr[8];
  478. TS.fontFamily=this.Arr[11];
  479. TS.fontSize=this.Arr[12]*(NavYes?1:FntFc)+"px";
  480. TS.fontWeight=this.Arr[13]?"bold":"normal";
  481. TS.fontStyle=this.Arr[14]?"italic":"normal";
  482. if(this.Arr[6]&&!this.ro)TS.backgroundColor=this.Arr[6];
  483. TS.textAlign=this.Arr[15];
  484. if(TA2){ if(TA2.indexOf("rollover")==-1)TS.backgroundImage="url(""+TA2+"")";
  485. else{ this.rob=1;
  486. this.rib1=TA2.substring(TA2.indexOf("?")+1,TA2.lastIndexOf("?"));
  487. this.rib2=TA2.substring(TA2.lastIndexOf("?")+1,TA2.length);
  488. TS.backgroundImage="url(""+this.rib1+"")";
  489. TS.backgroundRepeat="no-repeat";
  490. TS.backgroundPosition=BgImgLeftOffset+"px"}}
  491. if(Tfld.indexOf("<")==-1){
  492. TS.width=Wd-LftXtra+P_X;
  493. TS.height=Ht-TpXtra+P_X;
  494. TS.paddingLeft=LeftPaddng+P_X;
  495. TS.paddingTop=TopPaddng+P_X}
  496. else{ TS.width=Wd+P_X;
  497. TS.height=Ht+P_X}
  498. if(Tfld.indexOf("<")==-1){
  499. t=Lctn.document.createTextNode(Tfld);
  500. this.appendChild(t)}
  501. else this.innerHTML=Tfld;
  502. if(this.Arr[3]){
  503. a=RLvl<=FirstLineHorizontal?BottomUp?9:3:RightToLeft?6:0;
  504. if(Arrws[a]!=""){
  505. T=RLvl<=FirstLineHorizontal?BottomUp?2:Ht-Arrws[a+2]-2:(Ht-Arrws[a+2])/2;
  506. L=RightToLeft?2:Wd-Arrws[a+1]-2;t=Lctn.document.createElement("img");
  507. this.appendChild(t);
  508. t.style.position="absolute";
  509. t.src=Arrws[a];
  510. t.style.width=Arrws[a+1]*FntFc+P_X;
  511. t.style.height=Arrws[a+2]*FntFc+P_X;
  512. t.style.top=T+P_X;
  513. t.style.left=L+P_X;
  514. this.ai=t}}
  515. if(ExpYes){
  516. this.onselectstart=CnclSlct;
  517. this.onmouseover=OpenMenu;
  518. this.onmouseout=CloseMenu;
  519. this.onclick=GoTo}
  520. else{ this.addEventListener("mouseover",OpenMenu,false);
  521. this.addEventListener("mouseout",CloseMenu,false);
  522. this.addEventListener("click",GoTo,false)}}
  523. function CreateMenuStructure(MNm,No,Mcllr){
  524. RLvl++;
  525. var i,NOs,Mbr,W=0,H=0,PMb=null,WMnu=MNm+"1",
  526. MWd=eval(WMnu+"[5]")*FntFc,
  527. MHt=eval(WMnu+"[4]")*FntFc,
  528. Lctn=RLvl==1?FLoc:ScLoc,
  529. BRW=RLvl==1?BorderWidthMain:BorderWidthSub,
  530. BTWn=RLvl==1?BorderBtwnMain:BorderBtwnSub;
  531. if(RLvl<=FirstLineHorizontal){
  532. for(i=1;i<No+1;i++){
  533. WMnu=MNm+eval(i);
  534. W=eval(WMnu+"[5]")?W+eval(WMnu+"[5]")*FntFc:W+MWd}
  535. W=BTWn?W+(No+1)*BRW:W+2*BRW;
  536. H=MHt+2*BRW}
  537. else{ for(i=1;i<No+1;i++){
  538. WMnu=MNm+eval(i);
  539. H=eval(WMnu+"[4]")?H+eval(WMnu+"[4]")*FntFc:H+MHt}
  540. H=BTWn?H+(No+1)*BRW:H+2*BRW;
  541. W=MWd+2*BRW}
  542. var MbC=Lctn.document.createElement("div");
  543. MbC.style.position="absolute";
  544. MbC.style.visibility="hidden";
  545. Lctn.document.body.appendChild(MbC);
  546. MbC.SetUp=CntnrSetUp;
  547. MbC.SetUp(W,H,No,MNm+"1",Mcllr);
  548. for(i=1;i<No+1;i++){
  549. WMnu=MNm+eval(i);
  550. NOs=eval(WMnu+"[3]");
  551. W=RLvl<=FirstLineHorizontal?eval(WMnu+"[5]")?eval(WMnu+"[5]")*FntFc:MWd:MWd;
  552. H=RLvl<=FirstLineHorizontal?MHt:eval(WMnu+"[4]")?eval(WMnu+"[4]")*FntFc:MHt;
  553. Mbr=Lctn.document.createElement("div");
  554. Mbr.style.position="absolute";
  555. Mbr.style.visibility="inherit";
  556. MbC.appendChild(Mbr);
  557. Mbr.Arr=eval(WMnu);
  558. if(Mbr.Arr[6]=="")Mbr.Arr[6]=LowBgColor;
  559. if(Mbr.Arr[7]=="")Mbr.Arr[7]=HighBgColor;
  560. if(Mbr.Arr[8]=="")Mbr.Arr[8]=FontLowColor;
  561. if(Mbr.Arr[9]=="")Mbr.Arr[9]=FontHighColor;
  562. if(Mbr.Arr[11]=="")Mbr.Arr[11]=FontFamily;
  563. if(Mbr.Arr[12]==-1)Mbr.Arr[12]=FontSize;
  564. if(Mbr.Arr[13]==-1)Mbr.Arr[13]=FontBold;
  565. if(Mbr.Arr[14]==-1)Mbr.Arr[14]=FontItalic;
  566. if(Mbr.Arr[15]=="")Mbr.Arr[15]=MenuTextCentered;
  567. if(Mbr.Arr[16]=="")Mbr.Arr[16]=Mbr.Arr[1];
  568. Mbr.SetUp=MbrSetUp;
  569. Mbr.SetUp(MbC,PMb,WMnu,W,H,NOs);
  570. if(NOs&&!BuildOnDemand){
  571. Mbr.CCn=CreateMenuStructure(WMnu+"_",NOs,Mbr)}
  572. PMb=Mbr}
  573. MbC.FrstMbr=Mbr;
  574. RLvl--;
  575. return(MbC)}
  576. function CreateMenuStructureAgain(MNm,No){
  577. var Mbr=FrstCntnr.FrstMbr;
  578. if(!BuildOnDemand) {
  579. var i,WMnu,NOs,PMb;
  580. RLvl++;
  581. for(i=No;i>0;i--){
  582. WMnu=MNm+eval(i);
  583. NOs=eval(WMnu+"[3]");
  584. PMb=Mbr;
  585. if(NOs)Mbr.CCn=CreateMenuStructure(WMnu+"_",NOs,Mbr);
  586. Mbr=Mbr.PrvMbr}
  587. RLvl--}
  588. else{
  589. while(Mbr){
  590. Mbr.CCn=null;
  591. Mbr=Mbr.PrvMbr}}}