﻿function NSS() {location.href = "/subscribe/?e=" + $("#enss").val(); }

/**
* DD_roundies, this adds rounded-corner CSS in standard browsers and VML sublayers in IE that accomplish a similar appearance when comparing said browsers.
* Author: Drew Diller
* Email: drew.diller@gmail.com
* URL: http://www.dillerdesign.com/experiment/DD_roundies/
* Version: 0.0.2a -  preview 2008.12.26
* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_roundies/#license
*
* Usage:
* DD_roundies.addRule('#doc .container', '10px 5px'); // selector and multiple radii
* DD_roundies.addRule('.box', 5, true); // selector, radius, and optional addition of border-radius code for standard browsers.
* 
* Just want the PNG fixing effect for IE6, and don't want to also use the DD_belatedPNG library?  Don't give any additional arguments after the CSS selector.
* DD_roundies.addRule('.your .example img');
**/

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 } ('t K={16:\'K\',1L:G,1M:G,1d:G,2f:y(){u(D.2g!=8&&D.1N&&!D.1N[q.16]){q.1L=M;q.1M=M}17 u(D.2g==8){q.1d=M}},2h:D.2i,1O:[],1b:{},2j:y(){u(q.1L||q.1M){D.1N.2L(q.16,\'2M:2N-2O-2P:x\')}u(q.1d){D.2Q(\'<?2R 2S="\'+q.16+\'" 2T="#1P#2k" ?>\')}},2l:y(){t a=D.1k(\'z\');D.2m.1w.1Q(a,D.2m.1w.1w);u(a.12){2n{t b=a.12;b.1x(q.16+\'\\\\:*\',\'{1l:2U(#1P#2k)}\');q.12=b}2o(2p){}}17{q.12=a}},1x:y(a,b,c){u(1R b==\'1S\'||b===2V){b=0}u(b.2W.2q().1y(\'2X\')==-1){b=b.2q().2Y(/[^0-9 ]/g,\'\').1T(\' \')}H(t i=0;i<4;i++){b[i]=(!b[i]&&b[i]!==0)?b[C.1e((i-2),0)]:b[i]}u(q.12){u(q.12.1x){t d=a.1T(\',\');H(t i=0;i<d.1U;i++){q.12.1x(d[i],\'1l:2Z(K.1V.2r(q, [\'+b.1W(\',\')+\']))\')}}17 u(c){t e=b.1W(\'F \')+\'F\';q.12.1z(D.2s(a+\' {Q-1f:\'+e+\'; -30-Q-1f:\'+e+\';}\'));q.12.1z(D.2s(a+\' {-1A-Q-1m-1n-1f:\'+b[0]+\'F \'+b[0]+\'F; -1A-Q-1m-1X-1f:\'+b[1]+\'F \'+b[1]+\'F; -1A-Q-1Y-1X-1f:\'+b[2]+\'F \'+b[2]+\'F; -1A-Q-1Y-1n-1f:\'+b[3]+\'F \'+b[3]+\'F;}\'))}}17 u(q.1d){q.1O.31({\'2t\':a,\'2u\':b})}},2v:y(a){2w(32.33){I\'z.Q\':I\'z.34\':I\'z.1B\':q.1o(a);13;I\'z.2x\':q.1Z(a);13;I\'z.1p\':I\'z.2y\':I\'z.2z\':q.1o(a);13;I\'z.20\':a.18.z.20=(a.z.20==\'S\')?\'S\':\'35\';13;I\'z.21\':q.22(a);13;I\'z.1c\':a.18.z.1c=a.z.1c;13}},1o:y(a){a.14.23=\'\';q.2A(a);q.1Z(a);q.1C(a);q.1D(a);q.24(a);q.2B(a);q.22(a)},22:y(a){u(a.W.21.1y(\'36\')!=-1){t b=a.W.21;b=1g(b.37(b.25(\'=\')+1,b.25(\')\')),10)/2C;H(t v 1h a.x){a.x[v].1i.38=b}}},2A:y(a){u(!a.W){1q}17{t b=a.W}a.14.1p=\'\';a.14.1E=\'\';t c=(b.1p==\'2D\');t d=M;u(b.1E!=\'S\'||a.1F){u(!a.1F){a.J=b.1E;a.J=a.J.39(5,a.J.25(\'")\')-5)}17{a.J=a.26}t e=q;u(!e.1b[a.J]){t f=D.1k(\'3a\');f.1r(\'3b\',y(){q.1s=q.3c;q.1t=q.3d;e.1D(a)});f.3e=e.16+\'3f\';f.14.23=\'1l:S; 1j:27; 1m:-2E; 1n:-2E; Q:S;\';f.26=a.J;f.2F(\'1s\');f.2F(\'1t\');D.2G.1Q(f,D.2G.1w);e.1b[a.J]=f}a.x.Z.1i.26=a.J;d=G}a.x.Z.2H=!d;a.x.Z.1G=\'S\';a.x.1u.2H=!c;a.x.1u.1G=b.1p;a.14.1E=\'S\';a.14.1p=\'2D\'},1Z:y(a){a.x.1H.1G=a.W.2x},1C:y(a){t c=[\'N\',\'19\',\'1a\',\'O\'];a.P={};H(t b=0;b<4;b++){a.P[c[b]]=1g(a.W[\'Q\'+c[b]+\'U\'],10)||0}},1D:y(c){t e=[\'O\',\'N\',\'U\',\'V\'];H(t d=0;d<4;d++){c.E[e[d]]=c[\'3g\'+e[d]]}t f=y(a,b){a.z.1n=(b?0:c.E.O)+\'F\';a.z.1m=(b?0:c.E.N)+\'F\';a.z.1s=c.E.U+\'F\';a.z.1t=c.E.V+\'F\'};H(t v 1h c.x){t g=(v==\'Z\')?1:2;c.x[v].3h=(c.E.U*g)+\', \'+(c.E.V*g);f(c.x[v],M)}f(c.18,G);u(K.1d){c.x.1H.z.28=\'-3i\';u(1R c.P==\'1S\'){q.1C(c)}c.x.1u.z.28=(c.P.N-1)+\'F \'+(c.P.O-1)+\'F\'}},24:y(j){t k=y(a,w,h,r,b,c,d){t e=a?[\'m\',\'1I\',\'l\',\'1J\',\'l\',\'1I\',\'l\',\'1J\',\'l\']:[\'1J\',\'l\',\'1I\',\'l\',\'1J\',\'l\',\'1I\',\'l\',\'m\'];b*=d;c*=d;w*=d;h*=d;t R=r.2I();H(t i=0;i<4;i++){R[i]*=d;R[i]=C.3j(w/2,h/2,R[i])}t f=[e[0]+C.11(0+b)+\',\'+C.11(R[0]+c),e[1]+C.11(R[0]+b)+\',\'+C.11(0+c),e[2]+C.15(w-R[1]+b)+\',\'+C.11(0+c),e[3]+C.15(w+b)+\',\'+C.11(R[1]+c),e[4]+C.15(w+b)+\',\'+C.15(h-R[2]+c),e[5]+C.15(w-R[2]+b)+\',\'+C.15(h+c),e[6]+C.11(R[3]+b)+\',\'+C.15(h+c),e[7]+C.11(0+b)+\',\'+C.15(h-R[3]+c),e[8]+C.11(0+b)+\',\'+C.11(R[0]+c)];u(!a){f.3k()}t g=f.1W(\'\');1q g};u(1R j.P==\'1S\'){q.1C(j)}t l=j.P;t m=j.2J.2I();t n=k(M,j.E.U,j.E.V,m,0,0,2);m[0]-=C.1e(l.O,l.N);m[1]-=C.1e(l.N,l.19);m[2]-=C.1e(l.19,l.1a);m[3]-=C.1e(l.1a,l.O);H(t i=0;i<4;i++){m[i]=C.1e(m[i],0)}t o=k(G,j.E.U-l.O-l.19,j.E.V-l.N-l.1a,m,l.O,l.N,2);t p=k(M,j.E.U-l.O-l.19+1,j.E.V-l.N-l.1a+1,m,l.O,l.N,1);j.x.1u.29=o;j.x.Z.29=p;j.x.1H.29=n+o;q.2K(j)},2B:y(a){t s=a.W;t b=[\'N\',\'O\',\'19\',\'1a\'];H(t i=0;i<4;i++){a.14[\'1B\'+b[i]]=(1g(s[\'1B\'+b[i]],10)||0)+(1g(s[\'Q\'+b[i]+\'U\'],10)||0)+\'F\'}a.14.Q=\'S\'},2K:y(e){t f=K;u(!e.J||!f.1b[e.J]){1q}t g=e.W;t h={\'X\':0,\'Y\':0};t i=y(a,b){t c=M;2w(b){I\'1n\':I\'1m\':h[a]=0;13;I\'3l\':h[a]=0.5;13;I\'1X\':I\'1Y\':h[a]=1;13;1P:u(b.1y(\'%\')!=-1){h[a]=1g(b,10)*0.3m}17{c=G}}t d=(a==\'X\');h[a]=C.15(c?((e.E[d?\'U\':\'V\']-(e.P[d?\'O\':\'N\']+e.P[d?\'19\':\'1a\']))*h[a])-(f.1b[e.J][d?\'1s\':\'1t\']*h[a]):1g(b,10));h[a]+=1};H(t b 1h h){i(b,g[\'2y\'+b])}e.x.Z.1i.1j=(h.X/(e.E.U-e.P.O-e.P.19+1))+\',\'+(h.Y/(e.E.V-e.P.N-e.P.1a+1));t j=g.2z;t c={\'T\':1,\'R\':e.E.U+1,\'B\':e.E.V+1,\'L\':1};t k={\'X\':{\'2a\':\'L\',\'2b\':\'R\',\'d\':\'U\'},\'Y\':{\'2a\':\'T\',\'2b\':\'B\',\'d\':\'V\'}};u(j!=\'2c\'){c={\'T\':(h.Y),\'R\':(h.X+f.1b[e.J].1s),\'B\':(h.Y+f.1b[e.J].1t),\'L\':(h.X)};u(j.1y(\'2c-\')!=-1){t v=j.1T(\'2c-\')[1].3n();c[k[v].2a]=1;c[k[v].2b]=e.E[k[v].d]+1}u(c.B>e.E.V){c.B=e.E.V+1}}e.x.Z.z.3o=\'3p(\'+c.T+\'F \'+c.R+\'F \'+c.B+\'F \'+c.L+\'F)\'},1v:y(a){t b=q;2d(y(){b.1o(a)},1)},2e:y(a){q.1D(a);q.24(a)},1V:y(b){q.z.1l=\'S\';u(!q.W){1q}17{t c=q.W}t d={3q:G,3r:G,3s:G,3t:G,3u:G,3v:G,3w:G};u(d[q.1K]===G){1q}t e=q;t f=K;q.2J=b;q.E={};t g={3x:\'2e\',3y:\'2e\'};u(q.1K==\'A\'){t i={3z:\'1v\',3A:\'1v\',3B:\'1v\',3C:\'1v\'};H(t a 1h i){g[a]=i[a]}}H(t h 1h g){q.1r(\'3D\'+h,y(){f[g[h]](e)})}q.1r(\'3E\',y(){f.2v(e)});t j=y(a){a.z.3F=1;u(a.W.1j==\'3G\'){a.z.1j=\'3H\'}};j(q.3I);j(q);q.18=D.1k(\'3J\');q.18.14.23=\'1l:S; 1j:27; 28:0; 1B:0; Q:0; 3K:S;\';q.18.z.1c=c.1c;q.x={\'1u\':M,\'Z\':M,\'1H\':M};H(t v 1h q.x){q.x[v]=D.1k(f.16+\':3L\');q.x[v].1i=D.1k(f.16+\':3M\');q.x[v].1z(q.x[v].1i);q.x[v].3N=G;q.x[v].z.1j=\'27\';q.x[v].z.1c=c.1c;q.x[v].3O=\'1,1\';q.18.1z(q.x[v])}q.x.Z.1G=\'S\';q.x.Z.1i.3P=\'3Q\';q.3R.1Q(q.18,q);q.1F=G;u(q.1K==\'3S\'){q.1F=M;q.z.3T=\'3U\'}2d(y(){f.1o(e)},1)}};2n{D.3V("3W",G,M)}2o(2p){}K.2f();K.2j();K.2l();u(K.1d&&D.1r&&K.2h){D.1r(\'3X\',y(){u(D.3Y==\'3Z\'){t d=K.1O;t e=d.1U;t f=y(a,b,c){2d(y(){K.1V.2r(a,b)},c*2C)};H(t i=0;i<e;i++){t g=D.2i(d[i].2t);t h=g.1U;H(t r=0;r<h;r++){u(g[r].1K!=\'40\'){f(g[r],d[i].2u,r)}}}}})}', 62, 249, '||||||||||||||||||||||||||this|||var|if|||vml|function|style|||Math|document|dim|px|false|for|case|vmlBg|DD_roundies||true|Top|Left|bW|border||none||Width|Height|currentStyle|||image||floor|styleSheet|break|runtimeStyle|ceil|ns|else|vmlBox|Right|Bottom|imgSize|zIndex|IE8|max|radius|parseInt|in|filler|position|createElement|behavior|top|left|applyVML|backgroundColor|return|attachEvent|width|height|color|pseudoClass|firstChild|addRule|search|appendChild|webkit|padding|vmlStrokeWeight|vmlOffsets|backgroundImage|isImg|fillcolor|stroke|qy|qx|nodeName|IE6|IE7|namespaces|selectorsToProcess|default|insertBefore|typeof|undefined|split|length|roundify|join|right|bottom|vmlStrokeColor|display|filter|vmlOpacity|cssText|vmlPath|lastIndexOf|src|absolute|margin|path|b1|b2|repeat|setTimeout|reposition|IEversion|documentMode|querySelector|querySelectorAll|createVmlNameSpace|VML|createVmlStyleSheet|documentElement|try|catch|err|toString|call|createTextNode|selector|radii|readPropertyChanges|switch|borderColor|backgroundPosition|backgroundRepeat|vmlFill|nixBorder|100|transparent|10000px|removeAttribute|body|filled|slice|DD_radii|clipImage|add|urn|schemas|microsoft|com|writeln|import|namespace|implementation|url|null|constructor|Array|replace|expression|moz|push|event|propertyName|borderWidth|block|lpha|substring|opacity|substr|img|onload|offsetWidth|offsetHeight|className|_sizeFinder|offset|coordsize|1px|min|reverse|center|01|toUpperCase|clip|rect|BODY|TABLE|TR|TD|SELECT|OPTION|TEXTAREA|resize|move|mouseleave|mouseenter|focus|blur|on|onpropertychange|zoom|static|relative|offsetParent|ignore|background|shape|fill|stroked|coordorigin|type|tile|parentNode|IMG|visibility|hidden|execCommand|BackgroundImageCache|onreadystatechange|readyState|complete|INPUT'.split('|'), 0, {}));



