function ImageFlow (){ this.defaults = { ImageFlowID: 'imageflow', preloadImages: false, reflections: true, reflectionP: 0.5, reflectionPNG: false, reflectionGET: '', imageFocusMax: 4, imageFocusM: 1.0, imageCursor: 'default', startID: 1, startAnimation: false, slider: true, sliderCursor: 'e-resize', sliderWidth: 14, xStep: 150, captions: true, opacity: false, opacityArray: [10,8,6,4,2], onClick:function(){document.location=this.url}}; var thisObject = this; this.init=function(options){ var a=new Array('ImageFlowID','preloadImages','reflections','reflectionP','reflectionPNG','reflectionGET','imageFocusMax','imageFocusM','imageCursor','startID','startAnimation','slider','sliderCursor','sliderWidth','xStep','captions','opacity','opacityArray','onClick'); var b=a.length; for(var i=0;ithisObject.max){ a=thisObject.max-1} thisObject.glideTo(a); if(thisObject.startAnimation===true){ thisObject.moveTo(5000)}}} this.loadingStatus=function(){ var a=thisObject.imagesDiv.childNodes.length; var i=0,b=0; var c=null; for(var d=0;d(c.h/(thisObject.reflectionP+1))){ c.pc=118; c.pcMem=118} else { c.pc=100; c.pcMem=100} c.style.cursor=thisObject.imageCursor; i++}} this.max=thisObject.indexArray.length; if(thisObject.firstRefresh){ thisObject.firstRefresh=false} thisObject.moveTo(thisObject.current); thisObject.glideTo(thisObject.imageID)} this.moveTo=function(x){ this.current=x; this.zIndex=thisObject.max; for(var a=0;athisObject.memTarget){ b.style.visibility='hidden'; b.style.display='none'} else { var z=Math.sqrt(10000+x*x)+100; var xs=x/z*thisObject.size+thisObject.size; b.style.display='block'; var d=(b.h/b.w*b.pc)/z*thisObject.size; var e=0; switch(d>thisObject.maxHeight){ case false: e=b.pc/z*thisObject.size; break; default: d=thisObject.maxHeight; e=b.w*d/b.h; break} var f=(thisObject.iWidth*0.34-d)+((d/(thisObject.reflectionP+1))*thisObject.reflectionP); b.style.left=xs-(b.pc/2)/z*thisObject.size+'px'; if(e&&d){ b.style.height=d+'px'; b.style.width=e+'px'; b.style.top=f+'px'} b.style.visibility='visible'; switch(x<0){ case true: this.zIndex++; break; default: this.zIndex=thisObject.zIndex-1; break} switch(b.i==thisObject.imageID){ case false: b.onclick=function(){thisObject.glideTo(this.i)}; break; default: this.zIndex=thisObject.zIndex+1; if(b.url!==''){ b.onclick=thisObject.onClick} break} b.style.zIndex=thisObject.zIndex} x+=thisObject.xStep}} this.glideTo=function(a){ var x=-a*thisObject.xStep; this.target=x; this.memTarget=x; this.imageID=a; var b=thisObject.imagesDiv.childNodes[a].getAttribute('alt'); if(b===''||thisObject.captions===false){ b=' '} thisObject.captionDiv.innerHTML=b; if(thisObject.MouseDrag.busy===false){ this.newSliderX=(a*thisObject.scrollbarWidth)/(thisObject.max-1)-thisObject.MouseDrag.newX; thisObject.sliderDiv.style.marginLeft=(thisObject.newSliderX-thisObject.sliderWidth)+'px'} if(thisObject.opacity===true||thisObject.imageFocusM!==thisObject.defaults.imageFocusM){ thisObject.setOpacity(thisObject.imagesDiv.childNodes[a],thisObject.opacityArray[0]); thisObject.imagesDiv.childNodes[a].pc=thisObject.imagesDiv.childNodes[a].pc*thisObject.imageFocusM; var c=0; var d=0; var e=0; var f=thisObject.opacityArray.length; for(var i=1;i<(thisObject.imageFocusMax+1);i++){ if((i+1)>f){ c=thisObject.opacityArray[f-1]} else { c=thisObject.opacityArray[i]} d=a+i; e=a-i; if(d=0){ thisObject.setOpacity(thisObject.imagesDiv.childNodes[e],c); thisObject.imagesDiv.childNodes[e].pc=thisObject.imagesDiv.childNodes[e].pcMem}}} if(thisObject.busy===false){ window.setTimeout(thisObject.animate,50); thisObject.busy=true}} this.animate=function(){ switch(thisObject.targetthisObject.current+1){ case true: thisObject.moveTo(thisObject.current+(thisObject.target-thisObject.current)/3); window.setTimeout(thisObject.animate,50); thisObject.busy=true; break; default: thisObject.busy=false; break}} this.setOpacity=function(a,b){ if(thisObject.opacity===true){ a.style.opacity=b/10; a.style.filter='alpha(opacity='+b*10+')'}} this.initMouseWheel=function(){ if(window.addEventListener){ thisObject.ImageFlowDiv.addEventListener('DOMMouseScroll',thisObject.eventMouseWheel,false)} thisObject.ImageFlowDiv.onmousewheel=thisObject.eventMouseWheel} this.eventMouseWheel=function(a){ var b=0; if(!a){ a=window.event} if(a.wheelDelta){ b=a.wheelDelta/120} else if(a.detail){ b=-a.detail/3} if(b){ thisObject.handleMouseWheel(b)} if(a.preventDefault){ a.preventDefault()} a.returnValue=false} this.handleMouseWheel=function(a){ var b=false; var c=0; if(a>0){ if(thisObject.imageID>=1){ c=thisObject.imageID-1; b=true}} else { if(thisObject.imageID<(thisObject.max-1)){ c=thisObject.imageID+1; b=true}} if(b===true){ thisObject.glideTo(c)}} this.MouseDrag = { object: null, objectX: 0, mouseX: 0, newX: 0, busy: false, init:function(){ thisObject.addEvent(thisObject.ImageFlowDiv,'mousemove',thisObject.MouseDrag.drag); thisObject.addEvent(thisObject.ImageFlowDiv,'mouseup',thisObject.MouseDrag.stop); thisObject.addEvent(document,'mouseup',thisObject.MouseDrag.stop); thisObject. ImageFlowDiv.onselectstart=function(){ var a=true; if(thisObject.MouseDrag.busy===true){ a=false} return a}}, start:function(o){ thisObject.MouseDrag.object=o; thisObject.MouseDrag.objectX=thisObject.MouseDrag.mouseX-o.offsetLeft+thisObject.newSliderX}, stop:function(){ thisObject.MouseDrag.object=null; thisObject.MouseDrag.busy=false}, drag:function(e){ var a=0; if(!e){ e=window.event} if(e.pageX){ a=e.pageX} else if(e.clientX){ a=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft} thisObject.MouseDrag.mouseX=a; if(thisObject.MouseDrag.object!==null){ var b=(thisObject.MouseDrag.mouseX-thisObject.MouseDrag.objectX)+thisObject.sliderWidth; if(b<(-thisObject.newSliderX)){ b=-thisObject.newSliderX} if(b>(thisObject.scrollbarWidth-thisObject.newSliderX)){ b=thisObject.scrollbarWidth-thisObject.newSliderX} var c=(b+thisObject.newSliderX)/(thisObject.scrollbarWidth/(thisObject.max-1)); var d=Math.round(c); thisObject.MouseDrag.newX=b; thisObject.MouseDrag.object.style.left=b+'px'; if(thisObject.imageID!==d){ thisObject.glideTo(d)} thisObject.MouseDrag.busy=true}}}; this.Key = { init:function(){ document.onkeydown=function(a){thisObject.Key.handle(a)}}, handle:function(a){ var b=thisObject.Key.get(a); switch(b){ case 39: thisObject.handleMouseWheel(-1); break; case 37: thisObject.handleMouseWheel(1); break}}, get:function(a){ a=a||window.event; return a.keyCode}}; this.addEvent=function(a,b,fn){ if(a.addEventListener){ a.addEventListener(b,fn,false)} else if(a.attachEvent){ a["e"+b+fn]=fn; a[b+fn]=function(){a["e"+b+fn](window.event)}; a.attachEvent("on"+b,a[b+fn])}} this.addResizeEvent=function(){ var a=window.onresize; if(typeof window.onresize!='function'){ window.onresize=function(){ thisObject.refresh()} } else { window.onresize=function(){ if(a){ a()} thisObject.refresh()} }} } var domReadyEvent = { name: "domReadyEvent", events: {}, domReadyID: 1, bDone: false, DOMContentLoadedCustom: null, add:function(a){ if(!a.$$domReadyID){ a.$$domReadyID=this.domReadyID++; if(this.bDone){ a()} this.events[a.$$domReadyID]=a}}, remove:function(a){ if(a.$$domReadyID){ delete this.events[a.$$domReadyID]}}, run:function(){ if(this.bDone){ return} this.bDone=true; for(var i in this.events){ this.events[i]()}}, schedule:function(){ if(this.bDone){ return} if(/KHTML|WebKit/i.test(navigator.userAgent)){ if(/loaded|complete/.test(document.readyState)){ this.run()} else { setTimeout(this.name+".schedule()",100)}} else if(document.getElementById("__ie_onload")){ return true} if(typeof this.DOMContentLoadedCustom==="function"){ if(typeof document.getElementsByTagName!=='undefined'&&(document.getElementsByTagName('body')[0]!==null||document.body!==null)){ if(this.DOMContentLoadedCustom()){ this.run()} else { setTimeout(this.name+".schedule()",250)}}} return true}, init:function(){ if(document.addEventListener){ document.addEventListener("DOMContentLoaded",function(){domReadyEvent.run()},false)} setTimeout("domReadyEvent.schedule()",100); function run(){ domReadyEvent.run()} if(typeof addEvent!=="undefined"){ addEvent(window,"load",run)} else if(document.addEventListener){ document.addEventListener("load",run,false)} else if(typeof window.onload==="function"){ var a=window.onload; window.onload=function(){ domReadyEvent.run(); a()} } else { window.onload=run} /*@cc_on @if(@_win32||@_win64) document.write("