
 // cached 02/20/2012 20:06pm 


/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 3/9/2009
 * @author Ariel Flesler
 * @version 1.4.1
 *
 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
 */
;(function($){var m=$.scrollTo=function(b,h,f){$(window).scrollTo(b,h,f)};m.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1};m.window=function(b){return $(window).scrollable()};$.fn.scrollable=function(){return this.map(function(){var b=this,h=!b.nodeName||$.inArray(b.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!h)return b;var f=(b.contentWindow||b).document||b.ownerDocument||b;return $.browser.safari||f.compatMode=='BackCompat'?f.body:f.documentElement})};$.fn.scrollTo=function(l,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};if(l=='max')l=9e9;a=$.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=$(k),d=l,p,g={},q=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px)?$/.test(d)){d=n(d);break}d=$(d,this);case'object':if(d.is||d.style)p=(d=$(d)).offset()}$.each(a.axis.split(''),function(b,h){var f=h=='x'?'Left':'Top',i=f.toLowerCase(),c='scroll'+f,r=k[c],s=h=='x'?'Width':'Height';if(p){g[c]=p[i]+(q?0:r-o.offset()[i]);if(a.margin){g[c]-=parseInt(d.css('margin'+f))||0;g[c]-=parseInt(d.css('border'+f+'Width'))||0}g[c]+=a.offset[i]||0;if(a.over[i])g[c]+=d[s.toLowerCase()]()*a.over[i]}else g[c]=d[i];if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],u(s));if(!b&&a.queue){if(r!=g[c])t(a.onAfterFirst);delete g[c]}});t(a.onAfter);function t(b){o.animate(g,j,a.easing,b&&function(){b.call(this,l,a)})};function u(b){var h='scroll'+b;if(!q)return k[h];var f='client'+b,i=k.ownerDocument.documentElement,c=k.ownerDocument.body;return Math.max(i[h],c[h])-Math.min(i[f],c[f])}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);

/*
* jQuery Color Animations
* Copyright 2007 John Resig
* Released under the MIT and GPL licenses.
*/

(function(jQuery){

    // We override the animation for all of these color styles
    jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
        jQuery.fx.step[attr] = function(fx){
            if ( !fx.colorInit ) {
                fx.start = getColor( fx.elem, attr );
                fx.end = getRGB( fx.end );
                fx.colorInit = true;
            }

            fx.elem.style[attr] = "rgb(" + [
                Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0),
                Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0),
                Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0)
            ].join(",") + ")";
        }
    });

    // Color Conversion functions from highlightFade
    // By Blair Mitchelmore
    // http://jquery.offput.ca/highlightFade/

    // Parse strings looking for color tuples [255,255,255]
    function getRGB(color) {
        var result;

        // Check if we're already dealing with an array of colors
        if ( color && color.constructor == Array && color.length == 3 )
            return color;

        // Look for rgb(num,num,num)
        if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
            return [parseInt(result[1]), parseInt(result[2]), parseInt(result[3])];

        // Look for rgb(num%,num%,num%)
        if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
            return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];

        // Look for #a0b1c2
        if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
            return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];

        // Look for #fff
        if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
            return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];

        // Look for rgba(0, 0, 0, 0) == transparent in Safari 3
        if (result = /rgba\(0, 0, 0, 0\)/.exec(color))
            return colors['transparent'];

        // Otherwise, we're most likely dealing with a named color
        return colors[jQuery.trim(color).toLowerCase()];
    }

    function getColor(elem, attr) {
        var color;

        do {
            color = jQuery.curCSS(elem, attr);

            // Keep going until we find an element that has color, or we hit the body
            if ( color != '' && color != 'transparent' || jQuery.nodeName(elem, "body") )
                break;

            attr = "backgroundColor";
        } while ( elem = elem.parentNode );

        return getRGB(color);
    };

    // Some named colors to work with
    // From Interface by Stefan Petre
    // http://interface.eyecon.ro/

    var colors = {
        aqua:[0,255,255],
        azure:[240,255,255],
        beige:[245,245,220],
        black:[0,0,0],
        blue:[0,0,255],
        brown:[165,42,42],
        cyan:[0,255,255],
        darkblue:[0,0,139],
        darkcyan:[0,139,139],
        darkgrey:[169,169,169],
        darkgreen:[0,100,0],
        darkkhaki:[189,183,107],
        darkmagenta:[139,0,139],
        darkolivegreen:[85,107,47],
        darkorange:[255,140,0],
        darkorchid:[153,50,204],
        darkred:[139,0,0],
        darksalmon:[233,150,122],
        darkviolet:[148,0,211],
        fuchsia:[255,0,255],
        gold:[255,215,0],
        green:[0,128,0],
        indigo:[75,0,130],
        khaki:[240,230,140],
        lightblue:[173,216,230],
        lightcyan:[224,255,255],
        lightgreen:[144,238,144],
        lightgrey:[211,211,211],
        lightpink:[255,182,193],
        lightyellow:[255,255,224],
        lime:[0,255,0],
        magenta:[255,0,255],
        maroon:[128,0,0],
        navy:[0,0,128],
        olive:[128,128,0],
        orange:[255,165,0],
        pink:[255,192,203],
        purple:[128,0,128],
        violet:[128,0,128],
        red:[255,0,0],
        silver:[192,192,192],
        white:[255,255,255],
        yellow:[255,255,0],
        transparent: [255,255,255]
    };

})(jQuery);



