var AnimationUtilities={getStyleValue:function(c,a){var b="";if(document.defaultView&&document.defaultView.getComputedStyle)b=document.defaultView.getComputedStyle(c,"").getPropertyValue(a);else if(c.currentStyle){a=a.replace(/\-(\w)/g,function(b,a){return a.toUpperCase()});b=c.currentStyle[a]}return b},convertFromHex:function(a){return parseInt(a,16)},convertToHex:function(b){var a=b.toString(16);if(a.length==1)a="0"+a;return a},rgbToHex:function(b){if(b.indexOf(",")>-1){var a=b.split(","),e=parseInt(a[0].substring(4)),d=parseInt(a[1]),c=parseInt(a[2].substring(0,a[2].length-1));return"#"+this.convertToHex(e)+this.convertToHex(d)+this.convertToHex(c)}else return b},fadeBackgroundToColor:function(a,b,d){if(typeof a=="string")a=document.getElementById(a);var q=10,i=.1,c=this.rgbToHex(a.style.backgroundColor),g=this.convertFromHex(c.substring(1,3)),f=this.convertFromHex(c.substring(3,5)),e=this.convertFromHex(c.substring(5,7)),m=this.convertFromHex(b.substring(1,3)),l=this.convertFromHex(b.substring(3,5)),k=this.convertFromHex(b.substring(5,7)),p=m-g,o=l-f,n=k-e;h(0);function h(b){var k=Math.min(Math.max(g+Math.round(p*(b/100)),0),255),d=Math.min(Math.max(f+Math.round(o*(b/100)),0),255),c=Math.min(Math.max(e+Math.round(n*(b/100)),0),255);a.style.backgroundColor="#"+AnimationUtilities.convertToHex(k)+AnimationUtilities.convertToHex(d)+AnimationUtilities.convertToHex(c);if(b<=100)setTimeout(function(){h(b+q)},i);else j()}function j(){a.style.backgroundColor=b;d&&d()}},fadeForegroundToColor:function(a,b,d){if(typeof a=="string")a=document.getElementById(a);var q=10,i=.1,c=this.rgbToHex(a.style.color),g=this.convertFromHex(c.substring(1,3)),f=this.convertFromHex(c.substring(3,5)),e=this.convertFromHex(c.substring(5,7)),m=this.convertFromHex(b.substring(1,3)),l=this.convertFromHex(b.substring(3,5)),k=this.convertFromHex(b.substring(5,7)),p=m-g,o=l-f,n=k-e;h(0);function h(b){var k=Math.min(Math.max(g+Math.round(p*(b/100)),0),255),d=Math.min(Math.max(f+Math.round(o*(b/100)),0),255),c=Math.min(Math.max(e+Math.round(n*(b/100)),0),255);a.style.color="#"+AnimationUtilities.convertToHex(k)+AnimationUtilities.convertToHex(d)+AnimationUtilities.convertToHex(c);if(b<=100)setTimeout(function(){h(b+q)},i);else j()}function j(){a.style.color=b;d&&d()}},flash:function(a,c,d){if(typeof a=="string")a=document.getElementById(a);var q=1,i=.1,b=this.rgbToHex(a.style.color),h=this.convertFromHex(c.substring(1,3)),g=this.convertFromHex(c.substring(3,5)),f=this.convertFromHex(c.substring(5,7)),m=this.convertFromHex(b.substring(1,3)),l=this.convertFromHex(b.substring(3,5)),k=this.convertFromHex(b.substring(5,7)),p=m-h,o=l-g,n=k-f;e(0);function e(b){var k=Math.min(Math.max(h+Math.round(p*(b/100)),0),255),d=Math.min(Math.max(g+Math.round(o*(b/100)),0),255),c=Math.min(Math.max(f+Math.round(n*(b/100)),0),255);a.style.color="#"+AnimationUtilities.convertToHex(k)+AnimationUtilities.convertToHex(d)+AnimationUtilities.convertToHex(c);if(b<=100)setTimeout(function(){e(b+q)},i);else j()}function j(){a.style.color=b;d&&d()}},fadeOut:function(a,c,b){if(typeof a=="string")a=document.getElementById(a);if(!b)b=.1;var e=.1;d(1);function d(c){a.style.opacity=c;a.style.filter="alpha(opacity="+Math.round(c*100)+");";if(a.style.zoom=="")a.style.zoom="1";if(c>0)setTimeout(function(){d(c-b)},e);else f()}function f(){a.style.opacity="0.00";a.style.filter="alpha(opacity=00);";c&&c()}},rollUp:function(a,d){if(typeof a=="string")a=document.getElementById(a);if(a.animating)return;a.animating=true;var g=.1,b=a.clientHeight;if(a.offsetHeight>b)b=a.offsetHeight;var h=a.style.overflow?a.style.overflow:"auto";a.style.overflow="hidden";var c=0;e(0);function f(c){for(var b=0,a=c;a>0;a--)b+=a;return b}function e(d){if(b-d>0){a.style.height=b-d+"px";a.scrollTop=d}if(b-d>f(c+1))c++;else if(c>1)c--;if(d<b)setTimeout(function(){e(d+c)},g);else i()}function i(){a.style.overflow=h;a.style.height=b+"px";a.animating=null;d&&d()}},rollLeft:function(a,c){if(typeof a=="string")a=document.getElementById(a);if(a.animating)return;a.animating=true;var f=.1,g=a.style.overflow?a.style.overflow:"auto";a.style.overflow="hidden";var b=0;d(0);function e(c){for(var b=0,a=c;a>0;a--)b+=a;return b}function d(c){if(a.offsetWidth-c>=0)a.style.marginLeft="-"+c+"px";if(a.offsetWidth-c>e(b+1))b++;else if(b>1)b--;if(c<a.offsetWidth)setTimeout(function(){d(c+b)},f);else h()}function h(){a.style.overflow=g;a.animating=null;a.style.marginLeft="-"+a.offsetWidth+"px";c&&c()}},rollRight:function(a,c){if(typeof a=="string")a=document.getElementById(a);if(a.animating)return;a.animating=true;var f=.1;a.style.overflow="hidden";var b=0;d(0);function e(c){for(var b=0,a=c;a>0;a--)b+=a;return b}function d(c){if(a.offsetWidth-c>=0)a.style.marginLeft=c+"px";if(a.offsetWidth-c>e(b+1))b++;else if(b>1)b--;if(c<a.offsetWidth)setTimeout(function(){d(c+b)},f);else g()}function g(){a.animating=null;a.style.marginLeft=a.offsetWidth+"px";c&&c()}},rollDown:function(a,d){if(typeof a=="string")a=document.getElementById(a);if(a.animating)return;a.animating=true;var g=.1,c=a.clientHeight;if(a.offsetHeight>c)c=a.offsetHeight;var h=a.style.overflow?a.style.overflow:"auto",b=0;a.style.overflow="hidden";if(a.style.zoom=="")a.style.zoom="1";e(c);function f(c){for(var b=0,a=c;a>0;a--)b+=a;return b}function e(d){a.style.height=c-d+"px";a.scrollTop=d;if(d>f(b+1))b++;else if(b>1)b--;if(d>0)setTimeout(function(){e(d-b)},g);else i()}function i(){a.style.overflow=h;a.style.height="";a.animating=null;d&&d()}},rollUpAndFade:function(a,d){if(typeof a=="string")a=document.getElementById(a);var g=.1,b=a.clientHeight;if(a.offsetHeight>b)b=a.offsetHeight;var h=a.style.overflow?a.style.overflow:"auto";a.style.overflow="hidden";var c=0;e(0);function f(c){for(var b=0,a=c;a>0;a--)b+=a;return b}function e(d){if(b-d>0){a.style.height=b-d+"px";a.scrollTop=d}a.style.opacity=1-Math.round(d/b*100)/100;a.style.filter="alpha(opacity="+(100-Math.round(d/b*100))+");";if(b-d>f(c+1))c++;else if(c>1)c--;if(d<b)setTimeout(function(){e(d+c)},g);else i()}function i(){a.style.overflow=h;a.style.height="0px";d&&d()}},rollDownAndFade:function(a,d){if(typeof a=="string")a=document.getElementById(a);var g=.1,b=a.clientHeight;if(a.offsetHeight>b)b=a.offsetHeight;var h=a.style.overflow?a.style.overflow:"auto",c=0;a.style.overflow="hidden";if(a.style.zoom=="")a.style.zoom="1";e(b);function f(c){for(var b=0,a=c;a>0;a--)b+=a;return b}function e(d){a.style.height=b-d+"px";a.scrollTop=d;a.style.opacity=1-Math.round(d/b*100)/100;a.style.filter="alpha(opacity="+(100-Math.round(d/b*100))+");";if(d>f(c+1))c++;else if(c>1)c--;if(d>0)setTimeout(function(){e(d-c)},g);else i()}function i(){a.style.overflow=h;a.style.height=b+"px";d&&d()}},transitionSlideLeft:function(a,c,d){if(typeof a=="string")a=document.getElementById(a);if(typeof c=="string")c=document.getElementById(c);if(a.animating)return;a.animating=true;var g=.1,h=a.style.overflow?a.style.overflow:"auto";a.style.overflow="hidden";var b=0;e(0);function f(c){for(var b=0,a=c;a>0;a--)b+=a;return b}function e(d){if(a.offsetWidth-d>=0){a.style.marginLeft="-"+d+"px";c.style.marginLeft=a.offsetWidth-d+"px"}if(a.offsetWidth-d>f(b+1))b++;else if(b>1)b--;if(d<a.offsetWidth)setTimeout(function(){e(d+b)},g);else i()}function i(){a.style.overflow=h;a.animating=null;a.style.marginLeft="-"+a.offsetWidth+"px";d&&d()}},transitionSlideRight:function(a,c,d){if(typeof a=="string")a=document.getElementById(a);if(typeof c=="string")c=document.getElementById(c);if(a.animating)return;a.animating=true;var g=.1,h=a.style.overflow?a.style.overflow:"auto";a.style.overflow="hidden";var b=0;e(0);function f(c){for(var b=0,a=c;a>0;a--)b+=a;return b}function e(d){if(a.offsetWidth-d>=0){a.style.marginLeft=d+"px";c.style.marginLeft=d-a.offsetWidth+"px"}if(a.offsetWidth-d>f(b+1))b++;else if(b>1)b--;if(d<a.offsetWidth)setTimeout(function(){e(d+b)},g);else i()}function i(){a.style.overflow=h;a.animating=null;a.style.marginLeft=a.offsetWidth+"px";d&&d()}}},GPAnimation=function(){this.defaultInterval=10;this.defaultAnimationLength=300};GPAnimation.prototype.convertFromHex=function(a){return parseInt(a,16)};GPAnimation.prototype.convertToHex=function(b){var a=b.toString(16);if(a.length==1)a="0"+a;return a};GPAnimation.prototype.normalizeColor=function(a){var c,b,d;if(a.length==4){c="#";for(b=1,d=a.length;b<d;b++)c+=a.charAt(b)+a.charAt(b)}else c=a;return c};GPAnimation.prototype.rgbToHex=function(b){if(b.indexOf(",")>-1){var a=b.split(","),e=parseInt(a[0].substring(4)),d=parseInt(a[1]),c=parseInt(a[2].substring(0,a[2].length-1));return"#"+this.convertToHex(e)+this.convertToHex(d)+this.convertToHex(c)}else return b};GPAnimation.prototype.getStyleValue=function(c,a){var b="";if(document.defaultView&&document.defaultView.getComputedStyle)b=document.defaultView.getComputedStyle(c,"").getPropertyValue(a);else if(c.currentStyle){a=a.replace(/\-(\w)/g,function(b,a){return a.toUpperCase()});b=c.currentStyle[a]}return b};GPAnimation.prototype.findLeft=function(a){if(typeof a=="string")a=document.getElementById(a);if(a==null)return;var b=0;if(a.offsetParent)while(true){b+=a.offsetLeft;if(!a.offsetParent)break;a=a.offsetParent}else if(a.x)b+=a.x;return b};GPAnimation.prototype.findTop=function(a){if(typeof a=="string")a=document.getElementById(a);if(a==null)return;var b=0;if(a.offsetParent)while(true){if(a.offsetTop)b+=a.offsetTop;if(!a.offsetParent)break;a=a.offsetParent}else if(a.y)b+=a.y;return b};GPAnimation.prototype.slideTop=function(a,c,b,e){if(typeof a=="string")a=document.getElementById(a);if(!b)b=this.defaultAnimationLength;a.slideTopTimer&&window.clearInterval(a.slideTopTimer);var i=(new Date).getTime(),d=parseInt(this.getStyleValue(a,"height")),h=c-d,f=this.findTop(a)+c,g=this;a.slideTopTimer=window.setInterval(function(){var l=(new Date).getTime(),j=l-i;if(j>=b){window.clearInterval(a.slideTopTimer);a.style.height=c+"px";a.style.top=f-c+"px";e&&e()}else{var k=parseInt(g.easeOut(j,b,h));a.style.height=d+k+"px";a.style.top=f-k+"px"}},this.defaultInterval)};GPAnimation.prototype.slideBottom=function(a,d,c,e){if(typeof a=="string")a=document.getElementById(a);if(!c)c=this.defaultAnimationLength;a.slideBottomTimer&&window.clearInterval(a.slideBottomTimer);var h=(new Date).getTime(),b=this.getStyleValue(a,"height");if(b=="auto")b=a.offsetHeight;b=parseInt(b);var g=d-b,f=this;a.slideBottomTimer=window.setInterval(function(){var k=(new Date).getTime(),i=k-h;if(i>=c){window.clearInterval(a.slideBottomTimer);a.style.height=d+"px";a.scrollTop=0;e&&e()}else{var j=parseInt(f.easeOut(i,c,g));a.style.height=b+j+"px";a.scrollTop=a.scrollHeight}},this.defaultInterval)};GPAnimation.prototype.slideLeft=function(a,c,b,f){if(typeof a=="string")a=document.getElementById(a);if(!b)b=this.defaultAnimationLength;a.slideLeftTimer&&window.clearInterval(a.slideLeftTimer);var i=(new Date).getTime(),d=parseInt(this.getStyleValue(a,"width")),h=c-d,e=this.findLeft(a)+c,g=this;a.slideLeftTimer=window.setInterval(function(){var l=(new Date).getTime(),j=l-i;if(j>=b){window.clearInterval(a.slideLeftTimer);a.style.width=c+"px";a.style.left=e-c+"px";f&&f()}else{var k=parseInt(g.easeOut(j,b,h));a.style.width=d+k+"px";a.style.left=e-k+"px"}},this.defaultInterval)};GPAnimation.prototype.slideRight=function(a,e,b,d){if(typeof a=="string")a=document.getElementById(a);if(!b)b=this.defaultAnimationLength;a.slideRightTimer&&window.clearInterval(a.slideRightTimer);var h=(new Date).getTime(),c=parseInt(this.getStyleValue(a,"width")),g=e-c,f=this;a.slideRightTimer=window.setInterval(function(){var k=(new Date).getTime(),i=k-h;if(i>=b){window.clearInterval(a.slideRightTimer);a.style.width=e+"px";d&&d()}else{var j=parseInt(f.easeOut(i,b,g));a.style.width=c+j+"px"}},this.defaultInterval)};GPAnimation.prototype.scrollToTop=function(a,c,b){if(typeof a=="string")a=document.getElementById(a);if(!b)b=this.defaultAnimationLength;this.scrollToPosition(a,0,c,b)};GPAnimation.prototype.scrollToBottom=function(a,c,b){if(typeof a=="string")a=document.getElementById(a);if(!b)b=this.defaultAnimationLength;this.scrollToPosition(a,a.scrollHeight,c,b)};GPAnimation.prototype.scrollToPosition=function(a,c,d,b){if(typeof a=="string")a=document.getElementById(a);if(!b)b=this.defaultAnimationLength;a.scrollToPositionTimer&&window.clearInterval(a.scrollToPositionTimer);var g=(new Date).getTime(),e=parseInt(a.scrollTop),h=c-e,f=this;a.scrollToPositionTimer=window.setInterval(function(){var k=(new Date).getTime(),i=k-g;if(i>=b){window.clearInterval(a.scrollToPositionTimer);a.scrollTop=c;d&&d()}else{var j=parseInt(f.easeOut(i,b,h));a.scrollTop=e+j}},this.defaultInterval)};GPAnimation.prototype.easeOut=function(a,c,b){return-b*((a=a/c-1)*a*a*a-1)};GPAnimation.prototype.easeInOut=function(a,c,b){return(a/=c/2)<1?b/2*a*a*a*a:-b/2*((a-=2)*a*a*a-2)};GPAnimation.prototype.fadeBackgroundToColor=function(a,e,i,b){if(typeof a=="string")a=document.getElementById(a);if(!b)b=this.defaultAnimationLength;a.fadeBackgroundToColorTimer&&window.clearInterval(a.fadeBackgroundToColorTimer);var p=(new Date).getTime(),d,h,g,f,l,k,j,o,n,m;d=this.rgbToHex(this.getStyleValue(a,"background-color"));h=this.convertFromHex(d.substring(1,3));g=this.convertFromHex(d.substring(3,5));f=this.convertFromHex(d.substring(5,7));l=this.convertFromHex(e.substring(1,3));k=this.convertFromHex(e.substring(3,5));j=this.convertFromHex(e.substring(5,7));o=l-h;n=k-g;m=j-f;var c=this;a.fadeBackgroundToColorTimer=window.setInterval(function(){var q=(new Date).getTime(),d=q-p,l,k,j;if(d>=b){window.clearInterval(a.fadeBackgroundToColorTimer);a.style.backgroundColor=e;i&&i()}else{l=h+parseInt(c.easeOut(d,b,o));k=g+parseInt(c.easeOut(d,b,n));j=f+parseInt(c.easeOut(d,b,m));a.style.backgroundColor="#"+c.convertToHex(l)+c.convertToHex(k)+c.convertToHex(j)}},this.defaultInterval)};GPAnimation.prototype.iterator=function(e,b,d,c,a){if(!a)a=this.defaultAnimationLength;document.body.iteratorTimer&&window.clearInterval(document.body.iteratorTimer);var h=(new Date).getTime(),g=d-b,f=this;document.body.iteratorTimer=window.setInterval(function(){var k=(new Date).getTime(),i=k-h;if(i>=a){window.clearInterval(document.body.iteratorTimer);e(d);c&&c()}else{var j=parseInt(f.easeOut(i,a,g));e(b+j)}},this.defaultInterval)};GPAnimation.prototype.flash=function(a,e,i,c){if(typeof a=="string")a=document.getElementById(a);if(!c)this.defaultAnimationLength;a.flashTimer&&window.clearInterval(a.flashTimer);var p=(new Date).getTime(),d,h,g,f,l,k,j,o,n,m;e=this.normalizeColor(e);d=this.normalizeColor(this.rgbToHex(this.getStyleValue(a,"color")));h=this.convertFromHex(e.substring(1,3));g=this.convertFromHex(e.substring(3,5));f=this.convertFromHex(e.substring(5,7));l=this.convertFromHex(d.substring(1,3));k=this.convertFromHex(d.substring(3,5));j=this.convertFromHex(d.substring(5,7));o=l-h;n=k-g;m=j-f;var b=this;a.flashTimer=window.setInterval(function(){var q=(new Date).getTime(),e=q-p,l,k,j;if(e>=c){window.clearInterval(a.flashTimer);a.style.color=d;i&&i()}else{l=h+parseInt(b.easeOut(e,c,o));k=g+parseInt(b.easeOut(e,c,n));j=f+parseInt(b.easeOut(e,c,m));a.style.color="#"+b.convertToHex(l)+b.convertToHex(k)+b.convertToHex(j)}},this.defaultInterval)};var gpAnimation=new GPAnimation
