//############################################
//   Generic Scripts
//############################################
//get pagename
var sPath = window.location.pathname;
var pagename = sPath.substring(sPath.lastIndexOf('/') + 1);
//get subdomain
var a = document.URL.split("//"); // split at protocol
var protocol = a[0];
var b = (a[1] ? a[1] : a[0]).split("/");
var domain = b[0];
a = (a[1] ? a[1] : a[0]).split(".");
var subdomain = a[0];

//http://adamv.com/dev/javascript/querystring
function Querystring(qs) { // optionally pass a querystring to parse
	this.params = {};
	if (qs == null) qs = location.search.substring(1, location.search.length);
	if (qs.length == 0) return;

	// Turn <plus> back to <space>
	// See: http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4.1
	qs = qs.replace(/\+/g, ' ');
	var args = qs.split('&'); // parse out name/value pairs separated via &

	for (var i = 0; i < args.length; i++) {
		var pair = args[i].split('=');
		var name = decodeURIComponent(pair[0]);
		
		var value = (pair.length==2)
			? decodeURIComponent(pair[1])
			: name;
		
		this.params[name] = value;
	}
}
Querystring.prototype.get = function(key, default_) {
	var value = this.params[key];
	return (value != null) ? value : default_;
}
Querystring.prototype.contains = function(key) {
	var value = this.params[key];
	return (value != null);
}
  function breadcrumbs(sClass, sDelimiter)
  {
    if(!sDelimiter) sDelimiter = '|';
    var sURL = (location.pathname.indexOf('?') != -1) ? location.pathname.substring(0, location.pathname.indexOf('?')) : location.pathname;
        sURL = (location.pathname.charAt(0) == '/') ? location.pathname.substring(1) : location.pathname;
    var aURL = sURL.split('/');
    if(aURL)
    {
      var sOutput = '<a href="/">Home</a> ' + sDelimiter + ' ';
      var sPath = '/';
      for(var i = 0; i < aURL.length; i++)
      {
        sPath += aURL[i] + '/';
        sOutput += '<a href="' + sPath + '"';
        if(sClass) sOutput += ' class="' + sClass +'"';
        sOutput += '>' + aURL[i] + '</a>';
        sOutput += ' ' + sDelimiter + ' ';
      }
      sOutput += document.title;
      document.write(sOutput);
    }
  }
function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('maincontainer').offsetHeight;
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - (contentHeight + footerHeight) >= 0) {
				footerElement.style.position = 'relative';
				footerElement.style.top = windowHeight - (contentHeight + footerHeight - 34) + 'px';
			}
			else {
				footerElement.style.position = 'static';
			}
		}
	}
}
function toggle(obj) {
	var el = document.getElementById(obj);
	if ( el.style.display != 'none' ) {
		el.style.display = 'none';
	}
	else {
		el.style.display = '';
	}
}
function setInputColor(objElement){
    objElement.style.backgroundColor='#fdeaba';
    objElement.style.border='1px solid #4b63ae';
    
}
function setpwInputColor(objElement){
    objElement.style.backgroundColor='#fdeaba';
    objElement.style.border='1px solid #496f80';
}
function hideColor(objElement){
    objElement.style.backgroundColor='#ffffff';
    objElement.style.border='1px solid #496f80';        
}
function getMessageQueryString()
{
 var querystring = new Array;
 var q = String (document.location).split ('?m=')[1];
 if (!q) return false;
 return q;
}
/*
CSS Browser Selector v0.3.2
Rafael Lima (http://rafael.adm.br)
http://rafael.adm.br/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Contributors: http://rafael.adm.br/css_browser_selector#contributors
*/
function css_browser_selector(u){var ua = u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1;},g='gecko',w='webkit',s='safari',h=document.getElementsByTagName('html')[0],b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3')?g+' ff3':is('gecko/')?g:/opera(\s|\/)(\d+)/.test(ua)?'opera opera'+RegExp.$2:is('konqueror')?'konqueror':is('chrome')?w+' chrome':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);

//############################################
//   JQ Modal
//############################################
/*
 * jqModal - Minimalist Modaling with jQuery
 *   (http://dev.iceburg.net/jquery/jqModal/)
 *
 * Copyright (c) 2007,2008 Brice Burgess <bhb@iceburg.net>
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 * 
 * $Version: 03/01/2009 +r14
 */
(function($) {
$.fn.jqm=function(o){
var p={
overlay: 50,
overlayClass: 'jqmOverlay',
closeClass: 'jqmClose',
trigger: '.jqModal',
ajax: F,
ajaxText: '',
target: F,
modal: F,
toTop: F,
onShow: F,
onHide: F,
onLoad: F
};
return this.each(function(){if(this._jqm)return H[this._jqm].c=$.extend({},H[this._jqm].c,o);s++;this._jqm=s;
H[s]={c:$.extend(p,$.jqm.params,o),a:F,w:$(this).addClass('jqmID'+s),s:s};
if(p.trigger)$(this).jqmAddTrigger(p.trigger);
});};

$.fn.jqmAddClose=function(e){return hs(this,e,'jqmHide');};
$.fn.jqmAddTrigger=function(e){return hs(this,e,'jqmShow');};
$.fn.jqmShow=function(t){return this.each(function(){t=t||window.event;$.jqm.open(this._jqm,t);});};
$.fn.jqmHide=function(t){return this.each(function(){t=t||window.event;$.jqm.close(this._jqm,t)});};

$.jqm = {
hash:{},
open:function(s,t){var h=H[s],c=h.c,cc='.'+c.closeClass,z=(parseInt(h.w.css('z-index'))),z=(z>0)?z:3000,o=$('<div></div>').css({height:'100%',width:'100%',position:'fixed',left:0,top:0,'z-index':z-1,opacity:c.overlay/100});if(h.a)return F;h.t=t;h.a=true;h.w.css('z-index',z);
 if(c.modal) {if(!A[0])L('bind');A.push(s);}
 else if(c.overlay > 0)h.w.jqmAddClose(o);
 else o=F;

 h.o=(o)?o.addClass(c.overlayClass).prependTo('body'):F;
 if(ie6){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in {Top:1,Left:1})o.style.setExpression(y.toLowerCase(),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}}

 if(c.ajax) {var r=c.target||h.w,u=c.ajax,r=(typeof r == 'string')?$(r,h.w):$(r),u=(u.substr(0,1) == '@')?$(t).attr(u.substring(1)):u;
  r.html(c.ajaxText).load(u,function(){if(c.onLoad)c.onLoad.call(this,h);if(cc)h.w.jqmAddClose($(cc,h.w));e(h);});}
 else if(cc)h.w.jqmAddClose($(cc,h.w));

 if(c.toTop&&h.o)h.w.before('<span id="jqmP'+h.w[0]._jqm+'"></span>').insertAfter(h.o);	
 (c.onShow)?c.onShow(h):h.w.show();e(h);return F;
},
close:function(s){var h=H[s];if(!h.a)return F;h.a=F;
 if(A[0]){A.pop();if(!A[0])L('unbind');}
 if(h.c.toTop&&h.o)$('#jqmP'+h.w[0]._jqm).after(h.w).remove();
 if(h.c.onHide)h.c.onHide(h);else{h.w.hide();if(h.o)h.o.remove();} return F;
},
params:{}};
var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version == "6.0"),F=false,
i=$('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),
e=function(h){if(ie6)if(h.o)h.o.html('<p style="width:100%;height:100%"/>').prepend(i);else if(!$('iframe.jqm',h.w)[0])h.w.prepend(i); f(h);},
f=function(h){try{$(':input:visible',h.w)[0].focus();}catch(_){}},
L=function(t){$()[t]("keypress",m)[t]("keydown",m)[t]("mousedown",m);},
m=function(e){var h=H[A[A.length-1]],r=(!$(e.target).parents('.jqmID'+h.s)[0]);if(r)f(h);return !r;},
hs=function(w,t,c){return w.each(function(){var s=this._jqm;$(t).each(function() {
 if(!this[c]){this[c]=[];$(this).click(function(){for(var i in {jqmShow:1,jqmHide:1})for(var s in this[i])if(H[this[i][s]])H[this[i][s]].w[i](this);return F;});}this[c].push(s);});});};
})(jQuery);

//############################################
//   JQ Easing
//############################################
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}('h.i[\'E\']=h.i[\'y\'];h.F(h.i,{z:\'A\',y:9(x,t,b,c,d){6 h.i[h.i.z](x,t,b,c,d)},G:9(x,t,b,c,d){6 c*(t/=d)*t+b},A:9(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},H:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},I:9(x,t,b,c,d){6 c*(t/=d)*t*t+b},J:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},K:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},L:9(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},M:9(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},N:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},O:9(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},P:9(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},Q:9(x,t,b,c,d){e((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},R:9(x,t,b,c,d){6-c*8.B(t/d*(8.g/2))+c+b},S:9(x,t,b,c,d){6 c*8.n(t/d*(8.g/2))+b},T:9(x,t,b,c,d){6-c/2*(8.B(8.g*t/d)-1)+b},U:9(x,t,b,c,d){6(t==0)?b:c*8.j(2,10*(t/d-1))+b},V:9(x,t,b,c,d){6(t==d)?b+c:c*(-8.j(2,-10*t/d)+1)+b},W:9(x,t,b,c,d){e(t==0)6 b;e(t==d)6 b+c;e((t/=d/2)<1)6 c/2*8.j(2,10*(t-1))+b;6 c/2*(-8.j(2,-10*--t)+2)+b},X:9(x,t,b,c,d){6-c*(8.o(1-(t/=d)*t)-1)+b},Y:9(x,t,b,c,d){6 c*8.o(1-(t=t/d-1)*t)+b},Z:9(x,t,b,c,d){e((t/=d/2)<1)6-c/2*(8.o(1-t*t)-1)+b;6 c/2*(8.o(1-(t-=2)*t)+1)+b},11:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.r(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.u(c/a);6-(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b},12:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d)==1)6 b+c;e(!p)p=d*.3;e(a<8.r(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.u(c/a);6 a*8.j(2,-10*t)*8.n((t*d-s)*(2*8.g)/p)+c+b},13:9(x,t,b,c,d){f s=1.l;f p=0;f a=c;e(t==0)6 b;e((t/=d/2)==2)6 b+c;e(!p)p=d*(.3*1.5);e(a<8.r(c)){a=c;f s=p/4}m f s=p/(2*8.g)*8.u(c/a);e(t<1)6-.5*(a*8.j(2,10*(t-=1))*8.n((t*d-s)*(2*8.g)/p))+b;6 a*8.j(2,-10*(t-=1))*8.n((t*d-s)*(2*8.g)/p)*.5+c+b},14:9(x,t,b,c,d,s){e(s==v)s=1.l;6 c*(t/=d)*t*((s+1)*t-s)+b},15:9(x,t,b,c,d,s){e(s==v)s=1.l;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},16:9(x,t,b,c,d,s){e(s==v)s=1.l;e((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.C))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.C))+1)*t+s)+2)+b},D:9(x,t,b,c,d){6 c-h.i.w(x,d-t,0,c,d)+b},w:9(x,t,b,c,d){e((t/=d)<(1/2.k)){6 c*(7.q*t*t)+b}m e(t<(2/2.k)){6 c*(7.q*(t-=(1.5/2.k))*t+.k)+b}m e(t<(2.5/2.k)){6 c*(7.q*(t-=(2.17/2.k))*t+.18)+b}m{6 c*(7.q*(t-=(2.19/2.k))*t+.1a)+b}},1b:9(x,t,b,c,d){e(t<d/2)6 h.i.D(x,t*2,0,c,d)*.5+b;6 h.i.w(x,t*2-d,0,c,d)*.5+c*.5+b}});',62,74,'||||||return||Math|function|||||if|var|PI|jQuery|easing|pow|75|70158|else|sin|sqrt||5625|abs|||asin|undefined|easeOutBounce||swing|def|easeOutQuad|cos|525|easeInBounce|jswing|extend|easeInQuad|easeInOutQuad|easeInCubic|easeOutCubic|easeInOutCubic|easeInQuart|easeOutQuart|easeInOutQuart|easeInQuint|easeOutQuint|easeInOutQuint|easeInSine|easeOutSine|easeInOutSine|easeInExpo|easeOutExpo|easeInOutExpo|easeInCirc|easeOutCirc|easeInOutCirc||easeInElastic|easeOutElastic|easeInOutElastic|easeInBack|easeOutBack|easeInOutBack|25|9375|625|984375|easeInOutBounce'.split('|'),0,{}))

