// Layer script v2.2.1.2 // Copyright (C) 2002-2008 Pluginlab Limited. All rights reserved. // http://www.pluginlab.com // Registered to: ephesians525 function PL_Layer(idScr,url,w,h,pos,x,y,Bst,Bw,Bc,Bcmo,Bgc,Op,Acl,Rsz,Drg,SB,TB,TBpos,TBa,TBw,TBh,TBc,TBcmo,TBb,TBbc,TBbcmo,TBi,TBst,TBIc,TBIcmo,TBIb,TBIbmo,TBIn,TBInmo,TBIa,TBIp,Crot,Opm,Opd,Ops,Opb,Clm,Cld,Cls,zInd,idLayer) { function _PLLW_setPathAdjustment(ID) { var sl = '' var sc = document.getElementsByTagName('script') for (var i=0; i-1) {sl = sc[i].src; break;} } _PLLW_SCRIPT_LOCATION = sl.substr(0, sl.lastIndexOf('/')+1) } function _PLLW_adjustPath(path) { if (path.charAt(0) != '*') return path return _PLLW_SCRIPT_LOCATION + path.substr(1) } if (idScr) _PLLW_setPathAdjustment(idScr) var d = document if (!d.PL_rszID) d.PL_rszID = "" var url = _PLLW_adjustPath(url) var ind=(new Date()).getTime() var nav = navigator.userAgent var L = null if (idLayer) L = d.getElementById(idLayer) if (!L) { L = d.createElement("DIV") d.body.appendChild(L) L.Mac = nav.indexOf('Mac') >= 0 L.Saf = nav.indexOf('Safari') >= 0 L.IE = d.all && !L.Mac && nav.toLowerCase().indexOf('opera') < 0 L.NS = nav.toLowerCase().indexOf('netscape') >= 0 L.Fox = nav.toLowerCase().indexOf('firefox') >= 0 L.style.position = 'absolute' L.style.left = '-10000px' L.style.top = 0 L.id = idLayer ? idLayer : "_PLLW" + ind } var compatMode = (L.IE || L.Fox) && d.compatMode=="CSS1Compat" var IECanvas = compatMode?d.documentElement:d.body var db = compatMode?d:d.body if (w < 10) w = 10 if (h < 10) h = 10 if (Ops < 1) Ops = 1 // Content rotation var ContentNodes = new Array() var Node if ((url && url != "#") || !Crot) { Node = new Object() Node.iType = 0 Node.sUrlUrl = url ContentNodes[ContentNodes.length] = Node } if (Crot != "") { Crot = Crot.split(",") for (var i=0;i 0) setTimeout("var d=document,o=d.getElementById('"+L.id+"');if(o)o.closeIt()",Acl*1000) // Layer layout var strBody = "" + "" var strContent = "" + "" if (TB) { var strTB = "" if (TBpos) L.innerHTML = strBody + strContent + strTB + "
" + "" + "
" strTB += "
" var strImg = "" var strImgStl = "style='cursor:pointer;margin:" + TBIp + "px'" if (TBIb) strImg += "" if (TBIn) strImg += "" if (TBIc) strImg += "" strTB += strImg + "
" else L.innerHTML = strBody + strTB + strContent + "" var TBdiv = d.getElementById("PL_LayerTB"+ind) L.tb = TBdiv L.k = TBw/w var ts = TBdiv.style ts.width = TBw+(d.all&&!compatMode?Bw*2:0)+"px" ts.height = TBh+"px" L.dh += TBh TBdiv.onmouseover = function() {var o=this;if(o.TBbcmo)o.style.borderColor=o.TBbcmo;if(o.TBcmo)o.style.backgroundColor=o.TBcmo} TBdiv.onmouseout = function() {var o=this;if(o.TBbc)o.style.borderColor=o.TBbc;if(o.TBc)o.style.backgroundColor=o.TBc} var imgTB = d.getElementById("PL_LayerImgIb"+ind) if (imgTB) { imgTB.imn = imgTB.src imgTB.immo = _PLLW_adjustPath(TBIbmo) setRollover(imgTB) imgTB.onclick = rotateBack } imgTB = d.getElementById("PL_LayerImgIn"+ind) if (imgTB) { imgTB.imn = imgTB.src imgTB.immo = _PLLW_adjustPath(TBInmo) setRollover(imgTB) imgTB.onclick = rotateNext } imgTB = d.getElementById("PL_LayerImgIc"+ind) if (imgTB) { imgTB.imn = imgTB.src imgTB.immo = _PLLW_adjustPath(TBIcmo) setRollover(imgTB) imgTB.onclick = function(){this.Ldiv.closeIt()} imgTB.Ldiv = L } ts.borderWidth=0 if (TBb) { ts.borderStyle = Bst ts.borderWidth = Bw+"px" ts.borderColor = TBdiv.TBbc = TBbc TBdiv.TBbcmo = TBbcmo L.dh += (TBst+1)*Bw } else ts.borderStyle = "none" if (TBpos) { ts.borderTopStyle = 'none' if (TBst) ts.borderBottomWidth = 2 * parseInt(ts.borderBottomWidth) } else { ts.borderBottomStyle = 'none' if (TBst) ts.borderTopWidth = 2 * parseInt(ts.borderTopWidth) } if (TBi) { ts.backgroundImage = "url("+_PLLW_adjustPath(TBi)+")" } else { ts.backgroundColor = TBdiv.TBc = TBc TBdiv.TBcmo = TBcmo } } else { L.innerHTML = strBody + strContent + "" } L.I = d.getElementById("PL_LayerFrame"+ind) if(L.I)L.Is = L.I.style L.w = w + L.dw L.h = h + L.dh d.onselectstart = function(){return false} // Resize / Drag events if (Rsz || Drg) { if (!d.PL_LWs) { d.PL_LWs = new Array() d.mainMouseMove = db.onmousemove db.onmousemove = function(evt) { d.cur = "auto" if (d.mainMouseMove) d.mainMouseMove(evt) for (var i=0;i=0;i--) { if (d.PL_LWs[i].on_mousedown(evt)) { showAllIFrames(false) break } } } d.mainMouseOut = db.onmouseout db.onmouseout = function(evt) { if (d.all) evt=event if ((evt.clientX < 0) || (evt.clientY < 0)) if (db.onmouseup) db.onmouseup(evt) } } L.Act = new Array("w+=dx;h+=dy","w-=dx;h-=dy;x+=dx;y+=dy","w+=dx;h-=dy;y+=dy","w-=dx;h+=dy;x+=dx","w+=dx","w-=dx;x+=dx","h-=dy;y+=dy","h+=dy") L.Cur = new Array("auto","se-resize","nw-resize","ne-resize","sw-resize","e-resize","w-resize","n-resize","s-resize") function thisMouseMove(evt) { var RetVal = false if (d.PL_anim) return if (d.all) evt=event var dt=3 var cx = evt.clientX+IECanvas.scrollLeft, cy = evt.clientY+IECanvas.scrollTop, ds = d.body.style L.drg = Drg && ((cy >= y) && (cy <= y+L.h)) && ((cx >= x) && (cx <= x+L.w)) L.rsz = 0 if (Rsz && (!L.resize && ((d.PL_rszID == "") || (d.PL_rszID == L.id)))) { if ((cy >= y) && (cy <= y+L.h)) { if ((cx > x-dt) && (cx < x+Bw+dt)) { if (cy < y+Bw+dt) L.rsz = 2 else if (cy > y+L.h-Bw-dt) L.rsz = 4 else L.rsz = 6 } else if ((cx > x+L.w-Bw-dt) && (cx < x+L.w+dt)) { if (cy < y+dt) L.rsz = 3 else if (cy > y+L.h-Bw-dt) L.rsz = 1 else L.rsz = 5 } } if ((cx >= x) && (cx <= x+L.w)) { if ((cy < y+Bw+dt) && (cy > y-dt)) { if (cx < x+Bw+dt) L.rsz = 2 else if (cx > x+L.w-Bw-dt) L.rsz = 3 else L.rsz = 7 } else if ((cy > y+L.h-Bw-dt) && (cy < y+L.h+dt)) { if (cx < x+Bw+dt) L.rsz = 4 else if (cx > x+L.w-Bw-dt) L.rsz = 1 else L.rsz = 8 } } d.PL_rszID = L.rsz>0?L.id:"" } if (!TB && Drg && L.rsz==7 ) { L.drg = 1 L.rsz = 0 } if (L.drag) { d.cur = "move"; RetVal = true } else if (L.resize) { d.cur = L.Cur[L.resize]; RetVal = true } else if (L.rsz) d.cur = L.Cur[L.rsz] else if (L.drg) d.cur = "move" L.on_mousemove(evt) return RetVal } L.thisMouseMove = thisMouseMove d.PL_LWs[d.PL_LWs.length] = L L.iMM = d.PL_LWs.length-1 } // Set size and position var cw = window.innerWidth?innerWidth:IECanvas.clientWidth var ch = window.innerHeight?innerHeight:IECanvas.clientHeight var sl = d.all?IECanvas.scrollLeft:window.pageXOffset var st = d.all?IECanvas.scrollTop:window.pageYOffset switch (pos) { case 0: x = (cw - L.w) * 0.5 + sl y = (ch - L.h) * 0.5 + st break case 1: x = (cw - L.w) * Math.random() + sl y = (ch - L.h) * Math.random() + st break } if (pos<2) { if (x<0) x=0 if (y<0) y=0 } // Set event handlers L.resize = L.drag = 0 L.on_mousedown = function(evt) { if (d.all) evt=event if (L.rsz!=0) { L.resize=L.rsz L.mx=evt.clientX L.my=evt.clientY return true } if (L.drg){ L.drag=1 L.mx=evt.clientX-L.offsetLeft L.my=evt.clientY-L.offsetTop return true } return false } L.on_mousemove = function(evt) { if (d.all) evt=event if (Rsz && L.resize) { var dx=evt.clientX-L.mx, dy=evt.clientY-L.my var r = L.resize if (r==2||r==3||r==7) if (dy>L.h-20) dy=L.h-20; else L.my=evt.clientY if (r==1||r==4||r==8) if (dy<20-L.h) dy=20-L.h; else L.my=evt.clientY if (r==2||r==4||r==6) if (dx>L.w-20) dx=L.w-20; else L.mx=evt.clientX if (r==1||r==3||r==5) if (dx<20-L.w) dx=20-L.w; else L.mx=evt.clientX eval(L.Act[L.resize-1]) } if (Drg && L.drag) { x=evt.clientX-L.mx y=evt.clientY-L.my } setWHXY(1) } L.on_mouseup = function() { L.resize=L.drag=0 } function showAllIFrames(bShow) { if (!d.PL_LWs) return for (var i=0;i= ContentNodes.length)) return '' var src = '' var n = ContentNodes[j] switch (n.iType) { case 0: src = n.sUrlUrl break case 1: var bIsURL = n.sImageUrl != "" src = "javascript:document.write(\"
"+(bIsURL?""+(bIsURL?"":"")+"
\");document.close()" break case 2: src = n.sFlashFile break } return src } function GetNextContent() { return (L.iContent0)?L.iContent-1:ContentNodes.length-1 } function setRollover(i) { i.onmouseover = function(e) {this.parentNode.onmouseover();if(this.immo)this.src=this.immo;this.cancelBubbles(e)} i.onmouseout = function(e) {this.src=this.imn;this.cancelBubbles(e)} i.onmousemove = function(e) {this.cancelBubbles(e)} i.onmousedown = function(e) {this.cancelBubbles(e);return false} i.cancelBubbles = function(e) {if(d.all)e=event;e.cancelBubble=true} } function rotateBack() { SetContentUrl(GetPrevContent()) } function rotateNext() { SetContentUrl(GetNextContent()) } openLayer() // Open/Close & Animation function Zoom(dir) { var wh0=10, N=32 Ls.dw=(w-wh0)/N; Ls.dh=(h-wh0)/N L.TBw= TBw; L.Bw= Bw switch(dir) { case "in": L.speed = Ops L.JScond = "(l.dw>0)||(l.dh>0)" L.JSaction = "y-=l.dh;x-=l.dw;w+=2*l.dw;h+=2*l.dh;if(w>"+w+"){w="+w+";x="+x+";l.dw=0};if(h>"+h+"){h="+h+";y="+y+";l.dh=0};setWHXY(1)" x += (w-wh0) * 0.5; y += (h-wh0) * 0.5; w = h = wh0 setWHXY(1) break case "out": if(!d.all && !L.Mac && L.tb)L.tb.style.display='none' L.speed = Cls L.JScond = "(w>2*l.dw)&&(h>2*l.dh)" L.JSaction = "y+=l.dh;x+=l.dw;if(w>2*l.dw){w-=2*l.dw};if(h>2*l.dh)h-=2*l.dh;setWHXY(1)" L.removeIt = removeLayer break } L.doZoom = function() { d.PL_anim = true var l=this.style,i=this.I.style,t=this.tb?this.tb.style:null,k=this.k if (eval(this.JScond)) { eval(this.JSaction) setTimeout("var o=document.getElementById('"+this.id+"');if(o)o.doZoom()",600/(1+this.speed)) } else { if (this.removeIt) this.removeIt() else if(t) t.width = (parseInt(t.width)+L.Bw*2)+"px" d.PL_anim = false cleanupAnim() setWHXY(1)} } L.doZoom() } function prepAnim(opn) { if(d.all && !L.IE) showAllIFrames(false) if(opn) L.speed = Ops else { L.speed = Cls L.removeIt = removeLayer } L.b = 0 L.JSaction="style.clip='rect" } function Bounce(dir) { var l = L.style, step=40 l.jumps = false L.Ops = Ops l.y = y l.x = x switch(dir) { case 1: l.top = (st+ch)+"px" L.JScond = "parseInt(l.top)>l.y" L.JSmove = "l.top=(parseInt(l.top)-"+step+")+'px'" L.JSjump = "l.top=(l.y+n)+'px';" break case 0: l.top = (st-h)+"px" L.JScond = "parseInt(l.top)0";L.JSaction+="if(b<0)b=0;";L.speed = -L.speed} if ((opn&&dir==1)||(!opn&&dir==0)) L.JSaction+= "style.top=(y+h-b)+'px';" break case 2: case 3: rect="0px '+b+'px auto 0px" matrix="M11='+b/w+'" if (opn) {L.b = 0;L.JScond = "bw)b=w;"} else {L.b = w;L.JScond = "b>0";L.JSaction+="if(b<0)b=0;";L.speed = -L.speed} if ((opn&&dir==3)||(!opn&&dir==2)) L.JSaction+="style.left=(x+w-b)+'px';" break } L.JSaction+= "style.clip='rect("+rect+")';style.filter='progid:DXImageTransform.Microsoft.Matrix("+matrix+")'" if(L.NS) L.JSaction += ";style.top=(y+1)+'px';style.top=y+'px'" playAnim(20) } function MSFilter(opn,fltr) { var spd = opn?Ops:Cls L.style.filter = 'progid:DXImageTransform.Microsoft.'+fltr+'(duration='+7/spd+')' if (L.filters) L.filters[0].apply() if (!opn) { L.onfilterchange = removeLayer Ls.visibility = "hidden" } else L.onfilterchange = function(){this.onfilterchange = ''} if(L.filters) L.filters[0].play() else L.onfilterchange() } function setWHXY(b) { L.Is.width = w+"px"; L.w = w + L.dw; Ls.width = L.w+"px" L.Is.height = h+"px"; L.h = h + L.dh; Ls.height = L.h+"px" L.x = x; Ls.left = x+"px" L.y = y; Ls.top = y+"px" if (b && L.tb) { TBw = w*L.k L.tb.style.width = TBw+(d.all&&!compatMode?Bw*2:0)+"px" } } function CheckCompatibility(method) { if (d.all && !L.IE && method == 1) return 0 if (ContentNodes[L.iContent].iType == 2) { var sDisabled = d.all ? ",1,3," : ",1,3,4,5,6," if (sDisabled.indexOf(","+method+",") >= 0) return 0 // use snap instead } return method } function openLayer() { Ls.display = "none" setWHXY() switch(CheckCompatibility(Opm)) { case 0: cleanupAnim();break case 1: Fade("in");break case 2: Zoom("in");break case 3: MSFilter(true,"RandomDissolve");break case 4: Stretch(true,Opd);break case 5: Slide(true,Opd);break case 6: Roll(true,Opd);break case 7: Bounce(Opd);break } Ls.display = "" } function closeLayer() { switch(CheckCompatibility(this.closeMethod)) { case 1: Fade("out");break case 2: Zoom("out");break case 3: MSFilter(false,"RandomDissolve");break case 4: Stretch(false,Cld);break case 5: Slide(false,Cld);break case 6: Roll(false,Cld);break default: removeLayer(); break } } function removeLayer() { if (!L.destroyed) { L.destroyed = true if (Rsz) { IECanvas.style.cursor="auto" d.PL_rszID = "" for (var i=L.iMM;i