/*
* jQuery UI Tabs @VERSION
*
* Copyright (c) 2007, 2008 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI/Tabs
*
* Depends:
*	ui.core.js
*/
(function($) {

    $.widget("ui.tabs", {
        _init: function() {
            // create tabs
            this._tabify(true);
        },
        _setData: function(key, value) {
            if ((/^selected/).test(key))
                this.select(value);
            else {
                this.options[key] = value;
                this._tabify();
            }
        },
        length: function() {
            return this.$tabs.length;
        },
        _tabId: function(a) {
            return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '')
			|| this.options.idPrefix + $.data(a);
        },
        ui: function(tab, panel) {
            return {
                options: this.options,
                tab: tab,
                panel: panel,
                index: this.$tabs.index(tab)
            };
        },
        _sanitizeSelector: function(hash) {
            return hash.replace(/:/g, '\\:'); // we need this because an id may contain a ":"
        },
        _cookie: function() {
            var cookie = this.cookie || (this.cookie = 'ui-tabs-' + $.data(this.element[0]));
            return $.cookie.apply(null, [cookie].concat($.makeArray(arguments)));
        },
        _tabify: function(init) {

            this.$lis = $('li:has(a[href])', this.element);
            this.$tabs = this.$lis.map(function() { return $('a', this)[0]; });
            this.$panels = $([]);

            var self = this, o = this.options;

            this.$tabs.each(function(i, a) {
                // inline tab
                if (a.hash && a.hash.replace('#', '')) // Safari 2 reports '#' for an empty hash
                    self.$panels = self.$panels.add(self._sanitizeSelector(a.hash));
                // remote tab
                else if ($(a).attr('href') != '#') { // prevent loading the page itself if href is just "#"
                    $.data(a, 'href.tabs', a.href); // required for restore on destroy
                    $.data(a, 'load.tabs', a.href); // mutable
                    var id = self._tabId(a);
                    a.href = '#' + id;
                    var $panel = $('#' + id);
                    if (!$panel.length) {
                        $panel = $(o.panelTemplate).attr('id', id).addClass(o.panelClass)
						.insertAfter(self.$panels[i - 1] || self.element);
                        $panel.data('destroy.tabs', true);
                    }
                    self.$panels = self.$panels.add($panel);
                }
                // invalid tab href
                else
                    o.disabled.push(i + 1);
            });

            // initialization from scratch
            if (init) {

                // attach necessary classes for styling if not present
                this.element.addClass(o.navClass);
                this.$panels.addClass(o.panelClass);

                // Selected tab
                // use "selected" option or try to retrieve:
                // 1. from fragment identifier in url
                // 2. from cookie
                // 3. from selected class attribute on <li>
                if (o.selected === undefined) {
                    if (location.hash) {
                        this.$tabs.each(function(i, a) {
                            if (a.hash == location.hash) {
                                o.selected = i;
                                return false; // break
                            }
                        });
                    }
                    else if (o.cookie) {
                        var index = parseInt(self._cookie(), 10);
                        if (index && self.$tabs[index]) o.selected = index;
                    }
                    else if (self.$lis.filter('.' + o.selectedClass).length)
                        o.selected = self.$lis.index(self.$lis.filter('.' + o.selectedClass)[0]);
                }
                o.selected = o.selected === null || o.selected !== undefined ? o.selected : 0; // first tab selected by default

                // Take disabling tabs via class attribute from HTML
                // into account and update option properly.
                // A selected tab cannot become disabled.
                o.disabled = $.unique(o.disabled.concat(
				$.map(this.$lis.filter('.' + o.disabledClass),
					function(n, i) { return self.$lis.index(n); })
			)).sort();
                if ($.inArray(o.selected, o.disabled) != -1)
                    o.disabled.splice($.inArray(o.selected, o.disabled), 1);

                // highlight selected tab
                this.$panels.addClass(o.hideClass);
                this.$lis.removeClass(o.selectedClass);
                if (o.selected !== null) {
                    this.$panels.eq(o.selected).removeClass(o.hideClass);
                    var classes = [o.selectedClass];
                    if (o.deselectable) classes.push(o.deselectableClass);
                    this.$lis.eq(o.selected).addClass(classes.join(' '));

                    // seems to be expected behavior that the show callback is fired
                    var onShow = function() {
                        self._trigger('show', null,
						self.ui(self.$tabs[o.selected], self.$panels[o.selected]));
                    };

                    // load if remote tab
                    if ($.data(this.$tabs[o.selected], 'load.tabs'))
                        this.load(o.selected, onShow);
                    // just trigger show event
                    else onShow();
                }

                // clean up to avoid memory leaks in certain versions of IE 6
                $(window).bind('unload', function() {
                    self.$tabs.unbind('.tabs');
                    self.$lis = self.$tabs = self.$panels = null;
                });

            }
            // update selected after add/remove
            else
                o.selected = this.$lis.index(this.$lis.filter('.' + o.selectedClass)[0]);

            // set or update cookie after init and add/remove respectively
            if (o.cookie) this._cookie(o.selected, o.cookie);

            // disable tabs
            for (var i = 0, li; li = this.$lis[i]; i++)
                $(li)[$.inArray(i, o.disabled) != -1 && !$(li).hasClass(o.selectedClass) ? 'addClass' : 'removeClass'](o.disabledClass);

            // reset cache if switching from cached to not cached
            if (o.cache === false) this.$tabs.removeData('cache.tabs');

            // set up animations
            var hideFx, showFx;
            if (o.fx) {
                if (o.fx.constructor == Array) {
                    hideFx = o.fx[0];
                    showFx = o.fx[1];
                }
                else hideFx = showFx = o.fx;
            }

            // Reset certain styles left over from animation
            // and prevent IE's ClearType bug...
            function resetStyle($el, fx) {
                $el.css({ display: '' });
                if ($.browser.msie && fx.opacity) $el[0].style.removeAttribute('filter');
            }

            // Show a tab...
            var showTab = showFx ?
			function(clicked, $show) {
			    $show.animate(showFx, showFx.duration || 'normal', function() {
			        $show.removeClass(o.hideClass);
			        resetStyle($show, showFx);
			        self._trigger('show', null, self.ui(clicked, $show[0]));
			    });
			} :
			function(clicked, $show) {
			    $show.removeClass(o.hideClass);
			    self._trigger('show', null, self.ui(clicked, $show[0]));
			};

            // Hide a tab, $show is optional...
            var hideTab = hideFx ?
			function(clicked, $hide, $show) {
			    $hide.animate(hideFx, hideFx.duration || 'normal', function() {
			        $hide.addClass(o.hideClass);
			        resetStyle($hide, hideFx);
			        if ($show) showTab(clicked, $show, $hide);
			    });
			} :
			function(clicked, $hide, $show) {
			    $hide.addClass(o.hideClass);
			    if ($show) showTab(clicked, $show);
			};

            // Switch a tab...
            function switchTab(clicked, $li, $hide, $show) {
                var classes = [o.selectedClass];
                if (o.deselectable) classes.push(o.deselectableClass);
                $li.addClass(classes.join(' ')).siblings().removeClass(classes.join(' '));
                hideTab(clicked, $hide, $show);
            }

            // attach tab event handler, unbind to avoid duplicates from former tabifying...
            this.$tabs.unbind('.tabs').bind(o.event + '.tabs', function() {

                //var trueClick = e.clientX; // add to history only if true click occured, not a triggered click
                var $li = $(this).parents('li:eq(0)'),
				$hide = self.$panels.filter(':visible'),
				$show = $(self._sanitizeSelector(this.hash));

                // If tab is already selected and not deselectable or tab disabled or 
                // or is already loading or click callback returns false stop here.
                // Check if click handler returns false last so that it is not executed
                // for a disabled or loading tab!
                if (($li.hasClass(o.selectedClass) && !o.deselectable)
				|| $li.hasClass(o.disabledClass)
				|| $(this).hasClass(o.loadingClass)
				|| self._trigger('select', null, self.ui(this, $show[0])) === false
				) {
                    this.blur();
                    return false;
                }

                o.selected = self.$tabs.index(this);

                // if tab may be closed
                if (o.deselectable) {
                    if ($li.hasClass(o.selectedClass)) {
                        self.options.selected = null;
                        $li.removeClass([o.selectedClass, o.deselectableClass].join(' '));
                        self.$panels.stop();
                        hideTab(this, $hide);
                        this.blur();
                        return false;
                    } else if (!$hide.length) {
                        self.$panels.stop();
                        var a = this;
                        self.load(self.$tabs.index(this), function() {
                            $li.addClass([o.selectedClass, o.deselectableClass].join(' '));
                            showTab(a, $show);
                        });
                        this.blur();
                        return false;
                    }
                }

                if (o.cookie) self._cookie(o.selected, o.cookie);

                // stop possibly running animations
                self.$panels.stop();

                // show new tab
                if ($show.length) {
                    var a = this;
                    self.load(self.$tabs.index(this), $hide.length ?
					function() {
					    switchTab(a, $li, $hide, $show);
					} :
					function() {
					    $li.addClass(o.selectedClass);
					    showTab(a, $show);
					}
				);
                } else
                    throw 'jQuery UI Tabs: Mismatching fragment identifier.';

                // Prevent IE from keeping other link focussed when using the back button
                // and remove dotted border from clicked link. This is controlled via CSS
                // in modern browsers; blur() removes focus from address bar in Firefox
                // which can become a usability and annoying problem with tabs('rotate').
                if ($.browser.msie) this.blur();

                return false;

            });

            // disable click if event is configured to something else
            if (o.event != 'click') this.$tabs.bind('click.tabs', function() { return false; });

        },
        add: function(url, label, index) {
            if (index == undefined)
                index = this.$tabs.length; // append by default

            var o = this.options;
            var $li = $(o.tabTemplate.replace(/#\{href\}/g, url).replace(/#\{label\}/g, label));
            $li.data('destroy.tabs', true);

            var id = url.indexOf('#') == 0 ? url.replace('#', '') : this._tabId($('a:first-child', $li)[0]);

            // try to find an existing element before creating a new one
            var $panel = $('#' + id);
            if (!$panel.length) {
                $panel = $(o.panelTemplate).attr('id', id)
				.addClass(o.hideClass)
				.data('destroy.tabs', true);
            }
            $panel.addClass(o.panelClass);
            if (index >= this.$lis.length) {
                $li.appendTo(this.element);
                $panel.appendTo(this.element[0].parentNode);
            } else {
                $li.insertBefore(this.$lis[index]);
                $panel.insertBefore(this.$panels[index]);
            }

            o.disabled = $.map(o.disabled,
			function(n, i) { return n >= index ? ++n : n });

            this._tabify();

            if (this.$tabs.length == 1) {
                $li.addClass(o.selectedClass);
                $panel.removeClass(o.hideClass);
                var href = $.data(this.$tabs[0], 'load.tabs');
                if (href)
                    this.load(index, href);
            }

            // callback
            this._trigger('add', null, this.ui(this.$tabs[index], this.$panels[index]));
        },
        remove: function(index) {
            var o = this.options, $li = this.$lis.eq(index).remove(),
			$panel = this.$panels.eq(index).remove();

            // If selected tab was removed focus tab to the right or
            // in case the last tab was removed the tab to the left.
            if ($li.hasClass(o.selectedClass) && this.$tabs.length > 1)
                this.select(index + (index + 1 < this.$tabs.length ? 1 : -1));

            o.disabled = $.map($.grep(o.disabled, function(n, i) { return n != index; }),
			function(n, i) { return n >= index ? --n : n });

            this._tabify();

            // callback
            this._trigger('remove', null, this.ui($li.find('a')[0], $panel[0]));
        },
        enable: function(index) {
            var o = this.options;
            if ($.inArray(index, o.disabled) == -1)
                return;

            var $li = this.$lis.eq(index).removeClass(o.disabledClass);
            if ($.browser.safari) { // fix disappearing tab (that used opacity indicating disabling) after enabling in Safari 2...
                $li.css('display', 'inline-block');
                setTimeout(function() {
                    $li.css('display', 'block');
                }, 0);
            }

            o.disabled = $.grep(o.disabled, function(n, i) { return n != index; });

            // callback
            this._trigger('enable', null, this.ui(this.$tabs[index], this.$panels[index]));
        },
        disable: function(index) {
            var self = this, o = this.options;
            if (index != o.selected) { // cannot disable already selected tab
                this.$lis.eq(index).addClass(o.disabledClass);

                o.disabled.push(index);
                o.disabled.sort();

                // callback
                this._trigger('disable', null, this.ui(this.$tabs[index], this.$panels[index]));
            }
        },
        select: function(index) {
            // TODO make null as argument work
            if (typeof index == 'string')
                index = this.$tabs.index(this.$tabs.filter('[href$=' + index + ']')[0]);
            this.$tabs.eq(index).trigger(this.options.event + '.tabs');
        },
        load: function(index, callback) { // callback is for internal usage only

            var self = this, o = this.options, $a = this.$tabs.eq(index), a = $a[0],
				bypassCache = callback == undefined || callback === false, url = $a.data('load.tabs');

            callback = callback || function() { };

            // no remote or from cache - just finish with callback
            if (!url || !bypassCache && $.data(a, 'cache.tabs')) {
                callback();
                return;
            }

            // load remote from here on

            var inner = function(parent) {
                var $parent = $(parent), $inner = $parent.find('*:last');
                return $inner.length && $inner.is(':not(img)') && $inner || $parent;
            };
            var cleanup = function() {
                self.$tabs.filter('.' + o.loadingClass).removeClass(o.loadingClass)
					.each(function() {
					    if (o.spinner)
					        inner(this).parent().html(inner(this).data('label.tabs'));
					});
                self.xhr = null;
            };

            if (o.spinner) {
                var label = inner(a).html();
                inner(a).wrapInner('<em></em>')
				.find('em').data('label.tabs', label).html(o.spinner);
            }

            var ajaxOptions = $.extend({}, o.ajaxOptions, {
                url: url,
                success: function(r, s) {
                    $(self._sanitizeSelector(a.hash)).html(r);
                    cleanup();

                    if (o.cache)
                        $.data(a, 'cache.tabs', true); // if loaded once do not load them again

                    // callbacks
                    self._trigger('load', null, self.ui(self.$tabs[index], self.$panels[index]));
                    try {
                        o.ajaxOptions.success(r, s);
                    }
                    catch (e) { }

                    // This callback is required because the switch has to take
                    // place after loading has completed. Call last in order to 
                    // fire load before show callback...
                    callback();
                }
            });
            if (this.xhr) {
                // terminate pending requests from other tabs and restore tab label
                this.xhr.abort();
                cleanup();
            }
            $a.addClass(o.loadingClass);
            self.xhr = $.ajax(ajaxOptions);
        },
        url: function(index, url) {
            this.$tabs.eq(index).removeData('cache.tabs').data('load.tabs', url);
        },
        destroy: function() {
            var o = this.options;
            this.element.unbind('.tabs')
			.removeClass(o.navClass).removeData('tabs');
            this.$tabs.each(function() {
                var href = $.data(this, 'href.tabs');
                if (href)
                    this.href = href;
                var $this = $(this).unbind('.tabs');
                $.each(['href', 'load', 'cache'], function(i, prefix) {
                    $this.removeData(prefix + '.tabs');
                });
            });
            this.$lis.add(this.$panels).each(function() {
                if ($.data(this, 'destroy.tabs'))
                    $(this).remove();
                else
                    $(this).removeClass([o.selectedClass, o.deselectableClass,
					o.disabledClass, o.panelClass, o.hideClass].join(' '));
            });
            if (o.cookie)
                this._cookie(null, o.cookie);
        }
    });

    $.extend($.ui.tabs, {
        version: '@VERSION',
        getter: 'length',
        defaults: {
            // basic setup
            deselectable: false,
            event: 'click',
            disabled: [],
            cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
            // Ajax
            spinner: 'Loading&#8230;',
            cache: false,
            idPrefix: 'ui-tabs-',
            ajaxOptions: null,
            // animations
            fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
            // templates
            tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>',
            panelTemplate: '<div></div>',
            // CSS class names
            navClass: 'ui-tabs-nav',
            selectedClass: 'ui-tabs-selected',
            deselectableClass: 'ui-tabs-deselectable',
            disabledClass: 'ui-tabs-disabled',
            panelClass: 'ui-tabs-panel',
            hideClass: 'ui-tabs-hide',
            loadingClass: 'ui-tabs-loading'
        }
    });

    /*
    * Tabs Extensions
    */

    /*
    * Rotate
    */
    $.extend($.ui.tabs.prototype, {
        rotation: null,
        rotate: function(ms, continuing) {

            continuing = continuing || false;

            var self = this, t = this.options.selected;

            function start() {
                self.rotation = setInterval(function() {
                    t = ++t < self.$tabs.length ? t : 0;
                    self.select(t);
                }, ms);
            }

            function stop(e) {
                if (!e || e.clientX) { // only in case of a true click
                    clearInterval(self.rotation);
                }
            }

            // start interval
            if (ms) {
                start();
                if (!continuing)
                    this.$tabs.bind(this.options.event + '.tabs', stop);
                else
                    this.$tabs.bind(this.options.event + '.tabs', function() {
                        stop();
                        t = self.options.selected;
                        start();
                    });
            }
            // stop interval
            else {
                stop();
                this.$tabs.unbind(this.options.event + '.tabs', stop);
            }
        }
    });

})(jQuery);



/*
* jQuery UI @VERSION
*
* Copyright (c) 2008 Paul Bakaus (ui.jquery.com)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI
*
* $Date: 2008-04-01 08:23:47 -0500 (Tue, 01 Apr 2008) $
* $Rev: 5174 $
*/
; (function($) {

    //If the UI scope is not available, add it
    $.ui = $.ui || {};

    //Add methods that are vital for all mouse interaction stuff (plugin registering)
    $.extend($.ui, {
        plugin: {
            add: function(module, option, set) {
                var proto = $.ui[module].prototype;
                for (var i in set) {
                    proto.plugins[i] = proto.plugins[i] || [];
                    proto.plugins[i].push([option, set[i]]);
                }
            },
            call: function(instance, name, arguments) {
                var set = instance.plugins[name]; if (!set) return;
                for (var i = 0; i < set.length; i++) {
                    if (instance.options[set[i][0]]) set[i][1].apply(instance.element, arguments);
                }
            }
        },
        cssCache: {},
        css: function(name) {
            if ($.ui.cssCache[name]) return $.ui.cssCache[name];
            var tmp = $('<div class="ui-resizable-gen">').addClass(name).css({ position: 'absolute', top: '-5000px', left: '-5000px', display: 'block' }).appendTo('body');

            //if (!$.browser.safari)
            //tmp.appendTo('body'); 

            //Opera and Safari set width and height to 0px instead of auto
            //Safari returns rgba(0,0,0,0) when bgcolor is not set
            $.ui.cssCache[name] = !!(
				(!/auto|default/.test(tmp.css('cursor')) || (/^[1-9]/).test(tmp.css('height')) || (/^[1-9]/).test(tmp.css('width')) ||
				!(/none/).test(tmp.css('backgroundImage')) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css('backgroundColor')))
			);
            try { $('body').get(0).removeChild(tmp.get(0)); } catch (e) { }
            return $.ui.cssCache[name];
        },
        disableSelection: function(e) {
            e.unselectable = "on";
            e.onselectstart = function() { return false; };
            if (e.style) e.style.MozUserSelect = "none";
        },
        enableSelection: function(e) {
            e.unselectable = "off";
            e.onselectstart = function() { return true; };
            if (e.style) e.style.MozUserSelect = "";
        },
        hasScroll: function(e, a) {
            var scroll = /top/.test(a || "top") ? 'scrollTop' : 'scrollLeft', has = false;
            if (e[scroll] > 0) return true; e[scroll] = 1;
            has = e[scroll] > 0 ? true : false; e[scroll] = 0;
            return has;
        }
    });

    /******* fn scope modifications ********/

    $.each(['Left', 'Top'], function(i, name) {
        if (!$.fn['scroll' + name]) $.fn['scroll' + name] = function(v) {
            return v != undefined ?
				this.each(function() { this == window || this == document ? window.scrollTo(name == 'Left' ? v : $(window)['scrollLeft'](), name == 'Top' ? v : $(window)['scrollTop']()) : this['scroll' + name] = v; }) :
				this[0] == window || this[0] == document ? self[(name == 'Left' ? 'pageXOffset' : 'pageYOffset')] || $.boxModel && document.documentElement['scroll' + name] || document.body['scroll' + name] : this[0]['scroll' + name];
        };
    });

    var _remove = $.fn.remove;
    $.fn.extend({
        position: function() {
            var offset = this.offset();
            var offsetParent = this.offsetParent();
            var parentOffset = offsetParent.offset();

            return {
                top: offset.top - num(this[0], 'marginTop') - parentOffset.top - num(offsetParent, 'borderTopWidth'),
                left: offset.left - num(this[0], 'marginLeft') - parentOffset.left - num(offsetParent, 'borderLeftWidth')
            };
        },
        offsetParent: function() {
            var offsetParent = this[0].offsetParent;
            while (offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && $.css(offsetParent, 'position') == 'static'))
                offsetParent = offsetParent.offsetParent;
            return $(offsetParent);
        },
        mouseInteraction: function(o) {
            return this.each(function() {
                new $.ui.mouseInteraction(this, o);
            });
        },
        removeMouseInteraction: function(o) {
            return this.each(function() {
                if ($.data(this, "ui-mouse"))
                    $.data(this, "ui-mouse").destroy();
            });
        },
        remove: function() {
            jQuery("*", this).add(this).trigger("remove");
            return _remove.apply(this, arguments);
        }
    });

    function num(el, prop) {
        return parseInt($.curCSS(el.jquery ? el[0] : el, prop, true)) || 0;
    };


    /********** Mouse Interaction Plugin *********/

    $.ui.mouseInteraction = function(element, options) {

        var self = this;
        this.element = element;

        $.data(this.element, "ui-mouse", this);
        this.options = $.extend({}, options);

        $(element).bind('mousedown.draggable', function() { return self.click.apply(self, arguments); });
        if ($.browser.msie) $(element).attr('unselectable', 'on'); //Prevent text selection in IE

        // prevent draggable-options-delay bug #2553
        $(element).mouseup(function() {
            if (self.timer) clearInterval(self.timer);
        });
    };

    $.extend($.ui.mouseInteraction.prototype, {

        destroy: function() { $(this.element).unbind('mousedown.draggable'); },
        trigger: function() { return this.click.apply(this, arguments); },
        click: function(e) {

            if (
				   e.which != 1 //only left click starts dragging
				|| $.inArray(e.target.nodeName.toLowerCase(), this.options.dragPrevention || []) != -1 // Prevent execution on defined elements
				|| (this.options.condition && !this.options.condition.apply(this.options.executor || this, [e, this.element])) //Prevent execution on condition
			) return true;

            var self = this;
            var initialize = function() {
                self._MP = { left: e.pageX, top: e.pageY }; // Store the click mouse position
                $(document).bind('mouseup.draggable', function() { return self.stop.apply(self, arguments); });
                $(document).bind('mousemove.draggable', function() { return self.drag.apply(self, arguments); });

                if (!self.initalized && Math.abs(self._MP.left - e.pageX) >= self.options.distance || Math.abs(self._MP.top - e.pageY) >= self.options.distance) {
                    if (self.options.start) self.options.start.call(self.options.executor || self, e, self.element);
                    if (self.options.drag) self.options.drag.call(self.options.executor || self, e, this.element); //This is actually not correct, but expected
                    self.initialized = true;
                }
            };

            if (this.options.delay) {
                if (this.timer) clearInterval(this.timer);
                this.timer = setTimeout(initialize, this.options.delay);
            } else {
                initialize();
            }

            return false;

        },
        stop: function(e) {

            var o = this.options;
            if (!this.initialized) return $(document).unbind('mouseup.draggable').unbind('mousemove.draggable');

            if (this.options.stop) this.options.stop.call(this.options.executor || this, e, this.element);
            $(document).unbind('mouseup.draggable').unbind('mousemove.draggable');
            this.initialized = false;
            return false;

        },
        drag: function(e) {

            var o = this.options;
            if ($.browser.msie && !e.button) return this.stop.apply(this, [e]); // IE mouseup check

            if (!this.initialized && (Math.abs(this._MP.left - e.pageX) >= o.distance || Math.abs(this._MP.top - e.pageY) >= o.distance)) {
                if (this.options.start) this.options.start.call(this.options.executor || this, e, this.element);
                this.initialized = true;
            } else {
                if (!this.initialized) return false;
            }

            if (o.drag) o.drag.call(this.options.executor || this, e, this.element);
            return false;

        }
    });

})(jQuery);




