1 2/* 3 ================================================ 4 PVII Pop Menu Magic 3 scripts 5 Copyright (c) 2013-2014 Project Seven Development 6 www.projectseven.com 7 Version: 3.5.0 -build 46 8 ================================================ 9 10*/ 11 12// define the image swap file naming convention 13 14// rollover image for any image in the normal state 15var p7PM3over='_over'; 16 17// image for any trigger that has an open sub menu -no rollover 18var p7PM3open='_down'; 19 20// indent char for Jump List 21// default is space: '\u2007' - for dash use: '\u2014' 22var p7PM3indent='\u2007'; 23 24var p7PM3ctl=[],p7PM3i=false,p7PM3a=false,p7PM3adv=[],p7PM3dy=(1000/100),p7PM3kf=false,p7PM3clk=false; 25function P7_PM3set(){ 26 var i,h,sh,hd,x,v,ie=P7_PM3getIEver(); 27 if(!document.getElementById || (ie>4 && ie<6)){ 28 return; 29 } 30 sh='.p7PM3 ul div {position:absolute; display:none; height:0px; top:100%; z-index:999;}\n'; 31 sh+='.p7PM3 li.pmm3-title-bar div {position:relative; display:block; height:auto; top:auto;}\n'; 32 sh+='.pmm3-select-wrapper {display:none;}\n'; 33 sh+='@media only screen and (min-device-width:768px) and (max-device-width:1024px) {\n'; 34 sh+='body * {cursor: pointer;}\n}\n'; 35 sh+='.p7bpm3-spcr {width:100%; display:none;}\n'; 36 sh+='.p7pm3-fixed {position:fixed !important;}\n'; 37 sh+='.horiz.p7pm3-fixed {top:0; left:0; width:100%;}\n'; 38 sh+='.vert.p7pm3-fixed {top:100px; left:20px; width:240px;}\n'; 39 sh+='.p7PM3 {box-sizing:border-box; -moz-box-sizing:border-box;}\n'; 40 sh+='@media only screen and (min-width: 0px) and (max-width: 700px) {\n'; 41 sh+='.p7PM3.responsive {max-height: 700777px;}\n'; 42 sh+='.p7PM3.responsive ul a {max-height: 700777px;}\n'; 43 sh+='.p7PM3.responsive ul div {position:relative; overflow:hidden;margin-left:0 !important; margin-top:0 !important;}\n'; 44 sh+='.p7PM3 ul ul {\n-webkit-transform: none !important; -webkit-transition: none !important;'; 45 sh+='transform: none !important; transition: none !important;'; 46 sh+='opacity:100 !important;}\n'; 47 sh+='}\n'; 48 sh+='@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {\n'; 49 sh+='.p7PM3.responsive {max-height: 700777px;}\n'; 50 sh+='}\n'; 51 if(document.styleSheets){ 52 if(ie>4 && ie<7){ 53 sh+='.p7PM3 li {zoom: 1;}\n'; 54 } 55 h='\n<st' + 'yle type="text/css">\n'+sh+'\n</s' + 'tyle>'; 56 document.write(h); 57 } 58 else{ 59 P7_PM3addSheet(sh); 60 } 61} 62P7_PM3set(); 63function P7_PM3op(){ 64 if(!document.getElementById){ 65 return; 66 } 67 p7PM3ctl[p7PM3ctl.length]=arguments; 68 if(arguments[2]>5){ 69 P7_PM3setCSSanim(arguments); 70 } 71} 72function P7_PM3setCSSanim(op){ 73 var i,pf,prf,sh=''; 74 prf=P7_PM3getCSSPre(); 75 if(prf!='none'){ 76 if(op[2]==6){ 77 sh+='#'+op[0]+' ul ul {\n'; 78 sh+='-webkit-transition: -webkit-transform 300ms, opacity 300ms;\n'; 79 sh+='transition: transform 300ms, opacity 300ms;\n'; 80 sh+='-webkit-transform: scale(0);\n'; 81 sh+='transform: scale(0);\n'; 82 sh+='opacity: 0;\n}\n'; 83 sh+='#'+op[0]+' ul ul.sub-open {\n'; 84 sh+='-webkit-transform: scale(1);\n'; 85 sh+='transform: scale(1);\n'; 86 sh+='opacity: 1;\n}\n'; 87 } 88 else if(op[2]==7){ 89 sh+='#'+op[0]+' ul ul {\n'; 90 sh+='-webkit-transition: -webkit-transform 300ms, opacity 300ms;\n'; 91 sh+='transition: transform 300ms, opacity 300ms;\n'; 92 sh+='-webkit-transform: translateY(-100%) rotate(-120deg);\n'; 93 sh+='transform: translateY(-100%) rotate(-120deg);\n'; 94 sh+='opacity: 0;\n}\n'; 95 sh+='#'+op[0]+' ul ul.sub-open {\n'; 96 sh+='-webkit-transform: translateY(0px) rotate(0deg);\n'; 97 sh+='transform: translateY(0px) rotate(0deg);\n'; 98 sh+='opacity: 1;\n}\n'; 99 } 100 else if(op[2]==8){ 101 sh+='#'+op[0]+' ul ul {\n'; 102 sh+='-webkit-transition: -webkit-transform 300ms, opacity 300ms;\n'; 103 sh+='transition: transform 300ms, opacity 300ms;\n'; 104 sh+='-webkit-transform: scale(0,1);\n'; 105 sh+='transform: scale(0,1);\n'; 106 sh+='opacity: 0;\n}\n'; 107 sh+='#'+op[0]+' ul ul.sub-open {\n'; 108 sh+='-webkit-transform: scale(1,1);\n'; 109 sh+='transform: scale(1,1);\n'; 110 sh+='opacity: 1;\n}\n'; 111 } 112 else if(op[2]==9){ 113 sh+='#'+op[0]+' ul ul {\n'; 114 sh+='-webkit-transition: -webkit-transform 300ms, opacity 300ms;\n'; 115 sh+='transition: transform 300ms, opacity 300ms;\n'; 116 sh+='-webkit-transform: scale(1,0);\n'; 117 sh+='transform: scale(1,0);\n'; 118 sh+='opacity: 0;\n}\n'; 119 sh+='#'+op[0]+' ul ul.sub-open {\n'; 120 sh+='-webkit-transform: scale(1,1);\n'; 121 sh+='transform: scale(1,1);\n'; 122 sh+='opacity: 1;\n}\n'; 123 } 124 P7_PM3addSheet(sh); 125 } 126} 127function P7_PM3bb(){ 128 P7_PM3shutall(); 129} 130function P7_PM3addLoad(){ 131 var ie=P7_PM3getIEver(); 132 if(!document.getElementById || (ie>4 && ie<6)){ 133 return; 134 } 135 if(window.addEventListener){
136 window.addEventListener("load",P7_PM3init,false); 137 window.addEventListener("unload",P7_PM3bb,false); 138 window.addEventListener("resize",P7_PM3rsz,false); 139 } 140 else if(window.attachEvent){ 141 document.write("<script id=p7ie_pm3 defer src=\"//:\"><\/script>"); 142 document.getElementById("p7ie_pm3").onreadystatechange=function(){ 143 if (this.readyState=="complete"){ 144 if(p7PM3ctl.length>0){ 145 P7_PM3init(); 146 } 147 } 148 }; 149 window.attachEvent("onload",P7_PM3init); 150 window.attachEvent("onunload",P7_PM3bb); 151 window.attachEvent("onresize",P7_PM3rsz); 152 } 153} 154P7_PM3addLoad(); 155function P7_PM3init(){ 156 var i,j,jj,k,x,tB,tU,tD,tS,tA,taA,tBR,tBU,iM,cN,dv,pn,lv,ls,fs,d,sr,s1,s2,pp,cl,pf,wns; 157 if(p7PM3i){ 158 return; 159 } 160 p7PM3i=true; 161 document.p7PM3preload=[]; 162 pf=P7_PM3getCSSPre(); 163 wns=false; 164 for(jj=0;jj<p7PM3ctl.length;jj++){ 165 tB=document.getElementById(p7PM3ctl[jj][0]); 166 if(tB){ 167 tB.p7opt=p7PM3ctl[jj]; 168 tU=tB.getElementsByTagName('UL'); 169 if(tU&&tU.length>1){ 170 for(i=tU.length-1;i>0;i--){ 171 pn=tU[i].parentNode; 172 dv=document.createElement('div'); 173 dv.pm3d=true; 174 dv.appendChild(tU[i]); 175 pn.appendChild(dv); 176 } 177 } 178 P7_PM3remClass(tB,'p7PM3noscript'); 179 if(tB.p7opt[17]==1){ 180 dv=document.createElement('div'); 181 dv.setAttribute('id',tB.id.replace('_','spcr_')); 182 dv.className=tB.className; 183 P7_PM3setClass(dv,'p7bpm3-spcr'); 184 tB.parentNode.insertBefore(dv, tB.nextSibling); 185 tB.pm3Spacer=dv; 186 dv.pm3Menu=tB; 187 if(!wns){ 188 wns=true; 189 if(window.addEventListener){ 190 window.addEventListener('scroll', P7_PM3fixed, false); 191 } 192 else if (window.attachEvent){ 193 window.attachEvent('onscroll', P7_PM3fixed); 194 } 195 } 196 } 197 tB.pm3Duration=100; 198 tB.pm3AnimType='quad'; 199 tB.pmm3DefLink=false; 200 tB.pm3Shut=true; 201 dv=P7_PM3isMobile(); 202 if(dv=='touch'){ 203 if(P7_PM3getStyle(tB,'maxHeight','max-height')!='700777px'){ 204 dv=false; 205 } 206 } 207 if(dv){ 208 tB.p7opt[15]=0; 209 } 210 p7PM3clk=true; 211 if(window.addEventListener){ 212 document.addEventListener("click",P7_PM3body,false); 213 } 214 else if(window.attachEvent){ 215 window.attachEvent("click",P7_PM3body,false); 216 } 217 if(tB.p7opt[2]>5){ 218 if(pf=='none'){ 219 tB.p7opt[2]=3; 220 } 221 } 222 tB.style.position='relative'; 223 tB.style.zIndex=tB.p7opt[14]; 224 tU=tB.getElementsByTagName('UL'); 225 tD=tU[0].getElementsByTagName('DIV'); 226 for(i=0;i<tD.length;i++){ 227 if(tD[i].pm3d){ 228 tD[i].setAttribute("id",tB.id+'d'+(i+2)); 229 tD[i].pm3State='closed'; 230 tD[i].pm3Menu=tB.id; 231 } 232 } 233 tB.pm3UL=tU[0]; 234 tB.pm3MouseTimer=null; 235 tB.pm3Fixed=false; 236 pp=tB; 237 while(pp){ 238 if(P7_PM3getStyle(pp,'position','position')=='fixed'){ 239 tB.pm3Fixed=true; 240 break; 241 } 242 if(pp.nodeName=='BODY'){ 243 break; 244 } 245 pp=pp.parentNode; 246 } 247 tB.pm3ToolbarClosed=false; 248 tBR=document.getElementById(tB.id.replace('_','tb_')); 249 tBU=tU[0]; 250 if(tBR && tBU){ 251 tBR.pm3Menu=tB.id; 252 tBR.pm3UL=tBU; 253 cl=tBR.className; 254 if(cl && cl!=='' && cl.indexOf('opened')>-1){ 255 tBU.pm3State='open'; 256 tBR.pm3State='open'; 257 P7_PM3setClass(tBU,'opened'); 258 } 259 else{ 260 P7_PM3remClass(tBR,'closed'); 261 P7_PM3remClass(tBU,'closed'); 262 tB.pm3ToolbarClosed=true; 263 tBU.pm3State='closed'; 264 tBR.pm3State='closed'; 265 } 266 tBR.onclick= 267function(){ 268 var tBR=document.getElementById(this.pm3Menu.replace('_','tb_')); 269 var tBU=this.pm3UL; 270 if(tBU.pm3State=='open'){ 271 tBR.pm3State='closed'; 272 tBU.pm3State='closed'; 273 P7_PM3changeClass(tBR,'opened','closed'); 274 P7_PM3changeClass(tBU,'opened','closed'); 275 } 276 else{ 277 tBR.pm3State='open'; 278 tBU.pm3State='open'; 279 P7_PM3changeClass(tBR,'closed','opened'); 280 P7_PM3changeClass(tBU,'closed','opened'); 281 } 282}; 283tA=tBR.getElementsByTagName('A'); 284if(tA && tA[0]){ 285 tA[0].onclick=function(){ 286 return false; 287 }; 288} 289} 290d=1; 291for(i=0;i<tU.length;i++){ 292tU[i].setAttribute("id",tB.id+'u'+(i+1)); 293tU[i].pm3Menu=tB.id; 294tU[i].setAttribute('aria-hidden','true'); 295lv=1; 296pp=tU[i].parentNode; 297while(pp){ 298 if(pp.id&&pp.id==tB.id){ 299 break; 300 } 301 if(pp.tagName&&pp.tagName=="UL"){ 302 lv++; 303 } 304 pp=pp.parentNode; 305} 306tU[i].pm3Level=lv; 307P7_PM3setClass(tU[i],'level_'+lv); 308cN=tU[i].childNodes; 309fs=-1; 310ls=0; 311if(cN){ 312 for(j=0;j<cN.length;j++){ 313 if(cN[j].tagName&&cN[j].tagName=='LI'){ 314 ls++; 315 cl=cN[j].getAttribute('class'); 316 if(cl && cl!=='' && cl.indexOf('pmm3-title-bar')>-1){ 317 if(fs<0){ 318 P7_PM3setClass(cN[j],'pm3first'); 319 } 320 fs=j; 321 cN[j].pm3Title=true; 322 cN[j].onclick=function(){ 323 P7_PM3toggleTB(this.parentNode.id); 324 }; 325 if(tB.p7opt[15]==1){ 326 cN[j].onmouseover=function(){ 327 var tU=this.parentNode; 328 var tB=document.getElementById(tU.pm3Menu); 329 if(tB.pm3MouseTimer){ 330 clearTimeout(tB.pm3MouseTimer); 331 } 332 if(P7_PM3getStyle(tB,'maxHeight','max-height')=='700777px'){ 333 return; 334 } 335 P7_PM3trigTB(tU.id); 336 }; 337 } 338 } 339 else{ 340 taA=cN[j].getElementsByTagName('A'); 341 if(taA && taA[0]){ 342 tA=taA[0]; 343 } 344 else{ 345 continue; 346 } 347 if(fs<0){ 348 P7_PM3setClass(tA,'pm3first'); 349 P7_PM3setClass(cN[j],'pm3first'); 350 } 351 fs=j; 352 if(!tB.pm3FirstA){ 353 tB.pm3FirstA=tA; 354 }
355 tA.setAttribute("id",tB.id+'a'+(d)); 356 d++; 357 tA.pm3State='closed'; 358 tA.pm3Level=lv; 359 tA.pm3ParentDiv=tU[i].parentNode.id; 360 tA.pm3Menu=tB.id; 361 tA.pm3Sub=false; 362 if(i===0){ 363 P7_PM3setClass(cN[j],('root_'+ls)); 364 } 365 tA.onclick=function(){ 366 return P7_PM3click(this); 367 }; 368 if(tB.p7opt[15]==1){ 369 tA.onmouseover=function(){ 370 var tB=document.getElementById(this.pm3Menu); 371 if(tB.pm3MouseTimer){ 372 clearTimeout(tB.pm3MouseTimer); 373 } 374 if(P7_PM3getStyle(this,'maxHeight','max-height')=='700777px'){ 375 return; 376 } 377 P7_PM3trig(this.id); 378 }; 379 } 380 tA.hasImg=false; 381 iM=tA.getElementsByTagName("IMG"); 382 if(iM&&iM[0]){ 383 sr=iM[0].getAttribute("src"); 384 iM[0].pm3Swap=tB.p7opt[9]; 385 x=sr.lastIndexOf("."); 386 s1=sr.substring(0,x)+p7PM3over+'.'+sr.substring(x+1); 387 s2=sr.substring(0,x)+p7PM3open+'.'+sr.substring(x+1); 388 if(iM[0].pm3Swap==1){ 389 iM[0].p7imgswap=[sr,s1,s1]; 390 P7_PM3preloader(s1); 391 } 392 else if (iM[0].pm3Swap==2){ 393 iM[0].p7imgswap=[sr,s1,s2]; 394 P7_PM3preloader(s1,s2); 395 } 396 else{ 397 iM[0].p7imgswap=[sr,sr,sr]; 398 } 399 iM[0].p7state='closed'; 400 iM[0].mark=false; 401 iM[0].rollover=tB.p7opt[10]; 402 if(iM[0].pm3Swap>0){ 403 tA.hasImg=true; 404 iM[0].onmouseover=function(){ 405 P7_PM3imovr(this); 406 }; 407 iM[0].onmouseout=function(){ 408 P7_PM3imout(this); 409 }; 410 tA.onfocus=function(){ 411 P7_PM3imovr(this.getElementsByTagName('IMG')[0]); 412 }; 413 tA.onblur=function(){ 414 P7_PM3imout(this.getElementsByTagName('IMG')[0]); 415 }; 416 } 417 } 418 tS=cN[j].getElementsByTagName('UL'); 419 if(tS&&tS.length>0){ 420 tA.pm3Sub=tS[0].parentNode.id; 421 tS[0].parentNode.pm3Trigger=tA; 422 if(i===0){ 423 P7_PM3setClass(tA,('root_trig')); 424 P7_PM3setClass(tA.parentNode,('root_trig')); 425 } 426 P7_PM3setClass(tA,'trig_closed'); 427 P7_PM3setClass(tA.parentNode,'trig_closed'); 428 if(tB.p7opt[5]==1){ 429 P7_PM3setClass(tA,'trig_left'); 430 P7_PM3setClass(tA.parentNode,'trig_left'); 431 } 432 if(tB.p7opt[13]==1){ 433 P7_PM3setClass(tA,'trig_up'); 434 P7_PM3setClass(tA.parentNode,'trig_up'); 435 } 436 } 437 else{ 438 P7_PM3setClass(tA,'pm3-link'); 439 P7_PM3setClass(tA.parentNode,'pm3-link'); 440 if(i===0){ 441 P7_PM3setClass(tA,('root_link')); 442 P7_PM3setClass(tA.parentNode,('root_link')); 443 } 444 } 445 } 446 } 447 } 448 if(fs>0){ 449 P7_PM3setClass(cN[fs],'pm3last'); 450 if(!cN[fs].pm3Title){ 451 P7_PM3setClass(tA,'pm3last'); 452 } 453 } 454} 455} 456cl=tB.getAttribute('class'); 457if(cl && cl.indexOf('select')>-1){ 458ob=document.createElement('div'); 459ob.setAttribute('id',tB.id.replace('_','sw_')); 460ob.setAttribute('class','pmm3-select-wrapper'); 461tB.insertBefore(ob,tB.childNodes[0]); 462el=document.createElement('select'); 463el.setAttribute('id',tB.id.replace('_','s_')); 464el.setAttribute('class','pmm3-select'); 465el.pm3Div=tB.id; 466el.onchange=function(){ 467 var op=this.options[this.selectedIndex]; 468 op.pm3Link.click(); 469}; 470ob.appendChild(el); 471tB.pm3Select=el; 472P7_PM3buildSel(el,tB.pm3UL=tU[0]); 473} 474if(tB.p7opt[15]==1){ 475tB.onmouseout=function(evt){ 476 var k,rt,pp,tD,m=true; 477 evt=(evt)?evt:((event)?event:null); 478 if(P7_PM3getStyle(this,'maxHeight','max-height')=='700777px'){ 479 return; 480 } 481 if(evt){ 482 rt=(evt.relatedTarget)?evt.relatedTarget:evt.toElement; 483 if(rt){ 484 pp=rt.parentNode; 485 while(pp){ 486 if(pp && pp.id && typeof(pp.id)=='string' && pp.id.indexOf(this.id)===0){ 487 m=false; 488 break; 489 } 490 if(pp && pp.tagName && (pp.tagName=='BODY'||pp.tagName=='HTML')){ 491 break; 492 } 493 pp=pp.parentNode; 494 } 495 } 496 if(m){ 497 if(this.pm3MouseTimer){ 498 clearTimeout(this.pm3MouseTimer); 499 } 500 if(this.p7opt[8]==1){ 501 this.pm3MouseTimer=setTimeout("P7_PM3shut('"+this.id+"')",360); 502 } 503 else{ 504 P7_PM3shut(this.id); 505 } 506 } 507 } 508}; 509} 510if(tB.pm3ToolbarClosed){ 511P7_PM3setClass(tBR,'closed'); 512P7_PM3setClass(tBU,'closed'); 513} 514if(tB.p7opt[11]==1){ 515P7_PM3currentMark(tB); 516} 517P7_PM3setBC(tB.id); 518} 519} 520p7PM3a=true; 521} 522function P7_PM3preloader(){ 523 var i,x; 524 for(i=0;i<arguments.length;i++){ 525 x=document.p7PM3preload.length; 526 document.p7PM3preload[x]=new Image(); 527 document.p7PM3preload[x].src=arguments[i]; 528 } 529} 530function P7_PM3imovr(im){ 531 var m=true; 532 if(im.p7state=='open' && im.rollover===0){ 533 m=false; 534 }
535 if(m){ 536 im.src=im.p7imgswap[1]; 537 } 538} 539function P7_PM3imout(im){ 540 if(im.p7state=='open' || im.mark){ 541 im.src=im.p7imgswap[2]; 542 } 543 else{ 544 im.src=im.p7imgswap[0]; 545 } 546} 547function P7_PM3setBC(d){ 548 var i,j,k,tB,bC,tU,tA,wH,cl,m,a,ba,bli,im,tx,el,tgs,nd; 549 tB=document.getElementById(d); 550 bC=document.getElementById(d.replace('_','bc_')); 551 wH=window.location.href; 552 if(tB && bC){ 553 tU=bC.getElementsByTagName('UL'); 554 if(tU && tU[0]){ 555 tA=tU[0].getElementsByTagName('A'); 556 if(tA && tA.length>0){ 557 for(i=0;i<tA.length;i++){ 558 cl=tA[i].getAttribute('class'); 559 if(cl && cl!==''){ 560 if(cl.indexOf('placeholder')>-1){ 561 tU[0].removeChild(tA[i].parentNode); 562 } 563 } 564 } 565 } 566 tA=tB.getElementsByTagName('A'); 567 var aP=[]; 568 for(j=0;j<tA.length;j++){ 569 cl=tA[j].getAttribute('class'); 570 if(cl && cl.indexOf('current_mark')>-1){ 571 aP[aP.length]=j; 572 } 573 } 574 for(k=0;k<aP.length;k++){ 575 m=false; 576 a=tA[aP[k]]; 577 ba=document.createElement('a'); 578 bli=document.createElement('li'); 579 im=a.getElementsByTagName('IMG'); 580 if(im && im[0]){ 581 tx=document.createTextNode(im[0].getAttribute('alt')); 582 } 583 else{ 584 tx=document.createTextNode(a.textContent); 585 } 586 if(!tx || tx===''){ 587 tx='Page '+(i+1); 588 } 589 if(a.href!=wH && a.href!=wH+'#'){ 590 if(a.href.toLowerCase().indexOf('javascript:')==-1){ 591 m=true; 592 } 593 } 594 if(m){ 595 ba.setAttribute('href',a.href); 596 ba.appendChild(tx); 597 bli.appendChild(ba); 598 } 599 else{ 600 bli.appendChild(tx); 601 } 602 tU[0].appendChild(bli); 603 } 604 if(!aP || aP.length===0 || (tB.pmm3DefLink && tB.pmm3DefLink.href!=wH)){ 605 bli=document.createElement('li'); 606 cl=bC.getAttribute('class'); 607 nd=null; 608 m=true; 609 if(cl && cl!==''){ 610 if(cl.indexOf('def-a')>-1){ 611 tgs=document.getElementsByTagName('A'); 612 } 613 else if(cl.indexOf('def-h1')>-1){ 614 tgs=document.getElementsByTagName('H1'); 615 } 616 else if(cl.indexOf('def-h2')>-1){ 617 tgs=document.getElementsByTagName('H2'); 618 } 619 else if(cl.indexOf('def-p')>-1){ 620 tgs=document.getElementsByTagName('P'); 621 } 622 else if(cl.indexOf('def-t')>-1){ 623 tgs=document.getElementsByTagName('TITLE'); 624 } 625 else{ 626 m=false; 627 } 628 if(tgs && tgs[0]){ 629 nd=tgs[0]; 630 } 631 } 632 if(nd && nd.textContent && nd.textContent!==''){ 633 tx=document.createTextNode(nd.textContent); 634 } 635 else{ 636 tx=document.createTextNode('Page'); 637 } 638 if(m){ 639 bli.appendChild(tx); 640 tU[0].appendChild(bli); 641 } 642 } 643 } 644 } 645} 646function P7_PM3fixed(){ 647 var i,tB; 648 if(p7PM3ctl && p7PM3ctl.length){ 649 for(i=0;i<p7PM3ctl.length;i++){ 650 tB=document.getElementById(p7PM3ctl[i][0]); 651 if(tB && tB.pm3Spacer){ 652 if(P7_PM3getStyle(tB.pm3FirstA,'maxHeight','max-height')=='700777px'){ 653 if(tB.pm3FixedOn){ 654 tB.pm3Spacer.style.display='none'; 655 P7_PM3remClass(tB,'p7pm3-fixed'); 656 tB.pm3FixedOn=false; 657 } 658 continue; 659 } 660 if(!tB.pm3FixedOn && tB.getBoundingClientRect().top<0){ 661 tB.pm3Spacer.style.height=tB.offsetHeight+'px'; 662 tB.pm3Spacer.style.display='block'; 663 P7_PM3setClass(tB,'p7pm3-fixed'); 664 tB.pm3FixedOn=true; 665 } 666 else if(tB.pm3FixedOn && tB.pm3Spacer.getBoundingClientRect().top>=0){ 667 tB.pm3Spacer.style.display='none'; 668 P7_PM3remClass(tB,'p7pm3-fixed'); 669 tB.pm3FixedOn=false; 670 } 671 } 672 } 673 } 674} 675function P7_PM3trig(d){ 676 var tB,a; 677 a=document.getElementById(d); 678 tB=document.getElementById(a.pm3Menu); 679 if(tB.pm3MouseTimer){ 680 clearTimeout(tB.pm3MouseTimer); 681 } 682 if(a.pm3Sub){ 683 if(tB.p7opt[8]==1){ 684 tB.pm3MouseTimer=setTimeout("P7_PM3open('"+a.id+"',null,2)",160); 685 } 686 else{ 687 P7_PM3open(a.id,null,2); 688 } 689 } 690 else{ 691 if(tB.p7opt[8]==1){ 692 tB.pm3MouseTimer=setTimeout("P7_PM3toggle('"+a.id+"',null,2)",160); 693 } 694 else{ 695 P7_PM3toggle(a.id,null,2); 696 } 697 } 698} 699function P7_PM3trigTB(du){ 700 var tB,tU; 701 tU=document.getElementById(du); 702 tB=document.getElementById(tU.pm3Menu); 703 if(tB.pm3MouseTimer){ 704 clearTimeout(tB.pm3MouseTimer); 705 } 706 if(tB.p7opt[8]==1){ 707 tB.pm3MouseTimer=setTimeout("P7_PM3toggleTB('"+tU.id+"')",160); 708 } 709 else{ 710 P7_PM3toggleTB(tU.id); 711 } 712} 713function P7_PM3click(a){ 714 var wH,tB,cnv=false,m=false; 715 P7_PM3shutall(a.pm3Menu); 716 wH=window.location.href; 717 if(a.href!=wH&&a.href!=wH+'#'){ 718 if(a.href.toLowerCase().indexOf('javascript:')==-1){ 719 m=true; 720 } 721 } 722 tB=document.getElementById(a.pm3Menu); 723 if(tB.pm3MouseTimer){ 724 clearTimeout(tB.pm3MouseTimer); 725 } 726 if(P7_PM3getStyle(tB,'maxHeight','max-height')=='700777px'){ 727 cnv=true; 728 } 729 if( m && a.pm3Sub && a.pm3State=='closed' ){ 730 if(!tB.pm3Select){ 731 m=false; 732 } 733 } 734 if(a.pm3State=='closed'){ 735 P7_PM3open(a.id,null,1); 736 } 737 else{ 738 P7_PM3close(a.id,null,1); 739 } 740 if(m){ 741 P7_PM3shutall(); 742 } 743 return m; 744} 745function P7_PM3open(d,bp,p){ 746 var i,a,tB,iM,op,sD,tU,mT,mL,cmb,pB; 747 a=document.getElementById(d); 748 if(a.pm3State=='open'){ 749 return; 750 } 751 tB=document.getElementById(a.pm3Menu); 752 if(!bp){ 753 P7_PM3toggle(a.id); 754 } 755 op=tB.p7opt[2]; 756 if(P7_PM3getStyle(a,'maxHeight','max-height')=='700777px'){ 757 if(op!==0){ 758 op=99; 759 } 760 } 761 if(a.hasImg){ 762 iM=a.getElementsByTagName("IMG")[0]; 763 iM.p7state='open'; 764 iM.src=iM.p7imgswap[2]; 765 } 766 if(a.pm3Sub){ 767 sD=document.getElementById(a.pm3Sub); 768 sD.pm3State='open'; 769 tB.pm3Shut=false; 770 a.pm3State='open'; 771 P7_PM3changeClass(a,'trig_closed','trig_open'); 772 P7_PM3changeClass(a.parentNode,'trig_closed','trig_open'); 773 tU=sD.getElementsByTagName('UL')[0]; 774 tU.setAttribute('aria-hidden','false'); 775 sD.style.visibility='hidden'; 776 sD.style.height='auto'; 777 sD.style.display='block'; 778 mT=(a.parentNode.offsetHeight*-1)+tB.p7opt[3]; 779 mL=a.parentNode.offsetWidth+tB.p7opt[4]; 780 if(tB.p7opt[5]==1){ 781 mL=(tU.offsetWidth*-1)-tB.p7opt[4]; 782 } 783 if(tB.p7opt[1]==1 && a.pm3Level==1){ 784 mT=0; 785 mL=0; 786 if(tB.p7opt[7]==1){ 787 mL=((sD.offsetWidth-a.parentNode.offsetWidth)/2)*-1; 788 } 789 else if(tB.p7opt[7]==2){ 790 mL=((sD.offsetWidth-a.parentNode.offsetWidth))*-1; 791 } 792 if(tB.p7opt[16]==1){ 793 if(a.className.indexOf('pm3first')>-1){ 794 mL=0; 795 } 796 else if(a.className.indexOf('pm3last')>-1){ 797 mL=(sD.offsetWidth-a.parentNode.offsetWidth)*-1; 798 } 799 } 800 } 801 if(tB.p7opt[13]==1){ 802 mT-=sD.offsetHeight; 803 if(tB.p7opt[1]==1 && a.pm3Level==1){ 804 mT-=a.parentNode.offsetHeight; 805 } 806 } 807 if(tB.p7opt[6]>0 && sD.getBoundingClientRect){ 808 var adjL=0,adjT=0,vL,vR,pL,pR,pT;
809 var ws=P7_PM3getWinScroll(); 810 var wn=P7_PM3getWinDims(); 811 pL=mL+a.parentNode.getBoundingClientRect().left+ws[1]; 812 pR=pL+sD.offsetWidth; 813 if(tB.p7opt[6]==2){ 814 vL=tB.getBoundingClientRect().left+ws[1]; 815 vR=vL+tB.offsetWidth; 816 if(pR>vR){ 817 if(tB.p7opt[1]==1 && a.pm3Level==1){ 818 mL=mL-(pR-vR); 819 } 820 else{ 821 mL=(tU.offsetWidth*-1)-tB.p7opt[4]; 822 } 823 } 824 pL=mL+a.parentNode.getBoundingClientRect().left+ws[1]; 825 if(pL<vL){ 826 if(tB.p7opt[5]==1 && (tB.p7opt[1]!=1 || (tB.p7opt[1]==1 && a.pm3Level!=1))){ 827 mL=a.parentNode.offsetWidth+tB.p7opt[4]; 828 } 829 else{ 830 mL=mL+(vL-pL); 831 } 832 } 833 } 834 if(tB.p7opt[6]>0){ 835 pL=mL+a.parentNode.getBoundingClientRect().left+ws[1]; 836 pR=pL+sD.offsetWidth; 837 vL=ws[1]; 838 vR=wn[1]; 839 if(pR>vR){ 840 if(tB.p7opt[1]==1 && a.pm3Level==1){ 841 mL=mL-(pR-vR); 842 } 843 else{ 844 mL=(tU.offsetWidth*-1)-tB.p7opt[4]; 845 } 846 } 847 pL=mL+a.parentNode.getBoundingClientRect().left+ws[1]; 848 if(pL<vL){ 849 if(tB.p7opt[5]==1 && (tB.p7opt[1]!=1 || (tB.p7opt[1]==1 && a.pm3Level!=1))){ 850 mL=a.parentNode.offsetWidth+tB.p7opt[4]; 851 } 852 else{ 853 mL=mL+(vL-pL); 854 } 855 } 856 pB=mT+a.parentNode.getBoundingClientRect().bottom+sD.offsetHeight-ws[0]; 857 if(pB > wn[0]){ 858 mT = mT-(pB-wn[0]+2); 859 } 860 pT=mT+a.parentNode.getBoundingClientRect().bottom+ws[0]; 861 if(pT<0){ 862 mT=mT-pT+ws[0]; 863 } 864 } 865 } 866 sD.style.marginTop=mT+'px'; 867 if(tB.p7opt[4]===0){ 868 if(mL==a.parentNode.offsetWidth){ 869 sD.style.marginLeft='100%'; 870 } 871 else if(mL==a.parentNode.offsetWidth*-1){ 872 sD.style.marginLeft='-100%'; 873 } 874 else{ 875 sD.style.marginLeft=mL+'px'; 876 } 877 } 878 else{ 879 sD.style.marginLeft=mL+'px'; 880 } 881 tU.p7animDuration=tB.pm3Duration; 882 tU.p7animType='linear'; 883 if(op==3){ 884 if(tB.p7opt[1]==1 && tU.pm3Level==2){ 885 cmb=2; 886 } 887 else{ 888 cmb=1; 889 } 890 } 891 if(op==1 || cmb==1){ 892 tU.p7animProp='fontSize'; 893 tU.p7animUnit='%'; 894 tU.pm3DefProp='100%'; 895 tU.p7animStartVal=5; 896 tU.p7animCurrentVal=tU.p7animStartVal; 897 tU.p7animFinishVal=100; 898 tU.style[tU.p7animProp]=tU.p7animCurrentVal+tU.p7animUnit; 899 tU.p7animStartTime=P7_PM3getTime(0); 900 tU.p7animDuration=160; 901 sD.style.visibility='visible'; 902 if(!tU.p7PM3running){ 903 tU.p7PM3running=true; 904tU.p7PM3anim=setInterval(function(){ 905 P7_PM3animator(tU); 906} 907, p7PM3dy); 908} 909} 910else if(op==2 || cmb==2){ 911tU.p7animProp='lineHeight'; 912tU.p7animUnit='%'; 913if(!tU.pm3DefProp){ 914tU.pm3DefProp=P7_PM3getStyle(tU,'lineHeight','line-height'); 915tU.pm3DefProp=(tU.pm3DefProp)?tU.pm3DefProp:'normal'; 916} 917tU.p7animStartVal=5; 918tU.p7animCurrentVal=tU.p7animStartVal; 919tU.p7animFinishVal=100; 920tU.style[tU.p7animProp]=tU.p7animCurrentVal+tU.p7animUnit; 921tU.p7animStartTime=P7_PM3getTime(0); 922tU.p7animDuration=160; 923sD.style.visibility='visible'; 924tU.p7cb=function(){ 925this.style[this.p7animProp]=this.pm3DefProp; 926}; 927if(!tU.p7PM3running){ 928tU.p7PM3running=true; 929tU.p7PM3anim=setInterval(function(){ 930 P7_PM3animator(tU,tU.p7cb); 931} 932, p7PM3dy); 933} 934} 935else if(op==4){ 936tU.p7animProp='textIndent'; 937tU.p7animUnit='px'; 938tU.style.overflow='hidden'; 939tU.p7animStartVal=-100; 940tU.p7animCurrentVal=tU.p7animStartVal; 941tU.p7animFinishVal=0; 942tU.style[tU.p7animProp]=tU.p7animCurrentVal+tU.p7animUnit; 943tU.p7animStartTime=P7_PM3getTime(0); 944tU.p7animDuration=160; 945sD.style.visibility='visible'; 946tU.p7cb=function(){ 947this.style.textIndent='0px'; 948this.style.overflow='visible'; 949}; 950if(!tU.p7PM3running){ 951tU.p7PM3running=true; 952tU.p7PM3anim=setInterval(function(){ 953 P7_PM3animator(tU,tU.p7cb); 954} 955, p7PM3dy); 956} 957} 958else if(op==5){ 959if(sD.p7PM3fadeRunning){ 960clearInterval(sD.p7PM3fade); 961sD.p7PM3fadeRunning=false; 962} 963sD.p7animType='quad'; 964sD.pm3StartFade=0; 965sD.pm3FinishFade=99; 966sD.pm3CurrentFade=sD.pm3StartFade; 967if(sD.filters){ 968sD.style.filter='alpha(opacity='+sD.pm3CurrentFade+')'; 969} 970else{ 971sD.style.opacity=sD.pm3CurrentFade/100; 972} 973sD.style.visibility='visible'; 974sD.pm3FadeStartTime=P7_PM3getTime(0); 975sD.pm3FadeDuration=400; 976if(!sD.p7PM3fadeRunning){ 977sD.p7PM3fadeRunning=true; 978sD.p7PM3fade=setInterval(function(){ 979 P7_PM3fade(sD); 980} 981, p7PM3dy); 982} 983} 984else if(op>5 && op<99){ 985sD.style.visibility='visible'; 986P7_PM3setClass(tU,'sub-open'); 987} 988else if(op==99){ 989if(sD.p7PM3running){ 990clearInterval(sD.p7PM3anim); 991sD.p7PM3running=false; 992} 993sD.style.overflow='hidden'; 994sD.p7animType='quad'; 995sD.p7animProp='height';
996sD.p7animUnit='px'; 997sD.p7animStartVal=0; 998sD.p7animCurrentVal=sD.p7animStartVal; 999sD.p7animFinishVal=tU.offsetHeight; 1000sD.style[sD.p7animProp]=sD.p7animCurrentVal+sD.p7animUnit; 1001sD.p7animStartTime=P7_PM3getTime(0); 1002sD.p7animDuration=360; 1003sD.style.visibility='visible'; 1004sD.p7cb=function(){ 1005this.style.height='auto'; 1006this.style.overflow="visible"; 1007}; 1008if(!sD.p7PM3running){ 1009sD.p7PM3running=true; 1010sD.p7PM3anim=setInterval(function(){ 1011 P7_PM3animator(sD,sD.p7cb); 1012} 1013, p7PM3dy); 1014} 1015} 1016else{ 1017sD.style.visibility='visible'; 1018} 1019} 1020} 1021function P7_PM3close(d,p){ 1022 var i,a,tB,iM,op,sD,tU; 1023 a=document.getElementById(d); 1024 if(a.pm3State=='closed'){ 1025 return; 1026 } 1027 tB=document.getElementById(a.pm3Menu); 1028 op=tB.p7opt[2]; 1029 if(P7_PM3getStyle(a,'maxHeight','max-height')=='700777px'){ 1030 if(op!==0){ 1031 op=99; 1032 } 1033 } 1034 if(a.hasImg){ 1035 iM=a.getElementsByTagName("IMG")[0]; 1036 iM.p7state='closed'; 1037 iM.src=iM.p7imgswap[0]; 1038 } 1039 if(a.pm3Sub){ 1040 sD=document.getElementById(a.pm3Sub); 1041 sD.pm3State='closed'; 1042 a.pm3State='closed'; 1043 P7_PM3changeClass(a,'trig_open','trig_closed'); 1044 P7_PM3changeClass(a.parentNode,'trig_open','trig_closed'); 1045 tU=sD.getElementsByTagName('UL')[0]; 1046 tU.setAttribute('aria-hidden','true'); 1047 if(op>0 && op<6){ 1048 if(sD.p7PM3fadeRunning){ 1049 clearInterval(sD.p7PM3fade); 1050 sD.p7PM3fadeRunning=false; 1051 } 1052 sD.p7animType='quad'; 1053 sD.pm3StartFade=100; 1054 sD.pm3FinishFade=0; 1055 sD.pm3CurrentFade=sD.pm3StartFade; 1056 if(sD.filters){ 1057 sD.style.filter='alpha(opacity='+sD.pm3CurrentFade+')'; 1058 } 1059 else{ 1060 sD.style.opacity=sD.pm3CurrentFade/100; 1061 } 1062 sD.pm3FadeStartTime=P7_PM3getTime(0); 1063 sD.pm3FadeDuration=220; 1064 if(!sD.p7PM3fadeRunning){ 1065 sD.p7PM3fadeRunning=true; 1066sD.p7PM3fade=setInterval(function(){ 1067 P7_PM3fade(sD); 1068} 1069, p7PM3dy); 1070} 1071} 1072else if(op>5 && op<99){ 1073P7_PM3remClass(tU,'sub-open'); 1074setTimeout(function(){ 1075 P7_PM3closeAnim(sD); 1076} 1077,300); 1078} 1079else if(op==99){ 1080if(sD.p7PM3running){ 1081 clearInterval(sD.p7PM3anim); 1082 sD.p7PM3running=false; 1083} 1084sD.style.overflow='hidden'; 1085sD.p7animType='quad'; 1086sD.p7animProp='height'; 1087sD.p7animUnit='px'; 1088sD.p7animStartVal=sD.offsetHeight; 1089sD.p7animCurrentVal=sD.p7animStartVal; 1090sD.p7animFinishVal=0; 1091sD.style[sD.p7animProp]=sD.p7animCurrentVal+sD.p7animUnit; 1092sD.p7animStartTime=P7_PM3getTime(0); 1093sD.p7animDuration=360; 1094sD.p7cb=function(){ 1095 this.style.height='0px'; 1096 this.style.display='none'; 1097 this.style.overflow="visible"; 1098}; 1099if(!sD.p7PM3running){ 1100 sD.p7PM3running=true; 1101sD.p7PM3anim=setInterval(function(){ 1102 P7_PM3animator(sD,sD.p7cb); 1103} 1104, p7PM3dy); 1105} 1106} 1107else{ 1108sD.style.height='0px'; 1109sD.style.display='none'; 1110} 1111} 1112} 1113function P7_PM3closeAnim(el){ 1114 el.style.display='none'; 1115 el.style.height='0px'; 1116} 1117function P7_PM3toggle(d,bp,p){ 1118 var i,a,tD,pp; 1119 a=document.getElementById(d); 1120 pp=a.parentNode; 1121 while(pp){ 1122 if(pp.tagName&&pp.tagName=='UL'){ 1123 break; 1124 } 1125 pp=pp.parentNode; 1126 } 1127 tD=pp.getElementsByTagName("DIV"); 1128 if(tD&&tD.length>0){ 1129 for(i=tD.length-1;i>-1;i--){ 1130 if(tD[i].pm3State&&tD[i].pm3State=='open'){ 1131 if(bp==1 || (!bp && tD[i].pm3Trigger!=a)){ 1132 P7_PM3close(tD[i].pm3Trigger.id); 1133 } 1134 } 1135 } 1136 } 1137} 1138function P7_PM3toggleTB(du){ 1139 var i,tU,tD; 1140 tU=document.getElementById(du); 1141 if(tU){ 1142 tD=tU.getElementsByTagName("DIV"); 1143 if(tD&&tD.length>0){ 1144 for(i=tD.length-1;i>-1;i--){ 1145 if(tD[i].pm3State&&tD[i].pm3State=='open'){ 1146 P7_PM3close(tD[i].pm3Trigger.id); 1147 } 1148 } 1149 } 1150 } 1151} 1152function P7_PM3shut(d){ 1153 var i,tB,tD; 1154 if(d){ 1155 tB=document.getElementById(d); 1156 if(tB && !tB.pm3Shut && tB.pm3UL){ 1157 tD=tB.pm3UL.getElementsByTagName("DIV"); 1158 if(tD&&tD.length){ 1159 tB.pm3Shut=true; 1160 for(i=tD.length-1;i>-1;i--){ 1161 if(tD[i].pm3State && tD[i].pm3State=='open'){ 1162 P7_PM3close(tD[i].pm3Trigger.id); 1163 } 1164 } 1165 } 1166 } 1167 } 1168} 1169function P7_PM3shutall(bp){ 1170 var i,tB; 1171 if(p7PM3ctl && p7PM3ctl.length){ 1172 for(i=0;i<p7PM3ctl.length;i++){ 1173 tB=document.getElementById(p7PM3ctl[i][0]); 1174 if(tB && (!bp || bp!=tB.id)){ 1175 P7_PM3shut(tB.id); 1176 } 1177 } 1178 } 1179} 1180function P7_PM3body(evt){ 1181 evt=(evt)?evt:event; 1182 var m=true,pp=(evt.fromElement)?evt.fromElement:evt.target; 1183 while(pp){ 1184 if(pp && pp.id && typeof(pp.id)=='string' && pp.id.indexOf('p7PM3')===0){ 1185 m=false; 1186 break; 1187 } 1188 if(pp && pp.tagName && (pp.tagName=='BODY'||pp.tagName=='HTML')){ 1189 break; 1190 } 1191 pp=pp.parentNode; 1192 }
1193 if(m){ 1194 P7_PM3shutall(); 1195 } 1196} 1197function P7_PM3rsz(){ 1198 var i,tB; 1199 if(p7PM3ctl && p7PM3ctl.length){ 1200 for(i=0;i<p7PM3ctl.length;i++){ 1201 tB=document.getElementById(p7PM3ctl[i][0]); 1202 if(tB){ 1203 if(tB.p7opt && tB.p7opt[15]==1){ 1204 if(P7_PM3getStyle(tB,'maxHeight','max-height')!='700777px'){ 1205 P7_PM3shut(tB.id); 1206 } 1207 } 1208 } 1209 } 1210 } 1211 P7_PM3fixed(); 1212} 1213function P7_PM3animator(el,cb,op){ 1214 var i,tB,tA,tS,et,nv,m=false; 1215 et=P7_PM3getTime(el.p7animStartTime); 1216 if(et>=el.p7animDuration){ 1217 et=el.p7animDuration; 1218 m=true; 1219 } 1220 if(el.p7animCurrentVal!=el.p7animFinishVal){ 1221 nv=P7_PM3anim(el.p7animType, et, el.p7animStartVal, el.p7animFinishVal-el.p7animStartVal, el.p7animDuration); 1222 el.p7animCurrentVal=nv; 1223 el.style[el.p7animProp]=nv+el.p7animUnit; 1224 } 1225 if(m){ 1226 el.p7PM3running=false; 1227 clearInterval(el.p7PM3anim); 1228 if(cb && typeof(cb) === "function"){ 1229 cb.call(el); 1230 } 1231 } 1232} 1233function P7_PM3fade(el,tp){ 1234 var i,tC,tA,op,et,cet,m=false; 1235 et=P7_PM3getTime(el.pm3FadeStartTime); 1236 if(et>=el.pm3FadeDuration){ 1237 et=el.pm3FadeDuration; 1238 m=true; 1239 } 1240 if(el.pm3CurrentFade!=el.pm3FinishFade){ 1241 op=P7_PM3anim(tp,et,el.pm3StartFade,el.pm3FinishFade-el.pm3StartFade,el.pm3FadeDuration); 1242 el.pm3CurrentFade=op; 1243 if(el.filters){ 1244 el.style.filter='alpha(opacity='+el.pm3CurrentFade+')'; 1245 } 1246 else{ 1247 el.style.opacity=el.pm3CurrentFade/100; 1248 } 1249 } 1250 if(m){ 1251 el.p7PM3fadeRunning=false; 1252 clearInterval(el.p7PM3fade); 1253 if(el.pm3FinishFade===0){ 1254 el.style.height='0px'; 1255 el.style.display='none'; 1256 } 1257 if(el.filters){ 1258 el.style.filter=''; 1259 } 1260 else{ 1261 el.style.opacity=1; 1262 } 1263 } 1264} 1265function P7_PM3anim(tp,t,b,c,d){ 1266 if(tp=='quad'){ 1267 if((t/=d/2)<1){ 1268 return c/2*t*t+b; 1269 } 1270 else{ 1271 return -c/2*((--t)*(t-2)-1)+b; 1272 } 1273 } 1274 else{ 1275 return (c*(t/d))+b; 1276 } 1277} 1278function P7_PM3getTime(st){ 1279 var d = new Date(); 1280 return d.getTime() - st; 1281} 1282function P7_PM3mark(){ 1283 p7PM3adv[p7PM3adv.length]=arguments; 1284} 1285function P7_PM3currentMark(el){ 1286 var j,i,wH,cm=false,mt=['',1,'',''],op,r1,k,kk,tA,aU,pp,a,im,x; 1287 wH=window.location.href; 1288 if(el.p7opt[12]!=1){ 1289 wH=wH.replace(window.location.search,''); 1290 } 1291 if(wH.charAt(wH.length-1)=='#'){ 1292 wH=wH.substring(0,wH.length-1); 1293 } 1294 for(k=0;k<p7PM3adv.length;k++){ 1295 if(p7PM3adv[k][0]&&p7PM3adv[k][0]==el.id){ 1296 mt=p7PM3adv[k]; 1297 cm=true; 1298 break; 1299 } 1300 } 1301 op=mt[1]; 1302 if(op<1){ 1303 return; 1304 } 1305 r1=/index\.[\S]*/i; 1306 k=-1; 1307 kk=-1; 1308 tA=el.getElementsByTagName("A"); 1309 for(j=0;j<tA.length;j++){ 1310 aU=tA[j].href.replace(r1,''); 1311 if(op>0){ 1312 if(tA[j].href==wH||aU==wH){ 1313 k=j; 1314 kk=-1; 1315 } 1316 } 1317 if(op==2){ 1318 if(tA[j].firstChild){ 1319 if(tA[j].firstChild.nodeValue==mt[2]){ 1320 kk=j; 1321 } 1322 } 1323 } 1324 if(op==3&&tA[j].href.indexOf(mt[2])>-1){ 1325 kk=j; 1326 } 1327 if(op==4){ 1328 for(x=2;x<mt.length;x+=2){ 1329 if(wH.indexOf(mt[x])>-1){ 1330 if(tA[j].firstChild&&tA[j].firstChild.nodeValue){ 1331 if(tA[j].firstChild.nodeValue==mt[x+1]){ 1332 kk=j; 1333 } 1334 } 1335 } 1336 } 1337 } 1338 } 1339 k=(kk>k)?kk:k; 1340 if(k>-1){ 1341 el.pmm3DefLink=tA[k]; 1342 if(el.pm3Select){ 1343 el.pm3Select.selectedIndex=tA[k].pm3OptIndex; 1344 } 1345 pp=tA[k].parentNode; 1346 while(pp){ 1347 if(pp.tagName&&pp.tagName=='LI'){ 1348 P7_PM3setClass(pp,'li_current_mark'); 1349 a=pp.getElementsByTagName('A'); 1350 if(a&&a[0]){ 1351 P7_PM3setClass(a[0],'current_mark'); 1352 if(a[0].hasImg){ 1353 im=a[0].getElementsByTagName('IMG')[0]; 1354 im.mark=true; 1355 im.src=im.p7imgswap[2]; 1356 } 1357 } 1358 } 1359 else{ 1360 if(pp==el){ 1361 break; 1362 } 1363 } 1364 pp=pp.parentNode; 1365 } 1366 } 1367} 1368function P7_PM3setClass(ob,cl){ 1369 if(ob){ 1370 var cc,nc,r=/\s+/g; 1371 cc=ob.className; 1372 nc=cl; 1373 if(cc&&cc.length>0){ 1374 if(cc.indexOf(cl)==-1){ 1375 nc=cc+' '+cl; 1376 } 1377 else{ 1378 nc=cc; 1379 } 1380 } 1381 nc=nc.replace(r,' '); 1382 ob.className=nc; 1383 } 1384} 1385function P7_PM3remClass(ob,cl){ 1386 if(ob){ 1387 var cc,nc; 1388 cc=ob.className; 1389 if(cc&&cc.indexOf(cl>-1)){ 1390 nc=cc.replace(cl,''); 1391 nc=nc.replace(/\s+/g,' '); 1392 nc=nc.replace(/\s$/,''); 1393 nc=nc.replace(/^\s/,''); 1394 ob.className=nc; 1395 } 1396 } 1397} 1398function P7_PM3changeClass(ob,clf,clt){ 1399 if(ob){ 1400 var cc,nc; 1401 cc=ob.className; 1402 if(cc&&cc.indexOf(clf>-1)){ 1403 nc=cc.replace(clf,clt); 1404 ob.className=nc; 1405 } 1406 else{ 1407 P7_PM3setClass(ob,clt); 1408 } 1409 } 1410} 1411function P7_PM3getStyle(el,s1,s2){ 1412 var s=''; 1413 if(el.currentStyle){ 1414 s=el.currentStyle[s1]; 1415 } 1416 else{ 1417 s=document.defaultView.getComputedStyle(el,"").getPropertyValue(s2); 1418 } 1419 return s; 1420}
1421function P7_PM3getWinDims(){ 1422 var h,w,st; 1423 if(document.documentElement&&document.documentElement.clientHeight){ 1424 w=document.documentElement.clientWidth; 1425 h=document.documentElement.clientHeight; 1426 } 1427 else if(window.innerHeight){ 1428 if(document.documentElement.clientWidth){ 1429 w=document.documentElement.clientWidth; 1430 } 1431 else{ 1432 w=window.innerWidth; 1433 } 1434 h=window.innerHeight; 1435 } 1436 else if(document.body){ 1437 w=document.body.clientWidth; 1438 h=document.body.clientHeight; 1439 } 1440 return [h,w]; 1441} 1442function P7_PM3getWinScroll(){ 1443 var st=0,sl=0; 1444 st=document.body.parentNode.scrollTop; 1445 if(!st){ 1446 st=document.body.scrollTop; 1447 if(!st){ 1448 st=window.scrollY?window.scrollY:0; 1449 } 1450 } 1451 sl=document.body.parentNode.scrollLeft; 1452 if(!sl){ 1453 sl=document.body.scrollLeft; 1454 if(sl){ 1455 sl=window.scrollX?window.scrollX:0; 1456 } 1457 } 1458 return [st,sl]; 1459} 1460function P7_PM3getIEver(){ 1461 var j,v=-1,nv,m=false; 1462 nv=navigator.userAgent.toLowerCase(); 1463 j=nv.indexOf("msie"); 1464 if(j>-1){ 1465 v=parseFloat(nv.substring(j+4,j+8)); 1466 if(document.documentMode){ 1467 v=document.documentMode; 1468 } 1469 } 1470 return v; 1471} 1472function P7_PM3isMobile(){ 1473 var i,m=false,ua=navigator.userAgent.toLowerCase(); 1474 var dv=['iphone','ipad','ipod','touch','android','windows ce','iemobile','windowsce','blackberry','palm','symbian','series60', 1475 'armv','arm7tdmi','opera mobi','opera mini','polaris','kindle','midp','mmp/','portalmmm','smm-mms','sonyericsson']; 1476 for(i=0;i<dv.length;i++){ 1477 if(ua.search(dv[i])>-1){ 1478 m=dv[i]; 1479 break; 1480 } 1481 } 1482 return m; 1483} 1484function P7_PM3getCSSPre(){ 1485 var i,dV,pre=['transition','WebkitTransition']; 1486 var c='none',cssPre=['','-webkit-']; 1487 dV=document.createElement('div'); 1488 for(i=0;i<pre.length;i++){ 1489 if(dV.style[pre[i]]!==undefined){ 1490 c=cssPre[i]; 1491 break; 1492 } 1493 } 1494 return c; 1495} 1496function P7_PM3addSheet(sh){ 1497 var h,hd; 1498 h=document.createElement('style'); 1499 h.type='text/css'; 1500 h.appendChild(document.createTextNode(sh)); 1501 hd=document.getElementsByTagName('head'); 1502 hd[0].appendChild(h); 1503} 1504function P7_PM3buildSel(sl,ob){ 1505 var i,j,k,tx,tA,tU,tx,indent; 1506 if(ob.hasChildNodes){ 1507 for(i=0;i<ob.childNodes.length;i++){ 1508 if(ob.childNodes[i].nodeName && ob.childNodes[i].nodeName=='LI'){ 1509 tA=ob.childNodes[i].getElementsByTagName('A'); 1510 if(tA && tA[0]){ 1511 k=sl.options.length; 1512 indent=' '; 1513 for(j=1;j<tA[0].pm3Level;j++){ 1514 indent+=p7PM3indent; 1515 } 1516 el=document.createElement('option'); 1517 el.text=indent+tA[0].childNodes[0].nodeValue; 1518 tA[0].pm3OptItem=el; 1519 tA[0].pm3OptIndex=k; 1520 el.pm3Link=tA[0]; 1521 sl.add(el,k); 1522 tU=tA[0].parentNode.getElementsByTagName("UL"); 1523 if(tU && tU[0]){ 1524 P7_PM3buildSel(sl,tU[0]); 1525 } 1526 } 1527 } 1528 } 1529 } 1530}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.