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