/* ================================================ PVII Lightshow Magic scripts Copyright (c) 2008-2009 Project Seven Development www.projectseven.com Version: 1.3.0 - script build: 1-58 ================================================ */ // Global text content for Help and Table of Contents boxes // Any single quotes (') MUST be preceded by a backward slash (\) // Help Box Heading Text: var p7LSMHLP='Help: Keyboard Shortcuts'; // Help Box text items: // A new line is created for each p7Help[x] item var p7LSMHelp=[]; p7LSMHelp[0]='To advance to the next box click the VCR controls in the header or press your Space Bar.'; p7LSMHelp[1]='You can move forward or backward with the Left Arrow, Right Arrow, Page Up and Page Down keys.'; p7LSMHelp[2]='The "P" key toggles the Pause and Play mode.'; p7LSMHelp[3]='The "T" key toggles the Table of Contents.'; p7LSMHelp[4]='To close the presentation press "X", "ESC", or click off the presentation box.'; p7LSMHelp[5]='Use the "H" key to toggle this Help screen.'; // Table Of Contents Heading Text: var p7LSMTOC='Table of Contents'; // Minimum width setting for display box (effective only if toolbar is active) var p7LSMminwidth=200; // Delay before fade in or animation var p7lsmdly=500; var p7LSMi=false,p7LSMf=false,p7LSMctl=[],p7LSMcshow=[],p7LSMmode='pause',p7LSMantmr,p7LSMimtmr,p7LSMoptmr,p7LSMshowtmr,p7LSMan=false; var p7LSMstat=false,p7lsmA=navigator.userAgent.toLowerCase(),p7LSMcan=true,p7LSMnextMode='',p7LSMtocActive=false,p7LSMhlpActive=false; if(!document.getElementById||typeof document.appendChild=='undefined'||p7lsmA.indexOf('msie 5')>-1){ p7LSMcan=false; } function P7_LSMset(){ var i,h,sh,hd,x,v; if(!p7LSMcan){ return; } sh='.p7lsm_link {display:none;}\n'; sh+='.p7lsm_description {display:none;}\n'; sh+='.p7lsm_content {display:none;}\n'; sh+='.p7lsm_link {display:none;}\n'; sh+='#p7LSM_ovr {position:absolute;top:0px;left:0px;display:none;z-index:9999900;}\n'; sh+='#p7lsm_overlay {position:fixed;width:100%;height:100%;left:0px;top:0px;z-index:9999900;display:none;}\n'; sh+='#p7LSM_box {position:absolute;display:block;top:0px;left:-9000px;width:100px;overflow:hidden;z-index:9999930;}\n'; sh+='#p7lsm_abox {position:absolute;top:0px;left:0px;display:none;z-index:9999960;}\n'; sh+='#p7LSM_loading {display:none;position:absolute;top:0px;left:0px;z-index:9999980;}\n'; sh+='#p7LSM_helpbox {display:block;position:absolute;top:0px;left:-9000px;z-index:9999990;}\n'; sh+='#p7LSM_tocbox {display:block;position:absolute;top:0px;left:-9000px;z-index:9999995;}\n'; sh+='#p7LSM_descboxW {display:block;position:absolute;top:0px;left:-9000px;z-index:9999985;overflow:hidden;}\n'; if(P7_LSMisIE6()){ sh+='#p7lsm_overlay {position:absolute;}\n'; } if(document.styleSheets){ h='\n\n'+sh+'\n'; document.write(h); } else{ h=document.createElement('style'); h.type='text/css'; h.appendChild(document.createTextNode(sh)); hd=document.getElementsByTagName('head'); hd[0].appendChild(h); } } P7_LSMset(); function P7_LSMaddLoad(){ if(!p7LSMcan){ return; } if(window.addEventListener){ window.addEventListener("load",P7_LSMinit,false); window.addEventListener("resize",P7_LSMrsz,false); window.addEventListener("unload",P7_LSMclose,false); document.addEventListener("keydown",P7_LSMkey,false); } else if(window.attachEvent){ window.attachEvent("onload",P7_LSMinit); window.attachEvent("onresize",P7_LSMrsz); window.attachEvent("onunload",P7_LSMclose); document.attachEvent("onkeydown",P7_LSMkey); } } P7_LSMaddLoad(); function P7_LSMop(){ if(!document.getElementById||!p7LSMcan){ return; } p7LSMctl[p7LSMctl.length]=arguments; } function P7_LSMinit(){ var i,j,x=0,el,ob,h,tx,tD,tA,cntr=0,tIM,tB,bA,li,ul,tR,obb; if(p7LSMi||!p7LSMcan){ return; } p7LSMi=true; P7_LSMbuildpop(); el=document.createElement('div'); el.setAttribute("id","p7lsm_abox"); document.getElementsByTagName('body')[0].appendChild(el); el=document.createElement('div'); el.setAttribute("id","p7lsm_overlay"); document.getElementsByTagName('body')[0].appendChild(el); el=document.createElement('div'); el.setAttribute("id","p7LSM_ovr"); ob=document.createElement('img'); ob.setAttribute('id','p7LSM_ovrimg'); el.appendChild(ob); document.getElementsByTagName('body')[0].appendChild(el); el=document.createElement('div'); ob=document.createElement('a'); ob.appendChild(document.createTextNode("X")); ob.setAttribute("href","javascript:;") ob.setAttribute("title","Close Box"); ob.onclick=function(){ return P7_LSMhelp(); }; obb=document.createElement('div'); obb.setAttribute("class","p7LSM_helpbox_close"); obb.appendChild(ob); el.appendChild(obb); ob=document.createElement('p'); ob.appendChild(document.createTextNode(p7LSMHLP)); el.appendChild(ob); ob=document.createElement('ul'); for(i=0;i-1){ cntr++; tD.p7slides[cntr]=tA[i]; tA[i].onclick=function(){ return P7_LSMshow(this); }; tA[i].parentNode.onmouseover=function(){ this.className="over"; }; tA[i].parentNode.onmouseout=function(){ this.className=""; }; tA[i].p7lsmdiv=tD.id; tA[i].p7lsmsnum=cntr+1; if(tA[i].className=="p7lsm_type_img"){ if(tD.p7opt[10]==1){ tA[i].onmouseover=function(){ P7_LSMrollover(this); }; tA[i].onmouseout=P7_LSMrollout; } document.p7lsmpre[x]=new Image(); document.p7lsmpre[x].cmp=false; document.p7lsmpre[x].onload=function(){ this.cmp=true; }; document.p7lsmpre[x].onerror=function(){ this.cmp=true; this.width=300; this.height=300; }; tA[i].p7imindex=x; x++; } } } tD.p7lsmnum=tD.p7slides.length; } } P7_LSMpause(1); p7LSMf=true; } function P7_LSMrollover(a){ var tp,rD,rI,tI,dm,rw,rh,tt,tl; tp=a.className; if(tp&&tp.indexOf("_img")>-1){ rD=document.getElementById("p7LSM_ovr"); rI=document.getElementById("p7LSM_ovrimg"); tI=a.getElementsByTagName("img"); dm=P7_LSMdims(a); rI.setAttribute("src",tI[0].getAttribute("src")); rD.style.visibility="hidden"; rD.style.display="block"; rw=rD.offsetWidth; rh=rD.offsetHeight; tt=dm[1]-rh; tl= dm[0]-((rw-dm[2])/2); tt-=5; if(tt<0){ tt=dm[1]+a.offsetHeight+2; } if(tl<0){ tl=0; } rD.style.top=tt+"px"; rD.style.left=tl+"px"; rD.style.visibility="visible"; } } function P7_LSMrollout(){ var rD=document.getElementById("p7LSM_ovr"); rD.style.display="none"; } function P7_LSMctrl(ag,sd,bp){ var n,x,cDB,toc,op; if(!p7LSMf){ return false; } if(!ag){ ag='next'; } if(ag=='pause'){ P7_LSMpause(); return false; } if(ag=='play'){ P7_LSMplay(); return false; } if(ag=='close'){ P7_LSMclose(); return false; } if(!sd){ if(p7LSMcshow[0]){ sd=p7LSMcshow[0]; } else{ sd=p7LSMctl[0][0]; } } if(!p7LSMcshow[0]){ p7LSMcshow[0]=sd; p7LSMcshow[1]=1; } cDB=document.getElementById(sd); if(!cDB||!cDB.p7lsmnum){ return false; } if(sd!=p7LSMcshow[0]){ p7LSMcshow[1]=1; } op=P7_LSMopts(); if(ag=='first'){ n=1; if(op[5]==3&&sd!=p7LSMctl[0][0]){ sd=p7LSMctl[0][0]; cDB=document.getElementById(sd); P7_LSMtochelpStat(); P7_LSMclose(); } else{ if(n==p7LSMcshow[1]&&cDB.p7status=='open'){ return false; } } } else if(ag=='last'){ n=cDB.p7lsmnum; if(op[5]==3&&sd!=p7LSMctl[0][p7LSMctl.length-1]){ sd=p7LSMctl[p7LSMctl.length-1][0]; cDB=document.getElementById(sd); n=cDB.p7lsmnum; P7_LSMtochelpStat(); P7_LSMclose(); } else{ if(n==p7LSMcshow[1]&&cDB.p7status=='open'){ return false; } } } else if(ag=='next'){ n=p7LSMcshow[1]+1; if(n>cDB.p7lsmnum){ if(op[5]==0){ return false; } else if(cDB.p7opt[5]==1){ n=1;; } else if(cDB.p7opt[5]==2){ return false; } else if(op[5]==3){ x=P7_LSMnextShow(); sd=p7LSMctl[x][0]; cDB=document.getElementById(sd); n=1; if(p7LSMmode=="auto"){ p7LSMnextMode='auto'; } P7_LSMtochelpStat(); P7_LSMclose(); } } } else if(ag=='previous'){ n=p7LSMcshow[1]-1; if(n<1){ if(op[5]==0){ return false;; } else if(cDB.p7opt[5]==1){ n=cDB.p7lsmnum; } else if(cDB.p7opt[5]==2){ return false; } else if(op[5]==3){ x=P7_LSMprevShow(); sd=p7LSMctl[x][0]; cDB=document.getElementById(sd); n=cDB.p7lsmnum; P7_LSMtochelpStat(); P7_LSMclose(); } else{ return false; } } } else{ n=parseInt(ag); } if(!n||n<1){ n=1; } else if(n>cDB.p7lsmnum){ n=cDB.p7lsmnum; } n--; if(op[8]==1&&p7LSMnextMode!='auto'&&bp!=1){ P7_LSMpause(); } P7_LSMshow(cDB.p7slides[n]); return false; } function P7_LSMppTrig(){ if(!p7LSMf){ return false; } var a=document.getElementById('p7LSM_pauseplay'); if(a.p7state=='play'){ P7_LSMpause(); } else{ P7_LSMplay(); } return false; } function P7_LSMplay(bp){ var n,b=document.getElementById('p7LSM_pauseplay'); if(p7LSMmode=='auto'&&bp!=1){ return; } b.p7state='play'; p7LSMmode='auto'; b.title='Pause'; b.className='p7LSM_pause'; if(bp!=1){ P7_LSMctrl('next','',1); } } function P7_LSMpause(bp){ var b=document.getElementById('p7LSM_pauseplay'); if(p7LSMshowtmr){ clearTimeout(p7LSMshowtmr); } b.p7state='pause'; if(bp!=1){ p7LSMmode='pause'; } b.title='Play'; b.className='p7LSM_play'; } function P7_LSMdescpop(ac,bp){ var dP,dPC,op,tl,tt,th,tw,cl,ct,cw,ch; dP=document.getElementById("p7LSM_descboxW"); dPC=document.getElementById("p7LSM_descbox"); op=P7_LSMopts(); if(ac=='show'){ dP.p7status="open"; if(op[1]>1&&bp!=1){ dP.style.width=dP.offsetWidth+"px"; dP.style.visibility="hidden"; dP.style.height="auto"; P7_LSMposdesc(); tt=parseInt(dP.style.top); th=dP.offsetHeight; ct=tt+th-1; ch=1; dP.style.height=ch+"px"; dP.style.top=ct+"px"; dP.style.visibility="visible"; P7_LSMglide(dP.id,ct,tt,ch,th,'open'); } else{ P7_LSMposdesc(); P7_LSMshow_fin2(); } } else{ if(op[1]>1&&bp!=1){ ct=parseInt(dP.style.top); ch=dP.offsetHeight; th=0; tt=ct+ch; P7_LSMglide(dP.id,ct,tt,ch,th,'close'); } else{ dP.p7status="closed"; dP.style.left="-9000px"; dP.style.top="0px"; dP.style.height="10px"; if(bp==2){ P7_LSMshowB(); } } } } function P7_LSMglide(id,ct,tt,ch,th,dr){ var inc=2,dy=10,pc=0.08,tv,sp,dV=document.getElementById(id); p7LSMan=true; tv=Math.abs( parseInt( Math.abs(ct)-Math.abs(tt),10 ) ); sp=inc; inc=tv*pc; inc=(inc<=sp)?sp:inc; inc=(dr!='open')?inc:inc*-1; dV.style.top=ct+"px"; dV.style.height=ch+"px"; if(ct==tt){ p7LSMan=false; if(dr=='open'){ dV.style.height="auto"; if(dV.id=='p7LSM_descboxW'){ P7_LSMshow_fin2(); } } else{ dV.style.left="-9000px"; dV.style.height="10px"; dV.style.top="0px"; if(dV.id=='p7LSM_descboxW'){ dV.p7status="closed"; P7_LSMshowB(); } } } else{ ct+=inc; ch-=inc; if(dr=='open'&&cttt){ ct=tt; ch=th; } p7LSMantmr=setTimeout("P7_LSMglide('"+id+"',"+ct+","+tt+","+ch+","+th+",'"+dr+"')",dy); } } function P7_LSMhelp(ac){ var hp,tR,tB; hp=document.getElementById("p7LSM_helpbox"); tR=document.getElementById('p7LSM_help'); if(null==ac){ ac=(hp.p7status=='closed')?'show':'hide'; } if(ac=='show'){ hp.p7status="open"; if(tR){ tR.className='down'; } tB=document.getElementById(p7LSMcshow[0]); if(!tB){ tB=document.getElementById(p7LSMctl[0][0]); } hp.className=tB.className; P7_LSMposhelp(); } else{ if(tR){ tR.className=''; } hp.style.left="-9000px"; hp.style.top="0px"; hp.style.height="10px"; hp.p7status="closed"; } return false; } function P7_LSMtitle(a){ var tt,im,nt='Item'; tt=a.getAttribute("title"); if(!tt||tt==''){ im=a.getElementsByTagName("img"); if(im&&im[0]){ tt=im[0].getAttribute("alt"); } else{ tt=a.textContent; if(!tt||tt==''){ tt=a.innerText; } if(!tt||tt==''){ tt=a.innerHTML; } } } if(tt&&tt!=''){ nt=tt; } return nt; } function P7_LSMtoc(ac,sd){ var i,x=0,toc,wd,h,t,tB,tLI,tt,ea,ol,li,tIM,tA,tx,tR,tD,tSP,cDB; toc=document.getElementById("p7LSM_tocbox"); if(ac==null){ ac=(toc.p7status=='closed')?'show':'hide'; } tR=document.getElementById('p7LSM_toc'); if(ac=='show'){ P7_LSMclrtag(toc,'ol'); if(!sd){ tB=document.getElementById(p7LSMcshow[0]); if(!tB){ tB=document.getElementById(p7LSMctl[0][0]); } } else{ tB=document.getElementById(sd); } toc.className=tB.className; ol=document.createElement('ol'); tD=document.getElementById(tB.id.replace("_","trg_")); tA=tD.getElementsByTagName("a"); for(i=0;i-1){ tt=P7_LSMtitle(tA[i]); ea=document.createElement('a'); ea.appendChild(document.createTextNode(tt)); ea.setAttribute("href","javascript:;"); ea.p7num=(x); x++ ea.onclick=function(){ P7_LSMctrl(this.p7num+1,sd); return false; }; li=document.createElement("li"); li.appendChild(ea); ol.appendChild(li); } } toc.appendChild(ol); toc.p7status="open"; if(tR){ tR.className='down'; } P7_LSMsetTOC(); P7_LSMpostoc(); } else{ toc.style.left="-9000px"; toc.style.top="0px"; toc.p7status="closed"; if(tR){ tR.className=''; } P7_LSMclrtag(toc,'ol'); } return false; } function P7_LSMsetTOC(){ var i,tT,tA,cI; cI=p7LSMcshow[1]-1; tT=document.getElementById('p7LSM_tocbox'); tA=tT.getElementsByTagName("a"); if(tA&&tA.length>cI){ for(i=0;i1&&op[7]==1){ cAB.style.height=bh+"px"; cAB.style.width=bw+"px"; cAB.style.display="block"; P7_LSMpos(cAB.id); } if(op[1]>0){ cDB.style.left="-9000px"; } cDB.p7bw=bw; cDB.p7bh=bh; cDB.style.height="auto"; if(a.className=='p7lsm_type_img'){ x=a.p7imindex; pI=document.p7lsmpre[x]; if(!pI.cmp){ P7_LSMposldng(); pI.src=a.href; P7_LSMload_img(x); } else{ if(op[1]>0){ p7LSMantmr=setTimeout("P7_LSMshow_dsp()",p7lsmdly); } else{ P7_LSMshow_dsp(); } } } else if(a.className=='p7lsm_type_cnt'){ if(op[1]>0){ p7LSMantmr=setTimeout("P7_LSMshow_dsp()",p7lsmdly); } else{ P7_LSMshow_dsp(); } } } function P7_LSMshow_dsp(){ var i,a,cF,cB,cAB,cDB,cIM,cTM,an,el,ob,cN,tA,w,op,th,tw,cl,ct,cw,ch,fd,hs,sc,tl,tt,t,tSP,pB,pBC; a=p7LSMcshow[2]; P7_LSMrestore(); cDB=document.getElementById('p7LSM_box'); cAB=document.getElementById('p7lsm_abox'); pB=document.getElementById('p7LSM_descboxW'); pBC=document.getElementById('p7LSM_descbox'); cB=document.getElementById(p7LSMcshow[0]); cN=a.parentNode.childNodes; an=cB.p7opt[1]; if(cB.p7opt[6]==1){ el=P7_LSMsetdsp('p7LSM_counter','block'); ob=document.createTextNode('Slide '+a.p7lsmsnum+' of '+cB.p7lsmnum); if(el.hasChildNodes){ for(i=0;i1){ ob=document.getElementById(hs.substring(1)); if(ob){ el=P7_LSMsetdsp('p7LSM_cnt','block'); P7_LSMcopyCN(el,ob); el.p7src=ob; } } } pB.p7show=false; for(i=0;i1){ if(an==2||an==3){ cw=6; ch=20; } else{ cw=tw; ch=th; } if(cB.p7opt[7]==1&&!cDB.p7new){ ch=(cDB.p7bh>10)?cDB.p7bh:ch; cw=(cDB.p7bw>20)?cDB.p7bw:cw; } else{ cAB.style.width=cw+"px"; cAB.style.height=ch+"px"; cAB.style.display="block"; P7_LSMpos(cAB.id); } cl=parseInt(cAB.style.left); ct=parseInt(cAB.style.top); cDB.style.visibility="hidden"; P7_LSMpos(cDB.id); tl=parseInt(cDB.style.left); tt=parseInt(cDB.style.top); fd=0; if(cB.p7opt[2]==1){ fd=1; if(cB.p7opt[7]!=1||cDB.p7new){ ct=parseInt(ct-(ch/2)+(th/2)); fd=0; } } else if(cB.p7opt[2]==2){ fd=2; if(cB.p7opt[7]!=1||cDB.p7new){ cl=parseInt(cl-(cw/2)+(tw/2)); fd=0; } } else if(cB.p7opt[2]==3){ fd=3; if(cB.p7opt[7]!=1||cDB.p7new){ cl=parseInt(cl-(cw/2)+(tw/2)); ct=parseInt(ct-(ch/2)+(th/2)); fd=0; } } P7_LSMgrow(cAB.id,cl,tl,ct,tt,ch,th,cw,tw,an,fd); } } function P7_LSMshow_fin(){ var pB,op=P7_LSMopts(); p7LSMan=false; if(op[15]==1){ pB=document.getElementById('p7LSM_descboxW'); if((pB.p7show&&op[17]!=1) || (op[17]==1&&pB.p7status!='open')){ P7_LSMdescpop('show'); } else{ if(op[17]==1){ pB.p7status='open'; } P7_LSMshow_fin2(); } } else{ P7_LSMshow_fin2(); } } function P7_LSMshow_fin2(){ var i,j,cn,n,nn,tn,op,nA,tS,tB,tA,im,px,sd,m=false; p7LSMan=false; tB=document.getElementById('p7LSM_box'); tB.p7status='open'; tB.p7new=false; P7_LSMrsz(); tS=document.getElementById(p7LSMcshow[0]); op=tS.p7opt; nn=p7LSMcshow[1]+1; n=nn; sd=p7LSMcshow[0]; if(op[14]==1){ if(nn>tS.p7lsmnum){ if(op[5]==1){ nA=tS.p7slides[0]; } else if(op[5]==3){ j=P7_LSMnextShow(); sd=p7LSMctl[j][0]; nA=document.getElementById(sd).p7slides[0]; } else{ nA=null; } } else{ nA=tS.p7slides[nn-1]; } if(nA&&nA.p7imindex){ px=nA.p7imindex; im=document.p7lsmpre[px]; if(!im.cmp){ im.src=nA.href; } } } if(p7LSMmode=="auto"){ if(n>tS.p7lsmnum&&op[5]==0){ P7_LSMpause(); } else if(n>tS.p7lsmnum&&op[5]==2){ p7LSMshowtmr=setTimeout("P7_LSMclose()",op[11]*1000); } else{ p7LSMshowtmr=setTimeout("P7_LSMctrl('next','',1)",op[11]*1000); } } } function P7_LSMnextShow(){ var i,cs,j=-1; cs=p7LSMcshow[0]; for(i=0;i=p7LSMctl.length-1){ j=0; } else{ j=i+1; } break; } } return j; } function P7_LSMprevShow(){ var i,cs,j=-1; cs=p7LSMcshow[0]; for(i=0;i0){ p7LSMantmr=setTimeout("P7_LSMshow_dsp()",p7lsmdly); } else{ P7_LSMshow_dsp() } } } } function P7_LSMbuttons(){ var i,tS,tn,opt; tS=document.getElementById(p7LSMcshow[0]); tn=tS.p7lsmnum; if(tn==1){ tS.p7hideButtons=true; P7_LSMsetdsp('p7LSM_toc','none'); P7_LSMsetdsp('p7LSM_first','none'); P7_LSMsetdsp('p7LSM_prev','none'); P7_LSMsetdsp('p7LSM_pauseplay','none'); P7_LSMsetdsp('p7LSM_next','none'); P7_LSMsetdsp('p7LSM_last','none'); P7_LSMsetdsp('p7LSM_help','none'); } else{ tS.p7hideButtons=false; P7_LSMsetdsp('p7LSM_toc','block'); P7_LSMsetdsp('p7LSM_first','block'); P7_LSMsetdsp('p7LSM_prev','block'); P7_LSMsetdsp('p7LSM_pauseplay','block'); P7_LSMsetdsp('p7LSM_next','block'); P7_LSMsetdsp('p7LSM_last','block'); P7_LSMsetdsp('p7LSM_help','block'); } } function P7_LSMclose(){ var i,cAB,cOV,cDB,j,v; if(p7LSMantmr){ clearTimeout(p7LSMantmr); } if(p7LSMoptmr){ clearTimeout(p7LSMoptmr); } if(p7LSMimtmr){ clearTimeout(p7LSMimtmr); } if(p7LSMshowtmr){ clearTimeout(p7LSMshowtmr); } P7_LSMpause(); p7LSMstat=false; P7_LSMtoc('hide'); P7_LSMhelp('hide'); P7_LSMdescpop('hide',1); cAB=document.getElementById('p7lsm_abox'); cOV=document.getElementById('p7lsm_overlay'); cDB=document.getElementById('p7LSM_box'); cDB.p7status="closed"; cDB.style.left="-9000px"; cDB.style.height="10px"; cDB.style.top="0px"; P7_LSMrestore(); cAB.style.display="none"; document.getElementById("p7LSM_loading").style.display="none"; P7_LSMhsel('show'); cOV.style.display="none"; if(P7_LSMisIE6()){ cOV.style.height="10px"; } return false; } function P7_LSMopts(){ var sd,tD; if(!p7LSMcshow[0]){ p7LSMcshow[0]=p7LSMctl[0][0]; p7LSMcshow[1]=1; } tD=document.getElementById(p7LSMcshow[0]); if(tD&&tD.p7opt){ return tD.p7opt; } else{ return ['',0,0,0,0,0]; } } function P7_LSMrsz(){ var tB=document.getElementById('p7LSM_box'); if(tB.p7status=='open'&&!p7LSMan){ P7_LSMpos('p7LSM_box'); P7_LSMpostoc(); P7_LSMposhelp(); P7_LSMposdesc(); } } function P7_LSMpostoc(){ var tB,h,t,wd,sc,l=10; tB=document.getElementById("p7LSM_tocbox"); wd=P7_LSMwin(); if(tB.p7status=="open"){ tB.style.height="auto"; h=tB.offsetHeight; t=wd[0]-h-20; if(t<10){ h=wd[0]-20; t=10; tB.style.height=h+"px"; } sc=P7_LSMsclb(); t+=sc[1]; l+=sc[0]; t=(t<0)?0:t; tB.style.top=t+"px"; tB.style.left=l+"px"; } } function P7_LSMposhelp(){ var tB,h,w,t,l,wd,sc; tB=document.getElementById("p7LSM_helpbox"); wd=P7_LSMwin(); if(tB.p7status=="open"){ tB.style.height="auto"; h=tB.offsetHeight; w=tB.offsetWidth; t=wd[0]-h-20; l=wd[1]-w-20; sc=P7_LSMsclb(); t+=sc[1]; l+=sc[0]; t=(t<0)?0:t; tB.style.top=t+"px"; tB.style.left=l+"px"; } } function P7_LSMposdesc(){ var tB,tBC,h,w,t,l,wd,sc,lm; tB=document.getElementById("p7LSM_descboxW"); tBC=document.getElementById("p7LSM_descbox"); wd=P7_LSMwin(); if(tB.p7status=="open"){ tB.style.height="auto"; h=tB.offsetHeight; w=tB.offsetWidth; t=wd[0]-h-20; l=wd[1]-w-20; sc=P7_LSMsclb(); t+=sc[1]; l+=sc[0]; t=(t<0)?0:t; lm=P7_LSMminleft(); l=(l0)?wd[0]:h; h=(h>sh)?h:sh; oD.style.height=h+"px"; oD.style.position="absolute"; } } function P7_LSMdims(ob){ var pp,h,w,l=0,t=0,r=[4]; pp=ob; while(pp){ l+=(pp.offsetLeft)?pp.offsetLeft:0; t+=(pp.offsetTop)?pp.offsetTop:0; if(window.opera||navigator.userAgent.indexOf("Safari")>-1){ if(pp.nodeName=="BODY"){ l-=(pp.offsetLeft)?pp.offsetLeft:0; t-=(pp.offsetTop)?pp.offsetTop:0; } } pp=pp.offsetParent; } r[0]=l; r[1]=t r[2]=ob.offsetWidth; r[3]=ob.offsetHeight; return r; } function P7_LSMsclb(){ var x,y; y=document.body.parentNode.scrollTop; if(!y){ y=document.body.scrollTop; } y=(y)?y:0; x=document.body.parentNode.scrollLeft; if(!x){ x=document.body.scrollLeft; } x=(x)?x:0; return [x,y]; } function P7_LSMgrow(id,cl,tl,ct,tt,ch,th,cw,tw,op){ var il=10,it=10,ih=1,iw=1,dy=10,sp; var cD,nw=0,nh=0,nl=0,nt=0,tv,pc=0.10; tv=Math.abs( parseInt( Math.abs(th)-Math.abs(ch),10 ) ); sp=ih; ih=tv*pc; ih=(ih<=sp)?sp:ih; tv=Math.abs( parseInt( Math.abs(tw)-Math.abs(cw),10 ) ); sp=iw; iw=tv*pc; iw=(iw<=sp)?sp:iw; il=iw/2; it=ih/2; if(tw=th)?th:nh; } if(iw<0){ nw=(nw<=tw)?tw:nw; } else{ nw=(nw>=tw)?tw:nw; } if(it<0){ nt=(nt<=tt)?tt:nt; } else{ nt=(nt>=tt)?tt:nt; } if(il<0){ nl=(nl<=tl)?tl:nl; } else{ nl=(nl>=tl)?tl:nl; } p7LSMantmr=setTimeout("P7_LSMgrow('"+id+"',"+nl+","+tl+","+nt+","+tt+","+nh+","+th+","+nw+","+tw+","+op+")",dy); } } function P7_LSMfadeOut(id,op){ var im,dy=10,lm=0.01,inc,d=document.getElementById(id); p7LSMan=true; inc=(window.opera)?0.15:0.04; op=(op<=lm)?lm:op; if(!d.filters){ d.style.opacity=op; } else{ inc=.10; dy=30; d.style.filter='alpha(opacity='+op*100+')'; } if(op>lm){ op-=inc; p7LSMoptmr=setTimeout("P7_LSMfadeOut('"+id+"',"+op+")",dy); } else{ d.style.display="none"; P7_LSMpos('p7LSM_box'); P7_LSMshow_fin(); } } function P7_LSMkey(evt){ var k,tg,nn,pp,m=true,tb=false,i,pp,dB,tA; if(p7LSMstat){ evt=(evt)?evt:event; tg=(evt.target)?evt.target:evt.srcElement; nn=tg.nodeName.toLowerCase(); if(!evt.altKey&&!evt.ctrlKey){ if(nn!='input'&&nn!='textarea'){ k=evt.keyCode; var j=evt.charCode; if(k==33||k==37||k==109 || k==32&&evt.shiftKey){ P7_LSMctrl('previous'); m=false; } else if(k==34||k==39||k==107||k==32){ P7_LSMctrl('next'); m=false; } else if(k==35){ P7_LSMctrl('last'); m=false; } else if(k==36){ P7_LSMctrl('first'); m=false; } else if(k==80){ P7_LSMppTrig(); m=false; } else if(k==27 || (k==88&&!window.opera)){ P7_LSMclose(); m=false; } else if(k==72&&!window.opera){ P7_LSMhelp(); m=false; } else if(k==84){ P7_LSMtoc(); m=false; } } } } if(!m){ if(evt.preventDefault){ evt.preventDefault(); } } return m; } function P7_LSMwin(){ var h,w; if(window.innerHeight){ if(document.documentElement.clientWidth){ w=document.documentElement.clientWidth; } else{ w=window.innerWidth; } h=window.innerHeight; } else if(document.documentElement&&document.documentElement.clientHeight){ w=document.documentElement.clientWidth; h=document.documentElement.clientHeight; } else if(document.body){ w=document.body.clientWidth; h=document.body.clientHeight; } return [h,w]; } function P7_LSMsetdsp(dd,dt){ var el=document.getElementById(dd); if(el){ el.style.display=dt; } return el; } function P7_LSMcopyCN(tD,tS){ while(tD.childNodes.length>0){ tD.removeChild(tD.childNodes[0]); } while(tS.childNodes.length>0){ tD.appendChild(tS.childNodes[0]); } } function P7_LSMbuildpop(){ var el,a,i,li,ul,ob,tb,bx,cn; tb=document.createElement('div'); tb.setAttribute('id','p7LSM_toolbar'); i=document.createElement('i'); i.appendChild(document.createTextNode('contents')); a=document.createElement('a'); a.appendChild(i); a.setAttribute('id','p7LSM_toc'); a.setAttribute('href','#'); a.setAttribute('title','Table of Contents'); ob=document.createElement('div'); ob.setAttribute('id','p7LSM_toolbartoc'); ob.appendChild(a); tb.appendChild(ob); ul=document.createElement('ul'); i=document.createElement('i'); i.appendChild(document.createTextNode('first')); a=document.createElement('a'); a.appendChild(i); a.setAttribute('id','p7LSM_first'); a.setAttribute('href','#'); a.setAttribute('title','First'); li=document.createElement('li'); li.appendChild(a); ul.appendChild(li); i=document.createElement('i'); i.appendChild(document.createTextNode('previous')); a=document.createElement('a'); a.appendChild(i); a.setAttribute('id','p7LSM_prev'); a.setAttribute('href','#'); a.setAttribute('title','Previous'); li=document.createElement('li'); li.appendChild(a); ul.appendChild(li); i=document.createElement('i'); i.appendChild(document.createTextNode('pause/play')); a=document.createElement('a'); a.appendChild(i); a.setAttribute('id','p7LSM_pauseplay'); a.setAttribute('href','#'); a.setAttribute('title','Play'); a.setAttribute('class','p7LSM_play'); li=document.createElement('li'); li.appendChild(a); ul.appendChild(li); i=document.createElement('i'); i.appendChild(document.createTextNode('next')); a=document.createElement('a'); a.appendChild(i); a.setAttribute('id','p7LSM_next'); a.setAttribute('href','#'); a.setAttribute('title','Next'); li=document.createElement('li'); li.appendChild(a); ul.appendChild(li); i=document.createElement('i'); i.appendChild(document.createTextNode('last')); a=document.createElement('a'); a.appendChild(i); a.setAttribute('id','p7LSM_last'); a.setAttribute('href','#'); a.setAttribute('title','Last'); li=document.createElement('li'); li.appendChild(a); ul.appendChild(li); ob=document.createElement('div'); ob.setAttribute('id','p7LSM_vcr'); ob.appendChild(ul); tb.appendChild(ob); i=document.createElement('i'); i.appendChild(document.createTextNode('help')); a=document.createElement('a'); a.appendChild(i); a.setAttribute('id','p7LSM_help'); a.setAttribute('href','#'); a.setAttribute('title','Help for Keyboard Users'); ob=document.createElement('div'); ob.setAttribute('id','p7LSM_toolbarhelp'); ob.appendChild(a); tb.appendChild(ob); i=document.createElement('i'); i.appendChild(document.createTextNode('close')); a=document.createElement('a'); a.appendChild(i); a.setAttribute('id','p7LSM_close'); a.setAttribute('href','#'); a.setAttribute('title','Close'); ob=document.createElement('div'); ob.setAttribute('id','p7LSM_toolbarclose'); ob.appendChild(a); tb.appendChild(ob); cn=document.createElement('div'); cn.setAttribute('id','p7LSM_container'); cn.appendChild(tb); ob=document.createElement('div'); ob.setAttribute('id','p7LSM_cnt'); cn.appendChild(ob); ob=document.createElement('div'); ob.setAttribute('id','p7LSM_img'); cn.appendChild(ob); bx=document.createElement('div'); bx.setAttribute('id','p7LSM_box'); bx.appendChild(cn); el=document.createElement('div'); el.setAttribute('id','p7LSM_info'); ob=document.createElement('div'); ob.setAttribute('id','p7LSM_caption'); el.appendChild(ob); ob=document.createElement('div'); ob.setAttribute('id','p7LSM_desc'); el.appendChild(ob); ob=document.createElement('div'); ob.setAttribute('id','p7LSM_counter'); el.appendChild(ob); cn.appendChild(el); document.getElementsByTagName('body')[0].appendChild(bx); el=document.createElement('div'); el.setAttribute("id","p7LSM_loading"); document.getElementsByTagName('body')[0].appendChild(el); el=document.createElement('a'); el.setAttribute("id","p7LSMfslink"); ob=document.createElement('img'); ob.setAttribute("id","p7LSMfsim"); el.appendChild(ob); document.getElementById('p7LSM_img').appendChild(el); } function P7_LSMhsel(ac){ var i,tg,vs; if(P7_LSMisIE6()){ tg=document.getElementsByTagName("select"); if(tg){ vs=(ac=='hide')?'hidden':'visible'; for(i=0;i