function T$(b){return document.getElementById(b)}var TINY={};TINY.box=function(){var t,s,r,q,p,o,n,m,l,k=0;return{show:function(f,b,a,g,e,c){if(!k){t=document.createElement("div");t.id="tinybox";s=document.createElement("div");s.id="tinymask";r=document.createElement("div");r.id="tinycontent";document.body.appendChild(s);document.body.appendChild(t);t.appendChild(r);s.onclick=TINY.box.hide;window.onresize=TINY.box.resize;k=1}if(!e&&!b){t.style.width=a?a+"px":"auto";t.style.height=g?g+"px":"auto";t.style.backgroundImage="none";r.innerHTML=f}else{r.style.display="none";t.style.width=t.style.height="100px"}this.mask();p=f;o=b;n=a;m=g;l=e;this.alpha(s,1,80,3);if(c){setTimeout(function(){TINY.box.hide()},1000*c)}},fill:function(a,v,u,j,i){if(v){t.style.backgroundImage="";var h=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");h.onreadystatechange=function(){if(h.readyState==4&&h.status==200){TINY.box.psh(h.responseText,u,j,i)}};h.open("GET",a,1);h.send(null)}else{this.psh(a,u,j,i)}},psh:function(a,v,u,j){if(j){if(!v||!u){var i=t.style.width,c=t.style.height;r.innerHTML=a;t.style.width=v?v+"px":"";t.style.height=u?u+"px":"";r.style.display="";v=parseInt(r.offsetWidth);u=parseInt(r.offsetHeight);r.style.display="none";t.style.width=i;t.style.height=c}else{r.innerHTML=a}this.size(t,v,u,4)}else{t.style.backgroundImage="none"}},hide:function(){TINY.box.alpha(t,-1,0,3)},resize:function(){TINY.box.pos();TINY.box.mask()},mask:function(){s.style.height=TINY.page.theight()+"px";s.style.width="";s.style.width=TINY.page.twidth()+"px"},pos:function(){var a=TINY.page.height()/2-t.offsetHeight/2;a=a<10?10:a;t.style.top=a+TINY.page.top()+"px";t.style.left=TINY.page.width()/2-t.offsetWidth/2+"px"},alpha:function(f,e,h,g){clearInterval(f.ai);if(e==1){f.style.opacity=0;f.style.filter="alpha(opacity=0)";f.style.display="block";this.pos()}f.ai=setInterval(function(){TINY.box.twalpha(f,h,e,g)},20)},twalpha:function(f,c,b,a){var g=Math.round(f.style.opacity*100);if(g==c){clearInterval(f.ai);if(b==-1){f.style.display="none";f==t?TINY.box.alpha(s,-1,0,2):r.innerHTML=t.style.backgroundImage=""}else{f==s?this.alpha(t,1,100,5):TINY.box.fill(p,o,n,m,l)}}else{var e=g+Math.ceil(Math.abs(c-g)/a)*b;f.style.opacity=e/100;f.style.filter="alpha(opacity="+e+")"}},size:function(D,C,B,A){D=typeof D=="object"?D:T$(D);clearInterval(D.si);var z=D.offsetWidth,y=D.offsetHeight,x=z-parseInt(D.style.width),w=y-parseInt(D.style.height);var v=z-x>C?-1:1,u=y-w>B?-1:1;D.si=setInterval(function(){TINY.box.twsize(D,C,x,v,B,w,u,A)},20)},twsize:function(B,A,z,y,x,w,v,u){var c=B.offsetWidth-z,a=B.offsetHeight-w;if(c==A&&a==x){clearInterval(B.si);t.style.backgroundImage="none";r.style.display="block"}else{if(c!=A){B.style.width=c+Math.ceil(Math.abs(A-c)/u)*y+"px"}if(a!=x){B.style.height=a+Math.ceil(Math.abs(x-a)/u)*v+"px"}this.pos()}}}}();TINY.page=function(){return{top:function(){return document.body.scrollTop||document.documentElement.scrollTop},width:function(){return self.innerWidth||document.documentElement.clientWidth},height:function(){return self.innerHeight||document.documentElement.clientHeight},theight:function(){var e=document,d=e.body,f=e.documentElement;return Math.max(Math.max(d.scrollHeight,f.scrollHeight),Math.max(d.clientHeight,f.clientHeight))},twidth:function(){var e=document,d=e.body,f=e.documentElement;return Math.max(Math.max(d.scrollWidth,f.scrollWidth),Math.max(d.clientWidth,f.clientWidth))}}}();
