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)}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.total(1)+"px";e.style.width="";e.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(f,m,b){clearInterval(f.ai);if(m==1){f.style.opacity=0;f.style.filter="alpha(opacity=0)";f.style.display="block";this.pos()}f.ai=setInterval(function(){TINY.box.ta(f,b,m)},20)},ta:function(f,b,p){var m=Math.round(f.style.opacity*100);if(m==b){clearInterval(f.ai);if(p==-1){f.style.display="none";f==a?TINY.box.alpha(e,-1,0,2):k.innerHTML=a.style.backgroundImage=""}else{f==e?this.alpha(a,1,100):TINY.box.fill(c,h,g,l,d)}}else{var q=Math.ceil((m+((b-m)*0.5)));q=q==1?0:q;f.style.opacity=q/100;f.style.filter="alpha(opacity="+q+")"}},size:function(o,q,n){o=typeof o=="object"?o:T$(o);clearInterval(o.si);var b=o.offsetWidth,r=o.offsetHeight,p=b-parseInt(o.style.width),s=r-parseInt(o.style.height);var f=b-p>q?0:1,m=(r-s>n)?0:1;o.si=setInterval(function(){TINY.box.ts(o,q,p,f,n,s,m)},20)},ts:function(q,s,r,m,p,u,o){var f=q.offsetWidth-r,t=q.offsetHeight-u;if(f==s&&t==p){clearInterval(q.si);a.style.backgroundImage="none";k.style.display="block"}else{if(f!=s){var b=f+((s-f)*0.5);q.style.width=m?Math.ceil(b)+"px":Math.floor(b)+"px"}if(t!=p){var b=t+((p-t)*0.5);q.style.height=o?Math.ceil(b)+"px":Math.floor(b)+"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(f){var a=document.body,c=document.documentElement;return f?Math.max(Math.max(a.scrollHeight,c.scrollHeight),Math.max(a.clientHeight,c.clientHeight)):Math.max(Math.max(a.scrollWidth,c.scrollWidth),Math.max(a.clientWidth,c.clientWidth))}}}();
function rrevs(pname,id,pid){var content='<iframe id="frameTiny" src="reviews.asp?p='+id+'&amp;l=10&amp;h=n&amp;j=n&amp;s=1" width="500" height="378" scrolling="vertical" frameborder="no" marginwidth="0" marginheight="0"></iframe><p align="right"><a href="javascript:wrev('+pid+')">Write a Review for ' + pname + '</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:TINY.box.hide();"><img src="images/closelabel.gif" style="vertical-align:top"></a></p>';TINY.box.show(content,0,500,400,1);}
function wrev(id){document.getElementById("frameTiny").src = "prodreview.asp?id="+id;}
function review(prodid){if( prodid!= ""){var content = '<iframe id="frameTiny" src="prodreview.asp?id=' + prodid + '" width="400" height="290" scrolling="no" frameborder="no" marginwidth="0" marginheight="0"></iframe><p align="right" style="margin:0px"><a href="javascript:TINY.box.hide();"><img src="images/closelabel.gif" border="0"></a></p>';TINY.box.show(content,0,400,312,1);}}