/* Compiled from X 4.16 by XC 1.06 on 04Jul07 */
function xAnimation(r){this.res=r||10;}xAnimation.prototype.init=function(e,t,or,ot,oe,a,b){var i=this;i.e=xGetElementById(e);i.t=t;i.or=or;i.ot=ot;i.oe=oe;i.a=a||0;i.v=xAnimation.vf[i.a];i.qc=1+(b||0);i.fq=1/i.t;if(i.a){i.fq*=i.qc*Math.PI;if(i.a==1||i.a==2){i.fq/=2;}}else{i.qc=1;}i.xd=i.x2-i.x1;i.yd=i.y2-i.y1;i.zd=i.z2-i.z1;};xAnimation.prototype.run=function(r){var i=this;if(!r)i.t1=new Date().getTime();if(!i.tmr)i.tmr=setInterval(function(){i.et=new Date().getTime()-i.t1;if(i.et<i.t){i.f=i.v(i.et*i.fq);i.x=i.xd*i.f+i.x1;i.y=i.yd*i.f+i.y1;i.z=i.zd*i.f+i.z1;i.or(i);}else{clearInterval(i.tmr);i.tmr=null;if(i.qc%2){i.x=i.x2;i.y=i.y2;i.z=i.z2;}else{i.x=i.x1;i.y=i.y1;i.z=i.z1;}i.ot(i);var rep=false;if(typeof i.oe=='function')rep=i.oe(i);else if(typeof i.oe=='string')rep=eval(i.oe);if(rep)i.resume(1);}},i.res);};xAnimation.vf=[function(r){return r;},function(r){return Math.abs(Math.sin(r));},function(r){return 1-Math.abs(Math.cos(r));},function(r){return(1-Math.cos(r))/2;}];xAnimation.prototype.pause=function(){clearInterval(this.tmr);this.tmr=null;};xAnimation.prototype.resume=function(fs){if(typeof this.tmr!='undefined'&&!this.tmr){this.t1=new Date().getTime();if(!fs){this.t1-=this.et;}this.run(!fs);}};xLibrary={version:'4.16',license:'GNU LGPL',url:'http://cross-browser.com/'};xAnimation.prototype.line=function(e,x,y,t,a,b,oe){var i=this;i.x1=xLeft(e);i.y1=xTop(e);i.x2=Math.round(x);i.y2=Math.round(y);i.init(e,t,h,h,oe,a,b);i.run();function h(i){i.e.style.left=Math.round(i.x)+'px';i.e.style.top=Math.round(i.y)+'px';}};xAnimation.prototype.opacity=function(e,o,t,a,b,oe){var i=this;i.x1=xOpacity(e);i.x2=o;i.init(e,t,h,h,oe,a,b);i.run();function h(i){xOpacity(i.e,i.x);}};function xAddEventListener(e,eT,eL,cap){if(!(e=xGetElementById(e)))return;eT=eT.toLowerCase();if(e.addEventListener)e.addEventListener(eT,eL,cap||false);else if(e.attachEvent)e.attachEvent('on'+eT,eL);else{var o=e['on'+eT];e['on'+eT]=typeof o=='function'?function(v){o(v);eL(v);}:eL;}}function xCamelize(cssPropStr){var i,c,a=cssPropStr.split('-');var s=a[0];for(i=1;i<a.length;++i){c=a[i].charAt(0);s+=a[i].replace(c,c.toUpperCase());}return s;}function xDef(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=='undefined')return false;}return true;}function xGetComputedStyle(e,p,i){if(!(e=xGetElementById(e)))return null;var s,v='undefined',dv=document.defaultView;if(dv&&dv.getComputedStyle){s=dv.getComputedStyle(e,'');if(s)v=s.getPropertyValue(p);}else if(e.currentStyle){v=e.currentStyle[xCamelize(p)];}else return null;return i?(parseInt(v)||0):v;}function xGetElementById(e){if(typeof(e)=='string'){if(document.getElementById)e=document.getElementById(e);else if(document.all)e=document.all[e];else e=null;}return e;}function xLeft(e,iX){if(!(e=xGetElementById(e)))return 0;var css=xDef(e.style);if(css&&xStr(e.style.left)){if(xNum(iX))e.style.left=iX+'px';else{iX=parseInt(e.style.left);if(isNaN(iX))iX=xGetComputedStyle(e,'left',1);if(isNaN(iX))iX=0;}}else if(css&&xDef(e.style.pixelLeft)){if(xNum(iX))e.style.pixelLeft=iX;else iX=e.style.pixelLeft;}return iX;}function xMoveTo(e,x,y){xLeft(e,x);xTop(e,y);}function xNum(){for(var i=0;i<arguments.length;++i){if(isNaN(arguments[i])||typeof(arguments[i])!='number')return false;}return true;}function xOpacity(e,o){var set=xDef(o);if(!(e=xGetElementById(e)))return 2;if(xStr(e.style.opacity)){if(set)e.style.opacity=o+'';else o=parseFloat(e.style.opacity);}else if(xStr(e.style.filter)){if(set)e.style.filter='alpha(opacity='+(100*o)+')';else if(e.filters&&e.filters.alpha){o=e.filters.alpha.opacity/100;}}else if(xStr(e.style.MozOpacity)){if(set)e.style.MozOpacity=o+'';else o=parseFloat(e.style.MozOpacity);}else if(xStr(e.style.KhtmlOpacity)){if(set)e.style.KhtmlOpacity=o+'';else o=parseFloat(e.style.KhtmlOpacity);}return isNaN(o)?1:o;}function xPageX(e){var x=0;e=xGetElementById(e);while(e){if(xDef(e.offsetLeft))x+=e.offsetLeft;e=xDef(e.offsetParent)?e.offsetParent:null;}return x;}function xPageY(e){var y=0;e=xGetElementById(e);while(e){if(xDef(e.offsetTop))y+=e.offsetTop;e=xDef(e.offsetParent)?e.offsetParent:null;}return y;}function xStr(s){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])!='string')return false;}return true;}function xTop(e,iY){if(!(e=xGetElementById(e)))return 0;var css=xDef(e.style);if(css&&xStr(e.style.top)){if(xNum(iY))e.style.top=iY+'px';else{iY=parseInt(e.style.top);if(isNaN(iY))iY=xGetComputedStyle(e,'top',1);if(isNaN(iY))iY=0;}}else if(css&&xDef(e.style.pixelTop)){if(xNum(iY))e.style.pixelTop=iY;else iY=e.style.pixelTop;}return iY;}
/* Application */
var ATCA={cartImgId:'ShoppingCartImgId',formNamePrefix:'tForm',formStartNum:0,prodImgClass:'prodimage',totalTime:450,accelType:2,enableSizeAnim:true,enableOpacAnim:false,staticOpac:.6,sizeMultiplier:1.5};xAddEventListener(window,'load',function(){var f,i=ATCA.formStartNum;f=document.forms[ATCA.formNamePrefix+i];while(f){f.previousSubmitHandler=f.onsubmit;f.onsubmit=ATCA_onSubmit;f=document.forms[ATCA.formNamePrefix+(++i)];}ATCA.img=document.createElement('img');ATCA.img.style.position='absolute';ATCA.img.style.border='none';ATCA.img.style.left='-500px';ATCA.img.style.top='-500px';document.body.appendChild(ATCA.img);ATCA.animPos=new xAnimation();if(ATCA.enableSizeAnim){ATCA.animSize=new xAnimation();}if(ATCA.enableOpacAnim){ATCA.animOpac=new xAnimation();}},false);function ATCA_onSubmit(){var prodImg=null,a,i;if(typeof this.previousSubmitHandler=='function'){if(!this.previousSubmitHandler()){return false;}}a=this.getElementsByTagName('img');for(i=0;i<a.length;++i){if(a[i].className.indexOf(ATCA.prodImgClass)!=-1){prodImg=a[i];}}if(prodImg){xOpacity(ATCA.img,ATCA.enableOpacAnim?1:ATCA.staticOpac);ATCA.img.src=prodImg.src;ATCA.img.width=ATCA.sizeMultiplier*prodImg.width;ATCA.img.height=ATCA.sizeMultiplier*prodImg.height;xMoveTo(ATCA.img,xPageX(prodImg),xPageY(prodImg));ATCA.animPos.line(ATCA.img,xPageX(ATCA.cartImgId),xPageY(ATCA.cartImgId),ATCA.totalTime,ATCA.accelType,0,"document.forms['"+this.name+"'].submit()");if(ATCA.enableSizeAnim){ATCA.animSize.imgSize(ATCA.img,0,0,ATCA.totalTime,ATCA.accelType);}if(ATCA.enableOpacAnim){ATCA.animOpac.opacity(ATCA.img,0,ATCA.totalTime,ATCA.accelType);}}return false;}xAnimation.prototype.imgSize=function(e,w,h,t,a,b,oe){var i=this;i.x1=e.width;i.y1=e.height;i.x2=Math.round(w);i.y2=Math.round(h);i.init(e,t,o,o,oe,a,b);i.run();function o(i){i.e.width=Math.round(i.x);i.e.height=Math.round(i.y);}};