//############################################
//   JQ Core
//############################################
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}(';(3($){$.8={1z:{14:3(a,b,c){6 d=$.8[a].t;15(6 i 1A c){d.A[i]=d.A[i]||[];d.A[i].1B([b,c[i]])}},16:3(a,b,c){6 d=a.A[b];5(!d){4}15(6 i=0;i<d.1C;i++){5(a.k[d[i][0]]){d[i][1].B(a.l,c)}}}},u:{},p:3(a){5($.8.u[a]){4 $.8.u[a]}6 b=$(\'<1D 1E="8-1F">\').17(a).p({1G:\'1H\',H:\'-18\',1I:\'-18\',1J:\'1K\'}).1L(\'19\');$.8.u[a]=!!((!(/1M|1N/).q(b.p(\'1O\'))||(/^[1-9]/).q(b.p(\'1P\'))||(/^[1-9]/).q(b.p(\'1Q\'))||!(/1a/).q(b.p(\'1R\'))||!(/1S|1T\\(0, 0, 0, 0\\)/).q(b.p(\'1U\'))));1V{$(\'19\').1b(0).1W(b.1b(0))}1X(e){}4 $.8.u[a]},1Y:3(e){e.v="1c";e.1d=3(){4 7};5(e.C){e.C.1e="1a"}},1Z:3(e){e.v="20";e.1d=3(){4 n};5(e.C){e.C.1e=""}},21:3(e,a){6 b=/H/.q(a||"H")?\'22\':\'23\',I=7;5(e[b]>0)4 n;e[b]=1;I=e[b]>0?n:7;e[b]=0;4 I}};6 j=$.J.D;$.J.D=3(){$("*",2).14(2).24("D");4 j.B(2,1f)};3 K(a,b,c){6 d=$[a][b].K||[];d=(L d=="M"?d.N(/,?\\s+/):d);4($.25(c,d)!=-1)}$.w=3(g,h){6 i=g.N(".")[0];g=g.N(".")[1];$.J[g]=3(b){6 c=(L b==\'M\'),O=26.t.27.16(1f,1);5(c&&K(i,g,b)){6 d=$.P(2[0],g);4(d?d[b].B(d,O):28)}4 2.29(3(){6 a=$.P(2,g);5(c&&a&&$.2a(a[b])){a[b].B(a,O)}2b 5(!c){$.P(2,g,2c $[i][g](2,b))}})};$[i][g]=3(c,d){6 f=2;2.o=g;2.1g=i+\'-\'+g;2.k=$.1h({},$.w.E,$[i][g].E,d);2.l=$(c).r(\'x.\'+g,3(e,a,b){4 f.x(a,b)}).r(\'Q.\'+g,3(e,a){4 f.Q(a)}).r(\'D\',3(){4 f.1i()});2.1j()};$[i][g].t=$.1h({},$.w.t,h)};$.w.t={1j:3(){},1i:3(){2.l.2d(2.o)},Q:3(a){4 2.k[a]},x:3(a,b){2.k[a]=b;5(a==\'y\'){2.l[b?\'17\':\'2e\'](2.1g+\'-y\')}},2f:3(){2.x(\'y\',7)},2g:3(){2.x(\'y\',n)}};$.w.E={y:7};$.8.1k={2h:3(){6 a=2;2.l.r(\'2i.\'+2.o,3(e){4 a.1l(e)});5($.R.S){2.1m=2.l.T(\'v\');2.l.T(\'v\',\'1c\')}2.2j=7},2k:3(){2.l.U(\'.\'+2.o);($.R.S&&2.l.T(\'v\',2.1m))},1l:3(e){(2.m&&2.z(e));2.F=e;6 a=2,1n=(e.2l==1),1o=(L 2.k.V=="M"?$(e.2m).2n(2.k.V):7);5(!1n||1o||!2.1p(e)){4 n}2.G=!2.k.W;5(!2.G){2.2o=2p(3(){a.G=n},2.k.W)}5(2.X(e)&&2.Y(e)){2.m=(2.Z(e)!==7);5(!2.m){e.2q();4 n}}2.10=3(e){4 a.1q(e)};2.11=3(e){4 a.z(e)};$(1r).r(\'1s.\'+2.o,2.10).r(\'1t.\'+2.o,2.11);4 7},1q:3(e){5($.R.S&&!e.2r){4 2.z(e)}5(2.m){2.12(e);4 7}5(2.X(e)&&2.Y(e)){2.m=(2.Z(2.F,e)!==7);(2.m?2.12(e):2.z(e))}4!2.m},z:3(e){$(1r).U(\'1s.\'+2.o,2.10).U(\'1t.\'+2.o,2.11);5(2.m){2.m=7;2.1u(e)}4 7},X:3(e){4(13.2s(13.1v(2.F.1w-e.1w),13.1v(2.F.1x-e.1x))>=2.k.1y)},Y:3(e){4 2.G},Z:3(e){},12:3(e){},1u:3(e){},1p:3(e){4 n}};$.8.1k.E={V:2t,1y:1,W:0}})(2u);',62,155,'||this|function|return|if|var|false|ui||||||||||||options|element|_mouseStarted|true|widgetName|css|test|bind||prototype|cssCache|unselectable|widget|setData|disabled|mouseUp|plugins|apply|style|remove|defaults|_mouseDownEvent|_mouseDelayMet|top|has|fn|getter|typeof|string|split|args|data|getData|browser|msie|attr|unbind|cancel|delay|mouseDistanceMet|mouseDelayMet|mouseStart|_mouseMoveDelegate|_mouseUpDelegate|mouseDrag|Math|add|for|call|addClass|5000px|body|none|get|on|onselectstart|MozUserSelect|arguments|widgetBaseClass|extend|destroy|init|mouse|mouseDown|_mouseUnselectable|btnIsLeft|elIsCancel|mouseCapture|mouseMove|document|mousemove|mouseup|mouseStop|abs|pageX|pageY|distance|plugin|in|push|length|div|class|gen|position|absolute|left|display|block|appendTo|auto|default|cursor|height|width|backgroundImage|transparent|rgba|backgroundColor|try|removeChild|catch|disableSelection|enableSelection|off|hasScroll|scrollTop|scrollLeft|trigger|inArray|Array|slice|undefined|each|isFunction|else|new|removeData|removeClass|enable|disable|mouseInit|mousedown|started|mouseDestroy|which|target|is|_mouseDelayTimer|setTimeout|preventDefault|button|max|null|jQuery'.split('|'),0,{}))

//############################################
//   JQ Tabs
//############################################
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}('(4($){$.2a("8.3",{2b:4(){2.m.L+=\'.3\';2.13(14)},2c:4(a,b){5((/^7/).1O(a))2.15(b);C{2.m[a]=b;2.13()}},w:4(){p 2.$3.w},1w:4(a){p a.1P&&a.1P.V(/\\s/g,\'1Q\').V(/[^A-2d-2e-9\\-1Q:\\.]/g,\'\')||2.m.1R+$.q(a)},8:4(a,b){p{m:2.m,2f:a,1i:b}},13:4(e){2.$v=$(\'G:2g(a[D])\',2.x);2.$3=2.$v.1j(4(){p $(\'a\',2)[0]});2.$l=$([]);6 f=2,o=2.m;2.$3.R(4(i,a){5(a.J&&a.J.V(\'#\',\'\'))f.$l=f.$l.16(a.J);C 5($(a).W(\'D\')!=\'#\'){$.q(a,\'D.3\',a.D);$.q(a,\'E.3\',a.D);6 b=f.1w(a);a.D=\'#\'+b;6 c=$(\'#\'+b);5(!c.w){c=$(o.1x).W(\'17\',b).y(o.18).2h(f.$l[i-1]||f.x);c.q(\'19.3\',14)}f.$l=f.$l.16(c)}C o.u.1S(i+1)});5(e){2.x.y(o.1y);2.$l.R(4(){6 a=$(2);a.y(o.18)});5(o.7===1k){5(1z.J){2.$3.R(4(i,a){5(a.J==1z.J){o.7=i;5($.S.1a||$.S.2i){6 b=$(1z.J),1T=b.W(\'17\');b.W(\'17\',\'\');1A(4(){b.W(\'17\',1T)},2j)}2k(0,0);p F}})}C 5(o.X){6 g=2l($.X(\'8-3\'+$.q(f.x)),10);5(g&&f.$3[g])o.7=g}C 5(f.$v.M(\'.\'+o.z).w)o.7=f.$v.Y(f.$v.M(\'.\'+o.z)[0])}o.7=o.7===B||o.7!==1k?o.7:0;o.u=$.2m(o.u.2n($.1j(2.$v.M(\'.\'+o.T),4(n,i){p f.$v.Y(n)}))).1U();5($.1l(o.7,o.u)!=-1)o.u.2o($.1l(o.7,o.u),1);2.$l.y(o.N);2.$v.H(o.z);5(o.7!==B){2.$l.I(o.7).K().H(o.N);2.$v.I(o.7).y(o.z);6 h=4(){$(f.x).O(\'1V\',[B,f.8(f.$3[o.7],f.$l[o.7])],o.K)};5($.q(2.$3[o.7],\'E.3\'))2.E(o.7,h);C h()}$(2p).1b(\'2q\',4(){f.$3.1c(\'.3\');f.$v=f.$3=f.$l=B})}2r(6 i=0,G;G=2.$v[i];i++)$(G)[$.1l(i,o.u)!=-1&&!$(G).Z(o.z)?\'y\':\'H\'](o.T);5(o.P===F)2.$3.1m(\'P.3\');6 j,U,1d={\'2s-2t\':0,1B:1},1C=\'2u\';5(o.11&&o.11.2v==2w)j=o.11[0]||1d,U=o.11[1]||1d;C j=U=o.11||1d;6 k={1n:\'\',2x:\'\',2y:\'\'};5(!$.S.1a)k.1D=\'\';4 1E(a,b,c){b.1W(j,j.1B||1C,4(){b.y(o.N).1e(k);5($.S.1a&&j.1D)b[0].1X.M=\'\';5(c)1o(a,c,b)})}4 1o(a,b,c){5(U===1d)b.1e(\'1n\',\'1F\');b.1W(U,U.1B||1C,4(){b.H(o.N).1e(k);5($.S.1a&&U.1D)b[0].1X.M=\'\';$(f.x).O(\'1V\',[B,f.8(a,b[0])],o.K)})}4 1Y(a,b,c,d){b.y(o.z).2z().H(o.z);1E(a,c,d)}2.$3.1c(\'.3\').1b(o.L,4(){6 b=$(2).2A(\'G:I(0)\'),$12=f.$l.M(\':2B\'),$K=$(2.J);5((b.Z(o.z)&&!o.1p)||b.Z(o.T)||$(2).Z(o.1f)||$(f.x).O(\'2C\',[B,f.8(2,$K[0])],o.15)===F){2.1q();p F}f.m.7=f.$3.Y(2);5(o.1p){5(b.Z(o.z)){f.m.7=B;b.H(o.z);f.$l.Q();1E(2,$12);2.1q();p F}C 5(!$12.w){f.$l.Q();6 a=2;f.E(f.$3.Y(2),4(){b.y(o.z).y(o.1G);1o(a,$K)});2.1q();p F}}5(o.X)$.X(\'8-3\'+$.q(f.x),f.m.7,o.X);f.$l.Q();5($K.w){6 a=2;f.E(f.$3.Y(2),$12.w?4(){1Y(a,b,$12,$K)}:4(){b.y(o.z);1o(a,$K)})}C 2D\'1Z 2E 2F: 2G 2H 2I.\';5($.S.1a)2.1q();p F});5(!(/^1H/).1O(o.L))2.$3.1b(\'1H.3\',4(){p F})},16:4(a,b,c){5(c==1k)c=2.$3.w;6 o=2.m;6 d=$(o.20.V(/#\\{D\\}/g,a).V(/#\\{1r\\}/g,b));d.q(\'19.3\',14);6 e=a.2J(\'#\')==0?a.V(\'#\',\'\'):2.1w($(\'a:2K-2L\',d)[0]);6 f=$(\'#\'+e);5(!f.w){f=$(o.1x).W(\'17\',e).y(o.N).q(\'19.3\',14)}f.y(o.18);5(c>=2.$v.w){d.21(2.x);f.21(2.x[0].2M)}C{d.22(2.$v[c]);f.22(2.$l[c])}o.u=$.1j(o.u,4(n,i){p n>=c?++n:n});2.13();5(2.$3.w==1){d.y(o.z);f.H(o.N);6 g=$.q(2.$3[0],\'E.3\');5(g)2.E(c,g)}2.x.O(\'2N\',[B,2.8(2.$3[c],2.$l[c])],o.16)},1g:4(a){6 o=2.m,$G=2.$v.I(a).1g(),$1i=2.$l.I(a).1g();5($G.Z(o.z)&&2.$3.w>1)2.15(a+(a+1<2.$3.w?1:-1));o.u=$.1j($.23(o.u,4(n,i){p n!=a}),4(n,i){p n>=a?--n:n});2.13();2.x.O(\'2O\',[B,2.8($G.1I(\'a\')[0],$1i[0])],o.1g)},24:4(a){6 o=2.m;5($.1l(a,o.u)==-1)p;6 b=2.$v.I(a).H(o.T);5($.S.2P){b.1e(\'1n\',\'2Q-1F\');1A(4(){b.1e(\'1n\',\'1F\')},0)}o.u=$.23(o.u,4(n,i){p n!=a});2.x.O(\'2R\',[B,2.8(2.$3[a],2.$l[a])],o.24)},25:4(a){6 b=2,o=2.m;5(a!=o.7){2.$v.I(a).y(o.T);o.u.1S(a);o.u.1U();2.x.O(\'2S\',[B,2.8(2.$3[a],2.$l[a])],o.25)}},15:4(a){5(2T a==\'2U\')a=2.$3.Y(2.$3.M(\'[D$=\'+a+\']\')[0]);2.$3.I(a).2V(2.m.L)},E:4(c,d){6 e=2,o=2.m,$a=2.$3.I(c),a=$a[0],26=d==1k||d===F,1h=$a.q(\'E.3\');d=d||4(){};5(!1h||!26&&$.q(a,\'P.3\')){d();p}6 f=4(a){6 b=$(a),$1J=b.1I(\'*:2W\');p $1J.w&&$1J||b};6 g=4(){e.$3.M(\'.\'+o.1f).H(o.1f).R(4(){5(o.1s)f(2).2X().1t(f(2).q(\'1r.3\'))});e.1u=B};5(o.1s){6 h=f(a).1t();f(a).2Y(\'<1K></1K>\').1I(\'1K\').q(\'1r.3\',h).1t(o.1s)}6 i=$.27({},o.1v,{1h:1h,1L:4(r,s){$(a.J).1t(r);g();5(o.P)$.q(a,\'P.3\',14);$(e.x).O(\'2Z\',[B,e.8(e.$3[c],e.$l[c])],o.E);o.1v.1L&&o.1v.1L(r,s);d()}});5(2.1u){2.1u.30();g()}$a.y(o.1f);1A(4(){e.1u=$.31(i)},0)},1h:4(a,b){2.$3.I(a).1m(\'P.3\').q(\'E.3\',b)},19:4(){6 o=2.m;2.x.1c(\'.3\').H(o.1y).1m(\'3\');2.$3.R(4(){6 b=$.q(2,\'D.3\');5(b)2.D=b;6 c=$(2).1c(\'.3\');$.R([\'D\',\'E\',\'P\'],4(i,a){c.1m(a+\'.3\')})});2.$v.16(2.$l).R(4(){5($.q(2,\'19.3\'))$(2).1g();C $(2).H([o.z,o.1G,o.T,o.18,o.N].32(\' \'))})}});$.8.3.33={1p:F,L:\'1H\',u:[],X:B,1s:\'34&#35;\',P:F,1R:\'8-3-\',1v:{},11:B,20:\'<G><a D="#{D}"><28>#{1r}</28></a></G>\',1x:\'<29></29>\',1y:\'8-3-36\',z:\'8-3-7\',1G:\'8-3-1p\',T:\'8-3-u\',18:\'8-3-1i\',N:\'8-3-12\',1f:\'8-3-37\'};$.8.3.38="w";$.27($.8.3.39,{1M:B,3a:4(a,b){b=b||F;6 c=2,t=2.m.7;4 1N(){c.1M=3b(4(){t=++t<c.$3.w?t:0;c.15(t)},a)}4 Q(e){5(!e||e.3c){3d(c.1M)}}5(a){1N();5(!b)2.$3.1b(2.m.L,Q);C 2.$3.1b(2.m.L,4(){Q();t=c.m.7;1N()})}C{Q();2.$3.1c(2.m.L,Q)}}})})(1Z);',62,200,'||this|tabs|function|if|var|selected|ui|||||||||||||panels|options|||return|data||||disabled|lis|length|element|addClass|selectedClass||null|else|href|load|false|li|removeClass|eq|hash|show|event|filter|hideClass|triggerHandler|cache|stop|each|browser|disabledClass|showFx|replace|attr|cookie|index|hasClass||fx|hide|tabify|true|select|add|id|panelClass|destroy|msie|bind|unbind|baseFx|css|loadingClass|remove|url|panel|map|undefined|inArray|removeData|display|showTab|unselect|blur|label|spinner|html|xhr|ajaxOptions|tabId|panelTemplate|navClass|location|setTimeout|duration|baseDuration|opacity|hideTab|block|unselectClass|click|find|inner|em|success|rotation|start|test|title|_|idPrefix|push|toShowId|sort|tabsshow|animate|style|switchTab|jQuery|tabTemplate|appendTo|insertBefore|grep|enable|disable|bypassCache|extend|span|div|widget|init|setData|Za|z0|tab|has|insertAfter|opera|500|scrollTo|parseInt|unique|concat|splice|window|unload|for|min|width|normal|constructor|Array|overflow|height|siblings|parents|visible|tabsselect|throw|UI|Tabs|Mismatching|fragment|identifier|indexOf|first|child|parentNode|tabsadd|tabsremove|safari|inline|tabsenable|tabsdisable|typeof|string|trigger|last|parent|wrapInner|tabsload|abort|ajax|join|defaults|Loading|8230|nav|loading|getter|prototype|rotate|setInterval|clientX|clearInterval'.split('|'),0,{}))

