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){if(!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}if(!o&&!k){a.style.width=l?l+"px":"auto";a.style.height=n?n+"px":"auto";a.style.backgroundImage="none";c.innerHTML=d}else{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);if(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(){if(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,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(){b.style.height=TINY.page.theight()+"px";b.style.width="";b.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(a,b,c,d){clearInterval(a.ai);if(b==1){a.style.opacity=0;a.style.filter="alpha(opacity=0)";a.style.display="block";this.pos()}a.ai=setInterval(function(){TINY.box.twalpha(a,c,b,d)},20)},twalpha:function(d,j,k,l){var n=Math.round(d.style.opacity*100);if(n==j){clearInterval(d.ai);if(k==-1){d.style.display="none";d==a?TINY.box.alpha(b,-1,0,2):c.innerHTML=a.style.backgroundImage=""}else{d==b?this.alpha(a,1,100,5):TINY.box.fill(e,f,g,h,i)}}else{var o=n+Math.ceil(Math.abs(j-n)/l)*k;d.style.opacity=o/100;d.style.filter="alpha(opacity="+o+")"}},size:function(a,b,c,d){a=typeof a=="object"?a:T$(a);clearInterval(a.si);var e=a.offsetWidth,f=a.offsetHeight,g=e-parseInt(a.style.width),h=f-parseInt(a.style.height);var i=e-g>b?-1:1,j=f-h>c?-1:1;a.si=setInterval(function(){TINY.box.twsize(a,b,g,i,c,h,j,d)},20)},twsize:function(b,d,e,f,g,h,i,j){var k=b.offsetWidth-e,l=b.offsetHeight-h;if(k==d&&l==g){clearInterval(b.si);a.style.backgroundImage="none";c.style.display="block"}else{if(k!=d){b.style.width=k+Math.ceil(Math.abs(d-k)/j)*f+"px"}if(l!=g){b.style.height=l+Math.ceil(Math.abs(g-l)/j)*i+"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 a=document,b=a.body,c=a.documentElement;return Math.max(Math.max(b.scrollHeight,c.scrollHeight),Math.max(b.clientHeight,c.clientHeight))},twidth:function(){var a=document,b=a.body,c=a.documentElement;return Math.max(Math.max(b.scrollWidth,c.scrollWidth),Math.max(b.clientWidth,c.clientWidth))}}}()