/*
* jQuery UI Slider
*
* Copyright (c) 2008 Paul Bakaus
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
* 
* http://docs.jquery.com/UI/Slider
*
* Depends:
*   ui.base.js
*
* Revision: $Id: ui.slider.js 5219 2008-04-09 20:16:05Z braeker $
*/
; (function($) {

    $.fn.extend({
        slider: function(options) {
            var args = Array.prototype.slice.call(arguments, 1);

            if (options == "value")
                return $.data(this[0], "slider").value(arguments[1]);

            return this.each(function() {
                if (typeof options == "string") {
                    var slider = $.data(this, "slider");
                    if (slider) slider[options].apply(slider, args);

                } else if (!$.data(this, "slider"))
                    new $.ui.slider(this, options);
            });
        }
    });

    $.ui.slider = function(element, options) {

        //Initialize needed constants
        var self = this;
        this.element = $(element);
        $.data(element, "slider", this);
        this.element.addClass("ui-slider");

        //Prepare the passed options
        this.options = $.extend({}, $.ui.slider.defaults, options);
        var o = this.options;
        $.extend(o, {
            axis: o.axis || (element.offsetWidth < element.offsetHeight ? 'vertical' : 'horizontal'),
            max: !isNaN(parseInt(o.max, 10)) ? { x: parseInt(o.max, 10), y: parseInt(o.max, 10)} : ({ x: o.max && o.max.x || 100, y: o.max && o.max.y || 100 }),
            min: !isNaN(parseInt(o.min, 10)) ? { x: parseInt(o.min, 10), y: parseInt(o.min, 10)} : ({ x: o.min && o.min.x || 0, y: o.min && o.min.y || 0 })
        });

        //Prepare the real maxValue
        o.realMax = {
            x: o.max.x - o.min.x,
            y: o.max.y - o.min.y
        };

        //Calculate stepping based on steps
        o.stepping = {
            x: o.stepping && o.stepping.x || parseInt(o.stepping, 10) || (o.steps && o.steps.x ? o.realMax.x / o.steps.x : 0),
            y: o.stepping && o.stepping.y || parseInt(o.stepping, 10) || (o.steps && o.steps.y ? o.realMax.y / o.steps.y : 0)
        };

        $(element).bind("setData.slider", function(event, key, value) {
            self.options[key] = value;
        }).bind("getData.slider", function(event, key) {
            return self.options[key];
        });

        //Initialize mouse and key events for interaction
        this.handle = $(o.handle, element);
        if (!this.handle.length) {
            self.handle = self.generated = $(o.handles || [0]).map(function() {
                var handle = $("<div/>").addClass("ui-slider-handle").appendTo(element);
                if (this.id)
                    handle.attr("id", this.id);
                return handle[0];
            });
        }
        $(this.handle)
			.mouseInteraction({
			    executor: this,
			    delay: o.delay,
			    distance: o.distance != undefined ? o.distance : 1,
			    dragPrevention: o.prevention ? o.prevention.toLowerCase().split(',') : ['input', 'textarea', 'button', 'select', 'option'],
			    start: this.start,
			    stop: this.stop,
			    drag: this.drag,
			    condition: function(e, handle) {
			        if (!this.disabled) {
			            if (this.currentHandle) this.blur(this.currentHandle);
			            this.focus(handle, 1);
			            return !this.disabled;
			        }
			    }
			})
			.wrap('<a href="javascript:void(0)" style="cursor:default;"></a>')
			.parent()
				.bind('focus', function(e) { self.focus(this.firstChild); })
				.bind('blur', function(e) { self.blur(this.firstChild); })
				.bind('keydown', function(e) {
				    if (/(37|38|39|40)/.test(e.keyCode)) {
				        self.moveTo({
				            x: /(37|39)/.test(e.keyCode) ? (e.keyCode == 37 ? '-' : '+') + '=' + self.oneStep(1) : null,
				            y: /(38|40)/.test(e.keyCode) ? (e.keyCode == 38 ? '-' : '+') + '=' + self.oneStep(2) : null
				        }, this.firstChild);
				    }
				})
		;

        //Prepare dynamic properties for later use
        this.actualSize = { width: this.element.outerWidth(), height: this.element.outerHeight() };

        //Bind the click to the slider itself
        this.element.bind('mousedown.slider', function(e) {
            self.click.apply(self, [e]);
            self.currentHandle.data("ui-mouse").trigger(e);
            self.firstValue = self.firstValue + 1; //This is for always triggering the change event
        });

        //Move the first handle to the startValue
        $.each(o.handles || [], function(index, handle) {
            self.moveTo(handle.start, index, true);
        });
        if (!isNaN(o.startValue))
            this.moveTo(o.startValue, 0, true);

        //If we only have one handle, set the previous handle to this one to allow clicking before selecting the handle
        if (this.handle.length == 1) this.previousHandle = this.handle;
        if (this.handle.length == 2 && o.range) this.createRange();

    };

    $.extend($.ui.slider.prototype, {
        plugins: {},
        createRange: function() {
            this.rangeElement = $('<div></div>')
				.addClass('ui-slider-range')
				.css({ position: 'absolute' })
				.appendTo(this.element);
            this.updateRange();
        },
        updateRange: function() {
            var prop = this.options.axis == "vertical" ? "top" : "left";
            var size = this.options.axis == "vertical" ? "height" : "width";
            this.rangeElement.css(prop, parseInt($(this.handle[0]).css(prop), 10) + this.handleSize(0, this.options.axis == "vertical" ? 2 : 1) / 2);
            this.rangeElement.css(size, parseInt($(this.handle[1]).css(prop), 10) - parseInt($(this.handle[0]).css(prop), 10));
        },
        getRange: function() {
            return this.rangeElement ? this.convertValue(parseInt(this.rangeElement.css(this.options.axis == "vertical" ? "height" : "width"), 10)) : null;
        },
        ui: function(e) {
            return {
                instance: this,
                options: this.options,
                handle: this.currentHandle,
                value: this.options.axis != "both" || !this.options.axis ? Math.round(this.value(null, this.options.axis == "vertical" ? 2 : 1)) : {
                    x: Math.round(this.value(null, 1)),
                    y: Math.round(this.value(null, 2))
                },
                range: this.getRange()
            };
        },
        propagate: function(n, e) {
            $.ui.plugin.call(this, n, [e, this.ui()]);
            this.element.triggerHandler(n == "slide" ? n : "slide" + n, [e, this.ui()], this.options[n]);
        },
        destroy: function() {
            this.element
				.removeClass("ui-slider ui-slider-disabled")
				.removeData("slider")
				.unbind(".slider");
            this.handle.removeMouseInteraction();
            this.generated && this.generated.remove();
        },
        enable: function() {
            this.element.removeClass("ui-slider-disabled");
            this.disabled = false;
        },
        disable: function() {
            this.element.addClass("ui-slider-disabled");
            this.disabled = true;
        },
        focus: function(handle, hard) {
            this.currentHandle = $(handle).addClass('ui-slider-handle-active');
            if (hard) this.currentHandle.parent()[0].focus();
        },
        blur: function(handle) {
            $(handle).removeClass('ui-slider-handle-active');
            if (this.currentHandle && this.currentHandle[0] == handle) { this.previousHandle = this.currentHandle; this.currentHandle = null; };
        },
        value: function(handle, axis) {
            if (this.handle.length == 1) this.currentHandle = this.handle;
            if (!axis) axis = this.options.axis == "vertical" ? 2 : 1;

            var value = ((parseInt($(handle != undefined && handle !== null ? this.handle[handle] || handle : this.currentHandle).css(axis == 1 ? "left" : "top"), 10) / (this.actualSize[axis == 1 ? "width" : "height"] - this.handleSize(null, axis))) * this.options.realMax[axis == 1 ? "x" : "y"]) + this.options.min[axis == 1 ? "x" : "y"];

            var o = this.options;
            if (o.stepping[axis == 1 ? "x" : "y"]) {
                value = Math.round(value / o.stepping[axis == 1 ? "x" : "y"]) * o.stepping[axis == 1 ? "x" : "y"];
            }
            return value;
        },
        convertValue: function(value, axis) {
            if (!axis) axis = this.options.axis == "vertical" ? 2 : 1;
            return this.options.min[axis == 1 ? "x" : "y"] + (value / (this.actualSize[axis == 1 ? "width" : "height"] - this.handleSize(null, axis))) * this.options.realMax[axis == 1 ? "x" : "y"];
        },
        translateValue: function(value, axis) {
            if (!axis) axis = this.options.axis == "vertical" ? 2 : 1;
            return ((value - this.options.min[axis == 1 ? "x" : "y"]) / this.options.realMax[axis == 1 ? "x" : "y"]) * (this.actualSize[axis == 1 ? "width" : "height"] - this.handleSize(null, axis));
        },
        handleSize: function(handle, axis) {
            if (!axis) axis = this.options.axis == "vertical" ? 2 : 1;
            return $(handle != undefined && handle !== null ? this.handle[handle] : this.currentHandle)[axis == 1 ? "outerWidth" : "outerHeight"]();
        },
        click: function(e) {

            // This method is only used if:
            // - The user didn't click a handle
            // - The Slider is not disabled
            // - There is a current, or previous selected handle (otherwise we wouldn't know which one to move)
            var pointer = [e.pageX, e.pageY];
            var clickedHandle = false; this.handle.each(function() { if (this == e.target) clickedHandle = true; });
            if (clickedHandle || this.disabled || !(this.currentHandle || this.previousHandle)) return;

            //If a previous handle was focussed, focus it again
            if (this.previousHandle) this.focus(this.previousHandle, 1);

            //Move focussed handle to the clicked position
            this.offset = this.element.offset();
            this.moveTo({
                y: this.convertValue(e.pageY - this.offset.top - this.currentHandle.outerHeight() / 2),
                x: this.convertValue(e.pageX - this.offset.left - this.currentHandle.outerWidth() / 2)
            }, null, true);
        },
        start: function(e, handle) {

            var o = this.options;
            if (!this.currentHandle) this.focus(this.previousHandle, true); //This is a especially ugly fix for strange blur events happening on mousemove events

            this.offset = this.element.offset();
            this.handleOffset = this.currentHandle.offset();
            this.clickOffset = { top: e.pageY - this.handleOffset.top, left: e.pageX - this.handleOffset.left };
            this.firstValue = this.value();

            this.propagate('start', e);
            return false;

        },
        stop: function(e) {
            this.propagate('stop', e);
            if (this.firstValue != this.value())
                this.propagate('change', e);
            this.focus(this.currentHandle, true); //This is a especially ugly fix for strange blur events happening on mousemove events
            return false;
        },

        oneStep: function(axis) {
            if (!axis) axis = this.options.axis == "vertical" ? 2 : 1;
            return this.options.stepping[axis == 1 ? "x" : "y"] ? this.options.stepping[axis == 1 ? "x" : "y"] : (this.options.realMax[axis == 1 ? "x" : "y"] / this.actualSize[axis == 1 ? "width" : "height"]) * 5;
        },

        translateRange: function(value, axis) {
            if (this.rangeElement) {
                if (this.currentHandle[0] == this.handle[0] && value >= this.translateValue(this.value(1), axis))
                    value = this.translateValue(this.value(1, axis) - this.oneStep(axis), axis);
                if (this.currentHandle[0] == this.handle[1] && value <= this.translateValue(this.value(0), axis))
                    value = this.translateValue(this.value(0, axis) + this.oneStep(axis));
            }
            if (this.options.handles) {
                var handle = this.options.handles[this.handleIndex()];
                if (value < this.translateValue(handle.min, axis)) {
                    value = this.translateValue(handle.min, axis);
                } else if (value > this.translateValue(handle.max, axis)) {
                    value = this.translateValue(handle.max, axis);
                }
            }
            return value;
        },

        handleIndex: function() {
            return this.handle.index(this.currentHandle[0])
        },

        translateLimits: function(value, axis) {
            if (!axis) axis = this.options.axis == "vertical" ? 2 : 1;
            if (value >= this.actualSize[axis == 1 ? "width" : "height"] - this.handleSize(null, axis))
                value = this.actualSize[axis == 1 ? "width" : "height"] - this.handleSize(null, axis);
            if (value <= 0)
                value = 0;
            return value;
        },

        drag: function(e, handle) {

            var o = this.options;
            var position = { top: e.pageY - this.offset.top - this.clickOffset.top, left: e.pageX - this.offset.left - this.clickOffset.left };
            if (!this.currentHandle) this.focus(this.previousHandle, true); //This is a especially ugly fix for strange blur events happening on mousemove events

            position.left = this.translateLimits(position.left, 1);
            position.top = this.translateLimits(position.top, 2);

            if (o.stepping.x) {
                var value = this.convertValue(position.left, 1);
                value = Math.round(value / o.stepping.x) * o.stepping.x;
                position.left = this.translateValue(value, 1);
            }
            if (o.stepping.y) {
                var value = this.convertValue(position.top, 2);
                value = Math.round(value / o.stepping.y) * o.stepping.y;
                position.top = this.translateValue(value, 2);
            }

            position.left = this.translateRange(position.left, 1);
            position.top = this.translateRange(position.top, 2);

            if (o.axis != "vertical") this.currentHandle.css({ left: position.left });
            if (o.axis != "horizontal") this.currentHandle.css({ top: position.top });

            if (this.rangeElement)
                this.updateRange();
            this.propagate('slide', e);
            return false;
        },

        moveTo: function(value, handle, noPropagation) {
            var o = this.options;
            if (handle == undefined && !this.currentHandle && this.handle.length != 1)
                return false; //If no handle has been passed, no current handle is available and we have multiple handles, return false
            if (handle == undefined && !this.currentHandle)
                handle = 0; //If only one handle is available, use it
            if (handle != undefined)
                this.currentHandle = this.previousHandle = $(this.handle[handle] || handle);



            if (value.x !== undefined && value.y !== undefined) {
                var x = value.x;
                var y = value.y;
            } else {
                var x = value, y = value;
            }

            if (x && x.constructor != Number) {
                var me = /^\-\=/.test(x), pe = /^\+\=/.test(x);
                if (me) {
                    x = this.value(null, 1) - parseInt(x.replace('-=', ''), 10);
                } else if (pe) {
                    x = this.value(null, 1) + parseInt(x.replace('+=', ''), 10);
                }
            }

            if (y && y.constructor != Number) {
                var me = /^\-\=/.test(y), pe = /^\+\=/.test(y);
                if (me) {
                    y = this.value(null, 2) - parseInt(y.replace('-=', ''), 10);
                } else if (pe) {
                    y = this.value(null, 2) + parseInt(y.replace('+=', ''), 10);
                }
            }

            if (o.axis != "vertical" && x) {
                if (o.stepping.x) x = Math.round(x / o.stepping.x) * o.stepping.x;
                x = this.translateValue(x, 1);
                x = this.translateLimits(x, 1);
                x = this.translateRange(x, 1);
                this.currentHandle.css({ left: x });
            }

            if (o.axis != "horizontal" && y) {
                if (o.stepping.y) y = Math.round(y / o.stepping.y) * o.stepping.y;
                y = this.translateValue(y, 2);
                y = this.translateLimits(y, 2);
                y = this.translateRange(y, 2);
                this.currentHandle.css({ top: y });
            }

            if (this.rangeElement)
                this.updateRange();

            if (!noPropagation) {
                this.propagate('start', null);
                this.propagate('stop', null);
                this.propagate('change', null);
                this.propagate("slide", null);
            }
        }
    });

    $.ui.slider.defaults = {
        handle: ".ui-slider-handle"
    };

})(jQuery);