// MSDropDown - jquery.dd.js
// author: Marghoob Suleman
// Date: 12th Aug, 2009
// Version: 2.1 {date: 3rd Sep 2009}
// Revision: 25
// web: www.giftlelo.com | www.marghoobsuleman.com
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(5($){3 D="";$.2h.10=5(v){$O=O;v=$.2T({S:2U,1o:7,2i:23,1h:J,1i:2V,M:\'\'},v);3 w="";3 x={};x.1F=J;x.1p=H;x.1q=1G;3 y=H;2j={1H:\'2W\',1r:\'2X\',1I:\'2Y\',18:\'2Z\',T:\'31\',2k:\'32\',2l:\'33\',34:\'35\',1s:\'36\',2m:\'3a\'};11={10:\'10\',1J:\'1J\',1K:\'1K\',1L:\'1L\',1M:.30};2n={2o:"2p,2q,1N,1O,1P,1Q,1j,1R,1S,1T,3b,1U,1V",3c:"1W,1X,12,3d"};3 z=$(O).8("E");3 A=$(O).8("M");v.M+=(A==Q)?"":A;3 B=$(O).2r();y=($(O).8("1W")>0||$(O).8("1X")==J)?J:H;4(y){v.1o=$(O).8("1W")};3 C={};2s();5 9(a){U z+2j[a]};5 1Y(a){3 b=a;3 c=$(b).8("M");U c};5 1Z(a){3 b=$("#"+z+" 1t:6");4(b.I>1){Y(3 i=0;i<b.I;i++){4(a==b[i].K){U J}}}N 4(b.I==1){4(b[0].K==a){U J}};U H}5 2t(){3 r=B;3 s="";3 t=9("2k");3 u=9("2l");r.2u(5(i){3 j=r[i];4(j.3e=="3f"){s+="<V W=\'3g\'>";s+="<19 M=\'2v-3h:3i;2v-M:3j; 3k:3l;\'>"+$(j).8("3m")+"</19>";3 k=$(j).2r();k.2u(5(a){3 b=k[a];3 c=u+"20"+(i)+"20"+(a);3 d=$(b).8("21");d=(d.I==0)?"":\'<22 24="\'+d+\'" 25="26" /> \';3 e=$(b).R();3 f=$(b).2w();3 g=($(b).8("12")==J)?"12":"1k";C[c]={1a:d+e,28:f,R:e,K:b.K,E:c};3 h=1Y(b);4(1Z(b.K)==J){s+=\'<a 1u="1v:1w(0);" W="6 \'+g+\'"\'}N{s+=\'<a  1u="1v:1w(0);" W="\'+g+\'"\'};4(h!=H)s+=\' M="\'+h+\'"\';s+=\' E="\'+c+\'">\';s+=d+e+\'</a>\'});s+="</V>"}N{3 l=t+"20"+(i);3 m=$(j).8("21");m=(m.I==0)?"":\'<22 24="\'+m+\'" 25="26" /> \';3 n=$(j).R();3 o=$(j).2w();3 p=($(j).8("12")==J)?"12":"1k";C[l]={1a:m+n,28:o,R:n,K:j.K,E:l};3 q=1Y(j);4(1Z(j.K)==J){s+=\'<a 1u="1v:1w(0);" W="6 \'+p+\'"\'}N{s+=\'<a  1u="1v:1w(0);" W="\'+p+\'"\'};4(q!=H)s+=\' M="\'+q+\'"\';s+=\' E="\'+l+\'">\';s+=m+n+\'</a>\'}});U s};5 2x(){3 a=9("1r");3 b=9("T");3 c=v.M;1b="";1b+=\'<V E="\'+b+\'" W="\'+11.1L+\'"\';4(!y){1b+=(c!="")?\' M="\'+c+\'"\':\'\'}N{1b+=(c!="")?\' M="3n-1x:3o 3p #3q;2y:3r;1y:3s;\'+c+\'"\':\'\'}1b+=\'>\';U 1b};5 2z(){3 a=9("1I");3 b=9("1s");3 c=9("18");3 d=9("2m");3 e=$("#"+z+" 1t:6").R();3 f=$("#"+z+" 1t:6").8("21");f=(f.I==0||f==Q||v.1h==H)?"":\'<22 24="\'+f+\'" 25="26" /> \';3 g=\'<V E="\'+a+\'" W="\'+11.1J+\'"\';g+=\'>\';g+=\'<19 E="\'+b+\'" W="\'+11.1K+\'"></19><19 W="3t" E="\'+c+\'">\'+f+e+\'</19></V>\';U g};5 2s(){3 d=H;3 e=9("1r");3 f=9("1I");3 g=9("18");3 h=9("T");3 i=9("1s");3 j=$("#"+z).29();3 k=v.M;4($("#"+e).I>0){$("#"+e).3u();d=J}3 l=\'<V E="\'+e+\'" W="\'+11.10+\'"\';l+=(k!="")?\' M="\'+k+\'"\':\'\';l+=\'>\';4(!y)l+=2z();l+=2x();l+=2t();l+="</V>";l+="</V>";4(d==J){3 m=9("1H");$("#"+m).2a(l)}N{$("#"+z).2a(l)}$("#"+e).P("29",j+"2b");$("#"+h).P("29",(j-2)+"2b");4(B.I>v.1o){3 n=1l($("#"+h+" a:2A").P("2B-3v"))+1l($("#"+h+" a:2A").P("2B-1x"));3 o=((v.2i)*v.1o)-n;$("#"+h).P("S",o+"2b")}4(d==H){2C();2D(z)}4($("#"+z).8("12")==J){$("#"+e).P("2E",11.1M)}N{2F();4(!y){$("#"+f).G("1c",5(a){2c(1)});$("#"+f).G("1z",5(a){2c(0)})};$("#"+h+" a.1k").G("2d",5(a){a.1m();2G(O);4(!y){$("#"+h).14("1c");1d(H);3 b=(v.1h==H)?$(O).R():$(O).1a();1A(b);1B()};1e()});$("#"+h+" a.12").P("2E",11.1M);4(y){$("#"+h).G("1c",5(c){4(!x.1p){x.1p=J;$(F).G("1C",5(a){3 b=a.2H;x.1q=b;4(b==39||b==2I){a.1m();a.1D();2e();1e()};4(b==37||b==38){a.1m();a.1D();2f();1e()}})}})};$("#"+h).G("1z",5(a){1d(H);$(F).14("1C");x.1p=H;x.1q=1G});4(!y){$("#"+f).G("2d",5(b){1d(H);4($("#"+h+":3w").I==1){$("#"+h).14("1c")}N{$("#"+h).G("1c",5(a){1d(J)});2J()}})};$("#"+f).G("1z",5(a){1d(H)})}};5 2K(a){Y(3 i 3x C){4(C[i].K==a){U C[i]}}}5 2G(a){3 b=9("T");4(!y){$("#"+b+" a.6").1f("6")}3 c=$("#"+b+" a.6").8("E");4(c!=Q){3 d=(x.1g==Q||x.1g==1G)?C[c].K:x.1g};4(a&&!y){$(a).15("6")};4(y){3 e=x.1q;4($("#"+z).8("1X")==J){4(e==17){x.1g=C[$(a).8("E")].K;$(a).3y("6")}N 4(e==16){$("#"+b+" a.6").1f("6");$(a).15("6");3 f=$(a).8("E");3 g=C[f].K;Y(3 i=2L.3z(d,g);i<=2L.3A(d,g);i++){$("#"+2K(i).E).15("6")}}N{$("#"+b+" a.6").1f("6");$(a).15("6");x.1g=C[$(a).8("E")].K}}N{$("#"+b+" a.6").1f("6");$(a).15("6");x.1g=C[$(a).8("E")].K}}};5 2D(a){F.L(a).3B=5(e){$("#"+O.E).10(v)}};5 1d(a){x.1F=a};5 2M(){U x.1F};5 2F(){3 b=9("1r");3 c=2n.2o.3C(",");Y(3 d=0;d<c.I;d++){3 e=c[d];3 f=$("#"+z).8(e);4(f!=Q){3D(e){Z"2p":$("#"+b).G("3E",5(a){F.L(z).2N()});X;Z"1O":$("#"+b).G("2d",5(a){F.L(z).1O()});X;Z"1P":$("#"+b).G("3F",5(a){F.L(z).1P()});X;Z"1Q":$("#"+b).G("3G",5(a){F.L(z).1Q()});X;Z"1j":$("#"+b).G("1n",5(a){F.L(z).1j()});X;Z"1R":$("#"+b).G("1c",5(a){F.L(z).1R()});X;Z"1S":$("#"+b).G("3H",5(a){F.L(z).1S()});X;Z"1T":$("#"+b).G("1z",5(a){F.L(z).1T()});X}}}};5 2C(){3 a=9("1H");$("#"+z).2a("<V M=\'S:3I;3J:3K;1y:3L;\' E=\'"+a+"\'></V>");$("#"+z).3M($("#"+a))};5 1A(a){3 b=9("18");$("#"+b).1a(a)};5 2e(){3 a=9("18");3 b=9("T");3 c=$("#"+b+" a.1k");Y(3 d=0;d<c.I;d++){3 e=c[d];3 f=$(e).8("E");4($(e).2O("6")&&d<c.I-1){$("#"+b+" a.6").1f("6");$(c[d+1]).15("6");3 g=$("#"+b+" a.6").8("E");4(!y){3 h=(v.1h==H)?C[g].R:C[g].1a;1A(h)}4(1l(($("#"+g).1y().1x+$("#"+g).S()))>=1l($("#"+b).S())){$("#"+b).1E(($("#"+b).1E())+$("#"+g).S()+$("#"+g).S())};X}}};5 2f(){3 a=9("18");3 b=9("T");3 c=$("#"+b+" a.1k");Y(3 d=0;d<c.I;d++){3 e=c[d];3 f=$(e).8("E");4($(e).2O("6")&&d!=0){$("#"+b+" a.6").1f("6");$(c[d-1]).15("6");3 g=$("#"+b+" a.6").8("E");4(!y){3 h=(v.1h==H)?C[g].R:C[g].1a;1A(h)}4(1l(($("#"+g).1y().1x+$("#"+g).S()))<=0){$("#"+b).1E(($("#"+b).1E()-$("#"+b).S())-$("#"+g).S())};X}}};5 1e(){3 a=9("T");3 b=$("#"+a+" a.6");4(b.I==1){3 c=$("#"+a+" a.6").R();3 d=$("#"+a+" a.6").8("E");4(d!=Q){3 e=C[d].28;F.L(z).3N=C[d].K}}N 4(b.I>1){3 f=$("#"+z+" > 1t:6").3O("6");Y(3 i=0;i<b.I;i++){3 d=$(b[i]).8("E");3 g=C[d].K;F.L(z).3P[g].6="6"}}};5 2J(){3 c=9("T");4(D!=""&&c!=D){$("#"+D).2P("2g");$("#"+D).P({1i:\'0\'})};4($("#"+c).P("2y")=="3Q"){w=C[$("#"+c+" a.6").8("E")].R;$(F).G("1C",5(a){3 b=a.2H;4(b==39||b==2I){a.1m();a.1D();2e()};4(b==37||b==38){a.1m();a.1D();2f()};4(b==27||b==13){1B();1e()};4($("#"+z).8("1U")!=Q){F.L(z).1U()}});$(F).G("2Q",5(a){4($("#"+z).8("1V")!=Q){F.L(z).1V()}});$(F).G("1n",5(a){4(2M()==H){1B()}});$("#"+c).P({1i:v.1i});$("#"+c).3R("2g");4(c!=D){D=c}}};5 1B(){3 b=9("T");$(F).14("1C");$(F).14("2Q");$(F).14("1n");$("#"+b).2P("2g",5(a){2R();$("#"+b).P({1i:\'0\'})})};5 2R(){3 b=9("T");4($("#"+z).8("1N")!=Q){3 c=C[$("#"+b+" a.6").8("E")].R;4(w!=c){F.L(z).1N()}}4($("#"+z).8("1j")!=Q){F.L(z).1j()}4($("#"+z).8("2q")!=Q){$(F).G("1n",5(a){$("#"+z).2N();$("#"+z)[0].3S();1e();$(F).14("1n")})}};5 2c(a){3 b=9("1s");4(a==1)$("#"+b).P({2S:\'0 3T%\'});N $("#"+b).P({2S:\'0 0\'})}};$.2h.3U=5(a){3 b=$(O);Y(3 c=0;c<b.I;c++){3 d=$(b[c]).8("E");4(a==Q){$("#"+d).10()}N{$("#"+d).10(a)}}}})(3V);',62,244,'|||var|if|function|selected||attr|getPostID|||||||||||||||||||||||||||||||id|document|bind|false|length|true|index|getElementById|style|else|this|css|undefined|text|height|postChildID|return|div|class|break|for|case|dd|styles|disabled||unbind|addClass|||postTitleTextID|span|html|sDiv|mouseover|setInsideWindow|setValue|removeClass|oldIndex|showIcon|zIndex|onmouseup|enabled|parseInt|preventDefault|mouseup|visibleRows|keyboardAction|currentKey|postID|postArrowID|option|href|javascript|void|top|position|mouseout|setTitleText|closeMe|keydown|stopPropagation|scrollTop|insideWindow|null|postElementHolder|postTitleID|ddTitle|arrow|ddChild|disbaled|onchange|onclick|ondblclick|onmousedown|onmouseover|onmousemove|onmouseout|onkeydown|onkeyup|size|multiple|getOptionsProperties|matchIndex|_|title|img||src|align|left||value|width|after|px|hightlightArrow|click|next|previous|fast|fn|rowHeight|config|postAID|postOPTAID|postInputhidden|attributes|actions|onfocus|onblur|children|createDropDown|createATags|each|font|val|createChildDiv|display|createTitleDiv|first|padding|setOutOfVision|addNewEvents|opacity|applyEvents|manageSelection|keyCode|40|openMe|getByIndex|Math|getInsideWindow|focus|hasClass|slideUp|keyup|checkMethodAndApply|backgroundPosition|extend|120|9999|_msddHolder|_msdd|_title|_titletext||_child|_msa|_msopta|postInputID|_msinput|_arrow||||_inp|onkeypress|prop|tabindex|nodeName|OPTGROUP|opta|weight|bold|italic|clear|both|label|border|1px|solid|c3c3c3|block|relative|textTitle|remove|bottom|visible|in|toggleClass|min|max|refresh|split|switch|mouseenter|dblclick|mousedown|mousemove|0px|overflow|hidden|absolute|appendTo|selectedIndex|removeAttr|options|none|slideDown|blur|100|msDropDown|jQuery'.split('|'),0,{}))

/** * SWFAddress 2.3: Deep linking for Flash and Ajax <http://www.asual.com/swfaddress/> * * SWFAddress is (c) 2006-2009 Rostislav Hristov and contributors * This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> * */if(typeof asual=="undefined"){var asual={}}if(typeof asual.util=="undefined"){asual.util={}}asual.util.Browser=new function(){var b=navigator.userAgent.toLowerCase(),a=/webkit/.test(b),e=/opera/.test(b),c=/msie/.test(b)&&!/opera/.test(b),d=/mozilla/.test(b)&&!/(compatible|webkit)/.test(b),f=parseFloat(c?b.substr(b.indexOf("msie")+4):(b.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1]);this.toString=function(){return"[class Browser]"};this.getVersion=function(){return f};this.isMSIE=function(){return c};this.isSafari=function(){return a};this.isOpera=function(){return e};this.isMozilla=function(){return d}};asual.util.Events=new function(){var c="DOMContentLoaded",j="onstop",k=window,h=document,b=[],a=asual.util,e=a.Browser,d=e.isMSIE(),g=e.isSafari();this.toString=function(){return"[class Events]"};this.addListener=function(n,l,m){b.push({o:n,t:l,l:m});if(!(l==c&&(d||g))){if(n.addEventListener){n.addEventListener(l,m,false)}else{if(n.attachEvent){n.attachEvent("on"+l,m)}}}};this.removeListener=function(p,m,n){for(var l=0,o;o=b[l];l++){if(o.o==p&&o.t==m&&o.l==n){b.splice(l,1);break}}if(!(m==c&&(d||g))){if(p.removeEventListener){p.removeEventListener(m,n,false)}else{if(p.detachEvent){p.detachEvent("on"+m,n)}}}};var i=function(){for(var m=0,l;l=b[m];m++){if(l.t!=c){a.Events.removeListener(l.o,l.t,l.l)}}};var f=function(){if(h.readyState=="interactive"){function l(){h.detachEvent(j,l);i()}h.attachEvent(j,l);k.setTimeout(function(){h.detachEvent(j,l)},0)}};if(d||g){(function(){try{if((d&&h.body)||!/loaded|complete/.test(h.readyState)){h.documentElement.doScroll("left")}}catch(m){return setTimeout(arguments.callee,0)}for(var l=0,m;m=b[l];l++){if(m.t==c){m.l.call(null)}}})()}if(d){k.attachEvent("onbeforeunload",f)}this.addListener(k,"unload",i)};asual.util.Functions=new function(){this.toString=function(){return"[class Functions]"};this.bind=function(f,b,e){for(var c=2,d,a=[];d=arguments[c];c++){a.push(d)}return function(){return f.apply(b,a)}}};var SWFAddressEvent=function(d){this.toString=function(){return"[object SWFAddressEvent]"};this.type=d;this.target=[SWFAddress][0];this.value=SWFAddress.getValue();this.path=SWFAddress.getPath();this.pathNames=SWFAddress.getPathNames();this.parameters={};var c=SWFAddress.getParameterNames();for(var b=0,a=c.length;b<a;b++){this.parameters[c[b]]=SWFAddress.getParameter(c[b])}this.parameterNames=c};SWFAddressEvent.INIT="init";SWFAddressEvent.CHANGE="change";var SWFAddress=new function(){var _getHash=function(){var index=_l.href.indexOf("#");return index!=-1?_ec(_dc(_l.href.substr(index+1))):""};var _getWindow=function(){try{top.document;return top}catch(e){return window}};var _strictCheck=function(value,force){if(_opts.strict){value=force?(value.substr(0,1)!="/"?"/"+value:value):(value==""?"/":value)}return value};var _ieLocal=function(value,direction){return(_msie&&_l.protocol=="file:")?(direction?_value.replace(/\?/,"%3F"):_value.replace(/%253F/,"?")):value};var _searchScript=function(el){for(var i=0,l=el.childNodes.length,s;i<l;i++){if(el.childNodes[i].src){_url=String(el.childNodes[i].src)}if(s=_searchScript(el.childNodes[i])){return s}}};var _titleCheck=function(){if(_d.title!=_title&&_d.title.indexOf("#")!=-1){_d.title=_title}};var _listen=function(){if(!_silent){var hash=_getHash();var diff=!(_value==hash);if(_safari&&_version<523){if(_length!=_h.length){_length=_h.length;if(typeof _stack[_length-1]!=UNDEFINED){_value=_stack[_length-1]}_update.call(this)}}else{if(_msie&&diff){if(_version<7){_l.reload()}else{this.setValue(hash)}}else{if(diff){_value=hash;_update.call(this)}}}if(_msie){_titleCheck.call(this)}}};var _bodyClick=function(e){if(_popup.length>0){var popup=window.open(_popup[0],_popup[1],eval(_popup[2]));if(typeof _popup[3]!=UNDEFINED){eval(_popup[3])}}_popup=[]};var _swfChange=function(){for(var i=0,id,obj,value=SWFAddress.getValue(),setter="setSWFAddressValue";id=_ids[i];i++){obj=document.getElementById(id);if(obj){if(obj.parentNode&&typeof obj.parentNode.so!=UNDEFINED){obj.parentNode.so.call(setter,value)}else{if(!(obj&&typeof obj[setter]!=UNDEFINED)){var objects=obj.getElementsByTagName("object");var embeds=obj.getElementsByTagName("embed");obj=((objects[0]&&typeof objects[0][setter]!=UNDEFINED)?objects[0]:((embeds[0]&&typeof embeds[0][setter]!=UNDEFINED)?embeds[0]:null))}if(obj){obj[setter](value)}}}else{if(obj=document[id]){if(typeof obj[setter]!=UNDEFINED){obj[setter](value)}}}}};var _jsDispatch=function(type){this.dispatchEvent(new SWFAddressEvent(type));type=type.substr(0,1).toUpperCase()+type.substr(1);if(typeof this["on"+type]==FUNCTION){this["on"+type]()}};var _jsInit=function(){if(_util.Browser.isSafari()){_d.body.addEventListener("click",_bodyClick)}_jsDispatch.call(this,"init")};var _jsChange=function(){_swfChange();_jsDispatch.call(this,"change")};var _update=function(){_jsChange.call(this);_st(_functions.bind(_track,this),10)};var _track=function(){var value=(_l.pathname+(/\/$/.test(_l.pathname)?"":"/")+this.getValue()).replace(/\/\//,"/").replace(/^\/$/,"");var fn=window[_opts.tracker];if(typeof fn==FUNCTION){fn(value)}else{if(typeof pageTracker!=UNDEFINED&&typeof pageTracker._trackPageview==FUNCTION){pageTracker._trackPageview(value)}else{if(typeof urchinTracker==FUNCTION){urchinTracker(value)}}}};var _htmlWrite=function(){var doc=_iframe.contentWindow.document;doc.open();doc.write("<html><head><title>"+_d.title+"</title><script>var "+ID+' = "'+_getHash()+'";<\/script></head></html>');doc.close()};var _htmlLoad=function(){var win=_iframe.contentWindow;var src=win.location.href;_value=(typeof win[ID]!=UNDEFINED?win[ID]:"");if(_value!=_getHash()){_update.call(SWFAddress);_l.hash=_ieLocal(_value,true)}};var _load=function(){if(!_loaded){_loaded=true;if(_msie&&_version<8){var iframe='<iframe id="'+ID+'" src="javascript:false;" width="0" height="0"></iframe>';_d.body.innerHTML=iframe+_d.body.innerHTML;_iframe=_d.getElementById(ID);_st(function(){_events.addListener(_iframe,"load",_htmlLoad);if(typeof _iframe.contentWindow[ID]==UNDEFINED){_htmlWrite()}},50)}else{if(_safari){if(_version<418){_d.body.innerHTML+='<form id="'+ID+'" style="position:absolute;top:-9999px;" method="get"></form>';_form=_d.getElementById(ID)}if(typeof _l[ID]==UNDEFINED){_l[ID]={}}if(typeof _l[ID][_l.pathname]!=UNDEFINED){_stack=_l[ID][_l.pathname].split(",")}}}_st(_functions.bind(function(){_jsInit.call(this);_jsChange.call(this);_track.call(this)},this),1);if(_msie&&_version>=8){_d.body.onhashchange=_functions.bind(_listen,this);_si(_functions.bind(_titleCheck,this),50)}else{_si(_functions.bind(_listen,this),50)}}};var ID="swfaddress",FUNCTION="function",UNDEFINED="undefined",_util=asual.util,_browser=_util.Browser,_events=_util.Events,_functions=_util.Functions,_version=_browser.getVersion(),_msie=_browser.isMSIE(),_mozilla=_browser.isMozilla(),_opera=_browser.isOpera(),_safari=_browser.isSafari(),_supported=false,_t=_getWindow(),_d=_t.document,_h=_t.history,_l=_t.location,_si=setInterval,_st=setTimeout,_dc=decodeURI,_ec=encodeURI,_iframe,_form,_url,_title=_d.title,_length=_h.length,_silent=false,_loaded=false,_justset=true,_juststart=true,_ref=this,_stack=[],_ids=[],_popup=[],_listeners={},_value=_getHash(),_opts={history:true,strict:true};_supported=(_mozilla&&_version>=1)||(_msie&&_version>=6)||(_opera&&_version>=9.5)||(_safari&&_version>=312);if(_supported){for(var i=1;i<_length;i++){_stack.push("")}_stack.push(_getHash());if(_msie&&_l.hash!=_getHash()){_l.hash="#"+_ieLocal(_getHash(),true)}if(_opera){history.navigationMode="compatible"}_searchScript(document);var _qi=_url.indexOf("?");if(_url&&_qi>-1){var param,params=_url.substr(_qi+1).split("&");for(var i=0,p;p=params[i];i++){param=p.split("=");if(/^(history|strict)$/.test(param[0])){_opts[param[0]]=(isNaN(param[1])?/^(true|yes)$/i.test(param[1]):(parseInt(param[1])!=0))}if(/^tracker$/.test(param[0])){_opts[param[0]]=param[1]}}}if(_msie){_titleCheck.call(this)}if(window==_t){_events.addListener(document,"DOMContentLoaded",_functions.bind(_load,this))}_events.addListener(_t,"load",_functions.bind(_load,this))}else{if((!_supported&&_l.href.indexOf("#")!=-1)||(_safari&&_version<418&&_l.href.indexOf("#")!=-1&&_l.search!="")){_d.open();_d.write('<html><head><meta http-equiv="refresh" content="0;url='+_l.href.substr(0,_l.href.indexOf("#"))+'" /></head></html>');_d.close()}else{_track()}}this.toString=function(){return"[class SWFAddress]"};this.back=function(){_h.back()};this.forward=function(){_h.forward()};this.up=function(){var path=this.getPath();this.setValue(path.substr(0,path.lastIndexOf("/",path.length-2)+(path.substr(path.length-1)=="/"?1:0)))};this.go=function(delta){_h.go(delta)};this.href=function(url,target){target=typeof target!=UNDEFINED?target:"_self";if(target=="_self"){self.location.href=url}else{if(target=="_top"){_l.href=url}else{if(target=="_blank"){window.open(url)}else{_t.frames[target].location.href=url}}}};this.popup=function(url,name,options,handler){try{var popup=window.open(url,name,eval(options));if(typeof handler!=UNDEFINED){eval(handler)}}catch(ex){}_popup=arguments};this.getIds=function(){return _ids};this.getId=function(index){return _ids[0]};this.setId=function(id){_ids[0]=id};this.addId=function(id){this.removeId(id);_ids.push(id)};this.removeId=function(id){for(var i=0;i<_ids.length;i++){if(id==_ids[i]){_ids.splice(i,1);break}}};this.addEventListener=function(type,listener){if(typeof _listeners[type]==UNDEFINED){_listeners[type]=[]}_listeners[type].push(listener)};this.removeEventListener=function(type,listener){if(typeof _listeners[type]!=UNDEFINED){for(var i=0,l;l=_listeners[type][i];i++){if(l==listener){break}}_listeners[type].splice(i,1)}};this.dispatchEvent=function(event){if(this.hasEventListener(event.type)){event.target=this;for(var i=0,l;l=_listeners[event.type][i];i++){l(event)}return true}return false};this.hasEventListener=function(type){return(typeof _listeners[type]!=UNDEFINED&&_listeners[type].length>0)};this.getBaseURL=function(){var url=_l.href;if(url.indexOf("#")!=-1){url=url.substr(0,url.indexOf("#"))}if(url.substr(url.length-1)=="/"){url=url.substr(0,url.length-1)}return url};this.getStrict=function(){return _opts.strict};this.setStrict=function(strict){_opts.strict=strict};this.getHistory=function(){return _opts.history};this.setHistory=function(history){_opts.history=history};this.getTracker=function(){return _opts.tracker};this.setTracker=function(tracker){_opts.tracker=tracker};this.getTitle=function(){return _d.title};this.setTitle=function(title){if(!_supported){return null}if(typeof title==UNDEFINED){return}if(title=="null"){title=""}title=_dc(title);_st(function(){_title=_d.title=title;if(_juststart&&_iframe&&_iframe.contentWindow&&_iframe.contentWindow.document){_iframe.contentWindow.document.title=title;_juststart=false}if(!_justset&&_mozilla){_l.replace(_l.href.indexOf("#")!=-1?_l.href:_l.href+"#")}_justset=false},50)};this.getStatus=function(){return _t.status};this.setStatus=function(status){if(!_supported){return null}if(typeof status==UNDEFINED){return}if(status=="null"){status=""}status=_dc(status);if(!_safari){status=_strictCheck((status!="null")?status:"",true);if(status=="/"){status=""}if(!(/http(s)?:\/\//.test(status))){var index=_l.href.indexOf("#");status=(index==-1?_l.href:_l.href.substr(0,index))+"#"+status}_t.status=status}};this.resetStatus=function(){_t.status=""};this.getValue=function(){if(!_supported){return null}return _dc(_strictCheck(_ieLocal(_value,false),false))};this.setValue=function(value){if(!_supported){return null}if(typeof value==UNDEFINED){return}if(value=="null"){value=""}value=_ec(_dc(_strictCheck(value,true)));if(value=="/"){value=""}if(_value==value){return}_justset=true;_value=value;_silent=true;_update.call(SWFAddress);_stack[_h.length]=_value;if(_safari){if(_opts.history){_l[ID][_l.pathname]=_stack.toString();_length=_h.length+1;if(_version<418){if(_l.search==""){_form.action="#"+_value;_form.submit()}}else{if(_version<523||_value==""){var evt=_d.createEvent("MouseEvents");evt.initEvent("click",true,true);var anchor=_d.createElement("a");anchor.href="#"+_value;anchor.dispatchEvent(evt)}else{_l.hash="#"+_value}}}else{_l.replace("#"+_value)}}else{if(_value!=_getHash()){if(_opts.history){_l.hash="#"+_ieLocal(_value,true)}else{_l.replace("#"+_value)}}}if((_msie&&_version<8)&&_opts.history){_st(_htmlWrite,50)}if(_safari){_st(function(){_silent=false},1)}else{_silent=false}};this.getPath=function(){var value=this.getValue();var value=SWFAddress.getValue();if(value.indexOf("?")!=-1){return value.split("?")[0]}else{if(value.indexOf("#")!=-1){return value.split("#")[0]}else{return value}}};this.getPathNames=function(){var path=this.getPath();var names=path.split("/");if(path.substr(0,1)=="/"||path.length==0){names.splice(0,1)}if(path.substr(path.length-1,1)=="/"){names.splice(names.length-1,1)}return names};this.getQueryString=function(){var value=this.getValue();var index=value.indexOf("?");return(index!=-1&&index<value.length)?value.substr(index+1):""};this.getParameter=function(param){var value=this.getValue();var index=value.indexOf("?");if(index!=-1){value=value.substr(index+1);var params=value.split("&");var p,i=params.length;while(i--){p=params[i].split("=");if(p[0]==param){return p[1]}}}};this.getParameterNames=function(){var value=this.getValue();var index=value.indexOf("?");var names=[];if(index!=-1){value=value.substr(index+1);if(value!=""&&value.indexOf("=")!=-1){var params=value.split("&");var i=0;while(i<params.length){names.push(params[i].split("=")[0]);i++}}}return names};this.onInit=null;this.onChange=null;(function(){var _args;if(typeof FlashObject!=UNDEFINED){SWFObject=FlashObject}if(typeof SWFObject!=UNDEFINED&&SWFObject.prototype&&SWFObject.prototype.write){var _s1=SWFObject.prototype.write;SWFObject.prototype.write=function(){_args=arguments;if(this.getAttribute("version").major<8){this.addVariable("$swfaddress",SWFAddress.getValue());((typeof _args[0]=="string")?document.getElementById(_args[0]):_args[0]).so=this}var success;if(success=_s1.apply(this,_args)){_ref.addId(this.getAttribute("id"))}return success}}if(typeof swfobject!=UNDEFINED){var _s2r=swfobject.registerObject;swfobject.registerObject=function(){_args=arguments;_s2r.apply(this,_args);_ref.addId(_args[0])};var _s2c=swfobject.createSWF;swfobject.createSWF=function(){_args=arguments;_s2c.apply(this,_args);_ref.addId(_args[0].id)};var _s2e=swfobject.embedSWF;swfobject.embedSWF=function(){_args=arguments;if(typeof _args[8]==UNDEFINED){_args[8]={}}if(typeof _args[8].id==UNDEFINED){_args[8].id=_args[1]}_s2e.apply(this,_args);_ref.addId(_args[8].id)}}if(typeof UFO!=UNDEFINED){var _u=UFO.create;UFO.create=function(){_args=arguments;_u.apply(this,_args);_ref.addId(_args[0].id)}}if(typeof AC_FL_RunContent!=UNDEFINED){var _a=AC_FL_RunContent;AC_FL_RunContent=function(){_args=arguments;_a.apply(this,_args);for(var i=0,l=_args.length;i<l;i++){if(_args[i]=="id"){_ref.addId(_args[i+1])}}}}})()};

eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('9 8(){n b=o U();b.V=7;b.1l=p;b.y=w.1T.1U;b.r="F";b.1m=p;b.1n=7;b.W=7;b.z=o U();b.1o=8.1p++;b.G=v;b.l=7;b.s="";b.X=7;b.Y=7;b.H=7;b.Z=7;b.10=v;b.h=7;b.11=7;b.12=7;b.13=7;b.14=7;b.15=7;b.16=7;b.17=7;b.18=7;b.A=7;b.h=8.1q();6(b.h==7){k 7}b.h.19=9(){6(b==7||b.h==7){k}6(b.h.I==1){b.1r(b)}6(b.h.I==2){b.1s(b)}6(b.h.I==3){b.1t(b)}6(b.h.I==4){b.1u(b)}};b.1a=v;b.1b=v;b.1c=v;b.J=v;b.1r=9(){6(b.1a){k}8.t++;6(8.t==1&&m(w[\'1v\'])=="9"){1v()}6(b.l!=7){6(m(8.q[b.l])=="K"){8.q[b.l]=0}8.q[b.l]++;6(8.q[b.l]==1&&m(b.18)=="9"){b.18(b.l)}}6(m(b.12)=="9"){b.12(b)}b.1a=p};b.1s=9(){6(b.1b){k}6(m(b.13)=="9"){b.13(b)}b.1b=p};b.1t=9(){6(b.1c){k}6(m(b.14)=="9"){b.14(b)}b.1c=p};b.1u=9(){6(b.J||b.10){k}b.J=p;8.t--;6(8.t==0&&m(w[\'L\'])=="9"){L(b.l)}6(b.l!=7){8.q[b.l]--;6(8.q[b.l]==0&&m(b.A)=="9"){b.A(b.l)}}b.G=p;b.H=b.h.H;b.Z=b.h.Z;b.X=b.h.X;b.Y=b.h.Y;6(m(b.15)=="9"){b.15(b)}6(b.h.H==1V&&m(b.16)=="9"){b.16(b)}M 6(m(b.17)=="9"){b.17(b)}1w b.h[\'19\'];b.h=7};b.1x=9(){6(b!=7&&b.h!=7&&!b.J){b.10=p;b.h.1W();8.t--;6(8.t==0&&m(w[\'L\'])=="9"){L(b.l)}6(b.l!=7){8.q[b.l]--;6(8.q[b.l]==0&&m(b.A)=="9"){b.A(b.l)}}6(m(b.11)=="9"){b.11(b)}1w b.h[\'19\'];b.h=7}};b.1d=9(){6(b.h!=7){6(b.1l&&b.r=="F"){b.z["1X"]=o 1Y().1Z()+""+b.1o}n a=7;N(n i 1y b.z){6(b.s.B>0){b.s+="&"}b.s+=O(i)+"="+O(b.z[i])}6(b.r=="F"){6(b.s.B>0){b.y+=((b.y.20("?")>-1)?"&":"?")+b.s}}b.h.21(b.r,b.y,b.1m,b.1n,b.W);6(b.r=="1z"){6(m(b.h.1A)!="K"){b.h.1A(\'22-1B\',\'23/x-24-1C-25\')}a=b.s}6(b.V>0){26(b.1x,b.V)}b.h.27(a)}};b.1e=9(a){N(n i 1y a){6(m(b[i])=="K"){b.z[i]=a[i]}M{b[i]=a[i]}}};b.1f=9(){6(b.h!=7){6(b.G){k b.h.1f()}1g("1D 1f 1h a 1E 1F P 1G 1H 1I")}};b.1i=9(a){6(b.h!=7){6(b.G){k b.h.1i(a)}1g("1D 1i 1h a 1E 1F P 1G 1H 1I")}};k b}8.1q=9(){6(w.1J){k o 1J()}M 6(w.1j){/*@28@*//*@6(@29>=5)1K{k o 1j("2a.1L")}1M(e){1K{k o 1j("2b.1L")}1M(E){k 7}}@2c@*/}M{k 7}};8.2d=9(){k(8.t>0)};8.2e=9(a){8.1k("F",a)};8.2f=9(a){8.1k("1z",a)};8.1k=9(a,b){6(m(b)!="K"&&b!=7){n c=o 8();c.r=a;c.1e(b);c.1d()}};8.1N=9(a,b){n c=o 8();6(c==7){k v}n d=8.1O(a);c.r=a.r.2g();c.y=a.2h;c.1e(b);c.s=d;c.1d();k p};8.1O=9(c){n d=c.2i;6(!d)1g(\'2j P 1N 1C 1h 1P 2k 1Q 2l 2m P 2n. (2o 1Q 2p 2q 2r 2s 1P 2t 2u)\');n e=d.B;n f="";C.D=9(a,b){6(f.B>0){f+="&"}f+=O(a)+"="+O(b)};N(n i=0;i<e;i++){n g=d[i];6(!g.2v){2w(g.1B){u\'2x\':u\'W\':u\'2y\':u\'2z\':C.D(g.Q,g.R);S;u\'1R-2A\':6(g.1S>=0){C.D(g.Q,g.T[g.1S].R)}S;u\'1R-2B\':N(n j=0;j<g.T.B;j++){6(g.T[j].2C){C.D(g.Q,g.T[j].R)}}S;u\'2D\':u\'2E\':6(g.2F){C.D(g.Q,g.R)}S}}}k f};8.t=0;8.q=o U();8.1p=0;',62,166,'||||||if|null|AjaxRequest|function||||||||xmlHttpRequest|||return|groupName|typeof|var|new|true|numActiveAjaxGroupRequests|method|queryString|numActiveAjaxRequests|case|false|window||url|parameters|onGroupEnd|length|this|addField||GET|responseReceived|status|readyState|onCompleteInternalHandled|undefined|AjaxRequestEnd|else|for|encodeURIComponent|not|name|value|break|options|Object|timeout|password|responseText|responseXML|statusText|aborted|onTimeout|onLoading|onLoaded|onInteractive|onComplete|onSuccess|onError|onGroupBegin|onreadystatechange|onLoadingInternalHandled|onLoadedInternalHandled|onInteractiveInternalHandled|process|handleArguments|getAllResponseHeaders|alert|because|getResponseHeader|ActiveXObject|doRequest|generateUniqueUrl|async|username|requestIndex|numAjaxRequests|getXmlHttpRequest|onLoadingInternal|onLoadedInternal|onInteractiveInternal|onCompleteInternal|AjaxRequestBegin|delete|onTimeoutInternal|in|POST|setRequestHeader|type|form|Cannot|response|has|yet|been|received|XMLHttpRequest|try|XMLHTTP|catch|submit|serializeForm|the|you|select|selectedIndex|location|href|200|abort|AjaxRequestUniqueId|Date|getTime|indexOf|open|Content|application|www|urlencoded|setTimeout|send|cc_on|_jscript_version|Msxml2|Microsoft|end|isActive|get|post|toUpperCase|action|elements|Could|formId|specified|is|valid|maybe|have|another|element|with|same|ID|disabled|switch|text|hidden|textarea|one|multiple|selected|checkbox|radio|checked'.split('|'),0,{}))

function isDefined(myVar)
{
    if (typeof(myVar) != "undefined") return false;
	else return true;
}

function addLoadEvent(func) {
    var old_onload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function() {
            old_onload();
            func();
        }
    }
}

function set_title(a) {
	document.title = a;
}

function expander(obj) {
	var exsh = $(obj);
    var ex = $('.expandable',exsh.parent());
    
    // save tag text
    temp = exsh.html().substr(5);
	var speed = 150;
    if (ex.css('display')=='none') {
		ex.slideDown(speed,function(){
			exsh.removeClass('expander').addClass('collapser').html( 'Hide ' + temp );
		});
		exsh.animate({ fontSize:"9px" },speed);
    } else {
		ex.slideUp(speed,function(){
			exsh.removeClass('collapser').addClass('expander').html( 'Show ' + temp );
		});
		exsh.animate({ fontSize:"12px" },speed);
    }
}

function add_style(file) {
   var oLink = document.createElement("link");
   oLink.setAttribute("href", file);
   oLink.setAttribute("rel", "stylesheet");
   oLink.setAttribute("type", "text/css");
   document.getElementsByTagName('head')[0].appendChild(oLink);
}
function add_css(file) {
	add_style(file);	
}

function add_javascript(file) {
   var oScript = document.createElement("script");
   oScript.setAttribute("src", file);
   oScript.setAttribute("type", "text/javascript");
   document.getElementsByTagName('head')[0].appendChild(oScript);
}
function add_js(file) {
	add_javascript(file);	
}

function aql_save( theform, model, onSuccessFn, onErrorFn ) {
	message_div = model + '_message';
	if (document.getElementById( message_div ))
		document.getElementById( message_div ).innerHTML = '<img src="/images/loading3.gif" />';

	if (!onSuccessFn) {
		onSuccessFn = function (req) {
			//alert(req.responseText);
			if ( req.responseText.indexOf('redirect=')==0 ) {
				//alert(req.responseText);
				location.href = location.href + '/' + req.responseText.substring(9,req.responseText.length);
			} else if (document.getElementById( message_div )) {
				document.getElementById( message_div ).innerHTML = req.responseText;
				window.scrollTo(0,0);
			}
		};
	}
	if (!onErrorFn) {
		onErrorFn = function (req) {
			alert('There has been an error. Check your form action.');
		};
	}

	theform.method = 'post';
	theform.action = '/aql/save/' + model;
	AjaxRequest.submit(theform,{
		'aql_save' : location.href,
		'onSuccess' : onSuccessFn,
		'onError' : onErrorFn
	});	
}//function


// return the value of the radio button that is checked
// return an empty string if none are checked, or
// there are no radio buttons
function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}

// set the radio button with the given value as being checked
// do nothing if there are no radio buttons
// if the given value does not exist, all the radio buttons
// are reset to unchecked
function setCheckedValue(radioObj, newValue) {
	if(!radioObj)
		return;
	var radioLength = radioObj.length;
	if(radioLength == undefined) {
		radioObj.checked = (radioObj.value == newValue.toString());
		return;
	}
	for(var i = 0; i < radioLength; i++) {
		radioObj[i].checked = false;
		if(radioObj[i].value == newValue.toString()) {
			radioObj[i].checked = true;
		}
	}
}

function toggleCheckbox(checkboxId) {
	obj = document.getElementById(checkboxId);
	if(!obj)
		return;
	if (obj.checked) obj.checked = false;
	else obj.checked = true;
	return obj.checked;
}

function process_profile_response(req,table) {
// this function is used by the profile module
	xml = new SoftXMLLib();
	xml.loadXML(req.responseText);
	alert(req.responseText);
	
	if( xml.loadXMLError != 0 ) {
		alert("The server gave an invalid response.");
	} else {
		success = xml.selectNodes('//status')[0].innerText;
		message = xml.selectNodes('//message')[0].innerText;
		ide = xml.selectNodes('//ide')[0].innerText;
		document.getElementById(table + '_response').innerHTML = message;
		document.getElementById(table + '_ide').value = ide;
	}//if
}//function

function get_event(e) {
	if (!e) {
		var e = window.event;
	}

	return e;
}

function get_target(e) {
	if (!e) {
		var e = window.event;
	}

	var targ;
	if (e.target) {
		targ = e.target;
	} else if (e.srcElement) {
		targ = e.srcElement;
	}

	if (targ.nodeType == 3) {
		// defeat Safari bug
		targ = targ.parentNode;
	}

	return targ;
}

function get_mouse_coordinates(e) {
	if (!e) {
		var e = window.event;
	}

	if (e.pageX || e.pageY) {
		posx = e.pageX;
		posy = e.pageY;
	} else if (e.clientX || e.clientY) {
		posx = e.clientX + document.body.scrollLeft
			+ document.documentElement.scrollLeft;
		posy = e.clientY + document.body.scrollTop
			+ document.documentElement.scrollTop;
	}

	return new Array(posx, posy);
}

function copy_to_clipboard(text2copy) {
	if (window.clipboardData) {
		window.clipboardData.setData("Text", text2copy);
	} else {
		if (! document.getElementById('flashcopier')) {
			var divholder = document.createElement('div');
			divholder.id = 'flashcopier';
			document.body.appendChild(divholder);
		}

		var clipboard_flash_object = new SWFObject
			('http://www.ezwebstuff.com/intranet/global/_clipboard.swf', 
			 'copy_contents', '0', '0', '4');
			
		clipboard_flash_object.addVariable('clipboard', escape(text2copy));
		clipboard_flash_object.write('flashcopier');
	}
}

function str_pad(str, new_len, pad_char){
	if (str.length >= new_len) return str;

	for (i = str.length; i < new_len; i++) {
		str += pad_char;
	}

	return str;
};

function trimString (str) {
    str = this != window? this : str;
    return str.replace(/^\s+/g, '').replace(/\s+$/g, '');
} // function

function stripSlashes(str) {
    str = str.replace(/\\'/g, '\'');
    str = str.replace(/\\"/g, '"');
    str = str.replace(/\\0/g, '\0');
    str = str.replace(/\\\\/g, '\\');
    return str;
} // function

function addSlashes(str) {
    str = str.replace(/\\/g, '\\\\');
    str = str.replace(/\\0/g, '\0');
    str = str.replace(/"/g, '\\"');
    str = str.replace(/\'/g, '\\\'');
    return str;
} // function

/* Client-side access to querystring name=value pairs
	Version 1.2.3
	22 Jun 2005
	Adam Vandenberg
*/
function QueryString(qs) { // optionally pass a querystring to parse
	this.params = new Object();
	this.get = QueryString_get;
	
	if (qs == null) {
		qs = location.search.substring(1, location.search.length);
	}

	if (qs.length == 0) { 
		return;
	}

	// Turn <plus> back to <space>
	// See: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1
	qs = qs.replace(/\+/g, ' ');
	var args = qs.split('&'); // parse out name/value pairs separated via &
	
	// split out each name=value pair
	for (var i=0; i < args.length; i++) {
		var value;
		var pair = args[i].split('=');
		var name = unescape(pair[0]);

		if (pair.length == 2) {
			value = unescape(pair[1]);
		} else {
			value = name;
		}
		
		this.params[name] = value;
	}
}

function QueryString_get(key, default_) {
	// This silly looking line changes UNDEFINED to NULL
	if (default_ == null) {
		default_ = null;
	}
	
	var value = this.params[key];
	if (value == null) {
		value = default_;
	}
	
	return value;
}

// ///////////////////////////
// isDefined v1.0
// 
// Check if a javascript variable has been defined.
// 
// Author : Jehiah Czebotar
// Website: http://www.jehiah.com
// Usage  : alert(isdefined('myvar'));
// ///////////////////////////

function isDefined(variable) {
    return (typeof(eval('variable')) == "undefined") ?  false : true;
}

function confirm_leave(msg) {
	if (msg) {
		return msg;
	}

	return confirm('Are you you sure you want to leave this page? All unsaved changes will be lost.');
}

function windowHeight() {
  var myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
  return myHeight;
}

function windowWidth() {
  var myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
  }
  return myWidth - scrollbarWidth();
}

function pageHeight() {
	var pageHeight = 0;
	if ( window.innerHeight && window.scrollMaxY ) {
		// Firefox 
		pageHeight = window.innerHeight + window.scrollMaxY;
	}
	else if ( document.body.scrollHeight > document.body.offsetHeight ) {
		// all but Explorer Mac
		pageHeight = document.body.scrollHeight;
	} else {
		// works in Explorer 6 Strict, Mozilla (not FF) and Safari
		pageHeight = document.body.offsetHeight + document.body.offsetTop; 
	}
	return pageHeight;
}

function pageWidth() {
	var pageWidth = 0;
	if ( window.innerHeight && window.scrollMaxY ) {
		// Firefox 
		pageWidth = window.innerWidth + window.scrollMaxX;
	}
	else if ( document.body.scrollHeight > document.body.offsetHeight ) {
		// all but Explorer Mac
		pageWidth = document.body.scrollWidth;
	} else {
		// works in Explorer 6 Strict, Mozilla (not FF) and Safari
		pageWidth = document.body.offsetWidth + document.body.offsetLeft;  
	}
	return pageWidth - scrollbarWidth();
}

function scrollbarWidth() {
	document.body.style.overflow = 'hidden';
	var width = document.body.clientWidth;
	document.body.style.overflow = 'scroll';
	width -= document.body.clientWidth;
	if(!width) width = document.body.offsetWidth-document.body.clientWidth;
	document.body.style.overflow = '';
	return width;
}

function onEnter(e) {
	var keycode;
	if (window.event) keycode = window.event.keyCode;
	else if (e) keycode = e.which;
	if(keycode == 13){
		return true;
	} else {
		return false;
	}
}

//  Simulates PHP's date function
//
//	Documentation @ http://jacwright.com/projects/javascript/date_format
//	
//  var MyDate = new Date();
//	var now = MyDate.format('M jS, Y'); 
//
//  returns May 11th, 2006


Date.prototype.format = function(format) {
	var returnStr = '';
	var replace = Date.replaceChars;
	for (var i = 0; i < format.length; i++) {
		var curChar = format.charAt(i);
		if (replace[curChar]) {
			returnStr += replace[curChar].call(this);
		} else {
			returnStr += curChar;
		}
	}
	return returnStr;
};
Date.replaceChars = {
	shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
	longMonths: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
	shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
	longDays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
	
	// Day
	d: function() { return (this.getDate() < 10 ? '0' : '') + this.getDate(); },
	D: function() { return Date.replaceChars.shortDays[this.getDay()]; },
	j: function() { return this.getDate(); },
	l: function() { return Date.replaceChars.longDays[this.getDay()]; },
	N: function() { return this.getDay() + 1; },
	S: function() { return (this.getDate() % 10 == 1 && this.getDate() != 11 ? 'st' : (this.getDate() % 10 == 2 && this.getDate() != 12 ? 'nd' : (this.getDate() % 10 == 3 && this.getDate() != 13 ? 'rd' : 'th'))); },
	w: function() { return this.getDay(); },
	z: function() { return "Not Yet Supported"; },
	// Week
	W: function() { return "Not Yet Supported"; },
	// Month
	F: function() { return Date.replaceChars.longMonths[this.getMonth()]; },
	m: function() { return (this.getMonth() < 9 ? '0' : '') + (this.getMonth() + 1); },
	M: function() { return Date.replaceChars.shortMonths[this.getMonth()]; },
	n: function() { return this.getMonth() + 1; },
	t: function() { return "Not Yet Supported"; },
	// Year
	L: function() { return (((this.getFullYear()%4==0)&&(this.getFullYear()%100 != 0)) || (this.getFullYear()%400==0)) ? '1' : '0'; },
	o: function() { return "Not Supported"; },
	Y: function() { return this.getFullYear(); },
	y: function() { return ('' + this.getFullYear()).substr(2); },
	// Time
	a: function() { return this.getHours() < 12 ? 'am' : 'pm'; },
	A: function() { return this.getHours() < 12 ? 'AM' : 'PM'; },
	B: function() { return "Not Yet Supported"; },
	g: function() { return this.getHours() % 12 || 12; },
	G: function() { return this.getHours(); },
	h: function() { return ((this.getHours() % 12 || 12) < 10 ? '0' : '') + (this.getHours() % 12 || 12); },
	H: function() { return (this.getHours() < 10 ? '0' : '') + this.getHours(); },
	i: function() { return (this.getMinutes() < 10 ? '0' : '') + this.getMinutes(); },
	s: function() { return (this.getSeconds() < 10 ? '0' : '') + this.getSeconds(); },
	// Timezone
	e: function() { return "Not Yet Supported"; },
	I: function() { return "Not Supported"; },
	O: function() { return (-this.getTimezoneOffset() < 0 ? '-' : '+') + (Math.abs(this.getTimezoneOffset() / 60) < 10 ? '0' : '') + (Math.abs(this.getTimezoneOffset() / 60)) + '00'; },
	P: function() { return (-this.getTimezoneOffset() < 0 ? '-' : '+') + (Math.abs(this.getTimezoneOffset() / 60) < 10 ? '0' : '') + (Math.abs(this.getTimezoneOffset() / 60)) + ':' + (Math.abs(this.getTimezoneOffset() % 60) < 10 ? '0' : '') + (Math.abs(this.getTimezoneOffset() % 60)); },
	T: function() { var m = this.getMonth(); this.setMonth(0); var result = this.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/, '$1'); this.setMonth(m); return result;},
	Z: function() { return -this.getTimezoneOffset() * 60; },
	// Full Date/Time
	c: function() { return this.format("Y-m-d") + "T" + this.format("H:i:sP"); },
	r: function() { return this.toString(); },
	U: function() { return this.getTime() / 1000; }
};

/* SWFObject v2.1 rc2 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();

//v1.7
// Flash Player Version Detection
// Detect Client Browser type
// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '';
  if (isIE && isWin && !isOpera)
  {
    str += '<object ';
    for (var i in objAttrs)
    {
      str += i + '="' + objAttrs[i] + '" ';
    }
    str += '>';
    for (var i in params)
    {
      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
    }
    str += '</object>';
  }
  else
  {
    str += '<embed ';
    for (var i in embedAttrs)
    {
      str += i + '="' + embedAttrs[i] + '" ';
    }
    str += '> </embed>';
  }

  document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
      case "id":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

$(document).ready(function(){
	var name = "aql_state";
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0){
			var state_model = c.substring(nameEQ.length,c.length);
			if(state_model.search('saved_')===0){
				var model = state_model.replace('saved_','');
				$('<div id = "'+model+'_message"><div class="aql_saved">Saved</div></div>').insertBefore($('form[name='+model+']'));
				var date = new Date();
				 document.cookie = name+"=1;expires=" + date.toGMTString() + ";path=/;";
			}
		}				
	}
});
$.skybox_form = function(model,ide,user_options,onSuccessFn) {
	var options = {
		model: model	
	};
	if($.isFunction(ide)){
		onSuccessFn = ide;
		ide = null;
	}else if(typeof(ide) == 'object'){
		user_options = ide;
		ide = null;
	}
	if($.isFunction(user_options)){
		onSuccessFn = user_options;
		user_options = null;	
	}
	$.extend(options, user_options);
	skybox('/aql/skybox-profile2/'+model+'/'+ide,options,options.width,options.height,onSuccessFn);
};
$.fn.skybox_form = function(model,ide,user_options,onSuccessFn) {
	if(user_options)
		user_options.selector = $(this).selector;
	return $.skybox_form(model,ide,user_options,onSuccessFn);
};
function delete_skybox_form(model, options, onSuccessFn) {
	var theform = $('form[name='+model+']:first, form[id='+model+'_form]');
	if(theform.length === 0){
		alert("save_skybox_form error: Could not find form.");
		return false;
	}
	var message_div = model + '_message';
	$('#'+message_div).remove();
	$('<div id ="'+message_div+'"/>').insertBefore(theform);
	$('#'+message_div).html("<img src = '/images/loading2.gif'/>");
	if (!onSuccessFn) {
		onSuccessFn = function (req) {
			if(options.uri){
				$(options.selector).load(decodeURIComponent(options.uri),function(data){
						if (options.onSuccessFn2)
							eval(options.onSuccessFn2);
				});
			}
			history.back();
		};
	}
	$.post('/aql/delete/' + model,$(theform).serialize(),function(data){
																		$('#'+message_div).html(data);
																		onSuccessFn(data);										
																	});
};
function save_form(model,options,new_href,onSuccessFn){
	var theform = $('form[name='+model+']:first, form[id='+model+'_form]');
	var silent = false;
	var onFailFn2 = null;
	var onSuccessFn2 = null;
	
	if(theform.length === 0){
		alert("save_skybox_form error: Could not find form.");
		return false;
	}
	if(options){
		if(typeof options != "object"){
			onSuccessFn = new_href;
			new_href = options;
			options = null;
		} else {
			silent = options.silent?options.silent:false;
			onSuccessFn2 = options.onSuccessFn2?options.onSuccessFn2:null;
			onFailFn2 = options.onFailFn2?options.onFailFn2:null;
		}
	}
	if($.isFunction( new_href )){
		onSuccessFn = new_href;
		new_href = false;
	}
	var message_div = model + '_message';
	$('#'+message_div).remove();
	$('<div id ="'+message_div+'"/>').insertBefore(theform);
	if(!silent){
		$('#'+message_div).html("<img src = '/images/loading2.gif'/>");
	}
        var successFn = function(data){
            if ( trimString(data).indexOf('<!--saved-->') != 0 ) {
               if(!silent){
                  $( '#'+message_div ).html(data);
                  $.scrollTo(0,1000);
               }
               if (onFailFn2)
                  eval(onFailFn2);
            } else {
               //parse for the ide so we can pass it to a callback
               var needle = '<!--ide=';
               var start = data.indexOf(needle) + needle.length;
               var end = data.indexOf('-->',start);
               var ide = data.substring(start,end);

               var defCallbackFn = function(dat){
                  if (ide) {
                     var date = new Date();
                     date.setTime(date.getTime()+600000);
                     var expires = " expires="+date.toGMTString();
                     document.cookie = 'aql_state'+"="+'saved_'+model+';'+expires+"; path=/";
                     if(!new_href){
                        start = 0;
                        end = location.href.indexOf('/add-new');
                        if ( end > -1 )
                           new_href = location.href.substring(start,end);
                        else new_href = location.href;
                        location.href = new_href + '/' + ide;
                     } else {
                        location.href = new_href + '/' + ide;
                     }
                  }else {
                     if(!silent){
                        $( '#'+message_div ).html(data);
                        $.scrollTo(0,1000);
                     }
                     if (onSuccessFn2){
                        eval(onSuccessFn2);
                     }
                  }
               }

               if(onSuccessFn){
//                  alert(defCallbackFn);
                  if(onSuccessFn(data,ide,defCallbackFn)){
                     defCallbackFn(data,ide);
                  };
               }else{
                  defCallbackFn(data,ide);   
               }
            }
        }

/*	if (!onSuccessFn) {
		var onSuccessFn = function (data){
			if ( trimString(data).indexOf('<!--saved-->') != 0 ) {
					if(!silent){
						$( '#'+message_div ).html(data);
						$.scrollTo(0,1000);
					}
					if (onFailFn2)
						eval(onFailFn2);
				} else { 
					var needle = '<!--ide=';
					var start = data.indexOf(needle) + needle.length;
					var end = data.indexOf('-->',start);
					var ide = data.substring(start,end);
					if (ide) {
						var date = new Date();
						date.setTime(date.getTime()+600000);
						var expires = " expires="+date.toGMTString();
						document.cookie = 'aql_state'+"="+'saved_'+model+';'+expires+"; path=/";
						if(!new_href){
							// get the url up to /add-new
							start = 0;
							end = location.href.indexOf('/add-new');
							if ( end > -1 ) 
								new_href = location.href.substring(start,end); // profile page add new
							else new_href = location.href; // submit page add new
								location.href = new_href + '/' + ide;
						} else {
							location.href = new_href + '/' + ide;
						}
					} else {
						if(!silent){
							$( '#'+message_div ).html(data);
							$.scrollTo(0,1000);
							
						}
						if (onSuccessFn2)
							eval(onSuccessFn2);
					}
				}
		}
	}   */
	if ( $('span.mceEditor').length ) {
		tinyMCE.triggerSave();
    }
	$.post('/aql/save/' + model,$(theform).serialize(),function(data){successFn(data);});
};//function

function save_skybox_form( model,options,onSuccessFn,onSuccessFn2 ) {
	var theform = $('form[name='+model+']:first, form[id='+model+'_form]');
	if(theform.length === 0){
		alert("save_skybox_form error: Could not find form.");
		return false;
	}
	var message_div = model + '_message';
	$('#'+message_div).remove();
	$('<div id ="'+message_div+'"/>').insertBefore(theform);
	$('#'+message_div).html("<img src = '/images/loading2.gif'/>");
	if (!onSuccessFn) {
		var onSuccessFn = function (data){
			if ( trimString(data).indexOf('<!--saved-->') != 0 ) {
					$( '#'+message_div ).html(data);
					$.scrollTo(0,1000);
				} else { 
					var needle = '<!--ide=';
					var start = data.indexOf(needle) + needle.length;
					var end = data.indexOf('-->',start);
					var ide = data.substring(start,end);
					$( '#skybox' ).html(data);
					var refresh_divFn = function () {
						if(options.uri){
							$(options.selector).load(decodeURIComponent(options.uri),function(data){
									if (onSuccessFn2)
										eval(onSuccessFn2);
							});
						}else if(onSuccessFn2){
							eval(onSuccessFn2);
						}
						history.back();
					}
					setTimeout(refresh_divFn,750);
				}
		}
	}
	$.post('/aql/save/' + model,$(theform).serialize(),function(data){
															$('#'+message_div).html(data);
															onSuccessFn(data);										
														});

};//function
function save_primary_profile( form_id, model, onSuccessFn, onErrorFn ) {
	theform = document.getElementById(form_id);
	message_div = form_id + '_message';
	if (document.getElementById( message_div )) {
		document.getElementById( message_div ).innerHTML = '<img src="/images/loading2.gif" />';
	}
	if (!onSuccessFn) {
		onSuccessFn = function (req) {
			//alert(req.responseText);
			if ( req.responseText.indexOf('<!--saved-->')==0 ) {
				//alert(req.responseText);
				needle = '<!--ide=';
				start = req.responseText.indexOf(needle) + needle.length;
				end = req.responseText.indexOf('-->',start);
				ide = req.responseText.substring(start,end);
				if (ide) {
					// get the url up to /add-new
					start = 0;
					end = location.href.indexOf('/add-new');
					if ( end > -1 ) new_href = location.href.substring(start,end); // profile page add new
					else new_href = location.href; // submit page add new
					location.href = new_href + '/' + ide;
				} else {
					document.getElementById( message_div ).innerHTML = req.responseText;
					$.scrollTo(0,1000);
				}
			} else if (document.getElementById( message_div )) {
				document.getElementById( message_div ).innerHTML = req.responseText;
				$.scrollTo(0,1000);
			}
//			window.scrollTo(0,0);
		};
	}
	if (!onErrorFn) {
		onErrorFn = function (req) {
			alert('There has been an error. Check your form action.');
		};
	}
	theform.method = 'post';
	theform.action = '/aql/save/' + model;
	AjaxRequest.submit(theform,{
		'aql_save' : location.href,
		'onSuccess' : onSuccessFn,
		'onError' : onErrorFn
	});	
}//function


function save_web_request_form( form_id, model, new_href, onSuccessFn, onErrorFn ) {
	theform = document.getElementById(form_id);
	message_div = form_id + '_message';
	if (document.getElementById( message_div )) {
		document.getElementById( message_div ).innerHTML = '<img src="/images/loading2.gif" />';
	}
	if (!onSuccessFn) {
		onSuccessFn = function (req) {
			//alert(req.responseText);
			start = new_href.length - 1;
			end = new_href.length;
			if ( new_href.substring(start,end) == '/' ) new_href = new_href.substring(0,start);
			if ( req.responseText.indexOf('<!--saved-->')==0 ) {
				needle = '<!--ide=';
				start = req.responseText.indexOf(needle) + needle.length;
				end = req.responseText.indexOf('-->',start);
//				alert(start);
//				alert(end);
//				alert(req.responseText);
				if (end > start) {
					ide = req.responseText.substring(start,end);
					if (new_href) location.href = new_href + '/' + ide;
					else location.href = location.href + '/' + ide;
				} else location.href = new_href;				
			} else if (document.getElementById( message_div )) {
				document.getElementById( message_div ).innerHTML = req.responseText;
				$.scrollTo(0,1000);
			}
			//window.scrollTo(0,0);
		};
	}
	if (!onErrorFn) {
		onErrorFn = function (req) {
			alert('There has been an error. Check your form action.');
		};
	}

	theform.method = 'post';
	theform.action = '/aql/save/' + model;
	AjaxRequest.submit(theform,{
		'aql_save' : location.href,
		'onSuccess' : onSuccessFn,
		'onError' : onErrorFn
	});	
}//function

function open_skybox_profile(title,model,ide,qs,div,refresh_uri,width,onSuccessFunction,onSuccessFunction2) {
	if ( !width ) width = 500;
//	alert( '/aql/skybox-profile/'+model+'/'+ide+'?'+qs+'&title='+title+'&div_id='+div+'&refresh_uri='+refresh_uri );
	skybox('/aql/skybox-profile/'+model+'/'+ide+'?'+qs+'&title='+title+'&div_id='+div+'&refresh_uri='+refresh_uri+'&onSuccessFn='+onSuccessFunction2,width,false,onSuccessFunction);
}

function profile_remove(model,ide,div_id,refresh_div_uri) {
	document.getElementById(div_id).innerHTML = '<img src="/images/loading2.gif" />';
	AjaxRequest.post({
		'url' : '/aql/delete/' + model,
		'ide' : ide,
		'onSuccess':function(req){
			// refresh the 1-to-m module on the profile page
			AjaxRequest.post({
				'url' : refresh_div_uri,
				'onSuccess':function(req){
					document.getElementById(div_id).innerHTML = req.responseText;
				}
			});	
		}
	});	
}

function save_skybox_profile( form_id, model, underlying_div, refresh_uri, onSuccessFn, onErrorFn, onSuccessFn2 ) {
	theform = document.getElementById(form_id);
	message_div = form_id + '_message';
	if (document.getElementById( message_div )) {
		document.getElementById( message_div ).innerHTML = '<img src="/images/loading2.gif" />';
	}
	if (!onSuccessFn) {
		onSuccessFn = function (req) {
			if ( trimString(req.responseText).indexOf('<!--saved-->') != 0 ) {
				document.getElementById( message_div ).innerHTML = req.responseText;
			} else { 
				document.getElementById( 'skybox' ).innerHTML = req.responseText;
				refresh_divFn = function () {
					AjaxRequest.post({
						'url' : decodeURIComponent(refresh_uri),
						'onSuccess':function(req){
							document.getElementById(underlying_div).innerHTML = req.responseText;
							if (onSuccessFn2) onSuccessFn2();
							history.back();
						}
					});
				}
				setTimeout(refresh_divFn,750);
			}//if
		};
	}
	if (!onErrorFn) {
		onErrorFn = function (req) {
			alert('There has been an error. Check your form action.');
		};
	}

	theform.method = 'post';
	theform.action = '/aql/save/' + model;
	AjaxRequest.submit(theform,{
		'aql_save' : location.href,
		'onSuccess' : onSuccessFn,
		'onError' : onErrorFn
	});	
}//function

function delete_skybox_profile( form_id, model, underlying_div, refresh_uri, onSuccessFn, onErrorFn ) {
	theform = document.getElementById(form_id);
	message_div = form_id + '_message';
	if (document.getElementById( message_div )) {
		document.getElementById( message_div ).innerHTML = '<img src="/images/loading2.gif" />';
	}
	if (!onSuccessFn) {
		onSuccessFn = function (req) {
			//alert(req.responseText);
			AjaxRequest.post({
				'url' : refresh_uri,
				'onSuccess':function(req){
					document.getElementById(underlying_div).innerHTML = req.responseText;
					history.back();
				}
			});
		};
	}
	if (!onErrorFn) {
		onErrorFn = function (req) {
			alert('There has been an error. Check your form action.');
		};
	}

	theform.method = 'post';
	theform.action = '/aql/delete/' + model;
	AjaxRequest.submit(theform,{
		'aql_save' : location.href,
		'onSuccess' : onSuccessFn,
		'onError' : onErrorFn
	});	
}//function


function aql_grid(grid_id,param) {
	eval("json_e = grid_e_"+grid_id+";");
	AjaxRequest.post({
		'url' : '/aql/grid',
		'grid' : json_e,
		'onSuccess':function(req){
			document.getElementById("grid_"+grid_id).innerHTML = req.responseText;
		}
	});
}//function aql_grid()


function save_grid_row( form_id, model, onSuccessFn, onErrorFn ) {
	theform = document.getElementById(form_id);
	message_div = form_id + '_message';
	if (document.getElementById( message_div )) {
		document.getElementById( message_div ).innerHTML = '<img src="/images/loading2.gif" />';
	}
	if (!onSuccessFn) {
		onSuccessFn = function (req) {
			//alert(req.responseText);
			document.getElementById( message_div ).innerHTML = req.responseText;
		};
	}
	if (!onErrorFn) {
		onErrorFn = function (req) {
			alert('There has been an error. Check your form action.');
		};
	}
	theform.method = 'post';
	theform.action = '/aql/save/' + model;
	AjaxRequest.submit(theform,{
		'aql_save' : location.href,
		'onSuccess' : onSuccessFn,
		'onError' : onErrorFn
	});	
}//function

function aql_archive(ide,model) {
	AjaxRequest.post({
		'url' : '/aql/archive/'+model,
		'ide' : ide,
		'onSuccess':function(req){
			document.getElementById('aql_archive_'+ide).innerHTML = req.responseText;
		}
	});
}//function

function aql_delete(ide,model,successFunc) {
	AjaxRequest.post({
		'url' : '/aql/delete/'+model,
		'ide' : ide,
                'primary_table' : model,
		'onSuccess': successFunc || function(req){
			document.getElementById('aql_delete_'+ide).innerHTML = req.responseText;
		}
	});
}//function



$(document).ready(function () {
	$('#overlay').css('backgroundColor','#000');
	$('#skybox').css('backgroundColor','#fff');
	$('#overlay').css({ 
		position: "absolute",
//		display: "none",
		zIndex: "5000"
	});

	jQuery(function( $ ){
		//borrowed from jQuery easing plugin
		//http://gsgd.co.uk/sandbox/jquery.easing.php
		$.scrollTo.defaults.axis = 'xy'; 
		$.easing.elasout = function(x, t, b, c, d) {
			var s=1.70158;var p=0;var a=c;
			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;
		};
	});

});

function skybox(href,data, w, h, onSuccessFunction, historyOff) {
	if (!historyOff) {
		SWFAddress.setValue('skybox');
	}//if
    if (data) {
        if ( typeof data !== "object" ) {
            var width = data;
            var height = w;
            onSuccessFunction = h;
            historyOff = onSuccessFunction;
            data = null;
        } else {
			var width = data.width?data.width:w;
			var height = data.height?data.height:h;	
        }
    }
	if ( $.overlayProtect == false ) $('#overlay').css('opacity', 0).show().fadeTo('normal', 0.75);
	if (width) $('#skybox').width(width);
	if (height) $('#skybox').height(height);
	if (/</.test(href)) { // it looks like html
		$('#skybox').html(href);
		overlay(null, width, height, false);
		$('#skybox :input:visible:enabled:first').focus();
	} else {
		$.post(href,data, function(data){
			$('#skybox').html(data);
			overlay(null, width, height, false);
			$('#skybox :input:visible:enabled:first').focus();
			if($.isFunction(onSuccessFunction))
				onSuccessFunction(this);
		});
	}
}

function overlay(action, w, h, historyOff) {
	if (action=='hide') {
		$('#skybox').fadeOut('normal');
		$('#overlay').fadeOut('normal');
	} else {
		if (w) $('#skybox').width(w);
		if (h) $('#skybox').height(h);
		
		//$.scrollTo(0,1000,{easing:'elasout'});
		$.scrollTo(0,500);
		$("#skybox").smartalign();
		$("#skybox").fadeIn('fast');
		
/*
		var target_w = $("#skybox").width();
		var target_h = $("#skybox").height();
		$("#skybox").width(1);
		$("#skybox").height(1);
		var cssProp = {
			position: 'absolute',
			top: '1px',
			left: '1px'
		};
		$("#skybox").css(cssProp);
		//$("#skybox").css('top') = Math.floor($(window).height() / 2 ) + 'px';
		//$("#skybox").css('left') = Math.floor($(window).width() / 2 ) + 'px';
		$("#skybox").animate({ 
			marginLeft: ( ( $(window).width() - target_w ) / 2 ) + 'px',
			opacity: 1.0,
			width: target_w,
			height: target_h
		}, 'slow', 'swing', function(){ $("#skybox").smartalign() } );
*/

	}
};

function closeskybox() {
	overlay('hide');
	return false;
};

jQuery.fn.smartalign = function(params) {
   return this.each(function(){

		var owidth = $(window).width();
		if ( $(document).width() > owidth ) owidth = $(document).width();
		$('#overlay').width( owidth );
		$('#overlay').height( $(document).height() );

		var $self = jQuery(this);
		var width = $self.width();
		var height = $self.height();
		//$self.height(0);
		var winW = $(window).width();
		var winH = $(window).height();
		var docH = $(document).height();
		//get the type of positioning
		var positionType = $self.parent().css("position");
		// get the half minus of width and height
		var halfWidth = (width/2)*(-1);
		var halfHeight = ((height/2)*(-1));
		// initializing the css properties
		var cssProp = {
			position: 'absolute'
		};
		// smart vertical align the skybox on the page
		var vpad = winH - height;
		var max_vpad;
		var tpad = 0;
		if ( vpad > height ) {
			tpad = Math.floor( vpad * .35 );
			cssProp.top = tpad + 'px';
			cssProp.marginTop = '0';
		} else if ( winH > height ) {
			cssProp.top = '50%';
			cssProp.marginTop = halfHeight;
		} else {
			tpad = Math.floor( (-0.5) * vpad );
			max_vpad = ( 0.05 * winH );
			if ( tpad > max_vpad ) tpad = max_vpad;
			cssProp.top = tpad + 'px';
			cssProp.marginTop = '0';
		}
		cssProp.height = '';
		cssProp.marginBottom = tpad + 'px';
		// horizontal center
		var scrollbarW = 0;
		if ( width > winW - scrollbarW ) {
			cssProp.left = '0';
			cssProp.marginLeft = '1px';		
		} else { 
			cssProp.left = '50%';
			cssProp.marginLeft = halfWidth;
		}
		cssProp.width = width;
		//check the current position
		if(positionType == 'static') {
			$self.parent().css("position","relative");
		}
		//aplying the css
		$self.css(cssProp);
   });
};

	$(window).resize(function(){
		if ( $('#skybox').css('display')=='block' ) $('#skybox').smartalign();
	});
	
	$(window).scroll(function(){
		if ( $('#skybox').css('display')=='block' ) $('#skybox').smartalign();
	});

function handleChange(event) {
	//alert( event.path );
	if ( $.overlayProtect == false ) {
		if ( event.path != '/skybox' ) closeskybox();
	}
}

function skybox_img(media_instance_ide) {
	skybox('/media/skybox_img/'+media_instance_ide,500);
}


function skybox_alert(text) {
	text = '<div style="padding:10px">'+text + '<br /><br /><br /><a href="javascript:void()" onclick="history.back()">close</a></div>';
	skybox(text, 400);
}

//alert( $(window).overlayProtect );
SWFAddress.setStrict(false);
SWFAddress.addEventListener(SWFAddressEvent.CHANGE, handleChange);


/*!
 * jQuery corner plugin: simple corner rounding
 * Examples and documentation at: http://jquery.malsup.com/corner/
 * version 2.09 (11-MAR-2010)
 * Requires jQuery v1.3.2 or later
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 * Authors: Dave Methvin and Mike Alsup
 */

/**
 *  corner() takes a single string argument:  $('#myDiv').corner("effect corners width")
 *
 *  effect:  name of the effect to apply, such as round, bevel, notch, bite, etc (default is round). 
 *  corners: one or more of: top, bottom, tr, tl, br, or bl.  (default is all corners)
 *  width:   width of the effect; in the case of rounded corners this is the radius. 
 *           specify this value using the px suffix such as 10px (yes, it must be pixels).
 */
;(function($) { 

var style = document.createElement('div').style;
var moz = style['MozBorderRadius'] !== undefined;
var webkit = style['WebkitBorderRadius'] !== undefined;
var radius = style['borderRadius'] !== undefined || style['BorderRadius'] !== undefined;
var mode = document.documentMode || 0;
var noBottomFold = $.browser.msie && (($.browser.version < 8 && !mode) || mode < 8);

var expr = $.browser.msie && (function() {
    var div = document.createElement('div');
    try { div.style.setExpression('width','0+0'); div.style.removeExpression('width'); }
    catch(e) { return false; }
    return true;
})();
    
function sz(el, p) { 
    return parseInt($.css(el,p))||0; 
};
function hex2(s) {
    var s = parseInt(s).toString(16);
    return ( s.length < 2 ) ? '0'+s : s;
};
function gpc(node) {
    while(node) {
        var v = $.css(node,'backgroundColor');
        if (v && v != 'transparent' && v != 'rgba(0, 0, 0, 0)') {
	        if (v.indexOf('rgb') >= 0) { 
	            var rgb = v.match(/\d+/g); 
	            return '#'+ hex2(rgb[0]) + hex2(rgb[1]) + hex2(rgb[2]);
	        }
            return v;
		}
		node = node.parentNode; // keep walking if transparent
    }
    return '#ffffff';
};

function getWidth(fx, i, width) {
    switch(fx) {
    case 'round':  return Math.round(width*(1-Math.cos(Math.asin(i/width))));
    case 'cool':   return Math.round(width*(1+Math.cos(Math.asin(i/width))));
    case 'sharp':  return Math.round(width*(1-Math.cos(Math.acos(i/width))));
    case 'bite':   return Math.round(width*(Math.cos(Math.asin((width-i-1)/width))));
    case 'slide':  return Math.round(width*(Math.atan2(i,width/i)));
    case 'jut':    return Math.round(width*(Math.atan2(width,(width-i-1))));
    case 'curl':   return Math.round(width*(Math.atan(i)));
    case 'tear':   return Math.round(width*(Math.cos(i)));
    case 'wicked': return Math.round(width*(Math.tan(i)));
    case 'long':   return Math.round(width*(Math.sqrt(i)));
    case 'sculpt': return Math.round(width*(Math.log((width-i-1),width)));
	case 'dogfold':
    case 'dog':    return (i&1) ? (i+1) : width;
    case 'dog2':   return (i&2) ? (i+1) : width;
    case 'dog3':   return (i&3) ? (i+1) : width;
    case 'fray':   return (i%2)*width;
    case 'notch':  return width; 
	case 'bevelfold':
    case 'bevel':  return i+1;
    }
};

$.fn.corner = function(options) {
    // in 1.3+ we can fix mistakes with the ready state
	if (this.length == 0) {
        if (!$.isReady && this.selector) {
            var s = this.selector, c = this.context;
            $(function() {
                $(s,c).corner(options);
            });
        }
        return this;
	}

    return this.each(function(index){
		var $this = $(this);
		// meta values override options
		var o = [$this.attr($.fn.corner.defaults.metaAttr) || '', options || ''].join(' ').toLowerCase();
		var keep = /keep/.test(o);                       // keep borders?
		var cc = ((o.match(/cc:(#[0-9a-f]+)/)||[])[1]);  // corner color
		var sc = ((o.match(/sc:(#[0-9a-f]+)/)||[])[1]);  // strip color
		var width = parseInt((o.match(/(\d+)px/)||[])[1]) || 10; // corner width
		var re = /round|bevelfold|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dogfold|dog/;
		var fx = ((o.match(re)||['round'])[0]);
		var fold = /dogfold|bevelfold/.test(o);
		var edges = { T:0, B:1 };
		var opts = {
			TL:  /top|tl|left/.test(o),       TR:  /top|tr|right/.test(o),
			BL:  /bottom|bl|left/.test(o),    BR:  /bottom|br|right/.test(o)
		};
		if ( !opts.TL && !opts.TR && !opts.BL && !opts.BR )
			opts = { TL:1, TR:1, BL:1, BR:1 };
			
		// support native rounding
		if ($.fn.corner.defaults.useNative && fx == 'round' && (radius || moz || webkit) && !cc && !sc) {
			if (opts.TL)
				$this.css(radius ? 'border-top-left-radius' : moz ? '-moz-border-radius-topleft' : '-webkit-border-top-left-radius', width + 'px');
			if (opts.TR)
				$this.css(radius ? 'border-top-right-radius' : moz ? '-moz-border-radius-topright' : '-webkit-border-top-right-radius', width + 'px');
			if (opts.BL)
				$this.css(radius ? 'border-bottom-left-radius' : moz ? '-moz-border-radius-bottomleft' : '-webkit-border-bottom-left-radius', width + 'px');
			if (opts.BR)
				$this.css(radius ? 'border-bottom-right-radius' : moz ? '-moz-border-radius-bottomright' : '-webkit-border-bottom-right-radius', width + 'px');
			return;
		}
			
		var strip = document.createElement('div');
		$(strip).css({
			overflow: 'hidden',
			height: '1px',
			minHeight: '1px',
			fontSize: '1px',
			backgroundColor: sc || 'transparent',
			borderStyle: 'solid'
		});
	
        var pad = {
            T: parseInt($.css(this,'paddingTop'))||0,     R: parseInt($.css(this,'paddingRight'))||0,
            B: parseInt($.css(this,'paddingBottom'))||0,  L: parseInt($.css(this,'paddingLeft'))||0
        };

        if (typeof this.style.zoom != undefined) this.style.zoom = 1; // force 'hasLayout' in IE
        if (!keep) this.style.border = 'none';
        strip.style.borderColor = cc || gpc(this.parentNode);
        var cssHeight = $(this).outerHeight();

        for (var j in edges) {
            var bot = edges[j];
            // only add stips if needed
            if ((bot && (opts.BL || opts.BR)) || (!bot && (opts.TL || opts.TR))) {
                strip.style.borderStyle = 'none '+(opts[j+'R']?'solid':'none')+' none '+(opts[j+'L']?'solid':'none');
                var d = document.createElement('div');
                $(d).addClass('jquery-corner');
                var ds = d.style;

                bot ? this.appendChild(d) : this.insertBefore(d, this.firstChild);

                if (bot && cssHeight != 'auto') {
                    if ($.css(this,'position') == 'static')
                        this.style.position = 'relative';
                    ds.position = 'absolute';
                    ds.bottom = ds.left = ds.padding = ds.margin = '0';
                    if (expr)
                        ds.setExpression('width', 'this.parentNode.offsetWidth');
                    else
                        ds.width = '100%';
                }
                else if (!bot && $.browser.msie) {
                    if ($.css(this,'position') == 'static')
                        this.style.position = 'relative';
                    ds.position = 'absolute';
                    ds.top = ds.left = ds.right = ds.padding = ds.margin = '0';
                    
                    // fix ie6 problem when blocked element has a border width
                    if (expr) {
                        var bw = sz(this,'borderLeftWidth') + sz(this,'borderRightWidth');
                        ds.setExpression('width', 'this.parentNode.offsetWidth - '+bw+'+ "px"');
                    }
                    else
                        ds.width = '100%';
                }
                else {
                	ds.position = 'relative';
                    ds.margin = !bot ? '-'+pad.T+'px -'+pad.R+'px '+(pad.T-width)+'px -'+pad.L+'px' : 
                                        (pad.B-width)+'px -'+pad.R+'px -'+pad.B+'px -'+pad.L+'px';                
                }

                for (var i=0; i < width; i++) {
                    var w = Math.max(0,getWidth(fx,i, width));
                    var e = strip.cloneNode(false);
                    e.style.borderWidth = '0 '+(opts[j+'R']?w:0)+'px 0 '+(opts[j+'L']?w:0)+'px';
                    bot ? d.appendChild(e) : d.insertBefore(e, d.firstChild);
                }
				
				if (fold && $.support.boxModel) {
					if (bot && noBottomFold) continue;
					for (var c in opts) {
						if (!opts[c]) continue;
						if (bot && (c == 'TL' || c == 'TR')) continue;
						if (!bot && (c == 'BL' || c == 'BR')) continue;
						
						var common = { position: 'absolute', border: 'none', margin: 0, padding: 0, overflow: 'hidden', backgroundColor: strip.style.borderColor };
						var $horz = $('<div/>').css(common).css({ width: width + 'px', height: '1px' });
						switch(c) {
						case 'TL': $horz.css({ bottom: 0, left: 0 }); break;
						case 'TR': $horz.css({ bottom: 0, right: 0 }); break;
						case 'BL': $horz.css({ top: 0, left: 0 }); break;
						case 'BR': $horz.css({ top: 0, right: 0 }); break;
						}
						d.appendChild($horz[0]);
						
						var $vert = $('<div/>').css(common).css({ top: 0, bottom: 0, width: '1px', height: width + 'px' });
						switch(c) {
						case 'TL': $vert.css({ left: width }); break;
						case 'TR': $vert.css({ right: width }); break;
						case 'BL': $vert.css({ left: width }); break;
						case 'BR': $vert.css({ right: width }); break;
						}
						d.appendChild($vert[0]);
					}
				}
            }
        }
    });
};

$.fn.uncorner = function() { 
	if (radius || moz || webkit)
		this.css(radius ? 'border-radius' : moz ? '-moz-border-radius' : '-webkit-border-radius', 0);
	$('div.jquery-corner', this).remove();
	return this;
};

// expose options
$.fn.corner.defaults = {
	useNative: true, // true if plugin should attempt to use native browser support for border radius rounding
	metaAttr:  'data-corner' // name of meta attribute to use for options
};
    
})(jQuery);


eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('D=J(a,b,c,d){G.2t=14;G.1T=14;G.2u=14;G.3l=14;G.3R=14;G.1L=14;G.3S=c||14;G.2O=d||14;G.2P=18;G.2v=18;G.2f=6L;G.2g=6M;G.3m=D.16["4P"];G.3T=D.16["4Q"];G.26=1h;G.2a=1h;G.2b=1p a=="4R"?a:D.4S;G.3n=18;G.3U=b;G.2c=14;G.3V=18;G.4T=1h;G.3W=2;G.4U=1h;G.1G=14;G.2w=14;G.1q=14;G.3o=14;G.3X=14;G.2x=14;G.3p=14;G.1M=14;G.3q=14;G.1N=14;G.3r=14;G.2h=18;F(1p D.2Q=="1y"){F(1p D.3Y=="1y")D.3Y=3;E e=1d 1O();1c(E i=8;i>0;){e[--i]=D.3s[i].1U(0,D.3Y)}D.2Q=e;F(1p D.3Z=="1y")D.3Z=3;e=1d 1O();1c(E i=12;i>0;){e[--i]=D.2y[i].1U(0,D.3Z)}D.2z=e}};D.1A=14;D.1v=(/4V/i.1B(2R.2S)&&!/4W/i.1B(2R.2S));D.41=(D.1v&&/4V 5\\.0/i.1B(2R.2S));D.4X=/4W/i.1B(2R.2S);D.3t=/6N|6O|6P/i.1B(2R.2S);D.2i=J(a){E b=0,42=0;E c=/^1H$/i.1B(a.4Y);F(c&&a.2T)b=a.2T;F(c&&a.2U)42=a.2U;E r={x:a.2V-b,y:a.43-42};F(a.4Z){E d=G.2i(a.4Z);r.x+=d.x;r.y+=d.y}O r};D.44=J(a,b){E c=b.6Q;F(!c){E d=b.51;F(d=="3u"){c=b.6R}N F(d=="52"){c=b.6S}}2W(c){F(c==a){O 1h}c=c.1w}O 18};D.1f=J(a,b){F(!(a&&a.19)){O}E c=a.19.53(" ");E d=1d 1O();1c(E i=c.1l;i>0;){F(c[--i]!=b){d[d.1l]=c[i]}}a.19=d.6T(" ")};D.1C=J(a,b){D.1f(a,b);a.19+=" "+b};D.2j=J(a){E f=D.1v?1m.1I.54:a.6U;2W(f.55!=1||/^1H$/i.1B(f.4Y))f=f.1w;O f};D.2X=J(a){E f=D.1v?1m.1I.54:a.6V;2W(f.55!=1)f=f.1w;O f};D.1P=J(a){a||(a=1m.1I);F(D.1v){a.6W=1h;a.6X=18}N{a.6Y();a.6Z()}O 18};D.1z=J(a,b,c){F(a.56){a.56("2k"+b,c)}N F(a.57){a.57(b,c,1h)}N{a["2k"+b]=c}};D.1V=J(a,b,c){F(a.58){a.58("2k"+b,c)}N F(a.5a){a.5a(b,c,1h)}N{a["2k"+b]=14}};D.1e=J(a,b){E c=14;F(1a.5b){c=1a.5b("3v://5c.70.5d/71/72",a)}N{c=1a.1e(a)}F(1p b!="1y"){b.2l(c)}O c};D.2A=J(a){2B(D){1z(a,"3u",5e);1z(a,"3w",5f);1z(a,"52",5g);F(1v){1z(a,"73",5h);a.74("5i",1h)}}};D.45=J(a){F(1p a.1W!="1y"){O a}N F(1p a.1w.1W!="1y"){O a.1w}O 14};D.46=J(a){F(1p a.1X!="1y"){O a}N F(1p a.1w.1X!="1y"){O a.1w}O 14};D.5j=J(){E a=D.1A;F(!a){O 18}E a=a;E b=a.2t;E c=a.2x;F(a.1M){D.1f(a.1M,"1r")}F(a.3q){D.1f(a.3q,"2d")}E d=a.2x.2Y("1H")[a.1i.1n()];D.1C(d,"2d");a.3q=d;E s=c.1k;s.1D="2Z";F(b.1j<0)s.2m=b.2V+"1Q";N{E e=c.1J;F(1p e=="1y")e=50;s.2m=(b.2V+b.1J-e)+"1Q"}s.33=(b.43+b.1Y)+"1Q"};D.47=J(a){E b=D.1A;F(!b){O 18}E b=b;E c=b.2t;E d=b.3p;F(b.1N){D.1f(b.1N,"1r")}F(b.3r){D.1f(b.3r,"2d")}b.3r=14;E Y=b.1i.1s()+(a?1:-1);E e=d.34;E f=18;1c(E i=12;i>0;--i){F(Y>=b.2f&&Y<=b.2g){e.1g=Y;e.1X=Y;e.1k.1D="2Z";f=1h}N{e.1k.1D="2n"}e=e.2C;Y+=a?b.3W:-b.3W}F(f){E s=d.1k;s.1D="2Z";F(c.1j<0)s.2m=c.2V+"1Q";N{E g=d.1J;F(1p g=="1y")g=50;s.2m=(c.2V+c.1J-g)+"1Q"}s.33=(c.43+c.1Y)+"1Q"}};D.3x=J(a){E b=D.1A;F(!b){O 18}F(b.1L){48(b.1L)}E c=b.2t;F(!c){O 18}E d=D.2X(a);a||(a=1m.1I);D.1f(c,"2d");F(d==c||d.1w==c){D.1R(c,a)}E e=D.45(d);E f=14;F(e){f=1d X(b.1i);F(e.1W!=f.1n()){f.1S(e.1W);b.1o(f);b.2h=18;b.35()}}N{E g=D.46(d);F(g){f=1d X(b.1i);F(g.1X!=f.1s()){f.1K(g.1X);b.1o(f);b.2h=18;b.35()}}}2B(D){1V(1a,"3y",3x);1V(1a,"3u",36);1V(1a,"3a",36);b.5k();1A=14;O 1P(a)}};D.36=J(a){E b=D.1A;F(!b){O}E c=b.2t;E d=D.2X(a);F(d==c||d.1w==c){D.1C(c,"1r 2d");D.1C(c.1w,"3b")}N{F(1p c.1j=="1y"||(c.1j!=50&&(c.1j==0||2o.5l(c.1j)>2)))D.1f(c,"2d");D.1f(c,"1r");D.1f(c.1w,"3b")}a||(a=1m.1I);F(c.1j==50&&d!=c){E e=D.2i(c);E w=c.1J;E x=a.3z;E f;E g=1h;F(x>e.x+w){f=x-e.x-w;g=18}N f=e.x-x;F(f<0)f=0;E h=c.2D;E j=c.5m;E k=2o.3A(f/10)%h.1l;1c(E i=h.1l;--i>=0;)F(h[i]==j)17;2W(k-->0)F(g){F(--i<0)i=h.1l-1}N F(++i>=h.1l)i=0;E l=h[i];c.1g=l;b.3B()}E m=D.45(d);F(m){F(m.1W!=b.1i.1n()){F(b.1M){D.1f(b.1M,"1r")}D.1C(m,"1r");b.1M=m}N F(b.1M){D.1f(b.1M,"1r")}}N{F(b.1M){D.1f(b.1M,"1r")}E n=D.46(d);F(n){F(n.1X!=b.1i.1s()){F(b.1N){D.1f(b.1N,"1r")}D.1C(n,"1r");b.1N=n}N F(b.1N){D.1f(b.1N,"1r")}}N F(b.1N){D.1f(b.1N,"1r")}}O D.1P(a)};D.5n=J(a){F(D.2X(a)==D.2j(a)){O D.1P(a)}};D.49=J(a){E b=D.1A;F(!(b&&b.2P)){O 18}E c;E d;F(D.1v){d=1m.1I.4a+1a.1Z.2U;c=1m.1I.3z+1a.1Z.2T}N{c=a.75;d=a.76}b.2E();E e=b.1q.1k;e.2m=(c-b.5o)+"1Q";e.33=(d-b.5p)+"1Q";O D.1P(a)};D.4b=J(a){E b=D.1A;F(!b){O 18}b.2P=18;2B(D){1V(1a,"3a",49);1V(1a,"3y",4b);3x(a)}b.2E()};D.5f=J(a){E b=D.2j(a);F(b.1E){O 18}E c=b.1t;c.2t=b;D.1A=c;F(b.1j!=3C)2B(D){F(b.1j==50){b.5m=b.1g;1z(1a,"3a",36)}N 1z(1a,D.41?"3a":"3u",36);1C(b,"1r 2d");1z(1a,"3y",3x)}N F(c.26){c.5q(a)}F(b.1j==-1||b.1j==1){F(c.1L)48(c.1L);c.1L=4c("D.5j()",5r)}N F(b.1j==-2||b.1j==2){F(c.1L)48(c.1L);c.1L=4c((b.1j>0)?"D.47(1h)":"D.47(18)",5r)}N{c.1L=14}O D.1P(a)};D.5h=J(a){D.1R(D.2j(a),a||1m.1I);F(D.1v){1a.3c.77()}};D.5e=J(a){E b=D.2j(a);F(D.44(b,a)||D.1A||b.1E){O 18}F(b.1x){F(b.1x.1U(0,1)=="5s"){b.1x=b.3d.3e(b.1t.3T)+b.1x.1U(1)}b.1t.4d.1g=b.1x}F(b.1j!=3C){D.1C(b,"1r");F(b.3d){D.1C(b.1w,"3b")}}O D.1P(a)};D.5g=J(a){2B(D){E b=2j(a);F(44(b,a)||1A||b.1E)O 18;1f(b,"1r");F(b.3d)1f(b.1w,"3b");F(b.1t)b.1t.4d.1g=16["4e"];O 1P(a)}};D.1R=J(c,d){E e=c.1t;E f=18;E g=18;E h=14;F(1p c.1j=="1y"){F(e.1T){D.1f(e.1T,"2F");D.1C(c,"2F");f=(e.1T==c);F(!f){e.1T=c}}e.1i.4f(c.3d);h=e.1i;E j=!(e.2h=!c.3D);F(!j&&!e.1T)e.5t(1d X(h));N g=!c.1E;F(j)e.2G(e.2b,h)}N{F(c.1j==78){D.1f(c,"1r");e.2H();O}h=1d X(e.1i);F(c.1j==0)h.4f(1d X());e.2h=18;E k=h.1s();E l=h.1n();J 1S(m){E a=h.1u();E b=h.4g(m);F(a>b){h.1o(b)}h.1S(m)};2p(c.1j){Q 5u:D.1f(c,"1r");E n=D.16["5v"];F(1p n!="1y"){n+=e.3V?D.16["5w"]:""}N{n="79 3E 7a 7b 7c 7d 7e 7f 5x G 5y.\\n"+"7g 4h 7h G 5y 3E 4h 7i 7j 7k 7l\\n"+"2q 7m 7n 5z \\"7o\\" 7p 20 4i 1t-7q.7r\\n"+"3E 7s 3F 7t 20 <7u@7v.3G> 20 7w 3F 5x 2q 7x  ;-)\\n\\n"+"7y 4h!\\n"+"3v://4j.3G/7z/1t.7A\\n"}7B(n);O;Q-2:F(k>e.2f){h.1K(k-1)}17;Q-1:F(l>0){1S(l-1)}N F(k-->e.2f){h.1K(k);1S(11)}17;Q 1:F(l<11){1S(l+1)}N F(k<e.2g){h.1K(k+1);1S(0)}17;Q 2:F(k<e.2g){h.1K(k+1)}17;Q 2e:e.5A(c.5B);O;Q 50:E o=c.2D;E p=c.1g;1c(E i=o.1l;--i>=0;)F(o[i]==p)17;F(d&&d.7C){F(--i<0)i=o.1l-1}N F(++i>=o.1l)i=0;E q=o[i];c.1g=q;e.3B();O;Q 0:F((1p e.2u=="J")&&e.2u(h,h.1s(),h.1n(),h.1u())){O 18}17}F(!h.4k(e.1i)){e.1o(h);g=1h}N F(c.1j==0)g=f=1h}F(g){d&&e.35()}F(f){D.1f(c,"1r");d&&e.2H()}};D.1b.5C=J(p){E q=14;F(!p){q=1a.2Y("1Z")[0];G.26=1h}N{q=p;G.26=18}G.1i=G.3U?1d X(G.3U):1d X();E r=D.1e("2w");G.2w=r;r.7D=0;r.7E=0;r.1t=G;D.1z(r,"3w",D.5n);E s=D.1e("1H");G.1q=s;s.19="1t";F(G.26){s.1k.5D="5E";s.1k.1D="2n"}s.2l(r);E t=D.1e("7F",r);E u=14;E v=14;E w=G;E x=J(a,b,c){u=D.1e("21",v);u.3H=b;u.19="5F";F(c!=0&&2o.5l(c)<=2)u.19+=" 7G";D.2A(u);u.1t=w;u.1j=c;u.1g="<1H 5i=\'2k\'>"+a+"</1H>";O u};v=D.1e("2I",t);v.19="7H";G.4l=x("&#7I;",1,-2);G.4l.1x=D.16["5G"];G.4m=x("&#7J;",1,-1);G.4m.1x=D.16["5H"];G.3f=x("",3,3C);G.3f.19="3f";G.4n=x("&#7K;",1,1);G.4n.1x=D.16["5I"];G.4o=x("&#7L;",1,2);G.4o.1x=D.16["5J"];v=D.1e("2I",t);v.19="7M";F(G.2a){u=D.1e("21",v);u.19="5K 5L";u.1g=D.16["5M"]}1c(E i=7;i>0;--i){u=D.1e("21",v);F(!i){u.1j=2e;u.1t=G;D.2A(u)}}G.3X=(G.2a)?v.34.2C:v.34;G.4p();E z=D.1e("3o",r);G.3o=z;1c(i=6;i>0;--i){v=D.1e("2I",z);F(G.2a){u=D.1e("21",v)}1c(E j=7;j>0;--j){u=D.1e("21",v);u.1t=G;D.2A(u)}}F(G.3V){v=D.1e("2I",z);v.19="3g";u=D.1e("21",v);u.19="3g";u.3H=2;u.1g=D.16["5N"]||"&4q;";u=D.1e("21",v);u.19="3g";u.3H=G.2a?4:3;(J(){J 3I(a,b,c,d){E e=D.1e("5O",u);e.19=a;e.1g=b;e.1t=w;e.1x=D.16["5P"];e.1j=50;e.2D=[];F(1p c!="4R")e.2D=c;N{1c(E i=c;i<=d;++i){E f;F(i<10&&d>=10)f=\'0\'+i;N f=\'\'+i;e.2D[e.2D.1l]=f}}D.2A(e);O e};E g=w.1i.2J();E j=w.1i.2K();E k=!w.4T;E l=(g>12);F(k&&l)g-=12;E H=3I("7N",g,k?1:0,k?12:23);E n=D.1e("5O",u);n.1g=":";n.19="7O";E M=3I("7P",j,0,59);E o=14;u=D.1e("21",v);u.19="3g";u.3H=2;F(k)o=3I("7Q",l?"2L":"2M",["2M","2L"]);N u.1g="&4q;";w.4r=J(){E a,g=G.1i.2J(),j=G.1i.2K();F(k){a=(g>=12);F(a)g-=12;F(g==0)g=12;o.1g=a?"2L":"2M"}H.1g=(g<10)?("0"+g):g;M.1g=(j<10)?("0"+j):j};w.3B=J(){E a=G.1i;E h=1F(H.1g,10);F(k){F(/2L/i.1B(o.1g)&&h<12)h+=12;N F(/2M/i.1B(o.1g)&&h==12)h=0}E d=a.1u();E m=a.1n();E y=a.1s();a.7R(h);a.7S(1F(M.1g,10));a.1K(y);a.1S(m);a.1o(d);G.2h=18;G.35()}})()}N{G.4r=G.3B=J(){}}E A=D.1e("7T",r);v=D.1e("2I",A);v.19="7U";u=x(D.16["4e"],G.2a?8:7,3C);u.19="1x";F(G.26){u.1x=D.16["5Q"];u.1k.7V="5R"}G.4d=u;s=D.1e("1H",G.1q);G.2x=s;s.19="5S";1c(i=0;i<D.2y.1l;++i){E B=D.1e("1H");B.19=D.1v?"3J-5T":"3J";B.1W=i;B.1g=D.2z[i];s.2l(B)}s=D.1e("1H",G.1q);G.3p=s;s.19="5S";1c(i=12;i>0;--i){E C=D.1e("1H");C.19=D.1v?"3J-5T":"3J";s.2l(C)}G.2G(G.2b,G.1i);q.2l(G.1q)};D.3h=J(b){E c=1m.2N;F(!c||c.1G)O 18;(D.1v)&&(b=1m.1I);E d=(D.1v||b.51=="4s"),K=b.7W;F(b.7X){2p(K){Q 37:d&&D.1R(c.4m);17;Q 38:d&&D.1R(c.4l);17;Q 39:d&&D.1R(c.4n);17;Q 40:d&&D.1R(c.4o);17;5U:O 18}}N 2p(K){Q 32:D.1R(c.7Y);17;Q 27:d&&c.2H();17;Q 37:Q 38:Q 39:Q 40:F(d){E e,x,y,22,4t,3K;e=K==37||K==38;3K=(K==37||K==39)?1:7;J 3L(){4t=c.1T;E p=4t.5V;x=p&15;y=p>>4;22=c.2c[y][x]};3L();J 4u(){E a=1d X(c.1i);a.1o(a.1u()-3K);c.1o(a)};J 4v(){E a=1d X(c.1i);a.1o(a.1u()+3K);c.1o(a)};2W(1){2p(K){Q 37:F(--x>=0)22=c.2c[y][x];N{x=6;K=38;3i}17;Q 38:F(--y>=0)22=c.2c[y][x];N{4u();3L()}17;Q 39:F(++x<7)22=c.2c[y][x];N{x=0;K=40;3i}17;Q 40:F(++y<c.2c.1l)22=c.2c[y][x];N{4v();3L()}17}17}F(22){F(!22.1E)D.1R(22);N F(e)4u();N 4v()}}17;Q 13:F(d)D.1R(c.1T,b);17;5U:O 18}O D.1P(b)};D.1b.2G=J(a,b){E c=1d X(),5W=c.1s(),5X=c.1n(),5Y=c.1u();G.2w.1k.2r="2v";E d=b.1s();F(d<G.2f){d=G.2f;b.1K(d)}N F(d>G.2g){d=G.2g;b.1K(d)}G.2b=a;G.1i=1d X(b);E e=b.1n();E f=b.1u();E g=b.4g();b.1o(1);E h=(b.3M()-G.2b)%7;F(h<0)h+=7;b.1o(-h);b.1o(b.1u()+1);E k=G.3o.34;E l=D.2z[e];E m=G.2c=1d 1O();E n=D.16["4w"];E o=G.1G?(G.4x={}):14;1c(E i=0;i<6;++i,k=k.2C){E p=k.34;F(G.2a){p.19="4y 5L";p.1g=b.4z();p=p.2C}k.19="7Z";E q=18,25,5Z=m[i]=[];1c(E j=0;j<7;++j,p=p.2C,b.1o(25+1)){25=b.1u();E r=b.3M();p.19="4y";p.5V=i<<4|j;5Z[j]=p;E s=(b.1n()==e);F(!s){F(G.3n){p.19+=" 80";p.3D=1h}N{p.19="81";p.1g="&4q;";p.1E=1h;3i}}N{p.3D=18;q=1h}p.1E=18;p.1g=G.3R?G.3R(b,25):25;F(o)o[b.3e("%Y%m%d")]=p;F(G.2u){E t=G.2u(b,d,e,25);F(G.3l){E u=G.3l(b,d,e,25);F(u)p.3f=u}F(t===1h){p.19+=" 1E";p.1E=1h}N{F(/1E/i.1B(t))p.1E=1h;p.19+=" "+t}}F(!p.1E){p.3d=1d X(b);p.1x="5s";F(!G.1G&&s&&25==f&&G.4U){p.19+=" 2F";G.1T=p}F(b.1s()==5W&&b.1n()==5X&&25==5Y){p.19+=" 61";p.1x+=D.16["62"]}F(n.63(r.64())!=-1)p.19+=p.3D?" 82":" 65"}}F(!(q||G.3n))k.19="83"}G.3f.1g=D.2z[e]+", "+d;G.4r();G.2w.1k.2r="84";G.66()};D.1b.66=J(){F(G.1G){1c(E i 5z G.1G){E a=G.4x[i];E d=G.1G[i];F(!d)3i;F(a)a.19+=" 2F"}}};D.1b.5t=J(a){F(G.1G){E b=a.3e("%Y%m%d");E c=G.4x[b];F(c){E d=G.1G[b];F(!d){D.1C(c,"2F");G.1G[b]=a}N{D.1f(c,"2F");85 G.1G[b]}}}};D.1b.86=J(a){G.3l=a};D.1b.1o=J(a){F(!a.4k(G.1i)){G.2G(G.2b,a)}};D.1b.87=J(){G.2G(G.2b,G.1i)};D.1b.5A=J(a){G.2G(a,G.1i);G.4p()};D.1b.88=D.1b.89=J(a){G.2u=a};D.1b.8a=J(a,z){G.2f=a;G.2g=z};D.1b.35=J(){F(G.3S){G.3S(G,G.1i.3e(G.3m))}};D.1b.2H=J(){F(G.2O){G.2O(G)}G.2E()};D.1b.8b=J(){E a=G.1q.1w;a.4A(G.1q);D.1A=14;1m.2N=14};D.1b.8c=J(a){E b=G.1q;b.1w.4A(b);a.2l(b)};D.4B=J(a){E b=1m.2N;F(!b){O 18}E c=D.1v?D.2j(a):D.2X(a);1c(;c!=14&&c!=b.1q;c=c.1w);F(c==14){1m.2N.2H();O D.1P(a)}};D.1b.67=J(){E a=G.2w.2Y("2I");1c(E i=a.1l;i>0;){E b=a[--i];D.1f(b,"3b");E c=b.2Y("21");1c(E j=c.1l;j>0;){E d=c[--j];D.1f(d,"1r");D.1f(d,"2d")}}G.1q.1k.1D="2Z";G.2v=18;F(G.26){1m.2N=G;D.1z(1a,"68",D.3h);D.1z(1a,"4s",D.3h);D.1z(1a,"3w",D.4B)}G.2E()};D.1b.69=J(){F(G.26){D.1V(1a,"68",D.3h);D.1V(1a,"4s",D.3h);D.1V(1a,"3w",D.4B)}G.1q.1k.1D="2n";G.2v=1h;G.2E()};D.1b.4C=J(x,y){E s=G.1q.1k;s.2m=x+"1Q";s.33=y+"1Q";G.67()};D.1b.6a=J(e,f){E g=G;E p=D.2i(e);F(!f||1p f!="8d"){G.4C(p.x,p.y+e.1Y);O 1h}J 6b(a){F(a.x<0)a.x=0;F(a.y<0)a.y=0;E b=1a.1e("1H");E s=b.1k;s.5D="5E";s.8e=s.8f=s.4D=s.4E="8g";1a.1Z.2l(b);E c=D.2i(b);1a.1Z.4A(b);F(D.1v){c.y+=1a.1Z.2U;c.x+=1a.1Z.2T}N{c.y+=1m.6c;c.x+=1m.6d}E d=a.x+a.4D-c.x;F(d>0)a.x-=d;d=a.y+a.4E-c.y;F(d>0)a.y-=d};G.1q.1k.1D="2Z";D.4F=J(){E w=g.1q.1J;E h=g.1q.1Y;g.1q.1k.1D="2n";E a=f.1U(0,1);E b="l";F(f.1l>1){b=f.1U(1,1)}2p(a){Q"T":p.y-=h;17;Q"B":p.y+=e.1Y;17;Q"C":p.y+=(e.1Y-h)/2;17;Q"t":p.y+=e.1Y-h;17;Q"b":17}2p(b){Q"L":p.x-=w;17;Q"R":p.x+=e.1J;17;Q"C":p.x+=(e.1J-w)/2;17;Q"l":p.x+=e.1J-w;17;Q"r":17}p.4D=w;p.4E=h+40;g.2x.1k.1D="2n";6b(p);g.4C(p.x,p.y)};F(D.3t)4c("D.4F()",10);N D.4F()};D.1b.6e=J(a){G.3m=a};D.1b.8h=J(a){G.3T=a};D.1b.4G=J(a,b){F(!b)b=G.3m;G.1o(X.4G(a,b))};D.1b.2E=J(){F(!D.1v&&!D.4X)O;J 4H(a){E b=a.1k.2r;F(!b){F(1a.4I&&1p(1a.4I.6f)=="J"){F(!D.3t)b=1a.4I.6f(a,"").8i("2r");N b=\'\'}N F(a.6g){b=a.6g.2r}N b=\'\'}O b};E c=1d 1O("8j","8k","4J");E d=G.1q;E p=D.2i(d);E e=p.x;E f=d.1J+e;E g=p.y;E h=d.1Y+g;1c(E k=c.1l;k>0;){E j=1a.2Y(c[--k]);E l=14;1c(E i=j.1l;i>0;){l=j[--i];p=D.2i(l);E m=p.x;E n=l.1J+m;E o=p.y;E q=l.1Y+o;F(G.2v||(m>f)||(n<e)||(o>h)||(q<g)){F(!l.3j){l.3j=4H(l)}l.1k.2r=l.3j}N{F(!l.3j){l.3j=4H(l)}l.1k.2r="2v"}}}};D.1b.4p=J(){E a=G.2b;E b=G.3X;E c=D.16["4w"];1c(E i=0;i<7;++i){b.19="4y 5K";E d=(i+a)%7;F(i){b.1x=D.16["6h"].4K("%s",D.3s[d]);b.1j=2e;b.1t=G;b.5B=d;D.2A(b)}F(c.63(d.64())!=-1){D.1C(b,"65")}b.1g=D.2Q[(i+a)%7];b=b.2C}};D.1b.5k=J(){G.2x.1k.1D="2n";G.3p.1k.1D="2n"};D.1b.5q=J(a){F(G.2P){O}G.2P=1h;E b;E c;F(D.1v){c=1m.1I.4a+1a.1Z.2U;b=1m.1I.3z+1a.1Z.2T}N{c=a.4a+1m.6c;b=a.3z+1m.6d}E d=G.1q.1k;G.5o=b-1F(d.2m);G.5p=c-1F(d.33);2B(D){1z(1a,"3a",49);1z(1a,"3y",4b)}};X.6i=1d 1O(31,28,31,30,31,30,31,31,30,31,30,31);X.6j=6k;X.6l=60*X.6j;X.6m=60*X.6l;X.4L=24*X.6m;X.8l=7*X.4L;X.4G=J(c,e){E f=1d X();E y=0;E m=-1;E d=0;E a=c.53(/\\W+/);E b=e.4i(/%./g);E i=0,j=0;E g=0;E h=0;1c(i=0;i<a.1l;++i){F(!a[i])3i;2p(b[i]){Q"%d":Q"%e":d=1F(a[i],10);17;Q"%m":m=1F(a[i],10)-1;17;Q"%Y":Q"%y":y=1F(a[i],10);(y<2e)&&(y+=(y>29)?6n:6o);17;Q"%b":Q"%B":1c(j=0;j<12;++j){F(D.2y[j].1U(0,a[i].1l).3N()==a[i].3N()){m=j;17}}17;Q"%H":Q"%I":Q"%k":Q"%l":g=1F(a[i],10);17;Q"%P":Q"%p":F(/2L/i.1B(a[i])&&g<12)g+=12;N F(/2M/i.1B(a[i])&&g>=12)g-=12;17;Q"%M":h=1F(a[i],10);17}}F(3k(y))y=f.1s();F(3k(m))m=f.1n();F(3k(d))d=f.1u();F(3k(g))g=f.2J();F(3k(h))h=f.2K();F(y!=0&&m!=-1&&d!=0)O 1d X(y,m,d,g,h,0);y=0;m=-1;d=0;1c(i=0;i<a.1l;++i){F(a[i].8m(/[a-8n-Z]+/)!=-1){E t=-1;1c(j=0;j<12;++j){F(D.2y[j].1U(0,a[i].1l).3N()==a[i].3N()){t=j;17}}F(t!=-1){F(m!=-1){d=m+1}m=t}}N F(1F(a[i],10)<=12&&m==-1){m=a[i]-1}N F(1F(a[i],10)>31&&y==0){y=1F(a[i],10);(y<2e)&&(y+=(y>29)?6n:6o)}N F(d==0){d=a[i]}}F(y==0)y=f.1s();F(m!=-1&&d!=0)O 1d X(y,m,d,g,h,0);O f};X.1b.4g=J(a){E b=G.1s();F(1p a=="1y"){a=G.1n()}F(((0==(b%4))&&((0!=(b%2e))||(0==(b%5u))))&&a==1){O 29}N{O X.6i[a]}};X.1b.6p=J(){E a=1d X(G.1s(),G.1n(),G.1u(),0,0,0);E b=1d X(G.1s(),0,0,0,0,0);E c=a-b;O 2o.3A(c/X.4L)};X.1b.4z=J(){E d=1d X(G.1s(),G.1n(),G.1u(),0,0,0);E a=d.3M();d.1o(d.1u()-(a+6)%7+3);E b=d.6q();d.1S(0);d.1o(4);O 2o.8o((b-d.6q())/(7*8p))+1};X.1b.4k=J(a){O((G.1s()==a.1s())&&(G.1n()==a.1n())&&(G.1u()==a.1u())&&(G.2J()==a.2J())&&(G.2K()==a.2K()))};X.1b.4f=J(a){E b=1d X(a);G.1o(1);G.1K(b.1s());G.1S(b.1n());G.1o(b.1u())};X.1b.3e=J(b){E m=G.1n();E d=G.1u();E y=G.1s();E c=G.4z();E w=G.3M();E s={};E e=G.2J();E f=(e>=12);E g=(f)?(e-12):e;E h=G.6p();F(g==0)g=12;E j=G.2K();E k=G.8q();s["%a"]=D.2Q[w];s["%A"]=D.3s[w];s["%b"]=D.2z[m];s["%B"]=D.2y[m];s["%C"]=1+2o.3A(y/2e);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(e<10)?("0"+e):e;s["%I"]=(g<10)?("0"+g):g;s["%j"]=(h<2e)?((h<10)?("8r"+h):("0"+h)):h;s["%k"]=e;s["%l"]=g;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(j<10)?("0"+j):j;s["%n"]="\\n";s["%p"]=f?"8s":"8t";s["%P"]=f?"2L":"2M";s["%s"]=2o.3A(G.8u()/6k);s["%S"]=(k<10)?("0"+k):k;s["%t"]="\\t";s["%U"]=s["%W"]=s["%V"]=(c<10)?("0"+c):c;s["%u"]=w+1;s["%w"]=w;s["%y"]=(\'\'+y).1U(2,2);s["%Y"]=y;s["%%"]="%";E l=/%./g;F(!D.41&&!D.3t)O b.4K(l,J(a){O s[a]||a});E a=b.4i(l);1c(E i=0;i<a.1l;i++){E n=s[a[i]];F(n){l=1d 8v(a[i],\'g\');b=b.4K(l,n)}}O b};F(!X.1b.3O){X.1b.3O=X.1b.1K;X.1b.1K=J(y){E d=1d X(G);d.3O(y);F(d.1n()!=G.1n())G.1o(28);G.3O(y)}}1m.2N=14;D.3s=1d 1O("6r","8w","8x","8y","8z","8A","8B","6r");D.2Q=1d 1O("6s","8C","8D","8E","8F","8G","8H","6s");D.4S=0;D.2y=1d 1O("8I","8J","8K","8L","6t","8M","8N","8O","8P","8Q","8R","8S");D.2z=1d 1O("8T","8U","8V","8W","6t","8X","8Y","8Z","90","91","92","93");D.16={};D.16["94"]="95 2q 1t";D.16["5v"]="96 X/4M 97\\n"+"(c) 4j.3G 98-99 / 9a: 9b 9c\\n"+"9d 9e 9f 9g: 3v://5c.4j.3G/9h/1t/\\n"+"9i 9j 9k 9l.  9m 3v://9n.5d/9o/9p.9q 1c 9r."+"\\n\\n"+"X 3c:\\n"+"- 6u 2q \\9s, \\9t 4N 20 4J 1X\\n"+"- 6u 2q "+6v.6w(9u)+", "+6v.6w(9v)+" 4N 20 4J 1W\\n"+"- 9w 9x 5F 2k 6x 6y 2q 9y 4N 1c 6z 3c.";D.16["5w"]="\\n\\n"+"4M 3c:\\n"+"- 6A 2k 6x 6y 2q 3g 9z 20 9A 3F\\n"+"- 4O 6B-6C 20 9B 3F\\n"+"- 4O 6C 3E 6D 1c 6z 3c.";D.16["5G"]="6E. 1X (3P 1c 3Q)";D.16["5H"]="6E. 1W (3P 1c 3Q)";D.16["9C"]="9D 6F";D.16["5I"]="6G 1W (3P 1c 3Q)";D.16["5J"]="6G 1X (3P 1c 3Q)";D.16["4e"]="9E 1i";D.16["5Q"]="9F 20 5R";D.16["62"]=" (61)";D.16["6h"]="9G %s 9H";D.16["4w"]="0,6";D.16["9I"]="9J";D.16["9K"]="6F";D.16["5P"]="(6B-)6A 4O 6D 20 9L 6H";D.16["4P"]="%Y-%m-%d";D.16["4Q"]="%a, %b %e";D.16["5M"]="9M";D.16["5N"]="4M:";J 6I(a,b){a.6J.6H=b;F(a.2h){a.2H()}};J 2O(a){a.69()};J 9N(a){E b=1a.6K(a);E c=1a.6K(a+\'9O\');2s=1d D(0,14,6I,2O);2s.2a=18;2s.3n=1h;2s.6e("%m/%d/%Y");2s.5C();2s.6J=b;2s.6a(c)};',62,609,'|||||||||||||||||||||||||||||||||||||||Calendar|var|if|this|||function||||else|return||case|||||||Date|||||||null||_TT|break|false|className|document|prototype|for|new|createElement|removeClass|innerHTML|true|date|navtype|style|length|window|getMonth|setDate|typeof|element|hilite|getFullYear|calendar|getDate|is_ie|parentNode|ttip|undefined|addEvent|_C|test|addClass|display|disabled|parseInt|multiple|div|event|offsetWidth|setFullYear|timeout|hilitedMonth|hilitedYear|Array|stopEvent|px|cellClick|setMonth|currentDateEl|substr|removeEvent|month|year|offsetHeight|body|to|td|ne|||iday|isPopup||||weekNumbers|firstDayOfWeek|ar_days|active|100|minYear|maxYear|dateClicked|getAbsolutePos|getElement|on|appendChild|left|none|Math|switch|the|visibility|cal|activeDiv|getDateStatus|hidden|table|monthsCombo|_MN|_SMN|_add_evs|with|nextSibling|_range|hideShowCovered|selected|_init|callCloseHandler|tr|getHours|getMinutes|pm|am|_dynarch_popupCalendar|onClose|dragging|_SDN|navigator|userAgent|scrollLeft|scrollTop|offsetLeft|while|getTargetElement|getElementsByTagName|block||||top|firstChild|callHandler|tableMouseOver||||mousemove|rowhilite|selection|caldate|print|title|time|_keyEvent|continue|__msh_save_visibility|isNaN|getDateToolTip|dateFormat|showsOtherMonths|tbody|yearsCombo|activeMonth|activeYear|_DN|is_khtml|mouseover|http|mousedown|tableMouseUp|mouseup|clientX|floor|onUpdateTime|300|otherMonth|and|it|com|colSpan|makeTimePart|label|step|setVars|getDay|toLowerCase|__msh_oldSetFullYear|hold|menu|getDateText|onSelected|ttDateFormat|dateStr|showsTime|yearStep|firstdayname|_SDN_len|_SMN_len||is_ie5|ST|offsetTop|isRelated|findMonth|findYear|showYearsCombo|clearTimeout|calDragIt|clientY|calDragEnd|setTimeout|tooltips|SEL_DATE|setDateOnly|getMonthDays|you|match|dynarch|equalsTo|_nav_py|_nav_pm|_nav_nm|_nav_ny|_displayWeekdays|nbsp|onSetTime|keypress|el|prevMonth|nextMonth|WEEKEND|datesCells|day|getWeekNumber|removeChild|_checkCalendar|showAt|width|height|continuation_for_the_fucking_khtml_browser|parseDate|getVisib|defaultView|select|replace|DAY|Time|buttons|or|DEF_DATE_FORMAT|TT_DATE_FORMAT|number|_FD|time24|hiliteToday|msie|opera|is_opera|tagName|offsetParent||type|mouseout|split|srcElement|nodeType|attachEvent|addEventListener|detachEvent||removeEventListener|createElementNS|www|org|dayMouseOver|dayMouseDown|dayMouseOut|dayMouseDblClick|unselectable|showMonthsCombo|_hideCombos|abs|_current|tableMouseDown|xOffs|yOffs|_dragStart|250|_|_toggleMultipleDate|400|ABOUT|ABOUT_TIME|into|language|in|setFirstDayOfWeek|fdow|create|position|absolute|button|PREV_YEAR|PREV_MONTH|NEXT_MONTH|NEXT_YEAR|name|wn|WK|TIME|span|TIME_PART|DRAG_TO_MOVE|move|combo|IEfix|default|pos|TY|TM|TD|dpos||today|PART_TODAY|indexOf|toString|weekend|_initMultipleDates|show|keydown|hide|showAtElement|fixPosition|scrollY|scrollX|setDateFormat|getComputedStyle|currentStyle|DAY_FIRST|_MD|SECOND|1000|MINUTE|HOUR|1900|2000|getDayOfYear|valueOf|Sunday|Sun|May|Use|String|fromCharCode|any|of|faster|Click|Shift|click|drag|Prev|Today|Next|value|onSelect|input_field|getElementById|1970|2050|Konqueror|Safari|KHTML|relatedTarget|fromElement|toElement|join|currentTarget|target|cancelBubble|returnValue|preventDefault|stopPropagation|w3|1999|xhtml|dblclick|setAttribute|pageX|pageY|empty|200|Help|about|box|text|is|not|translated|If|know|feel|generous|please|update|corresponding|file|lang|subdir|en|js|send|back|mihai_bazon|yahoo|get|distribution|Thank|mishoo|epl|alert|shiftKey|cellSpacing|cellPadding|thead|nav|headrow|x00ab|x2039|x203a|x00bb|daynames|hour|colon|minute|ampm|setHours|setMinutes|tfoot|footrow|cursor|keyCode|ctrlKey|_nav_now|daysrow|othermonth|emptycell|oweekend|emptyrow|visible|delete|setDateToolTipHandler|refresh|setDateStatusHandler|setDisabledHandler|setRange|destroy|reparent|string|right|bottom|0px|setTtDateFormat|getPropertyValue|applet|iframe|WEEK|search|zA|round|864e5|getSeconds|00|PM|AM|getTime|RegExp|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Mon|Tue|Wed|Thu|Fri|Sat|January|February|March|April|June|July|August|September|October|November|December|Jan|Feb|Mar|Apr|Jun|Jul|Aug|Sep|Oct|Nov|Dec|INFO|About|DHTML|Selector|2002|2005|Author|Mihai|Bazon|For|latest|version|visit|projects|Distributed|under|GNU|LGPL|See|gnu|licenses|lgpl|html|details|xab|xbb|0x2039|0x203a|Hold|mouse|above|parts|increase|decrease|GO_TODAY|Go|Select|Drag|Display|first|CLOSE|Close|TODAY|change|wk|showCalendar|_picker_button'.split('|'),0,{}))

