//v2.0.3 (11.05.2005)
fps = 20;sst=new Object();sst.linear = function(t, b, c, d) {return c*t/d+b;};sst.easeIn = function(t, b, c, d, p) {return c*Math.pow(t/d, p)+b;};sst.easeOut = function(t, b, c, d, p) {var s = p%2 ? 1 : -1;return s*c*(Math.pow(t/d-1, p)+s)+b;};sst.easeInOut = function(t, b, c, d, p) {if ((t /= d/2)<1) {return c/2*Math.pow(t, p)+b;}var s = p%2 ? 1 : -1;return s*c/2*(Math.pow(t-2, p)+s*2)+b;};sst.easeInSine = function(t, b, c, d) {return c*(1-Math.cos(t/d*(Math.PI/2)))+b;};sst.easeOutSine = function(t, b, c, d) {return c*Math.sin(t/d*(Math.PI/2))+b;};sst.easeInOutSine = function(t, b, c, d) {return c/2*(1-Math.cos(Math.PI*t/d))+b;};sst.easeInExpo = function(t, b, c, d, p) {return c*Math.pow(p, 10*(t/d-1))+b;};sst.easeOutExpo = function(t, b, c, d, p) {return c*(-Math.pow(p, -10*t/d)+1)+b;};sst.easeInOutExpo = function(t, b, c, d, p) {if ((t /= d/2)<1) {return c/2*Math.pow(p, 10*(t-1))+b;}return c/2*(-Math.pow(p, -10*--t)+2)+b;};sst.easeInCirc = function(t, b, c, d) {return c*(1-Math.sqrt(1-(t /= d)*t))+b;};sst.easeOutCirc = function(t, b, c, d) {return c*Math.sqrt(1-(t=t/d-1)*t)+b;};sst.easeInOutCirc = function(t, b, c, d) {if ((t /= d/2)<1) {return c/2*(1-Math.sqrt(1-t*t))+b;}return c/2*(Math.sqrt(1-(t -= 2)*t)+1)+b;};sst.easeInElastic = function(t, b, c, d, a, p) {if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;if (a < Math.abs(c)) { a=c; var s=p/4; }else var s = p/(2*Math.PI) * Math.asin (c/a);return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;};sst.easeOutElastic = function(t, b, c, d, a, p) {if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;if (a < Math.abs(c)) { a=c; var s=p/4; }else var s = p/(2*Math.PI) * Math.asin (c/a);return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;};sst.easeInOutElastic = function(t, b, c, d, a, p) {if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);if (a < Math.abs(c)) { a=c; var s=p/4; }else var s = p/(2*Math.PI) * Math.asin (c/a);if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;};sst.easeInBack = function(t, b, c, d, s) {if (s == undefined) s = 1.70158;return c*(t/=d)*t*((s+1)*t - s) + b;};sst.easeOutBack = function(t, b, c, d, s) {if (s == undefined) s = 1.70158;return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;};sst.easeInOutBack = function(t, b, c, d, s) {if (s == undefined) s = 1.70158; if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;};sst.objs = [];sst.paused = false;sst.getObjPos = function(obj) {var objs = sst.objs;var i = objs.length;while (--i>=0) {if (objs[i].obj == obj) {return i;}}return -1;};sst.getObjPropPos = function(obj, prop) {var objs = sst.objs;var i = objs.length;while (--i>=0) {if (objs[i].obj == obj) {var arrobj = objs[i];var j = arrobj.length;while (--j>=0) {if (arrobjs[j].prop == prop) {return [i, j];}}return [i, -1];}}return [-1, -1];};sst.stopTransI = function(idxo, idxp) {sst.objs[idxo].splice(idxp, 1);if (sst.objs[idxo].length == 0) {sst.objs.splice(idxo, 1);}};sst.stopTrans = function(obj, prop) {var objs = sst.objs;if (obj == undefined) {sst.objs = [];} else {if (prop == undefined) {objs.splice(sst.getObjPos(obj), 1);} else {var idx = sst.getObjPropPos(obj, prop);objs[idx[0]].splice(idx[1], 1);if (objs[idx[0]].length == 0) {objs.splice(idx[0], 1);}}}};sst.endTrans = function(obj, prop) {var objs = sst.objs;var sst = sst;if (obj == undefined) {var j, arrobj, i = objs.length;while (--i>=0) {j = objs[i].length;arrobj = objs[i];while (--j>=0) {arrobj.obj[arrobj[j].prop] = arrobj[j].x1;}}sst.objs = [];} else {if (prop == undefined) {var idx = sst.getObjPos(obj);var arrobj = objs[idx];var i = arrobj.length;while (--i>=0) {arrobj.obj[arrobj[i].prop] = arrobj[j].x1;arrobj[i].callback();}objs.splice(idx, 1);} else {var idx = sst.getObjPropPos(obj, prop);var arrobj = objs[idx[0]];arrobj.obj[prop] = arrobj[idx[1]].x1;arrobj[idx[1]].callback();objs[idx[0]].splice(idx[1], 1);if (objs[idx[0]].length == 0) {objs.splice(idx[0], 1);}}}};sst.onEnterFrame = function(ff, idxo, idxp) {if (!sst.paused || idxo != undefined) {var i, j;if (idxo == undefined) {i = sst.objs.length;} else {i = idxo+1;}while (--i>=0) {var arrobj = sst.objs[i];if (String(arrobj.obj) == "") {sst.objs.splice(i,1);} else {if (idxp == undefined) {j = arrobj.length;} else {j = idxp+1;}while (--j>=0) {with (arrobj[j]) {if (++t>=t0) {if (t == t0+dt) {arrobj.obj[prop] = x1;sst.stopTransI(i, j);if(typeof(callback)=="function"){callback();}} else {if (t%rate == 0) {arrobj.obj[prop] = trans(t-t0, x0, dx, dt, p1, p2);}}}}if (idxo != undefined) {return;}}}}}};sstInt=setInterval(sst.onEnterFrame,1000/fps);ssTrans = function(obj, prop, x0, x1, t0, dt, trans, callback, rate, p1, p2) {if (arguments.length<6) {return;}if (prop.push == undefined) {prop = [prop];}var i, j, tmp, nr = prop.length;for(i=6;i<11;i++){if(arguments[i] == undefined){arguments[i]=[];}}for (i=1; i<11; i++) {if (arguments[i].push == undefined) {tmp = arguments[i];arguments[i] = [];for (j=0; j<nr; j++) {arguments[i].push(tmp);}}}x0 = arguments[2];x1 = arguments[3];t0 = arguments[4];dt = arguments[5];trans = arguments[6];callback = arguments[7];rate = arguments[8];p1 = arguments[9];p2 = arguments[10];var idxo = sst.getObjPos(obj);if (idxo == -1) {var arrobj = sst.objs[idxo=sst.objs.push([])-1];arrobj.obj = obj;} else {var arrobj = sst.objs[idxo];}for (i=0; i<nr; i++) {j = arrobj.length;while (--j>=0) {if (arrobj[j].prop == prop[i]) {arrobj.splice(j, 1);break;}}dt[i] = parseInt(dt[i]*fps/1000);t0[i] = parseInt(t0[i]*fps/1000);rate[i] = rate[i] == undefined ? 1 : rate[i];p1[i] = p1[i] == undefined ? 1 : p1[i];p2[i] = p2[i] == undefined ? 1 : p2[i];trans[i] = sst[trans[i]];if (trans[i] == undefined) {trans[i] = sst.linear;}if (p1[i] == undefined && trans[i] == "easeIn" && trans[i] == "easeOut" && trans[i] == "easeInOut") {p1[i] = 1;}var idxp = arrobj.push({obj:obj, prop:prop[i], x0:x0[i], dx:x1[i]-x0[i], x1:x1[i], t0:t0[i], t:-1, dt:dt[i], trans:trans[i], callback:callback[i], rate:rate[i], p1:p1[i], p2:p2[i]})-1;sst.onEnterFrame(null,idxo, idxp);}obj.stopTrans = sst.stopTrans;obj.endTrans = sst.endTrans;};
