
var dateFormat=function(){var token=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,timezone=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,timezoneClip=/[^-+\dA-Z]/g,pad=function(val,len){val=String(val);len=len||2;while(val.length<len)val="0"+val;return val;};return function(date,mask,utc){var dF=dateFormat;if(arguments.length==1&&(typeof date=="string"||date instanceof String)&&!/\d/.test(date)){mask=date;date=undefined;}
date=date?new Date(date):new Date();if(isNaN(date))throw new SyntaxError("invalid date");mask=String(dF.masks[mask]||mask||dF.masks["default"]);if(mask.slice(0,4)=="UTC:"){mask=mask.slice(4);utc=true;}
var _=utc?"getUTC":"get",d=date[_+"Date"](),D=date[_+"Day"](),m=date[_+"Month"](),y=date[_+"FullYear"](),H=date[_+"Hours"](),M=date[_+"Minutes"](),s=date[_+"Seconds"](),L=date[_+"Milliseconds"](),o=utc?0:date.getTimezoneOffset(),flags={d:d,dd:pad(d),ddd:dF.i18n.dayNames[D],dddd:dF.i18n.dayNames[D+7],m:m+1,mm:pad(m+1),mmm:dF.i18n.monthNames[m],mmmm:dF.i18n.monthNames[m+12],yy:String(y).slice(2),yyyy:y,h:H%12||12,hh:pad(H%12||12),H:H,HH:pad(H),M:M,MM:pad(M),s:s,ss:pad(s),l:pad(L,3),L:pad(L>99?Math.round(L/10):L),t:H<12?"a":"p",tt:H<12?"am":"pm",T:H<12?"A":"P",TT:H<12?"AM":"PM",Z:utc?"UTC":(String(date).match(timezone)||[""]).pop().replace(timezoneClip,""),o:(o>0?"-":"+")+pad(Math.floor(Math.abs(o)/60)*100+Math.abs(o)%60,4),S:["th","st","nd","rd"][d%10>3?0:(d%100-d%10!=10)*d%10]};return mask.replace(token,function($0){return $0 in flags?flags[$0]:$0.slice(1,$0.length-1);});};}();dateFormat.masks={"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};dateFormat.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};Date.prototype.format=function(mask,utc){return dateFormat(this,mask,utc);};
Date.dayNames=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];Date.abbrDayNames=['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];Date.monthNames=['January','February','March','April','May','June','July','August','September','October','November','December'];Date.abbrMonthNames=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];Date.firstDayOfWeek=1;Date.format='dd/mm/yyyy';Date.fullYearStart='20';(function(){function add(name,method){if(!Date.prototype[name]){Date.prototype[name]=method;}};add("isLeapYear",function(){var y=this.getFullYear();return(y%4==0&&y%100!=0)||y%400==0;});add("isWeekend",function(){return this.getDay()==0||this.getDay()==6;});add("isWeekDay",function(){return!this.isWeekend();});add("getDaysInMonth",function(){return[31,(this.isLeapYear()?29:28),31,30,31,30,31,31,30,31,30,31][this.getMonth()];});add("getDayName",function(abbreviated){return abbreviated?Date.abbrDayNames[this.getDay()]:Date.dayNames[this.getDay()];});add("getMonthName",function(abbreviated){return abbreviated?Date.abbrMonthNames[this.getMonth()]:Date.monthNames[this.getMonth()];});add("getDayOfYear",function(){var tmpdtm=new Date("1/1/"+this.getFullYear());return Math.floor((this.getTime()-tmpdtm.getTime())/86400000);});add("getWeekOfYear",function(){return Math.ceil(this.getDayOfYear()/7);});add("setDayOfYear",function(day){this.setMonth(0);this.setDate(day);return this;});add("addYears",function(num){this.setFullYear(this.getFullYear()+num);return this;});add("addMonths",function(num){var tmpdtm=this.getDate();this.setMonth(this.getMonth()+num);if(tmpdtm>this.getDate())
this.addDays(-this.getDate());return this;});add("addDays",function(num){this.setDate(this.getDate()+num);return this;});add("addHours",function(num){this.setHours(this.getHours()+num);return this;});add("addMinutes",function(num){this.setMinutes(this.getMinutes()+num);return this;});add("addSeconds",function(num){this.setSeconds(this.getSeconds()+num);return this;});add("zeroTime",function(){this.setMilliseconds(0);this.setSeconds(0);this.setMinutes(0);this.setHours(0);return this;});add("asString",function(format){var r=format||Date.format;return r.split('yyyy').join(this.getFullYear()).split('yy').join((this.getFullYear()+'').substring(2)).split('mmmm').join(this.getMonthName(false)).split('mmm').join(this.getMonthName(true)).split('mm').join(_zeroPad(this.getMonth()+1)).split('dd').join(_zeroPad(this.getDate())).split('d').join(this.getDate());});Date.fromString=function(s)
{var f=Date.format;var d=new Date('01/01/1977');var mLength=0;var iM=f.indexOf('mmmm');if(iM>-1){for(var i=0;i<Date.monthNames.length;i++){var mStr=s.substr(iM,Date.monthNames[i].length);if(Date.monthNames[i]==mStr){mLength=Date.monthNames[i].length-4;break;}}
d.setMonth(i);}else{iM=f.indexOf('mmm');if(iM>-1){var mStr=s.substr(iM,3);for(var i=0;i<Date.abbrMonthNames.length;i++){if(Date.abbrMonthNames[i]==mStr)break;}
d.setMonth(i);}else{d.setMonth(Number(s.substr(f.indexOf('mm'),2))-1);}}
var iY=f.indexOf('yyyy');if(iY>-1){if(iM<iY)
{iY+=mLength;}
d.setFullYear(Number(s.substr(iY,4)));}else{if(iM<iY)
{iY+=mLength;}
d.setFullYear(Number(Date.fullYearStart+s.substr(f.indexOf('yy'),2)));}
var iD=f.indexOf('dd');if(iM<iD)
{iD+=mLength;}
d.setDate(Number(s.substr(iD,2)));if(isNaN(d.getTime())){return false;}
return d;};var _zeroPad=function(num){var s='0'+num;return s.substring(s.length-2)};})();
(function($){$.fn.jpassword=function(settings){var jElements=this;var settings=$.extend({},$.fn.jpassword.defaults,settings);var template='<div class="jpassword"><div class="jpassword-info">&nbsp;</div></div>';return jElements.each(function(){if($(jElements).is("input")){jPassword($(jElements));}});function jPassword(jInput){var unikId="jpassword_"+parseInt(Math.random()*1000);var jTooltip=$(template).attr("id",unikId);if(settings.flat==false){var pos=jInput.offset();var win=getWindow();var dir="right";var top=pos.top;var left=(pos.left+jInput.width());$("#passworthStrengthMessage").append(jTooltip);if((left+jTooltip.width())>(win.left+win.width)){left-=(jTooltip.width()+jInput.width());dir="left";}
if((top+jTooltip.height())>(win.top+win.height)){top-=(jTooltip.height()-(jInput.height()*1.5));dir+="bottom";}else{dir+="top";}
jTooltip.css("display","none");}else{jTooltip.insertAfter(jInput);jTooltip.css({position:"relative",display:"block"});jTooltip.addClass("jpassword-flat");}
jInput.bind("keyup",function(e){verifPsw(jInput,jTooltip);});jInput.bind("focus",function(e){verifPsw(jInput,jTooltip);if(settings.flat==false){tooltip(jTooltip,"show");}
if($.isFunction(settings.onShow)){settings.onShow(jInput,jTooltip);}});jInput.bind("blur",function(e){if(settings.flat==false){tooltip(jTooltip,"hide");}
if($.isFunction(settings.onHide)){settings.onHide(jInput,jTooltip);}});var jGenerate=$("#"+settings.generate);if(jGenerate){jGenerate.bind("click",function(e){jInput.val(newPsw());verifPsw(jInput,jTooltip);return false;});}
if($.isFunction(settings.onComplete)){settings.onComplete(jInput,jTooltip);}}
function verifPsw(jInput,jTooltip){var val=jInput.val();var meter=jTooltip.find(".jpassword-meter");var info=jTooltip.find(".jpassword-info");var psw=securPsw(val);var msg="";if(psw.lowercase<2){msg=settings.lang.lowercase;}else if(psw.uppercase<2){msg=settings.lang.uppercase;}else if(psw.number<2){msg=settings.lang.number;}else if(psw.punctuation<2){msg=settings.lang.punctuation;}else if(psw.special<2){msg=settings.lang.special;}
if(val.length<settings.length&&psw.level<10&&msg==""){msg=settings.lang.length.replace(/-X-/g,settings.length);}
if(psw.val==""){meter.css("background-position","0 0");info.html(settings.lang.please);}else if(psw.level<5){meter.css("background-position","0 -10px");info.html(settings.lang.low+" "+msg);}else if(psw.level<10){meter.css("background-position","0 -20px");info.html(settings.lang.correct+" "+msg);}else{meter.css("background-position","0 -30px");info.html(settings.lang.high);}
jInput.val(psw.val);if($.isFunction(settings.onKeyup)){settings.onKeyup(jInput);}}
function securPsw(val){val=val.replace(/(^\s+)|(\s+$)/g,"");var cNbr=cCap=cMin=cPct=cSpe=1;var len=val.length;for(var c=0;c<len;c++){var char=val.charCodeAt(c);if(char<128){if(char>47&&char<58){cNbr+=1;}else if(char>64&&char<91){cCap+=1;}else if(char>96&&char<123){cMin+=1;}else{cPct+=2;}}else{cSpe+=3;}}
var lPsw=(cNbr*cCap*cMin*cPct*cSpe);lPsw=Math.round(Math.log((lPsw*lPsw)));return{val:val,level:lPsw,number:cNbr,uppercase:cCap,lowercase:cMin,punctuation:cPct,special:cSpe};}
function newPsw(){var val="";for(c=0;c<settings.length;c++){var char=Math.round(32+Math.random()*222);var ok=0;if((char>47&&char<58)||(char>64&&char<91)||(char>96&&char<123)){ok=1;}
if(settings.type==1&&char<127){ok=1;}
if(settings.type==2){ok=1;}
if(settings.special&&(char==48||char==49||char==50||char==53||char==54||char==56||char==57||char==66||char==67||char==68||char==71||char==73||char==75||char==79||char==80||char==81||char==83||char==85||char==86||char==87||char==88||char==90||char==99||char==104||char==105||char==107||char==108||char==111||char==112||char==113||char==115||char==117||char==118||char==119||char==120||char==122)){ok=0;}
if(ok==1){val+=String.fromCharCode(char);}else{c--;}}
return val;}
function tooltip(jTooltip,effect){if(effect=="show"){jTooltip.slideDown();}else{jTooltip.slideUp();}}
function getWindow(){var m=document.compatMode=="CSS1Compat";return{left:(window.pageXOffset||(m?document.documentElement.scrollLeft:document.body.scrollLeft)),top:(window.pageYOffset||(m?document.documentElement.scrollTop:document.body.scrollTop)),width:(window.innerWidth||(m?document.documentElement.clientWidth:document.body.clientWidth)),height:(window.innerHeight||(m?document.documentElement.clientHeight:document.body.clientHeight))};}};$.fn.jpassword.defaults={lang:{please:"Enter password above",low:"Weak password:",correct:"Secure password.",high:"Strong password.",length:"Must meet or exceed -X- characters",number:"",uppercase:"",lowercase:"",punctuation:"",special:""},length:8,flat:false,type:0,special:0,generate:null,onShow:function(){},onHide:function(){},onKeyup:function(){},onComplete:function(){}};})(jQuery);
(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+
(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)
this.insertBefore(document.createElement(html),this.firstChild);});}
return this;};})(jQuery);;(function($){if(/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery)||/^1.1/.test($.fn.jquery)){alert('blockUI requires jQuery v1.2.3 or later!  You are using v'+$.fn.jquery);return;}
$.fn._fadeIn=$.fn.fadeIn;var mode=document.documentMode||0;var setExpr=$.browser.msie&&(($.browser.version<8&&!mode)||mode<8);var ie6=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!mode;$.blockUI=function(opts){install(window,opts);};$.unblockUI=function(opts){remove(window,opts);};$.growlUI=function(title,message,timeout,onClose){var $m=$('<div class="growlUI"></div>');if(title)$m.append('<h1>'+title+'</h1>');if(message)$m.append('<h2>'+message+'</h2>');if(timeout==undefined)timeout=3000;$.blockUI({message:$m,fadeIn:700,fadeOut:1000,centerY:false,timeout:timeout,showOverlay:false,onUnblock:onClose,css:$.blockUI.defaults.growlCSS});};$.fn.block=function(opts){return this.unblock({fadeOut:0}).each(function(){if($.css(this,'position')=='static')
this.style.position='relative';if($.browser.msie)
this.style.zoom=1;install(this,opts);});};$.fn.unblock=function(opts){return this.each(function(){remove(this,opts);});};$.blockUI.version=2.28;$.blockUI.defaults={message:'<h1>Please wait...</h1>',title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:'30%',top:'40%',left:'35%',textAlign:'center',color:'#000',border:'3px solid #aaa',backgroundColor:'#fff',cursor:'wait'},themedCSS:{width:'30%',top:'40%',left:'35%'},overlayCSS:{backgroundColor:'#000',opacity:0.6,cursor:'wait'},growlCSS:{width:'350px',top:'10px',left:'',right:'10px',border:'none',padding:'5px',opacity:0.6,cursor:'default',color:'#fff',backgroundColor:'#000','-webkit-border-radius':'10px','-moz-border-radius':'10px'},iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank',forceIframe:false,baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onUnblock:null,quirksmodeOffsetHack:4};var pageBlock=null;var pageBlockEls=[];function install(el,opts){var full=(el==window);var msg=opts&&opts.message!==undefined?opts.message:undefined;opts=$.extend({},$.blockUI.defaults,opts||{});opts.overlayCSS=$.extend({},$.blockUI.defaults.overlayCSS,opts.overlayCSS||{});var css=$.extend({},$.blockUI.defaults.css,opts.css||{});var themedCSS=$.extend({},$.blockUI.defaults.themedCSS,opts.themedCSS||{});msg=msg===undefined?opts.message:msg;if(full&&pageBlock)
remove(window,{fadeOut:0});if(msg&&typeof msg!='string'&&(msg.parentNode||msg.jquery)){var node=msg.jquery?msg[0]:msg;var data={};$(el).data('blockUI.history',data);data.el=node;data.parent=node.parentNode;data.display=node.style.display;data.position=node.style.position;if(data.parent)
data.parent.removeChild(node);}
var z=opts.baseZ;var lyr1=($.browser.msie||opts.forceIframe)?$('<iframe class="blockUI" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>'):$('<div class="blockUI" style="display:none"></div>');var lyr2=$('<div class="blockUI blockOverlay" style="z-index:'+(z++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var lyr3;if(opts.theme&&full){var s='<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:fixed">'+'<div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(opts.title||'&nbsp;')+'</div>'+'<div class="ui-widget-content ui-dialog-content"></div>'+'</div>';lyr3=$(s);}
else{lyr3=full?$('<div class="blockUI blockMsg blockPage" style="z-index:'+z+';display:none;position:fixed"></div>'):$('<div class="blockUI blockMsg blockElement" style="z-index:'+z+';display:none;position:absolute"></div>');}
if(msg){if(opts.theme){lyr3.css(themedCSS);lyr3.addClass('ui-widget-content');}
else
lyr3.css(css);}
if(!opts.applyPlatformOpacityRules||!($.browser.mozilla&&/Linux/.test(navigator.platform)))
lyr2.css(opts.overlayCSS);lyr2.css('position',full?'fixed':'absolute');if($.browser.msie||opts.forceIframe)
lyr1.css('opacity',0.0);$([lyr1[0],lyr2[0],lyr3[0]]).appendTo(full?'body':el);if(opts.theme&&opts.draggable&&$.fn.draggable){lyr3.draggable({handle:'.ui-dialog-titlebar',cancel:'li'});}
var expr=setExpr&&(!$.boxModel||$('object,embed',full?null:el).length>0);if(ie6||expr){if(full&&opts.allowBodyStretch&&$.boxModel)
$('html,body').css('height','100%');if((ie6||!$.boxModel)&&!full){var t=sz(el,'borderTopWidth'),l=sz(el,'borderLeftWidth');var fixT=t?'(0 - '+t+')':0;var fixL=l?'(0 - '+l+')':0;}
$.each([lyr1,lyr2,lyr3],function(i,o){var s=o[0].style;s.position='absolute';if(i<2){full?s.setExpression('height','Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:'+opts.quirksmodeOffsetHack+') + "px"'):s.setExpression('height','this.parentNode.offsetHeight + "px"');full?s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):s.setExpression('width','this.parentNode.offsetWidth + "px"');if(fixL)s.setExpression('left',fixL);if(fixT)s.setExpression('top',fixT);}
else if(opts.centerY){if(full)s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');s.marginTop=0;}
else if(!opts.centerY&&full){var top=(opts.css&&opts.css.top)?parseInt(opts.css.top):0;var expression='((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"';s.setExpression('top',expression);}});}
if(msg){if(opts.theme)
lyr3.find('.ui-widget-content').append(msg);else
lyr3.append(msg);if(msg.jquery||msg.nodeType)
$(msg).show();}
if(($.browser.msie||opts.forceIframe)&&opts.showOverlay)
lyr1.show();if(opts.fadeIn){if(opts.showOverlay)
lyr2._fadeIn(opts.fadeIn);if(msg)
lyr3.fadeIn(opts.fadeIn);}
else{if(opts.showOverlay)
lyr2.show();if(msg)
lyr3.show();}
bind(1,el,opts);if(full){pageBlock=lyr3[0];pageBlockEls=$(':input:enabled:visible',pageBlock);if(opts.focusInput)
setTimeout(focus,20);}
else
center(lyr3[0],opts.centerX,opts.centerY);if(opts.timeout){var to=setTimeout(function(){full?$.unblockUI(opts):$(el).unblock(opts);},opts.timeout);$(el).data('blockUI.timeout',to);}};function remove(el,opts){var full=(el==window);var $el=$(el);var data=$el.data('blockUI.history');var to=$el.data('blockUI.timeout');if(to){clearTimeout(to);$el.removeData('blockUI.timeout');}
opts=$.extend({},$.blockUI.defaults,opts||{});bind(0,el,opts);var els;if(full)
els=$('body').children().filter('.blockUI').add('body > .blockUI');else
els=$('.blockUI',el);if(full)
pageBlock=pageBlockEls=null;if(opts.fadeOut){els.fadeOut(opts.fadeOut);setTimeout(function(){reset(els,data,opts,el);},opts.fadeOut);}
else
reset(els,data,opts,el);};function reset(els,data,opts,el){els.each(function(i,o){if(this.parentNode)
this.parentNode.removeChild(this);});if(data&&data.el){data.el.style.display=data.display;data.el.style.position=data.position;if(data.parent)
data.parent.appendChild(data.el);$(el).removeData('blockUI.history');}
if(typeof opts.onUnblock=='function')
opts.onUnblock(el,opts);};function bind(b,el,opts){var full=el==window,$el=$(el);if(!b&&(full&&!pageBlock||!full&&!$el.data('blockUI.isBlocked')))
return;if(!full)
$el.data('blockUI.isBlocked',b);if(!opts.bindEvents||(b&&!opts.showOverlay))
return;var events='mousedown mouseup keydown keypress';b?$(document).bind(events,opts,handler):$(document).unbind(events,handler);};function handler(e){if(e.keyCode&&e.keyCode==9){if(pageBlock&&e.data.constrainTabKey){var els=pageBlockEls;var fwd=!e.shiftKey&&e.target==els[els.length-1];var back=e.shiftKey&&e.target==els[0];if(fwd||back){setTimeout(function(){focus(back)},10);return false;}}}
if($(e.target).parents('div.blockMsg').length>0)
return true;return $(e.target).parents().children().filter('div.blockUI').length==0;};function focus(back){if(!pageBlockEls)
return;var e=pageBlockEls[back===true?pageBlockEls.length-1:0];if(e)
e.focus();};function center(el,x,y){var p=el.parentNode,s=el.style;var l=((p.offsetWidth-el.offsetWidth)/2)-sz(p,'borderLeftWidth');var t=((p.offsetHeight-el.offsetHeight)/2)-sz(p,'borderTopWidth');if(x)s.left=l>0?(l+'px'):'0';if(y)s.top=t>0?(t+'px'):'0';};function sz(el,p){return parseInt($.css(el,p))||0;};})(jQuery);
(function($){$.fn.charCounter=function(max,settings){max=max||100;settings=$.extend({container:"<span></span>",classname:"charcounter",format:"(%1 characters remaining)",pulse:true,delay:0},settings);var p,timeout;function count(el,container){el=$(el);if(el.val().length>max){el.val(el.val().substring(0,max));if(settings.pulse&&!p){pulse(container,true);};};if(settings.delay>0){if(timeout){window.clearTimeout(timeout);}
timeout=window.setTimeout(function(){container.html(settings.format.replace(/%1/,(max-el.val().length)));},settings.delay);}else{container.html(settings.format.replace(/%1/,(max-el.val().length)));}};function pulse(el,again){if(p){window.clearTimeout(p);p=null;};el.animate({opacity:0.1},100,function(){$(this).animate({opacity:1.0},100);});if(again){p=window.setTimeout(function(){pulse(el)},200);};};return this.each(function(){var container=(!settings.container.match(/^<.+>$/))?$(settings.container):$(settings.container).insertAfter(this).addClass(settings.classname);$(this).bind("keydown",function(){count(this,container);}).bind("keypress",function(){count(this,container);}).bind("keyup",function(){count(this,container);}).bind("focus",function(){count(this,container);}).bind("mouseover",function(){count(this,container);}).bind("mouseout",function(){count(this,container);}).bind("paste",function(){var me=this;setTimeout(function(){count(me,container);},10);});if(this.addEventListener){this.addEventListener('input',function(){count(this,container);},false);};count(this,container);});};})(jQuery);
jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};;(function($){var ver='2.65';if($.support==undefined){$.support={opacity:!($.browser.msie)};}
function log(){if(window.console&&window.console.log)
window.console.log('[cycle] '+Array.prototype.join.call(arguments,' '));};$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length==0&&options!='stop'){if(!$.isReady&&o.s){log('DOM not ready, queuing slideshow')
$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}
log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));return this;}
return this.each(function(){options=handleArguments(this,options,arg2);if(options===false)
return;if(this.cycleTimeout)
clearTimeout(this.cycleTimeout);this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=options.slideExpr?$(options.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log('terminating; too few slides: '+els.length);return;}
var opts=buildOptions($cont,$slides,els,options,o);if(opts===false)
return;if(opts.timeout||opts.continuous)
this.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},opts.continuous?10:opts.timeout+(opts.delay||0));});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined)
cont.cycleStop=0;if(options===undefined||options===null)
options={};if(options.constructor==String){switch(options){case'stop':cont.cycleStop++;if(cont.cycleTimeout)
clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;$(cont).removeData('cycle.opts');return false;case'pause':cont.cyclePause=1;return false;case'resume':cont.cyclePause=0;if(arg2===true){options=$(cont).data('cycle.opts');if(!options){log('options not found, can not resume');return false;}
if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}
go(options.elements,options,1,1);}
return false;default:options={fx:options};};}
else if(options.constructor==Number){var num=options;options=$(cont).data('cycle.opts');if(!options){log('options not found, can not advance slide');return false;}
if(num<0||num>=options.elements.length){log('invalid slide index: '+num);return false;}
options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}
if(typeof arg2=='string')
options.oneTimeFx=arg2;go(options.elements,options,1,num>=options.currSlide);return false;}
return options;};function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute('filter');}
catch(smother){}}};function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop)
opts.countdown=opts.autostopCount||els.length;var cont=$cont[0];$cont.data('cycle.opts',opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!$.support.opacity&&opts.cleartype)
opts.after.push(function(){removeFilter(this,opts);});if(opts.continuous)
opts.after.push(function(){go(els,opts,0,!opts.rev);});saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg)
clearTypeFix($slides);if($cont.css('position')=='static')
$cont.css('position','relative');if(opts.width)
$cont.width(opts.width);if(opts.height&&opts.height!='auto')
$cont.height(opts.height);if(opts.startingSlide)
opts.startingSlide=parseInt(opts.startingSlide);if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++)
opts.randomMap.push(i);opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=0;opts.startingSlide=opts.randomMap[0];}
else if(opts.startingSlide>=els.length)
opts.startingSlide=0;opts.currSlide=opts.startingSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:'absolute',top:0,left:0}).hide().each(function(i){var z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css('z-index',z)});$(els[first]).css('opacity',1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width)
$slides.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')
$slides.height(opts.height);var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var i=0;i<els.length;i++){var $e=$(els[i]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w)w=e.offsetWidth;if(!h)h=e.offsetHeight;maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}
if(maxw>0&&maxh>0)
$cont.css({width:maxw+'px',height:maxh+'px'});}
if(opts.pause)
$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});if(supportMultiTransitions(opts)===false)
return false;if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init))
init($cont,$slides,opts);else if(opts.fx!='custom'&&!opts.multiFx){log('unknown transition: '+opts.fx,'; slideshow terminating');return false;}}
var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:$el.height();this.cycleW=(opts.fit&&opts.width)?opts.width:$el.width();if($el.is('img')){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingOp=($.browser.opera&&this.cycleW==42&&this.cycleH==19&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ',this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options)},opts.requeueTimeout);requeue=true;return false;}
else{log('could not determine size of image: '+this.src,this.cycleW,this.cycleH);}}}
return true;});if(requeue)
return false;opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(':eq('+first+')').css(opts.cssBefore);if(opts.cssFirst)
$($slides[first]).css(opts.cssFirst);if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String)
opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);if(!opts.sync)
opts.speed=opts.speed/2;while((opts.timeout-opts.speed)<250)
opts.timeout+=opts.speed;}
if(opts.easing)
opts.easeIn=opts.easeOut=opts.easing;if(!opts.speedIn)
opts.speedIn=opts.speed;if(!opts.speedOut)
opts.speedOut=opts.speed;opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){opts.nextSlide=opts.currSlide;if(++opts.randomIndex==els.length)
opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex];}
else
opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;var e0=$slides[first];if(opts.before.length)
opts.before[0].apply(e0,[e0,e0,opts,true]);if(opts.after.length>1)
opts.after[1].apply(e0,[e0,e0,opts,true]);if(opts.next)
$(opts.next).click(function(){return advance(opts,opts.rev?-1:1)});if(opts.prev)
$(opts.prev).click(function(){return advance(opts,opts.rev?1:-1)});if(opts.pager)
buildPager(els,opts);exposeAddSlide(opts,els);return opts;};function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});};function supportMultiTransitions(opts){var txs=$.fn.cycle.transitions;if(opts.fx.indexOf(',')>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,'').split(',');for(var i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];var tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log('discarding unknown transition: ',fx);opts.fxs.splice(i,1);i--;}}
if(!opts.fxs.length){log('No valid transitions named; slideshow terminating.');return false;}}
else if(opts.fx=='all'){opts.multiFx=true;opts.fxs=[];for(p in txs){var tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx))
opts.fxs.push(p);}}
if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(var i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}
log('randomized fx sequence: ',opts.fxs);}
return true;};function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount)
opts.countdown++;els[prepend?'unshift':'push'](s);if(opts.els)
opts.els[prepend?'unshift':'push'](s);opts.slideCount=els.length;$s.css('position','absolute');$s[prepend?'prependTo':'appendTo'](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}
if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg)
clearTypeFix($s);if(opts.fit&&opts.width)
$s.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')
$slides.height(opts.height);s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager)
$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);if($.isFunction(opts.onAddSlide))
opts.onAddSlide($s);else
$s.hide();};}
$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init))
init(opts.$cont,$(opts.elements),opts);};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){$(els).stop(true,true);opts.busy=false;}
if(opts.busy)
return;var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual)
return;if(!manual&&!p.cyclePause&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end)
opts.end(opts);return;}
if(manual||!p.cyclePause){var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length)
opts.lastFx=0;fx=opts.fxs[opts.lastFx];opts.currFx=fx;}
if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}
$.fn.cycle.resetState(opts,fx);if(opts.before.length)
$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount)return;o.apply(next,[curr,next,opts,fwd]);});var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount)return;o.apply(next,[curr,next,opts,fwd]);});};if(opts.nextSlide!=opts.currSlide){opts.busy=1;if(opts.fxFn)
opts.fxFn(curr,next,opts,after,fwd);else if($.isFunction($.fn.cycle[opts.fx]))
$.fn.cycle[opts.fx](curr,next,opts,after);else
$.fn.cycle.custom(curr,next,opts,after,manual&&opts.fastOnEvent);}
opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length)
opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex];}
else{var roll=(opts.nextSlide+1)==els.length;opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}
if(opts.pager)
$.fn.cycle.updateActivePagerLink(opts.pager,opts.currSlide);}
var ms=0;if(opts.timeout&&!opts.continuous)
ms=getTimeout(curr,next,opts,fwd);else if(opts.continuous&&p.cyclePause)
ms=10;if(ms>0)
p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},ms);};$.fn.cycle.updateActivePagerLink=function(pager,currSlide){$(pager).find('a').removeClass('activeSlide').filter('a:eq('+currSlide+')').addClass('activeSlide');};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn(curr,next,opts,fwd);if(t!==false)
return t;}
return opts.timeout;};$.fn.cycle.next=function(opts){advance(opts,opts.rev?-1:1);};$.fn.cycle.prev=function(opts){advance(opts,opts.rev?1:-1);};function advance(opts,val){var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}
if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2)
opts.randomIndex=els.length-2;else if(opts.randomIndex==-1)
opts.randomIndex=els.length-1;opts.nextSlide=opts.randomMap[opts.randomIndex];}
else if(opts.random){if(++opts.randomIndex==els.length)
opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex];}
else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap)return false;opts.nextSlide=els.length-1;}
else if(opts.nextSlide>=els.length){if(opts.nowrap)return false;opts.nextSlide=0;}}
if($.isFunction(opts.prevNextClick))
opts.prevNextClick(val>0,opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,val>=0);return false;};function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});$.fn.cycle.updateActivePagerLink(opts.pager,opts.startingSlide);};$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a=($.isFunction(opts.pagerAnchorBuilder))?opts.pagerAnchorBuilder(i,el):'<a href="#">'+(i+1)+'</a>';if(!a)
return;var $a=$(a);if($a.parents('body').length==0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone);});$a=$(arr);}
else{$a.appendTo($p);}}
$a.bind(opts.pagerEvent,function(){opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}
if($.isFunction(opts.pagerClick))
opts.pagerClick(opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,opts.currSlide<i);return false;});if(opts.pauseOnPagerHover)
$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd)
hops=c>l?c-l:opts.slideCount-l;else
hops=c<l?l-c:l+opts.slideCount-c;return hops;};function clearTypeFix($slides){function hex(s){s=parseInt(s).toString(16);return s.length<2?'0'+s:s;};function getBg(e){for(;e&&e.nodeName.toLowerCase()!='html';e=e.parentNode){var v=$.css(e,'background-color');if(v.indexOf('rgb')>=0){var rgb=v.match(/\d+/g);return'#'+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}
if(v&&v!='transparent')
return v;}
return'#ffffff';};$slides.each(function(){$(this).css('background-color',getBg(this));});};$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display='block';if(w!==false&&next.cycleW>0)
opts.cssBefore.width=next.cycleW;if(h!==false&&next.cycleH>0)
opts.cssBefore.height=next.cycleH;opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display='none';$(curr).css('zIndex',opts.slideCount+(rev===true?1:0));$(next).css('zIndex',opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=='number')
speedIn=speedOut=speedOverride;else
speedIn=speedOut=1;easeIn=easeOut=null;}
var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb)};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter)$l.css(opts.cssAfter);if(!opts.sync)fn();});if(opts.sync)fn();};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(':eq('+opts.currSlide+')').css('opacity',0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:'fade',timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,pager:null,pagerClick:null,pagerEvent:'click',pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:'auto',startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!$.support.opacity,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250};})(jQuery);(function($){$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore={top:h,left:0};opts.cssFirst={top:0};opts.animIn={top:0};opts.animOut={top:-h};};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst={top:0};opts.cssBefore={top:-h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:0-w};};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:-w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css('overflow','hidden').width();opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst={left:0};opts.cssBefore={top:0};opts.animIn={left:0};opts.animOut={top:0};};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css('overflow','hidden');opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0};opts.animIn={top:0};opts.animOut={left:0};};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore={left:0,top:0,width:0};opts.animIn={width:'show'};opts.animOut={width:0};};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore={left:0,top:0,height:0};opts.animIn={height:'show'};opts.animOut={height:0};};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var w=$cont.css('overflow','visible').width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});opts.speed=opts.speed/2;opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(var i=0;i<$slides.length;i++)
opts.els.push($slides[i]);for(var i=0;i<opts.currSlide;i++)
opts.els.push(opts.els.shift());opts.fxFn=function(curr,next,opts,cb,fwd){var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++)
fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());if(fwd)
for(var i=0,len=opts.els.length;i<len;i++)
$(opts.els[i]).css('z-index',len-i+count);else{var z=$(curr).css('z-index');$el.css('z-index',parseInt(z)+1+count);}
$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb)cb();});});};opts.cssBefore={display:'block',opacity:1,top:0,left:0};};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,height:0};opts.animIn={top:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,top:0,height:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore={top:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={top:0,left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2};});opts.cssFirst={top:0,left:0};opts.cssBefore={width:0,height:0};};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};});opts.cssBefore={width:0,height:0};opts.animOut={opacity:0};};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css('overflow','hidden').width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css('overflow','hidden').height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css('overflow','hidden').height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:w};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w};};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};});opts.cssBefore={width:0,top:0};};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};});opts.cssBefore={height:0,left:0};};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};});opts.cssBefore={top:0,width:0};};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,height:next.cycleH};opts.animOut={top:curr.cycleH/2,height:0};});opts.cssBefore={left:0,height:0};};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||'left';var w=$cont.css('overflow','hidden').width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=='right')
opts.cssBefore.left=-w;else if(d=='up')
opts.cssBefore.top=h;else if(d=='down')
opts.cssBefore.top=-h;else
opts.cssBefore.left=w;});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||'left';var w=$cont.css('overflow','hidden').width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=='right')
opts.animOut.left=w;else if(d=='up')
opts.animOut.top=-h;else if(d=='down')
opts.animOut.top=h;else
opts.animOut.left=-w;});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css('overflow','visible').width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top)
opts.animOut={left:w*2,top:-h/2,opacity:0};else
opts.animOut.opacity=0;});opts.cssBefore={left:0,top:0};opts.animIn={left:0};};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css('overflow','hidden').width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip))
clip='rect(0px 0px '+h+'px 0px)';else if(/r2l/.test(opts.clip))
clip='rect(0px '+w+'px '+h+'px '+w+'px)';else if(/t2b/.test(opts.clip))
clip='rect(0px '+w+'px 0px 0px)';else if(/b2t/.test(opts.clip))
clip='rect('+h+'px '+w+'px '+h+'px 0px)';else if(/zoom/.test(opts.clip)){var t=parseInt(h/2);var l=parseInt(w/2);clip='rect('+t+'px '+l+'px '+t+'px '+l+'px)';}}
opts.cssBefore.clip=opts.cssBefore.clip||clip||'rect(0px 0px 0px 0px)';var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next)return;var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display='block';var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)'});(step++<=count)?setTimeout(f,13):$curr.css('display','none');})();});opts.cssBefore={display:'block',opacity:1,top:0,left:0};opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);;(function($){$.flexiPagination={defaults:{url:"",currentPage:0,totalResults:100,perPage:25,container:"window",content:"body",pagerVar:"p",loaderImgPath:"images/loader.gif",debug:0,backward:false,margin:0,stopPagingAfterText:null}};$.fn.extend({flexiPagination:function(config){var config=$.extend({},$.flexiPagination.defaults,config);var loading=false;config.container=(config.container!="")?config.container:"window";config.content=(config.content!="")?config.content:"body";if(config.url==""){config.url=window.location;}
$(config.content).append("<div id='jqpageflow-block'><img src='"+config.loaderImgPath+"' /><span id='jqpageflow-text'></span></div>");$("#jqpageflow-block").addClass("jqpageflow-loader");$("#jqpageflow-text").addClass("jqpageflow-loadertext");$(config.container).unbind('scroll');$("#calc").html("<p>currentPage: "+config.currentPage+"<br/>scrolltop: "+$(config.container).scrollTop()+"<br/>content height: "+$(config.content).height()+"<br/>container height: "+$(config.container).innerHeight()+"<br/> result: "+($(config.content).height()-$(config.container).innerHeight())+"</p>");$(config.container).scroll(function(){$("#calc").html("<p>currentPage: "+config.currentPage+"<br/>scrolltop: "+$(config.container).scrollTop()+"<br/>content height: "+$(config.content).height()+"<br/>container height: "+$(config.container).innerHeight()+"<br/> result: "+($(config.content).height()-$(config.container).innerHeight())+"<br/> container: "+config.container+"</p>");if(config.currentPage>=0&&(config.perPage*(config.currentPage+1)<config.totalResults)&&!loading&&$(config.container).scrollTop()>=$(config.content).height()-$(config.container).innerHeight()-config.margin){loading=true;$("#jqpageflow-text").text('Loading results '+(config.perPage*((config.currentPage>0)?config.currentPage:1))+' of '+config.totalResults);$("#jqpageflow-block").show();$.ajax({type:"GET",dataType:"html",url:config.url,data:config.pagerVar+"="+(config.currentPage+1)+(config.data!=''?'&'+config.data:''),success:function(html){html=$.trim(html);if(html){$(config.content).append(html);if(config.stopPagingAfterText!=null&&html.indexOf(config.stopPagingAfterText)>-1){config.currentPage=-1;}
else
config.currentPage++;}else{config.currentPage=-1;}},complete:function(){loading=false;$("#jqpageflow-block").hide();}});}});return this;}});})(jQuery);
(function($){$.extend($.fn,{livequery:function(type,fn,fn2){var self=this,q;if($.isFunction(type))
fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&type==query.type&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid))
return(q=query)&&false;});q=q||new $.livequery(this.selector,this.context,type,fn,fn2);q.stopped=false;q.run();return this;},expire:function(type,fn,fn2){var self=this;if($.isFunction(type))
fn2=fn,fn=type,type=undefined;$.each($.livequery.queries,function(i,query){if(self.selector==query.selector&&self.context==query.context&&(!type||type==query.type)&&(!fn||fn.$lqguid==query.fn.$lqguid)&&(!fn2||fn2.$lqguid==query.fn2.$lqguid)&&!this.stopped)
$.livequery.stop(query.id);});return this;}});$.livequery=function(selector,context,type,fn,fn2){this.selector=selector;this.context=context||document;this.type=type;this.fn=fn;this.fn2=fn2;this.elements=[];this.stopped=false;this.id=$.livequery.queries.push(this)-1;fn.$lqguid=fn.$lqguid||$.livequery.guid++;if(fn2)fn2.$lqguid=fn2.$lqguid||$.livequery.guid++;return this;};$.livequery.prototype={stop:function(){var query=this;if(this.type)
this.elements.unbind(this.type,this.fn);else if(this.fn2)
this.elements.each(function(i,el){query.fn2.apply(el);});this.elements=[];this.stopped=true;},run:function(){if(this.stopped)return;var query=this;var oEls=this.elements,els=$(this.selector,this.context),nEls=els.not(oEls);this.elements=els;if(this.type){nEls.bind(this.type,this.fn);if(oEls.length>0)
$.each(oEls,function(i,el){if($.inArray(el,els)<0)
$.event.remove(el,query.type,query.fn);});}
else{nEls.each(function(){query.fn.apply(this);});if(this.fn2&&oEls.length>0)
$.each(oEls,function(i,el){if($.inArray(el,els)<0)
query.fn2.apply(el);});}}};$.extend($.livequery,{guid:0,queries:[],queue:[],running:false,timeout:null,checkQueue:function(){if($.livequery.running&&$.livequery.queue.length){var length=$.livequery.queue.length;while(length--)
$.livequery.queries[$.livequery.queue.shift()].run();}},pause:function(){$.livequery.running=false;},play:function(){$.livequery.running=true;$.livequery.run();},registerPlugin:function(){$.each(arguments,function(i,n){if(!$.fn[n])return;var old=$.fn[n];$.fn[n]=function(){var r=old.apply(this,arguments);$.livequery.run();return r;}});},run:function(id){if(id!=undefined){if($.inArray(id,$.livequery.queue)<0)
$.livequery.queue.push(id);}
else
$.each($.livequery.queries,function(id){if($.inArray(id,$.livequery.queue)<0)
$.livequery.queue.push(id);});if($.livequery.timeout)clearTimeout($.livequery.timeout);$.livequery.timeout=setTimeout($.livequery.checkQueue,20);},stop:function(id){if(id!=undefined)
$.livequery.queries[id].stop();else
$.each($.livequery.queries,function(id){$.livequery.queries[id].stop();});}});$.livequery.registerPlugin('append','prepend','after','before','wrap','attr','removeAttr','addClass','removeClass','toggleClass','empty','remove');$(function(){$.livequery.play();});var init=$.prototype.init;$.prototype.init=function(a,c){var r=init.apply(this,arguments);if(a&&a.selector)
r.context=a.context,r.selector=a.selector;if(typeof a=='string')
r.context=c||document,r.selector=a;return r;};$.prototype.init.prototype=$.prototype;})(jQuery);
(function($){var pasteEventName=($.browser.msie?'paste':'input')+".mask";var iPhone=(window.orientation!=undefined);$.mask={definitions:{'9':"[0-9]",'a':"[A-Za-z]",'*':"[A-Za-z0-9]"}};$.fn.extend({caret:function(begin,end){if(this.length==0)return;if(typeof begin=='number'){end=(typeof end=='number')?end:begin;return this.each(function(){if(this.setSelectionRange){this.focus();this.setSelectionRange(begin,end);}else if(this.createTextRange){var range=this.createTextRange();range.collapse(true);range.moveEnd('character',end);range.moveStart('character',begin);range.select();}});}else{if(this[0].setSelectionRange){begin=this[0].selectionStart;end=this[0].selectionEnd;}else if(document.selection&&document.selection.createRange){var range=document.selection.createRange();begin=0-range.duplicate().moveStart('character',-100000);end=begin+range.text.length;}
return{begin:begin,end:end};}},unmask:function(){return this.trigger("unmask");},mask:function(mask,settings){if(!mask&&this.length>0){var input=$(this[0]);var tests=input.data("tests");return $.map(input.data("buffer"),function(c,i){return tests[i]?c:null;}).join('');}
settings=$.extend({placeholder:"_",completed:null},settings);var defs=$.mask.definitions;var tests=[];var partialPosition=mask.length;var firstNonMaskPos=null;var len=mask.length;$.each(mask.split(""),function(i,c){if(c=='?'){len--;partialPosition=i;}else{tests.push(defs[c]?new RegExp(defs[c]):null);if(tests[tests.length-1]&&firstNonMaskPos==null)
firstNonMaskPos=tests.length-1;}});return this.each(function(){var input=$(this);var buffer=$.map(mask.split(""),function(c,i){if(c!='?')return defs[c]?settings.placeholder:c});var ignore=false;var focusText=input.val();input.data("buffer",buffer).data("tests",tests);function seekNext(pos){while(++pos<len){if(tests[pos])
return pos;}
return len;};function shiftL(pos){while(!tests[pos]&&pos>=0)pos--;for(var i=pos;i<len;i++){if(tests[i]){buffer[i]=settings.placeholder;var j=seekNext(i);if(j<len&&tests[i].test(buffer[j])){buffer[i]=buffer[j];}else
break;}}
writeBuffer();input.caret(Math.max(firstNonMaskPos,pos));};function shiftR(pos){for(var i=pos,c=settings.placeholder;i<len;i++){if(tests[i]){var j=seekNext(i);var t=buffer[i];buffer[i]=c;if(j<len&&tests[j].test(t))
c=t;else
break;}}};function keydownEvent(e){var pos=$(this).caret();var k=e.keyCode;ignore=(k<16||(k>16&&k<32)||(k>32&&k<41));if((pos.begin-pos.end)!=0&&(!ignore||k==8||k==46))
clearBuffer(pos.begin,pos.end);if(k==8||k==46||(iPhone&&k==127)){shiftL(pos.begin+(k==46?0:-1));return false;}else if(k==27){clearBuffer(0,len);writeBuffer();$(this).caret(firstNonMaskPos);return false;}};function keypressEvent(e){if(ignore){ignore=false;return(e.keyCode==8)?false:null;}
e=e||window.event;var k=e.charCode||e.keyCode||e.which;var pos=$(this).caret();if(e.ctrlKey||e.altKey){return true;}else if((k>=41&&k<=122)||k==32||k>186){var p=seekNext(pos.begin-1);if(p<len){var c=String.fromCharCode(k);if(tests[p].test(c)){shiftR(p);buffer[p]=c;writeBuffer();var next=seekNext(p);$(this).caret(next);if(settings.completed&&next==len)
settings.completed.call(input);}}}
return false;};function clearBuffer(start,end){for(var i=start;i<end&&i<len;i++){if(tests[i])
buffer[i]=settings.placeholder;}};function writeBuffer(){return input.val(buffer.join('')).val();};function checkVal(allow){var test=input.val();var lastMatch=-1;for(var i=0,pos=0;i<len;i++){if(tests[i]){buffer[i]=settings.placeholder;while(pos++<test.length){var c=test.charAt(pos-1);if(tests[i].test(c)){buffer[i]=c;lastMatch=i;break;}}
if(pos>test.length)
break;}}
if(!allow&&lastMatch+1<partialPosition){input.val("");clearBuffer(0,len);}else if(allow||lastMatch+1>=partialPosition){writeBuffer();if(!allow)input.val(input.val().substring(0,lastMatch+1));}
return(partialPosition?i:firstNonMaskPos);};input.one("unmask",function(){input.unbind(".mask").removeData("buffer").removeData("tests");}).bind("focus.mask",function(){focusText=input.val();var pos=checkVal();writeBuffer();setTimeout(function(){input.caret(pos);},0);}).bind("blur.mask",function(){checkVal();if(input.val()!=focusText)
input.change();}).bind("keydown.mask",keydownEvent).bind("keypress.mask",keypressEvent).bind(pasteEventName,function(){setTimeout(function(){input.caret(checkVal(true));},0);});checkVal();});}});})(jQuery);
new function(settings){var $separator=settings.separator||'&';var $spaces=settings.spaces===false?false:true;var $suffix=settings.suffix===false?'':'[]';var $prefix=settings.prefix===false?false:true;var $hash=$prefix?settings.hash===true?"#":"?":"";var $numbers=settings.numbers===false?false:true;jQuery.query=new function(){var is=function(o,t){return o!=undefined&&o!==null&&(!!t?o.constructor==t:true);};var parse=function(path){var m,rx=/\[([^[]*)\]/g,match=/^([^[]+)(\[.*\])?$/.exec(path),base=match[1],tokens=[];while(m=rx.exec(match[2]))tokens.push(m[1]);return[base,tokens];};var set=function(target,tokens,value){var o,token=tokens.shift();if(typeof target!='object')target=null;if(token===""){if(!target)target=[];if(is(target,Array)){target.push(tokens.length==0?value:set(null,tokens.slice(0),value));}else if(is(target,Object)){var i=0;while(target[i++]!=null);target[--i]=tokens.length==0?value:set(target[i],tokens.slice(0),value);}else{target=[];target.push(tokens.length==0?value:set(null,tokens.slice(0),value));}}else if(token&&token.match(/^\s*[0-9]+\s*$/)){var index=parseInt(token,10);if(!target)target=[];target[index]=tokens.length==0?value:set(target[index],tokens.slice(0),value);}else if(token){var index=token.replace(/^\s*|\s*$/g,"");if(!target)target={};if(is(target,Array)){var temp={};for(var i=0;i<target.length;++i){temp[i]=target[i];}
target=temp;}
target[index]=tokens.length==0?value:set(target[index],tokens.slice(0),value);}else{return value;}
return target;};var queryObject=function(a){var self=this;self.keys={};if(a.queryObject){jQuery.each(a.get(),function(key,val){self.SET(key,val);});}else{jQuery.each(arguments,function(){var q=""+this;q=q.replace(/^[?#]/,'');q=q.replace(/[;&]$/,'');if($spaces)q=q.replace(/[+]/g,' ');jQuery.each(q.split(/[&;]/),function(){var key=decodeURIComponent(this.split('=')[0]||"");var val=decodeURIComponent(this.split('=')[1]||"");if(!key)return;if($numbers){if(/^[+-]?[0-9]+\.[0-9]*$/.test(val))
val=parseFloat(val);else if(/^[+-]?[0-9]+$/.test(val))
val=parseInt(val,10);}
val=(!val&&val!==0)?true:val;if(val!==false&&val!==true&&typeof val!='number')
val=val;self.SET(key,val);});});}
return self;};queryObject.prototype={queryObject:true,has:function(key,type){var value=this.get(key);return is(value,type);},GET:function(key){if(!is(key))return this.keys;var parsed=parse(key),base=parsed[0],tokens=parsed[1];var target=this.keys[base];while(target!=null&&tokens.length!=0){target=target[tokens.shift()];}
return typeof target=='number'?target:target||"";},get:function(key){var target=this.GET(key);if(is(target,Object))
return jQuery.extend(true,{},target);else if(is(target,Array))
return target.slice(0);return target;},SET:function(key,val){var value=!is(val)?null:val;var parsed=parse(key),base=parsed[0],tokens=parsed[1];var target=this.keys[base];this.keys[base]=set(target,tokens.slice(0),value);return this;},set:function(key,val){return this.copy().SET(key,val);},REMOVE:function(key){return this.SET(key,null).COMPACT();},remove:function(key){return this.copy().REMOVE(key);},EMPTY:function(){var self=this;jQuery.each(self.keys,function(key,value){delete self.keys[key];});return self;},load:function(url){var hash=url.replace(/^.*?[#](.+?)(?:\?.+)?$/,"$1");var search=url.replace(/^.*?[?](.+?)(?:#.+)?$/,"$1");return new queryObject(url.length==search.length?'':search,url.length==hash.length?'':hash);},empty:function(){return this.copy().EMPTY();},copy:function(){return new queryObject(this);},COMPACT:function(){function build(orig){var obj=typeof orig=="object"?is(orig,Array)?[]:{}:orig;if(typeof orig=='object'){function add(o,key,value){if(is(o,Array))
o.push(value);else
o[key]=value;}
jQuery.each(orig,function(key,value){if(!is(value))return true;add(obj,key,build(value));});}
return obj;}
this.keys=build(this.keys);return this;},compact:function(){return this.copy().COMPACT();},toString:function(){var i=0,queryString=[],chunks=[],self=this;var encode=function(str){str=str+"";if($spaces)str=str.replace(/ /g,"+");return encodeURIComponent(str);};var addFields=function(arr,key,value){if(!is(value)||value===false)return;var o=[encode(key)];if(value!==true){o.push("=");o.push(encode(value));}
arr.push(o.join(""));};var build=function(obj,base){var newKey=function(key){return!base||base==""?[key].join(""):[base,"[",key,"]"].join("");};jQuery.each(obj,function(key,value){if(typeof value=='object')
build(value,newKey(key));else
addFields(chunks,newKey(key),value);});};build(this.keys);if(chunks.length>0)queryString.push($hash);queryString.push(chunks.join($separator));return queryString.join("");}};return new queryObject(location.search,location.hash);};}(jQuery.query||{});
(function($){$.fn.rotator=function(options){var defaults={ms:2000,n:1,autoHeight:false};var options=$.extend(defaults,options);return this.each(function(index){var $this=$(this);var initialHeight=0;$this.children().filter(":lt("+options.n+")").each(function(index,item){initialHeight+=$(item).height();});$this.height(initialHeight);var isStart=true;setInterval(function(){var childHeight=$this.children().filter(":first-child").height();var animParams={scrollTop:(childHeight)+"px"};var autoHeight=0;$this.children().filter(":lt("+(options.n+1)+")").each(function(index,item){if(index>0)autoHeight+=$(item).height();});if(options.autoHeight)animParams=$.extend({height:(autoHeight)+"px"},animParams);$this.animate(animParams,500,function(){$this.scrollTop(0);$this.append($this.children().filter(":first-child"));$this.css("overflow","hidden");});if(isStart)
$this.trigger("start");isStart=false;},options.ms);});}})(jQuery);;(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($){function TimeEntry(){this._disabledInputs=[];this.regional=[];this.regional['']={show24Hours:false,separator:':',ampmPrefix:'',ampmNames:['AM','PM'],spinnerTexts:['Now','Previous field','Next field','Increment','Decrement']};this._defaults={appendText:'',showSeconds:false,timeSteps:[1,1,1],initialField:0,useMouseWheel:true,defaultTime:null,minTime:null,maxTime:null,spinnerImage:'timeEntry.png',spinnerSize:[20,20,8],spinnerIncDecOnly:false,spinnerRepeat:[500,250],beforeShow:null,beforeSetTime:null};$.extend(this._defaults,this.regional['']);}
var PROP_NAME='timeEntry';$.extend(TimeEntry.prototype,{markerClassName:'hasTimeEntry',setDefaults:function(options){extendRemove(this._defaults,options||{});},_connectTimeEntry:function(target,options){var input=$(target);if(input.is('.'+this.markerClassName)){return;}
var inst={};inst.options=$.extend({},options);inst._selectedHour=0;inst._selectedMinute=0;inst._selectedSecond=0;inst._field=0;inst.input=$(target);$.data(target,PROP_NAME,inst);var spinnerImage=this._get(inst,'spinnerImage');var spinnerText=this._get(inst,'spinnerText');var spinnerSize=this._get(inst,'spinnerSize');var appendText=this._get(inst,'appendText');var spinner=(!spinnerImage?null:$('<span class="timeEntry_control" _timeid="'+inst._id+'" style="display: inline-block; background: url(\''+spinnerImage+'\') 0 0 no-repeat; '+'width: '+spinnerSize[0]+'px; height: '+spinnerSize[1]+'px;'+
($.browser.mozilla&&$.browser.version.substr(0,3)!='1.9'?' padding-left: '+spinnerSize[0]+'px; padding-bottom: '+
(spinnerSize[1]-18)+'px;':'')+'"></span>'));input.wrap('<span class="timeEntry_wrap"></span>').after(appendText?'<span class="timeEntry_append">'+appendText+'</span>':'').after(spinner||'');input.addClass(this.markerClassName).bind('focus.timeEntry',this._doFocus).bind('blur.timeEntry',this._doBlur).bind('click.timeEntry',this._doClick).bind('keydown.timeEntry',this._doKeyDown).bind('keypress.timeEntry',this._doKeyPress);if($.browser.mozilla){input.bind('input.timeEntry',function(event){$.timeentry._parseTime(inst);});}
if($.browser.msie){input.bind('paste.timeEntry',function(event){setTimeout(function(){$.timeentry._parseTime(inst);},1);});}
if(this._get(inst,'useMouseWheel')&&$.fn.mousewheel){input.mousewheel(this._doMouseWheel);}
if(spinner){spinner.mousedown(this._handleSpinner).mouseup(this._endSpinner).mouseout(this._endSpinner).mousemove(this._describeSpinner);}},_enableTimeEntry:function(input){this._enableDisable(input,false);},_disableTimeEntry:function(input){this._enableDisable(input,true);},_enableDisable:function(input,disable){var inst=$.data(input,PROP_NAME);if(!inst){return;}
input.disabled=disable;if(input.nextSibling&&input.nextSibling.nodeName.toLowerCase()=='span'){$.timeEntry._changeSpinner(inst,input.nextSibling,(disable?5:-1));}
$.timeEntry._disabledInputs=$.map($.timeEntry._disabledInputs,function(value){return(value==input?null:value);});if(disable){$.timeEntry._disabledInputs[$.timeEntry._disabledInputs.length]=input;}},_isDisabledTimeEntry:function(input){for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==input){return true;}}
return false;},_changeTimeEntry:function(input,options){var inst=$.data(input,PROP_NAME);if(inst){var currentTime=this._extractTime(inst);extendRemove(inst.options,options||{});if(currentTime){this._setTime(inst,new Date(0,0,0,currentTime[0],currentTime[1],currentTime[2]));}}
$.data(input,PROP_NAME,inst);},_destroyTimeEntry:function(input){$input=$(input);if(!$input.is('.'+this.markerClassName)){return;}
$input.removeClass(this.markerClassName).unbind('focus.timeEntry').unbind('blur.timeEntry').unbind('click.timeEntry').unbind('keydown.timeEntry').unbind('keypress.timeEntry');if($.browser.mozilla){$input.unbind('input.timeEntry');}
if($.browser.msie){$input.unbind('paste.timeEntry');}
if($.fn.mousewheel){$input.unmousewheel();}
this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==input?null:value);});input.parentNode.parentNode.replaceChild(input,input.parentNode);$.removeData(input,PROP_NAME);},_setTimeTimeEntry:function(input,time){var inst=$.data(input,PROP_NAME);if(inst){this._setTime(inst,time?(typeof time=='object'?new Date(time.getTime()):time):null);}},_getTimeTimeEntry:function(input){var inst=$.data(input,PROP_NAME);var currentTime=(inst?this._extractTime(inst):null);return(!currentTime?null:new Date(0,0,0,currentTime[0],currentTime[1],currentTime[2]));},_doFocus:function(target){var input=(target.nodeName&&target.nodeName.toLowerCase()=='input'?target:this);if($.timeEntry._lastInput==input){return;}
if($.timeEntry._isDisabledTimeEntry(input)){return;}
var inst=$.data(input,PROP_NAME);$.timeEntry._focussed=true;$.timeEntry._lastInput=input;$.timeEntry._blurredInput=null;var beforeShow=$.timeEntry._get(inst,'beforeShow');extendRemove(inst.options,(beforeShow?beforeShow.apply(input,[input]):{}));$.data(input,PROP_NAME,inst);$.timeEntry._parseTime(inst);},_doBlur:function(event){$.timeEntry._blurredInput=$.timeEntry._lastInput;$.timeEntry._lastInput=null;},_doClick:function(event){var input=event.target;var inst=$.data(input,PROP_NAME);if(!$.timeEntry._focussed){var fieldSize=$.timeEntry._get(inst,'separator').length+2;inst._field=0;if($.browser.msie){var value=input.value;var offsetX=event.clientX+document.documentElement.scrollLeft-
$(event.srcElement).offset().left;for(var field=0;field<=Math.max(1,inst._secondField,inst._ampmField);field++){var end=(field!=inst._ampmField?(field*fieldSize)+2:(inst._ampmField*fieldSize)+$.timeEntry._get(inst,'ampmPrefix').length+
$.timeEntry._get(inst,'ampmNames')[0].length);input.value=value.substring(0,end);var range=input.createTextRange();if(offsetX<range.boundingWidth){inst._field=field;break;}}
input.value=value;}
else{for(var field=0;field<=Math.max(1,inst._secondField,inst._ampmField);field++){var start=(field!=inst._ampmField?(field*fieldSize)+2:(inst._ampmField*fieldSize)+$.timeEntry._get(inst,'ampmPrefix').length+
$.timeEntry._get(inst,'ampmNames')[0].length);if(input.selectionStart<start){inst._field=field;break;}}}}
$.data(input,PROP_NAME,inst);$.timeEntry._showField(inst);$.timeEntry._focussed=false;},_doKeyDown:function(event){if(event.keyCode>=48){return true;}
var inst=$.data(event.target,PROP_NAME);switch(event.keyCode){case 9:return(event.shiftKey?$.timeEntry._previousField(inst,true):$.timeEntry._nextField(inst,true));case 35:if(event.ctrlKey){$.timeEntry._setValue(inst,'');}
else{inst._field=Math.max(1,inst._secondField,inst._ampmField);$.timeEntry._adjustField(inst,0);}
break;case 36:if(event.ctrlKey){$.timeEntry._setTime(inst);}
else{inst._field=0;$.timeEntry._adjustField(inst,0);}
break;case 37:$.timeEntry._previousField(inst,false);break;case 38:$.timeEntry._adjustField(inst,+1);break;case 39:$.timeEntry._nextField(inst,false);break;case 40:$.timeEntry._adjustField(inst,-1);break;case 46:$.timeEntry._setValue(inst,'');break;}
return false;},_doKeyPress:function(event){var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);if(chr<' '){return true;}
var inst=$.data(event.target,PROP_NAME);$.timeEntry._handleKeyPress(inst,chr);return false;},_doMouseWheel:function(event,delta){delta=($.browser.opera?-delta/Math.abs(delta):delta);var inst=$.data(event.target,PROP_NAME);$.timeEntry._adjustField(inst,delta);event.preventDefault();},_describeSpinner:function(event){var spinner=$.timeEntry._getSpinnerTarget(event);var inst=$.data(spinner.previousSibling,PROP_NAME);spinner.title=$.timeEntry._get(inst,'spinnerTexts')[$.timeEntry._getSpinnerRegion(inst,event)];},_handleSpinner:function(event){var spinner=$.timeEntry._getSpinnerTarget(event);var input=spinner.previousSibling;if($.timeEntry._isDisabledTimeEntry(input)){return;}
if(input==$.timeEntry._blurredInput){$.timeEntry._lastInput=input;$.timeEntry._blurredInput=null;}
$.timeEntry._cancelled=false;var inst=$.data(input,PROP_NAME);$.timeEntry._doFocus(input);var region=$.timeEntry._getSpinnerRegion(inst,event);$.timeEntry._changeSpinner(inst,spinner,region);$.timeEntry._actionSpinner(inst,region);var spinnerRepeat=$.timeEntry._get(inst,'spinnerRepeat');if(!$.timeEntry._cancelled&&region>=3&&spinnerRepeat[0]){$.timeEntry._timer=setTimeout(function(){$.timeEntry._repeatSpinner(inst,region);},spinnerRepeat[0]);$(spinner).one('mouseout',$.timeEntry._releaseSpinner).one('mouseup',$.timeEntry._releaseSpinner);}},_actionSpinner:function(inst,region){switch(region){case 0:this._setTime(inst);break;case 1:this._previousField(inst,false);break;case 2:this._nextField(inst,false);break;case 3:this._adjustField(inst,+1);break;case 4:this._adjustField(inst,-1);break;}},_repeatSpinner:function(inst,region){if($.timeEntry._cancelled){return;}
$.timeEntry._lastInput=$.timeEntry._blurredInput;this._actionSpinner(inst,region);this._timer=setTimeout(function(){$.timeEntry._repeatSpinner(inst,region);},this._get(inst,'spinnerRepeat')[1]);},_releaseSpinner:function(event){$.timeEntry._cancelled=true;clearTimeout($.timeEntry._timer);},_endSpinner:function(event){$.timeEntry._cancelled=true;var spinner=$.timeEntry._getSpinnerTarget(event);var input=spinner.previousSibling;var inst=$.data(input,PROP_NAME);if(!$.timeEntry._isDisabledTimeEntry(input)){$.timeEntry._changeSpinner(inst,spinner,-1);}
if(!$.browser.opera){$.timeEntry._lastInput=$.timeEntry._blurredInput;}
if($.timeEntry._lastInput){$.timeEntry._showField(inst);}},_getSpinnerTarget:function(event){return(event.target?event.target:event.srcElement);},_getSpinnerRegion:function(inst,event){var spinner=this._getSpinnerTarget(event);var pos=($.browser.opera||$.browser.safari?$.timeEntry._findPos(spinner):$(spinner).offset());var scrolled=($.browser.safari?$.timeEntry._findScroll(spinner):[document.documentElement.scrollLeft,document.documentElement.scrollTop]);var spinnerIncDecOnly=this._get(inst,'spinnerIncDecOnly');var left=(spinnerIncDecOnly?99:event.clientX+scrolled[0]-pos.left-($.browser.msie?1:0));var top=event.clientY+scrolled[1]-pos.top-($.browser.msie?1:0);var spinnerSize=this._get(inst,'spinnerSize');var right=(spinnerIncDecOnly?99:spinnerSize[0]-left);var bottom=spinnerSize[1]-top;if(spinnerSize[2]>0&&Math.abs(left-right)<=spinnerSize[2]&&Math.abs(top-bottom)<=spinnerSize[2]){return 0;}
var min=Math.min(left,top,right,bottom);return(min==left?1:(min==right?2:(min==top?3:4)));},_changeSpinner:function(inst,spinner,region){$(spinner).css('background-position','-'+((region+1)*this._get(inst,'spinnerSize')[0])+'px 0px');},_findPos:function(obj){var curLeft=curTop=0;if(obj.offsetParent){curLeft=obj.offsetLeft;curTop=obj.offsetTop;while(obj=obj.offsetParent){var origCurLeft=curLeft;curLeft+=obj.offsetLeft;if(curLeft<0){curLeft=origCurLeft;}
curTop+=obj.offsetTop;}}
return{left:curLeft,top:curTop};},_findScroll:function(obj){var isFixed=false;$(obj).parents().each(function(){isFixed|=$(this).css('position')=='fixed';});if(isFixed){return[0,0];}
var scrollLeft=obj.scrollLeft;var scrollTop=obj.scrollTop;while(obj=obj.parentNode){scrollLeft+=obj.scrollLeft||0;scrollTop+=obj.scrollTop||0;}
return[scrollLeft,scrollTop];},_get:function(inst,name){return(inst.options[name]!=null?inst.options[name]:$.timeEntry._defaults[name]);},_parseTime:function(inst){var currentTime=this._extractTime(inst);var showSeconds=this._get(inst,'showSeconds');if(currentTime){inst._selectedHour=currentTime[0];inst._selectedMinute=currentTime[1];inst._selectedSecond=currentTime[2];}
else{var now=this._constrainTime(inst);inst._selectedHour=now[0];inst._selectedMinute=now[1];inst._selectedSecond=(showSeconds?now[2]:0);}
inst._secondField=(showSeconds?2:-1);inst._ampmField=(this._get(inst,'show24Hours')?-1:(showSeconds?3:2));inst._lastChr='';inst._field=Math.max(0,Math.min(Math.max(1,inst._secondField,inst._ampmField),this._get(inst,'initialField')));if(inst.input.val()!=''){this._showTime(inst);}},_extractTime:function(inst){var value=inst.input.val();var separator=this._get(inst,'separator');var currentTime=value.split(separator);if(separator==''&&value!=''){currentTime[0]=value.substring(0,2);currentTime[1]=value.substring(2,4);currentTime[2]=value.substring(4,6);}
var ampmNames=this._get(inst,'ampmNames');var show24Hours=this._get(inst,'show24Hours');if(currentTime.length>=2){var isAM=!show24Hours&&(value.indexOf(ampmNames[0])>-1);var isPM=!show24Hours&&(value.indexOf(ampmNames[1])>-1);var hour=parseInt(currentTime[0],10);hour=(isNaN(hour)?0:hour);hour=((isAM||isPM)&&hour==12?0:hour)+(isPM?12:0);var minute=parseInt(currentTime[1],10);minute=(isNaN(minute)?0:minute);var second=(currentTime.length>=3?parseInt(currentTime[2],10):0);second=(isNaN(second)||!this._get(inst,'showSeconds')?0:second);return this._constrainTime(inst,[hour,minute,second]);}
return null;},_constrainTime:function(inst,fields){var specified=(fields!=null);if(!specified){var now=this._determineTime(this._get(inst,'defaultTime'))||new Date();fields=[now.getHours(),now.getMinutes(),now.getSeconds()];}
var reset=false;var timeSteps=this._get(inst,'timeSteps');for(var i=0;i<timeSteps.length;i++){if(reset){fields[i]=0;}
else if(timeSteps[i]>1){fields[i]=Math.round(fields[i]/timeSteps[i])*timeSteps[i];reset=true;}}
return fields;},_showTime:function(inst){var show24Hours=this._get(inst,'show24Hours');var separator=this._get(inst,'separator');var currentTime=(this._formatNumber(show24Hours?inst._selectedHour:((inst._selectedHour+11)%12)+1)+separator+
this._formatNumber(inst._selectedMinute)+
(this._get(inst,'showSeconds')?separator+
this._formatNumber(inst._selectedSecond):'')+
(show24Hours?'':this._get(inst,'ampmPrefix')+
this._get(inst,'ampmNames')[(inst._selectedHour<12?0:1)]));this._setValue(inst,currentTime);this._showField(inst);},_showField:function(inst){var input=inst.input[0];var separator=this._get(inst,'separator');var fieldSize=separator.length+2;var start=(inst._field!=inst._ampmField?(inst._field*fieldSize):(inst._ampmField*fieldSize)-separator.length+this._get(inst,'ampmPrefix').length);var end=start+(inst._field!=inst._ampmField?2:this._get(inst,'ampmNames')[0].length);if(input.setSelectionRange){input.setSelectionRange(start,end);}
else if(input.createTextRange){var range=input.createTextRange();range.moveStart('character',start);range.moveEnd('character',end-inst.input.val().length);range.select();}
if(!input.disabled){input.focus();}},_formatNumber:function(value){return(value<10?'0':'')+value;},_setValue:function(inst,value){inst.input.val(value).trigger('change');},_previousField:function(inst,moveOut){var atFirst=(inst.input.val()==''||inst._field==0);if(!atFirst){inst._field--;}
this._showField(inst);inst._lastChr='';$.data(inst.input[0],PROP_NAME,inst);return(atFirst&&moveOut);},_nextField:function(inst,moveOut){var atLast=(inst.input.val()==''||inst._field==Math.max(1,inst._secondField,inst._ampmField));if(!atLast){inst._field++;}
this._showField(inst);inst._lastChr='';$.data(inst.input[0],PROP_NAME,inst);return(atLast&&moveOut);},_adjustField:function(inst,offset){if(inst.input.val()==''){offset=0;}
var timeSteps=this._get(inst,'timeSteps');this._setTime(inst,new Date(0,0,0,inst._selectedHour+(inst._field==0?offset*timeSteps[0]:0)+
(inst._field==inst._ampmField?offset*12:0),inst._selectedMinute+(inst._field==1?offset*timeSteps[1]:0),inst._selectedSecond+(inst._field==inst._secondField?offset*timeSteps[2]:0)));},_setTime:function(inst,time){time=this._determineTime(time);var fields=this._constrainTime(inst,time?[time.getHours(),time.getMinutes(),time.getSeconds()]:null);time=new Date(0,0,0,fields[0],fields[1],fields[2]);var time=this._normaliseTime(time);var minTime=this._normaliseTime(this._determineTime(this._get(inst,'minTime')));var maxTime=this._normaliseTime(this._determineTime(this._get(inst,'maxTime')));time=(minTime&&time<minTime?minTime:(maxTime&&time>maxTime?maxTime:time));var beforeSetTime=this._get(inst,'beforeSetTime');if(beforeSetTime){time=beforeSetTime.apply(inst.input[0],[this._getTimeTimeEntry(inst.input[0]),time,minTime,maxTime]);}
inst._selectedHour=time.getHours();inst._selectedMinute=time.getMinutes();inst._selectedSecond=time.getSeconds();this._showTime(inst);$.data(inst.input[0],PROP_NAME,inst);},_determineTime:function(setting){var offsetNumeric=function(offset){var time=new Date();time.setTime(time.getTime()+offset*1000);return time;};var offsetString=function(offset){var time=new Date();var hour=time.getHours();var minute=time.getMinutes();var second=time.getSeconds();var pattern=/([+-]?[0-9]+)\s*(s|S|m|M|h|H)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||'s'){case's':case'S':second+=parseInt(matches[1]);break;case'm':case'M':minute+=parseInt(matches[1]);break;case'h':case'H':hour+=parseInt(matches[1]);break;}
matches=pattern.exec(offset);}
time=new Date(0,0,10,hour,minute,second,0);if(/^!/.test(offset)){if(time.getDate()>10){time=new Date(0,0,10,23,59,59);}
else if(time.getDate()<10){time=new Date(0,0,10,0,0,0);}}
return time;};return(setting?(typeof setting=='string'?offsetString(setting):(typeof setting=='number'?offsetNumeric(setting):setting)):null);},_normaliseTime:function(time){if(!time){return null;}
time.setFullYear(1900);time.setMonth(0);time.setDate(0);return time;},_handleKeyPress:function(inst,chr){if(chr==this._get(inst,'separator')){this._nextField(inst,false);}
else if(chr>='0'&&chr<='9'){var value=(inst._lastChr+chr)*1;var show24Hours=this._get(inst,'show24Hours');var hour=(inst._field==0&&((show24Hours&&value<24)||(value>=1&&value<=12))?value+(!show24Hours&&inst._selectedHour>=12?12:0):inst._selectedHour);var minute=(inst._field==1&&value<60?value:inst._selectedMinute);var second=(inst._field==inst._secondField&&value<60?value:inst._selectedSecond);var fields=this._constrainTime(inst,[hour,minute,second]);this._setTime(inst,new Date(0,0,0,fields[0],fields[1],fields[2]));inst._lastChr=chr;}
else if(!this._get(inst,'show24Hours')){var ampmNames=this._get(inst,'ampmNames');if((chr==ampmNames[0].substring(0,1).toLowerCase()&&inst._selectedHour>=12)||(chr==ampmNames[1].substring(0,1).toLowerCase()&&inst._selectedHour<12)){var saveField=inst._field;inst._field=inst._ampmField;this._adjustField(inst,+1);inst._field=saveField;this._showField(inst);}}}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null){target[name]=null;}}
return target;}
$.fn.timeEntry=function(options){var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=='string'&&(options=='isDisabled'||options=='getTime')){return $.timeEntry['_'+options+'TimeEntry'].apply($.timeEntry,[this[0]].concat(otherArgs));}
return this.each(function(){var nodeName=this.nodeName.toLowerCase();if(nodeName=='input'){if(typeof options=='string'){$.timeEntry['_'+options+'TimeEntry'].apply($.timeEntry,[this].concat(otherArgs));}
else{var inlineSettings={};for(attrName in $.timeEntry._defaults){var attrValue=this.getAttribute('time:'+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue);}
catch(err){inlineSettings[attrName]=attrValue;}}}
$.timeEntry._connectTimeEntry(this,$.extend(inlineSettings,options));}}});};$.timeEntry=new TimeEntry();})(jQuery);
jQuery.fn.extend({emptyonclick:function(options){return this.each(function(){new jQuery.EmptyOnClick(this,options);});}});jQuery.EmptyOnClick=function(element,options){var defaultValue=$(element).val();if(options!=undefined&&options!=null){if(options.RemoveClass!=undefined&&options.RemoveClass!=null){if(options.RemoveClass){$(element).removeClass("watermarkOn");}}}
$(element).bind("focus",function(e){if(defaultValue==$(this).val()){$(this).val('');$(this).removeClass("watermarkOn");}}).bind("blur",function(e){if(!$(this).val()){$(this).val(defaultValue);$(this).addClass("watermarkOn");}});};
(function($){var map=new Array();$.Watermark={ShowAll:function(){for(var i=0;i<map.length;i++){if(map[i].obj.val()==""){map[i].obj.val(map[i].text);map[i].obj.css("color",map[i].WatermarkColor);}else{map[i].obj.css("color",map[i].DefaultColor);}}},HideAll:function(){for(var i=0;i<map.length;i++){if(map[i].obj.val()==map[i].text)
map[i].obj.val("");}}}
$.fn.Watermark=function(text,color){if(!color)
color="#aaa";return this.each(function(){var input=$(this);var defaultColor=input.css("color");map[map.length]={text:text,obj:input,DefaultColor:defaultColor,WatermarkColor:color};function clearMessage(){if(input.val()==text)
input.val("");input.css("color",defaultColor);}
function insertMessage(){if(input.val().length==0||input.val()==text){input.val(text);input.css("color",color);}else
input.css("color",defaultColor);}
input.focus(clearMessage);input.blur(insertMessage);input.change(insertMessage);insertMessage();});};})(jQuery);
(function($)
{$.fn.wresize=function(f)
{version='1.1';wresize={fired:false,width:0};function resizeOnce()
{if($.browser.msie)
{if(!wresize.fired)
{wresize.fired=true;}
else
{var version=parseInt($.browser.version,10);wresize.fired=false;if(version<7)
{return false;}
else if(version==7)
{var width=$(window).width();if(width!=wresize.width)
{wresize.width=width;return false;}}}}
return true;}
function handleWResize(e)
{if(resizeOnce())
{return f.apply(this,[e]);}}
this.each(function()
{if(this==window)
{$(this).resize(handleWResize);}
else
{$(this).resize(f);}});return this;};})(jQuery);
(function(jQuery){jQuery.fn.typeWatch=function(o){var options=jQuery.extend({wait:750,callback:function(){},highlight:true,captureLength:2,ignoreText:''},o);function checkElement(timer,override){var elTxt=jQuery(timer.el).val();if(elTxt.length==0&&timer.text==options.ignoreText||elTxt==options.ignoreText&&timer.text.length==0){return;}
if(((elTxt.length>options.captureLength||elTxt.length==0)&&elTxt.toUpperCase()!=timer.text)||(override&&elTxt.length>options.captureLength)){timer.text=elTxt.toUpperCase();timer.cb(elTxt);}};function watchElement(elem){if(elem.type.toUpperCase()=="TEXT"||elem.nodeName.toUpperCase()=="TEXTAREA"){var timer={timer:null,text:jQuery(elem).val().toUpperCase(),cb:options.callback,el:elem,wait:options.wait};if(options.highlight){jQuery(elem).focus(function(){this.select();});}
var startWatch=function(evt){var timerWait=timer.wait;var overrideBool=false;if(evt.keyCode==13&&this.type.toUpperCase()=="TEXT"){timerWait=1;overrideBool=true;}
var timerCallbackFx=function(){checkElement(timer,overrideBool)}
clearTimeout(timer.timer);timer.timer=setTimeout(timerCallbackFx,timerWait);};jQuery(elem).keydown(startWatch);}};return this.each(function(index){watchElement(this);});};})(jQuery);
(function($){function Simpletip(elem,conf){var self=this;elem=jQuery(elem);var tooltip=jQuery(document.createElement('div')).addClass(conf.baseClass).addClass((conf.fixed)?conf.fixedClass:'').addClass((conf.persistent)?conf.persistentClass:'').html(conf.content).appendTo(elem);if(!conf.hidden)tooltip.show();else tooltip.hide();if(!conf.persistent){elem.hover(function(event){self.show(event)},function(){self.hide()});if(!conf.fixed){elem.mousemove(function(event){if(tooltip.css('display')!=='none')self.updatePos(event);});};}else
{elem.click(function(event){if(event.target===elem.get(0)){if(tooltip.css('display')!=='none')self.hide();else
self.show();};});jQuery(window).mousedown(function(event){if(tooltip.css('display')!=='none'){var check=(conf.focus)?jQuery(event.target).parents('.tooltip').andSelf().filter(function(){return this===tooltip.get(0)}).length:0;if(check===0)self.hide();};});};jQuery.extend(self,{getVersion:function(){return[1,2,0];},getParent:function(){return elem;},getTooltip:function(){return tooltip;},getPos:function(){return tooltip.offset();},setPos:function(posX,posY){var elemPos=elem.offset();if(typeof posX=='string')posX=parseInt(posX)+elemPos.left;if(typeof posY=='string')posY=parseInt(posY)+elemPos.top;tooltip.css({left:posX,top:posY});return self;},show:function(event){conf.onBeforeShow.call(self);self.updatePos((conf.fixed)?null:event);switch(conf.showEffect){case'fade':tooltip.fadeIn(conf.showTime);break;case'slide':tooltip.slideDown(conf.showTime,self.updatePos);break;case'custom':conf.showCustom.call(tooltip,conf.showTime);break;default:case'none':tooltip.show();break;};tooltip.addClass(conf.activeClass);conf.onShow.call(self);return self;},hide:function(){conf.onBeforeHide.call(self);switch(conf.hideEffect){case'fade':tooltip.fadeOut(conf.hideTime);break;case'slide':tooltip.slideUp(conf.hideTime);break;case'custom':conf.hideCustom.call(tooltip,conf.hideTime);break;default:case'none':tooltip.hide();break;};tooltip.removeClass(conf.activeClass);conf.onHide.call(self);return self;},update:function(content){tooltip.html(content);conf.content=content;return self;},load:function(uri,data){conf.beforeContentLoad.call(self);tooltip.load(uri,data,function(){conf.onContentLoad.call(self);});return self;},boundryCheck:function(posX,posY){var newX=posX+tooltip.outerWidth();var newY=posY+tooltip.outerHeight();var windowWidth=jQuery(window).width()+jQuery(window).scrollLeft();var windowHeight=jQuery(window).height()+jQuery(window).scrollTop();return[(newX>=windowWidth),(newY>=windowHeight)];},updatePos:function(event){var tooltipWidth=tooltip.outerWidth();var tooltipHeight=tooltip.outerHeight();if(!event&&conf.fixed){if(conf.position.constructor==Array){posX=parseInt(conf.position[0]);posY=parseInt(conf.position[1]);}else if(jQuery(conf.position).attr('nodeType')===1){var offset=jQuery(conf.position).offset();posX=offset.left;posY=offset.top;}else
{var elemPos=elem.offset();var elemWidth=elem.outerWidth();var elemHeight=elem.outerHeight();switch(conf.position){case'top':var posX=elemPos.left-(tooltipWidth/2)+(elemWidth/2);var posY=elemPos.top-tooltipHeight;break;case'bottom':var posX=elemPos.left-(tooltipWidth/2)+(elemWidth/2);var posY=elemPos.top+elemHeight;break;case'left':var posX=elemPos.left-tooltipWidth;var posY=elemPos.top-(tooltipHeight/2)+(elemHeight/2);break;case'right':var posX=elemPos.left+elemWidth;var posY=elemPos.top-(tooltipHeight/2)+(elemHeight/2);break;default:case'default':var posX=(elemWidth/2)+elemPos.left+20;var posY=elemPos.top;break;};};}else
{var posX=event.pageX;var posY=event.pageY;};if(typeof conf.position!='object'){posX=posX+conf.offset[0];posY=posY+conf.offset[1];if(conf.boundryCheck){var overflow=self.boundryCheck(posX,posY);if(overflow[0])posX=posX-(tooltipWidth/2)-(2*conf.offset[0]);if(overflow[1])posY=posY-(tooltipHeight/2)-(2*conf.offset[1]);}}else
{if(typeof conf.position[0]=="string")posX=String(posX);if(typeof conf.position[1]=="string")posY=String(posY);};self.setPos(posX,posY);return self;}});};jQuery.fn.simpletip=function(conf){var api=jQuery(this).eq(typeof conf=='number'?conf:0).data("simpletip");if(api)return api;var defaultConf={content:'A simple tooltip',persistent:false,focus:false,hidden:true,position:'default',offset:[0,0],boundryCheck:true,fixed:true,showEffect:'fade',showTime:150,showCustom:null,hideEffect:'fade',hideTime:150,hideCustom:null,baseClass:'tooltip',activeClass:'active',fixedClass:'fixed',persistentClass:'persistent',focusClass:'focus',onBeforeShow:function(){},onShow:function(){},onBeforeHide:function(){},onHide:function(){},beforeContentLoad:function(){},onContentLoad:function(){}};jQuery.extend(defaultConf,conf);this.each(function(){var el=new Simpletip(jQuery(this),defaultConf);jQuery(this).data("simpletip",el);});return this;};})();;(function($){$.fn.sexyCombo=function(config){config=config||{};var defaults={css:"combo",blankImageSrc:"s.gif",selectboxDefaultValue:"",ignoreSelectboxDefaultValue:true,width:146,emptyText:"",autoComplete:false,triggerSelected:false,name:"",maxLength:0};config=$.extend(defaults,config);return this.each(function(){if("SELECT"!=this.tagName.toUpperCase())
return;var $selectbox=$(this);var $wrapper=$selectbox.wrap("<div>").hide().parent().addClass("combo");if(!config.name.length){config.name=$selectbox.attr("name")+"__sexyCombo";}
var $input=$("<input />").appendTo($wrapper).attr("autocomplete","off").attr("value","").attr("name",config.name).attr("id",config.name);if(config.maxLength>0){$input.attr("maxlength",config.maxLength);}
var $icon=$("<img />").appendTo($wrapper).attr("src",config.blankImageSrc);var $listWrapper=$("<div>").appendTo($wrapper).addClass("invisible");var $list=$("<ul />").appendTo($listWrapper);$selectbox.children().each(function(){var $this=$(this);if((false!==config.selectboxDefaultValue)&&(config.ignoreSelectboxDefaultValue)&&($this.val()==config.selectboxDefaultValue)){return;}
$("<li />").appendTo($list).text($this.text()).attr("title",$this.text()).addClass("visible");});var $listItems=$list.children();if($.browser.opera){$wrapper.css({position:"relative",left:"0",top:"0"});}
$wrapper.width(config.width);$input.width(config.width-$icon.width());$listWrapper.css("width",config.width-2);var iconWidth=parseInt($input.css("width"));if(iconWidth!=undefined&&iconWidth!=null)
$icon.css("left",iconWidth+7);else
$icon.css("left",$input.css("width"));if($.browser.opera||$.browser.msie){$icon.one("click",function(e){$wrapper.attr("sexycombo:comboY",e.pageY);});}
var setSelectboxValue=function(){var set=false;var initVal=$selectbox.val();$selectbox.children().each(function(){if(set){return;}
var $this=$(this);if($this.text()==$input.val()){$selectbox.val($this.attr("value"));set=true;}});if(!set){$selectbox.val(config.selectboxDefaultValue);}
if(initVal!=$selectbox.val()){$selectbox.trigger("change");}};var getLiHeight=function(){var height=0;$listItems.each(function(){var $this=$(this);if($this.is(".visible")){height+=parseInt($this.css("height"),10);}});return height;};var correctListHeight=function(){if(getLiHeight()<$listWrapper.height()){$listWrapper.height(getLiHeight());}
else if(getLiHeight()>$listWrapper.height()){var maxHeight=parseInt($listWrapper.css("maxHeight"));if(isNaN(maxHeight)){$listWrapper.height(getLiHeight());}else{$listWrapper.height(Math.min(maxHeight,getLiHeight()));}}};var correctOverflow=function(){if(getLiHeight()>parseInt($listWrapper.css("maxHeight"),10)){$listWrapper.css($.browser.opera?"overflow":"overflowY","scroll");}
else{$listWrapper.css($.browser.opera?"overflow":"overflowY","hidden");}};correctListHeight();correctOverflow();var selection=function(field,start,end){if(field.createTextRange){var selRange=field.createTextRange();selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}else if(field.setSelectionRange){field.setSelectionRange(start,end);}else{if(field.selectionStart){field.selectionStart=start;field.selectionEnd=end;}}
field.focus();};var selectFirst=function(){if($listItems.filter(".visible:eq(0)").is(".active")){return;}
$listItems.removeClass("active").filter(".visible:eq(0)").addClass("active");if(config.autoComplete){var curVal=$input.val();$input.val($listItems.filter(".active").text());selection($input.get(0),curVal.length,$input.val().length);$input.get(0).focus();}};var showList=function(){$listWrapper.removeClass("invisible").addClass("visible");$listWrapper.css("display","block");$wrapper.css("zIndex","999");var comboEdge=$wrapper.position().top+$listWrapper.height()+21-$(window).scrollTop();var screenHeight=$(window).height();if(comboEdge>screenHeight){$listWrapper.css({top:"auto",bottom:"21px"});}
else{$listWrapper.css({top:"21px",bottom:"auto"});}};var hideList=function(){$listWrapper.removeClass("visible").addClass("invisible");$listWrapper.css("display","none");$wrapper.css("zIndex","0");$listItems.filter(".active").removeClass("active")};$icon.hover(function(){$icon.css({backgroundPosition:"-17px 0"});},function(){$icon.css({backgroundPosition:"0 0"});});$icon.bind("click",function(){if($listWrapper.is(".invisible")){showList();}
else if($listWrapper.is(".visible")){hideList();}
$input.focus();});$listItems.bind("mouseover",function(){$listItems.removeClass("active");$(this).addClass("active");});$(document).bind("click",function(e){if(($icon.get(0)==e.target)||($input.get(0)==e.target)){return;}
hideList();});var select=function(val){$input.removeClass("gray").val(val);setSelectboxValue();hideList();};if(config.triggerSelected){$selectbox.children().each(function(){var $this=$(this);if(true==$this.attr("selected")){select($this.text());}});}
$listItems.bind("click",function(e){select($(this).text());filterList();});var filterList=function(){var val=$.trim($input.val().toLowerCase());$listItems.each(function(){var $this=$(this);if($this.text().toLowerCase().search(val)!=0){$this.removeClass("visible").addClass("invisible");}
else{$this.removeClass("invisible").addClass("visible");}});correctListHeight();correctOverflow();};var getSelected=function(){return $listItems.filter(".active:first");};var selectNext=function(){if(!$listItems.filter(".active:first").is("li.visible")){selectFirst();return;}
if(!$listItems.filter(".active").nextAll("li.visible:first").is("li.visible")){return;}
$listItems.filter(".active").removeClass("active").nextAll("li.visible:first").addClass("active");var activeReached=false;var num=0;$listItems.filter(".visible").each(function(){if(activeReached){return;}
var $this=$(this);++num;if($this.is(".active")){activeReached=true;}});if($.browser.opera){++num;}
var scrollNeed=$listItems.filter(".active").height()*num-parseInt($listWrapper.height(),10);if($.browser.msie){scrollNeed+=num;}
if($listWrapper.scrollTop()<scrollNeed){$listWrapper.scrollTop(scrollNeed);}};var selectPrev=function(){if(!$listItems.filter(".active:first").is("li.visible")){selectFirst();return;}
if(!$listItems.filter(".active").prevAll("li.visible:first").is("li.visible")){return;}
$listItems.filter(".active").removeClass("active").prevAll("li.visible:first").addClass("active");var activeReached=false;var num=0;$listItems.each(function(){if(activeReached){return;}
if($(this).is(".active")){activeReached=true;}
++num;});--num;var maxScroll=num*$listItems.filter(".active").height();if($listWrapper.scrollTop()>maxScroll){$listWrapper.scrollTop(maxScroll);}};var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};$input.bind("keypress",function(e){if(KEY.RETURN==e.keyCode){e.preventDefault();}});$input.bind("keydown",function(e){switch(e.keyCode){case KEY.RETURN:select(getSelected().text());filterList();hideList();e.preventDefault();selection($input.get(0),$input.val().length-1,0);$input.get(0).blur();break;case KEY.DOWN:selectNext();return false;case KEY.UP:selectPrev();return false;case KEY.TAB:if(getSelected().text()){select(getSelected().text());filterList();selection($input.get(0),$input.val().length-1,0);}
hideList();break;default:filterList();if($listItems.filter(".visible").get().length){showList();}
else{hideList();}
setSelectboxValue();}});if(config.emptyText.length){if(""==$input.val()){$input.addClass("gray").val(config.emptyText);}
$input.bind("focus",function(){if($input.is(".gray")){$input.removeClass("gray").val("");}}).bind("blur",function(){if(""==$input.val()){$input.addClass("gray").val(config.emptyText);}});}});};})(jQuery);
(function($){$.jGrowl=function(m,o){if($('#jGrowl').size()==0)$('<div id="jGrowl"></div>').addClass($.jGrowl.defaults.position).appendTo('body');$('#jGrowl').jGrowl(m,o);};$.fn.jGrowl=function(m,o){if($.isFunction(this.each)){var args=arguments;return this.each(function(){var self=this;if($(this).data('jGrowl.instance')==undefined){$(this).data('jGrowl.instance',new $.fn.jGrowl());$(this).data('jGrowl.instance').startup(this);}
if($.isFunction($(this).data('jGrowl.instance')[m])){$(this).data('jGrowl.instance')[m].apply($(this).data('jGrowl.instance'),$.makeArray(args).slice(1));}else{$(this).data('jGrowl.instance').notification(m,o);}});};};$.extend($.fn.jGrowl.prototype,{defaults:{header:'',sticky:false,position:'top-right',glue:'after',theme:'default',growlId:'',corners:'10px',check:500,life:3000,speed:'normal',easing:'swing',closer:true,closeTemplate:'&times;',closerTemplate:'<div>[ close all ]</div>',log:function(e,m,o){},beforeOpen:function(e,m,o){},open:function(e,m,o){},afterOpen:function(e,m,o){},beforeClose:function(e,m,o){},close:function(e,m,o){},animateOpen:{opacity:'show'},animateClose:{opacity:'hide'}},element:null,interval:null,notification:function(message,o){var self=this;var o=$.extend({},this.defaults,o);o.log.apply(this.element,[this.element,message,o]);if(o.ajaxRequest&&o.ajaxRequest.allowRetry){message+='<br /><br /><a href="#" onclick="$.ajax($(this).parent().parent().data(\'jGrowl\').ajaxRequest); $(this).parent().parent().trigger(\'jGrowl.close\').remove(); return false;">Retry</a>';}
var notification=$('<div id="'+o.growlId+'" class="jGrowl-notification"><div class="close">'+o.closeTemplate+'</div><div class="icon"></div><div class="header">'+o.header+'</div><div class="message">'+message+'</div></div>').data("jGrowl",o).addClass(o.theme).children('div.close').bind("click.jGrowl",function(){$(this).unbind('click.jGrowl').parent().trigger('jGrowl.beforeClose').animate(o.animateClose,o.speed,o.easing,function(){$(this).trigger('jGrowl.close').remove();});}).parent();(o.glue=='after')?$('div.jGrowl-notification:last',this.element).after(notification):$('div.jGrowl-notification:first',this.element).before(notification);$(notification).bind("mouseover.jGrowl",function(){$(this).data("jGrowl").pause=true;}).bind("mouseout.jGrowl",function(){$(this).data("jGrowl").pause=false;}).bind('jGrowl.beforeOpen',function(){o.beforeOpen.apply(self.element,[self.element,message,o]);}).bind('jGrowl.open',function(){o.open.apply(self.element,[self.element,message,o]);}).bind('jGrowl.beforeClose',function(){o.beforeClose.apply(self.element,[self.element,message,o]);}).bind('jGrowl.close',function(){o.close.apply(self.element,[self.element,message,o]);}).trigger('jGrowl.beforeOpen').animate(o.animateOpen,o.speed,o.easing,function(){$(this).data("jGrowl").created=new Date();o.afterOpen.apply(self.element,[self.element,message,o]);}).trigger('jGrowl.open');if($.fn.corner!=undefined)$(notification).corner(o.corners);if($('div.jGrowl-notification:parent',this.element).size()>1&&$('div.jGrowl-closer',this.element).size()==0&&this.defaults.closer!=false){$(this.defaults.closerTemplate).addClass('jGrowl-closer').addClass(this.defaults.theme).appendTo(this.element).animate(this.defaults.animateOpen,this.defaults.speed,this.defaults.easing).bind("click.jGrowl",function(){$(this).siblings().children('div.close').trigger("click.jGrowl");if($.isFunction(self.defaults.closer))self.defaults.closer.apply($(this).parent()[0],[$(this).parent()[0]]);});};},update:function(){$(this.element).find('div.jGrowl-notification:parent').each(function(){if($(this).data("jGrowl")!=undefined&&$(this).data("jGrowl").created!=undefined&&($(this).data("jGrowl").created.getTime()+$(this).data("jGrowl").life)<(new Date()).getTime()&&$(this).data("jGrowl").sticky!=true&&($(this).data("jGrowl").pause==undefined||$(this).data("jGrowl").pause!=true)){$(this).children('div.close').trigger('click.jGrowl');}});if($(this.element).find('div.jGrowl-notification:parent').size()<2){$(this.element).find('div.jGrowl-closer').animate(this.defaults.animateClose,this.defaults.speed,this.defaults.easing,function(){$(this).remove();});};},startup:function(e){this.element=$(e).addClass('jGrowl').append('<div class="jGrowl-notification"></div>');this.interval=setInterval(function(){jQuery(e).data('jGrowl.instance').update();},this.defaults.check);if($.browser.msie&&parseInt($.browser.version)<7&&!window["XMLHttpRequest"])$(this.element).addClass('jgIE6');},shutdown:function(){$(this.element).removeClass('jGrowl').find('div.jGrowl-notification').remove();clearInterval(this.interval);}});$.jGrowl.defaults=$.fn.jGrowl.prototype.defaults;})(jQuery);
function getFlexiGridSettings(cookieName,defaults){var cookieValue=$.cookie(cookieName);if(cookieValue!=null&&cookieValue.length>0)
return eval('('+cookieValue+')');else
return defaults;}
function saveFlexiGridSettings(cookieName,sortName,sortOrder,page){$.cookie(cookieName,"{ \"SortName\": \""+sortName+"\", \"SortOrder\": \""+sortOrder+"\", \"Page\": \""+page+"\" }",{path:'/'});}
(function($){$.addFlex=function(t,p)
{if(t.grid)return false;p=$.extend({height:200,width:'auto',striped:true,novstripe:false,minwidth:30,minheight:80,resizable:true,url:false,method:'POST',dataType:'xml',errormsg:'Connection Error',usepager:false,nowrap:true,page:1,total:1,useRp:true,rp:15,rpOptions:[10,15,20,25,40],title:false,pagestat:'Displaying {from} to {to} of {total} items',procmsg:'Processing, please wait ...',query:'',qtype:'',nomsg:'No items',minColToggle:1,showToggleBtn:true,hideOnSubmit:true,autoload:true,blockOpacity:0.5,onToggleCol:false,onChangeSort:false,onSuccess:false,onSubmit:false,onReturnEmptyTotal:false},p);$(t).show().attr({cellPadding:0,cellSpacing:0,border:0}).removeAttr('width');var g={hset:{},rePosDrag:function(){var cdleft=0-this.hDiv.scrollLeft;if(this.hDiv.scrollLeft>0)cdleft-=Math.floor(p.cgwidth/2);$(g.cDrag).css({top:g.hDiv.offsetTop+1});var cdpad=this.cdpad;$('div',g.cDrag).hide();$('thead tr:first th:visible',this.hDiv).each
(function()
{var n=$('thead tr:first th:visible',g.hDiv).index(this);var cdpos=parseInt($('div',this).width());var ppos=cdpos;if(cdleft==0)
cdleft-=Math.floor(p.cgwidth/2);cdpos=cdpos+cdleft+cdpad;$('div:eq('+n+')',g.cDrag).css({'left':cdpos+'px'}).show();cdleft=cdpos;});},fixHeight:function(newH){newH=false;if(!newH)newH=$(g.bDiv).height();var hdHeight=$(this.hDiv).height();$('div',this.cDrag).each(function()
{$(this).height(newH+hdHeight);});var nd=parseInt($(g.nDiv).height());if(nd>newH)
$(g.nDiv).height(newH).width(200);else
$(g.nDiv).height('auto').width('auto');$(g.block).css({height:newH,marginBottom:(newH*-1)});var hrH=g.bDiv.offsetTop+newH;if(p.height!='auto'&&p.resizable)hrH=g.vDiv.offsetTop;$(g.rDiv).css({height:hrH});},dragStart:function(dragtype,e,obj){if(dragtype=='colresize')
{$(g.nDiv).hide();$(g.nBtn).hide();var n=$('div',this.cDrag).index(obj);var ow=$('th:visible div:eq('+n+')',this.hDiv).width();$(obj).addClass('dragging').siblings().hide();$(obj).prev().addClass('dragging').show();this.colresize={startX:e.pageX,ol:parseInt(obj.style.left),ow:ow,n:n};$('body').css('cursor','col-resize');}
else if(dragtype=='vresize')
{var hgo=false;$('body').css('cursor','row-resize');if(obj)
{hgo=true;$('body').css('cursor','col-resize');}
this.vresize={h:p.height,sy:e.pageY,w:p.width,sx:e.pageX,hgo:hgo};}
else if(dragtype=='colMove')
{$(g.nDiv).hide();$(g.nBtn).hide();this.hset=$(this.hDiv).offset();this.hset.right=this.hset.left+$('table',this.hDiv).width();this.hset.bottom=this.hset.top+$('table',this.hDiv).height();this.dcol=obj;this.dcoln=$('th',this.hDiv).index(obj);this.colCopy=document.createElement("div");this.colCopy.className="colCopy";this.colCopy.innerHTML=obj.innerHTML;if($.browser.msie)
{this.colCopy.className="colCopy ie";}
$(this.colCopy).css({position:'absolute',float:'left',display:'none',textAlign:obj.align});$('body').append(this.colCopy);$(this.cDrag).hide();}
$('body').noSelect();},dragMove:function(e){if(this.colresize)
{var n=this.colresize.n;var diff=e.pageX-this.colresize.startX;var nleft=this.colresize.ol+diff;var nw=this.colresize.ow+diff;if(nw>p.minwidth)
{$('div:eq('+n+')',this.cDrag).css('left',nleft);this.colresize.nw=nw;}}
else if(this.vresize)
{var v=this.vresize;var y=e.pageY;var diff=y-v.sy;if(!p.defwidth)p.defwidth=p.width;if(p.width!='auto'&&!p.nohresize&&v.hgo)
{var x=e.pageX;var xdiff=x-v.sx;var newW=v.w+xdiff;if(newW>p.defwidth)
{this.gDiv.style.width=newW+'px';p.width=newW;}}
var newH=v.h+diff;if((newH>p.minheight||p.height<p.minheight)&&!v.hgo)
{this.bDiv.style.height=newH+'px';p.height=newH;this.fixHeight(newH);}
v=null;}
else if(this.colCopy){$(this.dcol).addClass('thMove').removeClass('thOver');if(e.pageX>this.hset.right||e.pageX<this.hset.left||e.pageY>this.hset.bottom||e.pageY<this.hset.top)
{$('body').css('cursor','move');}
else
$('body').css('cursor','pointer');$(this.colCopy).css({top:e.pageY+10,left:e.pageX+20,display:'block'});}},dragEnd:function(){if(this.colresize)
{var n=this.colresize.n;var nw=this.colresize.nw;$('th:visible div:eq('+n+')',this.hDiv).css('width',nw);$('tr',this.bDiv).each(function()
{$('td:visible div:eq('+n+')',this).css('width',nw);});this.hDiv.scrollLeft=this.bDiv.scrollLeft;$('div:eq('+n+')',this.cDrag).siblings().show();$('.dragging',this.cDrag).removeClass('dragging');this.rePosDrag();this.fixHeight();this.colresize=false;}
else if(this.vresize)
{this.vresize=false;}
else if(this.colCopy)
{$(this.colCopy).remove();if(this.dcolt!=null)
{if(this.dcoln>this.dcolt)
$('th:eq('+this.dcolt+')',this.hDiv).before(this.dcol);else
$('th:eq('+this.dcolt+')',this.hDiv).after(this.dcol);this.switchCol(this.dcoln,this.dcolt);$(this.cdropleft).remove();$(this.cdropright).remove();this.rePosDrag();}
this.dcol=null;this.hset=null;this.dcoln=null;this.dcolt=null;this.colCopy=null;$('.thMove',this.hDiv).removeClass('thMove');$(this.cDrag).show();}
$('body').css('cursor','default');$('body').noSelect(false);},toggleCol:function(cid,visible){var ncol=$("th[axis='col"+cid+"']",this.hDiv)[0];var n=$('thead th',g.hDiv).index(ncol);var cb=$('input[value='+cid+']',g.nDiv)[0];if(visible==null)
{visible=ncol.hide;}
if($('input:checked',g.nDiv).length<p.minColToggle&&!visible)return false;if(visible)
{ncol.hide=false;$(ncol).show();cb.checked=true;}
else
{ncol.hide=true;$(ncol).hide();cb.checked=false;}
$('tbody tr',t).each
(function()
{if(visible)
$('td:eq('+n+')',this).show();else
$('td:eq('+n+')',this).hide();});this.rePosDrag();if(p.onToggleCol)p.onToggleCol(cid,visible);return visible;},switchCol:function(cdrag,cdrop){$('tbody tr',t).each
(function()
{if(cdrag>cdrop)
$('td:eq('+cdrop+')',this).before($('td:eq('+cdrag+')',this));else
$('td:eq('+cdrop+')',this).after($('td:eq('+cdrag+')',this));});if(cdrag>cdrop)
$('tr:eq('+cdrop+')',this.nDiv).before($('tr:eq('+cdrag+')',this.nDiv));else
$('tr:eq('+cdrop+')',this.nDiv).after($('tr:eq('+cdrag+')',this.nDiv));if($.browser.msie&&$.browser.version<7.0)$('tr:eq('+cdrop+') input',this.nDiv)[0].checked=true;this.hDiv.scrollLeft=this.bDiv.scrollLeft;},scroll:function(){this.hDiv.scrollLeft=this.bDiv.scrollLeft;this.rePosDrag();},addData:function(data){if(p.preProcess)
data=p.preProcess(data);$('.pReload',this.pDiv).removeClass('loading');this.loading=false;if(!data){this.writePagerMessage(p.errormsg);return false;}
if(p.dataType=='xml')
p.total=+$('rows total',data).text();else
p.total=data.total;if(p.total==0)
{$('tr, a, td, div',t).unbind();$(t).empty();p.pages=1;p.page=1;this.buildpager();this.writePagerMessage(p.nomsg);if(p.onReturnEmptyTotal)p.onReturnEmptyTotal();return false;}
p.pages=Math.ceil(p.total/p.rp);if(p.dataType=='xml')
p.page=+$('rows page',data).text();else
p.page=data.page;this.buildpager();var tbody=document.createElement('tbody');if(p.dataType=='json')
{$.each
(data.rows,function(i,row)
{var tr=document.createElement('tr');if(i%2&&p.striped)tr.className='erow';if(row.id)tr.id='row'+row.id;$('thead tr:first th',g.hDiv).each
(function()
{var td=document.createElement('td');var idx=$(this).attr('axis').substr(3);td.align=this.align;td.innerHTML=row.cell[idx];$(tr).append(td);td=null;});if($('thead',this.gDiv).length<1)
{for(idx=0;idx<cell.length;idx++)
{var td=document.createElement('td');td.innerHTML=row.cell[idx];$(tr).append(td);td=null;}}
$(tbody).append(tr);tr=null;});}else if(p.dataType=='xml'){i=1;$("rows row",data).each
(function()
{i++;var tr=document.createElement('tr');if(i%2&&p.striped)tr.className='erow';var nid=$(this).attr('id');if(nid)tr.id='row'+nid;nid=null;var robj=this;$('thead tr:first th',g.hDiv).each
(function()
{var td=document.createElement('td');var idx=$(this).attr('axis').substr(3);td.align=this.align;td.innerHTML=$("cell:eq("+idx+")",robj).text();$(tr).append(td);td=null;});if($('thead',this.gDiv).length<1)
{$('cell',this).each
(function()
{var td=document.createElement('td');td.innerHTML=$(this).text();$(tr).append(td);td=null;});}
$(tbody).append(tr);tr=null;robj=null;});}
$('tr',t).unbind();$(t).empty();$(t).append(tbody);this.addCellProp();this.addRowProp();this.rePosDrag();tbody=null;data=null;i=null;if(p.page>p.pages){this.changePage('last');return;}
if(p.onSuccess)p.onSuccess(this);if(p.hideOnSubmit)$(g.block).remove();this.hDiv.scrollLeft=this.bDiv.scrollLeft;if($.browser.opera)$(t).css('visibility','visible');},changeSort:function(th){if(this.loading)return true;$(g.nDiv).hide();$(g.nBtn).hide();if(p.sortname==$(th).attr('abbr'))
{if(p.sortorder=='asc')p.sortorder='desc';else p.sortorder='asc';}
$(th).addClass('sorted').siblings().removeClass('sorted');$('.sdesc',this.hDiv).removeClass('sdesc');$('.sasc',this.hDiv).removeClass('sasc');$('div',th).addClass('s'+p.sortorder);p.sortname=$(th).attr('abbr');if(p.onChangeSort)
p.onChangeSort(p.sortname,p.sortorder);else
this.populate();},writePagerMessage:function(message){if(p.usepager)
$('.pPageStat',this.pDiv).html(message);},buildpager:function(){$('.pcontrol input',this.pDiv).val(p.page);$('.pcontrol span',this.pDiv).html(p.pages);var r1=(p.page-1)*p.rp+1;var r2=r1+p.rp-1;if(p.total<r2)r2=p.total;var stat=p.pagestat;stat=stat.replace(/{from}/,r1);stat=stat.replace(/{to}/,r2);stat=stat.replace(/{total}/,p.total);this.writePagerMessage(stat);},populate:function(){if(this.loading)return true;if(p.onSubmit)
{var gh=p.onSubmit();if(!gh)return false;}
this.loading=true;if(!p.url)return false;this.writePagerMessage(p.procmsg);$('.pReload',this.pDiv).addClass('loading');$(g.block).css({top:g.bDiv.offsetTop});if(p.hideOnSubmit)$(this.gDiv).prepend(g.block);if($.browser.opera)$(t).css('visibility','hidden');if(!p.newp)p.newp=1;if(p.page>p.pages)p.page=p.pages;var param=[{name:'page',value:p.newp},{name:'rp',value:p.rp},{name:'sortname',value:p.sortname},{name:'sortorder',value:p.sortorder},{name:'query',value:p.query},{name:'qtype',value:p.qtype}];if(p.params)
{for(var pi=0;pi<p.params.length;pi++)param[param.length]=p.params[pi];}
$.ajax({type:p.method,url:p.url,data:param,dataType:p.dataType,success:function(data){g.addData(data);},error:function(data){try{if(p.onError)p.onError(data);}catch(e){}}});},doSearch:function(){p.query=$('input[name=q]',g.sDiv).val();p.qtype=$('select[name=qtype]',g.sDiv).val();p.newp=1;this.populate();},changePage:function(ctype){if(this.loading)return true;switch(ctype)
{case'first':p.newp=1;break;case'prev':if(p.page>1)p.newp=parseInt(p.page)-1;break;case'next':if(p.page<p.pages)p.newp=parseInt(p.page)+1;break;case'last':p.newp=p.pages;break;case'input':var nv=parseInt($('.pcontrol input',this.pDiv).val());if(isNaN(nv))nv=1;if(nv<1)nv=1;else if(nv>p.pages)nv=p.pages;$('.pcontrol input',this.pDiv).val(nv);p.newp=nv;break;}
if(p.newp==p.page)return false;if(p.onChangePage)
p.onChangePage(p.newp);else
this.populate();},addCellProp:function()
{$('tbody tr td',g.bDiv).each
(function()
{var tdDiv=document.createElement('div');var n=$('td',$(this).parent()).index(this);var pth=$('th:eq('+n+')',g.hDiv).get(0);if(pth!=null)
{if(p.sortname==$(pth).attr('abbr')&&p.sortname)
{this.className='sorted';}
$(tdDiv).css({textAlign:pth.align,width:$('div:first',pth)[0].style.width});if(pth.hide)$(this).css('display','none');}
if(p.nowrap==false)$(tdDiv).css('white-space','normal');if(this.innerHTML=='')this.innerHTML='&nbsp;';tdDiv.innerHTML=this.innerHTML;var prnt=$(this).parent()[0];var pid=false;if(prnt.id)pid=prnt.id.substr(3);if(pth!=null)
{if(pth.process)pth.process(tdDiv,pid);}
$(this).empty().append(tdDiv).removeAttr('width');});},getCellDim:function(obj)
{var ht=parseInt($(obj).height());var pht=parseInt($(obj).parent().height());var wt=parseInt(obj.style.width);var pwt=parseInt($(obj).parent().width());var top=obj.offsetParent.offsetTop;var left=obj.offsetParent.offsetLeft;var pdl=parseInt($(obj).css('paddingLeft'));var pdt=parseInt($(obj).css('paddingTop'));return{ht:ht,wt:wt,top:top,left:left,pdl:pdl,pdt:pdt,pht:pht,pwt:pwt};},addRowProp:function()
{$('tbody tr',g.bDiv).each
(function()
{$(this).click(function(e)
{var obj=(e.target||e.srcElement);if(obj.href||obj.type)return true;$(this).toggleClass('trSelected');if(p.singleSelect)$(this).siblings().removeClass('trSelected');}).mousedown(function(e)
{if(e.shiftKey)
{$(this).toggleClass('trSelected');g.multisel=true;this.focus();$(g.gDiv).noSelect();}}).mouseup(function()
{if(g.multisel)
{g.multisel=false;$(g.gDiv).noSelect(false);}}).hover(function(e)
{if(g.multisel)
{$(this).toggleClass('trSelected');}},function(){});if($.browser.msie&&$.browser.version<7.0)
{$(this).hover(function(){$(this).addClass('trOver');},function(){$(this).removeClass('trOver');});}});},pager:0};if(p.colModel)
{thead=document.createElement('thead');tr=document.createElement('tr');for(i=0;i<p.colModel.length;i++)
{var cm=p.colModel[i];var th=document.createElement('th');th.innerHTML=cm.display;if(cm.name&&cm.sortable)
$(th).attr('abbr',cm.name);$(th).attr('axis','col'+i);if(cm.align)
th.align=cm.align;if(cm.width)
$(th).attr('width',cm.width);if(cm.hide)
{th.hide=true;}
if(cm.process)
{th.process=cm.process;}
$(tr).append(th);}
$(thead).append(tr);$(t).prepend(thead);}
g.gDiv=document.createElement('div');g.mDiv=document.createElement('div');g.hDiv=document.createElement('div');g.bDiv=document.createElement('div');g.vDiv=document.createElement('div');g.rDiv=document.createElement('div');g.cDrag=document.createElement('div');g.block=document.createElement('div');g.nDiv=document.createElement('div');g.nBtn=document.createElement('div');g.iDiv=document.createElement('div');g.tDiv=document.createElement('div');g.sDiv=document.createElement('div');if(p.usepager)g.pDiv=document.createElement('div');g.hTable=document.createElement('table');g.gDiv.className='flexigrid';if(p.width!='auto')g.gDiv.style.width=p.width+'px';if($.browser.msie)
$(g.gDiv).addClass('ie');if(p.novstripe)
$(g.gDiv).addClass('novstripe');$(t).before(g.gDiv);$(g.gDiv).append(t);if(p.buttons)
{g.tDiv.className='tDiv';var tDiv2=document.createElement('div');tDiv2.className='tDiv2';for(i=0;i<p.buttons.length;i++)
{var btn=p.buttons[i];if(!btn.separator)
{var btnDiv=document.createElement('div');btnDiv.className='fbutton';btnDiv.innerHTML="<div><span>"+btn.name+"</span></div>";if(btn.bclass)
$('span',btnDiv).addClass(btn.bclass).css({paddingLeft:20});btnDiv.onpress=btn.onpress;btnDiv.name=btn.name;if(btn.onpress)
{$(btnDiv).click
(function()
{this.onpress(this.name,g.gDiv);});}
$(tDiv2).append(btnDiv);if($.browser.msie&&$.browser.version<7.0)
{$(btnDiv).hover(function(){$(this).addClass('fbOver');},function(){$(this).removeClass('fbOver');});}}else{$(tDiv2).append("<div class='btnseparator'></div>");}}
$(g.tDiv).append(tDiv2);$(g.tDiv).append("<div style='clear:both'></div>");$(g.gDiv).prepend(g.tDiv);}
g.hDiv.className='hDiv';$(t).before(g.hDiv);g.hTable.cellPadding=0;g.hTable.cellSpacing=0;$(g.hDiv).append('<div class="hDivBox"></div>');$('div',g.hDiv).append(g.hTable);var thead=$("thead:first",t).get(0);if(thead)$(g.hTable).append(thead);thead=null;if(!p.colmodel)var ci=0;$('thead tr:first th',g.hDiv).each
(function()
{var thdiv=document.createElement('div');if($(this).attr('abbr'))
{$(this).click(function(e)
{if(!$(this).hasClass('thOver'))return false;var obj=(e.target||e.srcElement);if(obj.href||obj.type)return true;g.changeSort(this);});if($(this).attr('abbr')==p.sortname)
{this.className='sorted';thdiv.className='s'+p.sortorder;}}
if(this.hide)$(this).hide();if(!p.colmodel)
{$(this).attr('axis','col'+ci++);}
$(thdiv).css({textAlign:this.align,width:this.width+'px'});thdiv.innerHTML=this.innerHTML;$(this).empty().append(thdiv).removeAttr('width').mousedown(function(e)
{g.dragStart('colMove',e,this);}).hover(function(){if(!g.colresize&&!$(this).hasClass('thMove')&&!g.colCopy)$(this).addClass('thOver');if($(this).attr('abbr')!=p.sortname&&!g.colCopy&&!g.colresize&&$(this).attr('abbr'))$('div',this).addClass('s'+p.sortorder);else if($(this).attr('abbr')==p.sortname&&!g.colCopy&&!g.colresize&&$(this).attr('abbr'))
{var no='';if(p.sortorder=='asc')no='desc';else no='asc';$('div',this).removeClass('s'+p.sortorder).addClass('s'+no);}
if(g.colCopy)
{var n=$('th',g.hDiv).index(this);if(n==g.dcoln)return false;if(n<g.dcoln)$(this).append(g.cdropleft);else $(this).append(g.cdropright);g.dcolt=n;}else if(!g.colresize){var nv=$('th:visible',g.hDiv).index(this);if(isNaN(nv))nv=0;var onl=parseInt($('div:eq('+nv+')',g.cDrag).css('left'));if(isNaN(onl))onl=0;var nw=parseInt($(g.nBtn).width())+parseInt($(g.nBtn).css('borderLeftWidth'));if(isNaN(nw))nw=0;var nl=onl-nw+Math.floor(p.cgwidth/2);if(isNaN(nl))nl=0;$(g.nDiv).hide();$(g.nBtn).hide();$(g.nBtn).css({'left':nl,top:g.hDiv.offsetTop}).show();var ndw=parseInt($(g.nDiv).width());$(g.nDiv).css({top:g.bDiv.offsetTop});if((nl+ndw)>$(g.gDiv).width())
$(g.nDiv).css('left',onl-ndw+1);else
$(g.nDiv).css('left',nl);if($(this).hasClass('sorted'))
$(g.nBtn).addClass('srtd');else
$(g.nBtn).removeClass('srtd');}},function(){$(this).removeClass('thOver');if($(this).attr('abbr')!=p.sortname)$('div',this).removeClass('s'+p.sortorder);else if($(this).attr('abbr')==p.sortname)
{var no='';if(p.sortorder=='asc')no='desc';else no='asc';$('div',this).addClass('s'+p.sortorder).removeClass('s'+no);}
if(g.colCopy)
{$(g.cdropleft).remove();$(g.cdropright).remove();g.dcolt=null;}});});g.bDiv.className='bDiv';$(t).before(g.bDiv);$(g.bDiv).css({height:(p.height=='auto')?'auto':p.height+"px"}).scroll(function(e){g.scroll()}).append(t);if(p.height=='auto')
{$('table',g.bDiv).addClass('autoht');}
g.addCellProp();g.addRowProp();var cdcol=$('thead tr:first th:first',g.hDiv).get(0);if(cdcol!=null)
{g.cDrag.className='cDrag';g.cdpad=0;g.cdpad+=(isNaN(parseInt($('div',cdcol).css('borderLeftWidth')))?0:parseInt($('div',cdcol).css('borderLeftWidth')));g.cdpad+=(isNaN(parseInt($('div',cdcol).css('borderRightWidth')))?0:parseInt($('div',cdcol).css('borderRightWidth')));g.cdpad+=(isNaN(parseInt($('div',cdcol).css('paddingLeft')))?0:parseInt($('div',cdcol).css('paddingLeft')));g.cdpad+=(isNaN(parseInt($('div',cdcol).css('paddingRight')))?0:parseInt($('div',cdcol).css('paddingRight')));g.cdpad+=(isNaN(parseInt($(cdcol).css('borderLeftWidth')))?0:parseInt($(cdcol).css('borderLeftWidth')));g.cdpad+=(isNaN(parseInt($(cdcol).css('borderRightWidth')))?0:parseInt($(cdcol).css('borderRightWidth')));g.cdpad+=(isNaN(parseInt($(cdcol).css('paddingLeft')))?0:parseInt($(cdcol).css('paddingLeft')));g.cdpad+=(isNaN(parseInt($(cdcol).css('paddingRight')))?0:parseInt($(cdcol).css('paddingRight')));$(g.bDiv).before(g.cDrag);var cdheight=$(g.bDiv).height();var hdheight=$(g.hDiv).height();$(g.cDrag).css({top:-hdheight+'px'});$('thead tr:first th',g.hDiv).each
(function()
{var cgDiv=document.createElement('div');$(g.cDrag).append(cgDiv);if(!p.cgwidth)p.cgwidth=$(cgDiv).width();$(cgDiv).css({height:cdheight+hdheight}).mousedown(function(e){g.dragStart('colresize',e,this);});if($.browser.msie&&$.browser.version<7.0)
{g.fixHeight($(g.gDiv).height());$(cgDiv).hover(function()
{g.fixHeight();$(this).addClass('dragging')},function(){if(!g.colresize)$(this).removeClass('dragging')});}});}
if(p.striped)
$('tbody tr:odd',g.bDiv).addClass('erow');if(p.resizable&&p.height!='auto')
{g.vDiv.className='vGrip';$(g.vDiv).mousedown(function(e){g.dragStart('vresize',e)}).html('<span></span>');$(g.bDiv).after(g.vDiv);}
if(p.resizable&&p.width!='auto'&&!p.nohresize)
{g.rDiv.className='hGrip';$(g.rDiv).mousedown(function(e){g.dragStart('vresize',e,true);}).html('<span></span>').css('height',$(g.gDiv).height());if($.browser.msie&&$.browser.version<7.0)
{$(g.rDiv).hover(function(){$(this).addClass('hgOver');},function(){$(this).removeClass('hgOver');});}
$(g.gDiv).append(g.rDiv);}
if(p.usepager)
{g.pDiv.className='pDiv';g.pDiv.innerHTML='<div class="pDiv2"></div>';$(g.bDiv).after(g.pDiv);var html=' <div class="pGroup"> <div title="First" class="pFirst pButton"><span></span></div><div title="Previous" class="pPrev pButton"><span></span></div> </div> <div class="btnseparator"></div> <div class="pGroup"><span class="pcontrol">Page <input type="text" size="4" value="1" /> of <span> 1 </span></span></div> <div class="btnseparator"></div> <div class="pGroup"> <div title="Next" class="pNext pButton"><span></span></div><div title="Last" class="pLast pButton"><span></span></div> </div> <div class="btnseparator"></div> <div class="pGroup"> <div title="Reload" class="pReload pButton"><span></span></div> </div> <div class="btnseparator"></div> <div class="pGroup"><span class="pPageStat"></span></div>';$('div',g.pDiv).html(html);$('.pReload',g.pDiv).click(function(){g.populate()});$('.pFirst',g.pDiv).click(function(){g.changePage('first')});$('.pPrev',g.pDiv).click(function(){g.changePage('prev')});$('.pNext',g.pDiv).click(function(){g.changePage('next')});$('.pLast',g.pDiv).click(function(){g.changePage('last')});$('.pcontrol input',g.pDiv).keydown(function(e){if(e.keyCode==13)g.changePage('input')});if($.browser.msie&&$.browser.version<7)$('.pButton',g.pDiv).hover(function(){$(this).addClass('pBtnOver');},function(){$(this).removeClass('pBtnOver');});if(p.useRp)
{var opt="";for(var nx=0;nx<p.rpOptions.length;nx++)
{if(p.rp==p.rpOptions[nx])sel='selected="selected"';else sel='';opt+="<option value='"+p.rpOptions[nx]+"' "+sel+" >"+p.rpOptions[nx]+"&nbsp;&nbsp;</option>";};$('.pDiv2',g.pDiv).prepend("<div class='pGroup'><select name='rp' title='Results Per Page'>"+opt+"</select></div> <div class='btnseparator'></div>");$('select',g.pDiv).change(function()
{if(p.onRpChange)
p.onRpChange(+this.value);else
{p.newp=1;p.rp=+this.value;g.populate();}});}
if(p.searchitems)
{$('.pDiv2',g.pDiv).prepend("<div class='pGroup'> <div title='Search' class='pSearch pButton'><span></span></div> </div>  <div class='btnseparator'></div>");$('.pSearch',g.pDiv).click(function(){$(g.sDiv).slideToggle('fast',function(){$('.sDiv:visible input:first',g.gDiv).trigger('focus');});});g.sDiv.className='sDiv';sitems=p.searchitems;var sopt="";for(var s=0;s<sitems.length;s++)
{if(p.qtype==''&&sitems[s].isdefault==true)
{p.qtype=sitems[s].name;sel='selected="selected"';}else sel='';sopt+="<option value='"+sitems[s].name+"' "+sel+" >"+sitems[s].display+"&nbsp;&nbsp;</option>";}
if(p.qtype=='')p.qtype=sitems[0].name;$(g.sDiv).append("<div class='sDiv2'>Quick Search <input type='text' size='30' name='q' class='qsbox' /> <select name='qtype'>"+sopt+"</select> <input type='button' value='Clear' /></div>");$('input[name=q]',g.sDiv).keydown(function(e){if(e.keyCode==13)g.doSearch()});$('select[name=qtype]',g.sDiv).keydown(function(e){if(e.keyCode==13)g.doSearch()});$('input[value=Clear]',g.sDiv).click(function(){$('input[name=q]',g.sDiv).val('');p.query='';g.doSearch();});$(g.bDiv).after(g.sDiv);}}
$(g.pDiv,g.sDiv).append("<div style='clear:both'></div>");if(p.title)
{g.mDiv.className='mDiv';g.mDiv.innerHTML='<div class="ftitle">'+p.title+'</div>';$(g.gDiv).prepend(g.mDiv);if(p.showTableToggleBtn)
{$(g.mDiv).append('<div class="ptogtitle" title="Minimize/Maximize Table"><span></span></div>');$('div.ptogtitle',g.mDiv).click
(function()
{$(g.gDiv).toggleClass('hideBody');$(this).toggleClass('vsble');});}}
g.cdropleft=document.createElement('span');g.cdropleft.className='cdropleft';g.cdropright=document.createElement('span');g.cdropright.className='cdropright';g.block.className='gBlock';var gh=$(g.bDiv).height();var gtop=g.bDiv.offsetTop;$(g.block).css({width:g.bDiv.style.width,height:gh,background:'white',position:'relative',marginBottom:(gh*-1),zIndex:1,top:gtop,left:'0px'});$(g.block).fadeTo(0,p.blockOpacity);if($('th',g.hDiv).length)
{g.nDiv.className='nDiv';g.nDiv.innerHTML="<table cellpadding='0' cellspacing='0'><tbody></tbody></table>";$(g.nDiv).css({marginBottom:(gh*-1),display:'none',top:gtop}).noSelect();var cn=0;$('th div',g.hDiv).each
(function()
{var kcol=$("th[axis='col"+cn+"']",g.hDiv)[0];var chk='checked="checked"';if(kcol.style.display=='none')chk='';$('tbody',g.nDiv).append('<tr><td class="ndcol1"><input type="checkbox" '+chk+' class="togCol" value="'+cn+'" /></td><td class="ndcol2">'+this.innerHTML+'</td></tr>');cn++;});if($.browser.msie&&$.browser.version<7.0)
$('tr',g.nDiv).hover
(function(){$(this).addClass('ndcolover');},function(){$(this).removeClass('ndcolover');});$('td.ndcol2',g.nDiv).click
(function()
{if($('input:checked',g.nDiv).length<=p.minColToggle&&$(this).prev().find('input')[0].checked)return false;return g.toggleCol($(this).prev().find('input').val());});$('input.togCol',g.nDiv).click
(function()
{if($('input:checked',g.nDiv).length<p.minColToggle&&this.checked==false)return false;$(this).parent().next().trigger('click');});$(g.gDiv).prepend(g.nDiv);$(g.nBtn).addClass('nBtn').html('<div></div>').attr('title','Hide/Show Columns').click
(function()
{$(g.nDiv).toggle();return true;});if(p.showToggleBtn)$(g.gDiv).prepend(g.nBtn);}
$(g.iDiv).addClass('iDiv').css({display:'none'});$(g.bDiv).append(g.iDiv);$(g.bDiv).hover(function(){$(g.nDiv).hide();$(g.nBtn).hide();},function(){if(g.multisel)g.multisel=false;});$(g.gDiv).hover(function(){},function(){$(g.nDiv).hide();$(g.nBtn).hide();});$(document).mousemove(function(e){g.dragMove(e)}).mouseup(function(e){g.dragEnd()}).hover(function(){},function(){g.dragEnd()});if($.browser.msie&&$.browser.version<7.0)
{$('.hDiv,.bDiv,.mDiv,.pDiv,.vGrip,.tDiv, .sDiv',g.gDiv).css({width:'100%'});$(g.gDiv).addClass('ie6');if(p.width!='auto')$(g.gDiv).addClass('ie6fullwidthbug');}
g.rePosDrag();g.fixHeight();t.p=p;t.grid=g;if(p.url&&p.autoload)
{g.populate();}
return t;};var docloaded=false;$(document).ready(function(){docloaded=true});$.fn.flexigrid=function(p){return this.each(function(){if(!docloaded)
{$(this).hide();var t=this;$(document).ready
(function()
{$.addFlex(t,p);});}else{$.addFlex(this,p);}});};$.fn.flexReload=function(p){return this.each(function(){if(this.grid&&this.p.url)this.grid.populate();});};$.fn.flexOptions=function(p){return this.each(function(){if(this.grid)$.extend(this.p,p);});};$.fn.flexToggleCol=function(cid,visible){return this.each(function(){if(this.grid)this.grid.toggleCol(cid,visible);});};$.fn.flexAddData=function(data){return this.each(function(){if(this.grid)this.grid.addData(data);});};$.fn.noSelect=function(p){if(p==null)
prevent=true;else
prevent=p;if(prevent){return this.each(function()
{if($.browser.msie||$.browser.safari)$(this).bind('selectstart',function(){return false;});else if($.browser.mozilla)
{$(this).css('MozUserSelect','none');$('body').trigger('focus');}
else if($.browser.opera)$(this).bind('mousedown',function(){return false;});else $(this).attr('unselectable','on');});}else{return this.each(function()
{if($.browser.msie||$.browser.safari)$(this).unbind('selectstart');else if($.browser.mozilla)$(this).css('MozUserSelect','inherit');else if($.browser.opera)$(this).unbind('mousedown');else $(this).removeAttr('unselectable','on');});}};})(jQuery);
jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};
var _canLog=true;function _log(mode,msg){if(!_canLog)
return;var args=Array.prototype.slice.apply(arguments,[1]);var dt=new Date();var tag=dt.getHours()+":"+dt.getMinutes()+":"+dt.getSeconds()+"."+dt.getMilliseconds();args[0]=tag+" - "+args[0];try{switch(mode){case"info":window.console.info.apply(window.console,args);break;case"warn":window.console.warn.apply(window.console,args);break;default:window.console.log.apply(window.console,args);}}catch(e){if(!window.console)
_canLog=false;}}
function logMsg(msg){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments);}
var getDynaTreePersistData=undefined;var DTNodeStatus_Error=-1;var DTNodeStatus_Loading=1;var DTNodeStatus_Ok=0;;(function($){var Class={create:function(){return function(){this.initialize.apply(this,arguments);}}}
var DynaTreeNode=Class.create();DynaTreeNode.prototype={initialize:function(parent,tree,data){this.parent=parent;this.tree=tree;if(typeof data=="string")
data={title:data};if(data.key==undefined)
data.key="_"+tree._nodeCount++;this.data=$.extend({},$.ui.dynatree.nodedatadefaults,data);this.div=null;this.span=null;this.childList=null;this.isLoading=false;this.hasSubSel=false;},toString:function(){return"dtnode<"+this.data.key+">: '"+this.data.title+"'";},toDict:function(recursive,callback){var dict=$.extend({},this.data);dict.activate=(this.tree.activeNode===this);dict.focus=(this.tree.focusNode===this);dict.expand=this.bExpanded;dict.select=this.bSelected;if(callback)
callback(dict);if(recursive&&this.childList){dict.children=[];for(var i=0;i<this.childList.length;i++)
dict.children.push(this.childList[i].toDict(true,callback));}else{delete dict.children;}
return dict;},_getInnerHtml:function(){var opts=this.tree.options;var cache=this.tree.cache;var rootParent=opts.rootVisible?null:this.tree.tnRoot;var bHideFirstExpander=(opts.rootVisible&&opts.minExpandLevel>0)||opts.minExpandLevel>1;var bHideFirstConnector=opts.rootVisible||opts.minExpandLevel>0;var res="";var p=this.parent;while(p){if(bHideFirstConnector&&p==rootParent)
break;res=(p.isLastSibling()?cache.tagEmpty:cache.tagVline)+res;p=p.parent;}
if(bHideFirstExpander&&this.parent==rootParent){}else if(this.childList||this.data.isLazy){res+=cache.tagExpander;}else{res+=cache.tagConnector;}
if(opts.checkbox&&this.data.hideCheckbox!=true&&!this.data.isStatusNode){res+=cache.tagCheckbox;}
if(this.data.icon){res+="<img src='"+opts.imagePath+this.data.icon+"' alt='' />";}else if(this.data.icon==false){}else{res+=cache.tagNodeIcon;}
var tooltip=(this.data&&typeof this.data.tooltip=="string")?" title='"+this.data.tooltip.replace(/'/g,"&#x27;")+"'":"";res+="<a href='' class='"+opts.classNames.title+"'"+tooltip+">"+this.data.title+"</a>";return res;},_fixOrder:function(){var cl=this.childList;if(!cl)
return;var childDiv=this.div.firstChild.nextSibling;for(var i=0;i<cl.length-1;i++){var childNode1=cl[i];var childNode2=childDiv.firstChild.dtnode;if(childNode1!==childNode2){this.tree.logDebug("_fixOrder: mismatch at index "+i+": "+childNode1+" != "+childNode2);this.div.insertBefore(childNode1.div,childNode2.div);}else{childDiv=childDiv.nextSibling;}}},render:function(bDeep,bHidden){var opts=this.tree.options;var cn=opts.classNames;var isLastSib=this.isLastSibling();if(!this.div){this.span=document.createElement("span");this.span.dtnode=this;if(this.data.key)
this.span.id=this.tree.options.idPrefix+this.data.key;this.div=document.createElement("div");this.div.appendChild(this.span);if(this.parent){this.parent.div.appendChild(this.div);}
if(this.parent==null&&!this.tree.options.rootVisible)
this.span.style.display="none";}
this.span.innerHTML=this._getInnerHtml();this.div.style.display=(this.parent==null||this.parent.bExpanded?"":"none");var cnList=[];cnList.push((this.data.isFolder)?cn.folder:cn.document);if(this.bExpanded)
cnList.push(cn.expanded);if(this.childList!=null)
cnList.push(cn.hasChildren);if(this.data.isLazy&&this.childList==null)
cnList.push(cn.lazy);if(isLastSib)
cnList.push(cn.lastsib);if(this.bSelected)
cnList.push(cn.selected);if(this.hasSubSel)
cnList.push(cn.partsel);if(this.tree.activeNode===this)
cnList.push(cn.active);if(this.data.addClass)
cnList.push(this.data.addClass);cnList.push(cn.combinedExpanderPrefix
+(this.bExpanded?"e":"c")
+(this.data.isLazy&&this.childList==null?"d":"")
+(isLastSib?"l":""));cnList.push(cn.combinedIconPrefix
+(this.bExpanded?"e":"c")
+(this.data.isFolder?"f":""));this.span.className=cnList.join(" ");if(bDeep&&this.childList&&(bHidden||this.bExpanded)){for(var i=0;i<this.childList.length;i++){this.childList[i].render(bDeep,bHidden)}
this._fixOrder();}},hasChildren:function(){return this.childList!=null;},isLastSibling:function(){var p=this.parent;if(!p)return true;return p.childList[p.childList.length-1]===this;},prevSibling:function(){if(!this.parent)return null;var ac=this.parent.childList;for(var i=1;i<ac.length;i++)
if(ac[i]===this)
return ac[i-1];return null;},nextSibling:function(){if(!this.parent)return null;var ac=this.parent.childList;for(var i=0;i<ac.length-1;i++)
if(ac[i]===this)
return ac[i+1];return null;},_setStatusNode:function(data){var firstChild=(this.childList?this.childList[0]:null);if(!data){if(firstChild){this.div.removeChild(firstChild.div);if(this.childList.length==1)
this.childList=null;else
this.childList.shift();}}else if(firstChild){data.isStatusNode=true;firstChild.data=data;firstChild.render(false,false);}else{data.isStatusNode=true;firstChild=this.addChild(data);}},setLazyNodeStatus:function(lts,opts){var tooltip=(opts&&opts.tooltip)?opts.tooltip:null;var info=(opts&&opts.info)?" ("+opts.info+")":"";switch(lts){case DTNodeStatus_Ok:this._setStatusNode(null);this.isLoading=false;this.render(false,false);if(this.tree.options.autoFocus){if(this===this.tree.tnRoot&&!this.tree.options.rootVisible&&this.childList){this.childList[0].focus();}else{this.focus();}}
break;case DTNodeStatus_Loading:this.isLoading=true;this._setStatusNode({title:this.tree.options.strings.loading+info,tooltip:tooltip,addClass:this.tree.options.classNames.nodeWait});break;case DTNodeStatus_Error:this.isLoading=false;this._setStatusNode({title:this.tree.options.strings.loadError+info,tooltip:tooltip,addClass:this.tree.options.classNames.nodeError});break;default:throw"Bad LazyNodeStatus: '"+lts+"'.";}},_parentList:function(includeRoot,includeSelf){var l=[];var dtn=includeSelf?this:this.parent;while(dtn){if(includeRoot||dtn.parent)
l.unshift(dtn);dtn=dtn.parent;};return l;},getLevel:function(){var level=0;var dtn=this.parent;while(dtn){level++;dtn=dtn.parent;};return level;},_getTypeForOuterNodeEvent:function(event){var cns=this.tree.options.classNames;var target=event.target;if(target.className.indexOf(cns.folder)<0&&target.className.indexOf(cns.document)<0){return null}
var eventX=event.pageX-target.offsetLeft;var eventY=event.pageY-target.offsetTop;for(var i=0;i<target.childNodes.length;i++){var cn=target.childNodes[i];var x=cn.offsetLeft-target.offsetLeft;var y=cn.offsetTop-target.offsetTop;var nx=cn.clientWidth,ny=cn.clientHeight;if(eventX>=x&&eventX<=(x+nx)&&eventY>=y&&eventY<=(y+ny)){if(cn.className==cns.title)
return"title";else if(cn.className==cns.expander)
return"expander";else if(cn.className==cns.checkbox)
return"checkbox";else if(cn.className==cns.nodeIcon)
return"icon";}}
return"prefix";},getEventTargetType:function(event){var tcn=event&&event.target?event.target.className:"";var cns=this.tree.options.classNames;if(tcn==cns.title)
return"title";else if(tcn==cns.expander)
return"expander";else if(tcn==cns.checkbox)
return"checkbox";else if(tcn==cns.nodeIcon)
return"icon";else if(tcn==cns.empty||tcn==cns.vline||tcn==cns.connector)
return"prefix";else if(tcn.indexOf(cns.folder)>=0||tcn.indexOf(cns.document)>=0)
return this._getTypeForOuterNodeEvent(event);return null;},isVisible:function(){var parents=this._parentList(true,false);for(var i=0;i<parents.length;i++)
if(!parents[i].bExpanded)return false;return true;},makeVisible:function(){var parents=this._parentList(true,false);for(var i=0;i<parents.length;i++)
parents[i]._expand(true);},focus:function(){this.makeVisible();try{$(this.span).find(">a").focus();}catch(e){}},_activate:function(flag,fireEvents){this.tree.logDebug("dtnode._activate(%o, fireEvents=%o) - %o",flag,fireEvents,this);var opts=this.tree.options;if(this.data.isStatusNode)
return;if(fireEvents&&opts.onQueryActivate&&opts.onQueryActivate.call(this.span,flag,this)==false)
return;if(flag){if(this.tree.activeNode){if(this.tree.activeNode===this)
return;this.tree.activeNode.deactivate();}
if(opts.activeVisible)
this.makeVisible();this.tree.activeNode=this;if(opts.persist)
$.cookie(opts.cookieId+"-active",this.data.key,opts.cookie);this.tree.persistence.activeKey=this.data.key;$(this.span).addClass(opts.classNames.active);if(fireEvents&&opts.onActivate)
opts.onActivate.call(this.span,this);}else{if(this.tree.activeNode===this){var opts=this.tree.options;if(opts.onQueryActivate&&opts.onQueryActivate.call(this.span,false,this)==false)
return;$(this.span).removeClass(opts.classNames.active);if(opts.persist){$.cookie(opts.cookieId+"-active","",opts.cookie);}
this.tree.persistence.activeKey=null;this.tree.activeNode=null;if(fireEvents&&opts.onDeactivate)
opts.onDeactivate.call(this.span,this);}}},activate:function(){this._activate(true,true);},deactivate:function(){this._activate(false,true);},isActive:function(){return(this.tree.activeNode===this);},_userActivate:function(){var activate=true;var expand=false;if(this.data.isFolder){switch(this.tree.options.clickFolderMode){case 2:activate=false;expand=true;break;case 3:activate=expand=true;break;}}
if(this.parent==null&&this.tree.options.minExpandLevel>0){expand=false;}
if(expand){this.toggleExpand();this.focus();}
if(activate){this.activate();}},_setSubSel:function(hasSubSel){if(hasSubSel){this.hasSubSel=true;$(this.span).addClass(this.tree.options.classNames.partsel);}else{this.hasSubSel=false;$(this.span).removeClass(this.tree.options.classNames.partsel);}},_fixSelectionState:function(){if(this.bSelected){this.visit(function(dtnode){dtnode.parent._setSubSel(true);dtnode._select(true,false,false);});var p=this.parent;while(p){p._setSubSel(true);var allChildsSelected=true;for(var i=0;i<p.childList.length;i++){var n=p.childList[i];if(!n.bSelected&&!n.data.isStatusNode){allChildsSelected=false;break;}}
if(allChildsSelected)
p._select(true,false,false);p=p.parent;}}else{this._setSubSel(false);this.visit(function(dtnode){dtnode._setSubSel(false);dtnode._select(false,false,false);});var p=this.parent;while(p){p._select(false,false,false);var isPartSel=false;for(var i=0;i<p.childList.length;i++){if(p.childList[i].bSelected||p.childList[i].hasSubSel){isPartSel=true;break;}}
p._setSubSel(isPartSel);p=p.parent;}}},_select:function(sel,fireEvents,deep){var opts=this.tree.options;if(this.data.isStatusNode)
return;if(this.bSelected==sel){return;}
if(fireEvents&&opts.onQuerySelect&&opts.onQuerySelect.call(this.span,sel,this)==false)
return;if(opts.selectMode==1&&sel){this.tree.visit(function(dtnode){if(dtnode.bSelected){dtnode._select(false,false,false);return false;}});}
this.bSelected=sel;if(sel){if(opts.persist)
this.tree.persistence.addSelect(this.data.key);$(this.span).addClass(opts.classNames.selected);if(deep&&opts.selectMode==3)
this._fixSelectionState();if(fireEvents&&opts.onSelect)
opts.onSelect.call(this.span,true,this);}else{if(opts.persist)
this.tree.persistence.clearSelect(this.data.key);$(this.span).removeClass(opts.classNames.selected);if(deep&&opts.selectMode==3)
this._fixSelectionState();if(fireEvents&&opts.onSelect)
opts.onSelect.call(this.span,false,this);}},select:function(sel){if(this.data.unselectable)
return this.bSelected;return this._select(sel!=false,true,true);},toggleSelect:function(){return this.select(!this.bSelected);},isSelected:function(){return this.bSelected;},_loadContent:function(){try{var opts=this.tree.options;this.tree.logDebug("_loadContent: start - %o",this);this.setLazyNodeStatus(DTNodeStatus_Loading);if(true==opts.onLazyRead.call(this.span,this)){this.setLazyNodeStatus(DTNodeStatus_Ok);this.tree.logDebug("_loadContent: succeeded - %o",this);}}catch(e){this.setLazyNodeStatus(DTNodeStatus_Error);this.tree.logWarning("_loadContent: failed - %o",e);}},_expand:function(bExpand){if(this.bExpanded==bExpand){return;}
var opts=this.tree.options;if(!bExpand&&this.getLevel()<opts.minExpandLevel){this.tree.logDebug("dtnode._expand(%o) forced expand - %o",bExpand,this);return;}
if(opts.onQueryExpand&&opts.onQueryExpand.call(this.span,bExpand,this)==false)
return;this.bExpanded=bExpand;if(opts.persist){if(bExpand)
this.tree.persistence.addExpand(this.data.key);else
this.tree.persistence.clearExpand(this.data.key);}
this.render(false);if(this.bExpanded&&this.parent&&opts.autoCollapse){var parents=this._parentList(false,true);for(var i=0;i<parents.length;i++)
parents[i].collapseSiblings();}
if(opts.activeVisible&&this.tree.activeNode&&!this.tree.activeNode.isVisible()){this.tree.activeNode.deactivate();}
if(bExpand&&this.data.isLazy&&this.childList==null&&!this.isLoading){this._loadContent();return;}
var fxDuration=opts.fx?(opts.fx.duration||200):0;if(this.childList){for(var i=0;i<this.childList.length;i++){var $child=$(this.childList[i].div);if(fxDuration){if(bExpand!=$child.is(':visible'))
$child.animate(opts.fx,fxDuration);}else{if(bExpand)
$child.show();else
$child.hide();}}}
if(opts.onExpand)
opts.onExpand.call(this.span,bExpand,this);},expand:function(flag){if(!this.childList&&!this.data.isLazy&&flag)
return;if(this.parent==null&&this.tree.options.minExpandLevel>0&&!flag)
return;this._expand(flag);},toggleExpand:function(){this.expand(!this.bExpanded);},collapseSiblings:function(){if(this.parent==null)
return;var ac=this.parent.childList;for(var i=0;i<ac.length;i++){if(ac[i]!==this&&ac[i].bExpanded)
ac[i]._expand(false);}},onClick:function(event){var targetType=this.getEventTargetType(event);if(targetType=="expander"){this.toggleExpand();this.focus();}else if(targetType=="checkbox"){this.toggleSelect();this.focus();}else{this._userActivate();this.span.getElementsByTagName("a")[0].focus();}
return false;},onDblClick:function(event){},onKeydown:function(event){var handled=true;switch(event.which){case 107:case 187:if(!this.bExpanded)this.toggleExpand();break;case 109:case 189:if(this.bExpanded)this.toggleExpand();break;case 32:this._userActivate();break;case 8:if(this.parent)
this.parent.focus();break;case 37:if(this.bExpanded){this.toggleExpand();this.focus();}else if(this.parent&&(this.tree.options.rootVisible||this.parent.parent)){this.parent.focus();}
break;case 39:if(!this.bExpanded&&(this.childList||this.data.isLazy)){this.toggleExpand();this.focus();}else if(this.childList){this.childList[0].focus();}
break;case 38:var sib=this.prevSibling();while(sib&&sib.bExpanded&&sib.childList)
sib=sib.childList[sib.childList.length-1];if(!sib&&this.parent&&(this.tree.options.rootVisible||this.parent.parent))
sib=this.parent;if(sib)sib.focus();break;case 40:var sib;if(this.bExpanded&&this.childList){sib=this.childList[0];}else{var parents=this._parentList(false,true);for(var i=parents.length-1;i>=0;i--){sib=parents[i].nextSibling();if(sib)break;}}
if(sib)sib.focus();break;default:handled=false;}
return!handled;},onKeypress:function(event){},onFocus:function(event){var opts=this.tree.options;if(event.type=="blur"||event.type=="focusout"){if(opts.onBlur)
opts.onBlur.call(this.span,this);if(this.tree.tnFocused)
$(this.tree.tnFocused.span).removeClass(opts.classNames.focused);this.tree.tnFocused=null;if(opts.persist)
$.cookie(opts.cookieId+"-focus","",opts.cookie);}else if(event.type=="focus"||event.type=="focusin"){if(this.tree.tnFocused&&this.tree.tnFocused!==this){this.tree.logDebug("dtnode.onFocus: out of sync: curFocus: %o",this.tree.tnFocused);$(this.tree.tnFocused.span).removeClass(opts.classNames.focused);}
this.tree.tnFocused=this;if(opts.onFocus)
opts.onFocus.call(this.span,this);$(this.tree.tnFocused.span).addClass(opts.classNames.focused);if(opts.persist)
$.cookie(opts.cookieId+"-focus",this.data.key,opts.cookie);}},visit:function(fn,data,includeSelf){var n=0;if(includeSelf==true){if(fn(this,data)==false)
return 1;n++;}
if(this.childList)
for(var i=0;i<this.childList.length;i++)
n+=this.childList[i].visit(fn,data,true);return n;},remove:function(){if(this===this.tree.root)
return false;return this.parent.removeChild(this);},removeChild:function(tn){var ac=this.childList;if(ac.length==1){if(tn!==ac[0])
throw"removeChild: invalid child";return this.removeChildren();}
if(tn===this.tree.activeNode)
tn.deactivate();if(this.tree.options.persist){if(tn.bSelected)
this.tree.persistence.clearSelect(tn.data.key);if(tn.bExpanded)
this.tree.persistence.clearExpand(tn.data.key);}
tn.removeChildren(true);this.div.removeChild(tn.div);for(var i=0;i<ac.length;i++){if(ac[i]===tn){this.childList.splice(i,1);delete tn;break;}}},removeChildren:function(isRecursiveCall,retainPersistence){var tree=this.tree;var ac=this.childList;if(ac){for(var i=0;i<ac.length;i++){var tn=ac[i];if(tn===tree.activeNode&&!retainPersistence)
tn.deactivate();if(this.tree.options.persist&&!retainPersistence){if(tn.bSelected)
this.tree.persistence.clearSelect(tn.data.key);if(tn.bExpanded)
this.tree.persistence.clearExpand(tn.data.key);}
tn.removeChildren(true,retainPersistence);this.div.removeChild(tn.div);delete tn;}
this.childList=null;}
if(!isRecursiveCall){this.isLoading=false;this.render(false,false);}},reload:function(force){if(this.parent==null)
return this.tree.reload();if(!this.data.isLazy)
throw"node.reload() requires lazy nodes.";if(this.bExpanded){this.expand(false);this.removeChildren();this.expand(true);}else{this.removeChildren();if(force)
this._loadContent();}},_addChildNode:function(dtnode,beforeNode){var tree=this.tree;var opts=tree.options;var pers=tree.persistence;dtnode.parent=this;if(this.childList==null){this.childList=[];}else if(!beforeNode){$(this.childList[this.childList.length-1].span).removeClass(opts.classNames.lastsib);}
if(beforeNode){var iBefore=$.inArray(beforeNode,this.childList);if(iBefore<0)
throw"<beforeNode> must be a child of <this>";this.childList.splice(iBefore,0,dtnode);}else{this.childList.push(dtnode);}
var isInitializing=tree.isInitializing();if(opts.persist&&pers.cookiesFound&&isInitializing){if(pers.activeKey==dtnode.data.key)
tree.activeNode=dtnode;if(pers.focusedKey==dtnode.data.key)
tree.focusNode=dtnode;dtnode.bExpanded=($.inArray(dtnode.data.key,pers.expandedKeyList)>=0);dtnode.bSelected=($.inArray(dtnode.data.key,pers.selectedKeyList)>=0);}else{if(dtnode.data.activate){tree.activeNode=dtnode;if(opts.persist)
pers.activeKey=dtnode.data.key;}
if(dtnode.data.focus){tree.focusNode=dtnode;if(opts.persist)
pers.focusedKey=dtnode.data.key;}
dtnode.bExpanded=(dtnode.data.expand==true);if(dtnode.bExpanded&&opts.persist)
pers.addExpand(dtnode.data.key);dtnode.bSelected=(dtnode.data.select==true);if(dtnode.bSelected&&opts.persist)
pers.addSelect(dtnode.data.key);}
if(opts.minExpandLevel>=dtnode.getLevel()){this.bExpanded=true;}
if(dtnode.bSelected&&opts.selectMode==3){var p=this;while(p){if(!p.hasSubSel)
p._setSubSel(true);p=p.parent;}}
if(tree.bEnableUpdate)
this.render(true,true);return dtnode;},addChild:function(obj,beforeNode){if(!obj||obj.length==0)
return;if(obj instanceof DynaTreeNode)
return this._addChildNode(obj,beforeNode);if(!obj.length)
obj=[obj];var prevFlag=this.tree.enableUpdate(false);var tnFirst=null;for(var i=0;i<obj.length;i++){var data=obj[i];var dtnode=this._addChildNode(new DynaTreeNode(this,this.tree,data),beforeNode);if(!tnFirst)tnFirst=dtnode;if(data.children)
dtnode.addChild(data.children,null);}
this.tree.enableUpdate(prevFlag);return tnFirst;},append:function(obj){this.tree.logWarning("node.append() is deprecated (use node.addChild() instead).");return this.addChild(obj,null);},appendAjax:function(ajaxOptions){this.removeChildren(false,true);this.setLazyNodeStatus(DTNodeStatus_Loading);var self=this;var orgSuccess=ajaxOptions.success;var orgError=ajaxOptions.error;var options=$.extend({},this.tree.options.ajaxDefaults,ajaxOptions,{success:function(data,textStatus){var prevPhase=self.tree.phase;self.tree.phase="init";self.addChild(data,null);self.tree.phase="postInit";self.setLazyNodeStatus(DTNodeStatus_Ok);if(orgSuccess)
orgSuccess.call(options,self);self.tree.phase=prevPhase;},error:function(XMLHttpRequest,textStatus,errorThrown){self.tree.logWarning("appendAjax failed:",textStatus,":\n",XMLHttpRequest,"\n",errorThrown);self.setLazyNodeStatus(DTNodeStatus_Error,{info:textStatus,tooltip:""+errorThrown});if(orgError)
orgError.call(options,self,XMLHttpRequest,textStatus,errorThrown);},allowRetry:true});$.ajax(options);},lastentry:undefined}
var DynaTreeStatus=Class.create();DynaTreeStatus._getTreePersistData=function(cookieId,cookieOpts){var ts=new DynaTreeStatus(cookieId,cookieOpts);ts.read();return ts.toDict();}
getDynaTreePersistData=DynaTreeStatus._getTreePersistData;DynaTreeStatus.prototype={initialize:function(cookieId,cookieOpts){this._log("DynaTreeStatus: initialize");if(cookieId===undefined)
cookieId=$.ui.dynatree.defaults.cookieId;cookieOpts=$.extend({},$.ui.dynatree.defaults.cookie,cookieOpts);this.cookieId=cookieId;this.cookieOpts=cookieOpts;this.cookiesFound=undefined;this.activeKey=null;this.focusedKey=null;this.expandedKeyList=null;this.selectedKeyList=null;},_log:function(msg){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments);},read:function(){this._log("DynaTreeStatus: read");this.cookiesFound=false;var cookie=$.cookie(this.cookieId+"-active");this.activeKey=(cookie==null)?"":cookie;if(cookie!=null)this.cookiesFound=true;cookie=$.cookie(this.cookieId+"-focus");this.focusedKey=(cookie==null)?"":cookie;if(cookie!=null)this.cookiesFound=true;cookie=$.cookie(this.cookieId+"-expand");this.expandedKeyList=(cookie==null)?[]:cookie.split(",");if(cookie!=null)this.cookiesFound=true;cookie=$.cookie(this.cookieId+"-select");this.selectedKeyList=(cookie==null)?[]:cookie.split(",");if(cookie!=null)this.cookiesFound=true;},write:function(){this._log("DynaTreeStatus: write");$.cookie(this.cookieId+"-active",(this.activeKey==null)?"":this.activeKey,this.cookieOpts);$.cookie(this.cookieId+"-focus",(this.focusedKey==null)?"":this.focusedKey,this.cookieOpts);$.cookie(this.cookieId+"-expand",(this.expandedKeyList==null)?"":this.expandedKeyList.join(","),this.cookieOpts);$.cookie(this.cookieId+"-select",(this.selectedKeyList==null)?"":this.selectedKeyList.join(","),this.cookieOpts);},addExpand:function(key){this._log("addExpand(%o)",key);if($.inArray(key,this.expandedKeyList)<0){this.expandedKeyList.push(key);$.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts);}},clearExpand:function(key){this._log("clearExpand(%o)",key);var idx=$.inArray(key,this.expandedKeyList);if(idx>=0){this.expandedKeyList.splice(idx,1);$.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts);}},addSelect:function(key){this._log("addSelect(%o)",key);if($.inArray(key,this.selectedKeyList)<0){this.selectedKeyList.push(key);$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts);}},clearSelect:function(key){this._log("clearSelect(%o)",key);var idx=$.inArray(key,this.selectedKeyList);if(idx>=0){this.selectedKeyList.splice(idx,1);$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts);}},isReloading:function(){return this.cookiesFound==true;},toDict:function(){return{cookiesFound:this.cookiesFound,activeKey:this.activeKey,focusedKey:this.activeKey,expandedKeyList:this.expandedKeyList,selectedKeyList:this.selectedKeyList};},lastentry:undefined};var DynaTree=Class.create();DynaTree.version="$Version: 0.5.4$";DynaTree.prototype={initialize:function($widget){this.phase="init";this.$widget=$widget;this.options=$widget.options;this.$tree=$widget.element;this.divTree=this.$tree.get(0);},_load:function(){var $widget=this.$widget;var opts=this.options;this.bEnableUpdate=true;this._nodeCount=1;this.activeNode=null;this.focusNode=null;if(opts.classNames!==$.ui.dynatree.defaults.classNames){opts.classNames=$.extend({},$.ui.dynatree.defaults.classNames,opts.classNames);}
if(!opts.imagePath){$("script").each(function(){if(this.src.search(_rexDtLibName)>=0){if(this.src.indexOf("/")>=0)
opts.imagePath=this.src.slice(0,this.src.lastIndexOf("/"))+"/skin/";else
opts.imagePath="skin/";return false;}});}
this.persistence=new DynaTreeStatus(opts.cookieId,opts.cookie);if(opts.persist){if(!$.cookie)
_log("warn","Please include jquery.cookie.js to use persistence.");this.persistence.read();}
this.logDebug("DynaTree.persistence: %o",this.persistence.toDict());this.cache={tagEmpty:"<span class='"+opts.classNames.empty+"'></span>",tagVline:"<span class='"+opts.classNames.vline+"'></span>",tagExpander:"<span class='"+opts.classNames.expander+"'></span>",tagConnector:"<span class='"+opts.classNames.connector+"'></span>",tagNodeIcon:"<span class='"+opts.classNames.nodeIcon+"'></span>",tagCheckbox:"<span class='"+opts.classNames.checkbox+"'></span>",lastentry:undefined};if(opts.children||(opts.initAjax&&opts.initAjax.url)||opts.initId)
$(this.divTree).empty();else if(this.divRoot)
$(this.divRoot).remove();this.tnRoot=new DynaTreeNode(null,this,{title:opts.title,key:"root"});this.tnRoot.data.isFolder=true;this.tnRoot.render(false,false);this.divRoot=this.tnRoot.div;this.divRoot.className=opts.classNames.container;this.divTree.appendChild(this.divRoot);var root=this.tnRoot;var isReloading=(opts.persist&&this.persistence.isReloading());var isLazy=false;var prevFlag=this.enableUpdate(false);this.logDebug("Dynatree._load(): read tree structure...");if(opts.children){root.addChild(opts.children);}else if(opts.initAjax&&opts.initAjax.url){isLazy=true;root.data.isLazy=true;this._reloadAjax();}else if(opts.initId){this._createFromTag(root,$("#"+opts.initId));}else{var $ul=this.$tree.find(">ul").hide();this._createFromTag(root,$ul);$ul.remove();}
this._checkConsistency();this.logDebug("Dynatree._load(): render nodes...");this.enableUpdate(prevFlag);this.logDebug("Dynatree._load(): bind events...");this.$widget.bind();this.logDebug("Dynatree._load(): postInit...");this.phase="postInit";if(opts.persist){this.persistence.write();}
if(this.focusNode&&this.focusNode.isVisible()){this.logDebug("Focus on init: %o",this.focusNode);this.focusNode.focus();}
if(!isLazy&&opts.onPostInit){opts.onPostInit.call(this,isReloading,false);}
this.phase="idle";},_reloadAjax:function(){var opts=this.options;if(!opts.initAjax||!opts.initAjax.url)
throw"tree.reload() requires 'initAjax' mode.";var pers=this.persistence;var ajaxOpts=$.extend({},opts.initAjax);if(ajaxOpts.addActiveKey)
ajaxOpts.data.activeKey=pers.activeKey;if(ajaxOpts.addFocusedKey)
ajaxOpts.data.focusedKey=pers.focusedKey;if(ajaxOpts.addExpandedKeyList)
ajaxOpts.data.expandedKeyList=pers.expandedKeyList.join(",");if(ajaxOpts.addSelectedKeyList)
ajaxOpts.data.selectedKeyList=pers.selectedKeyList.join(",");if(opts.onPostInit){if(ajaxOpts.success)
this.logWarning("initAjax: success callback is ignored when onPostInit was specified.");if(ajaxOpts.error)
this.logWarning("initAjax: error callback is ignored when onPostInit was specified.");var isReloading=pers.isReloading();ajaxOpts["success"]=function(dtnode){opts.onPostInit.call(dtnode.tree,isReloading,false);};ajaxOpts["error"]=function(dtnode){opts.onPostInit.call(dtnode.tree,isReloading,true);};}
this.logDebug("Dynatree._init(): send Ajax request...");this.tnRoot.appendAjax(ajaxOpts);},toString:function(){return"DynaTree '"+this.options.title+"'";},toDict:function(){return this.tnRoot.toDict(true);},getPersistData:function(){return this.persistence.toDict();},logDebug:function(msg){if(this.options.debugLevel>=2){Array.prototype.unshift.apply(arguments,["debug"]);_log.apply(this,arguments);}},logInfo:function(msg){if(this.options.debugLevel>=1){Array.prototype.unshift.apply(arguments,["info"]);_log.apply(this,arguments);}},logWarning:function(msg){Array.prototype.unshift.apply(arguments,["warn"]);_log.apply(this,arguments);},isInitializing:function(){return(this.phase=="init"||this.phase=="postInit");},isReloading:function(){return(this.phase=="init"||this.phase=="postInit")&&this.options.persist&&this.persistence.cookiesFound;},isUserEvent:function(){return(this.phase=="userEvent");},redraw:function(){this.logDebug("dynatree.redraw()...");this.tnRoot.render(true,true);this.logDebug("dynatree.redraw() done.");},reloadAjax:function(){this.logWarning("tree.reloadAjax() is deprecated since v0.5.2 (use reload() instead).");},reload:function(){this._load();},getRoot:function(){return this.tnRoot;},getNodeByKey:function(key){var el=document.getElementById(this.options.idPrefix+key);return(el&&el.dtnode)?el.dtnode:null;},getActiveNode:function(){return this.activeNode;},reactivate:function(setFocus){var node=this.activeNode;if(node){this.activeNode=null;node.activate();if(setFocus)
node.focus();}},getSelectedNodes:function(stopOnParents){var nodeList=[];this.tnRoot.visit(function(dtnode){if(dtnode.bSelected){nodeList.push(dtnode);if(stopOnParents==true)
return false;}});return nodeList;},activateKey:function(key){var dtnode=(key===null)?null:this.getNodeByKey(key);if(!dtnode){if(this.activeNode)
this.activeNode.deactivate();this.activeNode=null;return null;}
dtnode.focus();dtnode.activate();return dtnode;},selectKey:function(key,select){var dtnode=this.getNodeByKey(key);if(!dtnode)
return null;dtnode.select(select);return dtnode;},enableUpdate:function(bEnable){if(this.bEnableUpdate==bEnable)
return bEnable;this.bEnableUpdate=bEnable;if(bEnable)
this.redraw();return!bEnable;},visit:function(fn,data,includeRoot){return this.tnRoot.visit(fn,data,includeRoot);},_createFromTag:function(parentTreeNode,$ulParent){var self=this;$ulParent.find(">li").each(function(){var $li=$(this);var $liSpan=$li.find(">span:first");var title;if($liSpan.length){title=$liSpan.html();}else{title=$li.html();var iPos=title.search(/<ul/i);if(iPos>=0)
title=$.trim(title.substring(0,iPos));else
title=$.trim(title);}
var data={title:title,isFolder:$li.hasClass("folder"),isLazy:$li.hasClass("lazy"),expand:$li.hasClass("expanded"),select:$li.hasClass("selected"),activate:$li.hasClass("active"),focus:$li.hasClass("focused")};if($li.attr("title"))
data.tooltip=$li.attr("title");if($li.attr("id"))
data.key=$li.attr("id");if($li.attr("data")){var dataAttr=$.trim($li.attr("data"));if(dataAttr){if(dataAttr.charAt(0)!="{")
dataAttr="{"+dataAttr+"}"
try{$.extend(data,eval("("+dataAttr+")"));}catch(e){throw("Error parsing node data: "+e+"\ndata:\n'"+dataAttr+"'");}}}
childNode=parentTreeNode.addChild(data);var $ul=$li.find(">ul:first");if($ul.length){self._createFromTag(childNode,$ul);}});},_checkConsistency:function(){},lastentry:undefined};$.widget("ui.dynatree",{init:function(){_log("warn","ui.dynatree.init() was called; you should upgrade to ui.core.js v1.6 or higher.");return this._init();},_init:function(){if(parseFloat($.ui.version)<1.8){_log("info","ui.dynatree._init() was called; consider upgrading to jquery.ui.core.js v1.8 or higher.");return this._create();}
_log("debug","ui.dynatree._init() was called; no current default functionality.");},_create:function(){if(parseFloat($.ui.version)>=1.8){this.options=$.extend(true,{},$[this.namespace][this.widgetName].defaults,this.options);}
logMsg("Dynatree._create(): version='%s', debugLevel=%o.",DynaTree.version,this.options.debugLevel);var opts=this.options;this.options.event+=".dynatree";var divTree=this.element.get(0);this.tree=new DynaTree(this);this.tree._load();this.tree.logDebug("Dynatree._create(): done.");},bind:function(){var $this=this.element;var o=this.options;this.unbind();function __getNodeFromElement(el){var iMax=5;while(el&&iMax--){if(el.dtnode)return el.dtnode;el=el.parentNode;};return null;}
var eventNames="click.dynatree dblclick.dynatree";if(o.keyboard)
eventNames+=" keypress.dynatree keydown.dynatree";$this.bind(eventNames,function(event){var dtnode=__getNodeFromElement(event.target);if(!dtnode)
return true;var prevPhase=dtnode.tree.phase;dtnode.tree.phase="userEvent";try{dtnode.tree.logDebug("bind(%o): dtnode: %o",event,dtnode);switch(event.type){case"click":return(o.onClick&&o.onClick(dtnode,event)===false)?false:dtnode.onClick(event);case"dblclick":return(o.onDblClick&&o.onDblClick(dtnode,event)===false)?false:dtnode.onDblClick(event);case"keydown":return(o.onKeydown&&o.onKeydown(dtnode,event)===false)?false:dtnode.onKeydown(event);case"keypress":return(o.onKeypress&&o.onKeypress(dtnode,event)===false)?false:dtnode.onKeypress(event);};}catch(e){var _=null;}finally{dtnode.tree.phase=prevPhase;}});function __focusHandler(event){event=arguments[0]=$.event.fix(event||window.event);var dtnode=__getNodeFromElement(event.target);return dtnode?dtnode.onFocus(event):false;}
var div=this.tree.divTree;if(div.addEventListener){div.addEventListener("focus",__focusHandler,true);div.addEventListener("blur",__focusHandler,true);}else{div.onfocusin=div.onfocusout=__focusHandler;}},unbind:function(){this.element.unbind(".dynatree");},enable:function(){this.bind();$.widget.prototype.enable.apply(this,arguments);},disable:function(){this.unbind();$.widget.prototype.disable.apply(this,arguments);},getTree:function(){return this.tree;},getRoot:function(){return this.tree.getRoot();},getActiveNode:function(){return this.tree.getActiveNode();},getSelectedNodes:function(){return this.tree.getSelectedNodes();},lastentry:undefined});$.ui.dynatree.getter="getTree getRoot getActiveNode getSelectedNodes";$.ui.dynatree.defaults={title:"Dynatree root",rootVisible:false,minExpandLevel:1,imagePath:null,children:null,initId:null,initAjax:null,autoFocus:true,keyboard:true,persist:false,autoCollapse:false,clickFolderMode:3,activeVisible:true,checkbox:false,selectMode:2,fx:null,onClick:null,onDblClick:null,onKeydown:null,onKeypress:null,onFocus:null,onBlur:null,onQueryActivate:null,onQuerySelect:null,onQueryExpand:null,onPostInit:null,onActivate:null,onDeactivate:null,onSelect:null,onExpand:null,onLazyRead:null,ajaxDefaults:{cache:false,dataType:"json"},strings:{loading:"Loading&#8230;",loadError:"Load error!"},idPrefix:"ui-dynatree-id-",cookieId:"dynatree",cookie:{expires:null},classNames:{container:"ui-dynatree-container",folder:"ui-dynatree-folder",document:"ui-dynatree-document",empty:"ui-dynatree-empty",vline:"ui-dynatree-vline",expander:"ui-dynatree-expander",connector:"ui-dynatree-connector",checkbox:"ui-dynatree-checkbox",nodeIcon:"ui-dynatree-icon",title:"ui-dynatree-title",nodeError:"ui-dynatree-statusnode-error",nodeWait:"ui-dynatree-statusnode-wait",hidden:"ui-dynatree-hidden",combinedExpanderPrefix:"ui-dynatree-exp-",combinedIconPrefix:"ui-dynatree-ico-",hasChildren:"ui-dynatree-has-children",active:"ui-dynatree-active",selected:"ui-dynatree-selected",expanded:"ui-dynatree-expanded",lazy:"ui-dynatree-lazy",focused:"ui-dynatree-focused",partsel:"ui-dynatree-partsel",lastsib:"ui-dynatree-lastsib"},debugLevel:1,lastentry:undefined};$.ui.dynatree.nodedatadefaults={title:null,key:null,isFolder:false,isLazy:false,tooltip:null,icon:null,addClass:null,activate:false,focus:false,expand:false,select:false,hideCheckbox:false,unselectable:false,children:null,lastentry:undefined};})(jQuery);var _rexDtLibName=/.*dynatree[^/]*\.js$/i;