function SeekLayer(a,b){for(var c,d=0;d<a.layers.length;d++){if(a.layers[d].name==b){c=a.layers[d];break}if(a.layers[d].document.layers.length>0)c=SeekLayer(document.layers[d].document,b)}return c}function GetRawObject(a){var b;if(typeof a=="string"){var c=document.body&&document.body.style?true:false;if(c&&document.getElementById)b=document.getElementById(a);else if(c&&document.all)b=document.all(a);else if(document.layers)b=SeekLayer(document,a)}else b=a;return b}
function GetInsideWindowSize(){if(window.innerWidth)return{x:window.innerWidth,y:window.innerHeight};else if(document.compatMode&&document.compatMode.indexOf("CSS1")>=0)return{x:document.body.parentNode.clientWidth,y:document.body.parentNode.clientHeight};else if(document.body&&document.body.clientWidth)return{x:document.body.clientWidth,y:document.body.clientHeight};return{x:0,y:0}}
function GetObjectPadding(a){a=GetRawObject(a);var b=0,c=0,d=0,e=0;if(a.currentStyle){if(a.currentStyle.paddingLeft)b=parseInt(a.currentStyle.paddingLeft,10);if(a.currentStyle.paddingRight)c=parseInt(a.currentStyle.paddingRight,10);if(a.currentStyle.paddingTop)d=parseInt(a.currentStyle.paddingTop,10);if(a.currentStyle.paddingBottom)e=parseInt(a.currentStyle.paddingBottom,10)}else if(window.getComputedStyle){b=parseInt(window.getComputedStyle(a,null).paddingLeft,10);c=parseInt(window.getComputedStyle(a,
null).paddingRight,10);d=parseInt(window.getComputedStyle(a,null).paddingTop,10);e=parseInt(window.getComputedStyle(a,null).paddingBottom,10)}if(isNaN(b)==true)b=0;if(isNaN(c)==true)c=0;if(isNaN(d)==true)d=0;if(isNaN(e)==true)e=0;return{l:b,r:c,t:d,b:e}}
function GetObjectSize(a){var b=GetRawObject(a);var c=a=0;if(b.offsetWidth){a=b.offsetWidth;c=b.offsetHeight}else if(b.clip&&b.clip.width){a=b.clip.width;c=b.clip.height}else if(b.style&&b.style.pixelWidth){a=b.style.pixelWidth;c=b.style.pixelHeight}a=parseInt(a,10);c=parseInt(c,10);b=GetObjectPadding(b);a-=b.l+b.r;c-=b.t+b.b;return{w:a,h:c}}
function GetElementPosition(a){var b=GetRawObject(a);var c=a=0;c=GetObjectPadding(b);a=c.l;c=c.t;if(b.offsetParent){a+=b.offsetLeft;c+=b.offsetTop;for(b=b.offsetParent;b;){a+=b.offsetLeft;c+=b.offsetTop;var d=b.tagName.toLowerCase();if(d!="table"&&d!="body"&&d!="html"&&d!="div"&&b.clientTop&&b.clientLeft){a+=b.clientLeft;c+=b.clientTop}b=b.offsetParent}}else if(b.left&&b.top){a=b.left;c=b.top}else{if(b.x)a=b.x;if(b.y)c=b.y}return{x:a,y:c}}
function GetScrollOffset(){if(window.pageYOffset)return{x:window.pageXOffset,y:window.pageYOffset};else if(document.compatMode&&document.compatMode.indexOf("CSS1")>=0)return{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop};else if(document.body&&document.body.clientWidth)return{x:document.body.scrollLeft,y:document.body.scrollTop};return{x:0,y:0}}function CreateRandomId(){for(var a=0;a==0;)a=Math.random();a=a+"";return"id"+a.substr(2)}
function MouseMoveRevert(a){if(pbMouseMoveRevert!=null&&pbMouseMoveRevert.length!=0){var b=a?a:window.event;a={x:0,y:0};if(b.pageX||b.pageY){a.x=b.pageX;a.y=b.pageY}else if(b.clientX||b.clientY){var c=GetScrollOffset();a.x=b.clientX+c.x;a.y=b.clientY+c.y}for(b=0;b<pbMouseMoveRevert.length;){if(pbMouseMoveRevert[b]!=null){c=pbMouseMoveRevert[b].id;if(typeof popBox[c]!="undefined"&&popBox[c]!=null&&popBox[c].hTarg!=0)if(a.x<popBox[c].xTarg||a.x>popBox[c].xTarg+popBox[c].wTarg||a.y<popBox[c].yTarg||
a.y>popBox[c].yTarg+popBox[c].hTarg){var d=pbMouseMoveRevert[b].className;pbMouseMoveRevert.splice(b,1);Revert(c,null,d);continue}}b++}}}var popBox=[],popBoxZ=100,pbSrc=[],pbPopBarFunc=[],pbMouseMoveRevert=null;if(typeof window.onload=="function"){var func=window.onload;window.onload=function(){func();InitPbSrc();InitPbPopBar()}}else window.onload=function(){InitPbSrc();InitPbPopBar()};
function InitPbSrc(){var a=null;if(document.body)if(document.body.getElementsByTagName)a=document.body.getElementsByTagName("img");else if(document.body.all)a=document.body.all.tags("img");if(a!=null)for(var b=0;b<a.length;b++){var c=a[b].getAttribute("pbSrc");if(c!=null){if(a[b].id=="")a[b].id=CreateRandomId();if(pbSrc[a[b].id]==null){pbSrc[a[b].id]=new Image;pbSrc[a[b].id].src=c}}}}
function InitPbPopBar(){var a=null;if(document.body)if(document.body.getElementsByTagName)a=document.body.getElementsByTagName("img");else if(document.body.all)a=document.body.all.tags("img");if(a!=null){for(var b=[],c=0;c<a.length;c++){if(a[c].id=="")a[c].id=CreateRandomId();b[c]=a[c]}for(c=0;c<b.length;c++)CreatePopBar(b[c])}}
function InitPopBox(a){a=GetRawObject(a);if(typeof popBox[a.id]!="undefined"&&popBox[a.id]!=null)return a;var b=document.body;if(a.id=="")a.id=CreateRandomId();var c=a,d=GetElementPosition(c),e=GetObjectSize(c);if(c.style.position=="absolute"||c.style.position=="relative"){b=c.parentNode;d.x=parseInt(c.style.left,10);d.y=parseInt(c.style.top,10)}if(pbSrc[c.id]!=null||c.style.position!="absolute"&&c.style.position!="relative"){var f=document.createElement("img");f.border=c.border;f.className=c.className;
f.height=c.height;f.id="popcopy"+c.id;f.src=pbSrc[c.id]!=null?pbSrc[c.id].src:c.src;f.alt=c.alt;f.title=c.title;f.width=c.width;f.onclick=c.onclick;f.ondblclick=c.ondblclick;f.onmouseout=c.onmouseout;c.onmouseout=null;f.style.width=e.w;f.style.height=e.h;f.style.position="absolute";f.style.left=d.x+"px";f.style.top=d.y+"px";f.style.cursor=c.style.cursor;b.appendChild(f);c.style.visibility="hidden";c=f}popBox[c.id]={elemId:c.id,xCurr:0,yCurr:0,xTarg:0,yTarg:0,wCurr:0,hCurr:0,wTarg:0,hTarg:0,xStep:0,
yStep:0,wStep:0,hStep:0,xDelta:0,yDelta:0,wDelta:0,hDelta:0,xTravel:0,yTravel:0,wTravel:0,hTravel:0,velM:1,velS:1,interval:null,isAnimating:false,xOriginal:d.x,yOriginal:d.y,wOriginal:parseFloat(e.w),hOriginal:parseFloat(e.h),isPopped:false,fnClick:null,fnDone:null,fnPre:null,originalId:null,cursor:""};if(typeof a.onclick=="function"){popBox[c.id].fnClick=c.onclick;if(popBoxAutoClose==true&&(typeof a.ondblclick!="function"||a.ondblclick==null)&&typeof a.onmouseover!="function")c.ondblclick=function(){Revert(c.id,
null,c.className)}}if(popBoxAutoClose==true&&typeof a.onmouseover=="function"&&(typeof a.onmouseout!="function"||a.onmouseout==null))if(popBoxMouseMoveRevert==true){if(pbMouseMoveRevert==null){pbMouseMoveRevert=[];if(typeof document.onmousemove=="function"){var h=document.onmousemove;document.onmousemove=function(g){h(g);MouseMoveRevert(g)}}else document.onmousemove=MouseMoveRevert}pbMouseMoveRevert.push({id:c.id,className:c.className})}else c.onmouseout=function(){Revert(c.id,null,c.className)};
if(a.id!=c.id)popBox[c.id].originalId=a.id;return c}
function DoPopBox(a){if(typeof a=="string")a=GetRawObject(a);try{var b=false,c=false;if(popBox[a.id].xTravel+Math.abs(popBox[a.id].xStep)<popBox[a.id].xDelta){var d=popBox[a.id].xCurr+popBox[a.id].xStep;a.style.left=parseInt(d,10)+"px";popBox[a.id].xTravel+=Math.abs(popBox[a.id].xStep);popBox[a.id].xCurr=d}else{popBox[a.id].xTravel+=Math.abs(popBox[a.id].xStep);a.style.left=parseInt(popBox[a.id].xTarg,10)+"px";b=true}if(popBox[a.id].yTravel+Math.abs(popBox[a.id].yStep)<popBox[a.id].yDelta){var e=
popBox[a.id].yCurr+popBox[a.id].yStep;a.style.top=parseInt(e,10)+"px";popBox[a.id].yTravel+=Math.abs(popBox[a.id].yStep);popBox[a.id].yCurr=e;b=false}else{popBox[a.id].yTravel+=Math.abs(popBox[a.id].yStep);a.style.top=parseInt(popBox[a.id].yTarg,10)+"px"}if(popBox[a.id].wTravel+Math.abs(popBox[a.id].wStep)<popBox[a.id].wDelta){var f=popBox[a.id].wCurr+popBox[a.id].wStep;a.style.width=parseInt(f,10)+"px";popBox[a.id].wTravel+=Math.abs(popBox[a.id].wStep);popBox[a.id].wCurr=f}else{popBox[a.id].wTravel+=
Math.abs(popBox[a.id].wStep);a.style.width=parseInt(popBox[a.id].wTarg,10)+"px";c=true}if(popBox[a.id].hTravel+Math.abs(popBox[a.id].hStep)<popBox[a.id].hDelta){var h=popBox[a.id].hCurr+popBox[a.id].hStep;a.style.height=parseInt(h,10)+"px";popBox[a.id].hTravel+=Math.abs(popBox[a.id].hStep);popBox[a.id].hCurr=h;c=false}else{popBox[a.id].hTravel+=Math.abs(popBox[a.id].hStep);a.style.height=parseInt(popBox[a.id].hTarg,10)+"px"}d=a;if(b==true&&c==true){clearInterval(popBox[a.id].interval);a.style.cursor=
popBox[a.id].cursor;b=null;if(popBox[a.id].fnDone!=null&&typeof popBox[a.id].fnDone=="function")b=popBox[a.id].fnDone;if(popBox[a.id].isPopped==true){a.style.zIndex=null;if(popBox[a.id].originalId!=null){d=GetRawObject(popBox[a.id].originalId);d.onmouseout=a.onmouseout;d.style.visibility="visible";a.parentNode.removeChild(a)}else{a.style.width=parseInt(popBox[a.id].wOriginal,10)+"px";a.style.height=parseInt(popBox[a.id].hOriginal,10)+"px";if(typeof popBox[a.id].fnClick=="function")a.onclick=popBox[a.id].fnClick}delete popBox[a.id];
popBox[a.id]=null;CreatePopBar(d)}else{popBox[a.id].isPopped=true;popBox[a.id].isAnimating=false;CreateRevertBar(a)}b!=null&&typeof b=="function"&&b(d)}}catch(g){}}
function HasRevertBar(a){if(typeof a=="string")a=GetRawObject(a);var b=a;if(popBox[b.id]!=null&&popBox[b.id].originalId!=null)b=GetRawObject(popBox[b.id].originalId);a=b.getAttribute("pbShowRevertBar");var c=b.getAttribute("pbShowRevertText");b=b.getAttribute("pbShowRevertImage");a=a!=null?a=="true"||a==true:popBoxShowRevertBar;c=c!=null?c=="true"||c==true:popBoxShowRevertText;b=b!=null?b=="true"||b==true:popBoxShowRevertImage;return a||c||b}
function HasCaption(a){if(typeof a=="string")a=GetRawObject(a);a=a;if(popBox[a.id]!=null&&popBox[a.id].originalId!=null)a=GetRawObject(popBox[a.id].originalId);var b=a.getAttribute("pbShowCaption");b=b!=null?b=="true"||b==true:popBoxShowCaption;var c=null;if(b==true){c=a.getAttribute("pbCaption");if(c==null&&a.title!="")c=a.title}return c!=null&&c!=""}
function CreateRevertBar(a){if(typeof a=="string")a=GetRawObject(a);var b=a;if(popBox[b.id]!=null&&popBox[b.id].originalId!=null)b=GetRawObject(popBox[b.id].originalId);var c=b.getAttribute("pbShowRevertBar"),d=b.getAttribute("pbShowRevertText"),e=b.getAttribute("pbShowRevertImage"),f=b.getAttribute("pbRevertText"),h=b.getAttribute("pbRevertImage");c=c!=null?c=="true"||c==true:popBoxShowRevertBar;d=d!=null?d=="true"||d==true:popBoxShowRevertText;e=e!=null?e=="true"||e==true:popBoxShowRevertImage;
if(f==null)f=popBoxRevertText;if(h==null)h=popBoxRevertImage;var g=b.getAttribute("pbShowCaption");g=g!=null?g=="true"||g==true:popBoxShowCaption;var j=null;if(g==true){j=b.getAttribute("pbCaption");if(j==null&&b.title!="")j=b.title}CreatePbBar(a,c,d,e,f,h,popBoxRevertBarAbove,true,j)}
function CreatePopBar(a){if(typeof a=="string")a=GetRawObject(a);if(!(typeof pbPopBarFunc[a.id]!="undefined"&&pbPopBarFunc[a.id]!=null)){var b=a.getAttribute("pbShowPopBar");if(b!=null){var c=a.getAttribute("pbShowPopText"),d=a.getAttribute("pbShowPopImage"),e=a.getAttribute("pbPopText"),f=a.getAttribute("pbPopImage");b=b=="false"||b==false;c=c!=null?c=="true"||c==true:popBoxShowPopText;d=d!=null?d=="true"||d==true:popBoxShowPopImage;if(e==null)e=popBoxPopText;if(f==null)f=popBoxPopImage;CreatePbBar(a,
b,c,d,e,f,popBoxPopBarAbove,false,null)}}}
function CreatePbBar(a,b,c,d,e,f,h,g,j){if(!(b==false&&c==false&&d==false&&j==null)){if(typeof a=="string")a=GetRawObject(a);var w="hand";if(a.currentStyle)w=a.currentStyle.cursor;else if(window.getComputedStyle)w=window.getComputedStyle(a,null).cursor;var k=function(){typeof a.onclick=="function"&&a.onclick()},s=function(){typeof a.onmouseout=="function"&&a.onmouseout()},y=function(){typeof a.onmouseover=="function"&&a.onmouseover()},p=[],i=a.style.position=="absolute"||a.style.position=="relative",
v=0,x=0,m=a.parentNode,r=null;if(i==true){v=parseInt(a.style.left,10);x=parseInt(a.style.top,10);i=GetObjectPadding(a);v+=i.l;x+=i.t}else{r=document.createElement("span");r=a.nextSibling!=null?m.insertBefore(r,a.nextSibling):m.appendChild(r);r.style.position="relative";r.style.left="0px";r.style.top="0px";m="";if(a.align=="left")m="left";else if(a.align=="right")m="right";m=a.style.styleFloat&&a.style.styleFloat!=""?a.style.styleFloat:a.style.cssFloat&&a.style.cssFloat!=""?a.style.cssFloat:m;if(typeof a.style.styleFloat!=
"undefined")r.style.styleFloat=m;else if(typeof a.style.cssFloat!="undefined")r.style.cssFloat=m;m=GetElementPosition(a);i=GetElementPosition(r);r.style.left=i.x>m.x?m.x-i.x+"px":m.x-i.x+"px";r.style.top=i.y>m.y?m.y-i.y+"px":m.y-i.y+"px";r.onclick=k;if(g==true)r.onmouseout=s;else r.onmouseover=y;m=r}i=parseInt(a.style.width,10);var A=parseInt(a.style.height,10),u=GetObjectSize(a);if(isNaN(i)==true)i=u.w;else if(u.w>i)v+=(u.w-i)/2;if(isNaN(A)==true)A=u.h;else if(u.h>A)x+=(u.h-A)/2;if(h==true)x-=20;
u=a.style.zIndex+1;if(b==true){var n=document.createElement("div");n.id="popBoxDivTrans"+u;n.style.width=i+"px";n.style.height="20px";n.style.borderStyle="none";n.style.padding="0px";n.style.margin="0px";n.style.position="absolute";n.style.left=v+"px";n.style.top=x+"px";n.style.backgroundColor="#000000";n.style.cursor=w;n.style.zIndex=u;if(h==false){if(typeof n.style.filter!="undefined")n.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=20)";if(typeof n.style.opacity!="undefined")n.style.opacity=
"0.2"}n.onclick=k;if(g==true)n.onmouseout=s;else n.onmouseover=y;m.appendChild(n);p.push(function(){n.parentNode.removeChild(n)})}if(c==true){var l=document.createElement("div");l.id="popBoxDivText"+u;l.style.width=i+"px";l.style.height="20px";l.style.borderStyle="none";l.style.padding="0px";l.style.margin="0px";l.style.position="absolute";l.style.left=v+"px";l.style.top=x+"px";l.style.cursor=w;l.style.textAlign="center";l.style.fontFamily="Arial, Verdana, Sans-Serif";l.style.fontSize="10pt";l.style.backgroundColor=
"Transparent";l.style.color="#ffffff";l.style.zIndex=u;l.innerHTML=e;l.onclick=k;if(g==true)l.onmouseout=s;else l.onmouseover=y;m.appendChild(l);p.push(function(){l.parentNode.removeChild(l)})}if(d==true){var t=document.createElement("img");t.id="popBoxImgPopped"+u;t.src=f;t.style.width="20px";t.style.height="20px";t.style.borderStyle="none";t.style.padding="0px";t.style.margin="0px";t.style.position="absolute";t.style.left=v+i-20+"px";t.style.top=x+"px";t.style.cursor=w;t.style.zIndex=u;t.onclick=
k;if(g==true)t.onmouseout=s;else t.onmouseover=y;m.appendChild(t);p.push(function(){t.parentNode.removeChild(t)})}if(j!=null&&j!=""){x+=A-20;if(h==true)x+=20;if(popBoxCaptionBelow==true)x+=20;var o=document.createElement("div");o.id="popBoxDivCapTrans"+u;o.style.width=i-2+"px";o.style.height="20px";o.style.borderStyle="solid";o.style.borderWidth="1px";o.style.borderColor="#999999";o.style.padding="0px";o.style.margin="0px";o.style.position="absolute";o.style.left=v+"px";o.style.top=x-1+"px";o.style.backgroundColor=
"#ffffdd";o.style.zIndex=u;if(popBoxCaptionBelow==false){if(typeof o.style.filter!="undefined")o.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=70)";if(typeof o.style.opacity!="undefined")o.style.opacity="0.7"}m.appendChild(o);p.push(function(){o.parentNode.removeChild(o)});var q=document.createElement("div");q.id="popBoxDivCapText"+u;q.style.width=i-20+"px";q.style.height="20px";q.style.borderStyle="none";q.style.padding="0px";q.style.margin="0px";q.style.position="absolute";q.style.left=
v+10+"px";q.style.top=x+"px";q.style.textAlign="center";q.style.fontFamily="Arial, Verdana, Sans-Serif";q.style.fontSize="10pt";q.style.overflowY="hidden";q.style.backgroundColor="Transparent";q.style.color="#000000";q.style.zIndex=u;m.appendChild(q);p.push(function(){q.parentNode.removeChild(q)});AddCaptionText(o,q,j)}if(p.length!=0){r!=null&&p.push(function(){r.parentNode.removeChild(r)});if(g==true){popBox[a.id].fnPre!=null&&typeof popBox[a.id].fnPre=="function"&&p.push(popBox[a.id].fnPre);popBox[a.id].fnPre=
function(){for(var z=0;z<p.length;z++)p[z]()}}else pbPopBarFunc[a.id]=function(){for(var z=0;z<p.length;z++)p[z]()}}}}
function AddCaptionText(a,b,c){var d=parseInt(b.style.width,10),e=document.createElement("div");e.style.position="absolute";e.style.width=d+"px";e.style.margin="0px";e.style.fontFamily=b.style.fontFamily;e.style.fontSize=b.style.fontSize;e.style.visibility="hidden";e.innerHTML=c;document.body.appendChild(e);var f=GetObjectSize(e);if(f.h>20){e.innerHTML=c+"..."+popBoxCaptionLessText;f=GetObjectSize(e);var h=c;d=parseInt(d*0.14,10)-5;b.innerHTML=c.substr(0,d)+"...";var g=document.createElement("span");
g.style.color="#0000ff";g.style.textDecoration="underline";g.style.cursor="pointer";g.onclick=function(){g.parentNode.removeChild(g);ResizeCaption(a.id,b.id,f.h,h)};g.innerHTML=popBoxCaptionMoreText;b.appendChild(g)}else b.innerHTML=c;document.body.removeChild(e)}
function ResizeCaption(a,b,c,d){if(typeof a=="string")a=GetRawObject(a);if(typeof b=="string")b=GetRawObject(b);var e=parseInt(b.style.height,10),f=parseInt(b.style.top,10);if(e<c){if(e==20){c+=10;b.style.paddingTop="5px";b.innerHTML=d+"...";var h=document.createElement("span");h.style.color="#0000ff";h.style.textDecoration="underline";h.style.cursor="pointer";h.onclick=function(){h.parentNode.removeChild(h);b.innerHTML=d;ResizeCaption(a.id,b.id,20,d)};h.innerHTML=popBoxCaptionLessText;b.appendChild(h);
if(popBoxCaptionBelow==false){if(typeof a.style.filter!="undefined")a.style.filter="";if(typeof a.style.opacity!="undefined")a.style.opacity="1.0"}}if(e+10>=c){f-=c-e;e=c}else{f-=10;e+=10}a.style.height=e+"px";b.style.height=e+"px";a.style.top=f-1+"px";b.style.top=f+"px";e!=c&&setTimeout('ResizeCaption("'+a.id+'","'+b.id+'",'+c+',"'+d+'")',10)}else{if(e-10<=c){f+=e-c;e=c}else{f+=10;e-=10}a.style.height=e+"px";b.style.height=e+"px";a.style.top=f-1+"px";b.style.top=f+"px";b.style.paddingTop="0px";if(e==
c){if(popBoxCaptionBelow==false){if(typeof a.style.filter!="undefined")a.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=70)";if(typeof a.style.opacity!="undefined")a.style.opacity="0.7"}AddCaptionText(a,b,d)}else setTimeout('ResizeCaption("'+a.id+'","'+b.id+'",'+c+',"'+d+'")',10)}}
function CreateWaitImage(a){if(typeof a=="string")a=GetRawObject(a);var b="popBoxImgWait"+a.id,c=GetRawObject(b);if(c!=null)return c;var d=0,e=0;if(a.style.position=="absolute"||a.style.position=="relative"){d=parseInt(a.style.left,10);e=parseInt(a.style.top,10)}else{e=GetElementPosition(a);d=e.x;e=e.y;var f=GetObjectPadding(a);d-=f.l;e-=f.t}f=parseInt(a.style.width,10);var h=parseInt(a.style.height,10);c=GetObjectSize(a);if(isNaN(f)==true)f=c.w;else if(c.w>f)d+=(c.w-f)/2;if(isNaN(h)==true)h=c.h;
else if(c.h>h)e+=(c.h-h)/2;var g=a.parentNode;c=document.createElement("img");c.id=b;c.src=popBoxWaitImage.src;c.style.position="absolute";c.style.left=d+f/2-popBoxWaitImage.width/2+"px";c.style.top=e+h/2-popBoxWaitImage.height/2+"px";c.style.cursor=a.style.cursor;c.style.zIndex=a.style.zIndex+1;g.appendChild(c);return c}
function CalculateImageDimensions(a,b,c,d,e){if(a==null)if(b==null){a=c;b=d}else{if(b==0){b=Math.min(e.y,d);var f=parseFloat(b)/parseFloat(d)}else f=parseFloat(b)/parseFloat(d);a=parseInt(c*f)}else if(a==0)if(b==null){a=Math.min(e.x,c);f=parseFloat(a)/parseFloat(c);b=parseInt(d*f)}else if(b==0)if(e.x<c||e.y<d){f=Math.min(parseFloat(e.x)/parseFloat(c),parseFloat(e.y)/parseFloat(d));a=parseInt(c*f);b=parseInt(d*f)}else{a=c;b=d}else{f=parseFloat(b)/parseFloat(d);a=Math.min(e.x,parseInt(c*f))}else if(b==
null){f=parseFloat(a)/parseFloat(c);b=parseInt(d*f)}else if(b==0){f=parseFloat(a)/parseFloat(c);b=Math.min(e.y,parseInt(d*f))}return{x:a,y:b}}var popBoxAutoClose=true,popBoxMouseMoveRevert=true,popBoxWaitImage=new Image;popBoxWaitImage.src="spinner40.gif";
var popBoxShowRevertBar=true,popBoxShowRevertText=true,popBoxShowRevertImage=true,popBoxRevertText="Click the image to shrink it.",popBoxRevertImage="magminus.gif",popBoxRevertBarAbove=false,popBoxShowPopText=true,popBoxShowPopImage=true,popBoxPopText="Click to expand.",popBoxPopImage="magplus.gif",popBoxPopBarAbove=false,popBoxShowCaption=true,popBoxCaptionBelow=false,popBoxCaptionMoreText="more",popBoxCaptionLessText="less";
function PopBox(a,b,c,d,e,f,h,g,j,w,k,s,y){if(typeof a=="string")a=GetRawObject(a);if(!(a==null||typeof a!="object"||isNaN(b)||isNaN(c)||isNaN(d)||isNaN(e)||isNaN(f)||isNaN(h)||isNaN(g)||isNaN(j)||isNaN(w)||isNaN(k))){a=InitPopBox(a);if(popBox[a.id].isAnimating==true){s="PopBox('"+a.id+"',"+b+","+c+","+d+","+e+","+f+","+h+","+g+","+j+","+w+","+k+",'"+s+"');";setTimeout(s,10)}else{popBox[a.id].isAnimating=true;popBox[a.id].xCurr=parseFloat(b);popBox[a.id].yCurr=parseFloat(c);popBox[a.id].wCurr=parseFloat(f);
popBox[a.id].hCurr=parseFloat(h);popBox[a.id].xTarg=parseFloat(d);popBox[a.id].yTarg=parseFloat(e);popBox[a.id].wTarg=parseFloat(g);popBox[a.id].hTarg=parseFloat(j);popBox[a.id].xDelta=Math.abs(parseFloat(d)-parseFloat(b));popBox[a.id].yDelta=Math.abs(parseFloat(e)-parseFloat(c));popBox[a.id].wDelta=Math.abs(parseFloat(g)-parseFloat(f));popBox[a.id].hDelta=Math.abs(parseFloat(j)-parseFloat(h));popBox[a.id].velM=w?Math.abs(parseFloat(w)):1;popBox[a.id].velS=k?Math.abs(parseFloat(k)):1;popBox[a.id].xTravel=
0;popBox[a.id].yTravel=0;popBox[a.id].wTravel=0;popBox[a.id].hTravel=0;a.style.position="absolute";a.style.left=b+"px";a.style.top=c+"px";a.style.width=f+"px";a.style.height=h+"px";a.style.display="inline";b=Math.sqrt(Math.pow(b-d,2)+Math.pow(c-e,2));f=Math.sqrt(Math.pow(f-g,2)+Math.pow(h-j,2));if(popBox[a.id].velM==popBox[a.id].velS)b=f=Math.sqrt(Math.pow(b,2)+Math.pow(f,2));popBox[a.id].xStep=(popBox[a.id].xTarg-popBox[a.id].xCurr)/b*popBox[a.id].velM;popBox[a.id].yStep=(popBox[a.id].yTarg-popBox[a.id].yCurr)/
b*popBox[a.id].velM;popBox[a.id].wStep=(popBox[a.id].wTarg-popBox[a.id].wCurr)/f*popBox[a.id].velS;popBox[a.id].hStep=(popBox[a.id].hTarg-popBox[a.id].hCurr)/f*popBox[a.id].velS;popBox[a.id].fnDone=y;if(s!=null)a.className=s;popBox[a.id].cursor=a.style.cursor;a.style.cursor="default";if(popBox[a.id].isPopped==false)a.style.zIndex=++popBoxZ;s=a.id;if(popBox[a.id].originalId!=null)s=popBox[a.id].originalId;if(pbPopBarFunc[s]!=null){pbPopBarFunc[s]();pbPopBarFunc[s]=null}popBox[a.id].fnPre!=null&&typeof popBox[a.id].fnPre==
"function"&&popBox[a.id].fnPre();popBox[a.id].interval=setInterval("DoPopBox('"+a.id+"')",10)}}}function Pop(a,b,c){PopEx(a,null,null,0,0,b,c)}
function PopEx(a,b,c,d,e,f,h){if(typeof a=="string")a=GetRawObject(a);if(a.id=="")a.id=CreateRandomId();var g=a.getAttribute("pbSrcNL");if(g==null&&pbSrc[a.id]==null)g=a.getAttribute("pbSrc");if(g!=null){var j=new Image;j.src=g;pbSrc[a.id]!=null&&delete pbSrc[a.id];pbSrc[a.id]=j}g=pbSrc[a.id]!=null?pbSrc[a.id]:a;j=typeof g.readyState!="undefined"?g.readyState=="complete":typeof g.complete!="undefined"?g.complete==true:true;if(j==false){j=CreateWaitImage(a);a="var imgWait = GetRawObject('"+j.id+"'); if (imgWait != null) { imgWait.parentNode.removeChild(imgWait); PopEx('"+
a.id+"',"+b+","+c+","+d+","+e+","+f+",'"+h+"'); }";g.onload=new Function("",a)}else{g=InitPopBox(a);if(popBox[g.id].isPopped!=true){if(typeof g.ondblclick=="function")g.onclick=g.ondblclick;j=parseInt(g.style.left);var w=parseInt(g.style.top),k=GetInsideWindowSize(),s=HasRevertBar(a),y=HasCaption(a);if(s==true&&popBoxRevertBarAbove==true)k.y-=20;if(y==true&&popBoxCaptionBelow==true)k.y-=20;var p=d,i=e;if(d==0||e==0||d==null||e==null){if(pbSrc[a.id]!=null){p=pbSrc[a.id].width;i=pbSrc[a.id].height}else if(a.naturalWidth&&
a.naturalHeight){p=a.naturalWidth;i=a.naturalHeight}else{var v=new Image;v.src=g.src;p=v.width;i=v.height;delete v}if(p==0||i==0){i=Math.min(parseFloat(k.x)/parseFloat(g.width),parseFloat(k.y)/parseFloat(g.height));p=parseInt(g.width*i);i=parseInt(g.height*i)}}if(b!=null){b=typeof b=="string"&&b.indexOf("A")==b.length-1?parseInt(b,10):popBox[g.id].xOriginal+parseInt(b,10);k.x-=b}if(c!=null){c=typeof c=="string"&&c.indexOf("A")==c.length-1?parseInt(c,10):popBox[g.id].yOriginal+parseInt(c,10);k.y-=
c}if(d==null&&e==0&&p>k.x-20)k.y-=20;else if(d==0&&e==null&&i>k.y-4)k.x-=4;d=CalculateImageDimensions(d,e,p,i,k);if(b==null||c==null){e=GetScrollOffset();if(b==null){b=k.x/2+e.x-d.x/2;if(b<0)b=0}if(c==null){c=k.y/2+e.y-d.y/2;if(s==true&&popBoxRevertBarAbove==true)c+=10;if(y==true&&popBoxCaptionBelow==true)c-=10;if(c<0)c=0}}e=null;if(typeof PostPopProcessing=="function")e=PostPopProcessing;typeof PrePopProcessing=="function"&&PrePopProcessing(a);PopBox(g,j,w,b,c,popBox[g.id].wOriginal,popBox[g.id].hOriginal,
d.x,d.y,f,f,h,e)}}}
function Revert(a,b,c){if(typeof a=="string")a=GetRawObject(a);if(!(typeof popBox[a.id]=="undefined"||popBox[a.id]==null)){if(typeof b=="undefined"||b==null||b==0)b=Math.max(popBox[a.id].velM,popBox[a.id].velS);if(typeof c=="undefined")c=popBox[a.id].originalClassName;var d=null;if(typeof PostRevertProcessing=="function")d=PostRevertProcessing;typeof PreRevertProcessing=="function"&&PreRevertProcessing(a);PopBox(a,popBox[a.id].xTarg,popBox[a.id].yTarg,popBox[a.id].xOriginal,popBox[a.id].yOriginal,popBox[a.id].wTarg,
popBox[a.id].hTarg,popBox[a.id].wOriginal,popBox[a.id].hOriginal,b,b,c,d)}};