function AnimatedImage(d,j,f,a){var k,r,b,g,n,m,e,l,c,q;g=this.image=document.getElementById(d);this.div=g.parentNode;c=g.parentNode;this.delay=j;if(f instanceof Object){this.path="";for(k in f){this[k]=f[k]}this.cleft=Math.round((this.width=f.width)/2)+"px";this.ctop=Math.round((this.height=f.height)/2)+"px"}else{this.path=f}l=g.getAttribute("alt");this.images=a;this.imgs=new Array();this.index=this.trans_effect=="flashy"?a.length:0;for(var k=0;k<a.length;k++){g=new Image();e=a[k];if(e instanceof Object){b=e.src}else{b=e;e=new Object();e.src=b}b=(this.path?this.path:"")+(b.substr(0,1)=="/"?"":"/")+b;e.src=g.src=b;if(n=e.width){g.setAttribute("width",n);g.setAttribute("height",m=e.height);g.setAttribute("alt",l);if(this.trans_effect!="jflip"){e.left=g.style.left=(q=Math.max(0,Math.round((this.width-n)/2)))+"px";e.right=(q+n)+"px";e.top=g.style.top=(q=Math.max(0,Math.round((this.height-m)/2)))+"px";e.bottom=(q+m)+"px";g.style.position="absolute"}if(k){g.style.display="none";c.appendChild(g)}else{c.replaceChild(g,this.image);this.image=g}}e.img=g;g.info=e;this.imgs[k]=e}if(this.trans_effect=="flashy"){this.flip()}else{this.start()}}AnimatedImage.prototype={start:function(){if(!this.image){return}var a=this;this.flipTimerID=setInterval(function(){a.flip()},this.delay)},flip:function(){var l=this,f=++l.index,k,b,d,c,h,g;if(f>=l.images.length){f=l.index=0}l.last=((f+1)==l.images.length);b=l.imgs[f];switch(l.trans_effect){case"fade":clearInterval(l.flipTimerID);c=l.trans_time/2;$(l.image).css({opacity:1});$(l.image).animate({opacity:0},c,l.easing,function(){l.image.style.display="none";$(b.img).css({opacity:0,display:"inline"});$(b.img).animate({opacity:1},c,l.easing,function(){l.endTrans(b)})});break;case"fadeover":clearInterval(l.flipTimerID);$(l.image).css({"z-index":2000});$(b.img).css({"z-index":1000,opacity:0,display:"inline"});$(l.image).animate({opacity:0},{queue:false,duration:l.trans_time,easing:l.easing});$(b.img).animate({opacity:1},l.trans_time,l.easing,function(){l.endTrans(b)});break;case"growover":clearInterval(l.flipTimerID);$(l.image).css({"z-index":1000});$(b.img).css({"z-index":2000,display:"inline",width:"0px",height:"0px",left:l.cleft,top:l.ctop});$(b.img).animate({width:b.width,height:b.height,top:b.top,left:b.left},l.trans_time,l.easing,function(){l.endTrans(b)});break;case"flashy":clearInterval(l.flipTimerID);$(l.image).css({display:"none"});if(l.last){k=[l.cleft,l.ctop];h=0.4;g=1}else{k=l.rndSelect([[b.left,b.top],[l.cleft,b.top],[b.right,b.top],[b.left,b.bottom],[l.cleft,b.bottom],[b.right,b.bottom]]);h=1;g=0.4}$(b.img).css({display:"inline",width:"0px",height:"0px",left:k[0],top:k[1],opacity:h});$(b.img).animate({width:b.width,height:b.height,top:b.top,left:b.left,opacity:g},l.trans_time,l.easing,function(){l.endTrans(b)});break;case"explode":case"puff":case"fold":case"clip":k=l.rndSelect(["horizontal","vertical"]);case"drop":case"slide":if(!k){k=l.rndSelect(["left","right","up","down"])}clearInterval(l.flipTimerID);$(l.image).css({"z-index":2000});$(b.img).css({"z-index":1000,display:"inline"});$(l.image).hide(l.trans_effect,{pieces:25,easing:l.easing,size:l.height/3,direction:k},l.trans_time,function(){l.endTrans(b)});break;case"flip":clearInterval(l.flipTimerID);$(l.image).flip({easing:l.easing,direction:l.rndSelect(["rl","lr","tb","bt"]),color:l.trans_color,content:$(b.img),onEnd:function(){$(b.img).css({display:"inline"});l.endTrans(b)}});break;case"cube":clearInterval(l.flipTimerID);var a=l.width/5;var j=l.width/12;var m=l.width/10;$(l.div).imagecube({speed:l.trans_time,easing:l.easing,repeat:l.repeat,pause:l.delay,reduction:a,expansion:j,segments:m,beforeRotate:function(n,i){var o,p;if((o=n.src.indexOf(".cube"))>0){$(n).css({border:"2px solid black"})}if((p=i.src.indexOf(".cube"))>0){$(i).css({border:"2px solid black"})}var e=1},afterRotate:function(i,e){var n=e.info;$(e).css({width:n.width+"px",height:n.height+"px"})}});break;case"jflip":clearInterval(l.flipTimerID);$(l.div).jFlip(l.width,l.height,{background:"#ff",cornersTop:false,curlSize:0.05,easing:l.easing});break;default:if(b.width){d=b.img;l.image.style.display="none";d.style.display="inline";l.image=d}else{l.image.src=b.src}}},endTrans:function(b){var a=this;a.image.style.display="none";a.image=b.img;if(a.last&&(!a.repeat||a.trans_effect=="flashy")){return}a.flipTimerID=setInterval(function(){a.flip()},a.delay)},rndSelect:function(b){var c=Math.min(Math.floor((Math.random()*b.length)),b.length-1);return b[c]}};Number.prototype.NaN0=function(){return isNaN(this)?0:this};function UtilitiesEngine(){var a=this;var b=navigator.userAgent;this.Opera=window.opera&&opera.buildNumber;this.WebKit=/WebKit/.test(b);this.IE=!this.WebKit&&!this.Opera&&(/MSIE/gi).test(b)&&(/Explorer/gi).test(navigator.appName);this.IE6=this.IE&&/MSIE [56]/.test(b);this.Gecko=!this.WebKit&&/Gecko/.test(b);this.Mac=b.indexOf("Mac")!=-1;this.Registry=new Array();this.otherOnLoad=window.onload;window.onload=function(){a.onPageLoad()};this.otherOnUnload=window.onunload;window.onunload=function(){a.onPageUnload()}}UtilitiesEngine.prototype={onPageUnload:function(){try{if(this.otherOnUnload){this.otherOnUnload()}}catch(c){}finally{for(var a=0;a<this.Registry.length;a++){var b=this.Registry[a];if(b.onPageUnload){b.onPageUnload()}}}},onPageLoad:function(){try{if(this.otherOnLoad){this.otherOnLoad()}}catch(c){}finally{for(var a=0;a<this.Registry.length;a++){var b=this.Registry[a];if(b.onPageLoad){b.onPageLoad()}}}},onload:function(a){this.Registry.push(a)},register:function(a){this.Registry.push(a)},onPageUpdate:function(){for(var a=0;a<this.Registry.length;a++){var b=this.Registry[a];if(b.onPageUpdate){b.onPageUpdate()}}},getStyle:function(a,c){if(document.defaultView){c=c.replace(/[A-Z]/g,function(d){return"-"+d});try{return document.defaultView.getComputedStyle(a,null).getPropertyValue(c)}catch(b){return null}}c=c.replace(/-(\D)/g,function(e,d){return d.toUpperCase()});if(c=="float"){c=this.IE?"styleFloat":"cssFloat"}if(a.currentStyle){return a.currentStyle[c]}return a.style[c]},isContainingBlock:function(a){var b=this.getStyle(a,"position");return b!="static"},getAbsPosition:function(d,b){var h=0;var g=0;var f=d;var c=!this.IE||document.compatMode=="CSS1Compat";if(this.IE&&false){f=f.getBoundingClientRect();var a=c?document.documentElement:document.body;h=f.left+a.scrollLeft;g=f.top+a.scrollTop;d.absPosition={left:h,top:g,right:parseInt(f.offsetWidth)+h,bottom:parseInt(f.offsetHeight)+g};return d.absPosition}while(f){h+=(f.offsetLeft||0)+(f.currentStyle?(parseInt(f.currentStyle.borderLeftWidth)).NaN0():0);g+=(f.offsetTop||0)+(f.currentStyle?(parseInt(f.currentStyle.borderTopWidth)).NaN0():0);f=f.offsetParent;if(this.isContainingBlock(f)){break}}d.absPosition={left:h,top:g,right:parseInt(d.offsetWidth)+h,bottom:parseInt(d.offsetHeight)+g};return d.absPosition}};Utilities=new UtilitiesEngine();function ShadowBox(a,h,d,e,f,j,g,b,l,k,i){this.id=a;this.color=h;this.bgcolor=d;this.corner=e;this.borderColor=f;this.borderWidth=j;this.shColor=g;this.shOpacity=b;this.shSigma=l;this.shX=k;this.shY=i;Utilities.onload(this);this.ug=0}ShadowBox.prototype={onPageLoad:function(){var a=this;var c=document.getElementById(a.id);var b=a.pad=c.parentNode;if(b.className!="shadowbox_pad"){return}var d=a.cell=b.parentNode;if(d.className=="shadowbox_cell"){while(d&&d.className!="shadowbox_outer"){d=d.parentNode}if(!d){return}}a.outer=d;if(d.className!="shadowbox_outer"){return}this.w=this.h=0;this.resize();this.interval=window.setInterval(function(){a.resize()},200)},resize:function(){var d=this,f=d.pad,a=f.offsetWidth,e=f.offsetHeight,b;if(d.w==a&&d.h==e){return}d.w=a;d.h=e;var c="url(/images/dropimg.php?shadowbox=1&w="+a+"&h="+e;if(b=d.color){c+="&color="+encodeURIComponent(b)}if(b=d.bgcolor){c+="&bgcolor="+encodeURIComponent(b)}if(b=d.corner){c+="&corner="+encodeURIComponent(b)}if(b=d.borderColor){c+="&border_color="+encodeURIComponent(b)}if(b=d.borderWidth){c+="&border_width="+encodeURIComponent(b)}if(b=d.shColor){c+="&shcolor="+encodeURIComponent(b)}if(b=d.shOpacity){c+="&shopacity="+encodeURIComponent(b)}if(b=d.shSigma){c+="&shsigma="+encodeURIComponent(b)}if(b=d.shX){c+="&shx="+encodeURIComponent(b)}if(b=d.shY){c+="&shy="+encodeURIComponent(b)}d.outer.style.backgroundImage=c+")"}};function WarningBlocker(a,b){this.blocker_id=a;this.blocked_id=b;Utilities.onload(this)}WarningBlocker.prototype={onPageLoad:function(){var c=this,a,d,e,b,f;e=document.getElementById(c.blocker_id);b=document.getElementById(c.blocked_id);if(!e||!b){return}a=b.offsetWidth;d=b.offsetHeight;f=Utilities.getAbsPosition(b);e.style.display="block";e.style.left=f.left+"px";e.style.top=f.top+"px";e.style.width=a+"px";e.style.height=d+"px"},onPageUpdate:function(){this.onPageLoad()}};