/*
 * imgpw by wagx(www.PaintingHere.com)
 * Jun 28, 2008
 */
var imgpwClass=function(){this._obj=null;this.followToScroll=false;this.viewer_bgcolor="#555555";var F=null,B,H,_,G,E,C,D,A=0,$=0;this.viewit=function($){document.getElementById("viewerArea").innerHTML='<img src="/images/viewer.gif" id="myviewer" onmousemove="imgpw.vv(event)" style="background-repeat:no-repeat;background-position:2000px 2000px;position:absolute;cursor:url(/images/zoomin.cur),default;">';F=document.getElementById("myviewer");B=this._obj;C=B.src;F.style.backgroundImage="url("+C+")";F.style.backgroundColor=this.viewer_bgcolor;document.getElementById("slBgArea").innerHTML='<img id="lBgArea" style="position:absolute; left:-2000px; top:-2000px;" src="'+C+'">';D=document.getElementById("lBgArea");H=parseInt(B.style.left)-5;_=parseInt(B.style.top)-5;G=B.width+10;E=B.height+10;this.vv($)};this.vv=function(J){if(F.style.display=="none")F.style.display="block";if(this.followToScroll){A=parseInt(document.body.scrollLeft);$=parseInt(document.body.scrollTop)}var C=J.x?J.x:J.pageX-getElementLeft(this._obj),I=J.y?J.y:J.pageY-getElementTop(this._obj);F.style.left=C+A-parseInt(F.width)/2+"px";F.style.top=I+$-parseInt(F.height)/2+"px";if(C<H||I<_||C>(H+G)||I>(_+E)){F.style.display="none";return}Nx=parseInt(D.width)/parseInt(B.width);bgx=(-1)*(Nx-1)*(C-parseInt(B.style.left)+A)-parseInt(F.style.left)+parseInt(B.style.left);Ny=parseInt(D.height)/parseInt(B.height);bgy=(-1)*(Ny-1)*(I-parseInt(B.style.top)+$)-parseInt(F.style.top)+parseInt(B.style.top);F.style.backgroundPosition=bgx+"px "+bgy+"px"}};function getElementLeft($){return($==null)?0:($.offsetLeft+getElementLeft($.offsetParent))}function getElementTop($){return($==null)?0:($.offsetTop+getElementTop($.offsetParent))}