// FONT SIZER VERSION 1.0
// Developed by fluidByte (http://www.fluidbyte.net)

function fontResizer(smallFont, medFont, largeFont) {
    function clearSelected() { $(".smallFont").removeClass("curFontS"); $(".medFont").removeClass("curFontM"); $(".largeFont").removeClass("curFontL"); }
    function saveState(curSize) { var date = new Date(); date.setTime(date.getTime() + (7 * 24 * 60 * 60 * 1000)); var expires = "; expires=" + date.toGMTString(); document.cookie = "fontSizer" + "=" + curSize + expires + "; path=/"; }

    $(".smallFont").click(function() { $('html #content').css('font-size', smallFont); clearSelected(); $(".smallFont").addClass("curFontS"); saveState(smallFont); });

    $(".medFont").click(function() { $('html #content').css('font-size', medFont); clearSelected(); $(".medFont").addClass("curFontM"); saveState(medFont); });

    $(".largeFont").click(function() { $('html #content').css('font-size', largeFont); clearSelected(); $(".largeFont").addClass("curFontL"); saveState(largeFont); });

    function getCookie(c_name) { if (document.cookie.length > 0) { c_start = document.cookie.indexOf(c_name + "="); if (c_start != -1) { c_start = c_start + c_name.length + 1; c_end = document.cookie.indexOf(";", c_start); if (c_end == -1) c_end = document.cookie.length; return unescape(document.cookie.substring(c_start, c_end)); } } return ""; }

    var savedSize = getCookie('fontSizer');

    if (savedSize != "") { $('html #content').css('font-size', savedSize); switch (savedSize) { case smallFont: $(".smallFont").addClass("curFontS"); break; case medFont: $(".medFont").addClass("curFontM"); break; case largeFont: $(".largeFont").addClass("curFontL"); break; default: $(".medFont").addClass("curFontM"); } }
    else { $('html #content').css('font-size', medFont); $(".medFont").addClass("curFontM"); }
}


/**
* jQuery.ScrollTo - Easy element scrolling using jQuery.
* Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
* Dual licensed under MIT and GPL.
* Date: 9/11/2008
* @author Ariel Flesler
* @version 1.4
*
* http://flesler.blogspot.com/2007/10/jqueryscrollto.html
*/
 (function(h) { var m = h.scrollTo = function(b, c, g) { h(window).scrollTo(b, c, g) }; m.defaults = { axis: 'y', duration: 1 }; m.window = function(b) { return h(window).scrollable() }; h.fn.scrollable = function() { return this.map(function() { var b = this.parentWindow || this.defaultView, c = this.nodeName == '#document' ? b.frameElement || b : this, g = c.contentDocument || (c.contentWindow || c).document, i = c.setInterval; return c.nodeName == 'IFRAME' || i && h.browser.safari ? g.body : i ? g.documentElement : this }) }; h.fn.scrollTo = function(r, j, a) { if (typeof j == 'object') { a = j; j = 0 } if (typeof a == 'function') a = { onAfter: a }; a = h.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 = h(k), d = r, l, e = {}, p = o.is('html,body'); switch (typeof d) { case 'number': case 'string': if (/^([+-]=)?\d+(px)?$/.test(d)) { d = n(d); break } d = h(d, this); case 'object': if (d.is || d.style) l = (d = h(d)).offset() } h.each(a.axis.split(''), function(b, c) { var g = c == 'x' ? 'Left' : 'Top', i = g.toLowerCase(), f = 'scroll' + g, s = k[f], t = c == 'x' ? 'Width' : 'Height', v = t.toLowerCase(); if (l) { e[f] = l[i] + (p ? 0 : s - o.offset()[i]); if (a.margin) { e[f] -= parseInt(d.css('margin' + g)) || 0; e[f] -= parseInt(d.css('border' + g + 'Width')) || 0 } e[f] += a.offset[i] || 0; if (a.over[i]) e[f] += d[v]() * a.over[i] } else e[f] = d[i]; if (/^\d+$/.test(e[f])) e[f] = e[f] <= 0 ? 0 : Math.min(e[f], u(t)); if (!b && a.queue) { if (s != e[f]) q(a.onAfterFirst); delete e[f] } }); q(a.onAfter); function q(b) { o.animate(e, j, a.easing, b && function() { b.call(this, r, a) }) }; function u(b) { var c = 'scroll' + b, g = k.ownerDocument; return p ? Math.max(g.documentElement[c], g.body[c]) : k[c] } }).end() }; function n(b) { return typeof b == 'object' ? b : { top: b, left: b} } })(jQuery);



$(function() { $('#container-1 > ul').tabs({ fx: { opacity: 'toggle'} }); });
$(document).ready(function() {
    DD_roundies.addRule('.roundLink', 8, true);
    DD_roundies.addRule('#newsletter', 8, true);
    DD_roundies.addRule('#search', 8, true);
    DD_roundies.addRule('#reviewsNav', 3, true);
    DD_roundies.addRule('#sortNav', 3, true);
    DD_roundies.addRule('#backWrapper', 3, true);

    $('.inputClear').click(function() { this.value = "" });
    fontResizer('11px', '12px', '13px');
    $("#calloutRow a").hover(
        function(over) { $(this).animate({ opacity: .8 }, "fast"); },
        function(out) { $(this).animate({ opacity: 1 }, "fast"); }
    );
});