/**
 * jQuery.ScrollTo - Easy element scrolling using jQuery.
 * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * Date: 2/19/2008
 * @author Ariel Flesler
 * @version 1.3.3
 */
;(function($){var o=$.scrollTo=function(a,b,c){o.window().scrollTo(a,b,c)};o.defaults={axis:'y',duration:1};o.window=function(){return $($.browser.safari?'body':'html')};$.fn.scrollTo=function(l,m,n){if(typeof m=='object'){n=m;m=0}n=$.extend({},o.defaults,n);m=m||n.speed||n.duration;n.queue=n.queue&&n.axis.length>1;if(n.queue)m/=2;n.offset=j(n.offset);n.over=j(n.over);return this.each(function(){var a=this,b=$(a),t=l,c,d={},w=b.is('html,body');switch(typeof t){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(t)){t=j(t);break}t=$(t,this);case'object':if(t.is||t.style)c=(t=$(t)).offset()}$.each(n.axis.split(''),function(i,f){var P=f=='x'?'Left':'Top',p=P.toLowerCase(),k='scroll'+P,e=a[k],D=f=='x'?'Width':'Height';if(c){d[k]=c[p]+(w?0:e-b.offset()[p]);if(n.margin){d[k]-=parseInt(t.css('margin'+P))||0;d[k]-=parseInt(t.css('border'+P+'Width'))||0}d[k]+=n.offset[p]||0;if(n.over[p])d[k]+=t[D.toLowerCase()]()*n.over[p]}else d[k]=t[p];if(/^\d+$/.test(d[k]))d[k]=d[k]<=0?0:Math.min(d[k],h(D));if(!i&&n.queue){if(e!=d[k])g(n.onAfterFirst);delete d[k]}});g(n.onAfter);function g(a){b.animate(d,m,n.easing,a&&function(){a.call(this,l)})};function h(D){var b=w?$.browser.opera?document.body:document.documentElement:a;return b['scroll'+D]-b['client'+D]}})};function j(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
/**
 * jQuery.LocalScroll - Animated scrolling navigation, using anchors.
 * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 6/3/2008
 * @author Ariel Flesler
 * @version 1.2.6
 **/
;(function($){var g=location.href.replace(/#.*/,''),h=$.localScroll=function(a){$('body').localScroll(a)};h.defaults={duration:1e3,axis:'y',event:'click',stop:1};h.hash=function(a){a=$.extend({},h.defaults,a);a.hash=0;if(location.hash)setTimeout(function(){i(0,location,a)},0)};$.fn.localScroll=function(b){b=$.extend({},h.defaults,b);return(b.persistent||b.lazy)?this.bind(b.event,function(e){var a=$([e.target,e.target.parentNode]).filter(c)[0];a&&i(e,a,b)}):this.find('a,area').filter(c).bind(b.event,function(e){i(e,this,b)}).end().end();function c(){var a=this;return!!a.href&&!!a.hash&&a.href.replace(a.hash,'')==g&&(!b.filter||$(a).is(b.filter))}};function i(e,a,b){var c=a.hash.slice(1),d=document.getElementById(c)||document.getElementsByName(c)[0],f;if(d){e&&e.preventDefault();f=$(b.target||$.scrollTo.window());if(b.lock&&f.is(':animated')||b.onBefore&&b.onBefore.call(a,e,d,f)===!1)return;if(b.stop)f.queue('fx',[]).stop();f.scrollTo(d,b).trigger('notify.serialScroll',[d]);if(b.hash)f.queue(function(){location=a.hash;$(this).dequeue()})}}})(jQuery);
/**
 * jQuery[a] - Animated scrolling of series
 * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
 * Dual licensed under MIT and GPL.
 * Date: 3/20/2008
 * @author Ariel Flesler
 * @version 1.2.1
 *
 * http://flesler.blogspot.com/2008/02/jqueryserialscroll.html
 */
;(function($){var a='serialScroll',b='.'+a,c='bind',C=$[a]=function(b){$.scrollTo.window()[a](b)};C.defaults={duration:1e3,axis:'x',event:'click',start:0,step:1,lock:1,cycle:1,constant:1};$.fn[a]=function(y){y=$.extend({},C.defaults,y);var z=y.event,A=y.step,B=y.lazy;return this.each(function(){var j=y.target?this:document,k=$(y.target||this,j),l=k[0],m=y.items,o=y.start,p=y.interval,q=y.navigation,r;if(!B)m=w();if(y.force)t({},o);$(y.prev||[],j)[c](z,-A,s);$(y.next||[],j)[c](z,A,s);if(!l.ssbound)k[c]('prev'+b,-A,s)[c]('next'+b,A,s)[c]('goto'+b,t);if(p)k[c]('start'+b,function(e){if(!p){v();p=1;u()}})[c]('stop'+b,function(){v();p=0});k[c]('notify'+b,function(e,a){var i=x(a);if(i>-1)o=i});l.ssbound=1;if(y.jump)(B?k:w())[c](z,function(e){t(e,x(e.target))});if(q)q=$(q,j)[c](z,function(e){e.data=Math.round(w().length/q.length)*q.index(this);t(e,this)});function s(e){e.data+=o;t(e,this)};function t(e,a){if(!isNaN(a)){e.data=a;a=l}var c=e.data,n,d=e.type,f=y.exclude?w().slice(0,-y.exclude):w(),g=f.length,h=f[c],i=y.duration;if(d)e.preventDefault();if(p){v();r=setTimeout(u,y.interval)}if(!h){n=c<0?0:n=g-1;if(o!=n)c=n;else if(!y.cycle)return;else c=g-n-1;h=f[c]}if(!h||d&&o==c||y.lock&&k.is(':animated')||d&&y.onBefore&&y.onBefore.call(a,e,h,k,w(),c)===!1)return;if(y.stop)k.queue('fx',[]).stop();if(y.constant)i=Math.abs(i/A*(o-c));k.scrollTo(h,i,y).trigger('notify'+b,[c])};function u(){k.trigger('next'+b)};function v(){clearTimeout(r)};function w(){return $(m,l)};function x(a){if(!isNaN(a))return a;var b=w(),i;while((i=b.index(a))==-1&&a!=l)a=a.parentNode;return i}})}})(jQuery);
/**
 * jquery.scrollable 0.11. Making HTML elements scroll.
 * 
 * http://flowplayer.org/tools/scrollable.html
 *
 * Copyright (c) 2008 Tero Piirainen (tero@flowplayer.org)
 *
 * Released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 * 
 * >> Basically you can do anything you want but leave this header as is <<
 *
 * Since  : 0.01 - 03/01/2008
 * Version: 0.11 - 05/20/2008
 */
(function($){$.fn.extend({scrollable:function(b,c,d){return this.each(function(){if(typeof b=="string"){var a=$.data(this,"scrollable");a[b].apply(a,[c,d])}else{new $.scrollable(this,b,c)}})}});$.scrollable=function(a,b){$.data(a,"scrollable",this);this.init(a,b)};$.extend($.scrollable.prototype,{init:function(e,f){var g=this;var h={size:5,horizontal:false,activeClass:'active',speed:300,onSeek:null,items:'.items',prev:'.prev',next:'.next',navi:'.navi',naviItem:'span'};this.opts=$.extend(h,f);var j=this.root=$(e);var k=$(h.items,j);if(!k.length)k=j;k.css({position:'relative',overflow:'hidden',visibility:'visible'});k.children().wrapAll('<div class="__scrollable" style="position:absolute"/>');this.wrap=k.children(":first");this.wrap.css(h.horizontal?"width":"height","200000em").after('<br clear="all"/>');this.items=this.wrap.children();this.index=0;if(h.horizontal){k.width(h.size*(this.items.eq(1).offset().left-this.items.eq(0).offset().left)-2)}else{k.height(h.size*(this.items.eq(1).offset().top-this.items.eq(0).offset().top)-2)}if($.isFunction($.fn.mousewheel)){j.bind("mousewheel.scrollable",function(a,b){g.move(-b,50);return false})}$(window).bind("keypress.scrollable",function(a){if($(a.target).parents(".__scrollable").length){if(h.horizontal&&(a.keyCode==37||a.keyCode==39)){g.move(a.keyCode==37?-1:1);return false}if(!h.horizontal&&(a.keyCode==38||a.keyCode==40)){g.move(a.keyCode==38?-1:1);return false}}return true});this.items.each(function(a,b){$(this).bind("click.scrollable",function(){g.click(a)})});this.activeIndex=0;$(h.prev,j).click(function(){g.prev()});$(h.next,j).click(function(){g.next()});$(h.navi,j).each(function(){var b=$(this);var c=g.getStatus();if(b.is(":empty")){for(var i=0;i<c.pages;i++){var d=$("<"+h.naviItem+"/>").attr("page",i).click(function(){var a=$(this);a.parent().children().removeClass(h.activeClass);a.addClass(h.activeClass);g.setPage(a.attr("page"))});if(i==0)d.addClass(h.activeClass);b.append(d)}}else{b.children().each(function(i){var a=$(this);a.attr("page",i);if(i==0)a.addClass(h.activeClass);a.click(function(){a.parent().children().removeClass(h.activeClass);a.addClass(h.activeClass);g.setPage(a.attr("page"))})})}})},click:function(a){var b=this.items.eq(a);var c=this.opts.activeClass;if(!b.hasClass(c)&&(a>=0||a<this.items.size())){var d=this.items.eq(this.activeIndex).removeClass(c);b.addClass(c);this.seekTo(a-Math.floor(this.opts.size/2));this.activeIndex=a}},getStatus:function(){var a=this.items.size();var s={length:a,index:this.index,size:this.opts.size,pages:Math.floor(a/this.opts.size),page:Math.floor(this.index/this.opts.size)};return s},seekTo:function(a,b){if(a<0)a=0;a=Math.min(a,this.items.length-this.opts.size);var c=this.items.eq(a);if(c.size()==0)return false;this.index=a;if(this.opts.horizontal){var d=this.wrap.offset().left-c.offset().left;this.wrap.animate({left:d},b||this.opts.speed)}else{var e=this.wrap.offset().top-c.offset().top;this.wrap.animate({top:e},b||this.opts.speed)}if($.isFunction(this.opts.onSeek)){this.opts.onSeek.call(this.getStatus())}var f=$(this.opts.navi,this.root);if(f.length){var g=this.opts.activeClass;var h=Math.round(a/this.opts.size);f.children().removeClass(g).eq(h).addClass(g)}return true},move:function(a,b){this.seekTo(this.index+a,b)},next:function(a){this.move(1,a)},prev:function(a){this.move(-1,a)},movePage:function(a,b){this.move(this.opts.size*a,b)},setPage:function(a,b){this.seekTo(this.opts.size*a,b)},prevPage:function(a){var b=Math.floor(this.index/this.opts.size);this.seekTo(this.opts.size*(b-1),a)},nextPage:function(a){var b=Math.floor(this.index/this.opts.size);this.seekTo(this.opts.size*(b+1),a)},begin:function(a){this.seekTo(0,a)},end:function(a){this.seekTo(this.items.size()-this.opts.size,a)}})})(jQuery);

/*	sIFR v2.0.5
	Copyright 2004 - 2007 Mark Wubben and Mike Davidson. Prior contributions by Shaun Inman and Tomas Jogin.
	
	This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>
*/

var hasFlash=function(){var a=6;if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("Windows")>-1){document.write('<script language="VBScript"\> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & '+a+'))) \n</script\> \n');if(window.hasFlash!=null)return window.hasFlash}if(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){var b=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;return parseInt(b.charAt(b.indexOf(".")-1))>=a}return false}();String.prototype.normalize=function(){return this.replace(/\s+/g," ")};if(Array.prototype.push==null){Array.prototype.push=function(){var i=0,a=this.length,b=arguments.length;while(i<b){this[a++]=arguments[i++]}return this.length}}if(!Function.prototype.apply){Function.prototype.apply=function(a,b){var c=[];var d,e;if(!a)a=window;if(!b)b=[];for(var i=0;i<b.length;i++){c[i]="b["+i+"]"}e="a.__applyTemp__("+c.join(",")+");";a.__applyTemp__=this;d=eval(e);a.__applyTemp__=null;return d}}function named(a){return new named.Arguments(a)}named.Arguments=function(a){this.oArgs=a};named.Arguments.prototype.constructor=named.Arguments;named.extract=function(a,b){var c,d;var i=a.length;while(i--){d=a[i];if(d!=null&&d.constructor!=null&&d.constructor==named.Arguments){c=a[i].oArgs;break}}if(c==null)return;for(e in c)if(b[e]!=null)b[e](c[e]);return};var parseSelector=function(){var a=/^([^#.>`]*)(#|\.|\>|\`)(.+)$/;function r(s,t){var u=s.split(/\s*\,\s*/);var v=[];for(var i=0;i<u.length;i++)v=v.concat(b(u[i],t));return v}function b(c,d,e){c=c.normalize().replace(" ","`");var f=c.match(a);var g,h,i,j,k,n;var l=[];if(f==null)f=[c,c];if(f[1]=="")f[1]="*";if(e==null)e="`";if(d==null)d=document;switch(f[2]){case "#":k=f[3].match(a);if(k==null)k=[null,f[3]];g=document.getElementById(k[1]);if(g==null||(f[1]!="*"&&!o(g,f[1])))return l;if(k.length==2){l.push(g);return l}return b(k[3],g,k[2]);case ".":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;k=f[3].match(a);if(k!=null){if(g.className==null||g.className.match("(\\s|^)"+k[1]+"(\\s|$)")==null)continue;j=b(k[3],g,k[2]);l=l.concat(j)}else if(g.className!=null&&g.className.match("(\\s|^)"+f[3]+"(\\s|$)")!=null)l.push(g)}return l;case ">":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;j=b(f[3],g,">");l=l.concat(j)}return l;case "`":h=m(d,f[1]);for(i=0,n=h.length;i<n;i++){g=h[i];j=b(f[3],g,"`");l=l.concat(j)}return l;default:if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;l.push(g)}return l}}function m(d,o){if(o=="*"&&d.all!=null)return d.all;return d.getElementsByTagName(o)}function o(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}return r}();var sIFR=function(){var a="http://www.w3.org/1999/xhtml";var b=false;var c=false;var d;var ah=[];var al=document;var ak=al.documentElement;var am=window;var au=al.addEventListener;var av=am.addEventListener;var f=function(){var g=navigator.userAgent.toLowerCase();var f={a:g.indexOf("applewebkit")>-1,b:g.indexOf("safari")>-1,c:navigator.product!=null&&navigator.product.toLowerCase().indexOf("konqueror")>-1,d:g.indexOf("opera")>-1,e:al.contentType!=null&&al.contentType.indexOf("xml")>-1,f:true,g:true,h:null,i:null,j:null,k:null};f.l=f.a||f.c;f.m=!f.a&&navigator.product!=null&&navigator.product.toLowerCase()=="gecko";if(f.m&&g.match(/.*gecko\/(\d{8}).*/))f.j=new Number(g.match(/.*gecko\/(\d{8}).*/)[1]);f.n=g.indexOf("msie")>-1&&!f.d&&!f.l&&!f.m;f.o=f.n&&g.match(/.*mac.*/)!=null;if(f.d&&g.match(/.*opera(\s|\/)(\d+\.\d+)/))f.i=new Number(g.match(/.*opera(\s|\/)(\d+\.\d+)/)[2]);if(f.n||(f.d&&f.i<7.6))f.g=false;if(f.a&&g.match(/.*applewebkit\/(\d+).*/))f.k=new Number(g.match(/.*applewebkit\/(\d+).*/)[1]);if(am.hasFlash&&(!f.n||f.o)){var aj=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;f.h=parseInt(aj.charAt(aj.indexOf(".")-1))}if(g.match(/.*(windows|mac).*/)==null||f.o||f.c||(f.d&&(g.match(/.*mac.*/)!=null||f.i<7.6))||(f.b&&f.h<7)||(!f.b&&f.a&&f.k<312)||(f.m&&f.j<20020523))f.f=false;if(!f.o&&!f.m&&al.createElementNS)try{al.createElementNS(a,"i").innerHTML=""}catch(e){f.e=true}f.p=f.c||(f.a&&f.k<312);return f}();function at(){return{bIsWebKit:f.a,bIsSafari:f.b,bIsKonq:f.c,bIsOpera:f.d,bIsXML:f.e,bHasTransparencySupport:f.f,bUseDOM:f.g,nFlashVersion:f.h,nOperaVersion:f.i,nGeckoBuildDate:f.j,nWebKitVersion:f.k,bIsKHTML:f.l,bIsGecko:f.m,bIsIE:f.n,bIsIEMac:f.o,bUseInnerHTMLHack:f.p}}if(am.hasFlash==false||!al.getElementsByTagName||!al.getElementById||(f.e&&(f.p||f.n)))return{UA:at()};function af(e){if((!k.bAutoInit&&(am.event||e)!=null)||!l(e))return;b=true;for(var i=0,h=ah.length;i<h;i++)j.apply(null,ah[i]);ah=[]}var k=af;function l(e){if(c==false||k.bIsDisabled==true||((f.e&&f.m||f.l)&&e==null&&b==false)||al.getElementsByTagName("body").length==0)return false;return true}function m(n){if(f.n)return n.replace(new RegExp("%\d{0}","g"),"%25");return n.replace(new RegExp("%(?!\d)","g"),"%25")}function as(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:", "")==q.toLowerCase()}function o(p,q,r,s,t){var u="";var v=p.firstChild;var w,x,y,z;if(s==null)s=0;if(t==null)t="";while(v){if(v.nodeType==3){z=v.nodeValue.replace("<","&lt;");switch(r){case "lower":u+=z.toLowerCase();break;case "upper":u+=z.toUpperCase();break;default:u+=z}}else if(v.nodeType==1){if(as(v,"a")&&!v.getAttribute("href")==false){if(v.getAttribute("target"))t+="&sifr_url_"+s+"_target="+v.getAttribute("target");t+="&sifr_url_"+s+"="+m(v.getAttribute("href")).replace(/&/g,"%26");u+='<a href="asfunction:_root.launchURL,'+s+'">';s++}else if(as(v,"br"))u+="<br/>";if(v.hasChildNodes()){y=o(v,null,r,s,t);u+=y.u;s=y.s;t=y.t}if(as(v,"a"))u+="</a>"}w=v;v=v.nextSibling;if(q!=null){x=w.parentNode.removeChild(w);q.appendChild(x)}}return{"u":u,"s":s,"t":t}}function A(B){if(al.createElementNS&&f.g)return al.createElementNS(a,B);return al.createElement(B)}function C(D,E,z){var p=A("param");p.setAttribute("name",E);p.setAttribute("value",z);D.appendChild(p)}function F(p,G){var H=p.className;if(H==null)H=G;else H=H.normalize()+(H==""?"":" ")+G;p.className=H}function aq(ar){var a=ak;if(k.bHideBrowserText==false)a=al.getElementsByTagName("body")[0];if((k.bHideBrowserText==false||ar)&&a)if(a.className==null||a.className.match(/\bsIFR\-hasFlash\b/)==null)F(a, "sIFR-hasFlash")}function j(I,J,K,L,M,N,O,P,Q,R,S,r,T){if(!l())return ah.push(arguments);aq();named.extract(arguments,{sSelector:function(ap){I=ap},sFlashSrc:function(ap){J=ap},sColor:function(ap){K=ap},sLinkColor:function(ap){L=ap},sHoverColor:function(ap){M=ap},sBgColor:function(ap){N=ap},nPaddingTop:function(ap){O=ap},nPaddingRight:function(ap){P=ap},nPaddingBottom:function(ap){Q=ap},nPaddingLeft:function(ap){R=ap},sFlashVars:function(ap){S=ap},sCase:function(ap){r=ap},sWmode:function(ap){T=ap}});var U=parseSelector(I);if(U.length==0)return false;if(S!=null)S="&"+S.normalize();else S="";if(K!=null)S+="&textcolor="+K;if(M!=null)S+="&hovercolor="+M;if(M!=null||L!=null)S+="&linkcolor="+(L||K);if(O==null)O=0;if(P==null)P=0;if(Q==null)Q=0;if(R==null)R=0;if(N==null)N="#FFFFFF";if(T=="transparent")if(!f.f)T="opaque";else N="transparent";if(T==null)T="";var p,V,W,X,Y,Z,aa,ab,ac;var ad=null;for(var i=0,h=U.length;i<h;i++){p=U[i];if(p.className!=null&&p.className.match(/\bsIFR\-replaced\b/)!=null)continue;V=p.offsetWidth-R-P;W=p.offsetHeight-O-Q;aa=A("span");aa.className="sIFR-alternate";ac=o(p,aa,r);Z="txt="+m(ac.u).replace(/\+/g,"%2B").replace(/&/g,"%26").replace(/\"/g, "%22").normalize() + S + "&w=" + V + "&h=" + W + ac.t;F(p,"sIFR-replaced");if(ad==null||!f.g){if(!f.g){if(!f.n)p.innerHTML=['<embed class="sIFR-flash" type="application/x-shockwave-flash" src="',J,'" quality="best" wmode="',T,'" bgcolor="',N,'" flashvars="',Z,'" width="',V,'" height="',W,'" sifr="true"></embed>'].join("");else p.innerHTML=['<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" sifr="true" width="',V,'" height="',W,'" class="sIFR-flash"><param name="movie" value="',J,'"></param><param name="flashvars" value="',Z,'"></param><param name="quality" value="best"></param><param name="wmode" value="',T,'"></param><param name="bgcolor" value="',N,'"></param> </object>'].join('')}else{if(f.d){ab=A("object");ab.setAttribute("data",J);C(ab,"quality","best");C(ab,"wmode",T);C(ab,"bgcolor",N)}else{ab=A("embed");ab.setAttribute("src",J);ab.setAttribute("quality","best");ab.setAttribute("flashvars",Z);ab.setAttribute("wmode",T);ab.setAttribute("bgcolor",N)}ab.setAttribute("sifr","true");ab.setAttribute("type","application/x-shockwave-flash");ab.className="sIFR-flash";if(!f.l||!f.e)ad=ab.cloneNode(true)}}else ab=ad.cloneNode(true);if(f.g){if(f.d)C(ab,"flashvars",Z);else ab.setAttribute("flashvars",Z);ab.setAttribute("width",V);ab.setAttribute("height",W);ab.style.width=V+"px";ab.style.height=W+"px";p.appendChild(ab)}p.appendChild(aa);if(f.p)p.innerHTML+=""}if(f.n&&k.bFixFragIdBug)setTimeout(function(){al.title=d},0)}function ai(){d=al.title}function ae(){if(k.bIsDisabled==true)return;c=true;if(k.bHideBrowserText)aq(true);if(am.attachEvent)am.attachEvent("onload",af);else if(!f.c&&(al.addEventListener||am.addEventListener)){if(f.a&&f.k>=132&&am.addEventListener)am.addEventListener("load",function(){setTimeout("sIFR({})",1)},false);else{if(al.addEventListener)al.addEventListener("load",af,false);if(am.addEventListener)am.addEventListener("load",af,false)}}else if(typeof am.onload=="function"){var ag=am.onload;am.onload=function(){ag();af()}}else am.onload=af;if(!f.n||am.location.hash=="")k.bFixFragIdBug=false;else ai()}k.UA=at();k.bAutoInit=true;k.bFixFragIdBug=true;k.replaceElement=j;k.updateDocumentTitle=ai;k.appendToClassName=F;k.setup=ae;k.debug=function(){aq(true)};k.debug.replaceNow=function(){ae();k()};k.bIsDisabled=false;k.bHideBrowserText=true;return k}();

if(typeof sIFR == "function" && !sIFR.UA.bIsIEMac && (!sIFR.UA.bIsWebKit || sIFR.UA.nWebKitVersion >= 100)){
	sIFR.setup();
};
/*	sIFR 2.0.1 Official Add-ons 1.2
	Copyright 2005 Mark Wubben
*/
if(typeof sIFR=="function")(function(){var j=document;var h=j.documentElement;sIFR.removeDecoyClasses=function(){function a(b){if(b&&b.className!=null)b.className=b.className.replace(/\bsIFR-hasFlash\b/,"")}return function(){a(h);a(j.getElementsByTagName("body")[0])}}();sIFR.preferenceManager={storage:{sCookieId:"sifr",set:function(a){var b=new Date();b.setFullYear(b.getFullYear()+3);j.cookie=[this.sCookieId,"=",a,";expires=",b.toGMTString(),";path=/"].join("")},get:function(){var a=j.cookie.match(new RegExp(";?"+this.sCookieId+"=([^;]+);?"));if(a!=null&&a[1]=="false")return false;else return true},reset:function(){var a=new Date();a.setFullYear(a.getFullYear()-1);j.cookie=[this.sCookieId,"=true;expires=",a.toGMTString(),";path=/"].join("")}},disable:function(){this.storage.set(false)},enable:function(){this.storage.set(true)},test:function(){return this.storage.get()}};if(sIFR.preferenceManager.test()==false){sIFR.bIsDisabled=true;sIFR.removeDecoyClasses()}sIFR.rollback=function(){function a(b){var c,d,e,f,g,h;var l=parseSelector(b);var i=l.length-1;var m=false;while(i>=0){c=l[i];l.length--;d=c.parentNode;if(c.getAttribute("sifr")=="true"){h=0;while(h<d.childNodes.length){c=d.childNodes[h];if(c.className=="sIFR-alternate"){e=c;h++;continue}d.removeChild(c)}if(e!=null){f=e.firstChild;while(f!=null){g=f.nextSibling;d.appendChild(e.removeChild(f));f=g}d.removeChild(e)}if(!sIFR.UA.bIsXML&&sIFR.UA.bUseInnerHTMLHack)d.innerHTML+="";d.className=d.className.replace(/\bsIFR\-replaced\b/,"")};m=true;i--}return m}return function(k){named.extract(arguments,{sSelector:function(a){k=a}});if(k==null)k="";else k+=">";sIFR.removeDecoyClasses();sIFR.bHideBrowserText=false;if(a(k+"embed")==false)a(k+"object")}}()})()

// SWF Object
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('5 1E=9(){5 b="27",Q="1P",n="2A 28",p="29.29",P="2B/x-2C-2D",m="2E",j=2a,K=2F,T=2G,o=[],N=[],i=[],d=[],J,Z=15,M=15,l=15,e=1c,A=1c;5 h=9(){5 v=12 K.2b!=b&&12 K.1s!=b&&12 K.2c!=b,1m=[0,0,0],x=15;3(12 T.1Q!=b&&12 T.1Q[n]==Q){x=T.1Q[n].2H;3(x&&!(12 T.1R!=b&&T.1R[P]&&!T.1R[P].2I)){x=x.1B(/^.*\\s+(\\S+\\s+\\S+$)/,"$1");1m[0]=1g(x.1B(/^(.*)\\..*$/,"$1"),10);1m[1]=1g(x.1B(/^.*\\.(.*)\\s.*$/,"$1"),10);1m[2]=/r/.1j(x)?1g(x.1B(/^.*r(.*)$/,"$1"),10):0}}11{3(12 j.1F!=b){5 y=15,1G=1c;1q{y=1S 1F(p+".7")}1r(t){1q{y=1S 1F(p+".6");1m=[6,0,21];y.2J="2K"}1r(t){3(1m[0]==6){1G=18}}3(!1G){1q{y=1S 1F(p)}1r(t){}}}3(!1G&&y){1q{x=y.2L("$2M");3(x){x=x.1H(" ")[1].1H(",");1m=[1g(x[0],10),1g(x[1],10),1g(x[2],10)]}}1r(t){}}}}5 a=T.2N.1e(),r=T.2O.1e(),2d=/1n/.1j(a)?2P(a.1B(/^.*1n\\/(\\d+(\\.\\d+)?).*$/,"$1")):1c,q=1c,z=r?/16/.1j(r):/16/.1j(a),w=r?/1t/.1j(r):/1t/.1j(a);/*@2Q q=18;@3(@2R)z=18;@2S(@2T)w=18;@2U@*/13{1o:v,1u:1m,1n:2d,19:q,16:z,1t:w}}();5 L=9(){3(!h.1o){13}f(H);3(h.19&&h.16){1q{K.2V("<2e 1d=2f 2W=18 1T=//:><\\/2e>");J=C("2f");3(J){I(J,"2X",S)}}1r(q){}}3(h.1n&&12 K.1v!=b){Z=2Y(9(){3(/2Z|2g/.1j(K.1v)){E()}},10)}3(12 K.1w!=b){K.1w("30",E,15)}R(E)}();9 S(){3(J.1v=="2g"){J.1a.1x(J);E()}}9 E(){3(e){13}3(h.19&&h.16){5 v=a("31");1q{5 u=K.1s("32")[0].1C(v);u.1a.1x(u)}1r(w){13}}e=18;3(Z){33(Z);Z=15}5 q=o.1b;14(5 r=0;r<q;r++){o[r]()}}9 f(q){3(e){q()}11{o[o.1b]=q}}9 R(r){3(12 j.1w!=b){j.1w("2h",r,1c)}11{3(12 K.1w!=b){K.1w("2h",r,1c)}11{3(12 j.1I!=b){I(j,"1p",r)}11{3(12 j.1p=="9"){5 q=j.1p;j.1p=9(){q();r()}}11{j.1p=r}}}}}9 H(){5 t=N.1b;14(5 q=0;q<t;q++){5 u=N[q].1d;3(h.1u[0]>0){5 r=C(u);3(r){N[q].1h=r.1y("1h")?r.1y("1h"):"0";N[q].1i=r.1y("1i")?r.1y("1i"):"0";3(c(N[q].2i)){3(h.1n&&h.1n<2j){Y(r)}W(u,18)}11{3(N[q].1J&&!A&&c("6.0.2k")&&(h.16||h.1t)){k(N[q])}11{O(r)}}}}11{W(u,18)}}}9 Y(t){5 q=t.1s(Q)[0];3(q){5 w=a("2l"),y=q.34;3(y){5 v=y.1b;14(5 u=0;u<v;u++){3(y[u].1z=="35"){w.17("1T",y[u].2m)}11{w.17(y[u].1z,y[u].2m)}}}5 x=q.2n;3(x){5 z=x.1b;14(5 r=0;r<z;r++){3(x[r].1U==1&&x[r].1z=="2o"){w.17(x[r].1y("1V"),x[r].1y("1W"))}}}t.1a.1A(w,t)}}9 k(w){A=18;5 u=C(w.1d);3(u){3(w.1K){5 y=C(w.1K);3(y){M=y;l=w.1K}}11{M=G(u)}3(!(/%$/.1j(w.1h))&&1g(w.1h,10)<2p){w.1h="2p"}3(!(/%$/.1j(w.1i))&&1g(w.1i,10)<2q){w.1i="2q"}K.1X=K.1X.36(0,37)+" - 28 38 39";5 z=h.19&&h.16?"3a":"3b",q=K.1X,r="3c="+j.1Y+"&3d="+z+"&3e="+q,x=w.1d;3(h.19&&h.16&&u.1v!=4){5 t=a("1Z");x+="3f";t.17("1d",x);u.1a.2r(t,u);u.1D.20="2s";5 v=9(){u.1a.1x(u)};I(j,"1p",v)}U({1L:w.1J,1d:m,1h:w.1h,1i:w.1i},{1M:r},x)}}9 O(t){3(h.19&&h.16&&t.1v!=4){5 r=a("1Z");t.1a.2r(r,t);r.1a.1A(G(t),r);t.1D.20="2s";5 q=9(){t.1a.1x(t)};I(j,"1p",q)}11{t.1a.1A(G(t),t)}}9 G(v){5 u=a("1Z");3(h.16&&h.19){u.2t=v.2t}11{5 r=v.1s(Q)[0];3(r){5 w=r.2n;3(w){5 q=w.1b;14(5 t=0;t<q;t++){3(!(w[t].1U==1&&w[t].1z=="2o")&&!(w[t].1U==8)){u.1C(w[t].3g(18))}}}}}13 u}9 U(c,d,t){5 q,v=C(t);3(v){3(12 c.1d==b){c.1d=t}3(h.19&&h.16){5 e="";14(5 f 1f c){3(c[f]!=1k.1l[f]){3(f.1e()=="1L"){d.22=c[f]}11{3(f.1e()=="23"){e+=\' 24="\'+c[f]+\'"\'}11{3(f.1e()!="1N"){e+=" "+f+\'="\'+c[f]+\'"\'}}}}}5 g="";14(5 j 1f d){3(d[j]!=1k.1l[j]){g+=\'<2u 1V="\'+j+\'" 1W="\'+d[j]+\'" />\'}}v.3h=\'<1P 1N="3i:3j-3k-3l-3m-3n"\'+e+">"+g+"</1P>";i[i.1b]=c.1d;q=C(c.1d)}11{3(h.1n&&h.1n<2j){5 k=a("2l");k.17("25",P);14(5 z 1f c){3(c[z]!=1k.1l[z]){3(z.1e()=="1L"){k.17("1T",c[z])}11{3(z.1e()=="23"){k.17("24",c[z])}11{3(z.1e()!="1N"){k.17(z,c[z])}}}}}14(5 y 1f d){3(d[y]!=1k.1l[y]){3(y.1e()!="22"){k.17(y,d[y])}}}v.1a.1A(k,v);q=k}11{5 u=a(Q);u.17("25",P);14(5 x 1f c){3(c[x]!=1k.1l[x]){3(x.1e()=="23"){u.17("24",c[x])}11{3(x.1e()!="1N"){u.17(x,c[x])}}}}14(5 w 1f d){3(d[w]!=1k.1l[w]&&w.1e()!="22"){F(u,w,d[w])}}v.1a.1A(u,v);q=u}}}13 q}9 F(t,q,r){5 u=a("2u");u.17("1V",q);u.17("1W",r);t.1C(u)}9 X(r){5 q=C(r);3(q&&(q.1z=="3o"||q.1z=="3p")){3(h.19&&h.16){3(q.1v==4){B(r)}11{j.1I("1p",9(){B(r)})}}11{q.1a.1x(q)}}}9 B(t){5 r=C(t);3(r){14(5 q 1f r){3(12 r[q]=="9"){r[q]=15}}r.1a.1x(r)}}9 C(t){5 q=15;1q{q=K.2b(t)}1r(r){}13 q}9 a(q){13 K.2c(q)}9 I(t,q,r){t.1I(q,r);d[d.1b]=[t,q,r]}9 c(t){5 r=h.1u,q=t.1H(".");q[0]=1g(q[0],10);q[1]=1g(q[1],10)||0;q[2]=1g(q[2],10)||0;13(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?18:1c}9 V(v,r){3(h.19&&h.1t){13}5 u=K.1s("3q")[0],t=a("1D");t.17("25","3r/3s");t.17("3t","3u");3(!(h.19&&h.16)&&12 K.2v!=b){t.1C(K.2v(v+" {"+r+"}"))}u.1C(t);3(h.19&&h.16&&12 K.1O!=b&&K.1O.1b>0){5 q=K.1O[K.1O.1b-1];3(12 q.2w==Q){q.2w(v,r)}}}9 W(t,q){5 r=q?"3v":"3w";3(e&&C(t)){C(t).1D.2x=r}11{V("#"+t,"2x:"+r)}}9 g(s){5 r=/[\\\\\\"<>\\.;]/;5 q=r.3x(s)!=15;13 q?3y(s):s}5 D=9(){3(h.19&&h.16){2a.1I("3z",9(){5 w=d.1b;14(5 v=0;v<w;v++){d[v][0].3A(d[v][1],d[v][2])}5 t=i.1b;14(5 u=0;u<t;u++){X(i[u])}14(5 r 1f h){h[r]=15}h=15;14(5 q 1f 1E){1E[q]=15}1E=15})}}();13{3B:9(u,q,t){3(!h.1o||!u||!q){13}5 r={};r.1d=u;r.2i=q;r.1J=t?t:1c;N[N.1b]=r;W(u,1c)},3C:9(v){5 q=15;3(h.1o){5 t=C(v);3(t){5 u=t.1s(Q)[0];3(!u||(u&&12 t.2y!=b)){q=t}11{3(12 u.2y!=b){q=u}}}}13 q},3D:9(x,d,e,g,q,w,r,z,i){3(!h.1o||!x||!d||!e||!g||!q){13}e+="";g+="";3(c(q)){W(d,1c);5 j={};3(i&&12 i===Q){14(5 v 1f i){3(i[v]!=1k.1l[v]){j[v]=i[v]}}}j.1L=x;j.1h=e;j.1i=g;5 y={};3(z&&12 z===Q){14(5 u 1f z){3(z[u]!=1k.1l[u]){y[u]=z[u]}}}3(r&&12 r===Q){14(5 t 1f r){3(r[t]!=1k.1l[t]){3(12 y.1M!=b){y.1M+="&"+t+"="+r[t]}11{y.1M=t+"="+r[t]}}}}f(9(){U(j,y,d);3(j.1d==d){W(d,18)}})}11{3(w&&!A&&c("6.0.2k")&&(h.16||h.1t)){A=18;W(d,1c);f(9(){5 a={};a.1d=a.1K=d;a.1h=e;a.1i=g;a.1J=w;k(a)})}}},3E:9(){13{3F:h.1u[0],3G:h.1u[1],3H:h.1u[2]}},3I:c,3J:9(t,r,q){3(h.1o){13 U(t,r,q)}11{13 27}},3K:9(q){3(h.1o){X(q)}},3L:9(r,q){3(h.1o){V(r,q)}},3M:f,3N:R,3O:9(v){5 u=K.1Y.3P||K.1Y.3Q;3(v==15){13 g(u)}3(u){5 t=u.26(1).1H("&");14(5 r=0;r<t.1b;r++){3(t[r].26(0,t[r].2z("="))==v){13 g(t[r].26((t[r].2z("=")+1)))}}}13""},3R:9(){3(A&&M){5 q=C(m);3(q){q.1a.1A(M,q);3(l){W(l,18);3(h.19&&h.16){M.1D.20="3S"}}M=15;l=15;A=1c}}}}}();',62,241,'|||if||var||||function||||||||||||||||||||||||||||||||||||||||||||||||||||||else|typeof|return|for|null|win|setAttribute|true|ie|parentNode|length|false|id|toLowerCase|in|parseInt|width|height|test|Object|prototype|AC|webkit|w3cdom|onload|try|catch|getElementsByTagName|mac|pv|readyState|addEventListener|removeChild|getAttribute|nodeName|replaceChild|replace|appendChild|style|swfobject|ActiveXObject|AB|split|attachEvent|expressInstall|altContentId|data|flashvars|classid|styleSheets|object|plugins|mimeTypes|new|src|nodeType|name|value|title|location|div|display||movie|styleclass|class|type|substring|undefined|Flash|ShockwaveFlash|window|getElementById|createElement|AA|script|__ie_ondomload|complete|load|swfVersion|312|65|embed|nodeValue|childNodes|PARAM|310|137|insertBefore|none|innerHTML|param|createTextNode|addRule|visibility|SetVariable|indexOf|Shockwave|application|shockwave|flash|SWFObjectExprInst|document|navigator|description|enabledPlugin|AllowScriptAccess|always|GetVariable|version|userAgent|platform|parseFloat|cc_on|_win32|elif|_mac|end|write|defer|onreadystatechange|setInterval|loaded|DOMContentLoaded|span|body|clearInterval|attributes|DATA|slice|47|Player|Installation|ActiveX|PlugIn|MMredirectURL|MMplayerType|MMdoctitle|SWFObjectNew|cloneNode|outerHTML|clsid|D27CDB6E|AE6D|11cf|96B8|444553540000|OBJECT|EMBED|head|text|css|media|screen|visible|hidden|exec|encodeURIComponent|onunload|detachEvent|registerObject|getObjectById|embedSWF|getFlashPlayerVersion|major|minor|release|hasFlashPlayerVersion|createSWF|removeSWF|createCSS|addDomLoadEvent|addLoadEvent|getQueryParamValue|search|hash|expressInstallCallback|block'.split('|'),0,{}))

//JQ Corner
var isIE = navigator.userAgent.toLowerCase().indexOf("msie") > -1; var isMoz = document.implementation && document.implementation.createDocument; var isSafari = ((navigator.userAgent.toLowerCase().indexOf("safari") != -1) && (navigator.userAgent.toLowerCase().indexOf("mac") != -1)) ? true : false; function curvyCorners() { if (typeof (arguments[0]) != "object") { throw newCurvyError("First parameter of curvyCorners() must be an object.") } if (typeof (arguments[1]) != "object" && typeof (arguments[1]) != "string") { throw newCurvyError("Second parameter of curvyCorners() must be an object or a class name.") } if (typeof (arguments[1]) == "string") { var G = 0; var A = getElementsByClass(arguments[1]) } else { var G = 1; var A = arguments } var D = new Array(); if (arguments[0].validTags) { var F = arguments[0].validTags } else { var F = ["div"] } for (var C = G, B = A.length; C < B; C++) { var E = A[C].tagName.toLowerCase(); if (inArray(F, E) !== false) { D[D.length] = new curvyObject(arguments[0], A[C]) } } this.objects = D; this.applyCornersToAll = function() { for (var H = 0, I = this.objects.length; H < I; H++) { this.objects[H].applyCorners() } } } function curvyObject() { this.box = arguments[1]; this.settings = arguments[0]; this.topContainer = null; this.bottomContainer = null; this.masterCorners = new Array(); this.contentDIV = null; var G = get_style(this.box, "height", "height"); var D = get_style(this.box, "width", "width"); var A = get_style(this.box, "borderTopWidth", "border-top-width"); var H = get_style(this.box, "borderTopColor", "border-top-color"); var C = get_style(this.box, "backgroundColor", "background-color"); var E = get_style(this.box, "backgroundImage", "background-image"); var B = get_style(this.box, "position", "position"); var F = get_style(this.box, "paddingTop", "padding-top"); this.boxHeight = parseInt(((G != "" && G != "auto" && G.indexOf("%") == -1) ? G.substring(0, G.indexOf("px")) : this.box.scrollHeight)); this.boxWidth = parseInt(((D != "" && D != "auto" && D.indexOf("%") == -1) ? D.substring(0, D.indexOf("px")) : this.box.scrollWidth)); this.borderWidth = parseInt(((A != "" && A.indexOf("px") !== -1) ? A.slice(0, A.indexOf("px")) : 0)); this.boxColour = format_colour(C); this.boxPadding = parseInt(((F != "" && F.indexOf("px") !== -1) ? F.slice(0, F.indexOf("px")) : 0)); this.borderColour = format_colour(H); this.borderString = this.borderWidth + "px solid " + this.borderColour; this.backgroundImage = ((E != "none") ? E : ""); this.boxContent = this.box.innerHTML; if (B != "absolute") { this.box.style.position = "relative" } this.box.style.padding = "0px"; if (isIE && D == "auto" && G == "auto") { this.box.style.width = "100%" } if (this.settings.autoPad == true && this.boxPadding > 0) { this.box.innerHTML = "" } this.applyCorners = function() { for (var Z = 0; Z < 2; Z++) { switch (Z) { case 0: if (this.settings.tl || this.settings.tr) { var W = document.createElement("DIV"); W.style.width = "100%"; W.style.fontSize = "1px"; W.style.overflow = "hidden"; W.style.position = "absolute"; W.style.paddingLeft = this.borderWidth + "px"; W.style.paddingRight = this.borderWidth + "px"; var R = Math.max(this.settings.tl ? this.settings.tl.radius : 0, this.settings.tr ? this.settings.tr.radius : 0); W.style.height = R + "px"; W.style.top = 0 - R + "px"; W.style.left = 0 - this.borderWidth + "px"; this.topContainer = this.box.appendChild(W) } break; case 1: if (this.settings.bl || this.settings.br) { var W = document.createElement("DIV"); W.style.width = "100%"; W.style.fontSize = "1px"; W.style.overflow = "hidden"; W.style.position = "absolute"; W.style.paddingLeft = this.borderWidth + "px"; W.style.paddingRight = this.borderWidth + "px"; var X = Math.max(this.settings.bl ? this.settings.bl.radius : 0, this.settings.br ? this.settings.br.radius : 0); W.style.height = X + "px"; W.style.bottom = 0 - X + "px"; W.style.left = 0 - this.borderWidth + "px"; this.bottomContainer = this.box.appendChild(W) } break } } if (this.topContainer) { this.box.style.borderTopWidth = "0px" } if (this.bottomContainer) { this.box.style.borderBottomWidth = "0px" } var d = ["tr", "tl", "br", "bl"]; for (var h in d) { if (h > -1 < 4) { var c = d[h]; if (!this.settings[c]) { if (((c == "tr" || c == "tl") && this.topContainer != null) || ((c == "br" || c == "bl") && this.bottomContainer != null)) { var V = document.createElement("DIV"); V.style.position = "relative"; V.style.fontSize = "1px"; V.style.overflow = "hidden"; if (this.backgroundImage == "") { V.style.backgroundColor = this.boxColour } else { V.style.backgroundImage = this.backgroundImage } switch (c) { case "tl": V.style.height = R - this.borderWidth + "px"; V.style.marginRight = this.settings.tr.radius - (this.borderWidth * 2) + "px"; V.style.borderLeft = this.borderString; V.style.borderTop = this.borderString; V.style.left = -this.borderWidth + "px"; break; case "tr": V.style.height = R - this.borderWidth + "px"; V.style.marginLeft = this.settings.tl.radius - (this.borderWidth * 2) + "px"; V.style.borderRight = this.borderString; V.style.borderTop = this.borderString; V.style.backgroundPosition = "-" + (R + this.borderWidth) + "px 0px"; V.style.left = this.borderWidth + "px"; break; case "bl": V.style.height = X - this.borderWidth + "px"; V.style.marginRight = this.settings.br.radius - (this.borderWidth * 2) + "px"; V.style.borderLeft = this.borderString; V.style.borderBottom = this.borderString; V.style.left = -this.borderWidth + "px"; V.style.backgroundPosition = "-" + (this.borderWidth) + "px -" + (this.boxHeight + (X + this.borderWidth)) + "px"; break; case "br": V.style.height = X - this.borderWidth + "px"; V.style.marginLeft = this.settings.bl.radius - (this.borderWidth * 2) + "px"; V.style.borderRight = this.borderString; V.style.borderBottom = this.borderString; V.style.left = this.borderWidth + "px"; V.style.backgroundPosition = "-" + (X + this.borderWidth) + "px -" + (this.boxHeight + (X + this.borderWidth)) + "px"; break } } } else { if (this.masterCorners[this.settings[c].radius]) { var V = this.masterCorners[this.settings[c].radius].cloneNode(true) } else { var V = document.createElement("DIV"); V.style.height = this.settings[c].radius + "px"; V.style.width = this.settings[c].radius + "px"; V.style.position = "absolute"; V.style.fontSize = "1px"; V.style.overflow = "hidden"; var M = parseInt(this.settings[c].radius - this.borderWidth); for (var T = 0, g = this.settings[c].radius; T < g; T++) { if ((T + 1) >= M) { var O = -1 } else { var O = (Math.floor(Math.sqrt(Math.pow(M, 2) - Math.pow((T + 1), 2))) - 1) } if (M != g) { if ((T) >= M) { var L = -1 } else { var L = Math.ceil(Math.sqrt(Math.pow(M, 2) - Math.pow(T, 2))) } if ((T + 1) >= g) { var J = -1 } else { var J = (Math.floor(Math.sqrt(Math.pow(g, 2) - Math.pow((T + 1), 2))) - 1) } } if ((T) >= g) { var I = -1 } else { var I = Math.ceil(Math.sqrt(Math.pow(g, 2) - Math.pow(T, 2))) } if (O > -1) { this.drawPixel(T, 0, this.boxColour, 100, (O + 1), V, -1, this.settings[c].radius) } if (M != g) { for (var S = (O + 1); S < L; S++) { if (this.settings.antiAlias) { if (this.backgroundImage != "") { var K = (pixelFraction(T, S, M) * 100); if (K < 30) { this.drawPixel(T, S, this.borderColour, 100, 1, V, 0, this.settings[c].radius) } else { this.drawPixel(T, S, this.borderColour, 100, 1, V, -1, this.settings[c].radius) } } else { var b = BlendColour(this.boxColour, this.borderColour, pixelFraction(T, S, M)); this.drawPixel(T, S, b, 100, 1, V, 0, this.settings[c].radius, c) } } } if (this.settings.antiAlias) { if (J >= L) { if (L == -1) { L = 0 } this.drawPixel(T, L, this.borderColour, 100, (J - L + 1), V, 0, 0) } } else { if (J >= O) { this.drawPixel(T, (O + 1), this.borderColour, 100, (J - O), V, 0, 0) } } var Q = this.borderColour } else { var Q = this.boxColour; var J = O } if (this.settings.antiAlias) { for (var S = (J + 1); S < I; S++) { this.drawPixel(T, S, Q, (pixelFraction(T, S, g) * 100), 1, V, ((this.borderWidth > 0) ? 0 : -1), this.settings[c].radius) } } } this.masterCorners[this.settings[c].radius] = V.cloneNode(true) } if (c != "br") { for (var Z = 0, f = V.childNodes.length; Z < f; Z++) { var U = V.childNodes[Z]; var e = parseInt(U.style.top.substring(0, U.style.top.indexOf("px"))); var m = parseInt(U.style.left.substring(0, U.style.left.indexOf("px"))); var o = parseInt(U.style.height.substring(0, U.style.height.indexOf("px"))); if (c == "tl" || c == "bl") { U.style.left = this.settings[c].radius - m - 1 + "px" } if (c == "tr" || c == "tl") { U.style.top = this.settings[c].radius - o - e + "px" } switch (c) { case "tr": U.style.backgroundPosition = "-" + Math.abs((this.boxWidth - this.settings[c].radius + this.borderWidth) + m) + "px -" + Math.abs(this.settings[c].radius - o - e - this.borderWidth) + "px"; break; case "tl": U.style.backgroundPosition = "-" + Math.abs((this.settings[c].radius - m - 1) - this.borderWidth) + "px -" + Math.abs(this.settings[c].radius - o - e - this.borderWidth) + "px"; break; case "bl": U.style.backgroundPosition = "-" + Math.abs((this.settings[c].radius - m - 1) - this.borderWidth) + "px -" + Math.abs((this.boxHeight + this.settings[c].radius + e) - this.borderWidth) + "px"; break } } } } if (V) { switch (c) { case "tl": if (V.style.position == "absolute") { V.style.top = "0px" } if (V.style.position == "absolute") { V.style.left = "0px" } if (this.topContainer) { this.topContainer.appendChild(V) } break; case "tr": if (V.style.position == "absolute") { V.style.top = "0px" } if (V.style.position == "absolute") { V.style.right = "0px" } if (this.topContainer) { this.topContainer.appendChild(V) } break; case "bl": if (V.style.position == "absolute") { V.style.bottom = "0px" } if (V.style.position == "absolute") { V.style.left = "0px" } if (this.bottomContainer) { this.bottomContainer.appendChild(V) } break; case "br": if (V.style.position == "absolute") { V.style.bottom = "0px" } if (V.style.position == "absolute") { V.style.right = "0px" } if (this.bottomContainer) { this.bottomContainer.appendChild(V) } break } } } } var Y = new Array(); Y.t = Math.abs(this.settings.tl.radius - this.settings.tr.radius); Y.b = Math.abs(this.settings.bl.radius - this.settings.br.radius); for (z in Y) { if (z == "t" || z == "b") { if (Y[z]) { var l = ((this.settings[z + "l"].radius < this.settings[z + "r"].radius) ? z + "l" : z + "r"); var N = document.createElement("DIV"); N.style.height = Y[z] + "px"; N.style.width = this.settings[l].radius + "px"; N.style.position = "absolute"; N.style.fontSize = "1px"; N.style.overflow = "hidden"; N.style.backgroundColor = this.boxColour; switch (l) { case "tl": N.style.bottom = "0px"; N.style.left = "0px"; N.style.borderLeft = this.borderString; this.topContainer.appendChild(N); break; case "tr": N.style.bottom = "0px"; N.style.right = "0px"; N.style.borderRight = this.borderString; this.topContainer.appendChild(N); break; case "bl": N.style.top = "0px"; N.style.left = "0px"; N.style.borderLeft = this.borderString; this.bottomContainer.appendChild(N); break; case "br": N.style.top = "0px"; N.style.right = "0px"; N.style.borderRight = this.borderString; this.bottomContainer.appendChild(N); break } } var P = document.createElement("DIV"); P.style.position = "relative"; P.style.fontSize = "1px"; P.style.overflow = "hidden"; P.style.backgroundColor = this.boxColour; P.style.backgroundImage = this.backgroundImage; switch (z) { case "t": if (this.topContainer) { if (this.settings.tl.radius && this.settings.tr.radius) { P.style.height = R - this.borderWidth + "px"; P.style.marginLeft = this.settings.tl.radius - this.borderWidth + "px"; P.style.marginRight = this.settings.tr.radius - this.borderWidth + "px"; P.style.borderTop = this.borderString; if (this.backgroundImage != "") { P.style.backgroundPosition = "-" + (R - this.borderWidth) + "px 0px" } this.topContainer.appendChild(P) } this.box.style.backgroundPosition = "0px -" + (R - this.borderWidth) + "px" } break; case "b": if (this.bottomContainer) { if (this.settings.bl.radius && this.settings.br.radius) { P.style.height = X - this.borderWidth + "px"; P.style.marginLeft = this.settings.bl.radius - this.borderWidth + "px"; P.style.marginRight = this.settings.br.radius - this.borderWidth + "px"; P.style.borderBottom = this.borderString; if (this.backgroundImage != "") { P.style.backgroundPosition = "-" + (X - this.borderWidth) + "px -" + (this.boxHeight + (R - this.borderWidth)) + "px" } this.bottomContainer.appendChild(P) } } break } } } if (this.settings.autoPad == true && this.boxPadding > 0) { var a = document.createElement("DIV"); a.style.position = "relative"; a.innerHTML = this.boxContent; a.className = "autoPadDiv"; var n = Math.abs(R - this.boxPadding); var p = Math.abs(X - this.boxPadding); if (R < this.boxPadding) { a.style.paddingTop = n + "px" } if (X < this.boxPadding) { a.style.paddingBottom = X + "px" } a.style.paddingLeft = this.boxPadding + "px"; a.style.paddingRight = this.boxPadding + "px"; this.contentDIV = this.box.appendChild(a) } }; this.drawPixel = function(R, O, I, N, P, Q, K, M) { var J = document.createElement("DIV"); J.style.height = P + "px"; J.style.width = "1px"; J.style.position = "absolute"; J.style.fontSize = "1px"; J.style.overflow = "hidden"; var L = Math.max(this.settings.tr.radius, this.settings.tl.radius); if (K == -1 && this.backgroundImage != "") { J.style.backgroundImage = this.backgroundImage; J.style.backgroundPosition = "-" + (this.boxWidth - (M - R) + this.borderWidth) + "px -" + ((this.boxHeight + L + O) - this.borderWidth) + "px" } else { J.style.backgroundColor = I } if (N != 100) { setOpacity(J, N) } J.style.top = O + "px"; J.style.left = R + "px"; Q.appendChild(J) } } function insertAfter(B, C, A) { B.insertBefore(C, A.nextSibling) } function BlendColour(L, J, G) { var D = parseInt(L.substr(1, 2), 16); var K = parseInt(L.substr(3, 2), 16); var F = parseInt(L.substr(5, 2), 16); var C = parseInt(J.substr(1, 2), 16); var I = parseInt(J.substr(3, 2), 16); var E = parseInt(J.substr(5, 2), 16); if (G > 1 || G < 0) { G = 1 } var H = Math.round((D * G) + (C * (1 - G))); if (H > 255) { H = 255 } if (H < 0) { H = 0 } var B = Math.round((K * G) + (I * (1 - G))); if (B > 255) { B = 255 } if (B < 0) { B = 0 } var A = Math.round((F * G) + (E * (1 - G))); if (A > 255) { A = 255 } if (A < 0) { A = 0 } return "#" + IntToHex(H) + IntToHex(B) + IntToHex(A) } function IntToHex(A) { base = A / 16; rem = A % 16; base = base - (rem / 16); baseS = MakeHex(base); remS = MakeHex(rem); return baseS + "" + remS } function MakeHex(A) { if ((A >= 0) && (A <= 9)) { return A } else { switch (A) { case 10: return "A"; case 11: return "B"; case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F" } } } function pixelFraction(H, G, A) { var C = 0; var B = new Array(1); var F = new Array(1); var I = 0; var D = ""; var E = Math.sqrt((Math.pow(A, 2) - Math.pow(H, 2))); if ((E >= G) && (E < (G + 1))) { D = "Left"; B[I] = 0; F[I] = E - G; I = I + 1 } var E = Math.sqrt((Math.pow(A, 2) - Math.pow(G + 1, 2))); if ((E >= H) && (E < (H + 1))) { D = D + "Top"; B[I] = E - H; F[I] = 1; I = I + 1 } var E = Math.sqrt((Math.pow(A, 2) - Math.pow(H + 1, 2))); if ((E >= G) && (E < (G + 1))) { D = D + "Right"; B[I] = 1; F[I] = E - G; I = I + 1 } var E = Math.sqrt((Math.pow(A, 2) - Math.pow(G, 2))); if ((E >= H) && (E < (H + 1))) { D = D + "Bottom"; B[I] = E - H; F[I] = 0 } switch (D) { case "LeftRight": C = Math.min(F[0], F[1]) + ((Math.max(F[0], F[1]) - Math.min(F[0], F[1])) / 2); break; case "TopRight": C = 1 - (((1 - B[0]) * (1 - F[1])) / 2); break; case "TopBottom": C = Math.min(B[0], B[1]) + ((Math.max(B[0], B[1]) - Math.min(B[0], B[1])) / 2); break; case "LeftBottom": C = (F[0] * B[1]) / 2; break; default: C = 1 } return C } function rgb2Hex(B) { try { var C = rgb2Array(B); var G = parseInt(C[0]); var E = parseInt(C[1]); var A = parseInt(C[2]); var D = "#" + IntToHex(G) + IntToHex(E) + IntToHex(A) } catch (F) { alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex") } return D } function rgb2Array(A) { var C = A.substring(4, A.indexOf(")")); var B = C.split(", "); return B } function setOpacity(F, C) { C = (C == 100) ? 99.999 : C; if (isSafari && F.tagName != "IFRAME") { var B = rgb2Array(F.style.backgroundColor); var E = parseInt(B[0]); var D = parseInt(B[1]); var A = parseInt(B[2]); F.style.backgroundColor = "rgba(" + E + ", " + D + ", " + A + ", " + C / 100 + ")" } else { if (typeof (F.style.opacity) != "undefined") { F.style.opacity = C / 100 } else { if (typeof (F.style.MozOpacity) != "undefined") { F.style.MozOpacity = C / 100 } else { if (typeof (F.style.filter) != "undefined") { F.style.filter = "alpha(opacity:" + C + ")" } else { if (typeof (F.style.KHTMLOpacity) != "undefined") { F.style.KHTMLOpacity = C / 100 } } } } } } function inArray(C, B) { for (var A = 0; A < C.length; A++) { if (C[A] === B) { return A } } return false } function inArrayKey(B, A) { for (key in B) { if (key === A) { return true } } return false } function addEvent(E, D, B, A) { if (E.addEventListener) { E.addEventListener(D, B, A); return true } else { if (E.attachEvent) { var C = E.attachEvent("on" + D, B); return C } else { E["on" + D] = B } } } function removeEvent(E, D, B, A) { if (E.removeEventListener) { E.removeEventListener(D, B, A); return true } else { if (E.detachEvent) { var C = E.detachEvent("on" + D, B); return C } else { alert("Handler could not be removed") } } } function format_colour(B) { var A = "#ffffff"; if (B != "" && B != "transparent") { if (B.substr(0, 3) == "rgb") { A = rgb2Hex(B) } else { if (B.length == 4) { A = "#" + B.substring(1, 2) + B.substring(1, 2) + B.substring(2, 3) + B.substring(2, 3) + B.substring(3, 4) + B.substring(3, 4) } else { A = B } } } return A } function get_style(obj, property, propertyNS) { try { if (obj.currentStyle) { var returnVal = eval("obj.currentStyle." + property) } else { if (isSafari && obj.style.display == "none") { obj.style.display = ""; var wasHidden = true } var returnVal = document.defaultView.getComputedStyle(obj, "").getPropertyValue(propertyNS); if (isSafari && wasHidden) { obj.style.display = "none" } } } catch (e) { } return returnVal } function getElementsByClass(G, E, A) { var D = new Array(); if (E == null) { E = document } if (A == null) { A = "*" } var C = E.getElementsByTagName(A); var B = C.length; var F = new RegExp("(^|s)" + G + "(s|$)"); for (i = 0, j = 0; i < B; i++) { if (F.test(C[i].className)) { D[j] = C[i]; j++ } } return D } function newCurvyError(A) { return new Error("curvyCorners Error:\n" + A) };

//TrainingPeaks JQuery
var p;
$(document).ready(function(){
	var userAgent = navigator.userAgent.toLowerCase();
	var is_chrome = userAgent.indexOf('chrome') > -1; 
	var isIE6 = userAgent.indexOf('msie 6') != -1;
        var isMacFirefox = userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox') != -1;
	var isIPhone = userAgent.indexOf('iphone') != -1;
	//rounded corners on divs
	if (!isIE6 && !isMacFirefox)
	{	
	        settings = {
	            tl: { radius: 8 },
	            tr: { radius: 8 },
	            bl: { radius: 8 },
	            br: { radius: 8 },
	            antiAlias: true,
	            autoPad: true,
        	    validTags: ["div"]
	        }
	        var myBoxObject = new curvyCorners(settings, "wrapouter");
	        myBoxObject.applyCornersToAll();
	        //var homeBoxObject = new curvyCorners(settings, "homeActionPanels");
	        //homeBoxObject .applyCornersToAll();
	}
	else	
	{
		$("div.wrapouter").css('border', '1px solid #aaa');
		$("#logviewer div.wrapouter").css('margin-top', '1px');
	}		
	if (domain == 'support.trainingpeaks.com')
	{					  
		$('a[href^="http://www"]')
			.each(function(){  
			var linkurl = $(this).attr("href");
			var linktext = $(this).text();
			if (linkurl.toLowerCase().indexOf('trainingpeaks') == -1 && linkurl.toLowerCase().indexOf('peaksware') == -1 && linkurl.toLowerCase().indexOf('cyclingpeaks') == -1)
			{
			$(this).html('<a onclick="openwindow(&#34;' + linkurl + '&#34;);return false;" href="javascript:void()" class="external">' + linktext + '</a>');
			}
		})
	}	
       $("form#loginform").submit(function() {
          if ($("input:first").val() != "" && $(":password").val() != "") {
		return true;
	  }
	  else
	  {
          $("#loginnotification").text("Username/Password Required").css({float: 'right',width:'200px', padding: '3px', background: '#2d3953', border: '1px dotted #fff',color: '#fff'}).show().fadeOut(3500);
          return false;
	  }
          if ($("input:second").val() != "") {
		return true;
	  }
	  else
	  {
          $("#loginnotification").text("Please enter a Password").css({float: 'left',width:'170px', padding: '3px', background: '#fff', border: '1px solid #444',color: '#7c0000'}).show().fadeOut(2500);
          return false;
	  }
       });
	$('#modalvideo').jqm({ajax: '@href', trigger: 'a.jqModal',ajaxText: '<img style="margin:200px 0 0 370px;" src="https://home.trainingpeaks.com/images/loaderModal.gif" />'});
	$('#slidervideo').jqm({trigger: 'a.jqModalSlide'});
	$('#articleslist a').click(function(){
			$(this).parent().parent().find('div.articlescategorylist').toggle();
			if ($(this).attr('class') == 'opened')
				var closr = true
			$(this).parents('ul:first').find('a').removeClass('opened').end();
			   if (closr != true)
			$(this).addClass('opened');	
		});  
	$('#videoslist a').click(function(){
			$(this).parent().parent().find('div.videoscategorylist').toggle();
			if ($(this).attr('class') == 'opened')
				var closr = true
			$(this).parents('ul:first').find('a').removeClass('opened').end();
			   if (closr != true)
			$(this).addClass('opened');	
	});
	if (subdomain == 'support')
	{
		$('#navmain #mainnav-support a').addClass('active');
	}
	else
	{
		/*set active class on nav main*/
		var path = location.pathname.substring(1);
		if (path){
			if (location.pathname.indexOf("/",1) > 0)
			    $('#navmain a[@href*="' + location.pathname.substring(1,location.pathname.indexOf("/",1)) + '"]').attr('class', 'active')
			else
			    $('#navmain a[@href$="' + path + '"]').addClass('active');
			}
		else
		{
		    $('#navmain a[@href$="/"]').addClass('active');
		}
	}
	$('#homedynamic-1 > ul').tabs();
	
     //toggle for plans
     $('#wrappercontentpage .plansubheader a').click(function(){
	$(this).parent().parent().parent().find('div.plandetail').toggle();
     }); 
     $('#wrappercontentpage #trainingplansbycoach h3 a').click(function(){
	$(this).parent().parent().find('div.plansub').toggle();
     });   
     //toggle for articles
     $('#wrappercontentpage #articleslist a').click(function(){
	$(this).parent().parent().find('div.articlescategorylist').toggle();
     });   


	if (getProfileQueryString()){
        	p = getProfileQueryString();  
	}
/*
	else
	{
		var totalNum = 20; //the total number of profiles.		
		var rndNum = Math.floor(Math.random() * totalNum);
		p = $("#profiles .items a:eq(" + rndNum+ ")").attr("class");
		if (p == null ){
			p = $("#profiles .items a:first").attr("class");
		}
	}
*/
	profile = $("#profiles .items a."+p+"").attr("id");
	var alink = $("#profiles .items a."+p);	
	 					   	   
	//$(alink).addClass("on");	
        //link to the profile
	//$("#homemaininnerleft").click(function(){window.location.href = alink.find("img").attr("id");});
	//profile tool tips:
	$("#profiles ul li a div").css({display:"block", opacity:0});
	$("#profiles ul li").mouseover(function(){
		$(this).find("div").show();
		//$(this).find("a").addClass("on");
	}).mouseout(function(){
		$(this).find("div").hide();
		//$(this).find("a").removeClass("on");
	});
	$("#profiles .items a").click(function(){			   
		var profile = removeSpaces(jQuery(this).attr("id"));	
		var alink = jQuery(this);
		var tooltip = jQuery(this).attr("title");	 					   	   
		$("#profiles .items").find("a").removeClass("on");
		$(this).addClass("on");	
		$("#wrapperhomemain").load(alink.find("img").attr("id") + " div#homepagemain").show("fast");;
		//Home intro text change on profile click - load the first profile homeintro text if no text is found  
		$("#homeintro").load(alink.find("img").attr("id") + " div#homepagecontent", function() {
			var homeintroLength = $("#homeintro").html().length;   
			if (homeintroLength < 50){
			//load the first profile text - 
			$("#homeintro").load($("#profiles .items a:first").find("img").attr("id") + " div#homepagecontent");           
			}
		});
		$("#homemaininnerleft").click(function(){
			window.location.href = alink.find("img").attr("id");
		});
	});

	//Account - Purchase Management
	$('#usernameLoading').hide();
	$('.txtUserName').blur(function() {
		$('#usernameLoading').show();
      		$.post("/ajaxutils.aspx?method=CheckUserName", {        
        	username: $('.txtUserName').val()
      	}, function(response){
        $('#usernameResult').fadeOut();
        var usernamemessage;
        if (response == 1)
        {
             usernamemessage = 'Sorry, this Username is in use.'; 
            $('#usernameResult').removeClass("available");  
            $('#usernameResult').addClass("unavailable");  
        }                     
        else
        {
            usernamemessage = '';
            $('#usernameResult').removeClass("unavailable");              
            $('#usernameResult').addClass("available");
        }
        setTimeout("finishAjax('usernameResult', '"+escape(usernamemessage)+"')", 400);
      });
    	return false;
	});

	$('div.plansub .plansubheader .planexpander').click(function(){
	$(this).parent().parent().find('div.plandetail').toggle();
        if ($(this).find('span.plantitle a').attr('class') == 'opened')
		$(this).find('span.plantitle a').removeClass('opened');
	else
		$(this).find('span.plantitle a').addClass('opened');	
     	}); 
	$('a#plandetailcollapse').click(function(){
		$('div.plandetail').css('display', 'none');
		$('div#plansearchwrapper').find('span.plantitle a').removeClass('opened');
		$('a#plandetailexpand').text('Expand all Plan Details');
		$('a#plandetailcollapse').text('');	
	});
	$('a#plandetailexpand').click(function(){
		$('div.plandetail').css('display', 'block');
		$('div#plansearchwrapper').find('span.plantitle a').addClass('opened');	
		$('a#plandetailexpand').text('');
		$('a#plandetailcollapse').text('Collapse all Plan Details');
	});

//libraries - todo: combine with above and use parent selector
$('div.librarysub .librarysubheader .libraryexpander').click(function(){
$(this).parent().parent().find('div.librarydetail').toggle();
       if ($(this).find('span.librarytitle a').attr('class') == 'opened')
	$(this).find('span.librarytitle a').removeClass('opened');
else
	$(this).find('span.librarytitle a').addClass('opened');	
    	}); 
$('a#librarydetailcollapse').click(function(){
	$('div.librarydetail').css('display', 'none');
	$('div#librarysearchwrapper').find('span.librarytitle a').removeClass('opened');
	$('a#librarydetailexpand').text('Expand all library Details');
	$('a#librarydetailcollapse').text('');	
});
$('a#librarydetailexpand').click(function(){
	$('div.librarydetail').css('display', 'block');
	$('div#librarysearchwrapper').find('span.librarytitle a').addClass('opened');	
	$('a#librarydetailexpand').text('');
	$('a#librarydetailcollapse').text('Collapse all library Details');
});

	//plan preview
	$('div.plansub .plansubheader .expand').click(function() {
	    $(this).parent().parent().parent().find('.plansubheader').css('background', '');
	    $(this).parent().parent().find('.plansubheader').css('background', '#eee8ab');
	});
	$('div.plansub .plandetail .expand').click(function() {
   	 $(this).parent().parent().parent().find('.plansubheader').css('background', '');
   	    $(this).parent().parent().find('.plansubheader').css('background', '#eee8ab');
   	});
    
    //temp fix for www.trainingpeaks.com/ui/public/plans.aspx - until the file can be changed on server
    $("a.buyplan[href^='https://www']")
    .each(function() {
       this.href = this.href.replace(/^https:\/\/www\.trainingpeaks\.com/,
         "https://home.trainingpeaks.com");
    });
   
 });

 
function openwindow(linkurl){
		window.open(linkurl,'','location=yes,resizable=yes,status=yes,width=850,height=600,left='+(screen.availWidth/2-425)+',top='+(screen.availHeight/2-300)+'');	
	}
function finishAjax(id, response) {
  $('#usernameLoading').hide();
  $('#'+id).html(unescape(response));
  $('#'+id).fadeIn();
} //finishAjax
// Focus first element
$.fn.focus_first = function() {
  var elem = $('input:visible', this).get(0);
  var select = $('select:visible', this).get(0);
  if (select && elem) {
    if (select.offsetTop < elem.offsetTop) {
      elem = select;
    }
  }
  var textarea = $('textarea:visible', this).get(0);
  if (textarea && elem) {
    if (textarea.offsetTop < elem.offsetTop) {
      elem = textarea;
    }
  }
  if (elem) {
    elem.focus();
  }
  return this;
}
function removeSpaces(string) {
	var tstring = "";
	string = '' + string;
	splitstring = string.split(" ");
	for(i = 0; i < splitstring.length; i++)
	tstring += splitstring[i];
	return tstring;
}
function getProfileQueryString()
{
 var querystring = new Array;
 var q = String (document.location).split ('p=')[1];
 if (!q) 
	return false;
 else
 	q = String (q).split ('&')[0];
 return q;
}

//###################################################
//################ Mobile Detect
//###################################################

var deviceS60 = "series60";
var deviceSymbian = "symbian";
var deviceIPhone = "iphone";
var engineWebKit = "webkit";
var deviceAndroid = "android";
var deviceWinMob = "windows ce";
var deviceBB = "blackberry";
var devicePalm = "palm";
var FireFox = "firefox";
var ie = "ie";
var uagent = navigator.userAgent.toLowerCase();

function DetectFireFox() {
    if (uagent.search(FireFox) > -1)
        return true;
    else
        return false;
}
function DetectIE() {
    if (uagent.search(ie) > -1)
        return true;
    else
        return false;
}
function DetectIPhone() {
    if (uagent.search(deviceIPhone) > -1)
        return true;
    else
        return false;
}


function DetectS60OssBrowser() {
    if (uagent.search(engineWebKit) > -1) {
        if ((uagent.search(deviceS60) > -1 ||
          uagent.search(deviceSymbian) > -1))
            return true;
        else
            return false;
    }
    else
        return false;
}
function DetectAndroid() {
    if (uagent.search(deviceAndroid) > -1)
        return true;
    else
        return false;
}
function DetectAndroidWebKit() {
    if (DetectAndroid()) {
        if (DetectWebkit())
            return true;
        else
            return false;
    }
    else
        return false;
}
function DetectWindowsMobile() {
    if (uagent.search(deviceWinMob) > -1)
        return true;
    else
        return false;
}
function DetectBlackBerry() {
    if (uagent.search(deviceBB) > -1)
        return true;
    else
        return false;
}
function DetectPalmOS() {
    if (uagent.search(devicePalm) > -1)
        return true;
    else
        return false;
}
function DetectMobile() {
    if (DetectS60OssBrowser())
        return true;
    else if (DetectAndroidWebKit())
        return true;
    else if (DetectWindowsMobile())
        return true;
    else if (DetectBlackBerry())
        return true;
    else if (DetectPalmOS())
        return true;
    else if (DetectIPhone())
        return true;
    else
        return false;
}