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