/*	SWFObject v2.2 <http://code.google.com/p/swfobject/> 
is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
var swfobject = function() { var D = "undefined", r = "object", S = "Shockwave Flash", W = "ShockwaveFlash.ShockwaveFlash", q = "application/x-shockwave-flash", R = "SWFObjectExprInst", x = "onreadystatechange", O = window, j = document, t = navigator, T = false, U = [h], o = [], N = [], I = [], l, Q, E, B, J = false, a = false, n, G, m = true, M = function() { var aa = typeof j.getElementById != D && typeof j.getElementsByTagName != D && typeof j.createElement != D, ah = t.userAgent.toLowerCase(), Y = t.platform.toLowerCase(), ae = Y ? /win/.test(Y) : /win/.test(ah), ac = Y ? /mac/.test(Y) : /mac/.test(ah), af = /webkit/.test(ah) ? parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, X = ! +"\v1", ag = [0, 0, 0], ab = null; if (typeof t.plugins != D && typeof t.plugins[S] == r) { ab = t.plugins[S].description; if (ab && !(typeof t.mimeTypes != D && t.mimeTypes[q] && !t.mimeTypes[q].enabledPlugin)) { T = true; X = false; ab = ab.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); ag[0] = parseInt(ab.replace(/^(.*)\..*$/, "$1"), 10); ag[1] = parseInt(ab.replace(/^.*\.(.*)\s.*$/, "$1"), 10); ag[2] = /[a-zA-Z]/.test(ab) ? parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0 } } else { if (typeof O.ActiveXObject != D) { try { var ad = new ActiveXObject(W); if (ad) { ab = ad.GetVariable("$version"); if (ab) { X = true; ab = ab.split(" ")[1].split(","); ag = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)] } } } catch (Z) { } } } return { w3: aa, pv: ag, wk: af, ie: X, win: ae, mac: ac} } (), k = function() { if (!M.w3) { return } if ((typeof j.readyState != D && j.readyState == "complete") || (typeof j.readyState == D && (j.getElementsByTagName("body")[0] || j.body))) { f() } if (!J) { if (typeof j.addEventListener != D) { j.addEventListener("DOMContentLoaded", f, false) } if (M.ie && M.win) { j.attachEvent(x, function() { if (j.readyState == "complete") { j.detachEvent(x, arguments.callee); f() } }); if (O == top) { (function() { if (J) { return } try { j.documentElement.doScroll("left") } catch (X) { setTimeout(arguments.callee, 0); return } f() })() } } if (M.wk) { (function() { if (J) { return } if (!/loaded|complete/.test(j.readyState)) { setTimeout(arguments.callee, 0); return } f() })() } s(f) } } (); function f() { if (J) { return } try { var Z = j.getElementsByTagName("body")[0].appendChild(C("span")); Z.parentNode.removeChild(Z) } catch (aa) { return } J = true; var X = U.length; for (var Y = 0; Y < X; Y++) { U[Y]() } } function K(X) { if (J) { X() } else { U[U.length] = X } } function s(Y) { if (typeof O.addEventListener != D) { O.addEventListener("load", Y, false) } else { if (typeof j.addEventListener != D) { j.addEventListener("load", Y, false) } else { if (typeof O.attachEvent != D) { i(O, "onload", Y) } else { if (typeof O.onload == "function") { var X = O.onload; O.onload = function() { X(); Y() } } else { O.onload = Y } } } } } function h() { if (T) { V() } else { H() } } function V() { var X = j.getElementsByTagName("body")[0]; var aa = C(r); aa.setAttribute("type", q); var Z = X.appendChild(aa); if (Z) { var Y = 0; (function() { if (typeof Z.GetVariable != D) { var ab = Z.GetVariable("$version"); if (ab) { ab = ab.split(" ")[1].split(","); M.pv = [parseInt(ab[0], 10), parseInt(ab[1], 10), parseInt(ab[2], 10)] } } else { if (Y < 10) { Y++; setTimeout(arguments.callee, 10); return } } X.removeChild(aa); Z = null; H() })() } else { H() } } function H() { var ag = o.length; if (ag > 0) { for (var af = 0; af < ag; af++) { var Y = o[af].id; var ab = o[af].callbackFn; var aa = { success: false, id: Y }; if (M.pv[0] > 0) { var ae = c(Y); if (ae) { if (F(o[af].swfVersion) && !(M.wk && M.wk < 312)) { w(Y, true); if (ab) { aa.success = true; aa.ref = z(Y); ab(aa) } } else { if (o[af].expressInstall && A()) { var ai = {}; ai.data = o[af].expressInstall; ai.width = ae.getAttribute("width") || "0"; ai.height = ae.getAttribute("height") || "0"; if (ae.getAttribute("class")) { ai.styleclass = ae.getAttribute("class") } if (ae.getAttribute("align")) { ai.align = ae.getAttribute("align") } var ah = {}; var X = ae.getElementsByTagName("param"); var ac = X.length; for (var ad = 0; ad < ac; ad++) { if (X[ad].getAttribute("name").toLowerCase() != "movie") { ah[X[ad].getAttribute("name")] = X[ad].getAttribute("value") } } P(ai, ah, Y, ab) } else { p(ae); if (ab) { ab(aa) } } } } } else { w(Y, true); if (ab) { var Z = z(Y); if (Z && typeof Z.SetVariable != D) { aa.success = true; aa.ref = Z } ab(aa) } } } } } function z(aa) { var X = null; var Y = c(aa); if (Y && Y.nodeName == "OBJECT") { if (typeof Y.SetVariable != D) { X = Y } else { var Z = Y.getElementsByTagName(r)[0]; if (Z) { X = Z } } } return X } function A() { return !a && F("6.0.65") && (M.win || M.mac) && !(M.wk && M.wk < 312) } function P(aa, ab, X, Z) { a = true; E = Z || null; B = { success: false, id: X }; var ae = c(X); if (ae) { if (ae.nodeName == "OBJECT") { l = g(ae); Q = null } else { l = ae; Q = X } aa.id = R; if (typeof aa.width == D || (!/%$/.test(aa.width) && parseInt(aa.width, 10) < 310)) { aa.width = "310" } if (typeof aa.height == D || (!/%$/.test(aa.height) && parseInt(aa.height, 10) < 137)) { aa.height = "137" } j.title = j.title.slice(0, 47) + " - Flash Player Installation"; var ad = M.ie && M.win ? "ActiveX" : "PlugIn", ac = "MMredirectURL=" + O.location.toString().replace(/&/g, "%26") + "&MMplayerType=" + ad + "&MMdoctitle=" + j.title; if (typeof ab.flashvars != D) { ab.flashvars += "&" + ac } else { ab.flashvars = ac } if (M.ie && M.win && ae.readyState != 4) { var Y = C("div"); X += "SWFObjectNew"; Y.setAttribute("id", X); ae.parentNode.insertBefore(Y, ae); ae.style.display = "none"; (function() { if (ae.readyState == 4) { ae.parentNode.removeChild(ae) } else { setTimeout(arguments.callee, 10) } })() } u(aa, ab, X) } } function p(Y) { if (M.ie && M.win && Y.readyState != 4) { var X = C("div"); Y.parentNode.insertBefore(X, Y); X.parentNode.replaceChild(g(Y), X); Y.style.display = "none"; (function() { if (Y.readyState == 4) { Y.parentNode.removeChild(Y) } else { setTimeout(arguments.callee, 10) } })() } else { Y.parentNode.replaceChild(g(Y), Y) } } function g(ab) { var aa = C("div"); if (M.win && M.ie) { aa.innerHTML = ab.innerHTML } else { var Y = ab.getElementsByTagName(r)[0]; if (Y) { var ad = Y.childNodes; if (ad) { var X = ad.length; for (var Z = 0; Z < X; Z++) { if (!(ad[Z].nodeType == 1 && ad[Z].nodeName == "PARAM") && !(ad[Z].nodeType == 8)) { aa.appendChild(ad[Z].cloneNode(true)) } } } } } return aa } function u(ai, ag, Y) { var X, aa = c(Y); if (M.wk && M.wk < 312) { return X } if (aa) { if (typeof ai.id == D) { ai.id = Y } if (M.ie && M.win) { var ah = ""; for (var ae in ai) { if (ai[ae] != Object.prototype[ae]) { if (ae.toLowerCase() == "data") { ag.movie = ai[ae] } else { if (ae.toLowerCase() == "styleclass") { ah += ' class="' + ai[ae] + '"' } else { if (ae.toLowerCase() != "classid") { ah += " " + ae + '="' + ai[ae] + '"' } } } } } var af = ""; for (var ad in ag) { if (ag[ad] != Object.prototype[ad]) { af += '<param name="' + ad + '" value="' + ag[ad] + '" />' } } aa.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + ah + ">" + af + "</object>"; N[N.length] = ai.id; X = c(ai.id) } else { var Z = C(r); Z.setAttribute("type", q); for (var ac in ai) { if (ai[ac] != Object.prototype[ac]) { if (ac.toLowerCase() == "styleclass") { Z.setAttribute("class", ai[ac]) } else { if (ac.toLowerCase() != "classid") { Z.setAttribute(ac, ai[ac]) } } } } for (var ab in ag) { if (ag[ab] != Object.prototype[ab] && ab.toLowerCase() != "movie") { e(Z, ab, ag[ab]) } } aa.parentNode.replaceChild(Z, aa); X = Z } } return X } function e(Z, X, Y) { var aa = C("param"); aa.setAttribute("name", X); aa.setAttribute("value", Y); Z.appendChild(aa) } function y(Y) { var X = c(Y); if (X && X.nodeName == "OBJECT") { if (M.ie && M.win) { X.style.display = "none"; (function() { if (X.readyState == 4) { b(Y) } else { setTimeout(arguments.callee, 10) } })() } else { X.parentNode.removeChild(X) } } } function b(Z) { var Y = c(Z); if (Y) { for (var X in Y) { if (typeof Y[X] == "function") { Y[X] = null } } Y.parentNode.removeChild(Y) } } function c(Z) { var X = null; try { X = j.getElementById(Z) } catch (Y) { } return X } function C(X) { return j.createElement(X) } function i(Z, X, Y) { Z.attachEvent(X, Y); I[I.length] = [Z, X, Y] } function F(Z) { var Y = M.pv, X = Z.split("."); X[0] = parseInt(X[0], 10); X[1] = parseInt(X[1], 10) || 0; X[2] = parseInt(X[2], 10) || 0; return (Y[0] > X[0] || (Y[0] == X[0] && Y[1] > X[1]) || (Y[0] == X[0] && Y[1] == X[1] && Y[2] >= X[2])) ? true : false } function v(ac, Y, ad, ab) { if (M.ie && M.mac) { return } var aa = j.getElementsByTagName("head")[0]; if (!aa) { return } var X = (ad && typeof ad == "string") ? ad : "screen"; if (ab) { n = null; G = null } if (!n || G != X) { var Z = C("style"); Z.setAttribute("type", "text/css"); Z.setAttribute("media", X); n = aa.appendChild(Z); if (M.ie && M.win && typeof j.styleSheets != D && j.styleSheets.length > 0) { n = j.styleSheets[j.styleSheets.length - 1] } G = X } if (M.ie && M.win) { if (n && typeof n.addRule == r) { n.addRule(ac, Y) } } else { if (n && typeof j.createTextNode != D) { n.appendChild(j.createTextNode(ac + " {" + Y + "}")) } } } function w(Z, X) { if (!m) { return } var Y = X ? "visible" : "hidden"; if (J && c(Z)) { c(Z).style.visibility = Y } else { v("#" + Z, "visibility:" + Y) } } function L(Y) { var Z = /[\\\"<>\.;]/; var X = Z.exec(Y) != null; return X && typeof encodeURIComponent != D ? encodeURIComponent(Y) : Y } var d = function() { if (M.ie && M.win) { window.attachEvent("onunload", function() { var ac = I.length; for (var ab = 0; ab < ac; ab++) { I[ab][0].detachEvent(I[ab][1], I[ab][2]) } var Z = N.length; for (var aa = 0; aa < Z; aa++) { y(N[aa]) } for (var Y in M) { M[Y] = null } M = null; for (var X in swfobject) { swfobject[X] = null } swfobject = null }) } } (); return { registerObject: function(ab, X, aa, Z) { if (M.w3 && ab && X) { var Y = {}; Y.id = ab; Y.swfVersion = X; Y.expressInstall = aa; Y.callbackFn = Z; o[o.length] = Y; w(ab, false) } else { if (Z) { Z({ success: false, id: ab }) } } }, getObjectById: function(X) { if (M.w3) { return z(X) } }, embedSWF: function(ab, ah, ae, ag, Y, aa, Z, ad, af, ac) { var X = { success: false, id: ah }; if (M.w3 && !(M.wk && M.wk < 312) && ab && ah && ae && ag && Y) { w(ah, false); K(function() { ae += ""; ag += ""; var aj = {}; if (af && typeof af === r) { for (var al in af) { aj[al] = af[al] } } aj.data = ab; aj.width = ae; aj.height = ag; var am = {}; if (ad && typeof ad === r) { for (var ak in ad) { am[ak] = ad[ak] } } if (Z && typeof Z === r) { for (var ai in Z) { if (typeof am.flashvars != D) { am.flashvars += "&" + ai + "=" + Z[ai] } else { am.flashvars = ai + "=" + Z[ai] } } } if (F(Y)) { var an = u(aj, am, ah); if (aj.id == ah) { w(ah, true) } X.success = true; X.ref = an } else { if (aa && A()) { aj.data = aa; P(aj, am, ah, ac); return } else { w(ah, true) } } if (ac) { ac(X) } }) } else { if (ac) { ac(X) } } }, switchOffAutoHideShow: function() { m = false }, ua: M, getFlashPlayerVersion: function() { return { major: M.pv[0], minor: M.pv[1], release: M.pv[2]} }, hasFlashPlayerVersion: F, createSWF: function(Z, Y, X) { if (M.w3) { return u(Z, Y, X) } else { return undefined } }, showExpressInstall: function(Z, aa, X, Y) { if (M.w3 && A()) { P(Z, aa, X, Y) } }, removeSWF: function(X) { if (M.w3) { y(X) } }, createCSS: function(aa, Z, Y, X) { if (M.w3) { v(aa, Z, Y, X) } }, addDomLoadEvent: K, addLoadEvent: s, getQueryParamValue: function(aa) { var Z = j.location.search || j.location.hash; if (Z) { if (/\?/.test(Z)) { Z = Z.split("?")[1] } if (aa == null) { return L(Z) } var Y = Z.split("&"); for (var X = 0; X < Y.length; X++) { if (Y[X].substring(0, Y[X].indexOf("=")) == aa) { return L(Y[X].substring((Y[X].indexOf("=") + 1))) } } } return "" }, expressInstallCallback: function() { if (a) { var X = c(R); if (X && l) { X.parentNode.replaceChild(l, X); if (Q) { w(Q, true); if (M.ie && M.win) { l.style.display = "block" } } if (E) { E(B) } } a = false } } } } ();




if (!Array.prototype.push) { Array.prototype.push = function() { for (var i = 0; i < arguments.length; i++) this[this.length] = arguments[i]; }; }; function name_values($a) { var $b = new Array(); var rc = "\235"; var $a = $a.replace(/\\\;/g, rc); var $z = new RegExp("[a-zA-Z0-9]+\=[\<\>\/:#a-zA-Z0-9\-\+\., \235]+", "gi"); var y = $a.match($z); for (i = 0; i < y.length; i++) { var s = y[i].split("="); s[1] = s[1].replace(rc, ";"); $b[i] = "v_" + s[0]; eval($b[i] + " = '" + s[1] + "'"); }; return $b; }; function chkVar($d) { if (typeof (eval($d)) == "number") return true; if (eval($d) && eval($d) != "") return true; else return false; }; function chkArg($e) { if ($e == "undefined" || $e == null || $e == "") return false; else return true; }; function arrayElt($f, $g) { var j = 0; for (j = 0; j < $f.length; j++) { if ($f[j].toUpperCase() == $g.toUpperCase()) return j; }; return "-1"; }; function pad2($e) { if (typeof $e == "number") return ($e.toString().length < 2) ? "0" + $e : $e; else if (typeof $e == "string") return ($e.length < 2) ? ("0" + $e) : ("" + $e); else return ($e.toString().length < 2) ? "0" + $e : $e; }; var $h = ""; var $i = ""; function onClickFn($j) { var re = /pday/; $h = $i; $h = $h.replace(re, "'" + $j + "'"); eval($h); }; function kdwn($k) { if (event.keyCode == 13) $k.onchange(); else return false; }; function Today() { var d = new Date(); return ((d.getMonth() + 1) + "/" + d.getDate() + "/" + d.getFullYear()); }; function dateAdd($l, $m, $n) { var d = new Date($l); var dv = d.valueOf(); var $o; if ($n == "+") $o = dv + ($m * (1000 * 60 * 60 * 24)); else $o = dv - ($m * (1000 * 60 * 60 * 24)); var nd = new Date($o); return ((nd.getMonth() + 1) + "/" + nd.getDate() + "/" + nd.getFullYear()); }; function IESplit(re, st) { var $p; var $q = new Array(); var $r; while ((x = re.exec(st)) != null) { $q.push(st.substring(0, st.indexOf(x[1]))); $q.push(x[1]); st = st.substr(st.indexOf(x[1]) + x[1].length); }; return $q; }; var v_CloseOnSelect, v_AppendOrReplace, v_AppendChar, v_ReturnData; var v_InlineX, v_InlineY, v_Title, v_CurrentDate, v_AllowWeekends; var v_Resizable, v_Width, v_Height, v_SelectAfter, v_NSHierarchy; var v_SelectBefore, v_CallFunction, v_PopupX, v_PopupY, v_Holidays; var v_Nav, v_SmartNav, v_Fix, v_ShowFix, v_WeekStart, v_Weekends; var $s, v_ShortNames, v_AllowHolidays; var $t = new Array(); var $u = new Date(); var $v; var $w; var $x; var $y, $z; var cx, cy; var x, y; var $A, $B; var $Z, $D; $E = (navigator.appName.indexOf("Netscape") != -1) ? true : false; $F = (navigator.appName.indexOf("Microsoft") != -1) ? true : false; $G = (document.getElementById) ? true : false; Calendar.Months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; Calendar.SMonths = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; Calendar.DOW = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; Calendar.EMonths = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; Calendar.EDOW = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; Calendar.DOMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; Calendar.lDOMonth = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; Calendar.gInitText = "Softricks.com Calendar"; function Calendar($H, $I, $J, $K, $L) { if (($I == null) && ($J == null)) return; if ($I == null) { this.gMonthName = null; this.gMonth = null; this.gYearly = true; } else { this.gMonthName = Calendar.get_month($I); this.gMonth = new Number($I); this.gYearly = false; }; if ($L == null) this.gType = "POPUP"; else this.gType = $L; this.CODE = ""; if (this.gType == "INLINE") { this.WHO = ""; this.INLINE = "Calendar"; } else this.WHO = "window.opener."; this.gYear = $J; this.gFormat = $K; this.gReturnItem = $H; this.gTitle = "Softricks.com Calendar"; }; Calendar.get_month = Calendar_get_month; Calendar.get_daysofmonth = Calendar_get_daysofmonth; Calendar.get_dow = Calendar_get_dow; Calendar.calc_month_year = Calendar_calc_month_year; Calendar.print = Calendar_print; Calendar.CreateCalendarLayer = Calendar_CreateCalendarLayer; Calendar.Close = Calendar_Close; Calendar.Lwwrite = Calendar_Lwwrite; Calendar.MoveTo = Calendar_MoveTo; Calendar.isWeekend = Calendar_isWeekend; Calendar.isHoliday = Calendar_isHoliday; Calendar.processDateData = Calendar_processDateData; Calendar.readDate = Calendar_readDate; function Calendar_get_month($M, $N) { if (!$N || $N == "E") return Calendar.EMonths[$M]; else return Calendar.Months[$M]; }; function Calendar_get_dow($O) { return Calendar.DOW[$O]; }; function Calendar_get_daysofmonth($M, $J) { if (($J % 4) == 0) { if (($J % 100) == 0 && ($J % 400) != 0) return Calendar.DOMonth[$M]; return Calendar.lDOMonth[$M]; } else return Calendar.DOMonth[$M]; }; function Calendar_calc_month_year($P, $Q, $R) { var $S = new Array(); if ($R == -1) { if ($P == 0) { $S[0] = 11; $S[1] = parseInt($Q, 10) - 1; } else { $S[0] = parseInt($P, 10) - 1; $S[1] = parseInt($Q, 10); } } else if ($R == 1) { if ($P == 11) { $S[0] = 0; $S[1] = parseInt($Q, 10) + 1; } else { $S[0] = parseInt($P, 10) + 1; $S[1] = parseInt($Q, 10); } }; return $S; }; function Calendar_print() { $v.print(); }; function Calendar_isWeekend($j) { var i; for (i = 0; i < $t.length; i++) { if (parseInt($j) == parseInt($t[i])) return true; }; return false; }; function Calendar_isHoliday($j) { var i = arrayElt($s, $j); if (parseInt(i) > -1) return true; return false; }; function Calendar_processDateData($T, $U) { var m; var td = Today(); var $V = new RegExp("(Today)(([\\+\\-])([0-9]+))?", "i"); if ((m = $T.match($V)) != null) { if (m[1].toUpperCase() == "TODAY" && m[0].length > 5) return dateAdd(td, m[4], m[3]); else if (m[1].toUpperCase() == "TODAY") return td; } else { return Calendar.readDate($T, $U); } }; function Calendar_readDate($l, $W) { var re = ""; var $X = new Array(); $X.push("Dummy"); var $Y = ""; var $Z = ""; var $00 = ""; for (i = 0; i < 12; i++) { $00 += Calendar.Months[i] + ((i < 11) ? "|" : ""); $Z += Calendar.SMonths[i] + ((i < 11) ? "|" : ""); }; for (i = 0; i < 7; i++) $Y += Calendar.DOW[i] + ((i < 7) ? "|" : ""); var $01 = IESplit(new RegExp("(DD|MM|MONTH|MON|YYYY|YY|DOW)"), $W.toUpperCase()); for (i = 0; i < $01.length; i++) { switch ($01[i].toUpperCase()) { case "DD": re += "(\\d{1,2})"; $X.push($01[i]); break; case "DOW": re += "(" + $Y + ")"; $X.push($01[i]); break; case "MM": re += "(\\d{1,2})"; $X.push($01[i]); break; case "MON": re += "(" + $Z + ")"; $X.push($01[i]); break; case "MONTH": re += "(" + $00 + ")"; $X.push($01[i]); break; case "YY": re += "(\\d{1,2})"; $X.push($01[i]); break; case "YYYY": re += "(\\d{4})"; $X.push($01[i]); break; default: re += $01[i]; } }; var $02, $03, $04; var $05 = new RegExp(re, "i"); if ($05.test($l)) { var ma = $l.match($05); for (i = 0; i < ma.length; i++) { switch ($X[i]) { case "DD": $02 = parseInt(ma[i], 10); break; case "MM": $03 = parseInt(ma[i], 10); break; case "MON": $03 = parseInt(arrayElt(Calendar.SMonths, ma[i]), 10) + 1; break; case "MONTH": $03 = parseInt(arrayElt(Calendar.Months, ma[i]), 10) + 1; break; case "YY": $06 = parseInt(ma[i], 10); $04 = (($06 > 50) ? ($06 + 1900) : ($06 + 2000)); break; case "YYYY": $04 = parseInt(ma[i], 10); break; } } }; if (!($02 || $03 || $04)) return null; else return (new Date($03 + "/" + $02 + "/" + $04)); }; function Calendar_Close($07, $08) { if ($07 == "POPUP") $v.close(); if ($07 == "INLINE") Calendar.Lwwrite(Calendar.gInitText, $08); $v = null; }; new Calendar(); Calendar.prototype.getMonthlyCalendarCode = function() { var $09 = ""; var $0a = ""; var $0b = ""; $09 = $09 + "<TABLE WIDTH='" + (v_Width - 30) + "' BORDER=1>"; $0a = this.cal_header(); $0b = this.cal_data(); $09 = $09 + $0a + $0b; $09 = $09 + "</TABLE>"; return $09; }; Calendar.prototype.onclickfn = function() { var $0z = this.WHO + ((this.gType == "POPUP") ? "document." + v_NSHierarchy : "window.document." + v_NSHierarchy) + this.gReturnItem + ".value"; var $0d = (this.returnMode == "Replace") ? " = " : " += "; var $0e = "apchar = ''" + ((this.returnMode == "Replace") ? ";" : " + ") + "((" + $0z + " == '') ? '' : '" + this.appendChar + "');\n" + $0z + $0d + "apchar + pday;\n"; return $0e; }; Calendar.prototype.showSmartNavBar = function() { var $0f = "<table border=0 class='innerColor'><tr><td rowspan=2>"; $0f += "<select name='selMonth' class='monthEntryStyle' onchange=\"" + this.WHO + "Build(" + "'" + this.gReturnItem + "', document.frmCal.selMonth.selectedIndex, '" + this.gYear + "', '" + this.gFormat + "', '" + this.gType + "');\">\n"; for (i = 0; i < 12; i++) { $0f += "<option value=\"" + i + "\" "; if (parseInt(this.gMonth) == i) $0f += "selected"; $0f += " CLASS='monthEntryStyle'>" + Calendar.Months[i] + "</option>\n"; }; $0f += "<\/select>\n</td><td rowspan=2>"; $0f += "<input name=\"cy\" size=4 maxlength=4 value=\"" + this.gYear + "\" onchange=\"" + "javascript:" + this.WHO + "Build(" + "'" + this.gReturnItem + "', '" + this.gMonth + "', document.frmCal.cy.value, '" + this.gFormat + "', '" + this.gType + "');\" " + "onkeydown=\"javascript:kdwn(this);\" " + "class='yearEntryStyle'>\n"; $0f += "</td><td>" + "<A HREF=\"javascript:void(0);\" onClick=\"document.frmCal.cy.value++;document.frmCal.cy.onchange();return false;\" " + "class='yearArrowStyle'>^</A>" + "</td></tr><tr><td>" + "<A HREF=\"javascript:void(0);\" onClick=\"document.frmCal.cy.value--;document.frmCal.cy.onchange();return false;\" " + "class='yearArrowStyle'>v</A>" + "</td></tr></table>"; this.wwrite($0f); }; Calendar.prototype.show = function() { var $09 = ""; this.wwrite("<html>"); this.wwrite("<head><title>Calendar:" + this.gTitle + "</title>"); if (this.gType == "POPUP") { this.wwrite("<LINK REL=stylesheet TYPE=\"text/css\" HREF=\"/css/styles.css\">"); this.wwrite("<script language='javascript1.2'>" + "function onClickFn(pday) {\n" + this.onclickfn() + "}\n<\/script>"); } else $i = this.onclickfn(); if (v_SmartNav == "Yes" && this.gType == "POPUP") this.wwrite("<script language='javascript1.2'>\n" + "function kdwn(pthis) {" + "if (event.keyCode == 13) pthis.onchange(); else return false;};\n" + "</script>"); this.wwrite("</head>"); this.wwrite("<body onload=\"window.focus();\">"); this.wwrite("<form name=\"frmCal\" onsubmit=\"return false;\">"); this.wwrite("<TABLE WIDTH='" + (v_Width - 30) + "' BORDER=0 CELLPADDING=0 CELLSPACING=2 CLASS='borderColor'><TR><TD>" + "<TABLE BORDER=0 WIDTH='100%' CELLPADDING=1 CELLSPACING=0 CLASS='innerColor'>" + "<TR><TD CLASS='titleStyle'>" + this.gTitle + "</TD><TD CLASS='titleStyle' ALIGN=RIGHT>" + "<A HREF='javascript:" + this.WHO + "Calendar.Close(\"" + this.gType + "\", \"" + this.INLINE + "\");' " + "CLASS='titleStyle'>" + "x</A></TD></TR><TR>"); this.wwrite("<TD CLASS='headerStyle'>" + this.gMonthName + " " + this.gYear + "</TD>"); this.wwrite("<TD CLASS='headerStyle' ALIGN=RIGHT>" + ((v_ShowFix == "No") ? "" : ("Fix" + "<INPUT TYPE=CHECKBOX NAME=fixCheck " + ((v_Fix == "Yes") ? "CHECKED " : "") + "onClick=\"" + ((this.gType == "POPUP") ? "alert('Fixing Window')" : "fixCal(this.checked);") + "\">")) + "</TD></TR><TR><TD COLSPAN=2 CLASS='headerStyle'>"); if (v_SmartNav == "Yes") this.showSmartNavBar(); var $0g = Calendar.calc_month_year(this.gMonth, this.gYear, -1); var $0h = $0g[0]; var $0i = $0g[1]; var $0j = Calendar.calc_month_year(this.gMonth, this.gYear, 1); var $0k = $0j[0]; var $0l = $0j[1]; if (v_Nav == "Yes") { this.wwrite("<TABLE WIDTH='" + (v_Width - 30) + "' BORDER=1 CELLSPACING=0 CELLPADDING=0 CLASS='navStyle'><TR><TD ALIGN=center>"); this.wwrite("[<A HREF=\"" + "javascript:" + this.WHO + "Build(" + "'" + this.gReturnItem + "', '" + this.gMonth + "', '" + (parseInt(this.gYear, 10) - 1) + "', '" + this.gFormat + "', '" + this.gType + "'" + ");\"><<<\/A>]</TD><TD ALIGN=center>"); this.wwrite("[<A HREF=\"" + "javascript:" + this.WHO + "Build(" + "'" + this.gReturnItem + "', '" + $0h + "', '" + $0i + "', '" + this.gFormat + "', '" + this.gType + "'" + ");\"><<\/A>]</TD><TD ALIGN=center>"); this.wwrite("[<A HREF=\"javascript:window.print();\">" + ((v_ShortNames == "Yes") ? "P" : "Print") + "</A>]</TD><TD ALIGN=center>"); this.wwrite("[<A HREF=\"" + "javascript:" + this.WHO + "Build(" + "'" + this.gReturnItem + "', '" + $u.getMonth() + "', '" + $u.getFullYear() + "', '" + this.gFormat + "', '" + this.gType + "'" + ");\">" + ((v_ShortNames == "Yes") ? "*" : "Today") + "<\/A>]</TD><TD ALIGN=center>"); this.wwrite("[<A HREF=\"" + "javascript:" + this.WHO + "Build(" + "'" + this.gReturnItem + "', '" + $0k + "', '" + $0l + "', '" + this.gFormat + "', '" + this.gType + "'" + ");\">><\/A>]</TD><TD ALIGN=center>"); this.wwrite("[<A HREF=\"" + "javascript:" + this.WHO + "Build(" + "'" + this.gReturnItem + "', '" + this.gMonth + "', '" + (parseInt(this.gYear, 10) + 1) + "', '" + this.gFormat + "', '" + this.gType + "'" + ");\">>><\/A>]</TD></TR></TABLE>"); } $09 = this.getMonthlyCalendarCode(); this.wwrite($09); this.wwrite("</TD></TR></TABLE></TD></TR></TABLE>"); this.wwrite("</form>"); this.wwrite("</body></html>"); if (this.gType == "POPUP") { $v.document.open("text/html", "replace"); $v.document.writeln(this.CODE); $v.document.close(); } if (this.gType == "INLINE") Calendar.Lwwrite(this.CODE, this.INLINE); }; Calendar.prototype.cal_header = function() { var $09 = ""; var i = 0, j = 0; $09 = $09 + "<TR>"; for (i = v_WeekStart, j = 0; j < 7; i++, j++, i = i % 7) $09 = $09 + "<TD WIDTH='" + ((i == 6) ? 16 : 14) + "%' CLASS='weekdayHeaderStyle'>" + ((v_ShortNames == "Yes") ? Calendar.DOW[i].substring(0, 1) : Calendar.DOW[i].substring(0, 3)) + "</TD>"; $09 = $09 + "</TR>"; return $09; }; Calendar.prototype.cal_data = function() { var $0m = new Date(); $0m.setDate(1); $0m.setMonth(this.gMonth); $0m.setFullYear(this.gYear); var $0n = $0m.getDay(); var $0o = 1; var $0p = Calendar.get_daysofmonth(this.gMonth, this.gYear); var $0q = 0, j = 0; var $09 = ""; if (this.closeable) { $0r = ((this.gType == "POPUP") ? "window.close();" : ""); $0s = "Calendar.Close(\"" + this.gType + "\", \"" + this.INLINE + "\"); "; } else { $0r = ""; $0s = "void(0);' "; } var $0z = this.WHO + ((this.gType == "POPUP") ? "document." : "window.document.") + this.gReturnItem + ".value"; $09 = $09 + "<TR>"; for (j = v_WeekStart, i = 0; j != $0n; j++, i++, j = j % 7) { $09 = $09 + "<TD WIDTH='14%' " + this.applySpecialStyle(0, j, "9999") + ">&nbsp;</TD>"; } for (j = $0n; i < 7; j++, i++, j = j % 7) { $09 = this.createDates($09, $0m, $0o, j); $0o = $0o + 1; } $09 = $09 + "</TR>"; for (k = 2; k < 7; k++) { $09 = $09 + "<TR>"; for (j = v_WeekStart, i = 0; i < 7; j++, i++, j = j % 7) { $09 = this.createDates($09, $0m, $0o, j); $0o = $0o + 1; if ($0o > $0p) { $0q = 1; break; } } if (i == 6) $09 = $09 + "</TR>"; if ($0q == 1) break; } for (m = 1; m < (7 - i); m++) { j = (j + 1) % 7; if (this.gYearly) $09 = $09 + "<TD WIDTH='14%'" + this.applySpecialStyle(0, j, "9999", 1) + ">&nbsp;</TD>"; else $09 = $09 + "<TD WIDTH='14%' " + this.applySpecialStyle(0, j, "9999", 1) + ">" + m + "</TD>"; } return $09; }; Calendar.prototype.createDates = function($0t, $0u, $0v, pj) { var $0w = ""; var $0x = ""; var $0y = ""; $0u.setDate($0v); $0y = String(pad2(this.gMonth + 1)) + String(pad2($0v)); if ((this.gAllowWeekends == "No" && Calendar.isWeekend(pj)) || ($0u < v_SelectAfter || $0u > v_SelectBefore) || (this.gAllowHolidays == "No" && Calendar.isHoliday($0y))) { $0w = ""; $0x = ""; } else { $0w = "<A HREF='javascript:" + ((this.CallFunction != "") ? (this.WHO + this.CallFunction + "();") : "") + $0s + "' " + "onClick=\"onClickFn('" + ((this.returnData == "Date") ? this.format_data($0v) : this.format_dow($0v)) + "');" + ((this.CallFunction != "") ? (this.WHO + this.CallFunction + "();") : "") + $0r + "return true;" + "\" " + (Calendar.isHoliday($0y) ? "CLASS='holidayLinkStyle'" : "CLASS='linkStyle'") + ">"; $0x = "<\/A>"; } $0t = $0t + "<TD WIDTH='14%' " + this.applySpecialStyle($0v, pj, $0y) + ">" + $0w + $0v + $0x + "</TD>"; return $0t; }; Calendar.prototype.applySpecialStyle = function($0z, $0A, $0B, $0Z) { var $0D; if (this.gCurrentDate != "NONE") $0D = this.gCurrentDate; else $0D = $u; var $0E = $0D.getDate(); var $0F = $0D.getMonth(); var $0G = $0D.getFullYear(); if ($0B != "9999" && Calendar.isHoliday($0B)) return ("CLASS='holidayStyle'"); if (parseInt($0z) == $0E && parseInt(this.gMonth) == $0F && parseInt(this.gYear) == $0G) return "CLASS='todayStyle'"; if (Calendar.isWeekend($0A)) return ($0Z == 1 ? "CLASS='dimWeekendStyle'" : "CLASS='weekendStyle'"); if ($0Z == 1) return "CLASS='dimStyle'"; else return "CLASS='normalStyle'"; }; Calendar.prototype.format_data = function($0H) { var $0I = this.gFormat; var $0J = 1 + this.gMonth; $0J = ($0J.toString().length < 2) ? "0" + $0J : $0J; var $0K = Calendar.get_month(this.gMonth).substr(0, 3).toUpperCase(); var $0L = Calendar.get_month(this.gMonth).toUpperCase(); var $0M = new String(this.gYear); var $0N = new String(this.gYear.substr(2, 2)); var $0O = ($0H.toString().length < 2) ? "0" + $0H : $0H; var $0P = Calendar.get_dow(new Date($0J + "/" + $0O + "/" + $0M).getDay()); if ((new RegExp("YYYY", "ig")).test($0I)) $0I = $0I.replace(/YYYY/ig, $0M); else if ((new RegExp("YY", "ig")).test($0I)) $0I = $0I.replace(/YY/ig, $0N); if ((new RegExp("DD", "ig")).test($0I)) $0I = $0I.replace(/DD/ig, $0O); if ((new RegExp("MM", "ig")).test($0I)) $0I = $0I.replace(/MM/ig, $0J); if ((new RegExp("MONTH", "ig")).test($0I)) $0I = $0I.replace(/MONTH/ig, $0L); else if ((new RegExp("MON", "ig")).test($0I)) $0I = $0I.replace(/MON/ig, $0K); if ((new RegExp("DOW", "ig")).test($0I)) $0I = $0I.replace(/DOW/ig, $0P); return $0I; }; Calendar.prototype.format_dow = function($0H) { var $0I; var $0J = 1 + this.gMonth; $0J = ($0J.toString().length < 2) ? "0" + $0J : $0J; var $0K = Calendar.get_month(this.gMonth).substr(0, 3).toUpperCase(); var $0L = Calendar.get_month(this.gMonth).toUpperCase(); var $0M = new String(this.gYear); var $0O = ($0H.toString().length < 2) ? "0" + $0H : $0H; var $0m = new Date($0J + "\/" + $0O + "\/" + $0M); $0I = Calendar.get_dow($0m.getDay()); return $0I; }; Calendar.prototype.wwrite = function($0Q) { this.CODE += $0Q; }; function Calendar_CreateCalendarLayer($0R, $0S, pInitText) { if (pInitText == null) pInitText = Calendar.gInitText; else Calendar.gInitText = pInitText; v_InlineX = $0R; v_InlineY = $0S; var Calendar_ID = "Calendar"; if ($F) { document.writeln("<DIV ID=\"" + Calendar_ID + "\" STYLE=\"" + "position:absolute;zIndex:100;top:" + $0S + ";left:" + $0R + ";" + "\">" + pInitText + "<\/DIV>"); } else if ($G) { document.writeln("<DIV ID=\"" + Calendar_ID + "\" STYLE=\"" + "position:absolute;zIndex:100;top:" + $0S + ";left:" + $0R + ";" + "\">" + pInitText + "<\/DIV>"); } else if ($E) { document.writeln("<DIV ID=\"" + Calendar_ID + "\" STYLE=\"" + "position:absolute;zIndex:100;top:" + $0S + ";left:" + $0R + ";" + "\">" + pInitText + "<\/DIV>"); } } function Calendar_Lwwrite($0T, $08) { if ($F) { document.all[$08].innerHTML = $0T; } else if ($G) { $0U = document.createRange(); el = document.getElementById($08); $0U.setStartBefore(el); $0V = $0U.createContextualFragment($0T); while (el.hasChildNodes()) el.removeChild(el.lastChild); el.appendChild($0V); } else if ($E) { var $0W = document.layers[$08].document; $0W.open(); $0W.write($0T); $0W.close(); } } function Calendar_MoveTo(pX, pY, $08) { if ($F) { document.all[$08].style.top = pY; document.all[$08].style.left = pX; } else if ($G) { document.getElementById($08).style.top = pY; document.getElementById($08).style.left = pX; } else if ($E) { document.layers[$08].top = pY; document.layers[$08].left = pX; } } $Z = false; $D = false; function fixCal($0X) { if ($0X) initEvents(0); else initEvents(1); } function click(e) { x = ($F) ? (event.x + document.body.scrollLeft) : e.pageX; y = ($F) ? (event.y + document.body.scrollTop) : e.pageY; cx = ($F) ? (x - parseInt($0Y.left)) : (($G) ? (x - parseInt($0Y.left)) : (x - $w.x)); cy = ($F) ? (y - parseInt($0Y.top)) : (($G) ? (y - parseInt($0Y.top)) : (y - $w.y)); $D = false; $Z = true; } function unclick(e) { $D = true; $Z = false; } function handleMove(e) { $y = ($F) ? (event.x + document.body.scrollLeft) : e.pageX; $z = ($F) ? (event.y + document.body.scrollTop) : e.pageY; if ($Z) { v_InlineX = $y - cx; v_InlineY = $z - cy; MoveLayer($y - cx, $z - cy, "myLayer"); } } function initEvents($0Z) { if ($0Z == 1) { if ($E && !$G) $w.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP | Event.MOUSEMOVE); if ($G && $E) { $w.addEventListener("mousemove", handleMove, true); $w.addEventListener("mousedown", click, true); $w.addEventListener("mouseup", unclick, true); } else { $w.onmousemove = handleMove; $w.onmousedown = click; $w.onmouseup = unclick; } } else { if ($E && !$G) $w.releaseEvents(Event.MOUSEDOWN | Event.MOUSEUP | Event.MOUSEMOVE); if ($G && $E) { $w.removeEventListener("mousemove", handleMove, true); $w.removeEventListener("mousedown", click, true); $w.removeEventListener("mouseup", unclick, true); } else { $w.onmousemove = ""; $w.onmousedown = ""; $w.onmouseup = ""; } } } function MoveLayer(pX, pY) { $0Y.top = pY; $0Y.left = pX; } function drag_init($10) { if ($F) { $0Y = document.all[$10].style; $w = document.all[$10]; } else if ($G) { $0Y = document.getElementById($10).style; $w = document.getElementById($10); } else if ($E) { $0Y = document.layers[$10]; $w = document.layers[$10]; } if (v_ShowFix == "Yes" && v_Fix == "Yes") initEvents(0); else initEvents(1); } function CalResize() { v_Height = $v.innerHeight; v_Width = $v.innerWidth; } function Build($H, $I, $J, $K, $L, $11, $12) { if ($12 && $12 != "") { v_Resizable = undefined; v_SelectAfter = undefined; v_SelectBefore = undefined; v_NSHierarchy = undefined; v_CallFunction = undefined; v_Nav = undefined; v_ShowFix = undefined; v_SmartNav = undefined; v_Fix = undefined; v_WeekStart = undefined; v_Width = undefined; v_Height = undefined; v_ShortNames = undefined; v_Holidays = undefined; } if ($J == "" || ($J != "" && isNaN($J))) { window.status = "Invalid Year"; return true; } else window.status = ""; if ($11 && $11 != "") { v_CurrentDate = ""; var $13 = name_values($11); var $0z = "document." + $H + ".value"; var $14 = eval($0z); if ($14 != "") v_CurrentDate = $14; v_Weekends = chkVar("v_Weekends") ? v_Weekends : "06"; for (i = 0; i < v_Weekends.length; i++) $t.push(parseInt(v_Weekends.charAt(i))); } else v_CurrentDate = ""; var $15; if (chkVar("v_CurrentDate")) { if (v_CurrentDate.charAt(0) == '<' && v_CurrentDate.charAt(v_CurrentDate.length - 1) == '>') { var $16 = "document." + v_CurrentDate.substring(1, v_CurrentDate.length - 1) + ".value"; v_CurrentDate = eval($16); } if (Calendar.processDateData(v_CurrentDate, $K) == null) $15 = new Date(); else $15 = new Date(Calendar.processDateData(v_CurrentDate, $K)); $I = $15.getMonth(); $J = $15.getFullYear().toString(); } else $15 = "NONE"; v_Resizable = chkVar("v_Resizable") ? v_Resizable : "No"; v_SelectAfter = (typeof v_SelectAfter == "string") ? new Date(Calendar.processDateData(v_SelectAfter, $K)) : v_SelectAfter; v_SelectBefore = (typeof v_SelectBefore == "string") ? new Date(Calendar.processDateData(v_SelectBefore, $K)) : v_SelectBefore; v_NSHierarchy = $E ? (chkVar("v_NSHierarchy") ? (v_NSHierarchy + ".document.") : "") : ""; v_CallFunction = chkVar("v_CallFunction") ? v_CallFunction : ""; v_Nav = chkVar("v_Nav") ? v_Nav : "Yes"; v_SmartNav = chkVar("v_SmartNav") ? v_SmartNav : "No"; v_Fix = chkVar("v_Fix") ? v_Fix : "Yes"; v_ShowFix = chkVar("v_ShowFix") ? v_ShowFix : "No"; v_ShortNames = chkVar("v_ShortNames") ? v_ShortNames : "No"; v_WeekStart = chkVar("v_WeekStart") ? parseInt(v_WeekStart) : 1; $s = chkVar("v_Holidays") ? v_Holidays.split(",") : ""; var $17, $18; v_Width = chkVar("v_Width") ? v_Width : 260; v_Height = chkVar("v_Height") ? v_Height : 250; if ($L == "POPUP") { $18 = chkVar("v_Width") ? v_Width : 260; if ($F) $17 = chkVar("v_Height") ? v_Height : 250; else if ($E) $17 = chkVar("v_Height") ? v_Height : 250; if (v_SmartNav == "Yes") $17 += 30; v_PopupX = chkVar("v_PopupX") ? v_PopupX : -1; v_PopupY = chkVar("v_PopupY") ? v_PopupY : -1; if (v_PopupX >= 0 && v_PopupY >= 0) { if (!$v || $v.closed) $v = window.open("", "Calendar", "width=" + $18 + ",height=" + $17 + ",status=no,dependent=yes,resizable=" + v_Resizable + ",screenX=" + v_PopupX + ",screenY=" + v_PopupY + ",left=" + v_PopupX + ",top=" + v_PopupY); } else { if (!$v || $v.closed) $v = window.open("", "Calendar", "width=" + $18 + ",height=" + $17 + ",status=no,dependent=yes,resizable=" + v_Resizable); } $v.opener = self; if ($E && !$G) { $v.captureEvents(Event.RESIZE); } $v.onResize = CalResize; } $19 = new Calendar($H, $I, $J, $K, $L); $19.gCurrentDate = $15; $19.gAllowWeekends = (chkVar("v_AllowWeekends") && v_AllowWeekends == "Yes") ? "Yes" : "No"; $19.gAllowHolidays = (chkVar("v_AllowHolidays") && v_AllowHolidays == "No") ? "No" : "Yes"; $19.closeable = chkVar("v_CloseOnSelect") ? ((v_CloseOnSelect == "Yes") ? true : false) : true; $19.returnMode = chkVar("v_AppendOrReplace") ? v_AppendOrReplace : "Replace"; $19.returnData = chkVar("v_ReturnData") ? v_ReturnData : "Date"; $19.appendChar = ($19.returnMode == "Append") ? chkVar("v_AppendChar") ? v_AppendChar : ";" : ""; $19.CallFunction = chkVar("v_CallFunction") ? v_CallFunction : ""; $19.InlineX = chkVar("v_InlineX") ? v_InlineX : 100; $19.InlineY = chkVar("v_InlineY") ? v_InlineY : 100; if ($19.gType == "INLINE") { Calendar.MoveTo($19.InlineX, $19.InlineY, $19.INLINE); } $19.gTitle = v_Title ? v_Title : $19.gMonthName + "/" + $19.gYear; $19.fontface = "Arial"; if ($19.gYearly) $19.showY(); else $19.show(); if ($19.gType == "INLINE") { drag_init($19.INLINE); } } function show_calendar() { $H = arguments[0]; if (!chkArg(arguments[1])) $I = new String($u.getMonth()); else $I = (typeof (arguments[1]) == "number") ? arguments[1].toString() : ((arguments[1] == "") ? new String($u.getMonth()) : arguments[1]); if (!chkArg(arguments[2])) $J = new String($u.getFullYear().toString()); else $J = (typeof (arguments[2]) == "number") ? arguments[2].toString() : arguments[2]; if (!chkArg(arguments[3])) $K = "MM/DD/YYYY"; else $K = (typeof (arguments[3]) == "string") ? arguments[3] : "MM/DD/YYYY"; if (!chkArg(arguments[4])) $L = "POPUP"; else $L = (typeof (arguments[4]) == "string" && (arguments[4] == "POPUP" || arguments[4] == "INLINE")) ? arguments[4] : "POPUP"; if (!chkArg(arguments[5])) $11 = "CloseOnSelect=Yes;AppendOrReplace=Replace;AppendChar=';';ReturnData=Date;Title=Popup Date Picker;AllowWeekends=Yes;Resizable=No"; else $11 = ((typeof (arguments[5]) == "string") ? arguments[5] : "CloseOnSelect=Yes;AppendOrReplace=Replace;AppendChar=';';ReturnData=Date;Title=Popup Date Picker;AllowWeekends=Yes;Resizable=No"); Build($H, $I, $J, $K, $L, $11, 1); } Calendar.prototype.showY = function() { var $09 = ""; var i; var vr, vc, vx, vy; var $1a = 285; var $1b = 200; var $1z = 10; var $1d; if ($F) $1d = 75; else if ($G) $1d = 25; else if ($E) $1d = 25; this.wwrite("<html>"); this.wwrite("<head><title>Calendar</title>"); this.wwrite("<style type='text/css'>\n<!--"); for (i = 0; i < 12; i++) { vc = i % 3; if (i >= 0 && i <= 2) vr = 0; if (i >= 3 && i <= 5) vr = 1; if (i >= 6 && i <= 8) vr = 2; if (i >= 9 && i <= 11) vr = 3; vx = parseInt($1a * vc) + $1z; vy = parseInt($1b * vr) + $1d; this.wwrite(".lclass" + i + " {position:absolute;top:" + vy + ";left:" + vx + ";}"); } this.wwrite("-->\n</style>"); if (this.gType == "POPUP") this.wwrite("<script language='javascript'>" + "function onClickFn(pday) {\n" + this.onclickfn() + "}\n<\/script>"); else $i = this.onclickfn(); this.wwrite("</head>"); this.wwrite("<FONT FACE='" + this.fontface + "' SIZE=2><B>"); this.wwrite("Year : " + this.gYear); this.wwrite("</B><BR>"); var $0i = parseInt(this.gYear, 10) - 1; var $0l = parseInt(this.gYear, 10) + 1; this.wwrite("<TABLE WIDTH='" + (v_Width - 30) + "' BORDER=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR='#e0e0e0'><TR><TD ALIGN=center>"); this.wwrite("[<A HREF=\"" + "javascript:window.opener.Build(" + "'" + this.gReturnItem + "', null, '" + $0i + "', '" + this.gFormat + "'" + ");" + "\" alt='Prev Year'><<<\/A>]</TD><TD ALIGN=center>"); this.wwrite("[<A HREF=\"javascript:window.print();\">Print</A>]</TD><TD ALIGN=center>"); this.wwrite("[<A HREF=\"" + "javascript:window.opener.Build(" + "'" + this.gReturnItem + "', null, '" + $0l + "', '" + this.gFormat + "'" + ");" + "\">>><\/A>]</TD></TR></TABLE><BR>"); var j; for (i = 11; i >= 0; i--) { if ($F) this.wwrite("<DIV ID=\"layer" + i + "\" CLASS=\"lclass" + i + "\">"); else if ($G) this.wwrite("<DIV ID=\"layer" + i + "\" CLASS=\"lclass" + i + "\">"); else if ($E) this.wwrite("<LAYER ID=\"layer" + i + "\" CLASS=\"lclass" + i + "\">"); this.gMonth = i; this.gMonthName = Calendar.get_month(this.gMonth); $09 = this.getMonthlyCalendarCode(); this.wwrite(this.gMonthName + "/" + this.gYear + "<BR>"); this.wwrite($09); if ($F) this.wwrite("</DIV>"); else if ($G) this.wwrite("</DIV>"); else if ($E) this.wwrite("</LAYER>"); }; this.wwrite("</font><BR></body></html>"); $v.document.open(); $v.document.writeln(this.CODE); $v.document.close(); }; function show_yearly_calendar($H, $J, $K) { if ($J == null || $J == "") $J = new String($u.getFullYear().toString()); else $J = (typeof ($J) == "number") ? $J.toString() : $J; if ($K == null || $K == "") $K = "MM/DD/YYYY"; var $v = window.open("", "Calendar", "scrollbars=yes"); $v.opener = self; Build($H, null, $J, $K, "POPUP"); }



function create_window(url, w, h, scrollbars) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(url, '" + id + "', 'toolbar=0,scrollbars=" + scrollbars + ",location=0,statusbar=0,menubar=0,resizable=1,width='+w+',height='+h);"); }
function ndmaximize(awindow) { awindow.moveTo(0, 0); if (document.all) { awindow.resizeTo(screen.availWidth, screen.availHeight); } else if (document.layers || document.getElementById) { if (awindow.outerHeight < screen.availHeight || awindow.outerWidth < screen.availWidth) { awindow.outerHeight = screen.availHeight; awindow.outerWidth = screen.availWidth; } } }
function ndpopup(urlToOpen, w, h) { var features = "resizable=yes,scrollbars=yes,width=" + w + ",height=" + h + ",status=yes,toolbar=yes,menubar=yes,location=yes,fullscreen=no"; awindow = open(urlToOpen.toString(), "_blank", features, true); if (awindow.opener == null) awindow.opener = self; awindow.focus(); }





// ----------------------------------------------------------------------------
// Zoom Search Engine 5.0 (16/Jan/2007)
// Highlight & auto-scroll script
//
// email: zoom@wrensoft.com
// www: http://www.wrensoft.com
//
// Copyright (C) Wrensoft 2007
// ----------------------------------------------------------------------------
// Use this script to allow your search matches to highlight and scroll to
// the matched word on the actual web page where it was found.
//
// You will need to link to this JS file from each page of your site
// which requires the "highlight/jump to matched word" feature.
//
// For example, you could paste the following HTML in your site's header or 
// footer:
//
//   <style>.highlight { background: #FFFF40; }</style>
//   <script type="text/javascript" src="highlight.js"></script>
//
// Note: You will need to specify the correct path to "highlight.js" depending
// on where the file is located.
//
// You will then need to modify the BODY tag on your page to include an "onLoad" 
// attribute, such as:
//
//   <body onload="highlight();">
//
// If for some reason you can not modify the body tag of your page, an alternative
// would be to put the following line after the </body> tag of your page:
//
//   <script type="text/javascript">highlight();</script>
//
// For more information, consult the Users Guide and our support website at:
// http://www.wrensoft.com/zoom/support
//
// This script is licensed for use with the Zoom Search Engine. Original
// development by Brett Alcock, VBasys Limited. To licence other applications 
// email highlight@vbasys.com with the subject "license".


// If you wish to disable the jump functionality which scrolls the browser
// to the first occurance of the matched word, change this setting to false
var JumpToFirstOccurance = true;

// For debugging purposes, disable the following
var CatchJSErrors = true;

function catcherror() { return true; }
if (CatchJSErrors) {
    window.onerror = catcherror;
}

function QueryString(key) {
    var value = null;
    for (var i = 0; i < QueryString.keys.length; i++) {
        if (QueryString.keys[i] == key) {
            value = QueryString.values[i];
            break;
        }
    }
    return value;
}

function QueryString_Parse() {
    var query = window.location.search.substring(1);
    var pairs = query.split("&");

    for (var i = 0; i < pairs.length; i++) {
        var pos = pairs[i].indexOf('=');
        if (pos >= 0) {
            var argname = pairs[i].substring(0, pos);
            var value = pairs[i].substring(pos + 1);
            QueryString.keys[QueryString.keys.length] = argname;
            QueryString.values[QueryString.values.length] = value;
        }
    }
}

QueryString.keys = new Array();
QueryString.values = new Array();

QueryString_Parse();

function getElement(id) {
    if (document.getElementById)
        return (document.getElementById(id));
    else if (document.all)
        return (document.all[id]);
}

function findPosY(obj) {
    var curtop = 0;
    if (obj.offsetParent) {
        while (obj.offsetParent) {
            curtop += obj.offsetTop
            obj = obj.offsetParent;
        }
    }
    else if (obj.y)
        curtop += obj.y;
    return curtop;
}


// regular expression version
function SearchHiLite(text) {
    var SearchAsSubstring = 0;
    var hl;

    hl = QueryString("zoom_highlight");
    if (hl == "" || hl == null) {
        hl = QueryString("zoom_highlightsub");
        if (hl == "" || hl == null)
            return false;
        else
            SearchAsSubstring = 1;
    }
    if ((document.charset && document.charset == "utf-8") ||
    	(document.characterSet && document.characterSet == "UTF-8"))
        hl = decodeURIComponent(hl);
    else
        hl = unescape(hl);
    hl = hl.toLowerCase();

    // create array of terms        
    //var term = hl.split("+"); 
    var re = /\"(.*?)\"|[^\\+\"]+/g;
    var term = hl.match(re);

    // convert terms in regexp patterns
    for (var i = 0; i < term.length; i++) // take each term in turn
    {
        if (term[i] != "") {
            if (term[i].indexOf("\"") != -1) {
                // contains double quotes               
                term[i] = term[i].replace(/\"/g, "");
                term[i] = term[i].replace(/\+/g, " ");
            }
            else {
                term[i] = term[i].replace(/\+/g, "");
            }

            if (term[i].indexOf("*") != -1 || term[i].indexOf("?") != -1) {
                // convert wildcard pattern to regexp
                term[i] = term[i].replace(/\\/g, " ");
                term[i] = term[i].replace(/\^/g, " ");

                //term[i] = term[i].replace(/\+/g, " "); // split on this so no point in looking

                term[i] = term[i].replace(/\#/g, " ");
                term[i] = term[i].replace(/\$/g, " ");
                term[i] = term[i].replace(/\./g, " ");

                // check if search term only contains only wildcards
                // if so, we will not attempt to highlight this term
                var wildcards = /\w/;
                if (wildcards.test(term[i])) {
                    term[i] = term[i].replace(/\*/g, "[^\\s]*");
                    term[i] = term[i].replace(/\?/g, "[^\\s]"); // insist upon one non whitespace
                }
                else
                    term[i] = "";
            }

            if (term[i] != "") {
                if (SearchAsSubstring == 0) {
                    term[i] = "(>[\\s]*|>[^<]+[\\b\\W])(" + term[i] + ")(<|[\\b\\W][^>]*<)";
                }
                else {
                    // if term leads with wildcard then allow it to match preceeding text in word
                    var strWB = "";
                    if (term[i].substr(0, 7) == "[^\\s]*") strWB = "\\b";
                    term[i] = "(>|>[^<]+)" + strWB + "(" + term[i] + ")([^>]*<)";
                }
            }
        }
    }

    text = text.replace(/&amp;/ig, '&');
    text = text.replace(/&nbsp;/ig, '');

    for (var i = 0; i < term.length; i++) // take each term in turn
    {
        if (term[i] != "") {
            // we need a loop for the main search to catch all between ><
            // and we add  before each found to ignore those done etc
            // todo: develop reliable single pass regexp and dispose of loop
            var l = 0;
            re = new RegExp(term[i], "gi");
            var count = 0; // just incase
            text = ">" + text + "<"; // temporary tag marks
            do {
                l = text.length;
                text = text.replace(re, '$1<span class="highlight" id="highlight" name="highlight">$2</span id="highlight">$3');
                count++;
            }
            //while(re.lastIndex>0 && count<100); lastIndex not set properly under netscape
            while (l != text.length && count < 100);
            text = text.substring(1, text.length - 1); // remove temporary tags
        }
    }
    text = text.replace(eval("//g"), '');
    text = text.replace(eval("//g"), '&nbsp;');

    return (text);
}

function jumpHL() {
    var d = getElement("highlight");
    if (d) {
        var y = findPosY(d);
        // if element near top of page
        if (y < 100)
            window.scrollTo(0, 0); // go to top of page
        else
            window.scrollTo(0, y - 50); // show space of 50 above
    }
}

function highlight() {
    if (!"".match)	// check if browser supports regexp match() function
        return;
    var x = document.body;
    if (x) {
        var strHTML = SearchHiLite(x.innerHTML);
        if (strHTML != false) x.innerHTML = strHTML;
        if (JumpToFirstOccurance) jumpHL();
    }
}


