1 2/* 3 ================================================ 4 PVII Drop Down Magic scripts 5 Copyright (c) 2013-2015 Project Seven Development 6 www.projectseven.com 7 Version: 1.2.3 -build 33 8 ================================================ 9 10*/ 11 12// define the image swap file naming convention 13 14// rollover image for any image in the normal state 15var p7DMMover='_over'; 16 17// image for any trigger that has an open panel -no rollover 18var p7DMMopen='_down'; 19 20var p7DMMctl=[],p7DMMi=false,p7DMMa=false,p7DMMadv=[],p7DMMdy=(1000/100); 21var p7DMM={ 22 ctl: [], 23 defAnim: 1, 24 defDuration: 1000, 25 status: false, 26 once: false, 27 body: null, 28 prf: 'none', 29 trsnd: '', 30 animDelay: (1000/60) 31}; 32function P7_DMMset(){ 33 var h,sh='',hd; 34 if (!document.getElementById){ 35 return; 36 } 37 var pf=P7_DMMgetCSSPre(); 38 sh+='.p7dmm-sub-wrapper {overflow:hidden; height:0px;}\n'; 39 sh+='.p7DMM ul ul {position: relative;}\n'; 40 sh+='.p7DMM.dmm-vertical ul a {max-height: 700777px;}\n'; 41 sh+='.p7dmm-spcr {width:100%; display:none;}\n'; 42 sh+='.p7dmm-fixed {position:fixed !important;top:0;left:0;width:100%;z-index:900}\n'; 43 sh+='@media only screen and (min-width: 0px) and (max-width: 700px) {'; 44 sh+='.p7DMM ul a {max-height: 700777px;}\n'; 45 sh+='.p7DMM li div li, .p7DMM li.open div li, .p7DMM li.open div li a {'+pf+'transform: none !important; '+pf+'transition: none !important;}\n'; 46 sh+='}\n'; 47 if (document.styleSheets){ 48 h='\n<st' + 'yle type="text/css">\n' + sh + '\n</s' + 'tyle>'; 49 document.write(h); 50 } 51 else{ 52 P7_DMMaddSheet(sh); 53 } 54} 55P7_DMMset(); 56function P7_opDMM(){ 57 if(!document.getElementById){ 58 return; 59 } 60 p7DMMctl[p7DMMctl.length]=arguments; 61} 62function P7_DMMaddLoad(){ 63 if(!document.getElementById){ 64 return; 65 } 66 if(window.addEventListener){ 67 document.addEventListener("DOMContentLoaded",P7_initDMM,false); 68 window.addEventListener("load",P7_initDMM,false); 69 window.addEventListener("unload",P7_DMMrf,false); 70 window.addEventListener("resize",P7_DMMrsz,false); 71 } 72 else if(window.attachEvent){ 73 document.write("<script id=p7ie_dmm defer src=\"//:\"><\/script>"); 74 document.getElementById("p7ie_dmm").onreadystatechange=function(){ 75 if(this.readyState=="complete"){ 76 if(p7DMMctl.length>0){ 77 P7_initDMM(); 78 } 79 } 80 }; 81 window.attachEvent("onload",P7_initDMM); 82 window.attachEvent("onresize",P7_DMMrsz); 83 } 84} 85P7_DMMaddLoad(); 86function P7_DMMrf(){ 87 return; 88} 89function P7_initDMM(){ 90 var i,j,k,x,tB,sD,tU,tD,tA,iM,s1,s2,sr,sh,cl,wns,dv,cl; 91 if(p7DMMi){ 92 return; 93 } 94 p7DMMi=true; 95 document.p7DMMpreload=[]; 96 p7DMM.body=document.body.parentNode; 97 if(/KHTML|WebKit/i.test(navigator.userAgent) || P7_DMMgetIEver()==5 ){ 98 p7DMM.body=document.body; 99 } 100 wns=false; 101 for(j=0;j<p7DMMctl.length;j++){ 102 tB=document.getElementById(p7DMMctl[j][0]); 103 if(tB){ 104 tB.p7opt=p7DMMctl[j]; 105 tB.dmmTrigs=[]; 106 tB.dmmSubs=[]; 107 tB.dmmSubUL=[]; 108 tB.dmmDefaultPanel=0; 109 tB.dmmStartTime=0; 110 tB.dmmDuration=tB.p7opt[2]; 111 tB.dmmAnimType='quad'; 112 tB.dmmToolbarClosed=true; 113 if(tB.p7opt[3]==1){ 114 dv=document.createElement('div'); 115 dv.setAttribute('id',tB.id.replace('_','spcr_')); 116 dv.className=tB.className; 117 P7_DMMsetClass(dv,'p7dmm-spcr'); 118 tB.parentNode.insertBefore(dv, tB.nextSibling); 119 tB.dmmSpacer=dv; 120 dv.dmmMenu=tB; 121 if(!wns){ 122 wns=true; 123 if(window.addEventListener){ 124 window.addEventListener('scroll', P7_DMMfixed, false); 125 } 126 else if (window.attachEvent){ 127 window.attachEvent('onscroll', P7_DMMfixed); 128 } 129 } 130 } 131 tD=document.getElementById(tB.id.replace('_','tb_')); 132 tU=document.getElementById(tB.id.replace('_','u_')); 133 if(tD && tU){ 134 tD.dmmDiv=tB.id; 135 cl=tU.className; 136 if(cl && cl!=='' && cl.indexOf('opened')>-1){ 137 tU.dmmState='open'; 138 tD.dmmState='open'; 139 } 140 else{ 141 P7_DMMremClass(tD,'closed'); 142 P7_DMMremClass(tU,'closed'); 143 tB.dmmToolbarClosed=true; 144 tU.dmmState='closed'; 145 tD.dmmState='closed'; 146 } 147 tD.onclick=function(){ 148 var tD=document.getElementById(this.dmmDiv.replace('_','tb_')); 149 var tU=document.getElementById(this.dmmDiv.replace('_','u_')); 150 if(tU.dmmState=='open'){ 151 tD.dmmState='closed'; 152 tU.dmmState='closed'; 153 P7_DMMremClass(tD,'opened'); 154 P7_DMMsetClass(tD,'closed'); 155 P7_DMMremClass(tU,'opened'); 156 P7_DMMsetClass(tU,'closed'); 157 } 158 else{ 159 tD.dmmState='open'; 160 tU.dmmState='open'; 161 P7_DMMremClass(tD,'closed'); 162 P7_DMMsetClass(tD,'opened'); 163 P7_DMMremClass(tU,'closed'); 164 P7_DMMsetClass(tU,'opened'); 165 } 166 }; 167 tA=tD.getElementsByTagName('A'); 168 if(tA && tA[0]){ 169 tA[0].onclick=function(){ 170 return false;
171 }; 172 } 173 } 174 tA=tB.getElementsByTagName('A'); 175 k=-1; 176 for(i=0;i<tA.length;i++){ 177 if(/dmm-ste/.test(tA[i].getAttribute('class'))){ 178 tA[i].dmmSTE=true; 179 } 180 if(tA[i].id && tA[i].id.indexOf(tB.id.replace('_','t'))===0 ){ 181 k++; 182 tB.dmmTrigs[k]=tA[i]; 183 tA[i].dmmTrigNum=k+1; 184 tB.dmmSubs[k]=null; 185 tB.dmmSubUL[k]=null; 186 tA[i].dmmDiv=tB.id; 187 tA[i].dmmSub=false; 188 tA[i].dmmState='closed'; 189 P7_DMMsetClass(tA[i],'closed'); 190 P7_DMMsetClass(tA[i].parentNode,'closed'); 191 if(!tB.dmmFirstA){ 192 tB.dmmFirstA=tA[i]; 193 } 194 tA[i].onclick=function(){ 195 return P7_DMMclick(this); 196 }; 197 if(tB.p7opt[6]==1){ 198 tA[i].onmouseover=function(){ 199 if(P7_DMMgetStyle(this,'maxHeight','max-height')=='700777px'){ 200 return; 201 } 202 var tB=document.getElementById(this.dmmDiv); 203 if(tB.dmmMouseTimer){ 204 clearTimeout(tB.dmmMouseTimer); 205 } 206 if(this.dmmPointer){ 207 return; 208 } 209 tB.dmmMouseTimer=setTimeout("P7_DMMtrig('"+this.id+"')",250); 210 }; 211 P7_DMMbindPointer(tA[i]); 212 } 213 tA[i].hasImg=false; 214 iM=tA[i].getElementsByTagName("IMG"); 215 if(iM&&iM[0]){ 216 sr=iM[0].getAttribute("src"); 217 iM[0].dmmSwap=tB.p7opt[8]; 218 x=sr.lastIndexOf("."); 219 s1=sr.substring(0,x)+p7DMMover+'.'+sr.substring(x+1); 220 s2=sr.substring(0,x)+p7DMMopen+'.'+sr.substring(x+1); 221 if(iM[0].dmmSwap==1){ 222 iM[0].p7imgswap=[sr,s1,s1]; 223 P7_DMMpreloader(s1); 224 } 225 else if (iM[0].dmmSwap==2){ 226 iM[0].p7imgswap=[sr,s1,s2]; 227 P7_DMMpreloader(s1,s2); 228 } 229 else{ 230 iM[0].p7imgswap=[sr,sr,sr]; 231 } 232 iM[0].p7state='closed'; 233 iM[0].mark=false; 234 iM[0].rollover=tB.p7opt[9]; 235 if(iM[0].dmmSwap>0){ 236 tA[i].hasImg=true; 237 iM[0].onmouseover=function(){ 238 P7_DMMimovr(this); 239 }; 240 iM[0].onmouseout=function(){ 241 P7_DMMimout(this); 242 }; 243 tA[i].onfocus=function(){ 244 P7_DMMimovr(this.getElementsByTagName('IMG')[0]); 245 }; 246 tA[i].onblur=function(){ 247 P7_DMMimout(this.getElementsByTagName('IMG')[0]); 248 }; 249 } 250 } 251 sD=document.getElementById(tA[i].id.replace('t','s')); 252 if(sD){ 253 tB.dmmSubs[k]=sD; 254 sD.dmmDiv=tB.id; 255 tA[i].dmmSub=sD.id; 256 P7_DMMsetClass(tA[i],'trig'); 257 sD.dmmUL=sD.getElementsByTagName('UL')[0]; 258 tB.dmmSubUL[k]=sD.dmmUL; 259 sD.style.height='0px'; 260 sD.dmmUL.style.top='0px'; 261 sD.dmmUL.style.left='0px'; 262 if(tB.p7opt[6]==1){ 263 sD.onmouseover=function(){ 264 var tB=document.getElementById(this.dmmDiv); 265 if(tB.dmmMouseTimer){ 266 clearTimeout(tB.dmmMouseTimer); 267 } 268 }; 269 } 270 } 271 } 272 else if(tA[i].dmmSTE){ 273 tA[i].onclick=function(){ 274 return P7_DMMscrollToElement(this); 275 }; 276 } 277 } 278 if(tB.p7opt[6]==1){ 279 P7_DMMbindPointer(tB); 280 tB.onmouseout=function(evt){ 281 var tg,pp,tA,tB,m=true; 282 if(P7_DMMgetStyle(this.dmmTrigs[0],'maxHeight','max-height')=='700777px'){ 283 return; 284 } 285 evt=(evt)?evt:event; 286 tg=(evt.toElement)?evt.toElement:evt.relatedTarget; 287 if(tg){ 288 pp=tg; 289 while(pp){ 290 if(pp==this){ 291 m=false; 292 break; 293 } 294 if(pp.nodeName && pp.nodeName=='BODY'){ 295 break; 296 } 297 pp=pp.parentNode; 298 } 299 } 300 if(this.dmmPointer){ 301 m=false; 302 } 303 if(m){ 304 if(this.dmmMouseTimer){ 305 clearTimeout(this.dmmMouseTimer); 306 } 307 if(this.p7opt[7]==1 && this.dmmDefaultPanel>0){ 308 tA=this.dmmTrigs[this.dmmDefaultPanel-1]; 309 this.dmmMouseTimer=setTimeout("P7_DMMtrig('"+tA.id+"')",250); 310 } 311 else{ 312 this.dmmMouseTimer=setTimeout("P7_DMMtoggle('"+this.id+"')",250); 313 } 314 } 315 }; 316 } 317 } 318 if(tB.p7opt[4]==1){ 319 P7_DMMcurrentMark(tB); 320 } 321 P7_DMMurl(tB.id); 322 if(tB.dmmDefaultPanel>0 && tB.dmmDefaultPanel<tB.dmmTrigs.length+1){ 323 if(tB.p7opt[6]===0 || tB.p7opt[7]==1){ 324 P7_DMMopen(tB.dmmTrigs[tB.dmmDefaultPanel-1]); 325 } 326 } 327 if(tB.dmmToolbarClosed){ 328 P7_DMMsetClass(tD,'closed'); 329 P7_DMMsetClass(tU,'closed'); 330 } 331 } 332 p7DMMa=true; 333} 334function P7_DMMpreloader(){ 335 var i,x; 336 for(i=0;i<arguments.length;i++){ 337 x=document.p7DMMpreload.length; 338 document.p7DMMpreload[x]=new Image(); 339 document.p7DMMpreload[x].src=arguments[i]; 340 } 341} 342function P7_DMMimovr(im){ 343 var m=true; 344 if(im.p7state=='open' && im.rollover===0){ 345 m=false; 346 }
347 if(m){ 348 im.src=im.p7imgswap[1]; 349 } 350} 351function P7_DMMimout(im){ 352 if(im.p7state=='open' || im.mark){ 353 im.src=im.p7imgswap[2]; 354 } 355 else{ 356 im.src=im.p7imgswap[0]; 357 } 358} 359function P7_DMMclick(a){ 360 var wH,tB,m=false; 361 if(a.dmmSub){ 362 tB=document.getElementById(a.dmmDiv); 363 if(tB.p7DMMrunning){ 364 return m; 365 } 366 } 367 wH=window.location.href; 368 if(a.href!=wH&&a.href!=wH+'#'){ 369 if(a.href.toLowerCase().indexOf('javascript:')==-1){ 370 m=true; 371 } 372 } 373 if(m && a.dmmSub && a.dmmState=='closed'){ 374 m=false; 375 } 376 if(a.dmmSTE){ 377 P7_DMMscrollToElement(a); 378 m=false; 379 } 380 if(a.dmmState=='closed'){ 381 P7_DMMopen(a); 382 } 383 else{ 384 P7_DMMclose(a); 385 } 386 return m; 387} 388function P7_DMMtrig(d){ 389 var i,a; 390 a=document.getElementById(d); 391 if(a){ 392 if(a.dmmPointer){ 393 return; 394 } 395 else{ 396 P7_DMMopen(a,2); 397 } 398 } 399} 400function P7_DMMopen(a,bp){ 401 var i,j,op,sD,tB,iM,tU,tA; 402 if(a.dmmState=='open'){ 403 return; 404 } 405 tB=document.getElementById(a.dmmDiv); 406 if(a.dmmPointer && bp==2){ 407 return; 408 } 409 op=tB.p7opt[1]; 410 a.dmmState='open'; 411 P7_DMMremClass(a,'closed'); 412 P7_DMMremClass(a.parentNode,'closed'); 413 P7_DMMsetClass(a,'open'); 414 P7_DMMsetClass(a.parentNode,'open'); 415 if(P7_DMMgetStyle(a,'maxHeight','max-height')=='700777px'){ 416 if(op!==0){ 417 op=2; 418 } 419 } 420 if(a.hasImg){ 421 iM=a.getElementsByTagName("IMG")[0]; 422 iM.p7state='open'; 423 iM.src=iM.p7imgswap[2]; 424 } 425 P7_DMMtoggle(a); 426 if(a.dmmSub){ 427 sD=document.getElementById(a.dmmSub); 428 if(op==1){ 429 sD.dmmStartFade=0; 430 sD.dmmFinishFade=99; 431 sD.dmmCurrentFade=sD.dmmStartFade; 432 if(sD.filters){ 433 sD.style.filter='alpha(opacity='+sD.dmmCurrentFade+')'; 434 } 435 else{ 436 sD.style.opacity=sD.dmmCurrentFade/100; 437 } 438 sD.style.height='auto'; 439 sD.style.display='block'; 440 sD.dmmStartTime=P7_DMMgetTime(0); 441 sD.dmmDuration=tB.dmmDuration; 442 sD.p7DMMrunning=true; 443 sD.p7DMMfade=setInterval("P7_DMMfade('"+sD.id+"','"+tB.dmmAnimType+"')",p7DMMdy); 444 } 445 else if(op==2){ 446 tU=sD.dmmUL; 447 tB.p7animType='quad'; 448 tB.p7animProp='height'; 449 tB.p7animUnit='px'; 450 if(tB.p7opt[1]==3 || tB.p7opt[1]==4 || tB.p7opt[1]==5){ 451 tU.style.top='0px'; 452 tU.style.left='0px'; 453 } 454 sD.style.display='block'; 455 for(j=0;j<tB.dmmTrigs.length;j++){ 456 if(tB.dmmSubs[j]){ 457 tB.dmmSubs[j].p7animStartVal=tB.dmmSubs[j].offsetHeight; 458 } 459 } 460 sD.p7animCurrentVal=sD.p7animStartVal; 461 sD.p7animFinishVal=tU.offsetHeight; 462 sD.style[tB.p7animProp]=sD.p7animCurrentVal+tB.p7animUnit; 463 tB.p7animStartTime=P7_DMMgetTime(0); 464 tB.p7animDuration=tB.dmmDuration; 465 if(!tB.p7DMMrunning){ 466 tB.p7DMMrunning=true; 467 tB.p7DMManim=setInterval("P7_DMManimator('"+tB.id+"',"+op+")",p7DMMdy); 468 } 469 } 470 else if(op==3){ 471 tU=sD.dmmUL; 472 tB.p7animType='quad'; 473 tB.p7animProp='top'; 474 tB.p7animUnit='px'; 475 sD.style.display='block'; 476 for(j=0;j<tB.dmmTrigs.length;j++){ 477 if(tB.dmmSubUL[j]){ 478 tB.dmmSubUL[j].p7animStartVal=parseInt(tB.dmmSubUL[j].style.top,10); 479 } 480 } 481 if(tU.p7animCurrentVal!=tU.p7animFinishVal){ 482 tU.p7animStartVal=tU.p7animCurrentVal; 483 } 484 else{ 485 tU.p7animStartVal=tU.offsetHeight*-1; 486 } 487 tU.p7animCurrentVal=tU.p7animStartVal; 488 tU.p7animFinishVal=0; 489 tU.style[tB.p7animProp]=tU.p7animCurrentVal+tB.p7animUnit; 490 sD.style.height='auto'; 491 tB.p7animStartTime=P7_DMMgetTime(0); 492 tB.p7animDuration=tB.dmmDuration; 493 if(!tB.p7DMMrunning){ 494 tB.p7DMMrunning=true; 495 tB.p7DMManim=setInterval("P7_DMManimator('"+tB.id+"',"+op+")",p7DMMdy); 496 } 497 } 498 else if(op==4 || op==5){ 499 tU=sD.dmmUL; 500 tB.p7animType='quad'; 501 tB.p7animProp='left'; 502 tB.p7animUnit='px'; 503 sD.style.display='block'; 504 for(j=0;j<tB.dmmTrigs.length;j++){ 505 if(tB.dmmSubUL[j]){ 506 tB.dmmSubUL[j].p7animStartVal=parseInt(tB.dmmSubUL[j].style.left,10); 507 } 508 } 509 if(tU.p7animCurrentVal!=tU.p7animFinishVal){ 510 tU.p7animStartVal=tU.p7animCurrentVal; 511 } 512 else{ 513 tU.p7animStartVal=sD.offsetWidth*-1; 514 } 515 tU.p7animCurrentVal=tU.p7animStartVal; 516 tU.p7animFinishVal=0; 517 tU.style[tB.p7animProp]=tU.p7animCurrentVal+tB.p7animUnit; 518 sD.style.height='auto'; 519 tB.p7animStartTime=P7_DMMgetTime(0); 520 tB.p7animDuration=tB.dmmDuration; 521 if(!tB.p7DMMrunning){ 522 tB.p7DMMrunning=true; 523 tB.p7DMManim=setInterval("P7_DMManimator('"+tB.id+"',"+op+")",p7DMMdy); 524 } 525 } 526 else if(op==6){ 527 if(tB.p7DMMrunning){ 528 tB.p7DMMrunning=false; 529 clearInterval(tB.p7DMManim); 530 } 531 sD.p7animType='linear'; 532 sD.p7animProp='marginLeft'; 533 sD.p7animUnit='px'; 534 tA=sD.getElementsByTagName('A'); 535 sD.p7animStartVal=-100; 536 sD.p7animFinishVal=0; 537 for(j=0;j<tA.length;j++){ 538 if(tA[j]){ 539 tA[j].style[sD.p7animProp]=sD.p7animStartVal+sD.p7animUnit; 540 } 541 } 542 sD.p7animStartTime=P7_DMMgetTime(0); 543 sD.p7animDuration=tB.dmmDuration; 544 sD.style.height='auto'; 545 sD.style.display='block'; 546 tB.p7DMMrunning=true; 547 tB.p7DMManim=setInterval("P7_DMMlinkAnimator('"+sD.id+"',"+op+")",p7DMMdy); 548 } 549 else{ 550 sD.style.display='block'; 551 sD.style.height='auto'; 552 } 553 } 554} 555function P7_DMMclose(a,bp){ 556 var i,j,op,sD,tB,iM,tU; 557 if(a.dmmState=='closed'){ 558 return; 559 } 560 tB=document.getElementById(a.dmmDiv); 561 op=tB.p7opt[1]; 562 a.dmmState='closed'; 563 P7_DMMremClass(a,'open'); 564 P7_DMMremClass(a.parentNode,'open'); 565 P7_DMMsetClass(a,'closed'); 566 P7_DMMsetClass(a.parentNode,'closed'); 567 if(P7_DMMgetStyle(a,'maxHeight','max-height')=='700777px'){ 568 if(op!==0){ 569 op=2; 570 } 571 } 572 if(a.hasImg){ 573 iM=a.getElementsByTagName("IMG")[0]; 574 iM.p7state='closed'; 575 iM.src=iM.p7imgswap[0]; 576 } 577 if(a.dmmSub){ 578 sD=document.getElementById(a.dmmSub); 579 if(op==2){ 580 tU=sD.dmmUL; 581 tB.p7animType='quad'; 582 tB.p7animProp='height';
583 tB.p7animUnit='px'; 584 for(j=0;j<tB.dmmTrigs.length;j++){ 585 if(tB.dmmSubs[j]){ 586 tB.dmmSubs[j].p7animStartVal=tB.dmmSubs[j].offsetHeight; 587 } 588 } 589 sD.p7animCurrentVal=sD.p7animStartVal; 590 sD.p7animFinishVal=0; 591 sD.style[tB.p7animProp]=sD.p7animCurrentVal+tB.p7animUnit; 592 tB.p7animStartTime=P7_DMMgetTime(0); 593 tB.p7animDuration=tB.dmmDuration; 594 if(!tB.p7DMMrunning){ 595 tB.p7DMMrunning=true; 596 tB.p7DMManim=setInterval("P7_DMManimator('"+tB.id+"',"+op+")",p7DMMdy); 597 } 598 } 599 else if(op==3){ 600 tU=sD.dmmUL; 601 tB.p7animType='quad'; 602 tB.p7animProp='top'; 603 tB.p7animUnit='px'; 604 if(tU.p7animCurrentVal!=tU.p7animFinishVal){ 605 tU.p7animStartVal=tU.p7animCurrentVal; 606 } 607 else{ 608 tU.p7animStartVal=parseInt(tU.style.top,10); 609 } 610 for(j=0;j<tB.dmmTrigs.length;j++){ 611 if(tB.dmmSubUL[j]){ 612 tB.dmmSubUL[j].p7animStartVal=parseInt(tB.dmmSubUL[j].style.top,10); 613 } 614 } 615 tU.p7animCurrentVal=tU.p7animStartVal; 616 tU.p7animFinishVal=tU.offsetHeight*-1; 617 tU.style[tU.p7animProp]=tU.p7animCurrentVal+tU.p7animUnit; 618 tB.p7animStartTime=P7_DMMgetTime(0); 619 tB.p7animDuration=tB.dmmDuration; 620 if(!tB.p7DMMrunning){ 621 tB.p7DMMrunning=true; 622 tB.p7DMManim=setInterval("P7_DMManimator('"+tB.id+"',"+op+")",p7DMMdy); 623 } 624 } 625 else if(op==4 || op==5){ 626 tU=sD.dmmUL; 627 tB.p7animType='quad'; 628 tB.p7animProp='left'; 629 tB.p7animUnit='px'; 630 sD.style.display='block'; 631 for(j=0;j<tB.dmmTrigs.length;j++){ 632 if(tB.dmmSubUL[j]){ 633 tB.dmmSubUL[j].p7animStartVal=parseInt(tB.dmmSubUL[j].style.left,10); 634 } 635 } 636 tU.p7animCurrentVal=tU.p7animStartVal; 637 if(op==4){ 638 tU.p7animFinishVal=sD.offsetWidth; 639 } 640 else{ 641 tU.p7animFinishVal=sD.offsetWidth*-1; 642 } 643 tU.style[tB.p7animProp]=tU.p7animCurrentVal+tB.p7animUnit; 644 sD.style.height='auto'; 645 tB.p7animStartTime=P7_DMMgetTime(0); 646 tB.p7animDuration=tB.dmmDuration; 647 if(!tB.p7DMMrunning){ 648 tB.p7DMMrunning=true; 649 tB.p7DMManim=setInterval("P7_DMManimator('"+tB.id+"',"+op+")",p7DMMdy); 650 } 651 } 652 else{ 653 sD.style.display='none'; 654 sD.style.height='0px'; 655 } 656 } 657} 658function P7_DMMtoggle(a,bp){ 659 var i,tB; 660 if(typeof(a)=='object'){ 661 tB=document.getElementById(a.dmmDiv); 662 } 663 else if(typeof(a)=='string'){ 664 tB=document.getElementById(a); 665 } 666 else{ 667 return; 668 } 669 for(i=0;i<tB.dmmTrigs.length;i++){ 670 if(tB.dmmTrigs[i]!=a){ 671 if(tB.dmmTrigs[i].dmmState!='closed'){ 672 P7_DMMclose(tB.dmmTrigs[i]); 673 } 674 } 675 } 676} 677function P7_DMMfixed(){ 678 var i,tB; 679 if(p7DMMctl && p7DMMctl.length){ 680 for(i=0;i<p7DMMctl.length;i++){ 681 tB=document.getElementById(p7DMMctl[i][0]); 682 if(tB && tB.dmmSpacer){ 683 if(P7_DMMgetStyle(tB.dmmFirstA,'maxHeight','max-height')=='700777px'){ 684 if(tB.dmmFixedOn){ 685 tB.dmmSpacer.style.display='none'; 686 P7_DMMremClass(tB,'p7dmm-fixed'); 687 tB.dmmFixedOn=false; 688 } 689 continue; 690 } 691 if(!tB.dmmFixedOn && tB.getBoundingClientRect().top<0){ 692 tB.dmmSpacer.style.height=tB.offsetHeight+'px'; 693 tB.dmmSpacer.style.display='block'; 694 P7_DMMsetClass(tB,'p7dmm-fixed'); 695 tB.dmmFixedOn=true; 696 } 697 else if(tB.dmmFixedOn && tB.dmmSpacer.getBoundingClientRect().top>=0){ 698 tB.dmmSpacer.style.display='none'; 699 P7_DMMremClass(tB,'p7dmm-fixed'); 700 tB.dmmFixedOn=false; 701 } 702 } 703 } 704 } 705} 706function P7_DMManimator(d,op){ 707 var i,tB,tA,tS,et,nv,m=false; 708 tB=document.getElementById(d); 709 et=P7_DMMgetTime(tB.p7animStartTime); 710 if(et>=tB.p7animDuration){ 711 et=tB.p7animDuration; 712 } 713 tA=tB.dmmTrigs; 714 if(op==3 || op==4 || op==5){ 715 tS=tB.dmmSubUL; 716 } 717 else{ 718 tS=tB.dmmSubs; 719 } 720 for(i=0;i<tA.length;i++){ 721 if(tS[i]){ 722 if(tS[i].p7animCurrentVal!=tS[i].p7animFinishVal){ 723 nv=P7_DMManim(tB.p7animType,et,tS[i].p7animStartVal,tS[i].p7animFinishVal-tS[i].p7animStartVal,tB.p7animDuration); 724 tS[i].p7animCurrentVal=nv; 725 tS[i].style[tB.p7animProp]=nv+tB.p7animUnit; 726 if(tS[i].p7animCurrentVal==tS[i].p7animFinishVal){ 727 if(tA[i].dmmState=='closed'){ 728 tB.dmmSubs[i].style.display='none'; 729 tB.dmmSubs[i].style.height='0px'; 730 } 731 else{ 732 tB.dmmSubs[i].style.height='auto'; 733 } 734 } 735 else{ 736 m=true; 737 } 738 } 739 else{ 740 } 741 } 742 } 743 if(!m){ 744 tB.p7DMMrunning=false; 745 clearInterval(tB.p7DMManim); 746 } 747} 748function P7_DMMlinkAnimator(d,op){ 749 var i,sD,tA,tB,et,nv; 750 sD=document.getElementById(d); 751 et=P7_DMMgetTime(sD.p7animStartTime); 752 if(et>=sD.p7animDuration){ 753 et=sD.p7animDuration; 754 } 755 tA=sD.getElementsByTagName('A') ; 756 nv=P7_DMManim(sD.p7animType,et,sD.p7animStartVal,sD.p7animFinishVal-sD.p7animStartVal,sD.p7animDuration); 757 for(i=0;i<tA.length;i++){ 758 tA[i].style[sD.p7animProp]=nv+sD.p7animUnit; 759 } 760 if(et>=sD.p7animDuration){ 761 tB=document.getElementById(sD.dmmDiv); 762 tB.p7DMMrunning=false; 763 clearInterval(tB.p7DMManim); 764 } 765} 766function P7_DMMfade(d,tp){ 767 var i,el,tC,tA,op,et,cet,m=false; 768 el=document.getElementById(d); 769 et=P7_DMMgetTime(el.dmmStartTime); 770 if(et>=el.dmmDuration){ 771 et=el.dmmDuration; 772 m=true; 773 } 774 if(el.dmmCurrentFade!=el.dmmFinishFade){ 775 op=P7_DMManim(tp,et,el.dmmStartFade,el.dmmFinishFade-el.dmmStartFade,el.dmmDuration); 776 el.dmmCurrentFade=op; 777 if(el.filters){ 778 el.style.filter='alpha(opacity='+el.dmmCurrentFade+')'; 779 } 780 else{ 781 el.style.opacity=el.dmmCurrentFade/100; 782 } 783 } 784 if(m){ 785 el.p7DMMrunning=false; 786 clearInterval(el.p7DMMfade); 787 if(el.dmmFinishFade===0){ 788 el.style.height='0px'; 789 el.style.display='none'; 790 } 791 if(el.filters){ 792 el.style.filter=''; 793 } 794 else{ 795 el.style.opacity=1; 796 } 797 } 798} 799function P7_DMMscrollToElement(a){ 800 var st,dy,op,el,t,tf,h,tb; 801 h=a.hash; 802 if(!h || h===''){ 803 return false;
804 } 805 else{ 806 h=h.replace('#',''); 807 } 808 el=document.getElementById(h); 809 if(!el){ 810 return false; 811 } 812 if(p7DMM.body.p7AnimRunning){ 813 p7DMM.body.p7AnimRunning=false; 814 clearInterval(p7DMM.body.p7DMManim); 815 } 816 if(typeof(p7STT)=='object'){ 817 if(p7STT.body && p7STT.body.p7AnimRunning){ 818 p7STT.body.p7AnimRunning=false; 819 clearInterval(p7STT.body.p7STTanim); 820 } 821 } 822 st=p7DMM.body.scrollTop; 823 t=st+el.getBoundingClientRect().top; 824 tf=parseInt(a.getAttribute('data-top-offset'),10); 825 if(tf && tf!==''){ 826 t-=tf; 827 } 828 if(P7_DMMgetStyle(a,'maxHeight','max-height')!='700777px'){ 829 tf=a.getAttribute('data-top-offset-id'); 830 if(tf && tf!==''){ 831 tb=document.getElementById(tf); 832 if(tb){ 833 t-=tb.offsetHeight; 834 } 835 } 836 } 837 if(p7DMM.defAnim==1){ 838 P7_DMMscrollAnim(p7DMM.body,st,t,p7DMM.defDuration,'quad'); 839 } 840 else{ 841 p7DMM.body.scrollTop=t; 842 if(typeof(P7_STTrsz)=='function'){ 843 P7_STTrsz() 844 } 845 } 846 return false; 847} 848function P7_DMMscrollAnim(ob,fv,tv,dur,typ,cb){ 849 if(ob.p7AnimRunning){ 850 ob.p7AnimRunning=false; 851 clearInterval(ob.p7DMManim); 852 } 853 typ=(!typ)?'quad':typ; 854 ob.p7animType=typ; 855 ob.p7animStartVal=fv; 856 ob.p7animCurrentVal=ob.p7animStartVal; 857 ob.p7animFinishVal=tv; 858 ob.p7animStartTime=P7_DMMgetTime(0); 859 ob.p7animDuration=dur; 860 if(!ob.p7AnimRunning){ 861 ob.p7AnimRunning=true; 862ob.p7DMManim=setInterval(function(){ 863 P7_DMMscrollAnimator(ob,cb); 864} 865, p7DMM.animDelay); 866} 867} 868function P7_DMMscrollAnimator(el,cb,op){ 869 var i,tB,tA,tS,et,nv,m=false; 870 et=P7_DMMgetTime(el.p7animStartTime); 871 if(et>=el.p7animDuration){ 872 et=el.p7animDuration; 873 m=true; 874 } 875 if(el.p7animCurrentVal!=el.p7animFinishVal){ 876 nv=P7_DMManim(el.p7animType, et, el.p7animStartVal, el.p7animFinishVal-el.p7animStartVal, el.p7animDuration); 877 el.p7animCurrentVal=nv; 878 el.scrollTop=nv; 879 } 880 if(m){ 881 el.p7AnimRunning=false; 882 clearInterval(el.p7DMManim); 883 if(typeof(P7_STTrsz)=='function'){ 884 P7_STTrsz() 885 } 886 if(cb && typeof(cb) === "function"){ 887 cb.call(el); 888 } 889 } 890} 891function P7_DMManim(tp,t,b,c,d){ 892 if(tp=='quad'){ 893 if((t/=d/2)<1){ 894 return c/2*t*t+b; 895 } 896 else{ 897 return -c/2*((--t)*(t-2)-1)+b; 898 } 899 } 900 else{ 901 return (c*(t/d))+b; 902 } 903} 904function P7_DMMgetTime(st){ 905 var d = new Date(); 906 return d.getTime() - st; 907} 908function P7_DMMmark(){ 909 p7DMMadv[p7DMMadv.length]=arguments; 910} 911function P7_DMMcurrentMark(el){ 912 var j,i,x,wH,cm=false,mt=['',1,'',''],op,r1,k,kk,tA,aU,pp,tr,aT,aP,d,pn,im; 913 wH=window.location.href; 914 if(el.p7opt[5]!=1){ 915 wH=wH.replace(window.location.search,''); 916 } 917 if(wH.charAt(wH.length-1)=='#'){ 918 wH=wH.substring(0,wH.length-1); 919 } 920 for(k=0;k<p7DMMadv.length;k++){ 921 if(p7DMMadv[k][0]&&p7DMMadv[k][0]==el.id){ 922 mt=p7DMMadv[k]; 923 cm=true; 924 break; 925 } 926 } 927 op=mt[1]; 928 if(op<1){ 929 return; 930 } 931 r1=/index\.[\S]*/i; 932 k=-1; 933 kk=-1; 934 tA=el.getElementsByTagName('A'); 935 for(j=0;j<tA.length;j++){ 936 aU=tA[j].href.replace(r1,''); 937 if(op>0){ 938 if(tA[j].href==wH || aU==wH){ 939 k=j; 940 kk=-1; 941 } 942 } 943 if(op==2){ 944 if(tA[j].firstChild){ 945 if(tA[j].firstChild.nodeValue==mt[2]){ 946 kk=j; 947 } 948 } 949 } 950 if(op==3&&tA[j].href.indexOf(mt[2])>-1){ 951 kk=j; 952 } 953 if(op==4){ 954 for(x=2;x<mt.length;x+=2){ 955 if(wH.indexOf(mt[x])>-1){ 956 if(tA[j].firstChild&&tA[j].firstChild.nodeValue){ 957 if(tA[j].firstChild.nodeValue==mt[x+1]){ 958 kk=j; 959 } 960 } 961 } 962 } 963 } 964 } 965 k=(kk>k)?kk:k; 966 if(k>-1){ 967 if(tA[k].dmmDiv){ 968 tr=tA[k]; 969 } 970 else{ 971 P7_DMMsetClass(tA[k],'current_mark'); 972 P7_DMMsetClass(tA[k].parentNode,'current_mark'); 973 pp=tA[k].parentNode; 974 while (pp){ 975 if(pp.dmmDiv && pp.id && pp.id.indexOf('p7DMMs')===0){ 976 if(pp.dmmDiv==el.id){ 977 tr=document.getElementById(pp.id.replace('s','t')); 978 if(tr){ 979 break; 980 } 981 } 982 } 983 pp=pp.parentNode; 984 } 985 } 986 if(tr){ 987 P7_DMMsetClass(tr,'current_mark'); 988 P7_DMMsetClass(tr.parentNode,'current_mark'); 989 if(tr.hasImg){ 990 im=tr.getElementsByTagName('IMG')[0]; 991 im.mark=true; 992 im.src=im.p7imgswap[2]; 993 } 994 if(tr.dmmTrigNum){ 995 el.dmmDefaultPanel=tr.dmmTrigNum; 996 } 997 } 998 } 999} 1000function P7_DMMbindPointer(el){ 1001 if(navigator.maxTouchPoints){ 1002 el.addEventListener('pointerdown',P7_DMMsetPointer,false); 1003 el.addEventListener('mouseover',P7_DMMsetPointer,false); 1004 el.addEventListener('pointerout',P7_DMMsetPointer,false); 1005 el.addEventListener('mouseout',P7_DMMsetPointer,false); 1006 } 1007 else if(navigator.msMaxTouchPoints){ 1008 el.addEventListener('MSPointerDown',P7_DMMsetPointer,false); 1009 el.addEventListener('mouseover',P7_DMMsetPointer,false); 1010 el.addEventListener('MSPointerOut',P7_DMMsetPointer,false); 1011 el.addEventListener('mouseout',P7_DMMsetPointer,false); 1012 } 1013 else if(el.ontouchstart !== undefined){ 1014 el.addEventListener('touchstart',P7_DMMsetPointer,false); 1015 } 1016} 1017function P7_DMMsetPointer(evt){ 1018 if(evt.pointerType){ 1019 if( evt.MSPOINTER_TYPE_TOUCH || evt.pointerType=='touch'){ 1020 this.dmmPointer=true; 1021 } 1022 else if( evt.MSPOINTER_TYPE_PEN || evt.pointerType=='pen'){ 1023 this.dmmPointer=true; 1024 } 1025 else{ 1026 this.dmmPointer=false; 1027 } 1028 } 1029 else if (this.ontouchstart !== undefined){ 1030 this.dmmPointer=true; 1031 } 1032} 1033function P7_DMMurl(dv){ 1034 var i,h,s,x,tB,d='dmm',pn,n=dv.replace("p7DMM_",""),tr; 1035 if(document.getElementById){ 1036 tB=document.getElementById(dv); 1037 h=document.location.search; 1038 if(h){ 1039 h=h.replace('?',''); 1040 s=h.split(/[=&]/g); 1041 if(s&&s.length){ 1042 for(i=0;i<s.length;i+=2){ 1043 if(s[i]==d){ 1044 x=s[i+1]; 1045 if(n!=x.charAt(0)){ 1046 x=false; 1047 } 1048 if(x){ 1049 pn='p7DMMt'+x; 1050 tr=document.getElementById(pn); 1051 if(tr){ 1052 if(tr.dmmTrigNum){ 1053 tB.dmmDefaultPanel=tr.dmmTrigNum; 1054 } 1055 } 1056 } 1057 } 1058 } 1059 } 1060 } 1061 h=document.location.hash; 1062 if(h){ 1063 x=h.substring(1,h.length); 1064 if(n!=x.charAt(3)){ 1065 x=false; 1066 } 1067 if(x&&x.indexOf(d)===0){ 1068 pn='p7DMMt'+x.substring(3); 1069 tr=document.getElementById(pn); 1070 if(tr){ 1071 if(tr.dmmTrigNum){ 1072 tB.dmmDefaultPanel=tr.dmmTrigNum; 1073 } 1074 } 1075 } 1076 } 1077 } 1078} 1079function P7_DMMgetCSSPre(){ 1080 var i,dV,pre=['transition','WebkitTransition','MozTransition','OTransition','msTransition']; 1081 var c='none',cssPre=['','-webkit-','-moz-','-o-','-ms-']; 1082 dV=document.createElement('div'); 1083 for(i=0;i<pre.length;i++){
1084 if(dV.style[pre[i]]!==undefined){ 1085 c=cssPre[i]; 1086 break; 1087 } 1088 } 1089 return c; 1090} 1091function P7_DMMrsz(){ 1092 P7_DMMfixed(); 1093} 1094function P7_DMMgetIEver(){ 1095 var j,v=-1,nv,m=false; 1096 nv=navigator.userAgent.toLowerCase(); 1097 j=nv.indexOf("msie"); 1098 if(j>-1){ 1099 v=parseFloat(nv.substring(j+4,j+8)); 1100 if(document.documentMode){ 1101 v=document.documentMode; 1102 } 1103 } 1104 return v; 1105} 1106function P7_DMMsetClass(ob,cl){ 1107 if(ob){ 1108 var cc,nc,r=/\s+/g; 1109 cc=ob.className; 1110 nc=cl; 1111 if(cc&&cc.length>0){ 1112 if(cc.indexOf(cl)==-1){ 1113 nc=cc+' '+cl; 1114 } 1115 else{ 1116 nc=cc; 1117 } 1118 } 1119 nc=nc.replace(r,' '); 1120 ob.className=nc; 1121 } 1122} 1123function P7_DMMremClass(ob,cl){ 1124 if(ob){ 1125 var cc,nc; 1126 cc=ob.className; 1127 if(cc&&cc.indexOf(cl>-1)){ 1128 nc=cc.replace(cl,''); 1129 nc=nc.replace(/\s+/g,' '); 1130 nc=nc.replace(/\s$/,''); 1131 nc=nc.replace(/^\s/,''); 1132 ob.className=nc; 1133 } 1134 } 1135} 1136function P7_DMMgetStyle(el,s1,s2){ 1137 var s=''; 1138 if(el.currentStyle){ 1139 s=el.currentStyle[s1]; 1140 } 1141 else{ 1142 s=document.defaultView.getComputedStyle(el,"").getPropertyValue(s2); 1143 } 1144 return s; 1145} 1146function P7_DMMaddSheet(sh){ 1147 var h,hd; 1148 h=document.createElement('style'); 1149 h.type='text/css'; 1150 h.appendChild(document.createTextNode(sh)); 1151 hd=document.getElementsByTagName('head'); 1152 hd[0].appendChild(h); 1153}
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.