/**
* Resize too large images
* (c) Tale 2008
* http://www.taletn.com/
*/
var reimg_version=0.000008;document.writeln('');function reimg_unhide(img){if(img.className)img.className=img.className.replace(/(^|.*\s)reimg(\s+(.*)|$)/,'$1$3');}var reimg_zoomLink=null;var reimg_orgSize=new Array();function reimg_zoomIn(e){if(!e)e=window.event;target=this;if(e){if(target==window)target=e.target?e.target:e.srcElement;if(typeof(e.stopPropagation)!="undefined")e.stopPropagation();else e.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(err){}}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 width,height;if(reimg_orgSize[reimg_zoomLink.href]){width=reimg_orgSize[reimg_zoomLink.href][0];height=reimg_orgSize[reimg_zoomLink.href][1];}else{width=target.parentNode.nextSibling.width;height=target.parentNode.nextSibling.height;}litebox_show(reimg_zoomLink.href,width,height,window.reimg_zoomLevel);}else{if(!window.exturl_version||exturl(reimg_zoomLink))window.location.href=reimg_zoomLink.href;}return false;}function reimg_resize(img,orgWidth,orgHeight,safetyNet){if(!img)return;if(img.readyState=="complete"&&img.complete&&!safetyNet)return;var maxWidth=window.reimg_maxWidth,maxHeight=window.reimg_maxHeight,relWidth=0;if(window.reimg_relWidth&&!orgWidth&&!orgHeight){var div=document.createElement("div");div.style.width=reimg_relWidth+"%";div.style.height="1px";img.parentNode.insertBefore(div,img);relWidth=div.offsetWidth;img.parentNode.removeChild(div);}reimg_unhide(img);var width=img.width,height=img.height;if(!(width&&height)){if(!safetyNet)img.className=(img.className?img.className+" ":"")+"reimg";return;}if(window.reimg_zoomTarget=="_litebox"&&!reimg_orgSize[img.src]){if(orgWidth&&!orgHeight)orgHeight=Math.round(orgWidth/(width/height));else if(orgHeight&&!orgWidth)orgWidth=Math.round(orgHeight/(height/width));if(orgWidth&&orgHeight)reimg_orgSize[img.src]=[orgWidth,orgHeight];else reimg_orgSize[img.src]=[width,height];}var swap=false;if(window.reimg_swapPortrait&&height>width){swap=true;width=img.height;height=img.width;}var relForce=false;if(relWidth){img.style.width=reimg_relWidth+"%";if(!window.opera){if(img.offsetWidth&&img.offsetWidth>relWidth)relForce=true;}else relForce=true;img.style.width="";if(!maxWidth||relWidthmaxWidth){maxWidth+=maxHeight;maxHeight=maxWidth-reimg_maxHeight;maxWidth-=maxHeight;}var className="";if(maxWidth&&width>maxWidth){height=Math.round(height/(width/maxWidth));width=maxWidth;if(height&&maxHeight&&height>maxHeight){width=Math.round(width/(height/maxHeight));height=maxHeight;className="reimg-both";relWidth=0;}else if(relForce){className="reimg-rel-force";relWidth=0;}else className="reimg-"+(relWidth?"rel":"width")+(swap?"-portrait":"");}else if(maxHeight&&height>maxHeight){width=Math.round(width/(height/maxHeight));height=maxHeight;if(width&&maxWidth&&width>maxWidth){height=Math.round(height/(width/maxWidth));width=maxWidth;className="reimg-both";}else if(relForce)className="reimg-rel-force";else className="reimg-height"+(swap?"-portrait":"");relWidth=0;}if(swap){width+=height;height=width-height;width-=height;}if(!className&&(!orgWidth||width>=orgWidth)&&(!orgHeight||height>=orgHeight))return;if(!orgWidth)orgWidth=img.width;if(!orgHeight)orgHeight=img.height;if(relWidth)img.style.maxWidth=((window.reimg_maxWidth&&reimg_maxWidth