var cvi_sztimer,cvi_szactive,cvi_szimage=null,shiftzoom={_shiftzoom:null,version:2.66,released:"2009-03-29 15:56:00",defaultFading:true,defaultButtons:true,defaultOverview:true,defaultNozoom:false,defaultBicubic:false,defaultShowcoords:false,defaultPixelcoords:true,defaultPercentcoords:false,defaultLowres:"",defaultMillisec:40,defaultOpacity:90,defaultOvsfact:25,defaultOvaopac:75,defaultOvacolor:"red",defaultOvbcolor:"white",defaultIntitle:"click or press shift key to zoom in",defaultOuttitle:"click or press alt key to zoom out",defaultInfoblock:'<dl><div align="right">Mouseover <big>Keyboard Support</big></div><dt>Zoom in:</dt><dd>[+] / [PgDn] / [End] <em>(is faster)</em> /<br /> [shift] + <u>left</u> mouse button /<br /><u>middle</u> / <u>wheel</u> mouse button /<br />mouse wheel <u>down</u><small><br /><br /></small></dd><dt>Zoom out:</dt><dd>[–] / [PgUp] / [Home] <em>(is faster)</em> /<br /> [alt] + <u>left</u> mouse button /<br /><u>right</u> mouse button /<br />mouse wheel <u>up</u><small><br /><br /></small></dd><dt>Pan / Shift / Move:</dt><dd>[left] / [right] / [down] / [up] arrow buttons<br />+ [shift] <em>(is faster)</em> and + [alt] <em>(is slower)</em></dd></dl>',defaultOvborder:"",defaultCurpath:"",defaultZoom:0,defaultXpos:50,defaultYpos:50,gif:"data:image/gif;base64,R0lGODlhAQABAJH/AP///wAAAP///wAAACH/C0FET0JFOklSMS4wAt7tACH5BAEAAAIALAAAAAABAAEAAAICVAEAOw==",add:function(f,b){function j(n,m){var i=n;
if(n>8191&&n<10485){n=n-5000;
i=Math.round(n*Math.pow(10,m))/Math.pow(10,m);
i=i+5000
}else{i=Math.round(n*Math.pow(10,m))/Math.pow(10,m)
}return i
}function a(){var i=Date.parse(new Date())+Math.floor(Math.random()*100000000000);
return i.toString(16)
}function h(){var m=false,o=false,n=false,i=false;
try{m=(document.body.style.boxShadow!==undefined)
}catch(p){}try{o=(document.body.style.MozBoxShadow!==undefined)
}catch(p){}try{n=(document.body.style.KhtmlBoxShadow!==undefined)
}catch(p){}try{i=(document.body.style.WebkitBoxShadow!==undefined)
}catch(p){}return(m||o||n||i?true:false)
}if(!f.ctrlid){var c={curpath:shiftzoom.defaultCurpath,opacity:shiftzoom.defaultOpacity,millisec:shiftzoom.defaultMillisec,intitle:shiftzoom.defaultIntitle,outtitle:shiftzoom.defaultOuttitle,infoblock:shiftzoom.defaultInfoblock,ovsfact:shiftzoom.defaultOvsfact,ovaopac:shiftzoom.defaultOvaopac,ovacolor:shiftzoom.defaultOvacolor,ovbcolor:shiftzoom.defaultOvbcolor,zoom:shiftzoom.defaultZoom,xpos:shiftzoom.defaultXpos,ypos:shiftzoom.defaultYpos,lowres:shiftzoom.defaultLowres,bicubic:shiftzoom.defaultBicubic};
if(b){for(var d in c){if(!b[d]){b[d]=c[d]
}}}else{b=c
}if(document.images&&document.createElement&&document.getElementById&&document.getElementsByTagName){f.opts=c;
f.highres=f.src;
if(f.naturalWidth&&f.naturalHeight){f.xfactor=j(f.naturalWidth/f.width,4);
f.yfactor=j(f.naturalHeight/f.height,4);
f.maxwidth=f.naturalWidth;
f.maxheight=f.naturalHeight
}else{var e=new Image;
e.src=f.src;
f.xfactor=j(e.width/f.width,4);
f.yfactor=j(e.height/f.height,4);
f.maxwidth=e.width;
f.maxheight=e.height;
e=null;
delete e
}if(f.width>=0&&f.width<f.maxwidth&&f.height>=0&&f.height<f.maxheight){f.fading=(typeof b.fading==="boolean"?b.fading:shiftzoom.defaultFading);
f.buttons=(typeof b.buttons==="boolean"?b.buttons:shiftzoom.defaultButtons);
f.nozoom=(typeof b.nozoom==="boolean"?b.nozoom:shiftzoom.defaultNozoom);
f.bicubic=(typeof b.bicubic==="boolean"?b.bicubic:shiftzoom.defaultBicubic);
f.overview=(typeof b.overview==="boolean"?b.overview:shiftzoom.defaultOverview);
f.showcoords=(typeof b.showcoords==="boolean"?b.showcoords:shiftzoom.defaultShowcoords);
f.pixelcoords=(typeof b.pixelcoords==="boolean"?b.pixelcoords:shiftzoom.defaultPixelcoords);
f.percentcoords=(typeof b.percentcoords==="boolean"?b.percentcoords:shiftzoom.defaultPercentcoords);
f.lowres=(typeof b.lowres==="string"?b.lowres:f.opts.lowres);
f.bicubic=(f.bicubic?"bicubic":"nearest-neighbor");
f.curpath=(typeof b.curpath==="string"?b.curpath:f.opts.curpath);
f.intitle=(typeof b.intitle==="string"?b.intitle:f.opts.intitle);
f.outtitle=(typeof b.outtitle==="string"?b.outtitle:f.opts.outtitle);
f.infoblock=(typeof b.infoblock==="string"?b.infoblock:f.opts.infoblock);
f.defblock=f.infoblock;
f.ovacolor=(typeof b.ovacolor==="string"?b.ovacolor:f.opts.ovacolor);
f.ovbcolor=(typeof b.ovbcolor==="string"?b.ovbcolor:f.opts.ovbcolor);
f.ovsfact=(typeof b.ovsfact==="number"?parseInt(Math.min(Math.max(10,b.ovsfact),50)):f.opts.ovsfact)/100;
f.millisec=(typeof b.millisec==="number"?parseInt(Math.min(Math.max(5,b.millisec),100)):f.opts.millisec);
f.ovaopac=(typeof b.ovaopac==="number"?parseInt(Math.min(Math.max(0,b.ovaopac),100)):f.opts.ovaopac);
f.opacity=(typeof b.opacity==="number"?parseInt(Math.min(Math.max(0,b.opacity),100)):f.opts.opacity);
f.ovborder=(typeof b.ovborder==="number"?parseInt(Math.min(Math.max(0,b.ovborder),20)):Math.min(Math.round(f.width/100),Math.round(f.height/100)));
f.zoom=(typeof b.zoom==="number"?parseFloat(Math.min(Math.max(0,b.zoom),100)):f.opts.zoom);
f.xpos=(typeof b.xpos==="number"?parseFloat(Math.min(Math.max(0,b.xpos),100)):f.opts.xpos);
f.ypos=(typeof b.ypos==="number"?parseFloat(Math.min(Math.max(0,b.ypos),100)):f.opts.ypos);
f.opts=null;
c=null;
f.bc="1px white solid";
f.dc="1px gray solid";
f.automode=false;
f.autoloop=false;
f.autowait=0;
f.zoomin=false;
f.zoomout=false;
if(f.fading){if(f.trident){f.style.filter="alpha(opacity=0)"
}else{f.style.opacity=0
}}f.style.visibility="visible";
var l=f.parentNode.style;
l.position=(l.position=="static"||l.position==""?"relative":l.position);
l.height=f.height+"px";
l.width=f.width+"px";
l.padding="0px";
l.overflow="hidden";
l.MozUserSelect="none";
l.KhtmlUserSelect="none";
f.parentNode.unselectable="on";
l.border="none";
l=f.style;
l.MozUserSelect="none";
l.KhtmlUserSelect="none";
f.unselectable="on";
l.display="block";
l.position="absolute";
f.left=0;
f.top=0;
l.left="0px";
l.top="0px";
f.minwidth=f.width;
f.minheight=f.height;
f.maxleft=f.maxwidth-f.minwidth;
f.maxtop=f.maxheight-f.minheight;
l.width=f.width+"px";
l.height=f.height+"px";
l.msInterpolationMode=f.bicubic;
l.cursor="url('"+f.curpath+"grab.cur'),move";
f.trident=document.all&&!window.opera?1:0;
f.webkit=window.atob!=undefined&&!window.updateCommands?1:0;
f.gecko=navigator.userAgent.indexOf("Gecko")>-1&&window.updateCommands?1:0;
f.presto=window.opera?1:0;
f.bshadow=h();
f.bmode=(f.trident&&(document.compatMode=="BackCompat"||document.compatMode=="QuirksMode")?true:false);
if(f.id!=""){}else{f.id=a()
}var g=shiftzoom.E("img");
g.src=f.trident?null:null;
g.style.display="none";
g.id=f.id+"_isrc";
f.parentNode.appendChild(g);
f.isrcid=g.id;
g=shiftzoom.E("div");
g.id=f.id+"_xyco";
l=g.style;
if(f.trident){l.backgroundColor="black"
}l.height="auto";
l.width="auto";
l.display="block";
l.position="absolute";
l.left="0px";
l.bottom="0px";
l.MozUserSelect="none";
l.KhtmlUserSelect="none";
g.unselectable="on";
if(f.fading&&f.showcoords||!f.showcoords){l.visibility="hidden"
}f.parentNode.appendChild(g);
f.xycoid=g.id;
if(!f.trident){var k=shiftzoom.E("div");
l=k.style;
l.height="100%";
l.width="100%";
l.left="0px";
l.bottom="0px";
l.position="absolute";
l.backgroundColor="black";
l.opacity=0.5;
g.appendChild(k)
}k=shiftzoom.E("div");
k.id=f.id+"_cpos";
k.innerHTML="x:0 y:0";
k.unselectable="on";
l=k.style;
l.textAlign="left";
l.verticalAlign="middle";
l.left="0px";
l.bottom="0px";
l.position="relative";
l.display="block";
l.color="white";
l.fontSize="10px";
l.fontFamily="Arial, Helvetica, sans-serif";
l.fontStyle="normal";
l.fontWeight="bold";
l.whiteSpace="nowrap";
l.padding="2px 4px";
l.textShadow="0px 0px 4px black";
g.appendChild(k);
f.cposid=k.id;
var g=shiftzoom.E("div");
l=g.style;
if(f.fading&&f.buttons||!f.buttons){l.visibility="hidden"
}g.id=f.id+"_ctrl";
l.height="16px";
l.width="42px";
l.display="block";
l.position="absolute";
l.lineHeight="1px";
l.fontSize="1px";
l.backgroundColor="#cccccc";
if(f.trident){l.filter="alpha(opacity="+f.opacity+")"
}else{l.opacity=f.opacity/100
}l.cursor="pointer";
l.left="0px";
l.top="0px";
l.boxShadow="0px 0px 8px black";
l.MozBoxShadow="0px 0px 8px black";
l.KhtmlBoxShadow="0px 0px 8px black";
l.WebkitBoxShadow="0px 0px 8px black";
f.parentNode.appendChild(g);
f.ctrlid=g.id;
var k=shiftzoom.E("div");
l=k.style;
l.height="2px";
l.width="2px";
l.position="absolute";
l.lineHeight="1px";
l.fontSize="1px";
l.left="4px";
l.top="3px";
l.backgroundColor="black";
g.appendChild(k);
k=shiftzoom.E("div");
l=k.style;
l.height="6px";
l.width="2px";
l.position="absolute";
l.lineHeight="1px";
l.fontSize="1px";
l.left="4px";
l.top="7px";
l.backgroundColor="black";
g.appendChild(k);
k=shiftzoom.E("div");
l=k.style;
l.height="2px";
l.width="8px";
l.position="absolute";
l.lineHeight="1px";
l.fontSize="1px";
l.left="14px";
l.top="7px";
l.backgroundColor="black";
g.appendChild(k);
k=shiftzoom.E("div");
l=k.style;
l.height="8px";
l.width="2px";
l.position="absolute";
l.lineHeight="1px";
l.fontSize="1px";
l.left="17px";
l.top="4px";
l.backgroundColor="black";
g.appendChild(k);
k=shiftzoom.E("div");
l=k.style;
l.height="2px";
l.width="8px";
l.position="absolute";
l.lineHeight="1px";
l.fontSize="1px";
l.left="30px";
l.top="7px";
l.backgroundColor="black";
g.appendChild(k);
k=shiftzoom.E("div");
k.id=f.id+"_kbin";
l=k.style;
l.height=(f.bmode?16:14)+"px";
l.cursor="help";
l.width=(f.bmode?10:8)+"px";
l.display="block";
l.position="absolute";
l.border=f.bc;
l.borderBottom=f.dc;
l.borderRight=f.dc;
l.left="0px";
l.top="0px";
f.ttipid=f.id+"_ttip";
if(f.trident){k.onmouseover=new Function('shiftzoom._showTooltip("'+f.id+'");');
k.onmouseout=new Function('shiftzoom._killTooltip("'+f.id+'");')
}else{k.setAttribute("onmouseover","shiftzoom._showTooltip('"+f.id+"');");
k.setAttribute("onmouseout","shiftzoom._killTooltip('"+f.id+"');")
}g.appendChild(k);
f.kbinid=k.id;
k=shiftzoom.E("div");
k.id=f.id+"_zoin";
k.title=f.intitle;
l=k.style;
l.height=(f.bmode?16:14)+"px";
l.width=(f.bmode?16:14)+"px";
l.display="block";
l.position="absolute";
l.border=f.bc;
l.borderBottom=f.dc;
l.borderRight=f.dc;
l.left="10px";
l.top="0px";
if(f.trident){k.onclick=new Function('shiftzoom._setCursor(this,1,"'+f.id+'");')
}else{k.setAttribute("onclick","shiftzoom._setCursor(this,1,'"+f.id+"');")
}g.appendChild(k);
f.zoinid=k.id;
k=shiftzoom.E("div");
k.id=f.id+"_zout";
k.title=f.outtitle;
l=k.style;
l.height=(f.bmode?16:14)+"px";
l.width=(f.bmode?16:14)+"px";
l.display="block";
l.position="absolute";
l.border=f.bc;
l.borderBottom=f.dc;
l.borderRight=f.dc;
l.left="26px";
l.top="0px";
if(f.trident){k.onclick=new Function('shiftzoom._setCursor(this,0,"'+f.id+'");')
}else{k.setAttribute("onclick","shiftzoom._setCursor(this,0,'"+f.id+"');")
}g.appendChild(k);
f.zoutid=k.id;
g=shiftzoom.E("div");
g.id=f.id+"_info";
l=g.style;
l.visibility="hidden";
l.height="16px";
l.width="7em";
l.left=(f.buttons?"42px":"0px");
l.top="0px";
l.display="block";
l.overflow="hidden";
l.position="absolute";
l.lineHeight="16px";
l.fontSize="10px";
l.fontFamily="Arial, Helvetica, sans-serif";
l.fontStyle="normal";
l.fontWeight="bold";
l.textShadow="0px 0px 4px black";
l.color="#ffffff";
if(f.trident){l.filter="alpha(opacity=100)"
}else{l.opacity=1
}l.cursor="default";
f.parentNode.appendChild(g);
f.infoid=g.id;
k=shiftzoom.E("div");
l=k.style;
l.position="absolute";
l.height="16px";
l.width="7em";
l.left="0px";
l.top="0px";
l.display="block";
l.backgroundColor="#000000";
if(f.trident){l.filter="alpha(opacity=50)"
}else{l.opacity=0.5
}g.appendChild(k);
k=shiftzoom.E("div");
k.id=f.id+"_text";
l=k.style;
l.position="absolute";
l.height="16px";
l.width="7em";
l.left="0px";
l.top="0px";
l.textAlign="center";
l.verticalAlign="middle";
l.overflow="hidden";
l.display="block";
l.color="#ffffff";
if(f.trident){l.filter="alpha(opacity=100)"
}g.appendChild(k);
f.textid=k.id;
k.innerHTML="100 / "+parseInt(f.xfactor*100)+" %";
g=shiftzoom.E("div");
g.id=f.id+"_over";
l=g.style;
l.height=(f.height*f.ovsfact)+"px";
l.width=(f.width*f.ovsfact)+"px";
l.display="block";
l.position="absolute";
l.bottom="0px";
l.right="0px";
l.borderLeft=f.ovborder+"px solid "+f.ovbcolor;
l.borderTop=f.ovborder+"px solid "+f.ovbcolor;
if(f.webkit||f.bshadow){l.borderLeft="0px solid "+f.ovbcolor;
l.borderTop="0px solid "+f.ovbcolor;
l.boxShadow="0px 0px 8px black";
l.WebkitBoxShadow="0px 0px 8px black";
l.MozBoxShadow="0px 0px 8px black";
l.KhtmlBoxShadow="0px 0px 8px black"
}l.MozUserSelect="none";
l.KhtmlUserSelect="none";
l.visibility="hidden";
g.unselectable="on";
f.parentNode.appendChild(g);
k=shiftzoom.E("img");
k.id=f.id+"_tumb";
k.src=f.src;
l=k.style;
l.height=(f.height*f.ovsfact)+"px";
l.width=(f.width*f.ovsfact)+"px";
l.display="block";
l.position="absolute";
l.bottom="0px";
l.right="0px";
g.appendChild(k);
f.tumbid=k.id;
k.onmousedown=shiftzoom._catchDrag;
k=shiftzoom.E("div");
k.id=f.id+"_view";
k.maxleft=0;
k.maxtop=0;
l=k.style;
l.lineHeight="1px";
l.fontSize="1px";
l.display="block";
l.position="absolute";
l.left="0px";
l.top="0px";
l.border="1px solid "+f.ovacolor;
l.height=parseInt((f.height*f.ovsfact)-(f.bmode?0:2))+"px";
l.width=parseInt((f.width*f.ovsfact)-(f.bmode?0:2))+"px";
if(f.trident){l.background="url('"+f.curpath+"nop.gif') transparent";
l.filter="alpha(opacity="+f.ovaopac+")"
}else{l.opacity=f.ovaopac/100
}g.appendChild(k);
f.overid=g.id;
f.viewid=k.id;
k.onmousedown=shiftzoom._startMove;
f.oncontextmenu=function(){return false
};
f.onmousedown=shiftzoom._catchKey;
f.onmouseover=shiftzoom._catchOver;
f.onmouseout=shiftzoom._catchOut;
if(f.showcoords){f.onmousemove=(f.pixelcoords?shiftzoom._showCoords:f.percentcoords?shiftzoom._showPercent:shiftzoom._showLatLon)
}if(f.zoom>0&&f.fading&&f.overview){f.overview=false;
f.special=true
}if(f.zoom>0){shiftzoom.zooming(f,f.zoom)
}if(f.xpos!=50||f.ypos!=50){shiftzoom.moveto(f,f.xpos+"%",f.ypos+"%")
}if(f.fading){shiftzoom._fadeImage(f.id,0)
}}else{f.style.visibility="visible"
}}else{f.style.visibility="visible"
}}return false
},remove:function(b,a){if(b&&typeof(b.ctrlid)==="string"){var c,d=b.parentNode;
b.onmousedown=null;
b.onmousemove=null;
b.onload=null;
document.onmousemove=null;
document.onmouseup=null;
document.onkeydown=null;
document.onkeyup=null;
document.onkeypress=null;
if(b.gecko){window.removeEventListener("DOMMouseScroll",shiftzoom._catchWheel,false)
}else{window.onmousewheel=null
}c=shiftzoom.G(b.overid);
if(c){d.removeChild(c)
}c=shiftzoom.G(b.infoid);
if(c){d.removeChild(c)
}c=shiftzoom.G(b.ctrlid);
if(c){d.removeChild(c)
}c=shiftzoom.G(b.xycoid);
if(c){d.removeChild(c)
}c=shiftzoom.G(b.isrcid);
if(c){d.removeChild(c)
}d.style.overflow="visible";
d.style.width=(a?b.maxwidth:b.minwidth)+"px";
d.style.height=(a?b.maxheight:b.minheight)+"px";
b.width=b.maxwidth;
b.height=b.maxheight;
b.left=0;
b.top=0;
b.style.width=(a?b.maxwidth:b.minwidth)+"px";
b.style.height=(a?b.maxheight:b.minheight)+"px";
b.style.left="0px";
b.style.top="0px";
b.style.cursor="default";
b.ctrlid=false
}return false
},moveto:function(e,a,g){if(e&&a&&g&&typeof(e.ctrlid)==="string"){if(e.width>e.minwidth||e.height>e.minheight){function c(j,k,h){var l=parseFloat(j);
if(l>h){l=h
}else{if(l<k){l=k
}}return l
}if(typeof(a)=="string"){if(a.match(/^([+-])?\d*([\.])?\d*$/)){a=Math.round((c(a,-180,180)+180)*(e.maxwidth/360))
}else{if(a.match(/^\d*([\.])?\d*([%]){1,1}$/)){a=Math.round(e.maxwidth*(Math.max(0,Math.min(100,parseFloat(a)))/100))
}else{a=0
}}}if(typeof(g)=="string"){if(g.match(/^([+-])?\d*([\.])?\d*$/)){g=Math.round(((c(g,-90,90)*-1)+90)*(e.maxheight/180))
}else{if(g.match(/^\d*([\.])?\d*([%]){1,1}$/)){g=Math.round(e.maxheight*(Math.max(0,Math.min(100,parseFloat(g)))/100))
}else{g=0
}}}var f=Math.max(0,Math.min(e.maxleft,(a*(e.width/e.maxwidth))-(e.minwidth/2)));
var d=Math.max(0,Math.min(e.maxtop,(g*(e.height/e.maxheight))-(e.minheight/2)));
e.style.left=(f*-1)+"px";
e.style.top=(d*-1)+"px";
e.left=(f*-1);
e.top=(d*-1);
if(e.overview){var b=shiftzoom.G(e.viewid).style;
b.left=Math.round((Math.abs(parseInt(e.style.left))/(e.width/e.minwidth))*e.ovsfact)-(e.bmode?2:0)+"px";
b.top=Math.round((Math.abs(parseInt(e.style.top))/(e.height/e.minheight))*e.ovsfact)-(e.bmode?2:0)+"px"
}}}return false
},zooming:function(b,a){if(b&&typeof(b.ctrlid)==="string"){if(typeof(a)==="number"){var h,c,g,e,d;
a=Math.max(0,Math.min(100,parseFloat(a)));
d=a>0?a/100:0;
h=Math.round(d*(b.maxwidth-b.minwidth))+b.minwidth;
c=Math.round(d*(b.maxheight-b.minheight))+b.minheight;
g=Math.round((h/2)-(b.minwidth/2))*-1;
e=Math.round((c/2)-(b.minheight/2))*-1;
b.style.width=h+"px";
b.style.height=c+"px";
b.style.left=g+"px";
b.style.top=e+"px";
b.width=h;
b.height=c;
b.left=g;
b.top=e;
b.maxleft=b.width-b.minwidth;
b.maxtop=b.height-b.minheight;
if(b.width>b.minwidth||b.height>b.minheight){b.style.cursor="url('"+b.curpath+"grab.cur'),move";
if(b.overview){shiftzoom._setOverview(b);
shiftzoom.G(b.overid).style.visibility="visible"
}}else{b.style.cursor="move";
if(b.overview){shiftzoom.G(b.overid).style.visibility="hidden"
}}}}return false
},kenburns:function(img,x,y,z,p,s,d,b,a){if(img&&typeof(img.ctrlid)==="string"){function GNV(v){if(typeof(v)==="number"){v=Math.max(0,Math.min(100,parseFloat(v)))
}else{v=0.5
}return v
}var io=false;
if(typeof(p)==="number"){if(p==3){io=true
}else{if(p==0){p=1
}else{p=Math.max(0,Math.min(2,parseFloat(p)))
}}}else{p=1
}if(typeof(s)==="number"){s=Math.max(1,Math.min(100,parseInt(s)))
}if(typeof(d)==="number"){d=Math.max(1,Math.min(100,parseInt(d)))
}else{d=30
}var fz,mz,ix,iy,sw,sh,sx,sy,ew,eh,ex,ey;
x=GNV(x);
y=GNV(y);
z=GNV(z);
fz=z*0.01;
if(img.lowres&&img.highres){shiftzoom.source(img,img.lowres,false,true)
}img.zoomin=false;
img.zoomout=false;
if(img.width>img.minwidth||img.height>img.minheight){if(img.trident){img.style.cursor="url('"+img.curpath+"grab.cur'),move"
}else{img.style.cursor="url('"+img.curpath+"grab.cur'),move"
}}else{img.style.cursor="move"
}ix=Math.round(img.maxwidth*(x*0.01));
iy=Math.round(img.maxheight*(y*0.01));
sw=parseInt(img.style.width);
sh=parseInt(img.style.height);
sx=parseInt(img.style.left);
sy=parseInt(img.style.top);
ew=z>-1?Math.round(fz*(img.maxwidth-img.minwidth))+img.minwidth:sw;
eh=z>-1?Math.round(fz*(img.maxheight-img.minheight))+img.minheight:sh;
ex=Math.max(0,Math.min(ew-img.minwidth,(ix*(ew/img.maxwidth))-(img.minwidth/2)))*-1;
ey=Math.max(0,Math.min(eh-img.minheight,(iy*(eh/img.maxheight))-(img.minheight/2)))*-1;
if(typeof(s)!=="number"){mz=Math.abs(Math.abs(ex)-Math.abs(sx));
mz=Math.max(mz,Math.abs(Math.abs(ey)-Math.abs(sy)));
mz=Math.max(mz,Math.abs(Math.abs(ew)-Math.abs(sw)));
mz=Math.max(mz,Math.abs(Math.abs(eh)-Math.abs(sh)));
s=Math.round(mz/d)
}if(img.timer){window.clearInterval(img.timer)
}var mx,my,mw,mh,q=0,c=0,t=s,k=1/t;
img.timer=window.setInterval(function(){q=io?((-Math.cos((k*c)*Math.PI)/2)+0.5)||0:Math.pow((k*c),p)||0;
mw=Math.ceil(sw+(q*(ew-sw)));
mh=Math.ceil(sh+(q*(eh-sh)));
mx=Math.ceil(sx+(q*(ex-sx)));
my=Math.ceil(sy+(q*(ey-sy)));
img.style.width=mw+"px";
img.style.height=mh+"px";
img.style.left=mx+"px";
img.style.top=my+"px";
img.width=mw;
img.height=mh;
img.left=mx;
img.top=my;
c++;
if(c>t){window.clearInterval(img.timer);
img.maxleft=img.width-img.minwidth;
img.maxtop=img.height-img.minheight;
img.zoomin=false;
img.zoomout=false;
if(img.lowres&&img.highres){shiftzoom.source(img,img.highres,false,true)
}if(img.width>img.minwidth||img.height>img.minheight){if(img.trident){img.style.cursor="url('"+img.curpath+"grab.cur'),move"
}else{img.style.cursor="url('"+img.curpath+"grab.cur'),move"
}if(img.overview){shiftzoom._setOverview(img);
shiftzoom.G(img.overid).style.visibility="visible"
}}else{img.style.cursor="url('"+img.curpath+"grab.cur'),move";
if(img.overview){shiftzoom.G(img.overid).style.visibility="hidden"
}}if(img.automode){window.setTimeout("shiftzoom._next(shiftzoom.G('"+img.id+"'))",img.autowait+1000)
}else{if(b&&typeof(b)==="string"&&eval("typeof "+b)=="function"){window.setTimeout("window['"+b+"']('"+(typeof(a)=="number"||typeof(a)=="string"?a:"")+"')",200)
}}}},d)
}return false
},play:function(img,d,l,obj,c){if(img&&typeof(img.ctrlid)==="string"){if(!img.automode&&typeof(d)==="number"&&typeof(l)==="boolean"&&typeof(obj)==="object"){if(obj.length>=1){var n=0,mx=3,i;
for(i=0;
i<obj.length;
++i){n=Math.max(0,obj[i].length);
mx=n<mx?n:mx
}img.callback=c&&typeof(c)==="string"&&eval("typeof "+c)=="function"?c:Null;
if(mx>=3){img.step=obj;
img.cpos=0;
img.automode=true;
img.autoloop=l;
img.autowait=Math.abs(d);
img.nozoom=true;
if(img.overview){shiftzoom.set(img,"overview",false)
}if(img.buttons){shiftzoom.set(img,"buttons",false)
}if(img.showcoords){shiftzoom.set(img,"showcoords",false)
}eval("shiftzoom.kenburns(shiftzoom.G(img.id),"+shiftzoom._opts(img.step[img.cpos])+");")
}}}}return false
},stop:function(a){if(a&&typeof(a.ctrlid)==="string"){if(a.automode){a.automode=false;
if(a.timer){window.clearInterval(a.timer)
}a.autoloop=false;
a.cpos=0;
a.maxleft=a.width-a.minwidth;
a.maxtop=a.height-a.minheight;
if(a.lowres&&a.highres){shiftzoom.source(a,a.highres,false,true)
}if(a.width>a.minwidth||a.height>a.minheight){if(a.trident){a.style.cursor="url('"+a.curpath+"grab.cur'),move"
}else{a.style.cursor="move"
}if(a.overview){shiftzoom._setOverview(a);
shiftzoom.G(a.overid).style.visibility="visible"
}}else{a.style.cursor="move";
if(a.overview){shiftzoom.G(a.overid).style.visibility="hidden"
}}if(a.callback){window.setTimeout("window['"+a.callback+"']()",200)
}}}return false
},source:function(b,e,a,d){if(b&&typeof(b.ctrlid)==="string"){if(typeof(e)==="string"&&typeof(a)==="boolean"){var c=new Image();
c.onload=function(){shiftzoom.G(b.ctrlid).style.visibility="hidden";
shiftzoom.G(b.overid).style.visibility="hidden";
shiftzoom.G(b.xycoid).style.visibility="hidden";
if(a==true){shiftzoom.G(b.isrcid).src=c.src;
if(!d){if(b.trident){c.onload="";
c=null
}delete c
}shiftzoom._fadeOut(b.id,100)
}else{if(a==false){b.src=c.src;
b.style.msInterpolationMode=b.bicubic;
if(!d){shiftzoom.G(b.tumbid).src=b.src;
if(b.highres!=b.src){b.highres=b.src
}if(b.trident){c.onload="";
c=null
}delete c
}if(b.buttons){shiftzoom.G(b.ctrlid).style.visibility="visible"
}if(b.overview&&(b.width>b.minwidth||b.height>b.minheight)){shiftzoom.G(b.overid).style.visibility="visible"
}if(b.showcoords){shiftzoom.G(b.xycoid).style.visibility="visible"
}}}};
c.src=e
}}return false
},lowsource:function(b,c){if(b&&typeof(b.ctrlid)==="string"){if(typeof(c)==="string"&&!b.automode&&!b.zoomin&&!b.zoomout){var a=new Image();
a.onload=function(){b.lowres=a.src;
if(b.trident){a.onload="";
a=null
}delete a
};
a.src=c
}}return false
},info:function(b,a){if(b&&typeof(b.ctrlid)==="string"){if(a&&typeof(a)==="string"){b.infoblock=a
}else{b.infoblock=b.defblock
}}return false
},set:function(b,c,a){if(b&&typeof(b.ctrlid)==="string"){if(c&&typeof(a)==="boolean"){switch(c.toLowerCase()){case"overview":if(a==false&&b.overview==true){shiftzoom.G(b.overid).style.visibility="hidden"
}else{if(a==true&&b.overview==false){if(b.width>b.minwidth||b.height>b.minheight){shiftzoom._setOverview(b);
shiftzoom.G(b.overid).style.visibility="visible"
}else{shiftzoom.G(b.overid).style.visibility="hidden"
}}}b.overview=a;
break;
case"showcoords":if(a==false&&b.showcoords==true){b.onmousemove=null;
shiftzoom.G(b.xycoid).style.visibility="hidden"
}else{if(a==true&&b.showcoords==false){shiftzoom.G(b.xycoid).style.visibility="visible";
b.onmousemove=shiftzoom._showCoords
}}b.showcoords=a;
break;
case"pixelcoords":if(a==false&&b.pixelcoords==true&&b.showcoords==true){b.onmousemove=shiftzoom._showLatLon
}else{if(a==true&&b.pixelcoords==false&&b.showcoords==true){b.onmousemove=shiftzoom._showCoords
}}b.pixelcoords=a;
break;
case"percentcoords":if(a==false&&b.percentcoords==true&&b.showcoords==true){b.onmousemove=shiftzoom._showLatLon
}else{if(a==true&&b.percentcoords==false&&b.showcoords==true){b.onmousemove=shiftzoom._showPercent
}}b.percentcoords=a;
break;
case"buttons":if(a==false&&b.buttons==true){shiftzoom.G(b.ctrlid).style.visibility="hidden";
shiftzoom.G(b.infoid).style.left="0px"
}else{if(a==true&&b.buttons==false){shiftzoom.G(b.infoid).style.left="42px";
shiftzoom.G(b.ctrlid).style.visibility="visible"
}}b.buttons=a;
break;
case"zoomin":if(!b.nozoom&&!b.buttons&&(parseInt(b.style.width)<b.maxwidth||parseInt(b.style.height)<b.maxheight)){if(a==true){b.zoomin=true;
b.zoomout=false;
if(b.gecko){b.style.cursor="-moz-zoom-in"
}else{if(b.webkit){b.style.cursor="-webkit-zoom-in"
}else{if(b.trident){b.style.cursor="url('"+b.curpath+"zoom-in.cur'),move"
}else{b.style.cursor="move"
}}}}else{b.zoomin=false
}}break;
case"zoomout":if(!b.nozoom&&!b.buttons&&(parseInt(b.style.width)>b.minwidth||parseInt(b.style.height)>b.minheight)){if(a==true){b.zoomout=true;
b.zoomin=false;
if(b.gecko){b.style.cursor="-moz-zoom-out"
}else{if(b.webkit){b.style.cursor="-webkit-zoom-out"
}else{if(b.trident){b.style.cursor="url('"+b.curpath+"zoom-out.cur'),move"
}else{b.style.cursor="move"
}}}}else{b.zoomout=false
}}break;
case"nozoom":b.nozoom=a;
break
}}}return false
},get:function(b,e){if(b&&e&&typeof(b.ctrlid)==="string"){if(e.toLowerCase()=="maxzoomx"){return b.xfactor
}else{if(e.toLowerCase()=="maxzoomy"){return b.yfactor
}else{if(e.toLowerCase()=="maxwidth"){return b.maxwidth
}else{if(e.toLowerCase()=="maxheight"){return b.maxheight
}else{if(e.toLowerCase()=="playing"){return b.automode
}else{if(e.toLowerCase()=="currentxyz"){var a=Math.min(Math.max(parseFloat((Math.abs(parseInt(b.style.left))/b.width)*100)+(((b.minwidth/2)/b.width)*100),0),100);
var f=Math.min(Math.max(parseFloat((Math.abs(parseInt(b.style.top))/b.height)*100)+(((b.minheight/2)/b.height)*100),0),100);
var c=Math.min(Math.max(parseFloat(((b.width-b.minwidth)/(b.maxwidth-b.minwidth))*100),0),100);
return{x:a,y:f,z:c}
}}}}}}}return false
},G:function(a){return(document.getElementById(a))
},E:function(a){return(document.createElement(a))
},L:function(b,a){b=b.toUpperCase()||"LOG";
if(window.console){window.console[b.toLowerCase()](a)
}else{if(window.opera){opera.postError(b+": "+a)
}else{window.document.title=b+": "+a
}}return false
},_opts:function(a){if(typeof(a)==="object"){var b=a[0]+","+a[1]+","+a[2]+(a.length>3?","+a[3]:"")+(a.length>4?","+a[4]:"")+(a.length>5?","+a[5]:"")+(a.length>6?","+a[6]:"")+(a.length>7?","+a[7]:"");
return b
}return false
},_next:function(img){if(img&&typeof(img.ctrlid)==="string"){if(img.automode){if(img.autoloop&&img.cpos<(img.step.length-1)){img.cpos=img.cpos+1
}else{if(img.autoloop&&img.cpos>=(img.step.length-1)){img.cpos=0
}else{if(!img.autoloop&&img.cpos<(img.step.length-1)){img.cpos=img.cpos+1
}else{img.cpos=img.step.length
}}}if(img.cpos<img.step.length){eval("shiftzoom.kenburns(shiftzoom.G(img.id),"+shiftzoom._opts(img.step[img.cpos])+");")
}else{shiftzoom.stop(img)
}}}return false
},_setOverview:function(b){var a=shiftzoom.G(b.viewid);
a.style.width=(Math.round((b.ovsfact*b.minwidth)/(b.width/b.minwidth))-(b.bmode?0:2))+"px";
a.style.height=(Math.round((b.ovsfact*b.minheight)/(b.height/b.minheight))-(b.bmode?0:2))+"px";
a.style.left=Math.round((Math.abs(b.left)/(b.width/b.minwidth))*b.ovsfact)-(b.bmode?2:0)+"px";
a.style.top=Math.round((Math.abs(b.top)/(b.height/b.minheight))*b.ovsfact)-(b.bmode?2:0)+"px";
a.maxleft=(b.minwidth*b.ovsfact)-(b.bmode?0:2)-parseInt(a.style.width);
a.maxtop=(b.minheight*b.ovsfact)-(b.bmode?0:2)-parseInt(a.style.height);
return false
},_findPosXY:function(b){var a,c={x:b.offsetLeft,y:b.offsetTop};
if(b.offsetParent){a=shiftzoom._findPosXY(b.offsetParent);
c.x+=a.x;
c.y+=a.y
}return c
},_getMousePos:function(g,e,f,d){var c,a,b={ox:0,oy:0,ex:g,ey:e};
if(self.pageXOffset||self.pageYOffset){c=self.pageXOffset;
if(c>0&&f==g){g-=c
}a=self.pageYOffset;
if(a>0&&d==e){e-=a
}}else{if(document.documentElement){c=document.documentElement.scrollLeft;
a=document.documentElement.scrollTop
}else{if(document.body){c=document.body.scrollLeft;
a=document.body.scrollTop
}}}b.ox=c;
b.oy=a;
b.ex=g;
b.ey=e;
return b
},_showCoords:function(d){if(cvi_szactive!=null){var b,p,l,i,g,f,n=0,j=0,a=shiftzoom.G(cvi_szactive),m=a.width,c=a.height;
d=d?d:window.event;
g=d.clientX;
f=d.clientY;
if(d.pageX||d.pageY){n=d.pageX;
j=d.pageY
}b=shiftzoom._getMousePos(g,f,n,j);
p=shiftzoom._findPosXY(a);
l=Math.min(Math.max(b.ex+b.ox-p.x,0),m);
i=Math.min(Math.max(b.ey+b.oy-p.y,0),c);
shiftzoom.G(a.cposid).innerHTML="<span>x:"+l+" y:"+i+"</span>"
}return false
},_showPercent:function(f){if(cvi_szactive!=null){var b,r,n,l,j,i,g,q=0,m=0,d=!Number.prototype.toFixed?0:1,a=shiftzoom.G(cvi_szactive),p=a.width,c=a.height;
f=f?f:window.event;
i=f.clientX;
g=f.clientY;
if(f.pageX||f.pageY){q=f.pageX;
m=f.pageY
}b=shiftzoom._getMousePos(i,g,q,m);
r=shiftzoom._findPosXY(a);
n=parseFloat((Math.min(Math.max(b.ex+b.ox-r.x,0),p)/p)*100);
n=d?n.toFixed(2):parseInt(n);
l=parseFloat((Math.min(Math.max(b.ey+b.oy-r.y,0),c)/c)*100);
l=d?l.toFixed(2):parseInt(l);
j=parseFloat(((p-a.minwidth)/(a.maxwidth-a.minwidth))*100);
j=d?j.toFixed(2):parseInt(j);
shiftzoom.G(a.cposid).innerHTML="<span>x:"+n+"% y:"+l+"% z:"+j+"%</span>"
}return false
},_showLatLon:function(i){if(cvi_szactive!=null){function f(h,t){var o,e,k;
o=parseInt(h);
e=Math.abs(parseFloat(h-o)*60);
k=Math.abs(parseFloat(parseInt(e)-e)*60);
return Math.abs(o)+"°"+parseInt(e)+"'"+parseInt(k)+"'' "+t
}var c,s,p,m,l,a,j,g,r=0,n=0,b=document.getElementById(cvi_szactive),q=b.width,d=b.height;
i=i?i:window.event;
j=i.clientX;
g=i.clientY;
if(i.pageX||i.pageY){r=i.pageX;
n=i.pageY
}c=shiftzoom._getMousePos(j,g,r,n);
s=shiftzoom._findPosXY(b);
p=Math.min(Math.max(c.ex+c.ox-s.x,0),q);
m=Math.min(Math.max(c.ey+c.oy-s.y,0),d);
a=(p*360/q)-180;
l=90-(m*180/d);
a=f(a,a!=0?(a<0?"W":"E"):"");
l=f(l,l!=0?(l<0?"S":"N"):"");
shiftzoom.G(b.cposid).innerHTML="<span>Lat: "+l+" &bull; Lon: "+a+"</span>"
}return false
},_killTooltip:function(c){var b,a=shiftzoom.G(c);
b=shiftzoom.G(a.ttipid);
if(b){document.getElementsByTagName("body")[0].removeChild(b)
}return false
},_showTooltip:function(f){var d,e,a,b=shiftzoom.G(f);
d=shiftzoom.G(b.ttipid);
if(!d){var c=shiftzoom._findPosXY(b.parentNode);
e=shiftzoom.E("div");
if(b.trident){e.style.backgroundColor="black"
}e.id=b.ttipid;
e.style.height="auto";
e.style.width="auto";
e.style.display="block";
e.style.position="absolute";
e.style.left=(c.x+10)+"px";
e.style.top=c.y+"px";
e.style.visibility="visible";
e.style.border="solid 2px white";
e.style.borderRadius="6px";
e.style.MozBorderRadius="6px";
e.style.KhtmlBorderRadius="6px";
e.style.WebkitBorderRadius="6px";
e.style.boxShadow="0px 0px 8px black";
e.style.MozBoxShadow="0px 0px 8px black";
e.style.WebkitBoxShadow="0px 0px 8px black";
e.style.KhtmlBoxShadow="0px 0px 8px black";
e.style.MozUserSelect="none";
e.style.KhtmlUserSelect="none";
e.unselectable="on";
document.getElementsByTagName("body")[0].appendChild(e);
if(!b.trident){a=shiftzoom.E("div");
a.style.height="100%";
a.style.width="100%";
a.style.left="0px";
a.style.top="0px";
a.style.position="absolute";
a.style.opacity=0.5;
a.style.backgroundColor="black";
a.style.borderRadius="4px";
a.style.MozBorderRadius="4px";
a.style.KhtmlBorderRadius="4px";
a.style.WebkitBorderRadius="4px";
e.appendChild(a)
}a=shiftzoom.E("div");
a.style.display="block";
a.style.left="0px";
a.style.top="0px";
a.style.position="relative";
a.style.textAlign="left";
a.style.verticalAlign="middle";
a.style.color="white";
a.style.fontSize="12px";
a.style.fontFamily="Arial,Helvetica,sans-serif";
a.style.fontStyle="normal";
a.style.fontWeight="bold";
a.style.whiteSpace="nowrap";
a.style.textShadow="black 0px 0px 4px";
a.style.margin="10px";
a.innerHTML=b.infoblock;
e.appendChild(a)
}return false
},_setCursor:function(c,e,f){var b=shiftzoom.G(f);
if(!b.nozoom){var a=shiftzoom.G(e==1?b.zoutid:b.zoinid).style;
b.zoomin=false;
b.zoomout=false;
c.style.border=b.bc;
c.style.borderBottom=b.dc;
c.style.borderRight=b.dc;
a.border=b.bc;
a.borderBottom=b.dc;
a.borderRight=b.dc;
if(e==1&&(parseInt(b.style.width)<b.maxwidth||parseInt(b.style.height)<b.maxheight)){c.style.border=b.bc;
c.style.borderTop=b.dc;
c.style.borderLeft=b.dc;
b.zoomin=true;
if(b.gecko){b.style.cursor="-moz-zoom-in"
}else{if(b.webkit){b.style.cursor="-webkit-zoom-in"
}else{if(b.trident){b.style.cursor="url('"+b.curpath+"zoom-in.cur'),move"
}else{b.style.cursor="move"
}}}}else{if(e==0&&(parseInt(b.style.width)>b.minwidth||parseInt(b.style.height)>b.minheight)){c.style.border=b.bc;
c.style.borderTop=b.dc;
c.style.borderLeft=b.dc;
b.zoomout=true;
if(b.gecko){b.style.cursor="-moz-zoom-out"
}else{if(b.webkit){b.style.cursor="-webkit-zoom-out"
}else{if(b.trident){b.style.cursor="url('"+b.curpath+"zoom-out.cur'),move"
}else{b.style.cursor="move"
}}}}else{b.style.cursor=b.pointer
}}}return false
},_zoomIn:function(a,f,q,n,j,e,b,l,i,k,h,d){if(!d){var p,g,o,m,c=shiftzoom.G(a);
if(parseInt(c.style.width)<c.maxwidth||parseInt(c.style.height)<c.maxheight){clearInterval(cvi_sztimer);
p=Math.max(c.minwidth,Math.min(c.maxwidth,Math.round(j*f/q+n)));
o=Math.round(i*f/q+l);
g=Math.max(c.minheight,Math.min(c.maxheight,Math.round(b*f/q+e)));
m=Math.round(h*f/q+k);
c.style.width=p+"px";
c.style.height=g+"px";
c.style.left=o+"px";
c.style.top=m+"px";
f++;
shiftzoom.G(c.textid).innerHTML=parseInt((p/c.minwidth)*100)+" / "+parseInt(c.xfactor*100)+" %";
cvi_sztimer=setInterval("shiftzoom._zoomIn('"+a+"',"+f+","+q+","+n+","+j+","+e+","+b+","+l+","+i+","+k+","+h+","+d+")",c.millisec)
}else{clearInterval(cvi_sztimer)
}}return false
},_zoomOut:function(k,c,b,l,j,o,r,a,i,n,h,m,p){if(!p){var g,q,f,e,d=shiftzoom.G(k);
if(parseInt(d.style.width)>d.minwidth||parseInt(d.style.height)>d.minheight){clearInterval(cvi_sztimer);
g=Math.max(d.minwidth,Math.min(d.maxwidth,Math.round(o*b/l+j)));
f=Math.round(n*b/l+i);
q=Math.max(d.minheight,Math.min(d.maxheight,Math.round(a*b/l+r)));
e=Math.round(m*b/l+h);
d.style.width=g+"px";
d.style.height=q+"px";
d.style.left=f+"px";
d.style.top=e+"px";
b++;
shiftzoom.G(d.textid).innerHTML=parseInt((g/d.minwidth)*100)+" / "+parseInt(d.xfactor*100)+" %";
cvi_sztimer=setInterval("shiftzoom._zoomOut('"+k+"',"+c+","+b+","+l+","+j+","+o+","+r+","+a+","+i+","+n+","+h+","+m+","+p+")",d.millisec)
}else{clearInterval(cvi_sztimer);
if(d.webkit&&c){shiftzoom._stopZoom()
}}}return false
},_stopZoom:function(){var a,c,b=shiftzoom._shiftzoom;
document.onmouseup=null;
clearInterval(cvi_sztimer);
b.zoomin=false;
b.zoomout=false;
b.left=parseInt(b.style.left);
b.top=parseInt(b.style.top);
b.width=parseInt(b.style.width);
b.height=parseInt(b.style.height);
b.maxleft=b.width-b.minwidth;
b.maxtop=b.height-b.minheight;
if(b.width>b.minwidth||b.height>b.minheight){b.style.cursor="url('"+b.curpath+"grab.cur'),move";
if(b.overview){shiftzoom._setOverview(b);
shiftzoom.G(b.overid).style.visibility="visible"
}}else{b.style.cursor="move";
if(b.overview){shiftzoom.G(b.overid).style.visibility="hidden"
}}c=shiftzoom.G(b.zoinid).style;
c.border=b.bc;
c.borderBottom=b.dc;
c.borderRight=b.dc;
c=shiftzoom.G(b.zoutid).style;
c.border=b.bc;
c.borderBottom=b.dc;
c.borderRight=b.dc;
b.pointer=b.style.cursor;
shiftzoom.G(b.textid).innerHTML=parseInt((b.width/b.minwidth)*100)+" / "+parseInt(b.xfactor*100)+" %";
if(b.lowres&&b.highres){shiftzoom.source(b,b.highres,false,true)
}cvi_sztimer=setInterval("shiftzoom._fadeInfo('"+b.id+"',100)",30);
shiftzoom._shiftzoom=null;
return false
},_catchDrag:function(a){return false
},_catchWheel:function(b){var c,a=0;
b=b?b:window.event;
if(b.wheelDelta){a=b.wheelDelta/120;
c=(a<0?1:0)
}else{if(b.detail){a=-b.detail/3;
c=(a<0?1:0)
}}if(cvi_szactive!=null&&a!=0){cvi_szimage=true;
shiftzoom._initZoom(c,(c==1?2:1),true)
}if(b.preventDefault){b.preventDefault()
}else{b.returnValue=false
}return false
},_catchOver:function(a){cvi_szactive=this.id;
self.focus();
if(this.gecko){window.addEventListener("DOMMouseScroll",shiftzoom._catchWheel,false)
}else{window.onmousewheel=shiftzoom._catchWheel
}document.onkeyup=shiftzoom._upKey;
document.onkeypress=shiftzoom._pressKey;
document.onkeydown=shiftzoom._downKey;
return false
},_catchOut:function(){cvi_szactive=null;
if(this.gecko){window.removeEventListener("DOMMouseScroll",shiftzoom._catchWheel,false)
}else{window.onmousewheel=null
}document.onkeydown=null;
document.onkeypress=null;
document.onkeyup=null;
return false
},_catchKey:function(v){clearInterval(cvi_sztimer);
var z=shiftzoom._shiftzoom=this;
var f=false,q=false,p,h,s,r,l=0,i=0,g=shiftzoom.G(z.infoid).style;
v=v?v:window.event;
if(v.which){q=(v.which==2);
f=(v.which==3)
}else{if(v.button){q=(v.button==4);
f=(v.button==2)
}}if(z.trident){g.filter="alpha(opacity=100)"
}else{g.opacity=1
}g.visibility="hidden";
s=v.clientX;
r=v.clientY;
if(v.pageX||v.pageY){l=v.pageX;
i=v.pageY
}p=shiftzoom._getMousePos(s,r,l,i);
h=shiftzoom._findPosXY(z.parentNode);
z.mouseX=Math.min(Math.max(p.ex+p.ox-h.x,0),z.minwidth);
z.mouseY=Math.min(Math.max(p.ey+p.oy-h.y,0),z.minheight);
if(((v.altKey&&!v.shiftKey)||f||z.zoomout)&&!z.automode&&!z.nozoom&&(z.width>z.minwidth||z.height>z.minheight)){var b,n,u,w,a,m,s,j,r,o;
if(z.gecko){z.style.cursor="-moz-zoom-out"
}else{if(z.webkit){z.style.cursor="-webkit-zoom-out"
}else{if(z.trident){z.style.cursor="url('"+z.curpath+"zoom-out.cur'),move"
}else{z.style.cursor="move"
}}}z.pointer=z.style.cursor;
if(!z.zoomout){b=shiftzoom.G(z.zoutid).style;
b.border=z.bc;
b.borderLeft=z.dc;
b.borderTop=z.dc;
z.zoomout=true
}n=z.width;
u=(z.width-z.minwidth)*-1;
w=z.height;
a=(z.height-z.minheight)*-1;
m=parseInt(z.style.left);
s=m*-1;
j=parseInt(z.style.top);
r=j*-1;
o=Math.max(1,Math.round((z.width/z.minwidth)*3));
document.onmouseup=shiftzoom._stopZoom;
g.visibility="visible";
if(z.lowres&&z.highres){shiftzoom.source(z,z.lowres,false,true)
}cvi_sztimer=setInterval("shiftzoom._zoomOut('"+z.id+"',"+f+","+(z.webkit&&f?1:0)+","+o+","+n+","+u+","+w+","+a+","+m+","+s+","+j+","+r+","+z.nozoom+")",z.millisec)
}else{if(((!v.altKey&&v.shiftKey)||q||z.zoomin)&&!z.automode&&!z.nozoom&&(z.width<z.maxwidth||z.height<z.maxheight)){var b,n,u,w,a,m,s,j,r,o;
if(z.gecko){z.style.cursor="-moz-zoom-in"
}else{if(z.webkit){z.style.cursor="-webkit-zoom-in"
}else{if(z.trident){z.style.cursor="url('"+z.curpath+"zoom-in.cur'),move"
}else{z.style.cursor="move"
}}}z.pointer=z.style.cursor;
if(!z.zoomin){b=shiftzoom.G(z.zoinid).style;
b.border=z.bc;
b.borderLeft=z.dc;
b.borderTop=z.dc;
z.zoomin=true
}n=z.width;
u=z.maxwidth-z.width;
w=z.height;
a=z.maxheight-z.height;
m=parseInt(z.style.left);
j=parseInt(z.style.top);
s=Math.max(0,Math.min(u,Math.round(((z.mouseX-m)*(z.maxwidth/z.width))-(z.minwidth*0.5)+m)))*-1;
r=Math.max(0,Math.min(a,Math.round(((z.mouseY-j)*(z.maxheight/z.height))-(z.minheight*0.5)+j)))*-1;
o=Math.max(1,Math.round((z.maxwidth/z.width)*3));
document.onmouseup=shiftzoom._stopZoom;
g.visibility="visible";
if(z.lowres&&z.highres){shiftzoom.source(z,z.lowres,false,true)
}cvi_sztimer=setInterval("shiftzoom._zoomIn('"+z.id+"',0,"+o+","+n+","+u+","+w+","+a+","+m+","+s+","+j+","+r+","+z.nozoom+")",z.millisec)
}else{if(z.width>z.minwidth||z.height>z.minheight){if(z.automode){shiftzoom.stop(z)
}if(z.gecko){z.style.cursor="-moz-grabbing"
}else{z.style.cursor="url('"+z.curpath+"grabbing.cur'),move"
}var d=parseInt(z.style.left),c=parseInt(z.style.top);
z.mouseX=v.clientX;
z.mouseY=v.clientY;
document.onmousemove=shiftzoom._whilePan;
document.onmouseup=shiftzoom._stopPan
}}}return false
},_downKey:function(j){if(cvi_szactive!=null){j=j?j:window.event;
var d=(j.keyCode?j.keyCode:j.which),r=j.shiftKey,m=j.altKey,p=false,b=37,l=38,o=39,f=40,h=36,i=35,c=34,g=33,q=187,n=189;
switch(d){case b:cvi_szimage=true;
shiftzoom._panKey(8,0,r,m);
break;
case o:cvi_szimage=true;
shiftzoom._panKey(-8,0,r,m);
break;
case l:cvi_szimage=true;
shiftzoom._panKey(0,8,r,m);
break;
case f:cvi_szimage=true;
shiftzoom._panKey(0,-8,r,m);
break;
case h:if(cvi_szimage==null){cvi_szimage=true;
shiftzoom._initZoom(0,1,p)
}break;
case i:if(cvi_szimage==null){cvi_szimage=true;
shiftzoom._initZoom(1,1,p)
}break;
case n:case g:if(cvi_szimage==null){cvi_szimage=true;
shiftzoom._initZoom(0,4,p)
}break;
case q:case c:if(cvi_szimage==null){cvi_szimage=true;
shiftzoom._initZoom(1,4,p)
}break
}}return false
},_pressKey:function(a){return false
},_upKey:function(){if(cvi_szactive!=null){cvi_szimage=null
}return false
},_initZoom:function(g,m,k){var l,h,c,a,j,f,i,e,n,b=shiftzoom.G(cvi_szactive);
if(b.automode){shiftzoom.stop(b)
}if(g==0&&!b.nozoom&&(parseInt(b.style.width)>b.minwidth||parseInt(b.style.height)>b.minheight)){if(b.gecko){b.style.cursor="-moz-zoom-out"
}else{if(b.webkit){b.style.cursor="-webkit-zoom-out"
}else{if(b.trident){b.style.cursor="url('"+b.curpath+"zoom-out.cur'),move"
}else{b.style.cursor="move"
}}}b.pointer=b.style.cursor;
l=b.width;
h=(b.width-b.minwidth)*-1;
c=b.height;
a=(b.height-b.minheight)*-1;
j=parseInt(b.style.left);
f=j*-1;
i=parseInt(b.style.top);
e=i*-1;
n=Math.max(1,Math.round((b.width/b.minwidth)*m));
if(b.lowres&&b.highres){shiftzoom.source(b,b.lowres,false,true)
}shiftzoom._zoomKey(g,(k?1:0),k,n,l,h,c,a,j,f,i,e,b.nozoom)
}else{if(g==1&&!b.nozoom&&(parseInt(b.style.width)<b.maxwidth||parseInt(b.style.height)<b.maxheight)){if(b.gecko){b.style.cursor="-moz-zoom-in"
}else{if(b.webkit){b.style.cursor="-webkit-zoom-in"
}else{if(b.trident){b.style.cursor="url('"+b.curpath+"zoom-in.cur'),move"
}else{b.style.cursor="move"
}}}b.pointer=b.style.cursor;
l=b.width;
h=b.maxwidth-b.width;
c=b.height;
a=b.maxheight-b.height;
j=parseInt(b.style.left);
i=parseInt(b.style.top);
f=Math.max(0,Math.min(h,Math.round((((b.minwidth/2)-j)*(b.maxwidth/b.width))-(b.minwidth*0.5)+j)))*-1;
e=Math.max(0,Math.min(a,Math.round((((b.minheight/2)-i)*(b.maxheight/b.height))-(b.minheight*0.5)+i)))*-1;
n=Math.max(1,Math.round((b.maxwidth/b.width)*m));
if(b.lowres&&b.highres){shiftzoom.source(b,b.lowres,false,true)
}shiftzoom._zoomKey(g,(k?1:0),k,n,l,h,c,a,j,f,i,e,b.nozoom)
}}return false
},_zoomKey:function(q,c,t,l,k,o,s,b,j,n,i,m,p){if(cvi_szactive!=null&&!p){var e,h,r,g,f,u=shiftzoom.G(cvi_szactive);
if(!u.automode&&!u.zoomout&&!u.zoomin){function a(){if(u.lowres&&u.highres){shiftzoom.source(u,u.highres,false,true)
}if(u.width>u.minwidth||u.height>u.minheight){if(u.trident){u.style.cursor="url('"+u.curpath+"grab.cur'),move"
}else{u.style.cursor="move"
}if(u.overview){shiftzoom._setOverview(u);
shiftzoom.G(u.overid).style.visibility="visible"
}}else{u.style.cursor="move";
if(u.overview){shiftzoom.G(u.overid).style.visibility="hidden"
}}u.pointer=u.style.cursor;
shiftzoom.G(u.infoid).style.visibility="hidden"
}if(q==0&&(parseInt(u.style.width)>u.minwidth||parseInt(u.style.height)>u.minheight)){h=Math.max(u.minwidth,Math.min(u.maxwidth,Math.round(o*c/l+k)));
g=Math.round(n*c/l+j);
r=Math.max(u.minheight,Math.min(u.maxheight,Math.round(b*c/l+s)));
f=Math.round(m*c/l+i);
shiftzoom.G(u.infoid).style.visibility="visible";
shiftzoom.G(u.textid).innerHTML=parseInt((h/u.minwidth)*100)+" / "+parseInt(u.xfactor*100)+" %";
u.style.width=h+"px";
u.style.height=r+"px";
u.style.left=g+"px";
u.style.top=f+"px";
u.width=h;
u.height=r;
u.left=g;
u.top=f;
u.maxleft=u.width-u.minwidth;
u.maxtop=u.height-u.minheight;
c++;
if((cvi_szimage||t)&&(u.width>u.minwidth||u.height>u.minheight)){if(!t){setTimeout("shiftzoom._zoomKey("+q+","+c+","+t+","+l+","+k+","+o+","+s+","+b+","+j+","+n+","+i+","+m+","+p+")",50)
}else{a();
if(cvi_szactive!=null){cvi_szimage=null
}}}else{a()
}}else{if(q==1&&(parseInt(u.style.width)<u.maxwidth||parseInt(u.style.height)<u.maxheight)){h=Math.max(u.minwidth,Math.min(u.maxwidth,Math.round(o*c/l+k)));
g=Math.round(n*c/l+j);
r=Math.max(u.minheight,Math.min(u.maxheight,Math.round(b*c/l+s)));
f=Math.round(m*c/l+i);
shiftzoom.G(u.infoid).style.visibility="visible";
shiftzoom.G(u.textid).innerHTML=parseInt((h/u.minwidth)*100)+" / "+parseInt(u.xfactor*100)+" %";
u.style.width=h+"px";
u.style.height=r+"px";
u.style.left=g+"px";
u.style.top=f+"px";
u.width=h;
u.height=r;
u.left=g;
u.top=f;
u.maxleft=u.width-u.minwidth;
u.maxtop=u.height-u.minheight;
c++;
if((cvi_szimage||t)&&(u.width<u.maxwidth||u.height<u.maxheight)){if(!t){setTimeout("shiftzoom._zoomKey("+q+","+c+","+t+","+l+","+k+","+o+","+s+","+b+","+j+","+n+","+i+","+m+","+p+")",50)
}else{a();
if(cvi_szactive!=null){cvi_szimage=null
}}}else{a()
}}else{a()
}}}}return false
},_panKey:function(i,f,g,d){if(cvi_szactive!=null){var e=shiftzoom.G(cvi_szactive);
if(e.automode){shiftzoom.stop(e)
}if(!e.automode&&(e.width>e.minwidth||e.height>e.minheight)){var b=Math.max(0,Math.min(e.maxleft,Math.abs(parseInt(e.style.left))-(g?4*i:d?i/4:i)));
var j=Math.max(0,Math.min(e.maxtop,Math.abs(parseInt(e.style.top))-(g?4*f:d?f/4:f)));
e.style.left=(b*-1)+"px";
e.style.top=(j*-1)+"px";
e.left=(b*-1);
e.top=(j*-1);
if(e.overview){var c=shiftzoom.G(e.viewid).style;
c.left=Math.round((Math.abs(parseInt(e.style.left))/(e.width/e.minwidth))*e.ovsfact)-(e.bmode?2:0)+"px";
c.top=Math.round((Math.abs(parseInt(e.style.top))/(e.height/e.minheight))*e.ovsfact)-(e.bmode?2:0)+"px"
}if(cvi_szimage){setTimeout("shiftzoom._panKey("+i+","+f+","+g+","+d+")",50)
}}}return false
},_fadeImage:function(c,b){var a=shiftzoom.G(c);
if(b<=100){if(a.trident){a.style.filter="alpha(opacity="+b+")"
}else{a.style.opacity=b/100
}b+=10;
window.setTimeout("shiftzoom._fadeImage('"+c+"',"+b+")",30)
}else{if(a.buttons){shiftzoom.G(a.ctrlid).style.visibility="visible"
}if(a.showcoords){shiftzoom.G(a.xycoid).style.visibility="visible"
}if(a.special&&(a.width>a.minwidth||a.height>a.minheight)){a.overview=true;
a.special=false;
shiftzoom._setOverview(a);
shiftzoom.G(a.overid).style.visibility="visible"
}}return false
},_fadeInfo:function(d,c){clearInterval(cvi_sztimer);
var a=shiftzoom.G(d),b=shiftzoom.G(a.infoid);
if(c>0&&cvi_szactive==a.id&&!a.zoomin&&!a.zoomout){if(a.trident){b.style.filter="alpha(opacity="+c+")"
}else{b.style.opacity=c/100
}c-=5;
cvi_sztimer=setInterval("shiftzoom._fadeInfo('"+d+"',"+c+")",50)
}else{if(a.trident){b.style.filter="alpha(opacity=100)"
}else{b.style.opacity=1
}b.style.visibility="hidden"
}return false
},_fadeOut:function(c,b){var a=shiftzoom.G(c);
if(b>0){if(a.trident){a.style.filter="alpha(opacity="+b+")"
}else{a.style.opacity=b/100
}b-=10;
window.setTimeout("shiftzoom._fadeOut('"+c+"',"+b+")",30)
}else{a.src=shiftzoom.G(a.isrcid).src;
shiftzoom.G(a.tumbid).src=a.src;
a.style.msInterpolationMode=a.bicubic;
shiftzoom.G(a.isrcid).src=a.trident?null:null;
if(a.highres!=a.src){a.highres=a.src
}shiftzoom._fadeIn(c,0)
}return false
},_fadeIn:function(c,b){var a=shiftzoom.G(c);
if(b<=100){if(a.trident){a.style.filter="alpha(opacity="+b+")"
}else{a.style.opacity=b/100
}b+=10;
window.setTimeout("shiftzoom._fadeIn('"+c+"',"+b+")",30)
}else{if(a.buttons){shiftzoom.G(a.ctrlid).style.visibility="visible"
}if(a.overview&&(a.width>a.minwidth||a.height>a.minheight)){shiftzoom.G(a.overid).style.visibility="visible"
}if(a.showcoords){shiftzoom.G(a.xycoid).style.visibility="visible"
}}return false
},_whilePan:function(c){var b=shiftzoom._shiftzoom;
c=c?c:window.event;
var a=Math.max(0,Math.min(b.maxleft,Math.abs(parseInt(b.style.left))-(c.clientX-b.mouseX)));
var d=Math.max(0,Math.min(b.maxtop,Math.abs(parseInt(b.style.top))-(c.clientY-b.mouseY)));
b.style.left=(a*-1)+"px";
b.style.top=(d*-1)+"px";
b.left=(a*-1);
b.top=(d*-1);
b.mouseX=c.clientX;
b.mouseY=c.clientY;
return false
},_stopPan:function(){var a,c,b=shiftzoom._shiftzoom;
document.onmousemove=null;
document.onmouseup=null;
b.style.cursor="url('"+b.curpath+"grab.cur'),move";
if(b.overview){a=shiftzoom.G(b.viewid).style;
a.left=Math.round((Math.abs(parseInt(b.style.left))/(b.width/b.minwidth))*b.ovsfact)-(b.bmode?2:0)+"px";
a.top=Math.round((Math.abs(parseInt(b.style.top))/(b.height/b.minheight))*b.ovsfact)-(b.bmode?2:0)+"px"
}if(b.trident){b.style.cursor="url('"+b.curpath+"grab.cur')"
}shiftzoom._shiftzoom=null;
return false
},_startMove:function(d){if(!d){d=window.event;
var b=d.srcElement
}else{var b=d.target
}var a=parseInt(b.style.left),c=parseInt(b.style.top);
cvi_szimage="imagezoom";
b.style.cursor="default";
b.mouseX=d.clientX;
b.mouseY=d.clientY;
document.onmousemove=shiftzoom._whileMove;
document.onmouseup=shiftzoom._stopMove;
return false
},_whileMove:function(h){if(!h){h=window.event;
var c=h.srcElement
}else{var c=h.target
}var f=c.id.split("_"),d=shiftzoom.G(cvi_szimage);
if(c&&f[f.length-1]=="view"&&c.maxleft&&c.maxtop){var b=Math.max(0,Math.min(c.maxleft,Math.abs(parseInt(c.style.left))+(h.clientX-c.mouseX)));
var g=Math.max(0,Math.min(c.maxtop,Math.abs(parseInt(c.style.top))+(h.clientY-c.mouseY)));
c.style.left=(b-(d.bmode?2:0))+"px";
c.style.top=(g-(d.bmode?2:0))+"px";
c.mouseX=h.clientX;
c.mouseY=h.clientY;
var a=Math.max(0,Math.min(d.maxleft,Math.abs(b*(d.width/d.minwidth)*(1/d.ovsfact))));
var i=Math.max(0,Math.min(d.maxtop,Math.abs(g*(d.height/d.minheight)*(1/d.ovsfact))));
d.style.left=(a*-1)+"px";
d.style.top=(i*-1)+"px";
d.left=(a*-1);
d.top=(i*-1)
}else{document.onmousemove=null;
document.onmouseup=null;
d.onmousedown=shiftzoom._catchKey;
cvi_szimage=null
}return false
},_stopMove:function(){document.onmousemove=null;
document.onmouseup=null;
shiftzoom.G(cvi_szimage).onmousedown=shiftzoom._catchKey;
cvi_szimage=null;
return false
}};
