/*
 * jQuery JavaScript Library v1.3.2
 * http://jquery.com/
 *
 * Copyright (c) 2009 John Resig
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
 * Revision: 6246
 */
(function(){var o=this,h,C=o.jQuery,s=o.$,r=o.jQuery=o.$=function(I,J){return new r.fn.init(I,J)},H=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,g=/^.[^:#\[\.,]*$/;r.fn=r.prototype={init:function(I,L){I=I||document;if(I.nodeType){this[0]=I;this.length=1;this.context=I;return this}if(typeof I==="string"){var K=H.exec(I);if(K&&(K[1]||!L)){if(K[1]){I=r.clean([K[1]],L)}else{var M=document.getElementById(K[3]);if(M&&M.id!=K[3]){return r().find(I)}var J=r(M||[]);J.context=document;J.selector=I;return J}}else{return r(L).find(I)}}else{if(r.isFunction(I)){return r(document).ready(I)}}if(I.selector&&I.context){this.selector=I.selector;this.context=I.context}return this.setArray(r.isArray(I)?I:r.makeArray(I))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(I){return I===h?Array.prototype.slice.call(this):this[I]},pushStack:function(J,L,I){var K=r(J);K.prevObject=this;K.context=this.context;if(L==="find"){K.selector=this.selector+(this.selector?" ":"")+I}else{if(L){K.selector=this.selector+"."+L+"("+I+")"}}return K},setArray:function(I){this.length=0;Array.prototype.push.apply(this,I);return this},each:function(J,I){return r.each(this,J,I)},index:function(I){return r.inArray(I&&I.jquery?I[0]:I,this)},attr:function(J,L,K){var I=J;if(typeof J==="string"){if(L===h){return this[0]&&r[K||"attr"](this[0],J)}else{I={};I[J]=L}}return this.each(function(M){for(J in I){r.attr(K?this.style:this,J,r.prop(this,I[J],K,M,J))}})},css:function(I,J){if((I=="width"||I=="height")&&parseFloat(J)<0){J=h}return this.attr(I,J,"curCSS")},text:function(J){if(typeof J!=="object"&&J!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(J))}var I="";r.each(J||this,function(){r.each(this.childNodes,function(){if(this.nodeType!=8){I+=this.nodeType!=1?this.nodeValue:r.fn.text([this])}})});return I},wrapAll:function(I){if(this[0]){var J=r(I,this[0].ownerDocument).clone();if(this[0].parentNode){J.insertBefore(this[0])}J.map(function(){var K=this;while(K.firstChild){K=K.firstChild}return K}).append(this)}return this},wrapInner:function(I){return this.each(function(){r(this).contents().wrapAll(I)})},wrap:function(I){return this.each(function(){r(this).wrapAll(I)})},append:function(){return this.domManip(arguments,true,function(I){if(this.nodeType==1){this.appendChild(I)}})},prepend:function(){return this.domManip(arguments,true,function(I){if(this.nodeType==1){this.insertBefore(I,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(I){this.parentNode.insertBefore(I,this)})},after:function(){return this.domManip(arguments,false,function(I){this.parentNode.insertBefore(I,this.nextSibling)})},end:function(){return this.prevObject||r([])},push:[].push,sort:[].sort,splice:[].splice,find:function(I){if(this.length===1){var J=this.pushStack([],"find",I);J.length=0;r.find(I,this[0],J);return J}else{return this.pushStack(r.unique(r.map(this,function(K){return r.find(I,K)})),"find",I)}},clone:function(K){var I=this.map(function(){if(!r.support.noCloneEvent&&!r.isXMLDoc(this)){var M=this.outerHTML;if(!M){var N=this.ownerDocument.createElement("div");N.appendChild(this.cloneNode(true));M=N.innerHTML}return r.clean([M.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(K===true){var L=this.find("*").andSelf(),J=0;I.find("*").andSelf().each(function(){if(this.nodeName!==L[J].nodeName){return}var M=r.data(L[J],"events");for(var O in M){for(var N in M[O]){r.event.add(this,O,M[O][N],M[O][N].data)}}J++})}return I},filter:function(I){return this.pushStack(r.isFunction(I)&&r.grep(this,function(K,J){return I.call(K,J)})||r.multiFilter(I,r.grep(this,function(J){return J.nodeType===1})),"filter",I)},closest:function(I){var K=r.expr.match.POS.test(I)?r(I):null,J=0;return this.map(function(){var L=this;while(L&&L.ownerDocument){if(K?K.index(L)>-1:r(L).is(I)){r.data(L,"closest",J);return L}L=L.parentNode;J++}})},not:function(I){if(typeof I==="string"){if(g.test(I)){return this.pushStack(r.multiFilter(I,this,true),"not",I)}else{I=r.multiFilter(I,this)}}var J=I.length&&I[I.length-1]!==h&&!I.nodeType;return this.filter(function(){return J?r.inArray(this,I)<0:this!=I})},add:function(I){return this.pushStack(r.unique(r.merge(this.get(),typeof I==="string"?r(I):r.makeArray(I))))},is:function(I){return !!I&&r.multiFilter(I,this).length>0},hasClass:function(I){return !!I&&this.is("."+I)},val:function(O){if(O===h){var I=this[0];if(I){if(r.nodeName(I,"option")){return(I.attributes.value||{}).specified?I.value:I.text}if(r.nodeName(I,"select")){var M=I.selectedIndex,P=[],Q=I.options,L=I.type=="select-one";if(M<0){return null}for(var J=L?M:0,N=L?M+1:Q.length;J<N;J++){var K=Q[J];if(K.selected){O=r(K).val();if(L){return O}P.push(O)}}return P}return(I.value||"").replace(/\r/g,"")}return h}if(typeof O==="number"){O+=""}return this.each(function(){if(this.nodeType!=1){return}if(r.isArray(O)&&/radio|checkbox/.test(this.type)){this.checked=(r.inArray(this.value,O)>=0||r.inArray(this.name,O)>=0)}else{if(r.nodeName(this,"select")){var R=r.makeArray(O);r("option",this).each(function(){this.selected=(r.inArray(this.value,R)>=0||r.inArray(this.text,R)>=0)});if(!R.length){this.selectedIndex=-1}}else{this.value=O}}})},html:function(I){return I===h?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(I)},replaceWith:function(I){return this.after(I).remove()},eq:function(I){return this.slice(I,+I+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(I){return this.pushStack(r.map(this,function(K,J){return I.call(K,J,K)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(N,Q,P){if(this[0]){var M=(this[0].ownerDocument||this[0]).createDocumentFragment(),J=r.clean(N,(this[0].ownerDocument||this[0]),M),L=M.firstChild;if(L){for(var K=0,I=this.length;K<I;K++){P.call(O(this[K],L),this.length>1||K>0?M.cloneNode(true):M)}}if(J){r.each(J,D)}}return this;function O(R,S){return Q&&r.nodeName(R,"table")&&r.nodeName(S,"tr")?(R.getElementsByTagName("tbody")[0]||R.appendChild(R.ownerDocument.createElement("tbody"))):R}}};r.fn.init.prototype=r.fn;function D(I,J){if(J.src){r.ajax({url:J.src,async:false,dataType:"script"})}else{r.globalEval(J.text||J.textContent||J.innerHTML||"")}if(J.parentNode){J.parentNode.removeChild(J)}}function f(){return +new Date}r.extend=r.fn.extend=function(){var N=arguments[0]||{},L=1,M=arguments.length,I=false,K;if(typeof N==="boolean"){I=N;N=arguments[1]||{};L=2}if(typeof N!=="object"&&!r.isFunction(N)){N={}}if(M==L){N=this;--L}for(;L<M;L++){if((K=arguments[L])!=null){for(var J in K){var O=N[J],P=K[J];if(N===P){continue}if(I&&P&&typeof P==="object"&&!P.nodeType){N[J]=r.extend(I,O||(P.length!=null?[]:{}),P)}else{if(P!==h){N[J]=P}}}}}return N};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,t=document.defaultView||{},v=Object.prototype.toString;r.extend({noConflict:function(I){o.$=s;if(I){o.jQuery=C}return r},isFunction:function(I){return v.call(I)==="[object Function]"},isArray:function(I){return v.call(I)==="[object Array]"},isXMLDoc:function(I){return I.nodeType===9&&I.documentElement.nodeName!=="HTML"||!!I.ownerDocument&&r.isXMLDoc(I.ownerDocument)},globalEval:function(K){if(K&&/\S/.test(K)){var J=document.getElementsByTagName("head")[0]||document.documentElement,I=document.createElement("script");I.type="text/javascript";if(r.support.scriptEval){I.appendChild(document.createTextNode(K))}else{I.text=K}J.insertBefore(I,J.firstChild);J.removeChild(I)}},nodeName:function(J,I){return J.nodeName&&J.nodeName.toUpperCase()==I.toUpperCase()},each:function(K,O,J){var I,L=0,M=K.length;if(J){if(M===h){for(I in K){if(O.apply(K[I],J)===false){break}}}else{for(;L<M;){if(O.apply(K[L++],J)===false){break}}}}else{if(M===h){for(I in K){if(O.call(K[I],I,K[I])===false){break}}}else{for(var N=K[0];L<M&&O.call(N,L,N)!==false;N=K[++L]){}}}return K},prop:function(L,M,K,J,I){if(r.isFunction(M)){M=M.call(L,J)}return typeof M==="number"&&K=="curCSS"&&!b.test(I)?M+"px":M},className:{add:function(I,J){r.each((J||"").split(/\s+/),function(K,L){if(I.nodeType==1&&!r.className.has(I.className,L)){I.className+=(I.className?" ":"")+L}})},remove:function(I,J){if(I.nodeType==1){I.className=J!==h?r.grep(I.className.split(/\s+/),function(K){return !r.className.has(J,K)}).join(" "):""}},has:function(J,I){return J&&r.inArray(I,(J.className||J).toString().split(/\s+/))>-1}},swap:function(L,K,M){var I={};for(var J in K){I[J]=L.style[J];L.style[J]=K[J]}M.call(L);for(var J in K){L.style[J]=I[J]}},css:function(L,J,N,I){if(J=="width"||J=="height"){var P,K={position:"absolute",visibility:"hidden",display:"block"},O=J=="width"?["Left","Right"]:["Top","Bottom"];function M(){P=J=="width"?L.offsetWidth:L.offsetHeight;if(I==="border"){return}r.each(O,function(){if(!I){P-=parseFloat(r.curCSS(L,"padding"+this,true))||0}if(I==="margin"){P+=parseFloat(r.curCSS(L,"margin"+this,true))||0}else{P-=parseFloat(r.curCSS(L,"border"+this+"Width",true))||0}})}if(L.offsetWidth!==0){M()}else{r.swap(L,K,M)}return Math.max(0,Math.round(P))}return r.curCSS(L,J,N)},curCSS:function(M,J,K){var P,I=M.style;if(J=="opacity"&&!r.support.opacity){P=r.attr(I,"opacity");return P==""?"1":P}if(J.match(/float/i)){J=A}if(!K&&I&&I[J]){P=I[J]}else{if(t.getComputedStyle){if(J.match(/float/i)){J="float"}J=J.replace(/([A-Z])/g,"-$1").toLowerCase();var Q=t.getComputedStyle(M,null);if(Q){P=Q.getPropertyValue(J)}if(J=="opacity"&&P==""){P="1"}}else{if(M.currentStyle){var N=J.replace(/\-(\w)/g,function(R,S){return S.toUpperCase()});P=M.currentStyle[J]||M.currentStyle[N];if(!/^\d+(px)?$/i.test(P)&&/^\d/.test(P)){var L=I.left,O=M.runtimeStyle.left;M.runtimeStyle.left=M.currentStyle.left;I.left=P||0;P=I.pixelLeft+"px";I.left=L;M.runtimeStyle.left=O}}}}return P},clean:function(J,O,M){O=O||document;if(typeof O.createElement==="undefined"){O=O.ownerDocument||O[0]&&O[0].ownerDocument||document}if(!M&&J.length===1&&typeof J[0]==="string"){var L=/^<(\w+)\s*\/?>$/.exec(J[0]);if(L){return[O.createElement(L[1])]}}var K=[],I=[],P=O.createElement("div");r.each(J,function(T,W){if(typeof W==="number"){W+=""}if(!W){return}if(typeof W==="string"){W=W.replace(/(<(\w+)[^>]*?)\/>/g,function(Y,Z,X){return X.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?Y:Z+"></"+X+">"});var S=W.replace(/^\s+/,"").substring(0,10).toLowerCase();var U=!S.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!S.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||S.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!S.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!S.indexOf("<td")||!S.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!S.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!r.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];P.innerHTML=U[1]+W+U[2];while(U[0]--){P=P.lastChild}if(!r.support.tbody){var V=/<tbody/i.test(W),R=!S.indexOf("<table")&&!V?P.firstChild&&P.firstChild.childNodes:U[1]=="<table>"&&!V?P.childNodes:[];for(var Q=R.length-1;Q>=0;--Q){if(r.nodeName(R[Q],"tbody")&&!R[Q].childNodes.length){R[Q].parentNode.removeChild(R[Q])}}}if(!r.support.leadingWhitespace&&/^\s/.test(W)){P.insertBefore(O.createTextNode(W.match(/^\s*/)[0]),P.firstChild)}W=r.makeArray(P.childNodes)}if(W.nodeType){K.push(W)}else{K=r.merge(K,W)}});if(M){for(var N=0;K[N];N++){if(r.nodeName(K[N],"script")&&(!K[N].type||K[N].type.toLowerCase()==="text/javascript")){I.push(K[N].parentNode?K[N].parentNode.removeChild(K[N]):K[N])}else{if(K[N].nodeType===1){K.splice.apply(K,[N+1,0].concat(r.makeArray(K[N].getElementsByTagName("script"))))}M.appendChild(K[N])}}return I}return K},attr:function(N,K,O){if(!N||N.nodeType==3||N.nodeType==8){return h}var L=!r.isXMLDoc(N),P=O!==h;K=L&&r.props[K]||K;if(N.tagName){var J=/href|src|style/.test(K);if(K=="selected"&&N.parentNode){N.parentNode.selectedIndex}if(K in N&&L&&!J){if(P){if(K=="type"&&r.nodeName(N,"input")&&N.parentNode){throw"type property can't be changed"}N[K]=O}if(r.nodeName(N,"form")&&N.getAttributeNode(K)){return N.getAttributeNode(K).nodeValue}if(K=="tabIndex"){var M=N.getAttributeNode("tabIndex");return M&&M.specified?M.value:N.nodeName.match(/(button|input|object|select|textarea)/i)?0:N.nodeName.match(/^(a|area)$/i)&&N.href?0:h}return N[K]}if(!r.support.style&&L&&K=="style"){return r.attr(N.style,"cssText",O)}if(P){N.setAttribute(K,""+O)}var I=!r.support.hrefNormalized&&L&&J?N.getAttribute(K,2):N.getAttribute(K);return I===null?h:I}if(!r.support.opacity&&K=="opacity"){if(P){N.zoom=1;N.filter=(N.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(O)+""=="NaN"?"":"alpha(opacity="+O*100+")")}return N.filter&&N.filter.indexOf("opacity=")>=0?(parseFloat(N.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}K=K.replace(/-([a-z])/ig,function(Q,R){return R.toUpperCase()});if(P){N[K]=O}return N[K]},trim:function(I){return(I||"").replace(/^\s+|\s+$/g,"")},makeArray:function(K){var I=[];if(K!=null){var J=K.length;if(J==null||typeof K==="string"||r.isFunction(K)||K.setInterval){I[0]=K}else{while(J){I[--J]=K[J]}}}return I},inArray:function(K,L){for(var I=0,J=L.length;I<J;I++){if(L[I]===K){return I}}return -1},merge:function(L,I){var J=0,K,M=L.length;if(!r.support.getAll){while((K=I[J++])!=null){if(K.nodeType!=8){L[M++]=K}}}else{while((K=I[J++])!=null){L[M++]=K}}return L},unique:function(O){var J=[],I={};try{for(var K=0,L=O.length;K<L;K++){var N=r.data(O[K]);if(!I[N]){I[N]=true;J.push(O[K])}}}catch(M){J=O}return J},grep:function(J,N,I){var K=[];for(var L=0,M=J.length;L<M;L++){if(!I!=!N(J[L],L)){K.push(J[L])}}return K},map:function(I,N){var J=[];for(var K=0,L=I.length;K<L;K++){var M=N(I[K],K);if(M!=null){J[J.length]=M}}return J.concat.apply([],J)}});var G=navigator.userAgent.toLowerCase();r.browser={version:(G.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(G),opera:/opera/.test(G),msie:/msie/.test(G)&&!/opera/.test(G),mozilla:/mozilla/.test(G)&&!/(compatible|webkit)/.test(G)};r.each({parent:function(I){return I.parentNode},parents:function(I){return r.dir(I,"parentNode")},next:function(I){return r.nth(I,2,"nextSibling")},prev:function(I){return r.nth(I,2,"previousSibling")},nextAll:function(I){return r.dir(I,"nextSibling")},prevAll:function(I){return r.dir(I,"previousSibling")},siblings:function(I){return r.sibling(I.parentNode.firstChild,I)},children:function(I){return r.sibling(I.firstChild)},contents:function(I){return r.nodeName(I,"iframe")?I.contentDocument||I.contentWindow.document:r.makeArray(I.childNodes)}},function(I,J){r.fn[I]=function(K){var L=r.map(this,J);if(K&&typeof K=="string"){L=r.multiFilter(K,L)}return this.pushStack(r.unique(L),I,K)}});r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(I,J){r.fn[I]=function(K){var N=[],P=r(K);for(var O=0,L=P.length;O<L;O++){var M=(O>0?this.clone(true):this).get();r.fn[J].apply(r(P[O]),M);N=N.concat(M)}return this.pushStack(N,I,K)}});r.each({removeAttr:function(I){r.attr(this,I,"");if(this.nodeType==1){this.removeAttribute(I)}},addClass:function(I){r.className.add(this,I)},removeClass:function(I){r.className.remove(this,I)},toggleClass:function(J,I){if(typeof I!=="boolean"){I=!r.className.has(this,J)}r.className[I?"add":"remove"](this,J)},remove:function(I){if(!I||r.filter(I,[this]).length){r("*",this).add([this]).each(function(){r.event.remove(this);r.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){r(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(I,J){r.fn[I]=function(){return this.each(J,arguments)}});function l(I,J){return I[0]&&parseInt(r.curCSS(I[0],J,true),10)||0}var j="jQuery"+f(),z=0,E={};r.extend({cache:{},data:function(J,I,K){J=J==o?E:J;var L=J[j];if(!L){L=J[j]=++z}if(I&&!r.cache[L]){r.cache[L]={}}if(K!==h){r.cache[L][I]=K}return I?r.cache[L][I]:L},removeData:function(J,I){J=J==o?E:J;var L=J[j];if(I){if(r.cache[L]){delete r.cache[L][I];I="";for(I in r.cache[L]){break}if(!I){r.removeData(J)}}}else{try{delete J[j]}catch(K){if(J.removeAttribute){J.removeAttribute(j)}}delete r.cache[L]}},queue:function(J,I,L){if(J){I=(I||"fx")+"queue";var K=r.data(J,I);if(!K||r.isArray(L)){K=r.data(J,I,r.makeArray(L))}else{if(L){K.push(L)}}}return K},dequeue:function(L,K){var I=r.queue(L,K),J=I.shift();if(!K||K==="fx"){J=I[0]}if(J!==h){J.call(L)}}});r.fn.extend({data:function(I,K){var L=I.split(".");L[1]=L[1]?"."+L[1]:"";if(K===h){var J=this.triggerHandler("getData"+L[1]+"!",[L[0]]);if(J===h&&this.length){J=r.data(this[0],I)}return J===h&&L[1]?this.data(L[0]):J}else{return this.trigger("setData"+L[1]+"!",[L[0],K]).each(function(){r.data(this,I,K)})}},removeData:function(I){return this.each(function(){r.removeData(this,I)})},queue:function(I,J){if(typeof I!=="string"){J=I;I="fx"}if(J===h){return r.queue(this[0],I)}return this.each(function(){var K=r.queue(this,I,J);if(I=="fx"&&K.length==1){K[0].call(this)}})},dequeue:function(I){return this.each(function(){r.dequeue(this,I)})}});
/*
 * Sizzle CSS Selector Engine - v0.9.3
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
(function(){var V=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,P=0,L=Object.prototype.toString;var J=function(ac,Y,af,ag){af=af||[];Y=Y||document;if(Y.nodeType!==1&&Y.nodeType!==9){return[]}if(!ac||typeof ac!=="string"){return af}var ad=[],aa,aj,am,X,ah,Z,ab=true;V.lastIndex=0;while((aa=V.exec(ac))!==null){ad.push(aa[1]);if(aa[2]){Z=RegExp.rightContext;break}}if(ad.length>1&&Q.exec(ac)){if(ad.length===2&&M.relative[ad[0]]){aj=N(ad[0]+ad[1],Y)}else{aj=M.relative[ad[0]]?[Y]:J(ad.shift(),Y);while(ad.length){ac=ad.shift();if(M.relative[ac]){ac+=ad.shift()}aj=N(ac,aj)}}}else{var ai=ag?{expr:ad.pop(),set:I(ag)}:J.find(ad.pop(),ad.length===1&&Y.parentNode?Y.parentNode:Y,U(Y));aj=J.filter(ai.expr,ai.set);if(ad.length>0){am=I(aj)}else{ab=false}while(ad.length){var al=ad.pop(),ak=al;if(!M.relative[al]){al=""}else{ak=ad.pop()}if(ak==null){ak=Y}M.relative[al](am,ak,U(Y))}}if(!am){am=aj}if(!am){throw"Syntax error, unrecognized expression: "+(al||ac)}if(L.call(am)==="[object Array]"){if(!ab){af.push.apply(af,am)}else{if(Y.nodeType===1){for(var ae=0;am[ae]!=null;ae++){if(am[ae]&&(am[ae]===true||am[ae].nodeType===1&&O(Y,am[ae]))){af.push(aj[ae])}}}else{for(var ae=0;am[ae]!=null;ae++){if(am[ae]&&am[ae].nodeType===1){af.push(aj[ae])}}}}}else{I(am,af)}if(Z){J(Z,Y,af,ag);if(K){hasDuplicate=false;af.sort(K);if(hasDuplicate){for(var ae=1;ae<af.length;ae++){if(af[ae]===af[ae-1]){af.splice(ae--,1)}}}}}return af};J.matches=function(X,Y){return J(X,null,null,Y)};J.find=function(ae,X,af){var ad,ab;if(!ae){return[]}for(var aa=0,Z=M.order.length;aa<Z;aa++){var ac=M.order[aa],ab;if((ab=M.match[ac].exec(ae))){var Y=RegExp.leftContext;if(Y.substr(Y.length-1)!=="\\"){ab[1]=(ab[1]||"").replace(/\\/g,"");ad=M.find[ac](ab,X,af);if(ad!=null){ae=ae.replace(M.match[ac],"");break}}}}if(!ad){ad=X.getElementsByTagName("*")}return{set:ad,expr:ae}};J.filter=function(ah,ag,ak,aa){var Z=ah,am=[],ae=ag,ac,X,ad=ag&&ag[0]&&U(ag[0]);while(ah&&ag.length){for(var af in M.filter){if((ac=M.match[af].exec(ah))!=null){var Y=M.filter[af],al,aj;X=false;if(ae==am){am=[]}if(M.preFilter[af]){ac=M.preFilter[af](ac,ae,ak,am,aa,ad);if(!ac){X=al=true}else{if(ac===true){continue}}}if(ac){for(var ab=0;(aj=ae[ab])!=null;ab++){if(aj){al=Y(aj,ac,ab,ae);var ai=aa^!!al;if(ak&&al!=null){if(ai){X=true}else{ae[ab]=false}}else{if(ai){am.push(aj);X=true}}}}}if(al!==h){if(!ak){ae=am}ah=ah.replace(M.match[af],"");if(!X){return[]}break}}}if(ah==Z){if(X==null){throw"Syntax error, unrecognized expression: "+ah}else{break}}Z=ah}return ae};var M=J.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(X){return X.getAttribute("href")}},relative:{"+":function(ae,X,ad){var ab=typeof X==="string",af=ab&&!/\W/.test(X),ac=ab&&!af;if(af&&!ad){X=X.toUpperCase()}for(var aa=0,Z=ae.length,Y;aa<Z;aa++){if((Y=ae[aa])){while((Y=Y.previousSibling)&&Y.nodeType!==1){}ae[aa]=ac||Y&&Y.nodeName===X?Y||false:Y===X}}if(ac){J.filter(X,ae,true)}},">":function(ad,Y,ae){var ab=typeof Y==="string";if(ab&&!/\W/.test(Y)){Y=ae?Y:Y.toUpperCase();for(var Z=0,X=ad.length;Z<X;Z++){var ac=ad[Z];if(ac){var aa=ac.parentNode;ad[Z]=aa.nodeName===Y?aa:false}}}else{for(var Z=0,X=ad.length;Z<X;Z++){var ac=ad[Z];if(ac){ad[Z]=ab?ac.parentNode:ac.parentNode===Y}}if(ab){J.filter(Y,ad,true)}}},"":function(aa,Y,ac){var Z=P++,X=W;if(!Y.match(/\W/)){var ab=Y=ac?Y:Y.toUpperCase();X=T}X("parentNode",Y,Z,aa,ab,ac)},"~":function(aa,Y,ac){var Z=P++,X=W;if(typeof Y==="string"&&!Y.match(/\W/)){var ab=Y=ac?Y:Y.toUpperCase();X=T}X("previousSibling",Y,Z,aa,ab,ac)}},find:{ID:function(Y,Z,aa){if(typeof Z.getElementById!=="undefined"&&!aa){var X=Z.getElementById(Y[1]);return X?[X]:[]}},NAME:function(Z,ac,ad){if(typeof ac.getElementsByName!=="undefined"){var Y=[],ab=ac.getElementsByName(Z[1]);for(var aa=0,X=ab.length;aa<X;aa++){if(ab[aa].getAttribute("name")===Z[1]){Y.push(ab[aa])}}return Y.length===0?null:Y}},TAG:function(X,Y){return Y.getElementsByTagName(X[1])}},preFilter:{CLASS:function(aa,Y,Z,X,ad,ae){aa=" "+aa[1].replace(/\\/g,"")+" ";if(ae){return aa}for(var ab=0,ac;(ac=Y[ab])!=null;ab++){if(ac){if(ad^(ac.className&&(" "+ac.className+" ").indexOf(aa)>=0)){if(!Z){X.push(ac)}}else{if(Z){Y[ab]=false}}}}return false},ID:function(X){return X[1].replace(/\\/g,"")},TAG:function(Y,X){for(var Z=0;X[Z]===false;Z++){}return X[Z]&&U(X[Z])?Y[1]:Y[1].toUpperCase()},CHILD:function(X){if(X[1]=="nth"){var Y=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(X[2]=="even"&&"2n"||X[2]=="odd"&&"2n+1"||!/\D/.test(X[2])&&"0n+"+X[2]||X[2]);X[2]=(Y[1]+(Y[2]||1))-0;X[3]=Y[3]-0}X[0]=P++;return X},ATTR:function(ab,Y,Z,X,ac,ad){var aa=ab[1].replace(/\\/g,"");if(!ad&&M.attrMap[aa]){ab[1]=M.attrMap[aa]}if(ab[2]==="~="){ab[4]=" "+ab[4]+" "}return ab},PSEUDO:function(ab,Y,Z,X,ac){if(ab[1]==="not"){if(ab[3].match(V).length>1||/^\w/.test(ab[3])){ab[3]=J(ab[3],null,null,Y)}else{var aa=J.filter(ab[3],Y,Z,true^ac);if(!Z){X.push.apply(X,aa)}return false}}else{if(M.match.POS.test(ab[0])||M.match.CHILD.test(ab[0])){return true}}return ab},POS:function(X){X.unshift(true);return X}},filters:{enabled:function(X){return X.disabled===false&&X.type!=="hidden"},disabled:function(X){return X.disabled===true},checked:function(X){return X.checked===true},selected:function(X){X.parentNode.selectedIndex;return X.selected===true},parent:function(X){return !!X.firstChild},empty:function(X){return !X.firstChild},has:function(Z,Y,X){return !!J(X[3],Z).length},header:function(X){return/h\d/i.test(X.nodeName)},text:function(X){return"text"===X.type},radio:function(X){return"radio"===X.type},checkbox:function(X){return"checkbox"===X.type},file:function(X){return"file"===X.type},password:function(X){return"password"===X.type},submit:function(X){return"submit"===X.type},image:function(X){return"image"===X.type},reset:function(X){return"reset"===X.type},button:function(X){return"button"===X.type||X.nodeName.toUpperCase()==="BUTTON"},input:function(X){return/input|select|textarea|button/i.test(X.nodeName)}},setFilters:{first:function(Y,X){return X===0},last:function(Z,Y,X,aa){return Y===aa.length-1},even:function(Y,X){return X%2===0},odd:function(Y,X){return X%2===1},lt:function(Z,Y,X){return Y<X[3]-0},gt:function(Z,Y,X){return Y>X[3]-0},nth:function(Z,Y,X){return X[3]-0==Y},eq:function(Z,Y,X){return X[3]-0==Y}},filter:{PSEUDO:function(ad,Z,aa,ae){var Y=Z[1],ab=M.filters[Y];if(ab){return ab(ad,aa,Z,ae)}else{if(Y==="contains"){return(ad.textContent||ad.innerText||"").indexOf(Z[3])>=0}else{if(Y==="not"){var ac=Z[3];for(var aa=0,X=ac.length;aa<X;aa++){if(ac[aa]===ad){return false}}return true}}}},CHILD:function(X,aa){var ad=aa[1],Y=X;switch(ad){case"only":case"first":while(Y=Y.previousSibling){if(Y.nodeType===1){return false}}if(ad=="first"){return true}Y=X;case"last":while(Y=Y.nextSibling){if(Y.nodeType===1){return false}}return true;case"nth":var Z=aa[2],ag=aa[3];if(Z==1&&ag==0){return true}var ac=aa[0],af=X.parentNode;if(af&&(af.sizcache!==ac||!X.nodeIndex)){var ab=0;for(Y=af.firstChild;Y;Y=Y.nextSibling){if(Y.nodeType===1){Y.nodeIndex=++ab}}af.sizcache=ac}var ae=X.nodeIndex-ag;if(Z==0){return ae==0}else{return(ae%Z==0&&ae/Z>=0)}}},ID:function(Y,X){return Y.nodeType===1&&Y.getAttribute("id")===X},TAG:function(Y,X){return(X==="*"&&Y.nodeType===1)||Y.nodeName===X},CLASS:function(Y,X){return(" "+(Y.className||Y.getAttribute("class"))+" ").indexOf(X)>-1},ATTR:function(ac,aa){var Z=aa[1],X=M.attrHandle[Z]?M.attrHandle[Z](ac):ac[Z]!=null?ac[Z]:ac.getAttribute(Z),ad=X+"",ab=aa[2],Y=aa[4];return X==null?ab==="!=":ab==="="?ad===Y:ab==="*="?ad.indexOf(Y)>=0:ab==="~="?(" "+ad+" ").indexOf(Y)>=0:!Y?ad&&X!==false:ab==="!="?ad!=Y:ab==="^="?ad.indexOf(Y)===0:ab==="$="?ad.substr(ad.length-Y.length)===Y:ab==="|="?ad===Y||ad.substr(0,Y.length+1)===Y+"-":false},POS:function(ab,Y,Z,ac){var X=Y[2],aa=M.setFilters[X];if(aa){return aa(ab,Z,Y,ac)}}}};var Q=M.match.POS;for(var S in M.match){M.match[S]=RegExp(M.match[S].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var I=function(Y,X){Y=Array.prototype.slice.call(Y);if(X){X.push.apply(X,Y);return X}return Y};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(R){I=function(ab,aa){var Y=aa||[];if(L.call(ab)==="[object Array]"){Array.prototype.push.apply(Y,ab)}else{if(typeof ab.length==="number"){for(var Z=0,X=ab.length;Z<X;Z++){Y.push(ab[Z])}}else{for(var Z=0;ab[Z];Z++){Y.push(ab[Z])}}}return Y}}var K;if(document.documentElement.compareDocumentPosition){K=function(Y,X){var Z=Y.compareDocumentPosition(X)&4?-1:Y===X?0:1;if(Z===0){hasDuplicate=true}return Z}}else{if("sourceIndex" in document.documentElement){K=function(Y,X){var Z=Y.sourceIndex-X.sourceIndex;if(Z===0){hasDuplicate=true}return Z}}else{if(document.createRange){K=function(aa,Y){var Z=aa.ownerDocument.createRange(),X=Y.ownerDocument.createRange();Z.selectNode(aa);Z.collapse(true);X.selectNode(Y);X.collapse(true);var ab=Z.compareBoundaryPoints(Range.START_TO_END,X);if(ab===0){hasDuplicate=true}return ab}}}}(function(){var Y=document.createElement("form"),Z="script"+(new Date).getTime();Y.innerHTML="<input name='"+Z+"'/>";var X=document.documentElement;X.insertBefore(Y,X.firstChild);if(!!document.getElementById(Z)){M.find.ID=function(ab,ac,ad){if(typeof ac.getElementById!=="undefined"&&!ad){var aa=ac.getElementById(ab[1]);return aa?aa.id===ab[1]||typeof aa.getAttributeNode!=="undefined"&&aa.getAttributeNode("id").nodeValue===ab[1]?[aa]:h:[]}};M.filter.ID=function(ac,aa){var ab=typeof ac.getAttributeNode!=="undefined"&&ac.getAttributeNode("id");return ac.nodeType===1&&ab&&ab.nodeValue===aa}}X.removeChild(Y)})();(function(){var X=document.createElement("div");X.appendChild(document.createComment(""));if(X.getElementsByTagName("*").length>0){M.find.TAG=function(Y,ac){var ab=ac.getElementsByTagName(Y[1]);if(Y[1]==="*"){var aa=[];for(var Z=0;ab[Z];Z++){if(ab[Z].nodeType===1){aa.push(ab[Z])}}ab=aa}return ab}}X.innerHTML="<a href='#'></a>";if(X.firstChild&&typeof X.firstChild.getAttribute!=="undefined"&&X.firstChild.getAttribute("href")!=="#"){M.attrHandle.href=function(Y){return Y.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var X=J,Y=document.createElement("div");Y.innerHTML="<p class='TEST'></p>";if(Y.querySelectorAll&&Y.querySelectorAll(".TEST").length===0){return}J=function(ac,ab,Z,aa){ab=ab||document;if(!aa&&ab.nodeType===9&&!U(ab)){try{return I(ab.querySelectorAll(ac),Z)}catch(ad){}}return X(ac,ab,Z,aa)};J.find=X.find;J.filter=X.filter;J.selectors=X.selectors;J.matches=X.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var X=document.createElement("div");X.innerHTML="<div class='test e'></div><div class='test'></div>";if(X.getElementsByClassName("e").length===0){return}X.lastChild.className="e";if(X.getElementsByClassName("e").length===1){return}M.order.splice(1,0,"CLASS");M.find.CLASS=function(Y,Z,aa){if(typeof Z.getElementsByClassName!=="undefined"&&!aa){return Z.getElementsByClassName(Y[1])}}})()}function T(Y,ad,ac,ah,ae,ag){var af=Y=="previousSibling"&&!ag;for(var aa=0,Z=ah.length;aa<Z;aa++){var X=ah[aa];if(X){if(af&&X.nodeType===1){X.sizcache=ac;X.sizset=aa}X=X[Y];var ab=false;while(X){if(X.sizcache===ac){ab=ah[X.sizset];break}if(X.nodeType===1&&!ag){X.sizcache=ac;X.sizset=aa}if(X.nodeName===ad){ab=X;break}X=X[Y]}ah[aa]=ab}}}function W(Y,ad,ac,ah,ae,ag){var af=Y=="previousSibling"&&!ag;for(var aa=0,Z=ah.length;aa<Z;aa++){var X=ah[aa];if(X){if(af&&X.nodeType===1){X.sizcache=ac;X.sizset=aa}X=X[Y];var ab=false;while(X){if(X.sizcache===ac){ab=ah[X.sizset];break}if(X.nodeType===1){if(!ag){X.sizcache=ac;X.sizset=aa}if(typeof ad!=="string"){if(X===ad){ab=true;break}}else{if(J.filter(ad,[X]).length>0){ab=X;break}}}X=X[Y]}ah[aa]=ab}}}var O=document.compareDocumentPosition?function(Y,X){return Y.compareDocumentPosition(X)&16}:function(Y,X){return Y!==X&&(Y.contains?Y.contains(X):true)};var U=function(X){return X.nodeType===9&&X.documentElement.nodeName!=="HTML"||!!X.ownerDocument&&U(X.ownerDocument)};var N=function(X,ae){var aa=[],ab="",ac,Z=ae.nodeType?[ae]:ae;while((ac=M.match.PSEUDO.exec(X))){ab+=ac[0];X=X.replace(M.match.PSEUDO,"")}X=M.relative[X]?X+"*":X;for(var ad=0,Y=Z.length;ad<Y;ad++){J(X,Z[ad],aa)}return J.filter(ab,aa)};r.find=J;r.filter=J.filter;r.expr=J.selectors;r.expr[":"]=r.expr.filters;J.selectors.filters.hidden=function(X){return X.offsetWidth===0||X.offsetHeight===0};J.selectors.filters.visible=function(X){return X.offsetWidth>0||X.offsetHeight>0};J.selectors.filters.animated=function(X){return r.grep(r.timers,function(Y){return X===Y.elem}).length};r.multiFilter=function(Z,X,Y){if(Y){Z=":not("+Z+")"}return J.matches(Z,X)};r.dir=function(Z,Y){var X=[],aa=Z[Y];while(aa&&aa!=document){if(aa.nodeType==1){X.push(aa)}aa=aa[Y]}return X};r.nth=function(ab,X,Z,aa){X=X||1;var Y=0;for(;ab;ab=ab[Z]){if(ab.nodeType==1&&++Y==X){break}}return ab};r.sibling=function(Z,Y){var X=[];for(;Z;Z=Z.nextSibling){if(Z.nodeType==1&&Z!=Y){X.push(Z)}}return X};return;o.Sizzle=J})();r.event={add:function(M,J,L,O){if(M.nodeType==3||M.nodeType==8){return}if(M.setInterval&&M!=o){M=o}if(!L.guid){L.guid=this.guid++}if(O!==h){var K=L;L=this.proxy(K);L.data=O}var I=r.data(M,"events")||r.data(M,"events",{}),N=r.data(M,"handle")||r.data(M,"handle",function(){return typeof r!=="undefined"&&!r.event.triggered?r.event.handle.apply(arguments.callee.elem,arguments):h});N.elem=M;r.each(J.split(/\s+/),function(Q,R){var S=R.split(".");R=S.shift();L.type=S.slice().sort().join(".");var P=I[R];if(r.event.specialAll[R]){r.event.specialAll[R].setup.call(M,O,S)}if(!P){P=I[R]={};if(!r.event.special[R]||r.event.special[R].setup.call(M,O,S)===false){if(M.addEventListener){M.addEventListener(R,N,false)}else{if(M.attachEvent){M.attachEvent("on"+R,N)}}}}P[L.guid]=L;r.event.global[R]=true});M=null},guid:1,global:{},remove:function(O,L,N){if(O.nodeType==3||O.nodeType==8){return}var K=r.data(O,"events"),J,I;if(K){if(L===h||(typeof L==="string"&&L.charAt(0)==".")){for(var M in K){this.remove(O,M+(L||""))}}else{if(L.type){N=L.handler;L=L.type}r.each(L.split(/\s+/),function(Q,S){var U=S.split(".");S=U.shift();var R=RegExp("(^|\\.)"+U.slice().sort().join(".*\\.")+"(\\.|$)");if(K[S]){if(N){delete K[S][N.guid]}else{for(var T in K[S]){if(R.test(K[S][T].type)){delete K[S][T]}}}if(r.event.specialAll[S]){r.event.specialAll[S].teardown.call(O,U)}for(J in K[S]){break}if(!J){if(!r.event.special[S]||r.event.special[S].teardown.call(O,U)===false){if(O.removeEventListener){O.removeEventListener(S,r.data(O,"handle"),false)}else{if(O.detachEvent){O.detachEvent("on"+S,r.data(O,"handle"))}}}J=null;delete K[S]}}})}for(J in K){break}if(!J){var P=r.data(O,"handle");if(P){P.elem=null}r.removeData(O,"events");r.removeData(O,"handle")}}},trigger:function(M,O,L,I){var K=M.type||M;if(!I){M=typeof M==="object"?M[j]?M:r.extend(r.Event(K),M):r.Event(K);if(K.indexOf("!")>=0){M.type=K=K.slice(0,-1);M.exclusive=true}if(!L){M.stopPropagation();if(this.global[K]){r.each(r.cache,function(){if(this.events&&this.events[K]){r.event.trigger(M,O,this.handle.elem)}})}}if(!L||L.nodeType==3||L.nodeType==8){return h}M.result=h;M.target=L;O=r.makeArray(O);O.unshift(M)}M.currentTarget=L;var N=r.data(L,"handle");if(N){N.apply(L,O)}if((!L[K]||(r.nodeName(L,"a")&&K=="click"))&&L["on"+K]&&L["on"+K].apply(L,O)===false){M.result=false}if(!I&&L[K]&&!M.isDefaultPrevented()&&!(r.nodeName(L,"a")&&K=="click")){this.triggered=true;try{L[K]()}catch(P){}}this.triggered=false;if(!M.isPropagationStopped()){var J=L.parentNode||L.ownerDocument;if(J){r.event.trigger(M,O,J,true)}}},handle:function(O){var N,I;O=arguments[0]=r.event.fix(O||o.event);O.currentTarget=this;var P=O.type.split(".");O.type=P.shift();N=!P.length&&!O.exclusive;var M=RegExp("(^|\\.)"+P.slice().sort().join(".*\\.")+"(\\.|$)");I=(r.data(this,"events")||{})[O.type];for(var K in I){var L=I[K];if(N||M.test(L.type)){O.handler=L;O.data=L.data;var J=L.apply(this,arguments);if(J!==h){O.result=J;if(J===false){O.preventDefault();O.stopPropagation()}}if(O.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(L){if(L[j]){return L}var J=L;L=r.Event(J);for(var K=this.props.length,N;K;){N=this.props[--K];L[N]=J[N]}if(!L.target){L.target=L.srcElement||document}if(L.target.nodeType==3){L.target=L.target.parentNode}if(!L.relatedTarget&&L.fromElement){L.relatedTarget=L.fromElement==L.target?L.toElement:L.fromElement}if(L.pageX==null&&L.clientX!=null){var M=document.documentElement,I=document.body;L.pageX=L.clientX+(M&&M.scrollLeft||I&&I.scrollLeft||0)-(M.clientLeft||0);L.pageY=L.clientY+(M&&M.scrollTop||I&&I.scrollTop||0)-(M.clientTop||0)}if(!L.which&&((L.charCode||L.charCode===0)?L.charCode:L.keyCode)){L.which=L.charCode||L.keyCode}if(!L.metaKey&&L.ctrlKey){L.metaKey=L.ctrlKey}if(!L.which&&L.button){L.which=(L.button&1?1:(L.button&2?3:(L.button&4?2:0)))}return L},proxy:function(J,I){I=I||function(){return J.apply(this,arguments)};I.guid=J.guid=J.guid||I.guid||this.guid++;return I},special:{ready:{setup:F,teardown:function(){}}},specialAll:{live:{setup:function(I,J){r.event.add(this,J[0],c)},teardown:function(K){if(K.length){var I=0,J=RegExp("(^|\\.)"+K[0]+"(\\.|$)");r.each((r.data(this,"events").live||{}),function(){if(J.test(this.type)){I++}});if(I<1){r.event.remove(this,K[0],c)}}}}}};r.Event=function(I){if(!this.preventDefault){return new r.Event(I)}if(I&&I.type){this.originalEvent=I;this.type=I.type}else{this.type=I}this.timeStamp=f();this[j]=true};function n(){return false}function x(){return true}r.Event.prototype={preventDefault:function(){this.isDefaultPrevented=x;var I=this.originalEvent;if(!I){return}if(I.preventDefault){I.preventDefault()}I.returnValue=false},stopPropagation:function(){this.isPropagationStopped=x;var I=this.originalEvent;if(!I){return}if(I.stopPropagation){I.stopPropagation()}I.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=x;this.stopPropagation()},isDefaultPrevented:n,isPropagationStopped:n,isImmediatePropagationStopped:n};var a=function(J){var I=J.relatedTarget;while(I&&I!=this){try{I=I.parentNode}catch(K){I=this}}if(I!=this){J.type=J.data;r.event.handle.apply(this,arguments)}};r.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(J,I){r.event.special[I]={setup:function(){r.event.add(this,J,a,I)},teardown:function(){r.event.remove(this,J,a)}}});r.fn.extend({bind:function(J,K,I){return J=="unload"?this.one(J,K,I):this.each(function(){r.event.add(this,J,I||K,I&&K)})},one:function(K,L,J){var I=r.event.proxy(J||L,function(M){r(this).unbind(M,I);return(J||L).apply(this,arguments)});return this.each(function(){r.event.add(this,K,I,J&&L)})},unbind:function(J,I){return this.each(function(){r.event.remove(this,J,I)})},trigger:function(I,J){return this.each(function(){r.event.trigger(I,J,this)})},triggerHandler:function(I,K){if(this[0]){var J=r.Event(I);J.preventDefault();J.stopPropagation();r.event.trigger(J,K,this[0]);return J.result}},toggle:function(K){var I=arguments,J=1;while(J<I.length){r.event.proxy(K,I[J++])}return this.click(r.event.proxy(K,function(L){this.lastToggle=(this.lastToggle||0)%J;L.preventDefault();return I[this.lastToggle++].apply(this,arguments)||false}))},hover:function(I,J){return this.mouseenter(I).mouseleave(J)},ready:function(I){F();if(r.isReady){I.call(document,r)}else{r.readyList.push(I)}return this},live:function(K,J){var I=r.event.proxy(J);I.guid+=this.selector+K;r(document).bind(k(K,this.selector),this.selector,I);return this},die:function(J,I){r(document).unbind(k(J,this.selector),I?{guid:I.guid+this.selector+J}:null);return this}});function c(L){var I=RegExp("(^|\\.)"+L.type+"(\\.|$)"),K=true,J=[];r.each(r.data(this,"events").live||[],function(M,N){if(I.test(N.type)){var O=r(L.target).closest(N.data)[0];if(O){J.push({elem:O,fn:N})}}});J.sort(function(N,M){return r.data(N.elem,"closest")-r.data(M.elem,"closest")});r.each(J,function(){if(this.fn.call(this.elem,L,this.fn.data)===false){return(K=false)}});return K}function k(J,I){return["live",J,I.replace(/\./g,"`").replace(/ /g,"|")].join(".")}r.extend({isReady:false,readyList:[],ready:function(){if(!r.isReady){r.isReady=true;if(r.readyList){r.each(r.readyList,function(){this.call(document,r)});r.readyList=null}r(document).triggerHandler("ready")}}});var B=false;function F(){if(B){return}B=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);r.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);r.ready()}});if(document.documentElement.doScroll&&o==o.top){(function(){if(r.isReady){return}try{document.documentElement.doScroll("left")}catch(I){setTimeout(arguments.callee,0);return}r.ready()})()}}}r.event.add(o,"load",r.ready)}r.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(J,I){r.fn[I]=function(K){return K?this.bind(I,K):this.trigger(I)}});r(o).bind("unload",function(){for(var I in r.cache){if(I!=1&&r.cache[I].handle){r.event.remove(r.cache[I].handle.elem)}}});(function(){r.support={};var J=document.documentElement,K=document.createElement("script"),O=document.createElement("div"),N="script"+(new Date).getTime();O.style.display="none";O.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var L=O.getElementsByTagName("*"),I=O.getElementsByTagName("a")[0];if(!L||!L.length||!I){return}r.support={leadingWhitespace:O.firstChild.nodeType==3,tbody:!O.getElementsByTagName("tbody").length,objectAll:!!O.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!O.getElementsByTagName("link").length,style:/red/.test(I.getAttribute("style")),hrefNormalized:I.getAttribute("href")==="/a",opacity:I.style.opacity==="0.5",cssFloat:!!I.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};K.type="text/javascript";try{K.appendChild(document.createTextNode("window."+N+"=1;"))}catch(M){}J.insertBefore(K,J.firstChild);if(o[N]){r.support.scriptEval=true;delete o[N]}J.removeChild(K);if(O.attachEvent&&O.fireEvent){O.attachEvent("onclick",function(){r.support.noCloneEvent=false;O.detachEvent("onclick",arguments.callee)});O.cloneNode(true).fireEvent("onclick")}r(function(){var P=document.createElement("div");P.style.width=P.style.paddingLeft="1px";document.body.appendChild(P);r.boxModel=r.support.boxModel=P.offsetWidth===2;document.body.removeChild(P).style.display="none"})})();var A=r.support.cssFloat?"cssFloat":"styleFloat";r.props={"for":"htmlFor","class":"className","float":A,cssFloat:A,styleFloat:A,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};r.fn.extend({_load:r.fn.load,load:function(K,N,O){if(typeof K!=="string"){return this._load(K)}var M=K.indexOf(" ");if(M>=0){var I=K.slice(M,K.length);K=K.slice(0,M)}var L="GET";if(N){if(r.isFunction(N)){O=N;N=null}else{if(typeof N==="object"){N=r.param(N);L="POST"}}}var J=this;r.ajax({url:K,type:L,dataType:"html",data:N,complete:function(Q,P){if(P=="success"||P=="notmodified"){J.html(I?r("<div/>").append(Q.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(I):Q.responseText)}if(O){J.each(O,[Q.responseText,P,Q])}}});return this},serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?r.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(I,J){var K=r(this).val();return K==null?null:r.isArray(K)?r.map(K,function(M,L){return{name:J.name,value:M}}):{name:J.name,value:K}}).get()}});r.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(I,J){r.fn[J]=function(K){return this.bind(J,K)}});var u=f();r.extend({get:function(I,K,L,J){if(r.isFunction(K)){L=K;K=null}return r.ajax({type:"GET",url:I,data:K,success:L,dataType:J})},getScript:function(I,J){return r.get(I,null,J,"script")},getJSON:function(I,J,K){return r.get(I,J,K,"json")},post:function(I,K,L,J){if(r.isFunction(K)){L=K;K={}}return r.ajax({type:"POST",url:I,data:K,success:L,dataType:J})},ajaxSetup:function(I){r.extend(r.ajaxSettings,I)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return o.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(Q){Q=r.extend(true,Q,r.extend(true,{},r.ajaxSettings,Q));var aa,J=/=\?(&|$)/g,V,Z,K=Q.type.toUpperCase();if(Q.data&&Q.processData&&typeof Q.data!=="string"){Q.data=r.param(Q.data)}if(Q.dataType=="jsonp"){if(K=="GET"){if(!Q.url.match(J)){Q.url+=(Q.url.match(/\?/)?"&":"?")+(Q.jsonp||"callback")+"=?"}}else{if(!Q.data||!Q.data.match(J)){Q.data=(Q.data?Q.data+"&":"")+(Q.jsonp||"callback")+"=?"}}Q.dataType="json"}if(Q.dataType=="json"&&(Q.data&&Q.data.match(J)||Q.url.match(J))){aa="jsonp"+u++;if(Q.data){Q.data=(Q.data+"").replace(J,"="+aa+"$1")}Q.url=Q.url.replace(J,"="+aa+"$1");Q.dataType="script";o[aa]=function(ab){Z=ab;M();P();o[aa]=h;try{delete o[aa]}catch(ac){}if(L){L.removeChild(X)}}}if(Q.dataType=="script"&&Q.cache==null){Q.cache=false}if(Q.cache===false&&K=="GET"){var I=f();var Y=Q.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+I+"$2");Q.url=Y+((Y==Q.url)?(Q.url.match(/\?/)?"&":"?")+"_="+I:"")}if(Q.data&&K=="GET"){Q.url+=(Q.url.match(/\?/)?"&":"?")+Q.data;Q.data=null}if(Q.global&&!r.active++){r.event.trigger("ajaxStart")}var U=/^(\w+:)?\/\/([^\/?#]+)/.exec(Q.url);if(Q.dataType=="script"&&K=="GET"&&U&&(U[1]&&U[1]!=location.protocol||U[2]!=location.host)){var L=document.getElementsByTagName("head")[0];var X=document.createElement("script");X.src=Q.url;if(Q.scriptCharset){X.charset=Q.scriptCharset}if(!aa){var S=false;X.onload=X.onreadystatechange=function(){if(!S&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){S=true;M();P();X.onload=X.onreadystatechange=null;L.removeChild(X)}}}L.appendChild(X);return h}var O=false;var N=Q.xhr();if(Q.username){N.open(K,Q.url,Q.async,Q.username,Q.password)}else{N.open(K,Q.url,Q.async)}try{if(Q.data){N.setRequestHeader("Content-Type",Q.contentType)}if(Q.ifModified){N.setRequestHeader("If-Modified-Since",r.lastModified[Q.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}N.setRequestHeader("X-Requested-With","XMLHttpRequest");N.setRequestHeader("Accept",Q.dataType&&Q.accepts[Q.dataType]?Q.accepts[Q.dataType]+", */*":Q.accepts._default)}catch(W){}if(Q.beforeSend&&Q.beforeSend(N,Q)===false){if(Q.global&&!--r.active){r.event.trigger("ajaxStop")}N.abort();return false}if(Q.global){r.event.trigger("ajaxSend",[N,Q])}var R=function(ab){if(N.readyState==0){if(T){clearInterval(T);T=null;if(Q.global&&!--r.active){r.event.trigger("ajaxStop")}}}else{if(!O&&N&&(N.readyState==4||ab=="timeout")){O=true;if(T){clearInterval(T);T=null}V=ab=="timeout"?"timeout":!r.httpSuccess(N)?"error":Q.ifModified&&r.httpNotModified(N,Q.url)?"notmodified":"success";if(V=="success"){try{Z=r.httpData(N,Q.dataType,Q)}catch(ad){V="parsererror"}}if(V=="success"){var ac;try{ac=N.getResponseHeader("Last-Modified")}catch(ad){}if(Q.ifModified&&ac){r.lastModified[Q.url]=ac}if(!aa){M()}}else{r.handleError(Q,N,V)}P();if(ab){N.abort()}if(Q.async){N=null}}}};if(Q.async){var T=setInterval(R,13);if(Q.timeout>0){setTimeout(function(){if(N&&!O){R("timeout")}},Q.timeout)}}try{N.send(Q.data)}catch(W){r.handleError(Q,N,null,W)}if(!Q.async){R()}function M(){if(Q.success){Q.success(Z,V)}if(Q.global){r.event.trigger("ajaxSuccess",[N,Q])}}function P(){if(Q.complete){Q.complete(N,V)}if(Q.global){r.event.trigger("ajaxComplete",[N,Q])}if(Q.global&&!--r.active){r.event.trigger("ajaxStop")}}return N},handleError:function(J,L,I,K){if(J.error){J.error(L,I,K)}if(J.global){r.event.trigger("ajaxError",[L,J,K])}},active:0,httpSuccess:function(J){try{return !J.status&&location.protocol=="file:"||(J.status>=200&&J.status<300)||J.status==304||J.status==1223}catch(I){}return false},httpNotModified:function(K,I){try{var L=K.getResponseHeader("Last-Modified");return K.status==304||L==r.lastModified[I]}catch(J){}return false},httpData:function(N,L,K){var J=N.getResponseHeader("content-type"),I=L=="xml"||!L&&J&&J.indexOf("xml")>=0,M=I?N.responseXML:N.responseText;if(I&&M.documentElement.tagName=="parsererror"){throw"parsererror"}if(K&&K.dataFilter){M=K.dataFilter(M,L)}if(typeof M==="string"){if(L=="script"){r.globalEval(M)}if(L=="json"){M=o["eval"]("("+M+")")}}return M},param:function(I){var K=[];function L(M,N){K[K.length]=encodeURIComponent(M)+"="+encodeURIComponent(N)}if(r.isArray(I)||I.jquery){r.each(I,function(){L(this.name,this.value)})}else{for(var J in I){if(r.isArray(I[J])){r.each(I[J],function(){L(J,this)})}else{L(J,r.isFunction(I[J])?I[J]():I[J])}}}return K.join("&").replace(/%20/g,"+")}});var p={},q,e=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function w(J,I){var K={};r.each(e.concat.apply([],e.slice(0,I)),function(){K[this]=J});return K}r.fn.extend({show:function(N,P){if(N){return this.animate(w("show",3),N,P)}else{for(var L=0,J=this.length;L<J;L++){var I=r.data(this[L],"olddisplay");this[L].style.display=I||"";if(r.css(this[L],"display")==="none"){var K=this[L].tagName,O;if(p[K]){O=p[K]}else{var M=r("<"+K+" />").appendTo("body");O=M.css("display");if(O==="none"){O="block"}M.remove();p[K]=O}r.data(this[L],"olddisplay",O)}}for(var L=0,J=this.length;L<J;L++){this[L].style.display=r.data(this[L],"olddisplay")||""}return this}},hide:function(L,M){if(L){return this.animate(w("hide",3),L,M)}else{for(var K=0,J=this.length;K<J;K++){var I=r.data(this[K],"olddisplay");if(!I&&I!=="none"){r.data(this[K],"olddisplay",r.css(this[K],"display"))}}for(var K=0,J=this.length;K<J;K++){this[K].style.display="none"}return this}},_toggle:r.fn.toggle,toggle:function(K,J){var I=typeof K==="boolean";return r.isFunction(K)&&r.isFunction(J)?this._toggle.apply(this,arguments):K==null||I?this.each(function(){var L=I?K:r(this).is(":hidden");r(this)[L?"show":"hide"]()}):this.animate(w("toggle",3),K,J)},fadeTo:function(I,K,J){return this.animate({opacity:K},I,J)},animate:function(M,J,L,K){var I=r.speed(J,L,K);return this[I.queue===false?"each":"queue"](function(){var O=r.extend({},I),Q,P=this.nodeType==1&&r(this).is(":hidden"),N=this;for(Q in M){if(M[Q]=="hide"&&P||M[Q]=="show"&&!P){return O.complete.call(this)}if((Q=="height"||Q=="width")&&this.style){O.display=r.css(this,"display");O.overflow=this.style.overflow}}if(O.overflow!=null){this.style.overflow="hidden"}O.curAnim=r.extend({},M);r.each(M,function(S,W){var V=new r.fx(N,O,S);if(/toggle|show|hide/.test(W)){V[W=="toggle"?P?"show":"hide":W](M)}else{var U=W.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),X=V.cur(true)||0;if(U){var R=parseFloat(U[2]),T=U[3]||"px";if(T!="px"){N.style[S]=(R||1)+T;X=((R||1)/V.cur(true))*X;N.style[S]=X+T}if(U[1]){R=((U[1]=="-="?-1:1)*R)+X}V.custom(X,R,T)}else{V.custom(X,W,"")}}});return true})},stop:function(J,I){var K=r.timers;if(J){this.queue([])}this.each(function(){for(var L=K.length-1;L>=0;L--){if(K[L].elem==this){if(I){K[L](true)}K.splice(L,1)}}});if(!I){this.dequeue()}return this}});r.each({slideDown:w("show",1),slideUp:w("hide",1),slideToggle:w("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(I,J){r.fn[I]=function(K,L){return this.animate(J,K,L)}});r.extend({speed:function(K,L,J){var I=typeof K==="object"?K:{complete:J||!J&&L||r.isFunction(K)&&K,duration:K,easing:J&&L||L&&!r.isFunction(L)&&L};I.duration=r.fx.off?0:typeof I.duration==="number"?I.duration:r.fx.speeds[I.duration]||r.fx.speeds._default;I.old=I.complete;I.complete=function(){if(I.queue!==false){r(this).dequeue()}if(r.isFunction(I.old)){I.old.call(this)}};return I},easing:{linear:function(K,L,I,J){return I+J*K},swing:function(K,L,I,J){return((-Math.cos(K*Math.PI)/2)+0.5)*J+I}},timers:[],fx:function(J,I,K){this.options=I;this.elem=J;this.prop=K;if(!I.orig){I.orig={}}}});r.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(r.fx.step[this.prop]||r.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(J){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var I=parseFloat(r.css(this.elem,this.prop,J));return I&&I>-10000?I:parseFloat(r.curCSS(this.elem,this.prop))||0},custom:function(M,L,K){this.startTime=f();this.start=M;this.end=L;this.unit=K||this.unit||"px";this.now=this.start;this.pos=this.state=0;var I=this;function J(N){return I.step(N)}J.elem=this.elem;if(J()&&r.timers.push(J)&&!q){q=setInterval(function(){var O=r.timers;for(var N=0;N<O.length;N++){if(!O[N]()){O.splice(N--,1)}}if(!O.length){clearInterval(q);q=h}},13)}},show:function(){this.options.orig[this.prop]=r.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());r(this.elem).show()},hide:function(){this.options.orig[this.prop]=r.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(L){var K=f();if(L||K>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var I=true;for(var J in this.options.curAnim){if(this.options.curAnim[J]!==true){I=false}}if(I){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(r.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){r(this.elem).hide()}if(this.options.hide||this.options.show){for(var M in this.options.curAnim){r.attr(this.elem.style,M,this.options.orig[M])}}this.options.complete.call(this.elem)}return false}else{var N=K-this.startTime;this.state=N/this.options.duration;this.pos=r.easing[this.options.easing||(r.easing.swing?"swing":"linear")](this.state,N,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};r.extend(r.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(I){r.attr(I.elem.style,"opacity",I.now)},_default:function(I){if(I.elem.style&&I.elem.style[I.prop]!=null){I.elem.style[I.prop]=I.now+I.unit}else{I.elem[I.prop]=I.now}}}});if(document.documentElement.getBoundingClientRect){r.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return r.offset.bodyOffset(this[0])}var K=this[0].getBoundingClientRect(),N=this[0].ownerDocument,J=N.body,I=N.documentElement,P=I.clientTop||J.clientTop||0,O=I.clientLeft||J.clientLeft||0,M=K.top+(self.pageYOffset||r.boxModel&&I.scrollTop||J.scrollTop)-P,L=K.left+(self.pageXOffset||r.boxModel&&I.scrollLeft||J.scrollLeft)-O;return{top:M,left:L}}}else{r.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return r.offset.bodyOffset(this[0])}r.offset.initialized||r.offset.initialize();var N=this[0],K=N.offsetParent,J=N,S=N.ownerDocument,Q,L=S.documentElement,O=S.body,P=S.defaultView,I=P.getComputedStyle(N,null),R=N.offsetTop,M=N.offsetLeft;while((N=N.parentNode)&&N!==O&&N!==L){Q=P.getComputedStyle(N,null);R-=N.scrollTop,M-=N.scrollLeft;if(N===K){R+=N.offsetTop,M+=N.offsetLeft;if(r.offset.doesNotAddBorder&&!(r.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(N.tagName))){R+=parseInt(Q.borderTopWidth,10)||0,M+=parseInt(Q.borderLeftWidth,10)||0}J=K,K=N.offsetParent}if(r.offset.subtractsBorderForOverflowNotVisible&&Q.overflow!=="visible"){R+=parseInt(Q.borderTopWidth,10)||0,M+=parseInt(Q.borderLeftWidth,10)||0}I=Q}if(I.position==="relative"||I.position==="static"){R+=O.offsetTop,M+=O.offsetLeft}if(I.position==="fixed"){R+=Math.max(L.scrollTop,O.scrollTop),M+=Math.max(L.scrollLeft,O.scrollLeft)}return{top:R,left:M}}}r.offset={initialize:function(){if(this.initialized){return}var P=document.body,J=document.createElement("div"),L,K,R,M,Q,I,N=P.style.marginTop,O='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';Q={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(I in Q){J.style[I]=Q[I]}J.innerHTML=O;P.insertBefore(J,P.firstChild);L=J.firstChild,K=L.firstChild,M=L.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(K.offsetTop!==5);this.doesAddBorderForTableAndCells=(M.offsetTop===5);L.style.overflow="hidden",L.style.position="relative";this.subtractsBorderForOverflowNotVisible=(K.offsetTop===-5);P.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(P.offsetTop===0);P.style.marginTop=N;P.removeChild(J);this.initialized=true},bodyOffset:function(I){r.offset.initialized||r.offset.initialize();var K=I.offsetTop,J=I.offsetLeft;if(r.offset.doesNotIncludeMarginInBodyOffset){K+=parseInt(r.curCSS(I,"marginTop",true),10)||0,J+=parseInt(r.curCSS(I,"marginLeft",true),10)||0}return{top:K,left:J}}};r.fn.extend({position:function(){var M=0,L=0,J;if(this[0]){var K=this.offsetParent(),N=this.offset(),I=/^body|html$/i.test(K[0].tagName)?{top:0,left:0}:K.offset();N.top-=l(this,"marginTop");N.left-=l(this,"marginLeft");I.top+=l(K,"borderTopWidth");I.left+=l(K,"borderLeftWidth");J={top:N.top-I.top,left:N.left-I.left}}return J},offsetParent:function(){var I=this[0].offsetParent||document.body;while(I&&(!/^body|html$/i.test(I.tagName)&&r.css(I,"position")=="static")){I=I.offsetParent}return r(I)}});r.each(["Left","Top"],function(J,I){var K="scroll"+I;r.fn[K]=function(L){if(!this[0]){return null}return L!==h?this.each(function(){this==o||this==document?o.scrollTo(!J?L:r(o).scrollLeft(),J?L:r(o).scrollTop()):this[K]=L}):this[0]==o||this[0]==document?self[J?"pageYOffset":"pageXOffset"]||r.boxModel&&document.documentElement[K]||document.body[K]:this[0][K]}});r.each(["Height","Width"],function(M,K){var I=M?"Left":"Top",L=M?"Right":"Bottom",J=K.toLowerCase();r.fn["inner"+K]=function(){return this[0]?r.css(this[0],J,false,"padding"):null};r.fn["outer"+K]=function(O){return this[0]?r.css(this[0],J,false,O?"margin":"border"):null};var N=K.toLowerCase();r.fn[N]=function(O){return this[0]==o?document.compatMode=="CSS1Compat"&&document.documentElement["client"+K]||document.body["client"+K]:this[0]==document?Math.max(document.documentElement["client"+K],document.body["scroll"+K],document.documentElement["scroll"+K],document.body["offset"+K],document.documentElement["offset"+K]):O===h?(this.length?r.css(this[0],N):null):this.css(N,typeof O==="string"?O:O+"px")}})})();function monkeypatch_ck_for_webkit_tabindex(){if(!CKEDITOR.env.webkit){return}var a=CKEDITOR.dom.element.prototype.getTabIndex;CKEDITOR.dom.element.prototype.getTabIndex=(function(){if({FIELDSET:1,LEGEND:1}[this.$.nodeName]){return -1}return a.call(this)})}(function(){var a,b;a=document.getElementsByTagName("script");b=/(.*\/static\/)js\/(concatenated|ck_invoke)\.js$/.exec(a[a.length-1].src)[1];window.STATIC_BASEPATH=b;window.CKEDITOR_BASEPATH=b+"js/ckeditor/";jQuery(function(){var g=jQuery;var c;var h={customConfig:"",toolbar_BK:[["Bold","Italic","Underline","-","NumberedList","BulletedList","Blockquote","-","Undo","Redo","Link","Unlink","Image","Source","-","PasteText","PasteFromWord"]],toolbar:"BK",toolbarCanCollapse:false,filebrowserBrowseUrl:window.location.href+"/ck_filebrowser_ajax",filebrowserUploadUrl:window.location.href+"/ck_fileuploader_ajax",filebrowserWindowWidth:400,filebrowserWindowHeight:300,plugins:"a11yhelp,basicstyles,blockquote,button,clipboard,div,enterkey,entities,filebrowser,font,format,forms,htmldataprocessor,image,indent,justify,keystrokes,link,list,pastefromword,pastetext,popup,removeformat,sourcearea,tab,templates,toolbar,undo,wysiwygarea"};var f={customConfig:"",toolbar_EU:[["Bold","Italic","Underline","-","NumberedList","BulletedList","Blockquote","-","Undo","Redo","Link","Unlink","Image","-","PasteText","PasteFromWord"]],toolbar:"EU",toolbarCanCollapse:false,plugins:"a11yhelp,basicstyles,blockquote,button,clipboard,div,enterkey,entities,font,format,forms,htmldataprocessor,image,indent,justify,keystrokes,link,list,pastefromword,pastetext,popup,removeformat,sourcearea,tab,templates,toolbar,undo,wysiwygarea"};if(g("textarea.wysiwyg-explanatory").length>0){var e=/^(.*)\/edit\/?$/.exec(window.location.href)[1];h.filebrowserBrowseUrl=e+"/ck_filebrowser_ajax";h.filebrowserUploadUrl=e+"/ck_fileuploader_ajax"}if(g("textarea.wysiwyg").length){window.CK_EDITOR_CALLBACK=(function(){monkeypatch_ck_for_webkit_tabindex();g("textarea.wysiwyg").each(function(){var j=g(this),k=j.hasClass("wysiwyg-bkend");j.ckeditor(function(){},k?h:f)})});c=document.createElement("script");c.src=b+"js/concatenated_ck.js";document.body.appendChild(c)}})})();function flushWYSIWYG(){var b,a;if(window.CKEDITOR===undefined){return}for(b in CKEDITOR.instances){if(!CKEDITOR.instances.hasOwnProperty(b)){continue}a=CKEDITOR.instances[b];a.getData()}}var datePickerController;(function(){datePicker.languageinfo=navigator.language?navigator.language:navigator.userLanguage;try{datePicker.languageinfo=cookie_language}catch(e){}datePicker.languageinfo=datePicker.languageinfo?datePicker.languageinfo.toLowerCase().replace(/-[a-z]+$/,""):"en";var scriptFiles=document.getElementsByTagName("script");(function(){if(datePicker.languageinfo!=="en"){var loc=scriptFiles[scriptFiles.length-1].src.substr(0,scriptFiles[scriptFiles.length-1].src.lastIndexOf("/"))+"/datepicker-lang/"+datePicker.languageinfo+".js";var script=document.createElement("script");script.type="text/javascript";script.src=loc;script.setAttribute("charset","utf-8");document.getElementsByTagName("head")[0].appendChild(script)}})();datePicker.months=["January","February","March","April","May","June","July","August","September","October","November","December"];datePicker.fullDay=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];datePicker.titles=["Previous month","Next month","Previous year","Next year","Today","Show Calendar"];datePicker.getDaysPerMonth=function(nMonth,nYear){nMonth=(nMonth+12)%12;return(((0==(nYear%4))&&((0!=(nYear%100))||(0==(nYear%400))))&&nMonth==1)?29:[31,28,31,30,31,30,31,31,30,31,30,31][nMonth]};function datePicker(options){this.defaults={};for(opt in options){this[opt]=this.defaults[opt]=options[opt]}this.date=new Date();this.yearinc=1;this.timer=null;this.pause=1000;this.timerSet=false;this.fadeTimer=null;this.interval=new Date();this.firstDayOfWeek=this.defaults.firstDayOfWeek=this.dayInc=this.monthInc=this.yearInc=this.opacity=this.opacityTo=0;this.dateSet=null;this.visible=false;this.disabledDates=[];this.enabledDates=[];this.nbsp=String.fromCharCode(160);var o=this;o.events={onblur:function(e){o.removeKeyboardEvents()},onfocus:function(e){o.addKeyboardEvents()},onkeydown:function(e){o.stopTimer();if(!o.visible){return false}if(e==null){e=document.parentWindow.event}var kc=e.keyCode?e.keyCode:e.charCode;if(kc==13){var td=document.getElementById(o.id+"-date-picker-hover");if(!td||td.className.search(/out-of-range|day-disabled/)!=-1){return o.killEvent(e)}o.returnFormattedDate();o.hide();return o.killEvent(e)}else{if(kc==27){o.hide();return o.killEvent(e)}else{if(kc==32||kc==0){o.date=new Date();o.updateTable();return o.killEvent(e)}}}
/*@cc_on
                        @if(@_win32)
                                if(new Date().getTime() - o.interval.getTime() < 100) return o.killEvent(e);
                                o.interval = new Date();
                        @end
                        @*/
if((kc>49&&kc<56)||(kc>97&&kc<104)){if(kc>96){kc-=(96-48)}kc-=49;o.firstDayOfWeek=(o.firstDayOfWeek+kc)%7;o.updateTable();return o.killEvent(e)}if(kc<37||kc>40){return true}var d=new Date(o.date).valueOf();if(kc==37){if(e.ctrlKey){d=new Date(o.date);d.setDate(Math.min(d.getDate(),datePicker.getDaysPerMonth(d.getMonth()-1,d.getFullYear())));d.setMonth(d.getMonth()-1)}else{d=new Date(o.date.getFullYear(),o.date.getMonth(),o.date.getDate()-1)}}else{if(kc==39){if(e.ctrlKey){d=new Date(o.date);d.setDate(Math.min(d.getDate(),datePicker.getDaysPerMonth(d.getMonth()+1,d.getFullYear())));d.setMonth(d.getMonth()+1)}else{d=new Date(o.date.getFullYear(),o.date.getMonth(),o.date.getDate()+1)}}else{if(kc==38){if(e.ctrlKey){d=new Date(o.date);d.setDate(Math.min(d.getDate(),datePicker.getDaysPerMonth(d.getMonth(),d.getFullYear()+1)));d.setFullYear(d.getFullYear()+1)}else{d=new Date(o.date.getFullYear(),o.date.getMonth(),o.date.getDate()-7)}}else{if(kc==40){if(e.ctrlKey){d=new Date(o.date);d.setDate(Math.min(d.getDate(),datePicker.getDaysPerMonth(d.getMonth(),d.getFullYear()-1)));d.setFullYear(d.getFullYear()-1)}else{d=new Date(o.date.getFullYear(),o.date.getMonth(),o.date.getDate()+7)}}}}}var tmpDate=new Date(d);if(o.outOfRange(tmpDate)){return o.killEvent(e)}var cacheDate=new Date(o.date);o.date=tmpDate;if(cacheDate.getFullYear()!=o.date.getFullYear()||cacheDate.getMonth()!=o.date.getMonth()){o.updateTable()}else{o.disableTodayButton();var tds=o.table.getElementsByTagName("td");var txt;var start=o.date.getDate()-6;if(start<0){start=0}for(var i=start,td;td=tds[i];i++){txt=Number(td.firstChild.nodeValue);if(isNaN(txt)||txt!=o.date.getDate()){continue}o.removeHighlight();td.id=o.id+"-date-picker-hover";td.className=td.className.replace(/date-picker-hover/g,"")+" date-picker-hover"}}return o.killEvent(e)},gotoToday:function(e){o.date=new Date();o.updateTable();return o.killEvent(e)},onmousedown:function(e){if(e==null){e=document.parentWindow.event}var el=e.target!=null?e.target:e.srcElement;var found=false;while(el.parentNode){if(el.id&&(el.id=="fd-"+o.id||el.id=="fd-but-"+o.id)){found=true;break}try{el=el.parentNode}catch(err){break}}if(found){return true}o.stopTimer();datePickerController.hideAll()},onmouseover:function(e){o.stopTimer();var txt=this.firstChild.nodeValue;if(this.className=="out-of-range"||txt.search(/^[\d]+$/)==-1){return}o.removeHighlight();this.id=o.id+"-date-picker-hover";this.className=this.className.replace(/date-picker-hover/g,"")+" date-picker-hover";o.date.setDate(this.firstChild.nodeValue);o.disableTodayButton()},onclick:function(e){if(o.opacity!=o.opacityTo||this.className.search(/out-of-range|day-disabled/)!=-1){return false}if(e==null){e=document.parentWindow.event}var el=e.target!=null?e.target:e.srcElement;while(el.nodeType!=1){el=el.parentNode}var d=new Date(o.date);var txt=el.firstChild.data;if(txt.search(/^[\d]+$/)==-1){return}var n=Number(txt);if(isNaN(n)){return true}d.setDate(n);o.date=d;o.returnFormattedDate();if(!o.staticPos){o.hide()}o.stopTimer();return o.killEvent(e)},incDec:function(e){if(e==null){e=document.parentWindow.event}var el=e.target!=null?e.target:e.srcElement;if(el&&el.className&&el.className.search("fd-disabled")!=-1){return false}datePickerController.addEvent(document,"mouseup",o.events.clearTimer);o.timerInc=800;o.dayInc=arguments[1];o.yearInc=arguments[2];o.monthInc=arguments[3];o.timerSet=true;o.updateTable();return true},clearTimer:function(e){o.stopTimer();o.timerInc=1000;o.yearInc=0;o.monthInc=0;o.dayInc=0;datePickerController.removeEvent(document,"mouseup",o.events.clearTimer)}};o.stopTimer=function(){o.timerSet=false;window.clearTimeout(o.timer)};o.removeHighlight=function(){if(document.getElementById(o.id+"-date-picker-hover")){document.getElementById(o.id+"-date-picker-hover").className=document.getElementById(o.id+"-date-picker-hover").className.replace("date-picker-hover","");document.getElementById(o.id+"-date-picker-hover").id=""}};o.reset=function(){for(def in o.defaults){o[def]=o.defaults[def]}};o.setOpacity=function(op){o.div.style.opacity=op/100;o.div.style.filter="alpha(opacity="+op+")";o.opacity=op};o.fade=function(){window.clearTimeout(o.fadeTimer);o.fadeTimer=null;delete (o.fadeTimer);var diff=Math.round(o.opacity+((o.opacityTo-o.opacity)/4));o.setOpacity(diff);if(Math.abs(o.opacityTo-diff)>3&&!o.noTransparency){o.fadeTimer=window.setTimeout(o.fade,50)}else{o.setOpacity(o.opacityTo);if(o.opacityTo==0){o.div.style.display="none";o.visible=false}else{o.visible=true}}};o.killEvent=function(e){e=e||document.parentWindow.event;if(e.stopPropagation){e.stopPropagation();e.preventDefault()}
/*@cc_on
                @if(@_win32)
                e.cancelBubble = true;
                e.returnValue = false;
                @end
                @*/
return false};o.getElem=function(){return document.getElementById(o.id.replace(/^fd-/,""))||false};o.setRangeLow=function(range){if(String(range).search(/^(\d\d?\d\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])$/)==-1){range=""}o.low=o.defaults.low=range;if(o.staticPos){o.updateTable(true)}};o.setRangeHigh=function(range){if(String(range).search(/^(\d\d?\d\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])$/)==-1){range=""}o.high=o.defaults.high=range;if(o.staticPos){o.updateTable(true)}};o.setDisabledDays=function(dayArray){o.disableDays=o.defaults.disableDays=dayArray;if(o.staticPos){o.updateTable(true)}};o.setDisabledDates=function(dateArray){var fin=[];for(var i=dateArray.length;i--;){if(dateArray[i].match(/^(\d\d\d\d|\*\*\*\*)(0[1-9]|1[012]|\*\*)(0[1-9]|[12][0-9]|3[01])$/)!=-1){fin[fin.length]=dateArray[i]}}if(fin.length){o.disabledDates=fin;o.enabledDates=[];if(o.staticPos){o.updateTable(true)}}};o.setEnabledDates=function(dateArray){var fin=[];for(var i=dateArray.length;i--;){if(dateArray[i].match(/^(\d\d\d\d|\*\*\*\*)(0[1-9]|1[012]|\*\*)(0[1-9]|[12][0-9]|3[01]|\*\*)$/)!=-1&&dateArray[i]!="********"){fin[fin.length]=dateArray[i]}}if(fin.length){o.disabledDates=[];o.enabledDates=fin;if(o.staticPos){o.updateTable(true)}}};o.getDisabledDates=function(y,m){if(o.enabledDates.length){return o.getEnabledDates(y,m)}var obj={};var d=datePicker.getDaysPerMonth(m-1,y);m=m<10?"0"+String(m):m;for(var i=o.disabledDates.length;i--;){var tmp=o.disabledDates[i].replace("****",y).replace("**",m);if(tmp<Number(String(y)+m+"01")||tmp>Number(y+String(m)+d)){continue}obj[tmp]=1}return obj};o.getEnabledDates=function(y,m){var obj={};var d=datePicker.getDaysPerMonth(m-1,y);m=m<10?"0"+String(m):m;var day,tmp,de,me,ye,disabled;for(var dd=1;dd<=d;dd++){day=dd<10?"0"+String(dd):dd;disabled=true;for(var i=o.enabledDates.length;i--;){tmp=o.enabledDates[i];ye=String(o.enabledDates[i]).substr(0,4);me=String(o.enabledDates[i]).substr(4,2);de=String(o.enabledDates[i]).substr(6,2);if(ye==y&&me==m&&de==day){disabled=false;break}if(ye=="****"||me=="**"||de=="**"){if(ye=="****"){tmp=tmp.replace(/^\*\*\*\*/,y)}if(me=="**"){tmp=tmp=tmp.substr(0,4)+String(m)+tmp.substr(6,2)}if(de=="**"){tmp=tmp.replace(/\*\*/,day)}if(tmp==String(y+String(m)+day)){disabled=false;break}}}if(disabled){obj[String(y+String(m)+day)]=1}}return obj};o.setFirstDayOfWeek=function(e){if(e==null){e=document.parentWindow.event}var elem=e.target!=null?e.target:e.srcElement;if(elem.tagName.toLowerCase()!="th"){while(elem.tagName.toLowerCase()!="th"){elem=elem.parentNode}}var cnt=0;while(elem.previousSibling){elem=elem.previousSibling;if(elem.tagName.toLowerCase()=="th"){cnt++}}o.firstDayOfWeek=(o.firstDayOfWeek+cnt)%7;o.updateTableHeaders();return o.killEvent(e)};o.truePosition=function(element){var pos=o.cumulativeOffset(element);if(window.opera){return pos}var iebody=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;var dsocleft=document.all?iebody.scrollLeft:window.pageXOffset;var dsoctop=document.all?iebody.scrollTop:window.pageYOffset;var posReal=o.realOffset(element);return[pos[0]-posReal[0]+dsocleft,pos[1]-posReal[1]+dsoctop]};o.realOffset=function(element){var t=0,l=0;do{t+=element.scrollTop||0;l+=element.scrollLeft||0;element=element.parentNode}while(element);return[l,t]};o.cumulativeOffset=function(element){var t=0,l=0;do{t+=element.offsetTop||0;l+=element.offsetLeft||0;element=element.offsetParent}while(element);return[l,t]};o.resize=function(){if(!o.created||!o.getElem()){return}o.div.style.visibility="hidden";if(!o.staticPos){o.div.style.left=o.div.style.top="0px"}o.div.style.display="block";var osh=o.div.offsetHeight;var osw=o.div.offsetWidth;o.div.style.visibility="visible";o.div.style.display="none";if(!o.staticPos){var elem=document.getElementById("fd-but-"+o.id);var pos=o.truePosition(elem);var trueBody=(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;var scrollTop=window.devicePixelRatio||window.opera?0:trueBody.scrollTop;var scrollLeft=window.devicePixelRatio||window.opera?0:trueBody.scrollLeft;if(parseInt(trueBody.clientWidth+scrollLeft)<parseInt(osw+pos[0])){o.div.style.left=Math.abs(parseInt((trueBody.clientWidth+scrollLeft)-osw))+"px"}else{o.div.style.left=pos[0]+"px"}if(parseInt(trueBody.clientHeight+scrollTop)<parseInt(osh+pos[1]+elem.offsetHeight+2)){o.div.style.top=Math.abs(parseInt(pos[1]-(osh+2)))+"px"}else{o.div.style.top=Math.abs(parseInt(pos[1]+elem.offsetHeight+2))+"px"}}
/*@cc_on
                @if(@_jscript_version <= 5.6)
                if(o.staticPos) return;
                o.iePopUp.style.top    = o.div.style.top;
                o.iePopUp.style.left   = o.div.style.left;
                o.iePopUp.style.width  = osw + "px";
                o.iePopUp.style.height = (osh - 2) + "px";
                @end
                @*/
};o.equaliseDates=function(){var clearDayFound=false;var tmpDate;for(var i=o.low;i<=o.high;i++){tmpDate=String(i);if(!o.disableDays[new Date(tmpDate.substr(0,4),tmpDate.substr(6,2),tmpDate.substr(4,2)).getDay()-1]){clearDayFound=true;break}}if(!clearDayFound){o.disableDays=o.defaults.disableDays=[0,0,0,0,0,0,0]}};o.outOfRange=function(tmpDate){if(!o.low&&!o.high){return false}var level=false;if(!tmpDate){level=true;tmpDate=o.date}var d=(tmpDate.getDate()<10)?"0"+tmpDate.getDate():tmpDate.getDate();var m=((tmpDate.getMonth()+1)<10)?"0"+(tmpDate.getMonth()+1):tmpDate.getMonth()+1;var y=tmpDate.getFullYear();var dt=String(y)+String(m)+String(d);if(o.low&&parseInt(dt)<parseInt(o.low)){if(!level){return true}o.date=new Date(o.low.substr(0,4),o.low.substr(4,2)-1,o.low.substr(6,2),5,0,0);return false}if(o.high&&parseInt(dt)>parseInt(o.high)){if(!level){return true}o.date=new Date(o.high.substr(0,4),o.high.substr(4,2)-1,o.high.substr(6,2),5,0,0)}return false};o.createButton=function(){if(o.staticPos){return}var but;if(!document.getElementById("fd-but-"+o.id)){var inp=o.getElem();but=document.createElement("a");but.href="#";var span=document.createElement("span");span.appendChild(document.createTextNode(String.fromCharCode(160)));but.className="date-picker-control";but.title=(typeof(fdLocale)=="object"&&options.locale&&fdLocale.titles.length>5)?fdLocale.titles[5]:"";but.id="fd-but-"+o.id;but.appendChild(span);if(inp.nextSibling){inp.parentNode.insertBefore(but,inp.nextSibling)}else{inp.parentNode.appendChild(but)}}else{but=document.getElementById("fd-but-"+o.id)}but.onclick=but.onpress=function(e){e=e||window.event;var inpId=this.id.replace("fd-but-","");try{var dp=datePickerController.getDatePicker(inpId)}catch(err){return false}if(e.type=="press"){var kc=e.keyCode!=null?e.keyCode:e.charCode;if(kc!=13){return true}if(dp.visible){hideAll();return false}}if(!dp.visible){datePickerController.hideAll(inpId);dp.show()}else{datePickerController.hideAll()}return false};but=null},o.create=function(){function createTH(details){var th=document.createElement("th");if(details.thClassName){th.className=details.thClassName}if(details.colspan){
/*@cc_on
                                /*@if (@_win32)
                                th.setAttribute('colSpan',details.colspan);
                                @else @*/
th.setAttribute("colspan",details.colspan);
/*@end
                                @*/
}
/*@cc_on
                        /*@if (@_win32)
                        th.unselectable = "on";
                        /*@end@*/
return th}function createThAndButton(tr,obj){for(var i=0,details;details=obj[i];i++){var th=createTH(details);tr.appendChild(th);var but=document.createElement("span");but.className=details.className;but.id=o.id+details.id;but.appendChild(document.createTextNode(details.text));but.title=details.title||"";if(details.onmousedown){but.onmousedown=details.onmousedown}if(details.onclick){but.onclick=details.onclick}if(details.onmouseout){but.onmouseout=details.onmouseout}th.appendChild(but)}}
/*@cc_on
                @if(@_jscript_version <= 5.6)
                        if(!document.getElementById("iePopUpHack")) {
                                o.iePopUp = document.createElement('iframe');
                                o.iePopUp.src = "javascript:'<html></html>';";
                                o.iePopUp.setAttribute('className','iehack');
                                o.iePopUp.scrolling="no";
                                o.iePopUp.frameBorder="0";
                                o.iePopUp.name = o.iePopUp.id = "iePopUpHack";
                                document.body.appendChild(o.iePopUp);
                        } else {
                                o.iePopUp = document.getElementById("iePopUpHack");
                        };
                @end
                @*/
if(typeof(fdLocale)=="object"&&o.locale){datePicker.titles=fdLocale.titles;datePicker.months=fdLocale.months;datePicker.fullDay=fdLocale.fullDay;if(fdLocale.dayAbbr){datePicker.dayAbbr=fdLocale.dayAbbr}if(fdLocale.firstDayOfWeek){o.firstDayOfWeek=o.defaults.firstDayOfWeek=fdLocale.firstDayOfWeek}}o.div=document.createElement("div");o.div.style.zIndex=9999;o.div.id="fd-"+o.id;o.div.className="datePicker";if(!o.staticPos){document.getElementsByTagName("body")[0].appendChild(o.div)}else{elem=o.getElem();if(!elem){o.div=null;return}o.div.className+=" staticDP";o.div.setAttribute("tabIndex","0");o.div.onfocus=o.events.onfocus;o.div.onblur=o.events.onblur;elem.parentNode.insertBefore(o.div,elem.nextSibling);if(o.hideInput&&elem.type&&elem.type=="text"){elem.setAttribute("type","hidden")}}var tr,row,col,tableHead,tableBody;o.table=document.createElement("table");o.div.appendChild(o.table);tableHead=document.createElement("thead");o.table.appendChild(tableHead);tr=document.createElement("tr");tableHead.appendChild(tr);o.titleBar=createTH({thClassName:"date-picker-title",colspan:7});tr.appendChild(o.titleBar);tr=null;var span=document.createElement("span");span.className="month-display";o.titleBar.appendChild(span);span=document.createElement("span");span.className="year-display";o.titleBar.appendChild(span);span=null;tr=document.createElement("tr");tableHead.appendChild(tr);createThAndButton(tr,[{className:"prev-but",id:"-prev-year-but",text:"\u00AB",title:datePicker.titles[2],onmousedown:function(e){o.events.incDec(e,0,-1,0)},onmouseout:o.events.clearTimer},{className:"prev-but",id:"-prev-month-but",text:"\u2039",title:datePicker.titles[0],onmousedown:function(e){o.events.incDec(e,0,0,-1)},onmouseout:o.events.clearTimer},{colspan:3,className:"today-but",id:"-today-but",text:datePicker.titles.length>4?datePicker.titles[4]:"Today",onclick:o.events.gotoToday},{className:"next-but",id:"-next-month-but",text:"\u203A",title:datePicker.titles[1],onmousedown:function(e){o.events.incDec(e,0,0,1)},onmouseout:o.events.clearTimer},{className:"next-but",id:"-next-year-but",text:"\u00BB",title:datePicker.titles[3],onmousedown:function(e){o.events.incDec(e,0,1,0)},onmouseout:o.events.clearTimer}]);tableBody=document.createElement("tbody");o.table.appendChild(tableBody);for(var rows=0;rows<7;rows++){row=document.createElement("tr");if(rows!=0){tableBody.appendChild(row)}else{tableHead.appendChild(row)}for(var cols=0;cols<7;cols++){col=(rows==0)?document.createElement("th"):document.createElement("td");row.appendChild(col);if(rows!=0){col.appendChild(document.createTextNode(o.nbsp));col.onmouseover=o.events.onmouseover;col.onclick=o.events.onclick}else{col.className="date-picker-day-header";col.scope="col"}col=null}row=null}var but;var ths=o.table.getElementsByTagName("thead")[0].getElementsByTagName("tr")[2].getElementsByTagName("th");for(var y=0;y<7;y++){if(y>0){but=document.createElement("span");but.className="fd-day-header";but.onclick=ths[y].onclick=o.setFirstDayOfWeek;but.appendChild(document.createTextNode(o.nbsp));ths[y].appendChild(but);but=null}else{ths[y].appendChild(document.createTextNode(o.nbsp))}}o.ths=o.table.getElementsByTagName("thead")[0].getElementsByTagName("tr")[2].getElementsByTagName("th");o.trs=o.table.getElementsByTagName("tbody")[0].getElementsByTagName("tr");o.updateTableHeaders();tableBody=tableHead=tr=createThAndButton=createTH=null;if(o.low&&o.high&&(o.high-o.low<7)){o.equaliseDates()}o.created=true;if(o.staticPos){var yyN=document.getElementById(o.id);datePickerController.addEvent(yyN,"change",o.changeHandler);if(o.splitDate){var mmN=document.getElementById(o.id+"-mm");var ddN=document.getElementById(o.id+"-dd");datePickerController.addEvent(mmN,"change",o.changeHandler);datePickerController.addEvent(ddN,"change",o.changeHandler)}o.show()}else{o.createButton();o.resize();o.fade()}};o.changeHandler=function(){o.setDateFromInput();o.updateTable()};o.setDateFromInput=function(){function m2c(val){return String(val).length<2?"00".substring(0,2-String(val).length)+String(val):val}o.dateSet=null;var elem=o.getElem();if(!elem){return}if((elem.value==""||elem.value.match(/^ *dd\/mm\/yyyy *$/))&&elem.className.search(/start-at-/)!=-1){id_of_other_field=String(elem.className.match(/start-at-[^ ]+/)).substring(9);other_field=document.getElementById(id_of_other_field);if(typeof(other_field)!="undefined"&&other_field.value.search(/\d?\d\/\d?\d\/\d?\d?\d\d/)!=-1){other_date=String(other_field.value.match(/\d?\d\/\d?\d\/\d?\d?\d\d/));var date=datePickerController.dateFormat(other_date,false)}}else{if(!o.splitDate){var date=datePickerController.dateFormat(elem.value,o.format.search(/m-d-y/i)!=-1)}else{var mmN=document.getElementById(o.id+"-mm");var ddN=document.getElementById(o.id+"-dd");var tm=parseInt(mmN.tagName.toLowerCase()=="input"?mmN.value:mmN.options[mmN.selectedIndex].value,10);var td=parseInt(ddN.tagName.toLowerCase()=="input"?ddN.value:ddN.options[ddN.selectedIndex].value,10);var ty=parseInt(elem.tagName.toLowerCase()=="input"?elem.value:elem.options[elem.selectedIndex||0].value,10);var date=datePickerController.dateFormat(tm+"/"+td+"/"+ty,true)}}var badDate=false;if(!date){badDate=true;date=String(new Date().getFullYear())+m2c(new Date().getMonth()+1)+m2c(new Date().getDate())}var d,m,y;y=Number(date.substr(0,4));m=Number(date.substr(4,2))-1;d=Number(date.substr(6,2));var dpm=datePicker.getDaysPerMonth(m,y);if(d>dpm){d=dpm}if(new Date(y,m,d)=="Invalid Date"||new Date(y,m,d)=="NaN"){badDate=true;o.date=new Date();o.date.setHours(5);return}o.date=new Date(y,m,d);o.date.setHours(5);if(!badDate){o.dateSet=new Date(o.date)}m2c=null};o.setSelectIndex=function(elem,indx){var len=elem.options.length;indx=Number(indx);for(var opt=0;opt<len;opt++){if(elem.options[opt].value==indx){elem.selectedIndex=opt;return}}},o.returnFormattedDate=function(){var elem=o.getElem();if(!elem){return}var d=(o.date.getDate()<10)?"0"+o.date.getDate():o.date.getDate();var m=((o.date.getMonth()+1)<10)?"0"+(o.date.getMonth()+1):o.date.getMonth()+1;var yyyy=o.date.getFullYear();var disabledDates=o.getDisabledDates(yyyy,m);var weekDay=(o.date.getDay()+6)%7;if(!(o.disableDays[weekDay]||String(yyyy)+m+d in disabledDates)){if(o.splitDate){var ddE=document.getElementById(o.id+"-dd");var mmE=document.getElementById(o.id+"-mm");if(ddE.tagName.toLowerCase()=="input"){ddE.value=d}else{o.setSelectIndex(ddE,d)}if(mmE.tagName.toLowerCase()=="input"){mmE.value=m}else{o.setSelectIndex(mmE,m)}if(elem.tagName.toLowerCase()=="input"){elem.value=yyyy}else{o.setSelectIndex(elem,yyyy)}}else{elem.value=o.format.replace("y",yyyy).replace("m",m).replace("d",d).replace(/-/g,o.divider)}if(!elem.type||elem.type&&elem.type!="hidden"){elem.focus()}if(o.staticPos){o.dateSet=new Date(o.date);o.updateTable()}if(document.createEvent){var onchangeEvent=document.createEvent("HTMLEvents");onchangeEvent.initEvent("change",true,false);elem.dispatchEvent(onchangeEvent)}else{if(document.createEventObject){elem.fireEvent("onchange")}}}};o.disableTodayButton=function(){var today=new Date();document.getElementById(o.id+"-today-but").className=document.getElementById(o.id+"-today-but").className.replace("fd-disabled","");if(o.outOfRange(today)||(o.date.getDate()==today.getDate()&&o.date.getMonth()==today.getMonth()&&o.date.getFullYear()==today.getFullYear())){document.getElementById(o.id+"-today-but").className+=" fd-disabled";document.getElementById(o.id+"-today-but").onclick=null}else{document.getElementById(o.id+"-today-but").onclick=o.events.gotoToday}};o.updateTableHeaders=function(){var d,but;var ths=o.ths;for(var y=0;y<7;y++){d=(o.firstDayOfWeek+y)%7;ths[y].title=datePicker.fullDay[d];if(y>0){but=ths[y].getElementsByTagName("span")[0];but.removeChild(but.firstChild);but.appendChild(document.createTextNode(datePicker.dayAbbr?datePicker.dayAbbr[d]:datePicker.fullDay[d].charAt(0)));but.title=datePicker.fullDay[d];but=null}else{ths[y].removeChild(ths[y].firstChild);ths[y].appendChild(document.createTextNode(datePicker.dayAbbr?datePicker.dayAbbr[d]:datePicker.fullDay[d].charAt(0)))}}o.updateTable()};o.updateTable=function(noCallback){if(o.timerSet){var d=new Date(o.date);d.setDate(Math.min(d.getDate()+o.dayInc,datePicker.getDaysPerMonth(d.getMonth()+o.monthInc,d.getFullYear()+o.yearInc)));d.setMonth(d.getMonth()+o.monthInc);d.setFullYear(d.getFullYear()+o.yearInc);o.date=d}if(!noCallback&&"onupdate" in datePickerController&&typeof(datePickerController.onupdate)=="function"){datePickerController.onupdate(o)}o.outOfRange();o.disableTodayButton();var tmpDate=new Date(o.date.getFullYear(),o.date.getMonth(),2);tmpDate.setHours(5);var tdm=tmpDate.getMonth();var tdy=tmpDate.getFullYear();var disabledDates=o.getDisabledDates(o.date.getFullYear(),o.date.getMonth()+1);var today=new Date();var b=document.getElementById(o.id+"-prev-year-but");b.className=b.className.replace("fd-disabled","");if(o.outOfRange(new Date((tdy-1),Number(tdm),datePicker.getDaysPerMonth(Number(tdm),tdy-1)))){b.className+=" fd-disabled";if(o.yearInc==-1){o.stopTimer()}}b=document.getElementById(o.id+"-prev-month-but");b.className=b.className.replace("fd-disabled","");if(o.outOfRange(new Date(tdy,(Number(tdm)-1),datePicker.getDaysPerMonth(Number(tdm)-1,tdy)))){b.className+=" fd-disabled";if(o.monthInc==-1){o.stopTimer()}}b=document.getElementById(o.id+"-next-year-but");b.className=b.className.replace("fd-disabled","");if(o.outOfRange(new Date((tdy+1),Number(tdm),1))){b.className+=" fd-disabled";if(o.yearInc==1){o.stopTimer()}}b=document.getElementById(o.id+"-next-month-but");b.className=b.className.replace("fd-disabled","");if(o.outOfRange(new Date(tdy,Number(tdm)+1,1))){b.className+=" fd-disabled";if(o.monthInc==1){o.stopTimer()}}b=null;var cd=o.date.getDate();var cm=o.date.getMonth();var cy=o.date.getFullYear();var span=o.titleBar.getElementsByTagName("span");while(span[0].firstChild){span[0].removeChild(span[0].firstChild)}while(span[1].firstChild){span[1].removeChild(span[1].firstChild)}span[0].appendChild(document.createTextNode(datePicker.months[cm]+o.nbsp));span[1].appendChild(document.createTextNode(cy));tmpDate.setDate(1);var dt,cName,td,tds,i;var weekDay=(tmpDate.getDay()+6)%7;var firstColIndex=(((weekDay-o.firstDayOfWeek)+7)%7)-1;var dpm=datePicker.getDaysPerMonth(cm,cy);var todayD=today.getDate();var todayM=today.getMonth();var todayY=today.getFullYear();var c="class";
/*@cc_on
                @if(@_win32)
                c = "className";
                @end
                @*/
var stub=String(tdy)+(String(tdm+1).length<2?"0"+(tdm+1):tdm+1);for(var row=0;row<6;row++){tds=o.trs[row].getElementsByTagName("td");for(var col=0;col<7;col++){td=tds[col];td.removeChild(td.firstChild);td.setAttribute("id","");td.setAttribute("title","");i=(row*7)+col;if(i>firstColIndex&&i<=(firstColIndex+dpm)){dt=i-firstColIndex;tmpDate.setDate(dt);td.appendChild(document.createTextNode(dt));if(o.outOfRange(tmpDate)){td.setAttribute(c,"out-of-range")}else{cName=[];weekDay=(tmpDate.getDay()+6)%7;if(dt==todayD&&tdm==todayM&&tdy==todayY){cName.push("date-picker-today")}if(o.dateSet!=null&&o.dateSet.getDate()==dt&&o.dateSet.getMonth()==tdm&&o.dateSet.getFullYear()==tdy){cName.push("date-picker-selected-date")}if(o.disableDays[weekDay]||stub+String(dt<10?"0"+dt:dt) in disabledDates){cName.push("day-disabled")}else{if(o.highlightDays[weekDay]){cName.push("date-picker-highlight")}}if(cd==dt){td.setAttribute("id",o.id+"-date-picker-hover");cName.push("date-picker-hover")}cName.push("dm-"+dt+"-"+(tdm+1)+"  dmy-"+dt+"-"+(tdm+1)+"-"+tdy);td.setAttribute(c,cName.join(" "));td.setAttribute("title",datePicker.months[cm]+o.nbsp+dt+","+o.nbsp+cy)}}else{td.appendChild(document.createTextNode(o.nbsp));td.setAttribute(c,"date-picker-unused")}}}if(o.timerSet){o.timerInc=50+Math.round(((o.timerInc-50)/1.8));o.timer=window.setTimeout(o.updateTable,o.timerInc)}};o.addKeyboardEvents=function(){datePickerController.addEvent(document,"keypress",o.events.onkeydown);
/*@cc_on
                @if(@_win32)
                datePickerController.removeEvent(document, "keypress", o.events.onkeydown);
                datePickerController.addEvent(document, "keydown", o.events.onkeydown);
                @end
                @*/
if(window.devicePixelRatio){datePickerController.removeEvent(document,"keypress",o.events.onkeydown);datePickerController.addEvent(document,"keydown",o.events.onkeydown)}};o.removeKeyboardEvents=function(){datePickerController.removeEvent(document,"keypress",o.events.onkeydown);datePickerController.removeEvent(document,"keydown",o.events.onkeydown)};o.show=function(){var elem=o.getElem();if(!elem||o.visible||elem.disabled){return}o.reset();o.setDateFromInput();o.updateTable();if(!o.staticPos){o.resize()}datePickerController.addEvent(o.staticPos?o.table:document,"mousedown",o.events.onmousedown);if(!o.staticPos){o.addKeyboardEvents()}o.opacityTo=o.noTransparency?100:100;o.div.style.display="block";
/*@cc_on
                @if(@_jscript_version <= 5.6)
                if(!o.staticPos) o.iePopUp.style.display = "block";
                @end
                @*/
o.fade();o.visible=true};o.hide=function(){if(!o.visible){return}o.stopTimer();if(o.staticPos){return}datePickerController.removeEvent(document,"mousedown",o.events.onmousedown);datePickerController.removeEvent(document,"mouseup",o.events.clearTimer);o.removeKeyboardEvents();
/*@cc_on
                @if(@_jscript_version <= 5.6)
                o.iePopUp.style.display = "none";
                @end
                @*/
o.opacityTo=0;o.fade();o.visible=false;var elem=o.getElem();if(!elem.type||elem.type&&elem.type!="hidden"){elem.focus()}};o.destroy=function(){datePickerController.removeEvent(o.staticPos?o.table:document,"mousedown",o.events.onmousedown);datePickerController.removeEvent(document,"mouseup",o.events.clearTimer);o.removeKeyboardEvents();if(o.staticPos){var yyN=document.getElementById(o.id);datePickerController.removeEvent(yyN,"change",o.changeHandler);if(o.splitDate){var mmN=document.getElementById(o.id+"-mm");var ddN=document.getElementById(o.id+"-dd");datePickerController.removeEvent(mmN,"change",o.changeHandler);datePickerController.removeEvent(ddN,"change",o.changeHandler)}o.div.onfocus=o.div.onblur=null}var ths=o.table.getElementsByTagName("th");for(var i=0,th;th=ths[i];i++){th.onmouseover=th.onmouseout=th.onmousedown=th.onclick=null}var tds=o.table.getElementsByTagName("td");for(var i=0,td;td=tds[i];i++){td.onmouseover=td.onclick=null}var butts=o.table.getElementsByTagName("span");for(var i=0,butt;butt=butts[i];i++){butt.onmousedown=butt.onclick=butt.onkeypress=null}o.ths=o.trs=null;clearTimeout(o.fadeTimer);clearTimeout(o.timer);o.fadeTimer=o.timer=null;
/*@cc_on
                @if(@_jscript_version <= 5.6)
                o.iePopUp = null;
                @end
                @*/
if(!o.staticPos&&document.getElementById(o.id.replace(/^fd-/,"fd-but-"))){var butt=document.getElementById(o.id.replace(/^fd-/,"fd-but-"));butt.onclick=butt.onpress=null}if(o.div&&o.div.parentNode){o.div.parentNode.removeChild(o.div)}o.titleBar=o.table=o.div=null;o=null};o.create()}datePickerController=function(){var datePickers={};var uniqueId=0;var addEvent=function(obj,type,fn){if(obj.attachEvent){obj["e"+type+fn]=fn;obj[type+fn]=function(){obj["e"+type+fn](window.event)};obj.attachEvent("on"+type,obj[type+fn])}else{obj.addEventListener(type,fn,true)}};var removeEvent=function(obj,type,fn){try{if(obj.detachEvent){obj.detachEvent("on"+type,obj[type+fn]);obj[type+fn]=null}else{obj.removeEventListener(type,fn,true)}}catch(err){}};var hideAll=function(exception){var dp;for(dp in datePickers){if(!datePickers[dp].created||datePickers[dp].staticPos){continue}if(exception&&exception==datePickers[dp].id){continue}if(document.getElementById(datePickers[dp].id)){datePickers[dp].hide()}}};var cleanUp=function(){var dp;for(dp in datePickers){if(!document.getElementById(datePickers[dp].id)){if(!datePickers[dp].created){continue}datePickers[dp].destroy();datePickers[dp]=null;delete datePickers[dp]}}};var destroy=function(){for(dp in datePickers){if(!datePickers[dp].created){continue}datePickers[dp].destroy();datePickers[dp]=null;delete datePickers[dp]}datePickers=null;
/*@cc_on
                @if(@_jscript_version <= 5.6)
                        if(document.getElementById("iePopUpHack")) {
                                document.body.removeChild(document.getElementById("iePopUpHack"));
                        };
                @end
                @*/
datePicker.script=null;removeEvent(window,"load",datePickerController.create);removeEvent(window,"unload",datePickerController.destroy)};var dateFormat=function(dateIn,favourMDY){var dateTest=[{regExp:/^(0?[1-9]|[12][0-9]|3[01])([- \/.])(0?[1-9]|1[012])([- \/.])((\d\d)?\d\d)$/,d:1,m:3,y:5},{regExp:/^(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])([- \/.])((\d\d)?\d\d)$/,d:3,m:1,y:5},{regExp:/^(\d\d\d\d)([- \/.])(0?[1-9]|1[012])([- \/.])(0?[1-9]|[12][0-9]|3[01])$/,d:5,m:3,y:1}];var start;var cnt=0;while(cnt<3){start=(cnt+(favourMDY?4:3))%3;if(dateIn.match(dateTest[start].regExp)){res=dateIn.match(dateTest[start].regExp);y=res[dateTest[start].y];m=res[dateTest[start].m];d=res[dateTest[start].d];if(m.length==1){m="0"+m}if(d.length==1){d="0"+d}if(y.length!=4){y=(parseInt(y)<50)?"20"+y:"19"+y}return String(y)+m+d}cnt++}return 0};var joinNodeLists=function(){if(!arguments.length){return[]}var nodeList=[];for(var i=0;i<arguments.length;i++){for(var j=0,item;item=arguments[i][j];j++){nodeList[nodeList.length]=item}}return nodeList};var addDatePicker=function(inpId,options){if(!(inpId in datePickers)){datePickers[inpId]=new datePicker(options)}};var getDatePicker=function(inpId){if(!(inpId in datePickers)){throw"No datePicker has been created for the form element with an id of '"+inpId.toString()+"'"}return datePickers[inpId]};var grepRangeLimits=function(sel){var range=[];for(var i=0;i<sel.options.length;i++){if(sel.options[i].value.search(/^\d\d\d\d$/)==-1){continue}if(!range[0]||Number(sel.options[i].value)<range[0]){range[0]=Number(sel.options[i].value)}if(!range[1]||Number(sel.options[i].value)>range[1]){range[1]=Number(sel.options[i].value)}}return range};var create=function(inp){if(!(typeof document.createElement!="undefined"&&typeof document.documentElement!="undefined"&&typeof document.documentElement.offsetWidth=="number")){return}var inputs=(inp&&inp.tagName)?[inp]:joinNodeLists(document.getElementsByTagName("input"),document.getElementsByTagName("select"));var regExp1=/disable-days-([1-7]){1,6}/g;var regExp2=/no-transparency/g;var regExp3=/highlight-days-([1-7]){1,7}/g;var regExp4=/range-low-(\d\d\d\d-\d\d-\d\d)/g;var regExp5=/range-high-(\d\d\d\d-\d\d-\d\d)/g;var regExp6=/format-(d-m-y|m-d-y|y-m-d)/g;var regExp7=/divider-(dot|slash|space|dash)/g;var regExp8=/no-locale/g;var regExp9=/no-fade/g;var regExp10=/hide-input/g;for(var i=0,inp;inp=inputs[i];i++){if(inp.className&&(inp.className.search(regExp6)!=-1||inp.className.search(/split-date/)!=-1)&&((inp.tagName.toLowerCase()=="input"&&(inp.type=="text"||inp.type=="hidden"))||inp.tagName.toLowerCase()=="select")){if(inp.id&&document.getElementById("fd-"+inp.id)){continue}if(!inp.id){inp.id="fdDatePicker-"+uniqueId++}var options={id:inp.id,low:"",high:"",divider:"/",format:"d-m-y",highlightDays:[0,0,0,0,0,1,1],disableDays:[0,0,0,0,0,0,0],locale:inp.className.search(regExp8)==-1,splitDate:0,noTransparency:inp.className.search(regExp2)!=-1,staticPos:inp.className.search(regExp9)!=-1,hideInput:inp.className.search(regExp10)!=-1};if(!options.staticPos){options.hideInput=false}else{options.noTransparency=true}if(inp.className.search(/split-date/)!=-1){if(document.getElementById(inp.id+"-dd")&&document.getElementById(inp.id+"-mm")&&document.getElementById(inp.id+"-dd").tagName.search(/input|select/i)!=-1&&document.getElementById(inp.id+"-mm").tagName.search(/input|select/i)!=-1){options.splitDate=1}}if(inp.className.search(regExp6)!=-1){options.format=inp.className.match(regExp6)[0].replace("format-","")}if(inp.className.search(regExp7)!=-1){var dividers={dot:".",space:" ",dash:"-",slash:"/"};options.divider=(inp.className.search(regExp7)!=-1&&inp.className.match(regExp7)[0].replace("divider-","") in dividers)?dividers[inp.className.match(regExp7)[0].replace("divider-","")]:"/"}if(inp.className.search(regExp3)!=-1){var tmp=inp.className.match(regExp3)[0].replace(/highlight-days-/,"");options.highlightDays=[0,0,0,0,0,0,0];for(var j=0;j<tmp.length;j++){options.highlightDays[tmp.charAt(j)-1]=1}}if(inp.className.search(regExp1)!=-1){var tmp=inp.className.match(regExp1)[0].replace(/disable-days-/,"");options.disableDays=[0,0,0,0,0,0,0];for(var j=0;j<tmp.length;j++){options.disableDays[tmp.charAt(j)-1]=1}}if(inp.className.search(/range-low-today/i)!=-1){options.low=datePickerController.dateFormat((new Date().getMonth()+1)+"/"+new Date().getDate()+"/"+new Date().getFullYear(),true)}else{if(inp.className.search(regExp4)!=-1){options.low=datePickerController.dateFormat(inp.className.match(regExp4)[0].replace(/range-low-/,""),false);if(!options.low){options.low=""}}}if(inp.className.search(/range-high-today/i)!=-1&&inp.className.search(/range-low-today/i)==-1){options.high=datePickerController.dateFormat((new Date().getMonth()+1)+"/"+new Date().getDate()+"/"+new Date().getFullYear(),true)}else{if(inp.className.search(regExp5)!=-1){options.high=datePickerController.dateFormat(inp.className.match(regExp5)[0].replace(/range-high-/,""),false);if(!options.high){options.high=""}}}if(inp.tagName.search(/select/i)!=-1){var range=grepRangeLimits(inp);options.low=options.low?range[0]+String(options.low).substr(4,4):datePickerController.dateFormat(range[0]+"/01/01");options.high=options.high?range[1]+String(options.low).substr(4,4):datePickerController.dateFormat(range[1]+"/12/31")}addDatePicker(inp.id,options)}}};return{addEvent:addEvent,removeEvent:removeEvent,create:create,destroy:destroy,cleanUp:cleanUp,addDatePicker:addDatePicker,getDatePicker:getDatePicker,dateFormat:dateFormat,datePickers:datePickers,hideAll:hideAll}}()})();datePickerController.addEvent(window,"load",datePickerController.create);datePickerController.addEvent(window,"unload",datePickerController.destroy);(function($){$.extend({metadata:{defaults:{type:"class",name:"metadata",cre:/({.*})/,single:"metadata"},setType:function(type,name){this.defaults.type=type;this.defaults.name=name},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length){settings.single="metadata"}var data=$.data(elem,settings.single);if(data){return data}data="{}";if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m){data=m[1]}}else{if(settings.type=="elem"){if(!elem.getElementsByTagName){return undefined}var e=elem.getElementsByTagName(settings.name);if(e.length){data=$.trim(e[0].innerHTML)}}else{if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr){data=attr}}}}if(data.indexOf("{")<0){data="{"+data+"}"}data=eval("("+data+")");$.data(elem,settings.single,data);return data}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts)}})(jQuery);(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:".",debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms")}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s)}else{alert(s)}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug=""}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter)}else{if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter)}}if(!p){p=detectParserForColumn(table,cells[i])}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n"}list.push(p)}}if(table.config.debug){log(parsersDebug)}return list}function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i<l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i]}}return parsers[0]}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i]}}return false}function buildCache(table){if(table.config.debug){var cacheTime=new Date()}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]))}cols.push(i);cache.normalized.push(cols);cols=null}if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime)}return cache}function getElementText(config,node){if(!node){return""}var t="";if(config.textExtraction=="simple"){if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML}else{t=node.innerHTML}}else{if(typeof(config.textExtraction)=="function"){t=config.textExtraction(node)}else{t=$(node).text()}}return t}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j<l;j++){tableBody[0].appendChild(o[j])}}}if(table.config.appender){table.config.appender(table,rows)}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime)}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd")},0)}function buildHeaders(table){if(table.config.debug){var time=new Date()}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i<table.tHead.rows.length;i++){tableHeadersRows[i]=0}$tableHeaders=$("thead th",table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index)){this.sortDisabled=true}if(!this.sortDisabled){$(this).addClass(table.config.cssHeader)}table.config.headerList[index]=this});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders)}return $tableHeaders}function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++))}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell)}}}return arr}function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true}return false}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true}return false}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table)}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i]}}}function formatSortingOrder(v){if(typeof(v)!="Number"){i=(v.toLowerCase()=="desc")?1:0}else{i=(v==(0||1))?v:0}return i}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true}}return false}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this)}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]])}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$("<colgroup>");$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($("<col>").css("width",$(this).width()))});$(table).prepend(colgroup)}}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date()}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)=="text")?((order==0)?"sortText":"sortTextDesc"):((order==0)?"sortNumeric":"sortNumericDesc");var e="e"+i;dynamicExp+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { "}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; "}dynamicExp+="return 0; ";dynamicExp+="}; ";eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime)}return cache}function sortText(a,b){return((a<b)?-1:((a>b)?1:0))}function sortTextDesc(a,b){return((b<a)?-1:((b>a)?1:0))}function sortNumeric(a,b){return a-b}function sortNumericDesc(a,b){return b-a}function getCachedSortType(parsers,i){return parsers[i].type}this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies){return}var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j])}}}config.sortList.push([i,this.order])}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2}}}else{config.sortList.push([i,this.order])}}setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache))},1);return false}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false}});$this.bind("update",function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this)}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache))}).bind("appendCache",function(){appendToTable(this,cache)}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this)}).bind("applyWidgets",function(){applyWidget(this)});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList])}applyWidget(this)})};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false}}if(a){parsers.push(parser)}};this.addWidget=function(widget){widgets.push(widget)};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i};this.isDigit=function(s,config){var DECIMAL="\\"+config.decimal;var exp="/(^[+]?0("+DECIMAL+"0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)"+DECIMAL+"(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*"+DECIMAL+"0+$)/";return RegExp(exp).test($.trim(s))};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild){this.removeChild(this.firstChild)}}empty.apply(table.tBodies[0])}else{table.tBodies[0].innerHTML=""}}}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true},format:function(s){return $.trim(s.toLowerCase())},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c)},format:function(s){return $.tablesorter.formatFloat(s)},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s)},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""))},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s)},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item}else{r+=item}}return $.tablesorter.formatFloat(r)},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s)},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),""))},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s)},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0")},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s))},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""))},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/))},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime())},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s)},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2")}else{if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1")}else{if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3")}}}return $.tablesorter.formatFloat(new Date(s).getTime())},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s)},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime())},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?"sortValue":c.parserMetadataName;return $(cell).metadata()[p]},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date()}$("tr:visible",table.tBodies[0]).filter(":even").removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(":odd").removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time)}}})})(jQuery);jQuery(function(){$(".sortable th.nosort").each(function(){$(this).addClass("{sorter:false}")});$(".sortable").each(function(){var a={};var b=undefined;if($(this).hasClass("respondents-grouped")){b=(function(v,w){var l,f,q,k,u,o,p=w.length;var e={},s;var t,c,n,h;window.test_table=v;window.test_rows=w;h=v.getElementsByTagName("tbody")[0];if(a.r2g===undefined){a.r2g=t={};for(l=0;l<w.length;l++){q=w[l][0];k=q.getElementsByTagName("td");c=k[0].innerHTML;n=q.getAttribute("rel");t[c]=n}}rids=[];for(l=0;l<p;l++){q=w[l][0];u=q.getElementsByTagName("td")[0].innerHTML;rids.push(u);o=a.r2g[u];if(!(o in e)){e[o]=[]}e[o].push(q)}for(l=0;l<p;l++){u=rids[l];o=a.r2g[u];s=e[o];e[o]=[];for(f=0;f<s.length;f++){h.appendChild(s[f])}if(s.length>1){$(s[0]).removeClass("response-last-in-group").addClass("response-first-in-group");for(f=1;f<(s.length-1);f++){$(s[f]).removeClass("response-first-in-group").removeClass("response-last-in-group")}$(s[s.length-1]).removeClass("response-first-in-group").addClass("response-last-in-group");k=s[0].getElementsByTagName("td");$(s).find("input[name='group_responses:list']").parent().children().appendTo(k[k.length-1])}}return})}$(this).tablesorter({dateFormat:"uk",cancelSelection:false,textExtraction:"complex",appender:b})});$("table.sortable th:not(.nosort)").each(function(){$(this).attr("title","Sort by "+$(this).text())});$("#date-uk").tablesorter({sortColumn:"name",sortClassAsc:"headerSortUp",sortClassDesc:"headerSortDown",headerClass:"header",dateFormat:"dd/mm/yyyy"})});(function(a){a.fn.collapsible=function(b,c){return a(this).each(function(){var f=c;var e=a(this);if(f===undefined){f=e.next()}else{if(typeof f==="function"){f=f(this)}}e.addClass("collapsible-heading").prepend('<span class="collapsible-heading-status"></span>').wrapInner('<a href="#" class="collapsible-heading-toggle"></a>');f.addClass("collapsible-content");e.bind("collapse",function(){a(this).addClass("collapsible-heading-collapsed").find(".collapsible-heading-status").text("Show ");f.slideUp(function(){a(this).addClass("collapsible-content-collapsed").removeAttr("style").attr("aria-hidden",true)})}).bind("expand",function(){a(this).removeClass("collapsible-heading-collapsed").find(".collapsible-heading-status").text("Hide ");f.slideDown(function(){a(this).removeClass("collapsible-content-collapsed").removeAttr("style").attr("aria-hidden",false)})}).click(function(){if(a(this).is(".collapsible-heading-collapsed")){a(this).trigger("expand")}else{a(this).trigger("collapse")}return false});if(!b){e.addClass("collapsible-heading-collapsed").find(".collapsible-heading-status").text("Show ");f.hide().addClass("collapsible-content-collapsed").removeAttr("style").attr("aria-hidden",true)}else{e.removeClass("collapsible-heading-collapsed").find(".collapsible-heading-status").text("Show ");f.show().removeClass("collapsible-content-collapsed").removeAttr("style").attr("aria-hidden",false)}})}})(jQuery);var bugRiddenCrashPronePieceOfJunk=(navigator.userAgent.indexOf("MSIE 5")!=-1&&navigator.userAgent.indexOf("Mac")!=-1);var W3CDOM=(!bugRiddenCrashPronePieceOfJunk&&typeof document.getElementsByTagName!="undefined"&&typeof document.createElement!="undefined");var registerEventListener=undefined;if(typeof addEvent!="undefined"){registerEventListener=function(c,b,a){addEvent(c,b,a);return true}}else{if(window.addEventListener){registerEventListener=function(c,b,a){c.addEventListener(b,a,false);return true}}else{if(window.attachEvent){registerEventListener=function(e,c,b){var a=e.attachEvent("on"+c,b);return a}}else{registerEventListener=function(c,b,a){return false}}}}var unRegisterEventListener=undefined;if(typeof removeEvent!="undefined"){unRegisterEventListener=function(c,b,a){removeEvent(element,b,a);return true}}else{if(window.removeEventListener){unRegisterEventListener=function(c,b,a){c.removeEventListener(b,a,false);return true}}else{if(window.detachEvent){unRegisterEventListener=function(e,c,b){var a=e.detachEvent("on"+c,b);return a}}else{unRegisterEventListener=function(c,b,a){return false}}}}var registerPloneFunction=undefined;if(typeof addDOMLoadEvent!="undefined"){registerPloneFunction=function(a){addDOMLoadEvent(a)}}else{registerPloneFunction=function(a){registerEventListener(window,"load",a)}}function getContentArea(){if(W3CDOM){var a=document.getElementById("content");if(!a){a=document.getElementById("region-content")}return a}}function HashTools(){return{getHashArgs:function(){var f=document.location.hash,b={},a,e,h,c,g;if(f.length>1){a=f.substr(1).split("&");for(e=0;e<a.length;e=e+1){h=a[e].split("=");if(h.length==2){c=h[0];g=h[1];if(c.substring(0,1)=="!"){c=c.substring(1)}b[c]=g}}}return b},setHashArgs:function(b){var a,e,c="#!";for(a in b){e=b[a];if(c.length>2){c=c+"&"}c=c+a+"="+e}window.location.hash=c}}}function MakeDependency(){var j=document.getElementsByTagName("*");var g=j.length;for(var c=0;c<g;c++){var f=j[c];var e=f.className.split("dependency-");if(e.length==2){e=e[1].split(" ")[0];var b=e.replace("flip-","");var a="block";var h="";if(b.length!=e.length){a="none"}b=document.getElementById(b);f.dependency=b;f.on=a;f.off=h;if(f.nodeName=="SELECT"){f.onchange=function(){this.dependency.style.display=(this.value)?this.on:this.off};f.onchange()}else{if(f.nodeName=="LABEL"){if(f.htmlFor){f.checky=document.getElementById(f.htmlFor);f.checky.dependency=f.dependency;f.checky.on=a;f.checky.off=h;f.checky.onchange=function(){var k=this.checked;this.dependency.style.display=(k)?this.on:this.off};f.checky.onchange()}else{f.onclick=function(){var k=this.firstChild.checked;this.dependency.style.display=(k)?this.on:this.off};f.onclick()}}else{f.on=false;f.onclick=function(){if(this.on){this.dependency.style.display=this.off;this.on=false}else{this.dependency.style.display=this.on;this.on=true}}}}}}}MakeDependency();function selectAll(f,a){var e=document.getElementById(a);if(e.type=="select-multiple"){var b=e.options.length;for(var c=0;c<b;c++){e.options[c].selected=f.checked}}}$(document).ready(function(){from_field=document.getElementById("fd");to_field=document.getElementById("td");if(from_field!=null&&to_field!=null){check_field(from_field);check_field(to_field);blur_date(from_field);blur_date(to_field);from_field.onchange=function(){check_field(from_field)};to_field.onchange=function(){check_field(to_field)};from_field.onfocus=function(){focus_date(from_field)};to_field.onfocus=function(){focus_date(to_field)};from_field.onblur=function(){blur_date(from_field)};to_field.onblur=function(){blur_date(to_field)}}start=document.getElementById("startdate");end=document.getElementById("enddate");result=document.getElementById("resultdate");feedback=document.getElementById("feedbackdate");if(start!=null&end!=null){check_all(start,end,result,feedback);blur_date(start);blur_date(end);blur_date(result);blur_date(feedback);start.onchange=function(){check_all(start,end,result,feedback)};end.onchange=function(){check_all(start,end,result,feedback)};result.onchange=function(){check_all(start,end,result,feedback)};feedback.onchange=function(){check_all(start,end,result,feedback)};start.onfocus=function(){focus_date(start)};end.onfocus=function(){focus_date(end)};result.onfocus=function(){focus_date(result)};feedback.onfocus=function(){focus_date(feedback)};start.onblur=function(){blur_date(start)};end.onblur=function(){blur_date(end)};result.onblur=function(){blur_date(result)};feedback.onblur=function(){blur_date(feedback)};document.getElementById("browser_form").onsubmit=function(){clear_default_text(start);clear_default_text(end);clear_default_text(result);clear_default_text(feedback)}}});function check_field(a){un_invalidate(a);if(!is_date_valid(a.value)){mark_invalid(a);return}}function check_all(a,e,c,b){mark_black(a);mark_black(e);mark_black(c);mark_black(b);value1=a.value;value2=e.value;value3=c.value;value4=b.value;if(!is_date_valid(value1)){mark_invalid(a)}else{if(is_date_valid(value2)){if(!check_chronology(value1,value2)){mark_invalid(a);mark_invalid(e)}}else{if(is_date_valid(value3)){if(!check_chronology(value1,value3)){mark_invalid(a);mark_invalid(c)}}else{if(is_date_valid(value4)){if(!check_chronology(value1,value4)){mark_invalid(a);mark_invalid(b)}}}}}if(!is_date_valid(value2)){mark_invalid(e)}else{if(is_date_valid(value3)){if(!check_chronology(value2,value3)){mark_invalid(e);mark_invalid(c)}}else{if(is_date_valid(value4)){if(!check_chronology(value2,value4)){mark_invalid(e);mark_invalid(b)}}}}if(!is_date_valid(value3)){mark_invalid(c)}else{if(is_date_valid(value4)){if(!check_chronology(value3,value4)){mark_invalid(c);mark_invalid(b)}}}if(!is_date_valid(value4)){mark_invalid(b)}}function focus_date(a){if(a.value.match(/^ *dd\/mm\/yyyy *$/)){a.value="";mark_black(a)}}function blur_date(a){if(a.value.match(/^ *$/)){a.value="dd/mm/yyyy"}if(a.value.match(/^ *dd\/mm\/yyyy *$/)){mark_grey(a)}}function is_date_valid(a){date_pattern=/^(\d{1,2})\/(\d{1,2})\/(\d{4})/g;if(a.match(date_pattern)){bits=a.split(/\//);d=bits[0];m=bits[1];y=bits[2];test_date=new Date(y,m-1,d);if((test_date.getMonth()+1==m)&&(test_date.getDate()==d)&&(test_date.getFullYear()==y)){return true}}else{return false}}function check_chronology(b,f,a){var e=new Date();var c=new Date();e.setFullYear(b.substr(6,4),b.substr(3,2),b.substr(0,2));c.setFullYear(f.substr(6,4),f.substr(3,2),f.substr(0,2));if(e.getTime()<c.getTime()){return true}else{if(a){return true}else{return false}}}function mark_invalid(a){if(a.value.match(/^ *dd\/mm\/yyyy *$/)){mark_grey(a);return}a.style.color="red";a.onkeydown=function(){un_invalidate(a)}}function un_invalidate(a){a.style.color="";a.onkeydown=""}function mark_black(a){a.style.color=""}function mark_grey(a){a.style.color="#999999"}function clear_default_text(a){if(a.value.match(/^ *dd\/mm\/yyyy *$/)){a.value=""}}function addInputHelp(b,a){ele=(b.id==null)?document.getElementById(b):b;default_colour="#8D8D8D";if(a){ele.default_text=a;if(a==ele.value){ele.style.color=default_colour}}else{ele.style.color=default_colour;ele.default_text=ele.value}ele.onfocus=function(){if(this.value==this.default_text){this.value="";this.style.color=null}};ele.onblur=function(){if(this.value==""||this.value==this.default_text){this.value=this.default_text;this.style.color=default_colour}}}function addInputHelp_init(){inputs=document.getElementsByTagName("input");num_inputs=inputs.length;for(var a=0;a<num_inputs;a++){ar=inputs[a].className.split("default-text-");default_text=null;if(ar.length==2){ar=ar[1].split(" ");default_text=ar[0].replace(/-/g," ")}if(inputs[a].type=="text"&&default_text){addInputHelp(inputs[a],default_text)}}}if(window.attachEvent){window.attachEvent("load",addInputHelp_init)}else{window.addEventListener("load",addInputHelp_init,false)}var top_level_depts_are_orgs=true;if($("#dept_selector").length){$("#dept_selector").hide();var first_select_text="Any Department";if(top_level_depts_are_orgs){$("#dept_selector").children("li").each(function(){if($(this).children("ul").length){first_select_text="Any Organisation";return false}})}$("#dept_selector").parent().append('<select class="level0" id="depts_drop_down"><option value="">'+first_select_text+"</option></select>");$("#depts_drop_down").change(function(){handle_select_change($(this).attr("id"))});$("#dept_selector").children("li").each(function(){option_value=$(this).children("input").eq(0).attr("value");option_label=$(this).children("label").eq(0).text();option_id="dept_selector_"+option_value;$("#depts_drop_down").append('<option id="'+option_id+'" value="'+option_value+'">'+option_label+"</option>")});input_name=$("#dept_selector").find("input").eq(0).attr("name");$("form").each(function(){if($(this).find("#dept_selector").length){$(this).submit(function(){select=find_highest_level_drop_down(0);value=select.val();$("input[name="+input_name+"]").each(function(){$(this).attr("name","")});$(this).append('<input type="hidden" name="'+input_name+'" value="'+value+'" />')})}});selected_input=$("#dept_selector input:checked");if(selected_input.length){selected_val=selected_input.val();input_value_chain_string=get_input_value_chain(selected_val);arr_input_value_chain=input_value_chain_string.split(",");arr_input_value_chain.reverse();for(index in arr_input_value_chain){value=arr_input_value_chain[index];option_obj=$("select[id^=depts_drop_down] option[value="+value+"]");option_obj.attr("selected","selected");handle_select_change(option_obj.parent("select").attr("id"))}}}function get_input_value_chain(a){chain=a;parent_input=$("input[value="+a+"]").parent("li").parent("ul").siblings("input");if(parent_input.length){chain=chain+","+get_input_value_chain(parent_input.val())}return chain}function find_highest_level_drop_down(a){a=parseInt(a);level_1up=a+1;select_1_level_up=$("select.level"+level_1up);if(select_1_level_up.length&&select_1_level_up.val()){return find_highest_level_drop_down(level_1up)}else{return $("select.level"+a)}}function handle_select_change(a){new_val=$("#"+a).val();this_level=$("#"+a).attr("class").match(/level\d/)[0].replace(/level/,"");this_level=parseInt(this_level);destroy_selects_at_or_above_level(this_level+1);if(new_val!=""){make_sub_depts_select(new_val)}}function find_level(a,b){if(typeof(b)=="undefined"){b=0}if(a.parent("li").parent("ul").parent("li").length){b++;find_level(a.parent("li").parent("ul"),b)}else{return b}}function make_sub_depts_select(a){original_input=$("#dept_selector").find("input[value="+a+"]").eq(0);if(original_input.siblings("ul").length){level=find_level(original_input)+1;destroy_selects_at_or_above_level(level);sel_id="depts_drop_down"+level;sel_class="level"+level;$("#dept_selector").parent().append('<select class="'+sel_class+'" id="'+sel_id+'"><option value="">Any Department</option></select>');$("#"+sel_id).change(function(){handle_select_change(sel_id)});original_input.siblings("ul").children("li").each(function(){value=$(this).children("input").eq(0).attr("value");label=$(this).children("label").eq(0).text();$("#"+sel_id).append('<option value="'+value+'">'+label+"</option>")})}}function destroy_selects_at_or_above_level(a){jq_string="select.level"+a;if($(jq_string).length){$(jq_string).remove();destroy_selects_at_or_above_level(a+1)}}if($("#os-manage-users-search-form").length){var default_name_text="Any Name";var name_box=$("#os-manage-users-search-form #search-text");if(name_box.val().replace(/\s*/,"")==""){name_box.val(default_name_text);make_grey(name_box)}name_box.focus(function(){make_black(name_box);if($(this).val()==default_name_text){$(this).val("")}});name_box.blur(function(){if($(this).val().replace(/\s*/,"")==""){$(this).val(default_name_text)}if($(this).val()==default_name_text){make_grey(name_box)}});$("#os-manage-users-search-form").submit(function(){if(name_box.val()==default_name_text){name_box.val("")}})}function make_grey(a){a.css({color:"#999999"})}function make_black(a){a.css({color:""})}var quickconsult=quickconsult||{};quickconsult.analysis=(function(){return{copyConcatResponse:function(b){var e=document.getElementById(b),a=e,c=[];while(!jQuery(a).hasClass("question-container")){a=a.parentNode}jQuery(a).find(":input,.copy-me-please").each(function(){if(this===e){return}var f=jQuery(this);if(f.hasClass("textline")||f.hasClass("textarea")){c.push(f.val())}else{if(f.hasClass("copy-me-please")){c.push(f.html())}}});jQuery(e).val(c.join("\n"))},insertCopyButtons:function(){jQuery(".jsCopyButton").each(function(){var a=this.parentNode,c=this.id,b;if(c.substring(0,7)!=="btnfor-"){return}else{c=c.substring(7,c.length)}b=document.createElement("input");jQuery(b).attr("type","button");jQuery(b).attr("value","copy");jQuery(b).click(function(){quickconsult.analysis.copyConcatResponse(c);return false});a.replaceChild(b,this)})}}}());post_import_hooks.push(quickconsult.analysis.insertCopyButtons);var opsuite=opsuite||{};opsuite.ConfirmNav=function(c,b){b=b||"You have made changes without saving. Your changes will be lost.";var f,a=false;function e(){var g=[];g.push(jQuery("#"+c).serialize().replace(/\\/g,"\\\\").replace(/|/g,"\\|"));jQuery("#"+c+"input[type='file']").each(function(){g.push(this.value.replace(/\\/g,"\\\\").replace(/|/g,"\\|"))});return g.join("|")}f=e();window.onbeforeunload=function(){if(a){return undefined}if(window.flushWYSIWYG){flushWYSIWYG()}return(f==e())?undefined:b};return{disable:function(){a=true},enable:function(){a=false}}};(function(a){a.fn.bgIframe=a.fn.bgiframe=function(c){if(a.browser.msie&&/6.0/.test(navigator.userAgent)){c=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},c||{});var e=function(f){return f&&f.constructor==Number?f+"px":f},b='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+c.src+'"style="display:block;position:absolute;z-index:-1;'+(c.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(c.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":e(c.top))+";left:"+(c.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":e(c.left))+";width:"+(c.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":e(c.width))+";height:"+(c.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":e(c.height))+';"/>';return this.each(function(){if(a("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(b),this.firstChild)}})}return this}})(jQuery);
