var reimg_version=0.000009;document.writeln('<style type="text/css" media="screen, projection"><!--');document.writeln(".reimg { width: 1px; height: 1px; visibility: hidden; }");if(window.reimg_maxWidth){document.writeln(".reimg-width { width: "+reimg_maxWidth+"px; height: auto; vertical-align: top; }");if(window.reimg_swapPortrait){document.writeln(".reimg-width-portrait { width: auto; height: "+reimg_maxWidth+"px; }")}}if(window.reimg_maxHeight){document.writeln(".reimg-height { width: auto; height: "+reimg_maxHeight+"px; }");if(window.reimg_swapPortrait){document.writeln(".reimg-height-portrait { width: "+reimg_maxHeight+"px; height: auto; }")}}if(window.reimg_relWidth){document.writeln(".reimg-rel { width: "+reimg_relWidth+"%; height: auto; }")}if(window.reimg_zoomImg){document.writeln("span.reimg-zoom { position: absolute; margin: 1px; }");document.writeln("img.reimg-zoom { border: none !important; cursor: pointer !important;"+(window.reimg_zoomStyle?" "+reimg_zoomStyle:"")+" }");if(window.reimg_zoomHover){document.writeln("img.reimg-zoom:hover { "+reimg_zoomHover+" }")}}document.write("--></style>");var reimg_zoomLink=null;var reimg_realSize=new Array();function reimg_zoomIn(d){if(!d){d=window.event}target=this;if(d){if(target==window){target=d.target?d.target:d.srcElement}if(typeof(d.stopPropagation)!="undefined"){d.stopPropagation()}else{d.cancelBubble=true}}if(!target){return false}if(!reimg_zoomLink){reimg_zoomLink=document.createElement("a");reimg_zoomLink.style.display="none";if(window.reimg_zoomTarget=="_blank"){try{reimg_zoomLink.target="_blank"}catch(c){}}document.body.appendChild(reimg_zoomLink)}reimg_zoomLink.href=target.parentNode.nextSibling.src;if(window.reimg_zoomTarget=="_blank"){if(reimg_zoomLink.target&&typeof(reimg_zoomLink.click)!="undefined"){reimg_zoomLink.click()}else{window.open(reimg_zoomLink.href)}}else{if(window.reimg_zoomTarget=="_litebox"&&window.litebox_version){var b,a;if(reimg_realSize[reimg_zoomLink.href]){b=reimg_realSize[reimg_zoomLink.href][0];a=reimg_realSize[reimg_zoomLink.href][1]}else{b=target.parentNode.nextSibling.width;a=target.parentNode.nextSibling.height}litebox_show(reimg_zoomLink.href,b,a,window.reimg_zoomLevel)}else{if(window.reimg_zoomTarget=="_highslide"){return hs.expand(reimg_zoomLink)}else{if(!window.exturl_version||exturl(reimg_zoomLink)){window.location.href=reimg_zoomLink.href}}}}return false}function reimg_resize(f,k,h,i){if(!f){return}if(f.readyState=="complete"&&f.complete&&!i){return}if(i&&(!k||!h)&&f.src&&reimg_realSize[f.src]&&reimg_realSize[f.src].length>=3&&reimg_realSize[f.src][2]){k=reimg_realSize[f.src][0];h=reimg_realSize[f.src][1]}var l=window.reimg_maxWidth,m=window.reimg_maxHeight,e=0;if(window.reimg_relWidth&&!k&&!h){var a=document.createElement("div");a.style.width=reimg_relWidth+"%";a.style.height="1px";a.style.visibility="hidden";f.parentNode.insertBefore(a,f);e=a.offsetWidth;f.parentNode.removeChild(a)}f.style.visibility="hidden";var g=f.className;if(g){f.className=g.replace(/(^|.*\s)reimg(\s+(.*)|$)/,"$1$3")}var b=f.width,n=f.height;if(!(b&&n)){if(!i){if(k&&h&&f.src&&!reimg_realSize[f.src]){reimg_realSize[f.src]=[k,h,true]}if(g){f.className=g}}f.style.visibility="";return}if(f.src&&window.reimg_zoomTarget=="_litebox"&&!reimg_realSize[f.src]){if(k&&!h){h=Math.round(k/(b/n))}else{if(h&&!k){k=Math.round(h/(n/b))}}if(k&&h){reimg_realSize[f.src]=[k,h,true]}else{reimg_realSize[f.src]=[b,n]}}var c;if(window.reimg_swapPortrait&&n>b){c=true;b=f.height;n=f.width}else{c=false}var d=false;if(e){f.style.width=reimg_relWidth+"%";if(!window.opera||window.litebox_opera>=9.5){if(f.offsetWidth&&f.offsetWidth>e){d=true}}else{d=true}f.style.width="";if(!l||e<l){l=e}else{e=0}}if(window.reimg_swapPortrait&&l&&m&&m>l){l+=m;m=l-reimg_maxHeight;l-=m}g="";if(l&&b>l){n=Math.round(n/(b/l));b=l;if(n&&m&&n>m){b=Math.round(b/(n/m));n=m;g="reimg-both";e=0}else{if(d){g="reimg-rel-force";e=0}else{g="reimg-"+(e?"rel":"width")+(c?"-portrait":"")}}}else{if(m&&n>m){b=Math.round(b/(n/m));n=m;if(b&&l&&b>l){n=Math.round(n/(b/l));b=l;g="reimg-both"}else{if(d){g="reimg-rel-force"}else{g="reimg-height"+(c?"-portrait":"")}}e=0}}if(c){b+=n;n=b-n;b-=n}if(!(g||(k&&k>b)||(h&&h>n))){f.style.visibility="";return}if(!k){k=f.width}if(!h){h=f.height}if(e){f.style.maxWidth=((window.reimg_maxWidth&&reimg_maxWidth<f.width)?reimg_maxWidth:k)+"px"}if(g){if(f.style.width){f.style.width=""}if(f.style.height){f.style.height=""}f.className=(f.className?f.className+" ":"")+g}f.width=b;f.height=n;f.style.visibility="";if(window.reimg_zoomImg){if(f.previousSibling&&(!f.previousSibling.tagName||f.previousSibling.tagName.toLowerCase()!="br")){var p=document.createElement("br");f.parentNode.insertBefore(p,f)}var j=document.createElement("span");var o=document.createElement("img");o.src=reimg_zoomImg;if(window.reimg_zoomAlt){o.alt=o.title=reimg_zoomAlt.replace(/%1\$d/,k).replace(/%2\$d/,h)}else{o.alt=""}o.className=j.className="reimg-zoom";o.onclick=reimg_zoomIn;j.appendChild(o);f.parentNode.insertBefore(j,f)}if(window.litebox_version&&litebox_background&&litebox_background.style.display!="none"){litebox_calc()}}function reimg_onLoad(b){var a=document.getElementsByTagName("img");if(!a){return true}for(var c=0;c<a.length;c++){if(!a[c].className.match(/(^|\s)reimg(\s|$)/)){continue}reimg_resize(a[c],null,null,true)}return true}if(window.onload_functions){onload_functions[onload_functions.length]="reimg_onLoad();"}else{if(typeof(window.addEventListener)!="undefined"){window.addEventListener("load",reimg_onLoad,false)}else{if(typeof(window.attachEvent)!="undefined"){window.attachEvent("onload",reimg_onLoad)}}};
