var includeCaption=!0,zoomTime=5,zoomSteps=15,includeFade=1,minBorder=90,shadowSettings="0px 5px 25px rgba(0, 0, 0, ",zoomImagesURI="http://www.as3r.fr/scripts/images-fancy/",myWidth=0,myHeight=0,myScroll=0;myScrollHeight=myScrollWidth=0;var zoomOpen=!1,preloadFrame=1,preloadActive=!1,preloadTime=0,imgPreload=new Image,preloadAnimTimer=0,zoomActive=[],zoomTimer=[],zoomOrigW=[],zoomOrigH=[],zoomOrigX=[],zoomOrigY=[],zoomID="ZoomBox",theID="ZoomImage",zoomCaption="ZoomCaption",zoomCaptionDiv="ZoomCapDiv";
if(-1!=navigator.userAgent.indexOf("MSIE"))var browserIsIE=!0;function setupZoom(){prepZooms();insertZoomHTML();zoomdiv=document.getElementById(zoomID);zoomimg=document.getElementById(theID)}
function prepZooms(){if(document.getElementsByTagName){var a=document.getElementsByTagName("a");for(i=0;i<a.length;i++)if(a[i].getAttribute("href")&&-1!=a[i].getAttribute("href").search(/(.*)\.(jpg|jpeg|gif|png|bmp|tif|tiff)/gi)&&"nozoom"!=a[i].getAttribute("rel"))a[i].onclick=function(a){return zoomClick(this,a)},a[i].onmouseover=function(){zoomPreload(this)}}}
function zoomPreload(a){var b=a.getAttribute("href");if(-1==imgPreload.src.indexOf(a.getAttribute("href").substr(a.getAttribute("href").lastIndexOf("/"))))preloadActive=!0,imgPreload=new Image,imgPreload.onload=function(){preloadActive=!1},imgPreload.src=b}
function preloadAnimStart(){preloadTime=new Date;document.getElementById("ZoomSpin").style.left=myWidth/2+"px";document.getElementById("ZoomSpin").style.top=myHeight/2+myScroll+"px";document.getElementById("ZoomSpin").style.visibility="visible";preloadFrame=1;document.getElementById("SpinImage").src=zoomImagesURI+"zoom-spin-"+preloadFrame+".png";preloadAnimTimer=setInterval("preloadAnim()",100)}
function preloadAnim(){!1!=preloadActive?(document.getElementById("SpinImage").src=zoomImagesURI+"zoom-spin-"+preloadFrame+".png",preloadFrame++,12<preloadFrame&&(preloadFrame=1)):(document.getElementById("ZoomSpin").style.visibility="hidden",clearInterval(preloadAnimTimer),preloadAnimTimer=0,zoomIn(preloadFrom))}
function zoomClick(a,b){var c=getShift(b);if(!b&&window.event&&(window.event.metaKey||window.event.altKey))return!0;if(b&&(b.metaKey||b.altKey))return!0;getSize();!0==preloadActive?0==preloadAnimTimer&&(preloadFrom=a,preloadAnimStart()):zoomIn(a,c);return!1}
function zoomIn(a,b){zoomimg.src=a.getAttribute("href");a.childNodes[0].width?(startW=a.childNodes[0].width,startH=a.childNodes[0].height,startPos=findElementPos(a.childNodes[0])):(startW=50,startH=12,startPos=findElementPos(a));hostX=startPos[0];hostY=startPos[1];document.getElementById("scroller")&&(hostX-=document.getElementById("scroller").scrollLeft);endW=imgPreload.width;endH=imgPreload.height;if(!0!=zoomActive[theID]){if(document.getElementById("ShadowBox"))document.getElementById("ShadowBox").style.visibility=
"hidden";else if(!browserIsIE){if(fadeActive.ZoomImage)clearInterval(fadeTimer.ZoomImage),fadeActive.ZoomImage=!1,fadeTimer.ZoomImage=!1;document.getElementById("ZoomImage").style.webkitBoxShadow=shadowSettings+"0.0)"}document.getElementById("ZoomClose").style.visibility="hidden";if(includeCaption)document.getElementById(zoomCaptionDiv).style.visibility="hidden",a.getAttribute("title")&&includeCaption?document.getElementById(zoomCaption).innerHTML=a.getAttribute("title"):document.getElementById(zoomCaption).innerHTML=
"";zoomOrigW[theID]=startW;zoomOrigH[theID]=startH;zoomOrigX[theID]=hostX;zoomOrigY[theID]=hostY;zoomimg.style.width=startW+"px";zoomimg.style.height=startH+"px";zoomdiv.style.left=hostX+"px";zoomdiv.style.top=hostY+"px";1==includeFade&&setOpacity(0,zoomID);zoomdiv.style.visibility="visible";sizeRatio=endW/endH;endW>myWidth-minBorder&&(endW=myWidth-minBorder,endH=endW/sizeRatio);endH>myHeight-minBorder&&(endH=myHeight-minBorder,endW=endH*sizeRatio);zoomChangeX=myWidth/2-endW/2-hostX;zoomChangeY=myHeight/
2-endH/2-hostY+myScroll;zoomChangeW=endW-startW;zoomChangeH=endH-startH;tempSteps=b?7*zoomSteps:zoomSteps;zoomCurrent=0;1==includeFade?(fadeCurrent=0,fadeAmount=-100/tempSteps):fadeAmount=0;zoomTimer[theID]=setInterval("zoomElement('"+zoomID+"', '"+theID+"', "+zoomCurrent+", "+startW+", "+zoomChangeW+", "+startH+", "+zoomChangeH+", "+hostX+", "+zoomChangeX+", "+hostY+", "+zoomChangeY+", "+tempSteps+", "+includeFade+", "+fadeAmount+", 'zoomDoneIn(zoomID)')",zoomTime);zoomActive[theID]=!0}}
function zoomOut(a,b){tempSteps=getShift(b)?7*zoomSteps:zoomSteps;if(!0!=zoomActive[theID]){if(document.getElementById("ShadowBox"))document.getElementById("ShadowBox").style.visibility="hidden";else if(!browserIsIE){if(fadeActive.ZoomImage)clearInterval(fadeTimer.ZoomImage),fadeActive.ZoomImage=!1,fadeTimer.ZoomImage=!1;document.getElementById("ZoomImage").style.webkitBoxShadow=shadowSettings+"0.0)"}document.getElementById("ZoomClose").style.visibility="hidden";if(includeCaption&&""!=document.getElementById(zoomCaption).innerHTML)document.getElementById(zoomCaptionDiv).style.visibility=
"hidden";startX=parseInt(zoomdiv.style.left);startY=parseInt(zoomdiv.style.top);startW=zoomimg.width;startH=zoomimg.height;zoomChangeX=zoomOrigX[theID]-startX;zoomChangeY=zoomOrigY[theID]-startY;zoomChangeW=zoomOrigW[theID]-startW;zoomChangeH=zoomOrigH[theID]-startH;zoomCurrent=0;1==includeFade?(fadeCurrent=0,fadeAmount=100/tempSteps):fadeAmount=0;zoomTimer[theID]=setInterval("zoomElement('"+zoomID+"', '"+theID+"', "+zoomCurrent+", "+startW+", "+zoomChangeW+", "+startH+", "+zoomChangeH+", "+startX+
", "+zoomChangeX+", "+startY+", "+zoomChangeY+", "+tempSteps+", "+includeFade+", "+fadeAmount+", 'zoomDone(zoomID, theID)')",zoomTime);zoomActive[theID]=!0}}
function zoomDoneIn(a){zoomOpen=!0;a=document.getElementById(a);document.getElementById("ShadowBox")?(setOpacity(0,"ShadowBox"),shadowdiv=document.getElementById("ShadowBox"),shadowLeft=parseInt(a.style.left)-13,shadowTop=parseInt(a.style.top)-8,shadowWidth=a.offsetWidth+26,shadowHeight=a.offsetHeight+26,shadowdiv.style.width=shadowWidth+"px",shadowdiv.style.height=shadowHeight+"px",shadowdiv.style.left=shadowLeft+"px",shadowdiv.style.top=shadowTop+"px",document.getElementById("ShadowBox").style.visibility=
"visible",fadeElementSetup("ShadowBox",0,100,5)):browserIsIE||fadeElementSetup("ZoomImage",0,0.8,5,0,"shadow");if(includeCaption&&""!=document.getElementById(zoomCaption).innerHTML)zoomcapd=document.getElementById(zoomCaptionDiv),zoomcapd.style.top=parseInt(a.style.top)+(a.offsetHeight+15)+"px",zoomcapd.style.left=myWidth/2-zoomcapd.offsetWidth/2+"px",zoomcapd.style.visibility="visible";browserIsIE||setOpacity(0,"ZoomClose");document.getElementById("ZoomClose").style.visibility="visible";browserIsIE||
fadeElementSetup("ZoomClose",0,100,5);document.onkeypress=getKey}function zoomDone(a,b){zoomOpen=!1;zoomOrigH[b]="";zoomOrigW[b]="";document.getElementById(a).style.visibility="hidden";document.onkeypress=null}
function zoomElement(a,b,c,d,e,f,k,l,m,n,o,g,p,h,j){c==g+1?(zoomActive[b]=!1,clearInterval(zoomTimer[b]),""!=j&&eval(j)):(1==p&&(0>h?setOpacity(Math.abs(c*h),a):setOpacity(100-c*h,a)),moveW=cubicInOut(c,d,e,g),moveH=cubicInOut(c,f,k,g),moveX=cubicInOut(c,l,m,g),moveY=cubicInOut(c,n,o,g),document.getElementById(a).style.left=moveX+"px",document.getElementById(a).style.top=moveY+"px",zoomimg.style.width=moveW+"px",zoomimg.style.height=moveH+"px",c++,clearInterval(zoomTimer[b]),zoomTimer[b]=setInterval("zoomElement('"+
a+"', '"+b+"', "+c+", "+d+", "+e+", "+f+", "+k+", "+l+", "+m+", "+n+", "+o+", "+g+", "+p+", "+h+", '"+j+"')",zoomTime))}function getKey(a){theKey=a?a.keyCode:event.keyCode;27==theKey&&zoomOut(this,a)}function fadeOut(a){a.id&&fadeElementSetup(a.id,100,0,10)}function fadeIn(a){a.id&&fadeElementSetup(a.id,0,100,10)}var fadeActive=[],fadeQueue=[],fadeTimer=[],fadeClose=[],fadeMode=[];
function fadeElementSetup(a,b,c,d,e,f){!0==fadeActive[a]?fadeQueue[a]=[a,b,c,d]:(fadeSteps=d,fadeCurrent=0,fadeAmount=(b-c)/fadeSteps,fadeTimer[a]=setInterval("fadeElement('"+a+"', '"+fadeCurrent+"', '"+fadeAmount+"', '"+fadeSteps+"')",15),fadeActive[a]=!0,fadeMode[a]=f,fadeClose[a]=1==e?!0:!1)}
function fadeElement(a,b,c,d){if(b==d){clearInterval(fadeTimer[a]);fadeActive[a]=!1;fadeTimer[a]=!1;if(!0==fadeClose[a])document.getElementById(a).style.visibility="hidden";fadeQueue[a]&&!1!=fadeQueue[a]&&(fadeElementSetup(fadeQueue[a][0],fadeQueue[a][1],fadeQueue[a][2],fadeQueue[a][3]),fadeQueue[a]=!1)}else b++,"shadow"==fadeMode[a]?0>c?document.getElementById(a).style.webkitBoxShadow=shadowSettings+Math.abs(b*c)+")":document.getElementById(a).style.webkitBoxShadow=shadowSettings+(100-b*c)+")":0>
c?setOpacity(Math.abs(b*c),a):setOpacity(100-b*c,a),clearInterval(fadeTimer[a]),fadeTimer[a]=setInterval("fadeElement('"+a+"', '"+b+"', '"+c+"', '"+d+"')",15)}function setOpacity(a,b){var c=document.getElementById(b).style;-1!=navigator.userAgent.indexOf("Firefox")&&100==a&&(a=99.9999);c.filter="alpha(opacity="+a+")";c.opacity=a/100}function linear(a,b,c,d){return c*a/d+b}function sineInOut(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b}function cubicIn(a,b,c,d){return c*(a/=d)*a*a+b}
function cubicOut(a,b,c,d){return c*((a=a/d-1)*a*a+1)+b}function cubicInOut(a,b,c,d){return 1>(a/=d/2)?c/2*a*a*a+b:c/2*((a-=2)*a*a+2)+b}function bounceOut(a,b,c,d){return(a/=d)<1/2.75?c*7.5625*a*a+b:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+0.984375)+b}
function getSize(){if(self.innerHeight)myWidth=window.innerWidth,myHeight=window.innerHeight,myScroll=window.pageYOffset;else if(document.documentElement&&document.documentElement.clientHeight)myWidth=document.documentElement.clientWidth,myHeight=document.documentElement.clientHeight,myScroll=document.documentElement.scrollTop;else if(document.body)myWidth=document.body.clientWidth,myHeight=document.body.clientHeight,myScroll=document.body.scrollTop;window.innerHeight&&window.scrollMaxY?(myScrollWidth=
document.body.scrollWidth,myScrollHeight=window.innerHeight+window.scrollMaxY):document.body.scrollHeight>document.body.offsetHeight?(myScrollWidth=document.body.scrollWidth,myScrollHeight=document.body.scrollHeight):(myScrollWidth=document.body.offsetWidth,myScrollHeight=document.body.offsetHeight)}function getShift(a){var b=!1;if(!a&&window.event)b=window.event.shiftKey;else if(a)(b=a.shiftKey)&&a.stopPropagation();return b}
function findElementPos(a){var b=0,c=0;do b+=a.offsetLeft,c+=a.offsetTop;while(a=a.offsetParent);return[b,c]};function insertZoomHTML(){var a=document.getElementsByTagName("body").item(0),b=document.createElement("div");b.setAttribute("id","ZoomSpin");b.style.position="absolute";b.style.left="10px";b.style.top="10px";b.style.visibility="hidden";b.style.zIndex="525";a.insertBefore(b,a.firstChild);var c=document.createElement("img");c.setAttribute("id","SpinImage");c.setAttribute("src",zoomImagesURI+"zoom-spin-1.png");b.appendChild(c);c=document.createElement("div");c.setAttribute("id","ZoomBox");c.style.position=
"absolute";c.style.left="10px";c.style.top="10px";c.style.visibility="hidden";c.style.zIndex="499";a.insertBefore(c,b.nextSibling);b=document.createElement("img");b.onclick=function(a){zoomOut(this,a);return!1};b.setAttribute("src",zoomImagesURI+"spacer.gif");b.setAttribute("id","ZoomImage");b.setAttribute("border","0");b.setAttribute("style","-webkit-box-shadow: "+shadowSettings+"0.0)");b.style.display="block";b.style.width="10px";b.style.height="10px";b.style.cursor="pointer";c.appendChild(b);b=
document.createElement("div");b.setAttribute("id","ZoomClose");b.style.position="absolute";browserIsIE?(b.style.left="-1px",b.style.top="0px"):(b.style.left="-15px",b.style.top="-15px");b.style.visibility="hidden";c.appendChild(b);var d=document.createElement("img");d.onclick=function(a){zoomOut(this,a);return!1};d.setAttribute("src",zoomImagesURI+"closebox.png");d.setAttribute("width","30");d.setAttribute("height","30");d.setAttribute("border","0");d.style.cursor="pointer";b.appendChild(d);if(!document.getElementById("ZoomImage").style.webkitBoxShadow&&
!browserIsIE){b=document.createElement("div");b.setAttribute("id","ShadowBox");b.style.position="absolute";b.style.left="50px";b.style.top="50px";b.style.width="100px";b.style.height="100px";b.style.visibility="hidden";b.style.zIndex="498";a.insertBefore(b,c.nextSibling);d=document.createElement("table");d.setAttribute("border","0");d.setAttribute("width","100%");d.setAttribute("height","100%");d.setAttribute("cellpadding","0");d.setAttribute("cellspacing","0");b.appendChild(d);b=document.createElement("tbody");
d.appendChild(b);d=document.createElement("tr");d.style.height="25px";b.appendChild(d);var e=document.createElement("td");e.style.width="27px";d.appendChild(e);var f=document.createElement("img");f.setAttribute("src",zoomImagesURI+"zoom-shadow1.png");f.setAttribute("width","27");f.setAttribute("height","25");f.style.display="block";e.appendChild(f);e=document.createElement("td");e.setAttribute("background",zoomImagesURI+"zoom-shadow2.png");d.appendChild(e);f=document.createElement("img");f.setAttribute("src",
zoomImagesURI+"spacer.gif");f.setAttribute("height","1");f.setAttribute("width","1");f.style.display="block";e.appendChild(f);e=document.createElement("td");e.style.width="27px";d.appendChild(e);d=document.createElement("img");d.setAttribute("src",zoomImagesURI+"zoom-shadow3.png");d.setAttribute("width","27");d.setAttribute("height","25");d.style.display="block";e.appendChild(d);inRow2=document.createElement("tr");b.appendChild(inRow2);d=document.createElement("td");d.setAttribute("background",zoomImagesURI+
"zoom-shadow4.png");inRow2.appendChild(d);e=document.createElement("img");e.setAttribute("src",zoomImagesURI+"spacer.gif");e.setAttribute("height","1");e.setAttribute("width","1");e.style.display="block";d.appendChild(e);d=document.createElement("td");d.setAttribute("bgcolor","#ffffff");inRow2.appendChild(d);e=document.createElement("img");e.setAttribute("src",zoomImagesURI+"spacer.gif");e.setAttribute("height","1");e.setAttribute("width","1");e.style.display="block";d.appendChild(e);d=document.createElement("td");
d.setAttribute("background",zoomImagesURI+"zoom-shadow5.png");inRow2.appendChild(d);e=document.createElement("img");e.setAttribute("src",zoomImagesURI+"spacer.gif");e.setAttribute("height","1");e.setAttribute("width","1");e.style.display="block";d.appendChild(e);d=document.createElement("tr");d.style.height="26px";b.appendChild(d);b=document.createElement("td");b.style.width="27px";d.appendChild(b);e=document.createElement("img");e.setAttribute("src",zoomImagesURI+"zoom-shadow6.png");e.setAttribute("width",
"27");e.setAttribute("height","26");e.style.display="block";b.appendChild(e);b=document.createElement("td");b.setAttribute("background",zoomImagesURI+"zoom-shadow7.png");d.appendChild(b);e=document.createElement("img");e.setAttribute("src",zoomImagesURI+"spacer.gif");e.setAttribute("height","1");e.setAttribute("width","1");e.style.display="block";b.appendChild(e);b=document.createElement("td");b.style.width="27px";d.appendChild(b);d=document.createElement("img");d.setAttribute("src",zoomImagesURI+
"zoom-shadow8.png");d.setAttribute("width","27");d.setAttribute("height","26");d.style.display="block";b.appendChild(d)}if(includeCaption)b=document.createElement("div"),b.setAttribute("id","ZoomCapDiv"),b.style.position="absolute",b.style.visibility="hidden",b.style.marginLeft="auto",b.style.marginRight="auto",b.style.zIndex="501",a.insertBefore(b,c.nextSibling),a=document.createElement("table"),a.setAttribute("border","0"),a.setAttribute("cellPadding","0"),a.setAttribute("cellSpacing","0"),b.appendChild(a),
c=document.createElement("tbody"),a.appendChild(c),a=document.createElement("tr"),c.appendChild(a),c=document.createElement("td"),c.setAttribute("align","right"),a.appendChild(c),b=document.createElement("img"),b.setAttribute("src",zoomImagesURI+"zoom-caption-l.png"),b.setAttribute("width","13"),b.setAttribute("height","26"),b.style.display="block",c.appendChild(b),c=document.createElement("td"),c.setAttribute("background",zoomImagesURI+"zoom-caption-fill.png"),c.setAttribute("id","ZoomCaption"),
c.setAttribute("valign","middle"),c.style.fontSize="14px",c.style.fontFamily="Helvetica",c.style.fontWeight="bold",c.style.color="#ffffff",c.style.textShadow="0px 2px 4px #000000",c.style.whiteSpace="nowrap",a.appendChild(c),c=document.createElement("td"),a.appendChild(c),a=document.createElement("img"),a.setAttribute("src",zoomImagesURI+"zoom-caption-r.png"),a.setAttribute("width","13"),a.setAttribute("height","26"),a.style.display="block",c.appendChild(a)};
