var JSON = {
copyright: '(c)2005 JSON.org',
license: 'http://www.crockford.com/JSON/license.html',
stringify: function (v) {
var a = [];


function e(s) {
a[a.length] = s;
}

function g(x) {
var c, i, l, v;

switch (typeof x) {
case 'object':
if (x) {
if (x instanceof Array) {
e('[');
l = a.length;
for (i = 0; i < x.length; i += 1) {
v = x[i];
if (typeof v != 'undefined' &&
typeof v != 'function') {
if (l < a.length) {
e(',');
}
g(v);
}
}
e(']');
return;
} else if (typeof x.valueOf == 'function') {
e('{');
l = a.length;
for (i in x) {
v = x[i];
if (typeof v != 'undefined' &&
typeof v != 'function' &&
(!v || typeof v != 'object' ||
typeof v.valueOf == 'function')) {
if (l < a.length) {
e(',');
}
g(i);
e(':');
g(v);
}
}
return e('}');
}
}
e('null');
return;
case 'number':
e(isFinite(x) ? +x : 'null');
return;
case 'string':
l = x.length;
e('"');
for (i = 0; i < l; i += 1) {
c = x.charAt(i);
if (c >= ' ') {
if (c == '\\' || c == '"') {
e('\\');
}
e(c);
} else {
switch (c) {
case '\b':
e('\\b');
break;
case '\f':
e('\\f');
break;
case '\n':
e('\\n');
break;
case '\r':
e('\\r');
break;
case '\t':
e('\\t');
break;
default:
c = c.charCodeAt();
e('\\u00' + Math.floor(c / 16).toString(16) +
(c % 16).toString(16));
}
}
}
e('"');
return;
case 'boolean':
e(String(x));
return;
default:
e('null');
return;
}
}
g(v);
return a.join('');
},
parse: function (text) {
return (/^(\s+|[,:{}\[\]]|"(\\["\\\/bfnrtu]|[^\x00-\x1f"\\]+)*"|-?\d+(\.\d*)?([eE][+-]?\d+)?|true|false|null)+$/.test(text)) &&
eval('(' + text + ')');
}
};
/*
 * 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 l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
/*
 * 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 R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.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(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.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(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.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(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.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 H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.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(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.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(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<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>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
/*!
 * jQuery JavaScript Library v1.4.2
 * http://jquery.com/
 *
 * Copyright 2010, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2010, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Sat Feb 13 22:33:48 2010 -0500
 */
(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.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\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<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>";
a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
// Allows jQuery version 1.4.2 to process invalid JSON data (such as un-quoted property names or use of single-quotes)
jQuery.ajaxSetup({
	dataFilter: function(data, type){
		return (type === 'json') ? (new Function('return '+$.trim(data)+';'))() : data;
	}
});/**
 * @author Alexander Farkas
 * v. 1.1
 */

(function($){
	if(!document.defaultView || !document.defaultView.getComputedStyle){
		var oldCurCSS = jQuery.curCSS;
		jQuery.curCSS = function(elem, name, force){
			if(name !== 'backgroundPosition' || !elem.currentStyle || elem.currentStyle[ name ]){
				return oldCurCSS.apply(this, arguments);
			}
			var style = elem.style;
			if ( !force && style && style[ name ] ){
				return style[ name ];
			}
			return oldCurCSS(elem, 'backgroundPositionX', force) +' '+ oldCurCSS(elem, 'backgroundPositionY', force);
		};
	}
})(jQuery);

(function($) {
	
	function toArray(strg){
		strg = strg.replace(/left|top/g,'0px');
		strg = strg.replace(/right|bottom/g,'100%');
		strg = strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");
		var res = strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);
		return [parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]];
	}
	
	$.fx.step. backgroundPosition = function(fx) {
		if (!fx.bgPosReady) {
			
			var start = $.curCSS(fx.elem,'backgroundPosition');
			if(!start){//FF2 no inline-style fallback
				start = '0px 0px';
			}
			
			start = toArray(start);
			fx.start = [start[0],start[2]];
			
			var end = toArray(fx.options.curAnim.backgroundPosition);
			fx.end = [end[0],end[2]];
			
			fx.unit = [end[1],end[3]];
			fx.bgPosReady = true;
		}
		
		var nowPosX = [];
		nowPosX[0] = ((fx.end[0] - fx.start[0]) * fx.pos) + fx.start[0] + fx.unit[0];
		nowPosX[1] = ((fx.end[1] - fx.start[1]) * fx.pos) + fx.start[1] + fx.unit[1];           
		fx.elem.style.backgroundPosition = nowPosX[0]+' '+nowPosX[1];

	};
})(jQuery);/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate: 2007-07-21 18:45:56 -0500 (Sat, 21 Jul 2007) $
 * $Rev: 2447 $
 *
 * Version 2.1.1
 */
(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};})(jQuery);/*
 * jQuery Address Plugin v1.0
 * http://www.asual.com/jquery/address/
 *
 * Copyright (c) 2009 Rostislav Hristov
 * Dual licensed under the MIT and GPL licenses.
 * http://docs.jquery.com/License
 *
 * Date: 2009-04-28 16:54:00 +0300 (Tue, 28 Apr 2009)
 * Revision: 399
 */
(function($) {
	$.address = (function () {
		var _api = {};
		var _ready = false;
		
		var _activate = function() {					
			var _trigger = function(name) {
				$(this).trigger(
					$.extend($.Event(name), 
						(function() {
							var event = {
								value: this.value(),
								path: this.path(),
								pathNames: this.pathNames(),
								parameterNames: this.parameterNames(),
								parameters: {},
								queryString: this.queryString()
							};
							for (var i = 0, l = event.parameterNames.length; i < l; i++)
								event.parameters[event.parameterNames[i]] = this.parameter(event.parameterNames[i]);
							return event;
						}).call(this)
					)
				);
			};
		
			var _init = function() {
				_trigger.call($.address, 'init');
			};
			
			var _change = function() {
				_trigger.call($.address, 'change');
			};
	
			var _getHash = function() {
				var index = _l.href.indexOf('#');
				return index != -1 ? _ec(_dc(_l.href.substr(index + 1))) : '';
			};
			
			var _getWindow = function() {
				try {
					top.document;
					return top;
				} catch (e) {
					return window;
				}
			};
			
			var _strictCheck = function(value, force) {
				if (_opts.strict)
					value = force ? (value.substr(0, 1) != '/' ? '/' + value : value) : (value == '' ? '/' : value);
				return value;
			};
	
			var _ieLocal = function(value, direction) {
				return (_msie && _l.protocol == 'file:') ? 
					(direction ? _value.replace(/\?/, '%3F') : _value.replace(/%253F/, '?')) : value;
			};
	
			var _searchScript = function(el) {
				for (var i = 0, l = el.childNodes.length, s; i < l; i++) {
					if (el.childNodes[i].src)
						_url = String(el.childNodes[i].src);
					if (s = _searchScript(el.childNodes[i]))
						return s;
				}
			};
	
			var _listen = function() {
				if (!_silent) {
					var hash = _getHash();
					var diff = !(_value == hash);
					if (_safari && _version < 523) {
						if (_length != _h.length) {
							_length = _h.length;
							if (typeof _stack[_length - 1] != UNDEFINED)
								_value = _stack[_length - 1];
							_update();
						}
					} else if (_msie && diff) {
						if (_version < 7)
							_l.reload();
						else
							_setters.value(hash);
					} else if (diff) {
						_value = hash;
						_update();
					}
				}
			};
	
			var _update = function() {
				_change();
				_st(_track, 10);  //10
			};
	
			var _track = function() {
				var value = (_l.pathname + (/\/$/.test(_l.pathname) ? '' : '/') + _getters.value()).replace(/\/\//, '/').replace(/^\/$/, '');
				var fn = window[_opts.tracker];
				if (typeof fn == FUNCTION)
					fn(value);
				else if (typeof pageTracker != UNDEFINED && typeof pageTracker._trackPageview == FUNCTION)
					pageTracker._trackPageview(value);
				else if (typeof urchinTracker == FUNCTION) 
					urchinTracker(value);
			};
			
			var _htmlWrite = function() {
				var doc = _iframe.contentWindow.document;
				doc.open();
				doc.write('<html><head><title>' + _d.title + '</title><script>var ' + ID + ' = "' + _getHash() + '";</script></head></html>');
				doc.close();
			};
	
			var _load = function() {
				if (!_loaded) {
					_loaded = true;
					$('a').attr('xref', function() {
						return $(this).attr('href');
					});				
					
					if (_msie && _version < 8) {					
						$('body').prepend('<iframe id="' + ID + '" src="javascript:false;" width="0" height="0"></iframe>');
						_iframe = _d.getElementById(ID);
						_st(function() {
							$(_iframe).bind('load', function() {
								var win = _iframe.contentWindow;
								var src = win.location.href;
								_value = (typeof win[ID] != UNDEFINED ? win[ID] : '');
								if (_value != _getHash()) {
									_update();
									_l.hash = _ieLocal(_value, true);
								}
							});
							if (typeof _iframe.contentWindow[ID] == UNDEFINED) 
								_htmlWrite();
						}, 50); //50
					} else if (_safari) {
						if (_version < 418) {
							$(_d.body).append('<form id="' + ID + '" style="position:absolute;top:-9999px;" method="get"></form>');
							_form = _d.getElementById(ID);
						}
						if (typeof _l[ID] == UNDEFINED) _l[ID] = {};
						if (typeof _l[ID][_l.pathname] != UNDEFINED) _stack = _l[ID][_l.pathname].split(',');
					}
					
					_st(function() {
						_init();
						_change();
						_track();
					}, 1); //1
					
					if (_msie && _version >= 8)
						_d.body.onhashchange = _listen;
					else
						_si(_listen, 50);
						
					$('a').attr('href', function() {
						return $(this).attr('xref');
					}).removeAttr('xref');
					
					$('a[rel*=address:]').address();
				}
			};
			
			var _getters = {
				baseURL: function() {
					var url = _l.href;
					if (url.indexOf('#') != -1)
						url = url.substr(0, url.indexOf('#'));
					if (url.substr(url.length - 1) == '/')
						url = url.substr(0, url.length - 1);
					return url;
				}, 
				strict: function() {
					return _opts.strict;
				},
				history: function() {
					return _opts.history;
				},
				tracker: function() {
					return _opts.tracker;
				},
				title: function() {
					return _d.title;
				},
				value: function() {
					if (!_supported) return null;
					return _dc(_strictCheck(_ieLocal(_value, false), false));
				},
				path: function() {
					var value = this.value();
					return (value.indexOf('?') != -1) ? value.split('?')[0] : value;
				},
				pathNames: function() {
					var path = this.path();
					var names = path.split('/');
					if (path.substr(0, 1) == '/' || path.length == 0)
						names.splice(0, 1);
					if (path.substr(path.length - 1, 1) == '/')
						names.splice(names.length - 1, 1);
					return names;
				},
				queryString: function() {
					var value = this.value();
					var index = value.indexOf('?');
					return (index != -1 && index < value.length) ? value.substr(index + 1) : '';
				},
				parameter: function(param) {
					var value = this.value();
					var index = value.indexOf('?');
					if (index != -1) {
						value = value.substr(index + 1);
						var params = value.split('&');
						var p, i = params.length;
						while(i--) {
							p = params[i].split('=');
							if (p[0] == param)
								return p[1];
						}
					}
				},
				parameterNames: function() {
					var value = this.value();
					var index = value.indexOf('?');
					var names = [];
					if (index != -1) {
						value = value.substr(index + 1);
						if (value != '' && value.indexOf('=') != -1) {
							var params = value.split('&');
							var i = 0;
							while(i < params.length) {
								names.push(params[i].split('=')[0]);
								i++;
							}
						}
					}
					return names;
				}        
			};
			
			var _setters = {
				strict: function(strict) {
					_opts.strict = strict;
				},
				history: function(history) {
					_opts.history = history;
				},
				tracker: function(tracker) {
					_opts.tracker = tracker;
				},
				title: function(title) {
					_st(function() {
						_title = _d.title = title;
						if (_juststart && _iframe && _iframe.contentWindow && _iframe.contentWindow.document) {
							_iframe.contentWindow.document.title = title;
							_juststart = false;
						}
						if (!_justset && _mozilla)
							_l.replace(_l.href.indexOf('#') != -1 ? _l.href : _l.href + '#');
						_justset = false;
					}, 50); //50
				},
				value: function(value) {
					value = _ec(_dc(_strictCheck(value, true)));
					if (value == '/') value = '';
					if (_value == value) return;
					_justset = true;
					_value = value;
					_silent = true;
					_update();
					_stack[_h.length] = _value;
					if (_safari) {
						if (_opts.history) {
							_l[ID][_l.pathname] = _stack.toString();
							_length = _h.length + 1;
							if (_version < 418) {
								if (_l.search == '') {
									_form.action = '#' + _value;
									_form.submit();
								}
							} else if (_version < 523 || _value == '') {
								var evt = _d.createEvent('MouseEvents');
								evt.initEvent('click', true, true);
								var anchor = _d.createElement('a');
								anchor.href = '#' + _value;
								anchor.dispatchEvent(evt);                
							} else {
								_l.hash = '#' + _value;
							}
						} else {
							_l.replace('#' + _value);
						}
					} else if (_value != _getHash()) {
						if (_opts.history)
							_l.hash = '#' + _ieLocal(_value, true);
						else
							_l.replace('#' + _value);
					}
					if ((_msie && _version < 8) && _opts.history) {
						_st(_htmlWrite, 50); //50
					}
					if (_safari)
						_st(function(){ _silent = false; }, 1);
					else
						_silent = false;
				}
			};
	
			var ID = 'jQueryAddress',
				FUNCTION = 'function',
				UNDEFINED = 'undefined',
				_browser = $.browser, 
				_version = parseFloat($.browser.version),
				_mozilla = _browser.mozilla,
				_msie = _browser.msie,
				_opera = _browser.opera,
				_safari = _browser.safari,
				_supported = false,
				_t = _getWindow(),
				_d = _t.document,
				_h = _t.history, 
				_l = _t.location,
				_si = setInterval,
				_st = setTimeout, 
				_dc = decodeURI,
				_ec = encodeURI,
				_agent = navigator.userAgent,            
				_iframe,
				_form,
				_url,
				_title = _d.title, 
				_length = _h.length, 
				_loaded = false,
				_silent = false,
				_justset = true,
				_juststart = true,
				_stack = [], 
				_listeners = {}, 
				_value = _getHash(),
				_opts = {history: true, strict: true};
			
			if (_msie)
				_version = parseFloat(_agent.substr(_agent.indexOf('MSIE') + 4));
			
			_supported = 
				(_mozilla && _version >= 1) || 
				(_msie && _version >= 6) ||
				(_opera && _version >= 9.5) ||
				(_safari && _version >= 312);
				
			if (_supported) {
			
				for (var i = 1; i < _length; i++)
					_stack.push('');
					
				_stack.push(_getHash());
			
				if (_msie && _l.hash != _getHash())
					_l.hash = '#' + _ieLocal(_getHash(), true);
	
				if (_opera) 
					history.navigationMode = 'compatible'; 
				
				_searchScript(document);
				var _qi = _url.indexOf('?');
				if (_url && _qi > -1) {
					var param, params = _url.substr(_qi + 1).split('&');
					for (var i = 0, p; p = params[i]; i++) {
						param = p.split('=');
						if (/^(history|strict)$/.test(param[0])) {
							_opts[param[0]] = (isNaN(param[1]) ? /^(true|yes)$/i.test(param[1]) : (parseInt(param[1]) != 0));
						}
						if (/^tracker$/.test(param[0]))
							_opts[param[0]] = param[1];
					}
				}
	
				$(_load);
				
			} else if ((!_supported && _l.href.indexOf('#') != -1) || 
				(_safari && _version < 418 && _l.href.indexOf('#') != -1 && _l.search != '')){
				_d.open();
				_d.write('<html><head><meta http-equiv="refresh" content="0;url=' + 
					_l.href.substr(0, _l.href.indexOf('#')) + '" /></head></html>');
				_d.close();
			} else {
				_track();
			}
	
			$.each(('init,change').split(','), function(i, name){
				_api[name] = function(data, fn){
					$($.address).bind(name, fn || data, fn && data);
					return this;
				};
			});
			
			$.each(('baseURL,strict,history,tracker,title,value').split(','), function(i, name){
				_api[name] = function(value){
					if (typeof value != 'undefined') {
						if (_supported)
							_setters[name](value);
						return $.address;
					} else {
						return _getters[name]();
					}
				};
			});
	
			$.each(('path,pathNames,queryString,parameter,parameterNames').split(','), function(i, name){
				_api[name] = function(value){
					return _getters[name](value);
				};
			});
			
			_ready = true;
			$(document).trigger('onAddressActivated');
			$(document).unbind('onAddressActivated');
		};
			
		_api['activate'] = function(){
			_activate();
			return this;
		};

		_api['ready'] = function(){
			return _ready;
		};				
		
		return _api;
	})();

	$.fn.address = function (fn) {
		$(this).click(function() {
			var value = fn ? fn.call(this) : 
			/address:/.test($(this).attr('rel')) ? $(this).attr('rel').split('address:')[1].split(' ')[0] : 
			$(this).attr('href').replace(/^#/, '');
			$.address.value(value);
				return false;
		});
	};
}(jQuery));
// there needs to be empty functions setup for the debug logger
jQuery.dr_console = {
		logFunction: function(){},
		logVar: function(){}
};

/* namespace.js
 * jQuery namespace plugin (without eval)
 * Author: Jason Moon
 */
(function($){

// Keep track of each jQuery call, to be used later when a namespaced function is used
var $current = null;
var jQueryInit = $.fn.init;

// Recurse down through the dot-delimited string, returning the object at the end
var getObjectFromSpace = function(names){
	var name = names.shift();
	if (!this[name]) {
		this[name] = {};
	}
	return (names.length) ? getObjectFromSpace.call(this[name], names) : this[name];
};

// Create the namespaced function, which will return the jQuery object from the last jQuery selection that was made
var assignPlugin = function(fn){
	return function(){
		return fn.apply($current, arguments);
	};
};

// Override the jQuery init function to serve as a hook into every jQuery selection that is made
$.fn.extend({
	init: function(selector, context) {
		$current = new jQueryInit(selector, context);
		return $current;
	}
});

$.namespace = function(fullname, extension){
	// Handle a single function that is passed as 'extensino'; its name will be the last level of the 'fullname' string
	if ($.isFunction(extension)) {
		var nameList = fullname.split('.');
		var finalName = nameList.pop();
		var endSpace = (nameList.length) ? getObjectFromSpace.call($.fn, nameList) : $.fn;
		endSpace[finalName] = assignPlugin(extension);
	} else {
		var finalSpace = $.fn;
		if (typeof fullname === 'string') {
			finalSpace = getObjectFromSpace.call(finalSpace, fullname.split('.'));
			fullname += '.';
		} else {
			// Only a single parameter could be passed in, an object literal
			extension = fullname;
			fullname = '';
		}
		// Handle an object literal, with its properties becoming the plugin functions
		if (extension) {
			$.each(extension, function(key, fn){
				if ($.isFunction(fn)) {
					finalSpace[key] = assignPlugin(fn);
				} else if (typeof fn === 'object') {
					$.namespace(fullname+key, fn);
				}
			});
		}
	}
};

})(jQuery);if(!window.console){
window.console=function(){
};
}
(function($){
var _2=[];
$.dr=window.jQuery.dr||{VERSION:"1.7.0.0.7.1",VERSION_CREATION_DATE:"201006041145",BUILD_ID:"1.7.0.0.7.1",FRAMEWORK_PATH:"//ui1.img.digitalrivercontent.net/drui/1.7.0.0.7.1/",IMAGE_PATH:"//ui1.img.digitalrivercontent.net/drui/1.7.0.0.7.1/images/",BLANK_PAGE_URL:"//ui1.img.digitalrivercontent.net/drui/1.7.0.0.7.1/html/Blank.html",LOGIN_URL:"",userdata:null,USER_LOCALE:"en_US",IS_INTERNAL_USER:false,IS_MODAL:false,strings:{LOADING:"Loading...",PROCESSING:"Processing...",AUTHORIZING:"Authorizing...",SEARCHING:"Searching...",RENAME:"Rename",PROPERTIES:"Properties",MOVE_UP:"Move Up",MOVE_DOWN:"Move Down",DELETE:"Delete",CLOSE:"Close",CLOSE_WINDOW:"Close Window",COLLAPSE:"Collapse",DONE:"Done",EXPAND:"Expand",SAVE:"Save",NEXT:"Next",YES:"Yes",NO:"No",FINISH:"Finish",CANCEL:"Cancel",OK:"OK"},init:function(){
var _3=$("body.modalPage").length;
if(_3){
$.dr.IS_MODAL=true;
}
if($.browser.opera){
$.dr.addUnobtrusiveEvent(function(_4,_5){
$("fieldset",_5).each(function(){
var _6=$(this);
if(_6.css("display")==="table-column"){
_6.css("display","block");
}
});
},"unobtrusiveEventEarly");
}
$(document).trigger("domReadyEarly").trigger("unobtrusiveEventEarly",[document]);
$(function(){
$(document).trigger("domReadyNormal");
$.dr.triggerUnobtrusiveEvents(document);
$(document).trigger("domReadyLate");
if($.isFunction(window.customOnload)){
customOnload();
}
if(_3){
setTimeout(function(){
(new DR.Utils.PageSizer()).initModalScroller();
},100);
try{
parent.overlayStack.getCurrent().center(true);
}
catch(e){
}
}
});
},addDomReadyEvent:function(_7,_8){
$(document).bind(_8||"domReadyLate",_7);
},addUnobtrusiveEvent:function(_9,_a){
$(document).bind(_a||"unobtrusiveEventNormal",_9);
},triggerUnobtrusiveEvents:function(_b){
if(_b!==document){
$(document).trigger("unobtrusiveEventEarly",[_b]);
}
$(document).trigger("unobtrusiveEventNormal",[_b]).trigger("unobtrusiveEventLate",[_b]);
},addPlugin:function(_c,_d){
if(_c&&typeof _d=="function"){
if(typeof _2[_c]==="undefined"){
_2[_c]=[];
}
_2[_c].push(_d);
}
},getPlugins:function(_e){
return _2[_e];
}};
})(jQuery);
var DR=window.DR||function(){
};
DR.Global=function(){
};
DR.Utils=function(){
};
DR.Widgets=function(){
};
var overlayStack,pageInfo={};
(function($){
$.dr.utils=window.jQuery.dr.utils||{};
$.namespace("dr.bindPluginEvent",function(_10,_11){
if($.isFunction(_11)){
return this.bind(_10,function(_12){
var _13=_11.apply(this,Array.prototype.slice.call(arguments,1).concat([_12]));
if(_13===false){
_12.stopImmediatePropagation();
}
return _13;
});
}else{
return this;
}
});
$.namespace("dr.triggerEach",function(_14,_15){
var _16=undefined;
this.each(function(){
var _17=$(this).triggerHandler(_14,_15);
if(_17!==undefined){
_16=_17;
if(_17===false){
return false;
}
}
});
return _16;
});
$.dr.utils.createPluginEvent=function(_18){
var _19=_18.split(".").pop();
$.namespace(_18,function(_1a){
return this.dr.bindPluginEvent(_19,_1a);
});
};
$.dr.getScript=function(_1b,_1c,_1d){
if(_1d!==false){
_1d=true;
}
return $.ajax({url:_1b,dataType:"script",global:false,cache:_1d,success:function(_1e,_1f){
setTimeout(function(){
_1c(_1e,_1f);
},0);
}});
};
$.dr.utils.logError=function(_20,err){
if(window.console){
console.error(_20);
if(err){
console.error("Error: ",err);
}
}
};
$.dr.utils.evalString=function(str,_23){
var o;
if(!str){
return;
}
if(str.trim().length==0){
return;
}
try{
eval("o="+str);
}
catch(e){
if(_23){
$.dr.utils.logError(_23,e);
}
o="error";
}
return o;
};
$.fn.setData=function(_25){
return this.each(function(){
for(var _26 in _25){
$(this).data(_26,_25[_26]);
}
});
};
var _27=document.defaultView&&document.defaultView.getComputedStyle;
$.dr.utils.getComputedValue=function(obj,_29){
if(_27){
return document.defaultView.getComputedStyle(obj,"").getPropertyValue(_29);
}else{
return obj.currentStyle[_29];
}
};
$.namespace("dr",{computedWidth:function(){
if(this.length>0){
var num=parseInt($.dr.utils.getComputedValue(this[0],"width"),10);
return (isNaN(num))?0:num;
}
},computedHeight:function(){
if(this.length>0){
var num=parseInt($.dr.utils.getComputedValue(this[0],"height"),10);
return (isNaN(num))?0:num;
}
}});
})(jQuery);
DR.Utils.BrowserDetect={init:function(){
this.browser=this.searchString(this.dataBrowser)||"An unknown browser";
this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";
this.OS=this.searchString(this.dataOS)||"an unknown OS";
this.isStandardsMode=this.checkStandardsMode();
},checkStandardsMode:function(){
return document.compatMode=="CSS1Compat";
},getAvailableContentWidth:function(){
var _2c=null;
if(this.isStandardsMode){
if(document.documentElement){
_2c=document.documentElement.clientWidth;
}
}else{
_2c=document.body.clientWidth;
}
return _2c;
},getAvailableContentHeight:function(){
var _2d=null;
if(this.isStandardsMode){
if(document.documentElement){
_2d=document.documentElement.clientHeight;
}
}else{
_2d=document.body.clientHeight;
}
return _2d;
},searchString:function(_2e){
for(var i=0;i<_2e.length;i++){
var _30=_2e[i].string;
var _31=_2e[i].prop;
this.versionSearchString=_2e[i].versionSearch||_2e[i].identity;
if(_30){
if(_30.indexOf(_2e[i].subString)!=-1){
return _2e[i].identity;
}
}else{
if(_31){
return _2e[i].identity;
}
}
}
},isIE6:function(){
if(this.version==6&&this.browser=="Explorer"){
return true;
}
return false;
},searchVersion:function(_32){
var _33=_32.indexOf(this.versionSearchString);
if(_33==-1){
return;
}
return parseFloat(_32.substring(_33+this.versionSearchString.length+1));
},dataBrowser:[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};
DR.Utils.BrowserDetect.init();
DR.Utils.Cookie=function(_34){
this.name=_34;
this.expires=null;
this.path=null;
this.domain=null;
this.defaultExpireDays=365;
this.secure=null;
this.type="Single";
this.value=null;
this.valueLoaded=false;
this.arrayValues=[];
this.arrayValuesLoaded=false;
this.arraySeperator="^";
this.nameArrayValues=[];
this.nameArrayValuesLoaded=false;
this.nameArraySeperator="&";
this.nameArrayInnerSeperator=":";
};
DR.Utils.Cookie.ERROR_VALID_DATE="Enter a valid date.";
DR.Utils.Cookie.prototype={setExpires:function(_35){
if(!this.nameArrayValuesLoaded){
this.load();
}
if(_35!==null){
_35=new Date(_35);
if(_35.constructor==Date){
this.expires=_35.toGMTString();
}else{
alert(DR.Utils.Cookie.ERROR_VALID_DATE);
}
}
},setExpireDays:function(_36){
this.defaultExpireDays=_36;
},load:function(){
var _37=document.cookie;
if(_37===""){
return false;
}
var _38=_37.indexOf(this.name+"=");
if(_38!=-1){
_38+=this.name.length+1;
var _39=_37.indexOf(";",_38);
if(_39==-1){
_39=_37.length;
}
var _3a=unescape(_37.substring(_38,_39));
if(this.type=="Single"){
this.value=_3a;
this.nameArrayValuesLoaded=true;
}else{
if(this.type=="NameValuePair"){
this.splitCookiePairs(_3a);
}else{
if(this.type=="Array"){
this.splitCookieArray(_3a);
}
}
}
return true;
}
return false;
},save:function(){
var v="";
if(this.type=="Single"){
v=this.value;
}else{
if(this.type=="NameValuePair"){
v=this.joinNameValuePairs();
}else{
if(this.type=="Array"){
v=this.joinArrayValues();
}
}
}
if(this.expires===null){
this.expires=this.getDateOffset(this.defaultExpireDays);
}
document.cookie=this.name+"="+escape(v)+((this.expires)?"; expires="+this.expires:"")+((this.path)?"; path="+this.path:"")+((this.domain)?"; domain="+this.domain:"")+((this.secure)?"; secure":"");
},setValue:function(_3c){
if(!this.nameArrayValuesLoaded){
this.load();
}
this.value=_3c;
this.type="Single";
this.save();
},clear:function(){
var c=new Date();
document.cookie=this.name+"="+((this.expires)?"; expires="+c.toGMTString():"")+((this.path)?"; path="+this.path:"")+((this.domain)?"; domain="+this.domain:"")+((this.secure)?"; secure":"");
this.name=null;
this.expires=null;
this.path=null;
this.domain=null;
this.defaultExpireDays=null;
this.secure=null;
this.type=null;
this.value=null;
this.valueLoaded=null;
this.arrayValues=null;
this.arrayValuesLoaded=null;
this.arraySeperator=null;
this.nameArrayValues=null;
this.nameArrayValuesLoaded=null;
this.nameArraySeperator=null;
this.nameArrayInnerSeperator=null;
},addArrayValue:function(_3e){
this.type="Array";
if(!this.arrayValuesLoaded){
this.load();
}
var _3f="";
var ary=this.arrayValues;
var _41=[];
var k=0;
if(ary.length>0){
for(var i=0;i<ary.length;i++){
if(ary[i]!=_3e){
_3f+=ary[i]+this.arraySeperator;
_41[k]=ary[i];
k++;
}
}
}
_41[k]=_3e;
_3f+=_3e+this.arraySeperator;
this.arrayValues=_41;
this.value=_3f;
this.save();
},removeArrayValue:function(_44){
this.type="Array";
var _45="";
var ary=this.arrayValues;
var _47=[];
var k=0;
for(var i=0;i<ary.length;i++){
if(ary[i]!=_44){
_45+=ary[i]+this.arraySeperator;
_47[k]=ary[i];
k++;
}
}
this.arrayValues=_47;
this.value=_45;
this.save();
},setNameValuePair:function(_4a,_4b){
var v=_4b+"";
if(_4a.indexOf("&")==-1&&_4a.indexOf(":")==-1&&v.indexOf("&")==-1&&v.indexOf(":")==-1){
if(!this.nameArrayValuesLoaded){
this.load();
}
this.type="NameValuePair";
this.nameArrayValues[_4a]=_4b;
this.save();
}
},getValue:function(_4d){
if(!this.nameArrayValuesLoaded){
this.load();
}
if(_4d){
return this.nameArrayValues[_4d];
}else{
return this.value;
}
},removeValue:function(_4e){
if(!this.nameArrayValuesLoaded){
this.load();
}
delete this.nameArrayValues.name;
this.save();
},removeAllValues:function(){
if(!this.nameArrayValuesLoaded){
this.load();
}
this.nameArrayValues=[];
},splitCookiePairs:function(_4f){
var _50=_4f.split(this.nameArraySeperator);
for(var i=0;i<_50.length;i++){
_50[i]=_50[i].split(this.nameArrayInnerSeperator);
}
this.nameArrayValues=[];
for(var j=0;j<_50.length;j++){
this.nameArrayValues[_50[j][0]]=_50[j][1];
}
this.joinNameValuePairs();
},splitCookieArray:function(_53){
var ary=[];
if(_53!==null){
var i=0;
while(_53.indexOf(this.arraySeperator)!="-1"){
ary[i]=_53.substring(0,_53.indexOf(this.arraySeperator));
i++;
_53=_53.substring(_53.indexOf(this.arraySeperator)+1,_53.length);
}
}
this.arrayValues=ary;
this.joinArrayValues();
},joinNameValuePairs:function(){
var _56=[];
for(var i in this.nameArrayValues){
_56[_56.length]=i+this.nameArrayInnerSeperator+this.nameArrayValues[i];
}
var v=_56.join(this.nameArraySeperator);
this.value=v;
return v;
},joinArrayValues:function(){
var v="";
if(this.arrayValues.length>0){
for(var i=0;i<this.arrayValues.length;i++){
v+=this.arrayValues[i]+this.arraySeperator;
}
}
this.value=v;
return v;
},getDateOffset:function(_5b){
var _5c=new Date();
_5c.setTime(_5c.getTime());
if(_5b){
var _5d=_5b*1000*60*60*24;
var _5e=new Date(_5c.getTime()+(_5d));
return _5e;
}
}};
DR.Utils.replaceCSSClass=function(_5f,_60,_61){
_5f=(typeof _5f=="object")?_5f:document.getElementById(_5f);
if(_5f){
_5f.className=_5f.className.replace(_60,_61).trim();
}
};
DR.Utils.hasCSSClass=function(_62,_63){
_62=(typeof _62=="object")?_62:document.getElementById(_62);
if(_62){
if(_62.className.indexOf(_63)>-1){
return true;
}
}
return false;
};
DR.Utils.removeCSSClass=function(_64,_65){
_64=(typeof _64=="object")?_64:document.getElementById(_64);
if(_64){
_64.className=_64.className.replace(_65,"").trim();
}
};
DR.Utils.addCSSClass=function(_66,_67){
_66=(typeof _66=="object")?_66:document.getElementById(_66);
if(_66){
DR.Utils.removeCSSClass(_66,_67);
_66.className=(_67+" "+_66.className).trim();
}
};
DR.Utils.setCSSClass=function(_68,_69){
_68=(typeof _68=="object")?_68:document.getElementById(_68);
if(_68){
_68.className=_69;
}
};
DR.Utils.getStyle=function(id,_6b){
var obj=(typeof id=="object")?id:document.getElementById(id);
var _6d="";
if(document.defaultView&&document.defaultView.getComputedStyle){
DR.Utils.styleObj=document.defaultView.getComputedStyle(obj,null);
_6d=DR.Utils.styleObj?eval("DR.Utils.styleObj."+_6b):null;
}else{
if(obj.currentStyle){
_6d=obj.currentStyle[_6b];
}
}
return _6d;
};
DR.Utils.disableListLink=function(id,_6f){
var li=(typeof id=="object")?id:document.getElementById(id);
DR.Utils.addCSSClass(li,"disabled");
var a=li.getElementsByTagName("a");
if(a.length==1){
var _72=a[0];
_72.removeAttribute("href");
if(typeof (_72.onclick)=="function"){
_72.onclick_disabled=_72.onclick;
}
if(typeof (_6f)=="function"){
_72.onclick=_6f;
}
}
};
DR.Utils.enableListLink=function(id){
var li=(typeof id=="object")?id:document.getElementById(id);
DR.Utils.removeCSSClass(li,"disabled");
var a=li.getElementsByTagName("a");
if(a.length==1){
var _76=a[0];
_76.setAttribute("href","#");
var od=_76.getAttribute("onclick_disabled");
if(typeof (od)=="function"){
_76.onclick=_76.onclick_disabled;
}else{
if(typeof (od)=="object"){
_76.onclick=eval(_76.onclick_disabled);
}
}
_76.removeAttribute("onclick_disabled");
}
};
DR.Utils.insertBefore=function(_78,_79,_7a){
var _7b=_78.tagName.toLowerCase();
if(document.all&&_7b=="td"){
var n=parentNode.appendChild(_79,_7a);
_78.appendChild(_7a,n);
}else{
_78.insertBefore(_79,_7a);
}
};
DR.Utils.insertAfter=function(_7d,_7e,_7f){
return _7d.insertBefore(_7e,_7f.nextSibling);
};
DR.Utils.addToBody=function(el){
var _81=document.getElementsByTagName("BODY")[0];
var _82=_81.firstChild;
_81.insertBefore(el,_82);
_81=null;
_82=null;
return el;
};
DR.Utils.attachCssStyleSheet=function(url){
var _84=document.getElementsByTagName("head")[0];
var _85=document.createElement("link");
_85.type="text/css";
_85.rel="stylesheet";
_85.href=url;
_84.appendChild(_85);
};
DR.Utils.getElem=function(id){
var o=document.getElementById(id);
if(o){
return o;
}else{
window.status="Html element not found: "+id;
return null;
}
};
DR.Utils.getElementsByClassName=function(_88,_89){
if(_88.indexOf(".")==-1){
_88="."+_88;
}
if(typeof _89=="object"){
return jQuery(_88,_89);
}else{
if(typeof _89=="string"&&_89!==""){
if(_89.indexOf("#")==-1){
_89="#"+_89;
}
return jQuery(_89+" "+_88);
}else{
return jQuery(_88);
}
}
};
DR.Utils.getFirstElementByClassName=function(_8a,_8b){
var _8c=DR.Utils.getElementsByClassName(_8a,_8b);
if(_8c.length>0){
return _8c[0];
}
return null;
};
DR.Utils.getElementsBySelectorPath=function(_8d,_8e){
if(_8d.indexOf(".")==-1){
_8d="."+_8d;
}
if(typeof _8e=="object"){
return jQuery(_8d,_8e);
}else{
if(typeof _8e=="string"&&_8e!==""){
if(_8e.indexOf("#")==-1){
_8e="#"+_8e;
}
return jQuery(_8e+" "+_8d);
}else{
return jQuery(_8d);
}
}
};
DR.Utils.getFirstElementBySelectorPath=function(_8f,_90){
var _91=DR.Utils.getElementsBySelectorPath(_8f,_90);
if(_91.length>0){
return _91[0];
}
return null;
};
DR.Utils.attachDRFrameworkCSS=function(){
var _92=navigator.appName;
var _93=(_92.indexOf("Explorer")>-1);
var _94=(navigator.appVersion.indexOf("MSIE 7")>-1);
var _95=(navigator.userAgent.indexOf("AppleWebKit")>-1);
var _96="dr-stylesheet-ff-compressed.css";
if(_94){
_96="dr-stylesheet-ie7-compressed.css";
}else{
if(_93){
_96="dr-stylesheet-ie6-compressed.css";
}
}
var url=$.dr.FRAMEWORK_PATH+"css/"+_96;
DR.Utils.attachCssStyleSheet(url);
};
DR.Utils.replaceHtml=function(el,_99){
var div=typeof el==="string"?document.getElementById(el):el;
return jQuery(div).html(_99);
};
DR.Utils.DragObject=function(_9b){
if(typeof _9b=="object"){
this.type="Absolute";
this.dragObj=_9b;
this.parentObj=null;
this.moveCallback=null;
this.stopCallback=null;
this.isDragging=false;
this.isInitialized=false;
this.cursorX=0;
this.cursorY=0;
this.dragObjLeft=0;
this.dragObjTop=0;
this.mouseXOffest=14;
this.mouseYOffest=19;
this.moveDragFunc=null;
this.stopDragFunc=null;
this.snapToMouse=false;
}else{
return null;
}
};
DR.Utils.DragObject.prototype={setType:function(_9c,_9d){
if(typeof _9c=="string"){
this.type=_9c;
}
if(typeof _9d=="object"){
this.parentObj=_9d;
}
},setSnapToMouse:function(_9e){
this.snapToMouse=Boolean(_9e);
},setMoveDragCallback:function(_9f){
this.moveCallback=Boolean(_9f);
},setStopDragCallback:function(_a0){
this.stopCallback=Boolean(_a0);
},initDrag:function(_a1){
this.isDragging=false;
this.isInitialized=true;
var x,y;
if(window.event){
x=window.event.clientX+document.documentElement.scrollLeft+document.body.scrollLeft;
y=window.event.clientY+document.documentElement.scrollTop+document.body.scrollTop;
}else{
x=_a1.clientX+window.scrollX;
y=_a1.clientY+window.scrollY;
}
this.cursorX=x;
this.cursorY=y;
if(this.type=="Absolute"){
this.dragObjLeft=parseInt(this.dragObj.style.left,10);
this.dragObjTop=parseInt(this.dragObj.style.top,10);
}else{
if(this.type=="PanelSet"){
if(this.parentObj.container!==null){
this.dragObjLeft=x-parseInt(this.parentObj.container.offsetLeft,10)-parseInt(this.parentObj.staticHandle.style.left,10);
this.dragObjTop=y-parseInt(this.parentObj.container.offsetTop,10);
}
}
}
if(isNaN(this.dragObjLeft)){
this.dragObjLeft=0;
}
if(isNaN(this.dragObjTop)){
this.dragObjTop=0;
}
var _a3=this;
if(this.moveDragFunc===null){
this.moveDragFunc=function(_a4){
_a3.moveDrag(_a4);
};
this.stopDragFunc=function(_a5){
_a3.stopDrag(_a5);
};
}
this.attachEvents();
if(!this.snapToMouse){
this.cancelEventPropagation(_a1);
}
},moveDrag:function(_a6){
if(this.isInitialized){
var x,y;
if(!this.isDragging){
this.isDragging=true;
if(this.moveCallback){
if(typeof this.parentObj.moveDrag=="function"){
this.parentObj.moveDrag();
}
}
}
if(window.event){
x=window.event.clientX+document.documentElement.scrollLeft+document.body.scrollLeft;
y=window.event.clientY+document.documentElement.scrollTop+document.body.scrollTop;
}else{
x=_a6.clientX+window.scrollX;
y=_a6.clientY+window.scrollY;
}
if(this.type=="Absolute"){
if(this.snapToMouse){
this.dragObj.style.left=(x+this.mouseXOffest)+"px";
this.dragObj.style.top=(y+this.mouseYOffest)+"px";
}else{
this.dragObj.style.left=(this.dragObjLeft+x-this.cursorX)+"px";
this.dragObj.style.top=(this.dragObjTop+y-this.cursorY)+"px";
}
}else{
if(this.type=="PanelSet"){
if(this.parentObj.layout=="TwoColumn"){
var _a8=Math.max(x-parseInt(this.parentObj.container.offsetLeft,10)-this.dragObjLeft,this.parentObj.column1MinWidth);
var _a9=Math.min(_a8,this.parentObj.panelWidth-this.parentObj.column2MinWidth-this.parentObj.leftPadding);
this.dragObj.style.left=_a9+"px";
}else{
if(this.parentObj.layout=="TwoRow"){
this.dragObj.style.top=(this.dragObjTop+y-parseInt(this.parentObj.container.offsetTop,10))+"px";
}
}
}
}
this.cancelEventPropagation(_a6);
}
},stopDrag:function(){
this.detachEvents();
if(this.stopCallback){
if(typeof this.parentObj.stopDrag=="function"){
this.parentObj.stopDrag();
}
}
},attachEvents:function(){
if(document.attachEvent){
document.attachEvent("onmousemove",this.moveDragFunc);
if(!this.snapToMouse){
document.attachEvent("onmouseup",this.stopDragFunc);
}
}else{
document.addEventListener("mousemove",this.moveDragFunc,true);
if(!this.snapToMouse){
document.addEventListener("mouseup",this.stopDragFunc,true);
}
}
},detachEvents:function(){
if(document.detachEvent){
document.detachEvent("onmousemove",this.moveDragFunc);
if(!this.snapToMouse){
document.detachEvent("onmouseup",this.stopDragFunc);
}
}else{
document.removeEventListener("mousemove",this.moveDragFunc,true);
if(!this.snapToMouse){
document.removeEventListener("mouseup",this.stopDragFunc,true);
}
}
},cancelEventPropagation:function(_aa){
if(window.event){
window.event.cancelBubble=true;
window.event.returnValue=false;
}else{
_aa.preventDefault();
}
}};
DR.Utils.customOnload=function(){
};
DR.Utils.addEvent=function(obj,evt,fn,_ae){
if(obj.addEventListener){
obj.addEventListener(evt,fn,Boolean(_ae));
return true;
}else{
if(obj.attachEvent){
var r=obj.attachEvent("on"+evt,fn);
return r;
}else{
return false;
}
}
};
DR.Utils.removeEvent=function(obj,evt,fn,_b3){
if(obj.removeEventListener){
obj.removeEventListener(evt,fn,Boolean(_b3));
return true;
}else{
if(obj.detachEvent){
var r=obj.detachEvent("on"+evt,fn);
return r;
}else{
return false;
}
}
};
DR.Utils.voidClick=function(){
if(DR.Utils.BrowserDetect.browser=="Explorer"&&DR.Utils.BrowserDetect.version<7){
return true;
}else{
return false;
}
};
DR.Utils.suppressKeypress=function(evt){
if(window.event){
window.event.cancelBubble=true;
return false;
}
if(evt&&evt.preventDefault){
evt.preventDefault();
}
};
DR.Utils.stopMouseClick=function(evt){
if(window.event){
event.cancelBubble=true;
return false;
}else{
if(evt&&evt.preventDefault){
evt.preventDefault();
evt.stopPropagation();
}
}
};
DR.Utils.FormUtils={getForm:function(frm){
return document.forms[frm];
},setAction:function(_b8,url){
if(_b8){
var _ba=(typeof _b8=="object")?_b8:document.forms[_b8];
_ba.setAttribute("action",url);
}
},submit:function(_bb){
if(_bb){
var _bc=(typeof _bb=="object")?_bb:document.forms[_bb];
_bc.submit();
}
},getField:function(_bd,frm){
var _bf=(typeof frm=="object")?frm:document.forms[frm];
return _bf.elements[_bd];
},getValue:function(fld,frm){
var _c2=null;
if(frm!==undefined&&typeof fld!="object"){
_c2=(typeof frm=="object")?frm:document.forms[frm];
}
if(!_c2){
return null;
}
var _c3=(typeof fld=="object")?fld:_c2.elements[fld];
if(!_c3){
return null;
}
var _c4=(!_c3.type&&!!_c3[0])?_c3[0].type:_c3.type;
if(!_c4){
return null;
}
var _c5=(_c4.substring(0,6)=="select")?"select":_c4;
var _c6=[];
var _c7=false;
if(typeof _c3.type=="undefined"){
_c7=true;
}
if(_c5=="select"){
if(_c7){
for(var i=0;i<_c3.length;i++){
_c6.push(DR.Utils.FormUtils.getSelectOptionValue(_c3[i]));
}
}else{
if(_c3.multiple){
for(var j=0;j<_c3.options.length;j++){
if(_c3.options[j].selected){
_c6.push(DR.Utils.FormUtils.getSelectOptionValue(_c3.options[j]));
}
}
}else{
try{
_c6.push(DR.Utils.FormUtils.getSelectOptionValue(_c3.options[_c3.selectedIndex]));
}
catch(err){
}
}
}
}else{
if((_c5=="checkbox")||(_c5=="radio")){
if(_c7){
for(var k=0;k<_c3.length;k++){
if(_c3[k].checked){
_c6.push(_c3[k].value);
}
}
}else{
if(_c3.checked){
_c6.push(_c3.value);
}
}
}else{
if(_c7){
for(var m=0;m<_c3.length;m++){
_c6.push(_c3[m].value);
}
}else{
_c6.push(_c3.value);
}
}
}
return _c6.join(",");
},getSelectOptionValue:function(o){
if(o){
var val="";
if(o.text!==""&&o.outerHTML&&o.outerHTML.toLowerCase().indexOf("value=")==-1){
val=o.text;
}else{
val=o.value;
}
return val;
}
},getMultiSelectTextValue:function(_ce){
if(_ce){
var a=[];
for(var i=0;i<_ce.options.length;i++){
if(_ce.options[i].selected){
a.push(_ce.options[i].text);
}
}
return a.join(", ");
}
},setSelectOptionValue:function(o,val){
var _d3=(o.value==val||o.text==val);
o.selected=_d3;
return _d3;
},checkAllowFocus:function(_d4){
var _d5=DR.Utils.getStyle(_d4,"display");
var _d6=DR.Utils.getStyle(_d4,"visibility");
if(_d6=="hidden"||_d5=="none"||_d4.disabled||_d4.readonly){
return false;
}else{
var p=_d4.parentNode;
var _d8=false;
while(p){
_d5=DR.Utils.getStyle(p,"display");
_d6=DR.Utils.getStyle(p,"visibility");
if(p.tagName=="BODY"||p.tagName=="HTML"){
break;
}
if((_d5=="none")||(_d6=="hidden")){
_d8=true;
break;
}
p=p.parentNode;
}
if(!_d8){
return true;
}else{
return false;
}
}
},setValue:function(fld,frm,_db){
var _dc=(typeof frm=="object")?frm:document.forms[frm];
var _dd=(typeof fld=="object")?fld:_dc.elements[fld];
var i=0;
if(_dd){
var _df=(_dd.type)?_dd.type:_dd[0].type;
switch(_df){
case "text":
case "textarea":
case "password":
_dd.value=_db;
break;
case "checkbox":
_dd.checked=(_db)?true:false;
break;
case "radio":
for(i=0;i<_dd.length;i++){
if(_dd[i].value==_db){
_dd[i].checked=true;
break;
}
}
break;
case "select-one":
case "select-multiple":
if(typeof _db=="object"){
for(var j=0;j<_db.length;j++){
for(i=0;i<_dd.options.length;i++){
if(_dd.options[i].value==_db[j]){
_dd.options[i].selected=true;
}
}
}
}else{
for(i=0;i<_dd.options.length;i++){
if(_dd.options[i].value==_db||_dd.options[i].text==_db){
_dd.options[i].selected=true;
break;
}
}
}
break;
default:
break;
}
}
},getDisabled:function(_e1,_e2){
},setDisabled:function(_e3,_e4,_e5,_e6){
},getReadonly:function(_e7,_e8){
},setReadonly:function(_e9,_ea,_eb,_ec){
},setOperationAndSubmit:function(_ed,_ee){
var _ef=_ed.id||_ed.name;
var _f0=_ed.form.operation;
if(typeof _f0=="object"){
_f0.value=_ef;
}
DR.Utils.FormUtils.submit(_ed.form);
if(_ee){
_ee.returnValue=false;
_ee.cancelBubble=true;
}
return false;
},submitActionForm:function(obj,evt){
var _f3=obj.id||obj.name;
var _f4=obj.form.action;
if(typeof _f4=="object"){
_f4.value=_f3;
}
if(obj.className.indexOf("cancel")>-1){
if(typeof obj.form.enableValidation=="function"){
obj.form.enableValidation(false);
}
}
obj.form.submit();
if(evt){
evt.returnValue=false;
evt.cancelBubble=true;
}
return false;
},getUTF8Bytes:function(val){
var _f6=val.length;
var _f7=encodeURI(val);
var _f8;
var _f9;
if(_f7.indexOf("%")!=-1){
_f8=_f7.split("%");
_f9=_f8.length-1;
if(_f9===0){
_f9++;
}
var tmp=_f7.length-(_f9*3);
_f9=_f9+tmp;
}else{
_f9=_f6;
}
if(DR.Utils.BrowserDetect.browser!="Explorer"){
var _fb=val.replace(/\n/g,"..").length;
var _fc=_fb-_f6;
_f9=_f9+_fc;
}
return {bytes:_f7,byteCount:_f9};
}};
(function($){
var _fe="yyyy-mm-dd",DATE_FORMAT_PATTERN,PARSED_DATE_SEGMENTS,DAY_POS,MONTH_POS,YEAR_POS,REG_EX_PAT;
var _ff=function(_100,_101){
for(var i=0;i<_101.length;i++){
if(_101[i].indexOf(_100)!=-1){
return i;
}
}
return -1;
};
var _103=function(fmt){
var _105=/(([y]{2,4}|[m]{1,2}|[d]{1,2})|([-\/ .]+?))/gi;
return fmt.toLowerCase().match(_105);
};
var _106=function(_107){
var _108="^";
for(var i=0;i<_107.length;i++){
if(/[mdy]/i.test(_107[i])){
if(typeof _107[i]!="undefined"){
var _10a=_107[i].length;
var _10b=_10a;
if(_10a==1){
_10b=2;
}
_108+="(\\d{"+_10a+","+_10b+"})";
}
}else{
_108+="([\\"+_107[i]+"]{1})";
}
}
return (_108+"$");
};
var _10c=function(_10d){
var _10e=(_10d)?_103(_10d):PARSED_DATE_SEGMENTS;
var _10f=(_10d)?_ff("d",_10e):DAY_POS;
var _110=(_10d)?_ff("m",_10e):MONTH_POS;
var _111=(_10d)?_ff("y",_10e):YEAR_POS;
var _112=(_10d)?_106(_10e):REG_EX_PAT;
var _113={format:_10d,yearPos:_111,monthPos:_110,datePos:_10f,regExPat:_112,segments:_10e};
return _113;
};
var _114=function(_115,_116){
var _117=_10c(_116);
var _118=new RegExp(_117.regExPat).exec(_115);
var _119={};
var _11a=false;
var date,month,year;
if(_118){
_118=_118.slice(1);
date=_118[_117.datePos];
month=Number(_118[_117.monthPos])-1;
year=_118[_117.yearPos];
_119=new Date(((year.length==2)?((year<70)?Number("20"+year):Number("19"+year)):year),month,date);
var _11c=_119.getDate();
var _11d=_119.getMonth();
var _11e=(year.length==2)?String(_119.getFullYear()).slice(2):_119.getFullYear();
if(_11c==date&&_11d==month&&_11e==year){
_11a=true;
}
}
return (_11a)?_119:null;
};
$.dr.date=function(_11f,fmt){
var _121=(fmt==null||fmt==""||fmt=="undefined")?DATE_FORMAT_PATTERN:fmt;
var date=null;
if(_11f instanceof Date){
if(_11f.isValid()){
date=_11f;
}
}else{
date=_114(_11f,_121);
}
if(date==null){
return (new Date("invalid date"));
}else{
date.format=_121;
return date;
}
};
$.dr.date.prototype=new Date();
Date.prototype.isValid=function(){
var _123=this;
return !(_123===null||_123===undefined||(typeof _123=="object"&&_123=="Invalid Date")||(typeof _123=="object"&&_123=="NaN"));
};
Date.prototype.getFormat=function(){
return this.format;
};
Date.prototype.toFormattedString=function(_124){
var year=this.getFullYear();
var day=this.getDate();
var _127=this.getMonth()+1;
var _128=(_124)?_124:((this.format)?this.format:_fe);
var _129=_10c(_128).segments;
var _12a="";
for(var i=0;i<_129.length;i++){
var s=_129[i];
var d=s;
switch(s.toLowerCase().charAt(0)){
case "m":
if(s.length==2){
_127=(_127<10)?"0"+_127:_127;
}
d=_127;
break;
case "d":
if(s.length==2){
day=(day<10)?"0"+day:day;
}
d=day;
break;
case "y":
if(s.length==2){
year=(year+"").substring(2);
}
d=year;
break;
}
_12a+=d;
}
return _12a;
};
$.dr.date.setDefaultFormat=function(fmt){
DATE_FORMAT_PATTERN=fmt;
PARSED_DATE_SEGMENTS=_103(fmt);
MONTH_POS=_ff("m",PARSED_DATE_SEGMENTS);
YEAR_POS=_ff("y",PARSED_DATE_SEGMENTS);
Day_POS=_ff("d",PARSED_DATE_SEGMENTS);
REG_EX_PAT=_106(PARSED_DATE_SEGMENTS);
};
$.dr.date.setDefaultFormat(_fe);
$.dr.date.getDefaultFormat=function(){
return DATE_FORMAT_PATTERN;
};
$.dr.date.getDateFromTime=function(time){
var arr=time.split(":");
var hh=Number(arr[0]);
var arr2=arr[1].split(" ");
var mm=arr2[0];
if(arr2.length==2){
var ampm=arr2[1].toLowerCase();
if(ampm=="pm"&&hh!=12){
hh=hh+12;
}else{
if(hh==12&&ampm=="am"){
hh=hh-12;
}
}
}
var date=new Date();
var r=new Date(date.getFullYear(),date.getMonth(),date.getDate(),hh,mm).getTime();
return r;
};
$.dr.date.getISODate=function(year,_138,day){
if(year.length==2){
year=parseInt(year,10);
year=(year<70)?Number("20"+year):Number("19"+year);
}
day=(day<10)?"0"+day:day;
_138=(_138<10)?"0"+_138:_138;
return new $.dr.date(year+"-"+_138+"-"+day,"yyyy-mm-dd");
};
$.dr.date.isLeapYear=function(year){
year=parseInt(year,10);
if(((year%4===0)&&(year%100!==0))||(year%400===0)){
return true;
}else{
return false;
}
};
var _13b=function(){
if(typeof $.dr.form.addDataTypeValidator=="function"){
$.dr.form.addDataTypeValidator({date:["The value for {LABEL} is not a valid date format. Valid format is {FORMAT}.","",function(val,_13d){
if(val===null||val===undefined){
return false;
}
var date=new $.dr.date(val,_13d);
return date.isValid();
}],time12hr:["The value for {LABEL} is not a valid time. Valid format is {EXAMPLE}.","hh:mm",function(val){
var re=new RegExp("^([1-9]|[0][1-9]|[1][0,1,2])(:([0-5][0-9])){1,2}?( ([aApP][mM])?)?$");
return re.test(val);
}],time24hr:["The value for {LABEL} is not a valid time. Valid format is {EXAMPLE}.","HH:MM",function(val){
return /^(24:00)|(([0-1][0-9]|2[0-3])[:]([0-5][0-9]))$/.test(val);
}],year:["The value for {LABEL} is not a valid year. Valid format is {EXAMPLE}.","yyyy",function(val,_143){
if(val===null||val===undefined){
return false;
}
if(!_143){
_143="yyyy";
}
if(_143.toLowerCase()=="yy"&&val.length==2&&!isNaN(val)){
return true;
}else{
if(_143.toLowerCase()=="yyyy"&&val.length==4&&!isNaN(val)){
return true;
}
}
return false;
}]});
}
};
$(document).bind("beforeInitForms",_13b);
})(jQuery);
DR.Utils.PageSizer=function(){
this.pageWidth=0;
this.pageHeight=0;
this.windowWidth=0;
this.windowHeight=0;
};
DR.Utils.PageSizer.prototype={initModalScroller:function(){
this.attachModalOnresize();
this.refreshModalScroller();
},attachModalOnresize:function(){
var self=this;
var _145=window.onresize;
var _146=function(){
self.refreshModalScroller();
};
window.onresize=function(){
_146();
if(typeof (_145)=="function"){
_145();
}
};
function cleanupEvents(){
window.detachEvent("onresize",_146);
}
if(DR.Utils.BrowserDetect.browser=="Explorer"){
if(window.attachEvent){
window.attachEvent("onunload",cleanupEvents);
}
}
},refresh:function(){
var _147,yScroll,pageHeight,pageWidth;
var obj={};
if(window.innerHeight&&window.scrollMaxY){
_147=document.body.scrollWidth;
yScroll=window.innerHeight+window.scrollMaxY;
}else{
if(document.body.scrollHeight>document.body.offsetHeight){
_147=document.body.scrollWidth;
yScroll=document.body.scrollHeight;
}else{
_147=document.body.offsetWidth;
yScroll=document.body.offsetHeight;
}
}
var _149,windowHeight;
if(self.innerHeight){
_149=self.innerWidth;
windowHeight=self.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
_149=document.documentElement.clientWidth;
windowHeight=document.documentElement.clientHeight;
}else{
if(document.body){
_149=document.body.clientWidth;
windowHeight=document.body.clientHeight;
}
}
}
if(yScroll<windowHeight){
pageHeight=windowHeight;
}else{
pageHeight=yScroll;
}
if(_147<_149){
pageWidth=_149;
}else{
pageWidth=_147;
}
if(this.doc===undefined){
this.doc={};
}
this.pageWidth=pageWidth;
this.pageHeight=pageHeight;
this.windowWidth=_149;
this.windowHeight=windowHeight;
},refreshModalScroller:function(){
var d=$(".modalScroller");
if(d.length==0){
d=$("#modalScroller");
}
if(d.length>0){
d=d[0];
this.refresh();
var _14b=this.windowHeight;
var _14c=this.windowWidth;
var _14d=d.offsetTop;
var _14e=$(".pageButtons");
var _14f=(_14e.length>0)?_14e[0].offsetHeight:0;
_14f=_14f+32;
var _150=_14b;
if(_14c<790){
}
var _151=_150-d.offsetTop-_14f;
if(_151>0){
d.style.height=_151+"px";
}
}
}};
(function($){
var _153={url:"",width:740,height:500,target:"",centered:true,type:"normal"};
$.dr.popup=function(_154){
_154=$.extend({},_153,_154);
if(_154.url==""||_154.url==null){
$.dr.utils.logError("Must supply a url");
return;
}
var s="";
switch(_154.type){
case "console":
s="resizable,scrollbars,height="+_154.height+",width="+_154.width;
break;
case "fixed":
s="status,scrollbars,height="+_154.height+",width="+_154.width;
break;
case "normal":
s="toolbar,scrollbars,resizable,location,height="+_154.height+",width="+_154.width;
break;
case "full":
s="toolbar,menubar,scrollbars,resizable,location,height="+_154.height+",width="+_154.width;
break;
default:
if(_154.type){
s=_154.type;
}
break;
}
if(_154.centered){
if(window.screen){
var l=(screen.width-parseInt(_154.width,10))/2;
var t=(screen.height-parseInt(_154.height))/2;
s+=",left="+l+",top="+t;
}
}
tg=_154.target;
return window.open(_154.url,tg,s);
};
})(jQuery);
DR.Utils.Position=function(_158){
this.obj=(typeof _158=="object")?_158:document.getElementById(_158);
this.x=this.getX();
this.y=this.getY();
this.width=this.getWidth();
this.height=this.getHeight();
this.top=this.getTop();
this.right=this.getRight();
this.left=this.getLeft();
this.bottom=this.getBottom();
};
DR.Utils.Position.ON_TOP=0;
DR.Utils.Position.ON_MIDDLE=1;
DR.Utils.Position.ON_BOTTOM=2;
DR.Utils.Position.ON_LEFT=4;
DR.Utils.Position.ON_CENTER=8;
DR.Utils.Position.ON_RIGHT=16;
DR.Utils.Position.DRAW_LEFT=32;
DR.Utils.Position.DRAW_CENTERED=64;
DR.Utils.Position.DRAW_RIGHT=128;
DR.Utils.Position.DRAW_UP=256;
DR.Utils.Position.DRAW_DOWN=1024;
DR.Utils.Position.prototype={setPosition:function(top,left){
this.obj.style.top=top;
this.obj.style.left=left;
},setRelativePosition:function(_15b,_15c,_15d,_15e,_15f,_160,_161,_162){
this.setRelativeXPosition(_15b,_15c,_15d,_160,_162);
this.setRelativeYPosition(_15b,_15e,_15f,_161,_162);
},setRelativeXPosition:function(_163,_164,_165,_166,_167){
var _168=new DR.Utils.Position(_163);
var _169=_168.left;
var _16a=DR.Utils.BrowserDetect.getAvailableContentWidth();
if(_164==DR.Utils.Position.ON_CENTER){
_169=_168.left+(Math.floor(_168.width/2));
}else{
if(_164==DR.Utils.Position.ON_RIGHT){
_169=_168.right;
}
}
if(_165==DR.Utils.Position.DRAW_LEFT){
if(_167||(_169-this.width-_166)>=0){
_169=_169-this.width-_166;
}else{
if((_169+this.width+_166)<_16a){
_169=_169+this.width+_166;
}else{
_169=0;
}
}
}else{
if(_165==DR.Utils.Position.DRAW_RIGHT){
if(_167||(_169+this.width+_166)<_16a){
_169=_169+_166;
}else{
if((_169-this.width-_166)>0){
_169=_169-this.width+_168.width;
}else{
_169=_16a;
}
}
}else{
if(_165==DR.Utils.Position.DRAW_CENTERED){
if(_167||(_169-Math.floor((this.width-_166)/2))>0){
_169=_169-Math.floor((this.width-_166)/2);
}else{
_169=0;
}
}
}
}
this.setX(_169);
},setRelativeYPosition:function(_16b,_16c,_16d,_16e,_16f){
var _170=new DR.Utils.Position(_16b);
var _171=_170.top;
var _172=DR.Utils.BrowserDetect.getAvailableContentHeight();
if(_16c==DR.Utils.Position.ON_MIDDLE){
_171=_170.top+(Math.floor(_170.height/2));
}else{
if(_16c==DR.Utils.Position.ON_BOTTOM){
_171=_170.bottom;
}
}
if(_16d==DR.Utils.Position.DRAW_UP){
if(_16f||(_171-this.height-_16e)>0){
_171=_171-this.height-_16e;
}else{
if((_171+_170.height+this.height+_16e)<_172){
_171=_171+_170.height+_16e;
}else{
_171=0;
}
}
}else{
if(_16d==DR.Utils.Position.DRAW_DOWN){
var _173=_171+this.height+_16e;
if(_16f||(_173)<_172){
_171=_171+_170.height+_16e;
}else{
if((_171-this.height-_16e)>0){
_171=_171-this.height-_16e;
}else{
_171=_172;
}
}
}else{
if(_16d==DR.Utils.Position.DRAW_CENTERED){
if(_16f||(_171-Math.floor((this.height-_16e)/2))>0){
_171=_171-Math.floor((this.height-_16e)/2);
}else{
_171=0;
}
}
}
}
this.setY(_171);
},setX:function(left){
this.obj.style.left=left+"px";
},setY:function(top){
this.obj.style.top=top+"px";
},getX:function(){
var curX=0;
var _177=this.obj;
if(_177.offsetParent){
while(_177.offsetParent){
curX+=_177.offsetLeft;
if(_177.clientLeft&&(_177.tagName=="TD")||(_177.tagName=="TH")){
curX+=_177.clientLeft;
}
_177=_177.offsetParent;
}
}
if(document.compatMode=="CSS1Compat"&&!window.getComputedStyle){
curX+=(isNaN(parseInt(document.body.currentStyle.marginLeft,10)))?0:parseInt(document.body.currentStyle.marginLeft,10);
}
return curX;
},getY:function(){
var curY=0;
var _179=this.obj;
if(_179.offsetParent){
while(_179.offsetParent){
curY+=_179.offsetTop;
if(_179.clientTop&&(_179.tagName=="TD")||(_179.tagName=="TH")){
curY+=_179.clientTop;
}
_179=_179.offsetParent;
}
}
if(document.compatMode=="CSS1Compat"&&!window.getComputedStyle){
curY+=(isNaN(parseInt(document.body.currentStyle.marginTop,10)))?0:parseInt(document.body.currentStyle.marginTop,10);
}
return curY;
},getWidth:function(){
return this.obj.offsetWidth;
},getHeight:function(){
return this.obj.offsetHeight;
},getTop:function(){
return this.y;
},getRight:function(){
return this.x+this.width;
},getBottom:function(){
return this.y+this.height;
},getLeft:function(){
return this.x;
}};
DR.Utils.Position.snapTo=function(_17a,_17b,_17c,_17d,_17e,_17f,_180,_181,_182){
sourceObj=(typeof _17a=="object")?_17a:document.getElementById(_17a);
targetObj=(typeof _17b=="object")?_17b:document.getElementById(_17b);
_17c=(_17c!==undefined)?_17c:0;
_17d=(_17d!==undefined)?_17d:0;
_17e=(_17e!==undefined)?_17e:"Right";
_17f=(_17f!==undefined)?_17f:"Top";
_180=(_180!==undefined)?_180:"Right";
_181=(_181!==undefined)?_181:"Down";
_182=(_182==false)?false:true;
var _183=sourceY=0,_width,_height;
var obj=sourceObj;
while(obj.offsetParent){
_183+=obj.offsetLeft;
if(obj.scrollLeft){
_183-=obj.scrollLeft;
}
sourceY+=obj.offsetTop;
if(obj.scrollTop){
sourceY-=obj.scrollTop;
}
obj=obj.offsetParent;
}
obj=sourceObj;
while(obj.offsetParent){
if(obj.scrollLeft){
_183-=obj.scrollLeft;
}
if(obj.scrollTop){
sourceY-=obj.scrollTop;
}
if(DR.Utils.BrowserDetect.browser=="Explorer"){
if((obj.tagName=="TD")||(obj.tagName=="TH")){
if(obj.clientTop){
sourceY+=obj.clientTop;
}
if(obj.clientLeft){
_183+=obj.clientLeft;
}
}
if(DR.Utils.hasCSSClass(obj,"searchBody")){
_183-=11;
}
}
obj=obj.parentNode;
}
sourceWidth=sourceObj.offsetWidth;
sourceHeight=sourceObj.offsetHeight;
targetX=_183;
targetY=sourceY;
if(_17e=="Right"){
targetX=_183+sourceWidth;
}
if(_17f=="Bottom"){
targetY=sourceY+sourceHeight;
}
if(_182){
var _185,scrollY;
if(window.scrollX){
_185=window.scrollX;
scrollY=window.scrollY;
}else{
_185=document.documentElement.scrollLeft+document.body.scrollLeft;
scrollY=document.documentElement.scrollTop+document.body.scrollTop;
}
targetWidth=targetObj.offsetWidth;
targetHeight=targetObj.offsetHeight;
var _186=DR.Utils.BrowserDetect.getAvailableContentWidth();
var _187=DR.Utils.BrowserDetect.getAvailableContentHeight();
var _188=_183+targetWidth+_17c;
var _189=_183-targetWidth-_17c;
var _18a=false;
var _18b=false;
if(_188<=(_186+_185-sourceWidth)){
_18a=true;
}
if(_189>_185){
_18b=true;
}
if((_180=="Right"&&_18a)||(_180=="Left"&&!_18b&&_18a)){
targetX+=_17c;
}else{
if(_18b){
targetX=_183-targetWidth-_17c;
}
}
var _18c=sourceY+targetHeight+_17d;
var _18d=sourceY-targetHeight-_17d;
var _18e=false;
var _18f=false;
if(_18c<=(_187+scrollY-sourceHeight)){
_18e=true;
}
if(_18d>scrollY){
_18f=true;
}
if((_181=="Down"&&_18e)||(_181=="Up"&&!_18f&&_18e)){
targetY+=_17d;
}else{
if(_18f){
targetY=sourceY-targetHeight-_17d;
}
}
}else{
targetX+=_17c;
targetY+=_17d;
}
targetObj.style.left=targetX+"px";
targetObj.style.top=targetY+"px";
};
DR.Utils.Querystring=function(qs){
this.params={};
if(qs===null){
qs=location.search.substring(1,location.search.length);
}else{
qs=(qs.indexOf("?")!=-1)?qs.substring(1,qs.length):qs;
}
if(qs.length===0){
return;
}
qs=qs.replace(/\+/g," ");
var args=qs.split("&");
var val;
for(var i=0;i<args.length;i++){
var _194;
alert(args[i]);
var pair=args[i].split("=");
var _196=unescape(pair[0]);
if(pair.length==2){
val=unescape(pair[1]);
}else{
val=_196;
}
this.params[_196]=val;
}
};
DR.Utils.Querystring.prototype.get=function(_197){
var val=this.params[_197];
return val;
};
String.prototype.stripSpaces=function(){
return this.replace(/ /g,"");
};
String.prototype.stripWhitepace=function(){
return this.replace(/\s/g,"");
};
String.prototype.squeezeWhitespace=function(_199){
return this.replace(/\s+/g,(arguments.length===1)?_199:" ");
};
String.prototype.stripLineBreaksAndTabs=function(){
return this.replace(/\n|\t/g,"");
};
String.prototype.trim=function(){
return this.replace(/^\s+|\s+$/g,"");
};
String.prototype.ltrim=function(){
return this.replace(/^\s+/,"");
};
String.prototype.rtrim=function(){
return this.replace(/\s+$/,"");
};
String.prototype.replaceTokens=function(){
var args=arguments;
return this.replace(/\{(\d+)\}/g,function(_19b,_19c){
return (_19c<args.length)?args[_19c]:_19b;
});
};
String.prototype.replaceBreaks=function(){
return this.replaceTokens("<br/><br/>");
};
String.prototype.trimLastLetter=function(){
var _19d=this.length;
var _19e=encodeURI(this.substr(_19d-1,_19d));
var _19f=1;
if(DR.Utils.BrowserDetect.browser=="Explorer"&&_19e=="%0A"){
_19f=2;
}
return this.substr(0,_19d-_19f);
};
String.prototype.stripDoubleQuotes=function(){
return this.replace(/"/g,"");
};
String.prototype.isBlank=function(){
return /^\s*$/.test(this);
};
String.prototype.makeUT8CharsFitLength=function(_1a0,_1a1){
if(_1a0===0||_1a0==_1a1){
return this;
}
var _1a2=false;
var _1a3=this.length;
var _1a4=_1a3/_1a0;
var _1a5=Math.round(_1a1*_1a4,0);
var _1a6;
var _1a7="";
var _1a8=false;
var _1a9=_1a5;
var i=0;
while(!_1a2&&i<100){
var _1ab=this.substr(0,_1a9);
var _1ac=DR.Utils.FormUtils.getUTF8Bytes(_1ab).byteCount;
if(_1ac==_1a1){
_1a2=true;
_1a6=_1ab;
}else{
if(_1ac<_1a1&&_1a8){
_1a2=true;
_1a6=_1ab;
}else{
if(_1ac<_1a1){
if(_1a7=="negative"){
_1a8=true;
}
_1a9++;
_1a7="positive";
}else{
if(_1ac>_1a1){
if(_1a7=="positive"){
_1a8=true;
}
_1a9--;
_1a7="negative";
}
}
}
}
}
return _1a6;
};
DR.Utils.Toggle=function(){
};
DR.Utils.Toggle.disabledFromCheckbox=function(_1ad,_1ae){
var _1af=(typeof _1ad=="object")?_1ad:document.getElementById(_1ad);
if(typeof _1ae=="string"){
_1ae=_1ae.stripSpaces().split(",");
for(var i=0;i<_1ae.length;i++){
DR.Utils.Toggle.setDisabled(_1ae[i],!DR.Utils.Toggle.isChecked(_1ad));
}
}
};
DR.Utils.Toggle.disabledFromRadioButton=function(_1b1,_1b2){
var _1b3=(typeof _1b1=="object")?_1b1:document.getElementById(_1b1);
var _1b4=(_1b3.value=="true"||_1b3.value==true)?false:true;
if(typeof _1b2=="string"){
_1b2=_1b2.stripSpaces().split(",");
for(var i=0;i<_1b2.length;i++){
DR.Utils.Toggle.setDisabled(_1b2[i],_1b4);
}
}
};
DR.Utils.Toggle.isChecked=function(_1b6){
var _1b7=(typeof _1b6=="object")?_1b6:document.getElementById(_1b6);
if(_1b7){
return (_1b7.checked)?true:false;
}else{
return false;
}
};
DR.Utils.Toggle.setDisabled=function(_1b8,_1b9){
var _1ba=(typeof _1b8=="object")?_1b8:document.getElementById(_1b8);
if(_1ba){
_1ba.disabled=(_1b9=="true"||_1b9==true)?true:false;
}
};
DR.Utils.Toggle.setVisibility=function(_1bb,_1bc){
var _1bd=(typeof _1bb=="object")?_1bb:document.getElementById(_1bb);
if(_1bd){
if(_1bc){
$(_1bd).fadeIn();
}else{
$(_1bd).hide();
}
}
};
DR.Utils.Toggle.enableTab=function(_1be){
var _1bf=(typeof _1be=="object")?_1be:document.getElementById(_1be);
_1bf=_1bf.parentNode;
var tabs=(_1bf.parentNode.parentNode).getElementsByTagName("LI");
for(var i=0;i<tabs.length;i++){
DR.Utils.removeCSSClass(tabs[i],"selected");
DR.Utils.Toggle.setVisibility("tabContent_"+tabs[i].id,false);
}
DR.Utils.addCSSClass(_1bf,"selected");
DR.Utils.Toggle.setVisibility("tabContent_"+_1bf.id,true);
};
DR.Utils.Toggle.visibilityFromLink=function(_1c2,_1c3,_1c4){
var _1c5=(typeof _1c2=="object")?_1c2:document.getElementById(_1c2);
var _1c6=(_1c5.className=="collapsedImage")?true:false;
var _1c7=(_1c5.className=="collapsedImage")?"expandedImage":"collapsedImage";
if(typeof _1c3=="string"){
_1c3=_1c3.stripSpaces().split(",");
for(var i=0;i<_1c3.length;i++){
DR.Utils.Toggle.setVisibility(_1c3[i],_1c6);
}
}
if(typeof _1c4=="string"){
_1c4=_1c4.stripSpaces().split(",");
for(var j=0;j<_1c4.length;j++){
DR.Utils.Toggle.setVisibility(_1c4[j],!_1c6);
}
}
DR.Utils.replaceCSSClass(_1c5,_1c5.className,_1c7);
};
DR.Utils.Toggle.visibilityFromCheckbox=function(_1ca,_1cb,_1cc){
var _1cd=(typeof _1ca=="object")?_1ca:document.getElementById(_1ca);
var _1ce=(_1cd.checked)?true:false;
if(typeof _1cb=="string"){
_1cb=_1cb.stripSpaces().split(",");
for(var i=0;i<_1cb.length;i++){
DR.Utils.Toggle.setVisibility(_1cb[i],_1ce);
}
}
if(typeof _1cc=="string"){
_1cc=_1cc.stripSpaces().split(",");
for(var j=0;j<_1cc.length;j++){
DR.Utils.Toggle.setVisibility(_1cc[j],!_1ce);
}
}
};
DR.Utils.Toggle.visibilityFromRadioButton=function(_1d1,_1d2,_1d3){
var _1d4=(typeof _1d1=="object")?_1d1:document.getElementById(_1d1);
if(typeof _1d2=="string"){
_1d2=_1d2.stripSpaces().split(",");
for(var i=0;i<_1d2.length;i++){
DR.Utils.Toggle.setVisibility(_1d2[i],true);
}
}
if(typeof _1d3=="string"){
_1d3=_1d3.stripSpaces().split(",");
for(var j=0;j<_1d3.length;j++){
DR.Utils.Toggle.setVisibility(_1d3[j],false);
}
}
};
DR.Utils.Toggle.childTable=function(_1d7,_1d8){
var _1d9=document.getElementById(_1d8);
var _1da=(_1d9.style.display!="none");
if(_1da){
_1d9.style.display="none";
_1d7.className="first collapsed";
}else{
_1d9.style.display="";
_1d7.className="first expanded";
}
};
DR.Utils.Toggle.childTableFromCheckbox=function(_1db,_1dc,_1dd){
var _1de=document.getElementById(_1dd);
var _1df=(_1de.style.display!="none");
if(!_1db.checked){
_1de.style.display="none";
_1dc.className="first collapsed";
}else{
_1de.style.display="";
_1dc.className="first expanded";
}
};
(function($){
var _1e1={active:0,autoHeight:false,collapsible:false,refreshOnChange:false,followRemoteLinks:true,defaultUnit:"px",header:">dt"};
var _1e2=function(_1e3,ui){
if(ui.newHeader.length===0){
if(typeof ui.oldHeader==="undefined"||ui.oldHeader.length===0){
$.dr.utils.logError("Panel not formattted correctly. No header tag.");
}
return;
}
var _1e5=$(ui.newHeader).find("a");
if(_1e5.length===0){
$.dr.utils.logError("Panel not formatted correctly, no enclosing A tag.");
return;
}
var _1e6=_1e5[0].getAttribute("href");
var fn=function(res,_1e9){
if(_1e9==="success"){
$.dr.triggerUnobtrusiveEvents(this);
$(this).trigger("accordionload",[this]);
if(!ui.options.refreshOnChange){
$(this).addClass("loaded");
}
}
};
if(_1e6&&_1e6.indexOf("#")==-1){
var _1ea;
var _1eb=_1e5[0].getAttribute("data-options");
if(_1eb){
var dO=$.dr.utils.evalString(_1eb);
if(typeof dO.selector==="string"){
_1ea=[_1e6,dO.selector].join(" ");
}
}else{
_1ea=_1e6;
}
if(!ui.newContent.parent(".ui-accordion-content").hasClass("loaded")&&ui.options.followRemoteLinks){
var _1ed=ui.newContent.parent(".ui-accordion-content");
var _1ee=new Date().getTime();
_1ed.load(_1ea,{noCache:_1ee},fn);
}
}
};
$.namespace("dr",{accordion:function(_1ef){
var _1f0=arguments.length===0?true:false;
return this.each(function(){
if(typeof $(this).accordion!=="undefined"){
var _1f1={};
if(_1f0){
_1e1.changestart=_1e2;
var _1f2=this.getAttribute("data-options");
if(_1f2){
_1f1=$.dr.utils.evalString(_1f2,"Error parsing accodion data-options for ("+this.id||"accordian"+")");
if(typeof _1ef==="error"){
_1f1={};
}
}
}
var _1f3=$.extend(true,{},_1e1,_1ef,_1f1);
if($.browser.msie&&!_1f3.height){
_1f3.animated=false;
}
if(_1f3.height){
_1f3.active=0;
_1f3.collapsible=false;
_1f3.fillSpace=true;
$(this).wrap("<div class=\"acc-wrapper\"></div>");
$(this).parent(".acc-wrapper").height(parseInt(_1f3.height,10)+_1f3.defaultUnit);
if(_1f3.width){
$(this).parent(".acc-wrapper").width(parseInt(_1f3.width,10)+_1f3.defaultUnit);
}
}else{
if(_1f3.width){
$(this).width(parseInt(_1f3.width,10)+_1f3.defaultUnit);
}
}
$(this).accordion(_1f3);
if(_1f3.active!==false){
var _1f4=$(this).find(_1f3.header).eq(_1f3.active);
if(_1f4){
var ui={newContent:_1f4.next().children(),newHeader:_1f4,options:_1f3};
_1e2("change",ui);
}
}
}else{
$.dr.utils.logError("The jquery-ui js file is not present on this page.");
}
});
}});
$.dr.accordion={getDefaults:function(){
return _1e1;
},setDefaults:function(_1f6){
if(_1f6){
$.extend(_1e1,_1f6);
}
$(document).trigger("afterAccordionSetDefaults",[_1f6]);
}};
var _1f7=function(evt,_1f9){
$(".accordion",_1f9).dr.accordion();
};
$.dr.addUnobtrusiveEvent(_1f7,"unobtrusiveEventEarly");
})(jQuery);
(function($){
var _1fb={header:"p:first",containerCls:"drui-collapsible-container",selector:".collapsible",preventDefault:true,change:function(_1fc,vis,_1fe){
}};
$.namespace("dr",{collapsible:function(_1ff){
return this.each(function(i){
var _201=$(this).attr("data-options");
if(_201&&!_1ff){
_1ff=$.dr.utils.evalString(_201);
}
var _202=$.extend(true,{},_1fb,_1ff);
var self=$(this);
if(typeof _202.change==="function"){
$(this).bind("collapsiblechange",_202.change);
}
$(this).data("options",_202);
$(this).find(_202.header).each(function(){
$(this).addClass("drui-collapsible-header");
$(this).next().addClass(_202.containerCls);
if($(this).hasClass("collapsed")||$(this).addClass("drui-collapsible-collapsed")){
$(this).removeClass("collapsed");
$(this).addClass("drui-collapsible-collapsed");
$("."+_202.containerCls,$(this).parents(_202.selector)).hide();
$(this).trigger("collapsiblechange",[false,_202]);
}else{
$(this).addClass("drui-collapsible-active");
}
$(this).bind("mouseover",function(){
$(this).addClass("dr-state-hover");
});
$(this).bind("mouseout",function(){
$(this).removeClass("dr-state-hover");
});
$(this).bind("click",function(evt,obj){
if($(this).hasClass("drui-collapsible-collapsed")){
$(this).parents(_202.selector).dr.collapsible.expand();
}else{
$(this).parents(_202.selector).dr.collapsible.collapse();
}
if(_202.preventDefault){
evt.preventDefault();
}
});
});
});
}});
$.namespace("dr.collapsible",{collapse:function(evt){
var _207=$(this).data("options");
if($(_207.header,$(this)).hasClass("drui-collapsible-collapsed")){
return this;
}
$(this).trigger("collapsiblechangestart",[false,_207]);
$("."+_207.containerCls,$(this)).slideUp("fast",function(){
$(this).parents(_207.selector).trigger("collapsiblechange",[false,_207]);
});
$(_207.header,$(this)).toggleClass("drui-collapsible-collapsed");
$(_207.header,$(this)).toggleClass("drui-collapsible-active");
return this;
},expand:function(evt){
var _209=$(this).data("options");
if($(_209.header,$(this)).hasClass("drui-collapsible-active")){
return this;
}
$(this).trigger("collapsiblechangestart",[true,_209]);
$("."+_209.containerCls,$(this)).slideDown("fast",function(){
$(this).parents(_209.selector).trigger("collapsiblechange",[true,_209]);
});
$(_209.header,$(this)).toggleClass("drui-collapsible-collapsed");
$(_209.header,$(this)).toggleClass("drui-collapsible-active");
return this;
},toggle:function(vis){
if(!!vis){
this.dr.collapsible.expand();
}else{
this.dr.collapsible.collapse();
}
}});
var _20b=function(evt,_20d){
$(".collapsible",_20d).dr.collapsible();
};
$.dr.addUnobtrusiveEvent(_20b,"unobtrusiveEventEarly");
})(jQuery);
DR.Widgets.AjaxPanel=function(_20e,_20f){
this.settingName="";
this.newSettingName="";
this.panelId=_20e;
this.content=getElem(_20e);
this.currentForm=null;
this.loaded=false;
this.loading=false;
this.saving=false;
this.url="";
this.queryStringData="";
this.errors=[];
this.showSuccessMessage=true;
this.saveCallback=null;
this.loadCallback=null;
this.checkChangeCallback=null;
this.isModal=(_20f)?true:false;
};
DR.Widgets.AjaxPanel.prototype={get:function(url,_211){
this.markLoading();
this.url=url;
this.queryStringData=(_211)?_211:"";
var _212=this;
$.ajax({url:this.url,data:this.queryStringData+"&ajaxTime="+new Date().getTime(),type:"GET",dataType:"html",success:function(_213){
if($.browser.msie){
_213=_213.replace("<script","<br style=\"display:none\"/> <script");
}
_212.content.innerHTML=_213;
_212.loaded=true;
_212.loading=false;
_212.prepare();
_212.runScripts();
if(typeof _212.loadCallback=="function"){
_212.loadCallback(_213);
}
},error:function(xhr){
if(xhr.status=="500"){
DR.Utils.replaceHtml(_212.content,xhr.responseText);
_212.loaded=true;
_212.loading=false;
_212.saving=false;
_212.prepare();
_212.runScripts();
}else{
if(xhr.status=="403"){
window.location=$.dr.LOGIN_URL;
}
}
}});
if(typeof _212.beforeLoadCallback=="function"){
_212.beforeLoadCallback();
}
this.loading=true;
},refresh:function(){
this.get(this.url,this.queryStringData);
},prepare:function(){
if(this.currentForm!==null){
var _215=this.currentForm;
$(_215).dr.form.destroy();
}
$.dr.triggerUnobtrusiveEvents(this.content);
var _216=$("form",this.content);
if(_216.length==0&&this.currentForm!==null){
_216.dr.form.destroy();
this.currentForm=null;
}else{
for(var i=0;i<_216.length;i++){
var _215=_216[i];
this.currentForm=_215;
this.addHijackForm();
}
}
},addHijackForm:function(){
var _218=this;
var _219=this.currentForm.onsubmit;
var _21a;
if(typeof _219!="function"){
_21a=function(_21b){
if(_21b!==false){
_218.hijackForm();
return false;
}else{
return true;
}
};
}else{
_21a=function(_21c){
var test=_219();
if(test){
if(_21c!==false){
_218.hijackForm();
return false;
}else{
return true;
}
}
return false;
};
}
this.currentForm.onsubmit=_21a;
},runScripts:function(){
var div=this.content;
var _21f=$("script",div);
this.errors=[];
var _220=[];
var _221=(navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")==-1)?true:false;
for(var i=0;i<_21f.length;i++){
var _223=_21f[i];
var h=_223.innerHTML;
if(h.indexOf("document.write")==-1){
if(_223.src){
var head=document.getElementsByTagName("head")[0];
var _226=document.createElement("script");
_226.setAttribute("type","text/javascript");
_226.setAttribute("src",_223.src);
head.appendChild(_226);
}else{
if(h){
if(_221){
_220.push(h);
}else{
try{
if(window.execScript){
window.execScript(h);
}else{
eval.call(window,h);
}
}
catch(e){
this.errors[this.errors.length]=e;
}
this.displayScriptErrors();
}
}
}
}
}
if(_221){
var s=[];
for(var i=0;i<_220.length;i++){
s.push("try{"+_220[i]+"}catch(e){"+this.panelId+".errors.push(e)};");
}
var f=s.join("")+this.panelId+".displayScriptErrors()";
window.setTimeout(f,0);
}
},displayScriptErrors:function(){
if(this.errors.length>0&&$.dr.IS_INTERNAL_USER){
DR.Utils.alert("There were javascript errors when loading "+this.settingName+":<br/><br/>"+this.errors.join("<br/><br/>"));
}
},hijackForm:function(_229){
var url=this.url+"?"+this.queryStringData+"&ajaxTime="+new Date().getTime();
var _22b=$(this.currentForm).serialize();
var _22c=this;
var _22d=function(o){
_22c.hijackFailureCallback(o);
};
var _22f;
this.loaded=false;
_22f=function(data,o){
_22c.hijackSaveCallback(data,o);
if(typeof _229=="function"){
_229();
}
};
var _232=this.currentForm;
$(_232).dr.form.reIndex();
$.ajax({type:"POST",url:url,success:_22f,error:_22d,data:_22b});
this.saving=true;
this.markSaving();
},hijackSaveCallback:function(data,o){
if(data!==undefined){
this.saving=false;
this.loaded=true;
if(typeof $.dr.processingDialog=="object"){
$.dr.processingDialog.hide();
}
if(this.showSuccessMessage){
var msg=this.SAVE_SUCCESSFUL.replace("{0}",this.settingName);
DR.Utils.success(msg);
}
if(typeof this.checkChangeCallback=="function"){
this.checkChangeCallback();
}else{
var _236=data;
if($.browser.msie){
_236=_236.replace("<script","<br style=\"display:none\"/> <script");
}
this.content.innerHTML=_236;
this.prepare();
this.runScripts();
if(typeof this.saveCallback=="function"){
this.saveCallback();
}
}
}
},hijackFailureCallback:function(o){
if(o.status=="403"){
window.location=$.dr.LOGIN_URL;
}else{
if(o.status=="500"){
this.content.innerHTML=o.responseText;
}
}
},markLoading:function(){
if(!this.saving){
var _238=(!this.loaded)?0:250;
this.loaded=false;
var _239=this;
var func=function(){
_239.markLoadingST();
};
window.setTimeout(func,_238);
}
},markLoadingST:function(){
if(!this.loaded){
var msg=$.dr.strings.LOADING.replace("..."," "+this.settingName+"...");
var h="<div class=\"loadingTabContent\" ><div><span>"+msg+"</span><div></div>";
this.content.innerHTML=h;
}
},markSaving:function(){
if(!this.loading){
var _23d=150;
this.saving=true;
var _23e=this;
var func=function(){
_23e.markSavingST();
};
window.setTimeout(func,_23d);
}
},markSavingST:function(){
if(!this.loaded){
if(this.isModal){
var msg=this.SAVING_CHANGES.replace("{0}"," "+this.settingName+"...");
var h="<div class=\"loadingTabContent\" ><div><span>"+msg+"</span><div></div>";
this.content.innerHTML=h;
}else{
if(typeof $.dr.processingDialog=="object"){
$.dr.processingDialog.show();
}
}
}
},checkChanges:function(_242){
if(this.currentForm==null){
_242();
return false;
}
var _243=this.checkFormChanges();
if(_243){
if(this.currentForm!==undefined){
var _244=this.currentForm.onsubmit;
if(typeof _244=="function"){
var _245=_244(false);
if(_245===false){
return false;
}
}
}
this.checkChangeCallback=_242;
var _246=this;
var _247=function(_248){
_246.checkChangesConfirmCallback(_248);
};
var q;
if(this.settingName==this.newSettingName){
q=this.UNSAVED_CHANGES_CONFIRM_QUESTION;
q=q.replace("{0}",this.settingName);
}else{
q=this.UNSAVED_CHANGES_CONFIRM_QUESTION_LOAD;
q=q.replace("{0}",this.settingName);
q=q.replace("{1}",this.newSettingName);
}
DR.Utils.warning(q,_247,this.UNSAVED_CHANGES_CONFIRM_TITLE);
return true;
}else{
_242();
return false;
}
},checkFormChanges:function(){
var _24a=this.currentForm;
if(!_24a){
return false;
}
if($(_24a).dr.form.get().checkChanges){
if($(_24a).dr.form.checkForChanges()){
return true;
}
}
return false;
},checkChangesConfirmCallback:function(_24b){
var _24c=false;
if(_24b){
var _24d=this.currentForm;
if($(_24d).dr.form.validate()){
this.hijackForm();
return;
}else{
_24c=true;
}
}
if(!_24c){
this.checkChangeCallback();
}
},getCurrentForm:function(){
var _24e=this.currentForm;
return _24e;
}};
DR.Widgets.AjaxPanel.prototype.SAVING_CHANGES="Saving changes to {0}";
DR.Widgets.AjaxPanel.prototype.SAVE_SUCCESSFUL="Changes to {0} were saved successfully.";
DR.Widgets.AjaxPanel.prototype.UNSAVED_CHANGES_CONFIRM_TITLE="Unsaved Changes";
DR.Widgets.AjaxPanel.prototype.UNSAVED_CHANGES_CONFIRM_QUESTION="Do you want to save your changes to {0} before performing the requested action?";
DR.Widgets.AjaxPanel.prototype.UNSAVED_CHANGES_CONFIRM_QUESTION_LOAD="Do you want to save your changes to {0} before loading {1}?";
(function($){
var _250={comboBox:false,minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:10000,mustMatch:false,extraParams:{},selectFirst:false,formatItem:function(row){
return row[0];
},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(_252,term){
return _252.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");
},scroll:true,scrollHeight:180};
var _254=function(_255,_256,end){
if(_255.createTextRange){
var _258=_255.createTextRange();
_258.collapse(true);
_258.moveStart("character",_256);
_258.moveEnd("character",end);
_258.select();
}else{
if(_255.setSelectionRange){
_255.setSelectionRange(_256,end);
}else{
if(_255.selectionStart){
_255.selectionStart=_256;
_255.selectionEnd=end;
}
}
}
_255.focus();
};
var _259=function(_25a){
var data={};
var _25c=0;
function matchSubset(s,sub){
if(!_25a.matchCase){
s=s.toLowerCase();
}
var i=s.indexOf(sub);
if(i==-1){
return false;
}
return i==0||_25a.matchContains;
}
function add(q,_261){
if(_25c>_25a.cacheLength){
flush();
}
if(!data[q]){
_25c++;
}
data[q]=_261;
}
function populate(){
if(!_25a.data){
return false;
}
var _262={},nullData=0;
if(!_25a.url){
_25a.cacheLength=1;
}
_262[""]=[];
for(var i=0,ol=_25a.data.length;i<ol;i++){
var _264=_25a.data[i];
_264=(typeof _264=="string")?[_264]:_264;
var _265=_25a.formatMatch(_264,i+1,_25a.data.length);
if(_265===false){
continue;
}
var _266=_265.charAt(0).toLowerCase();
if(!_262[_266]){
_262[_266]=[];
}
var row={value:_265,data:_264,result:_25a.formatResult&&_25a.formatResult(_264)||_265};
_262[_266].push(row);
if(nullData++<_25a.max){
_262[""].push(row);
}
}
$.each(_262,function(i,_269){
_25a.cacheLength++;
add(i,_269);
});
}
setTimeout(populate,25);
function flush(){
data={};
_25c=0;
}
return {flush:flush,add:add,populate:populate,load:function(q){
if(!_25a.cacheLength||!_25c){
return null;
}
if(!_25a.url&&_25a.matchContains){
var csub=[];
for(var k in data){
if(k.length>0){
var c=data[k];
$.each(c,function(i,x){
if(matchSubset(x.value,q)){
csub.push(x);
}
});
}
}
return csub;
}else{
if(data[q]){
return data[q];
}else{
if(_25a.matchSubset){
for(var i=q.length-1;i>=_25a.minChars;i--){
var c=data[q.substr(0,i)];
if(c){
var csub=[];
$.each(c,function(i,x){
if(matchSubset(x.value,q)){
csub[csub.length]=x;
}
});
return csub;
}
}
}
}
}
return null;
}};
};
var _273=function(_274,_275,_276,_277,_278,_279){
var _27a={ACTIVE:"ac_over"};
var _27b,active=-1,data,term="",needsInit=true,popup,list,shadow;
function init(){
if(!needsInit){
return;
}
var div=$("<div />").addClass("ac_abs").prependTo("body");
popup=$("<div />").appendTo(div);
popup.addClass("ac_popup").dr.shadows();
shadow=div;
shadow.css({zIndex:1,position:"absolute"});
list=$("<ul/>").appendTo(popup).mouseover(function(_27d){
if(target(_27d).nodeName&&target(_27d).nodeName.toUpperCase()=="LI"){
active=$("li",list).removeClass(_27a.ACTIVE).index(target(_27d));
$(target(_27d)).addClass(_27a.ACTIVE);
}
}).click(function(_27e){
$(target(_27e)).addClass(_27a.ACTIVE);
var _27f=_276();
if(_27f!==null){
_278(_27f);
}
_275.focus();
return false;
}).mousedown(function(){
_277.mouseDownOnSelect=true;
}).mouseup(function(){
_277.mouseDownOnSelect=false;
});
if(_274.width>0){
popup.css("width",_274.width);
}
needsInit=false;
}
function target(_280){
var _281=_280.target;
while(_281&&_281.tagName!="LI"){
_281=_281.parentNode;
}
if(!_281){
return [];
}
return _281;
}
function moveSelect(step){
_27b.slice(active,active+1).removeClass(_27a.ACTIVE);
movePosition(step);
var _283=_27b.slice(active,active+1).addClass(_27a.ACTIVE);
if(_274.scroll){
var _284=0;
_27b.slice(0,active).each(function(){
_284+=this.offsetHeight;
});
if((_284+_283[0].offsetHeight-list.scrollTop())>list[0].clientHeight){
list.scrollTop(_284+_283[0].offsetHeight-list.innerHeight());
}else{
if(_284<list.scrollTop()){
list.scrollTop(_284);
}
}
}
}
function movePosition(step){
active+=step;
if(active<0){
active=0;
}else{
if(active>=_27b.size()){
active=_27b.size()-1;
}
}
}
function limitNumberOfItems(_286){
return _274.max&&_274.max<_286?_274.max:_286;
}
function fillList(){
list.empty();
var max=limitNumberOfItems(data.length);
for(var i=0;i<max;i++){
if(!data[i]){
continue;
}
var _289=_274.formatItem(data[i].data,i+1,max,data[i].value,term);
if(_289===false){
continue;
}
var li=$("<li/>").html(_274.highlight(_289,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];
$.data(li,"ac_data",data[i]);
}
_27b=list.find("li");
if(_274.selectFirst){
_27b.slice(0,1).addClass(_27a.ACTIVE);
active=0;
}
}
return {display:function(d,q){
if(active!=-1){
active=0;
}
init();
data=d;
term=q;
fillList();
},next:function(){
moveSelect(1);
},prev:function(){
moveSelect(-1);
},pageUp:function(){
if(active!=0&&active-9<0){
moveSelect(-active);
}else{
moveSelect(-9);
}
},pageDown:function(){
if(active!=_27b.size()-1&&active+9>_27b.size()){
moveSelect(_27b.size()-1-active);
}else{
moveSelect(9);
}
},hide:function(){
popup&&popup.slideUp(function(){
_279.parent().removeClass("ac_open");
shadow.hide();
});
_27b&&_27b.removeClass(_27a.ACTIVE);
active=-1;
},visible:function(){
return shadow&&shadow.is(":visible");
},current:function(){
return this.visible()&&(_27b.filter("."+_27a.ACTIVE)[0]||_274.selectFirst&&_27b[0]);
},show:function(){
var _28d=_275.offsetWidth-2;
var _28e=$(_275).offset();
_279.parent().addClass("ac_open");
popup.css({width:typeof _274.width=="string"||_274.width>0?_274.width:_28d});
popup.show();
shadow.show();
var _28f=-(20/2);
var _290=-1;
if(DR.Utils.BrowserDetect.browser=="Explorer"&&DR.Utils.BrowserDetect.version<7){
_28f=0;
}
var _291="Left";
var _292="Bottom";
var _293="Right";
var _294="Down";
DR.Utils.Position.snapTo(_275,shadow[0],_28f,_290,_291,_292,_293,_294,false);
if(_274.scroll){
list.scrollTop(0);
list.css({maxHeight:_274.scrollHeight,overflow:"auto"});
if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){
var _295=0;
_27b.each(function(){
_295+=this.offsetHeight;
});
var _296=_295>_274.scrollHeight;
list.css("height",_296?_274.scrollHeight:_295);
if(!_296){
_27b.width(list.width()-parseInt(_27b.css("padding-left"))-parseInt(_27b.css("padding-right")));
}
}
}
},selected:function(){
var _297=_27b&&_27b.filter("."+_27a.ACTIVE).removeClass(_27a.ACTIVE);
return _297&&_297.length&&$.data(_297[0],"ac_data");
},emptyList:function(){
list&&list.empty();
},unbind:function(){
popup&&popup.remove();
}};
};
var _298=function(_299,_29a,_29b){
var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};
var _29d=$(_299),originalInput=_299,boundInput=null;
var _29e=($.browser.msie)?6:4;
var _29f=_29d.dr.computedWidth()+_29e;
_29f=(_29f>_29e)?_29f:(_299.offsetWidth);
var _2a0=$("<div class=\"ac_wrapper\" style=\"width:"+_29f+"px;\" />");
boundInput=_29d.clone();
boundInput.removeAttr("name").removeAttr("id");
if(_299.tagName.toLowerCase()=="textarea"){
boundInput.css("max-width",_299.offsetWidth+"px").css("max-height",_299.offsetHeight+"px");
_2a0.addClass("ac_textareaWrapper");
}
boundInput.appendTo(_2a0);
boundInput.val(_29d.val());
boundInput.attr("data-expand-collapse","false");
_29d.attr("data-expand-collapse","false");
_29d.data("validationEnabled",false);
_2a0.insertBefore(_29d);
_2a0.wrap("<div class=\"autocomplete\" />");
_29d.hide();
_29d=boundInput;
_299=boundInput[0];
var _2a1=_299;
var _2a2=$("<span class=\"loading\" />").appendTo(_2a0).hide();
if(_29a.comboBox){
_2a0.addClass("ac_comboBox");
var _2a3=$("<span class=\"handle\" />").appendTo(_2a0).mousedown(function(evt){
evt.preventDefault();
}).click(function(evt){
var func=function(){
var show=true;
if(typeof select!=="undefined"){
if(select.visible()){
select.hide();
show=false;
}
}
if(show){
_299.focus();
hasFocus=1;
onChange(0,true);
}
};
var _2a8=($.browser.msie)?200:20;
setTimeout(func,_2a8);
evt.preventDefault();
});
}
var _2a9=function(){
if(boundInput!==null){
$(originalInput).val(boundInput.val());
}
};
var _2aa=function(){
if($.dr&&$.dr.form&&$.dr.form.validateField){
$.dr.form.validateField(_299,true);
}
};
_29d=$(_299).attr("autocomplete","off");
var _2ab,previousValue="",cache=new _259(_29a),hasFocus=0,lastKeyPressCode,config={mouseDownOnSelect:false},select=new _273(_29a,_299,selectCurrent,config,doCallback,_2a0),blockSubmit;
$.browser.opera&&$(_299.form).bind("submit.autocomplete",function(){
if(blockSubmit){
blockSubmit=false;
return false;
}
});
function doCallback(_2ac){
_2aa();
if(!_2ac){
return;
}
_2a9();
if(typeof _29a.callback=="function"){
var func=function(){
_29a.callback(_2ac[0],_2ac[1]);
};
setTimeout(func,10);
}
}
_29d.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(_2ae){
lastKeyPressCode=_2ae.keyCode;
switch(_2ae.keyCode){
case KEY.UP:
_2ae.preventDefault();
if(select.visible()){
select.prev();
}else{
onChange(0,true);
}
break;
case KEY.DOWN:
_2ae.preventDefault();
if(select.visible()){
select.next();
}else{
onChange(0,true);
}
break;
case KEY.PAGEUP:
_2ae.preventDefault();
if(select.visible()){
select.pageUp();
}else{
onChange(0,true);
}
break;
case KEY.PAGEDOWN:
_2ae.preventDefault();
if(select.visible()){
select.pageDown();
}else{
onChange(0,true);
}
break;
case _29a.multiple&&$.trim(_29a.multipleSeparator)==","&&KEY.COMMA:
case KEY.TAB:
case KEY.RETURN:
var _2af=selectCurrent();
if(_2af!==null){
blockSubmit=true;
if(!_29a.multiple){
if(_2ae.keyCode==KEY.RETURN){
_2ae.keyCode=KEY.TAB;
_2ae.preventDefault();
}else{
_2ae.keyCode=KEY.TAB;
}
}else{
_2ae.preventDefault();
}
doCallback(_2af);
}
break;
case KEY.ESC:
select.hide();
break;
default:
clearTimeout(_2ab);
_2ab=setTimeout(onChange,_29a.delay);
break;
}
_2a9();
_2aa();
}).focus(function(){
hasFocus++;
}).blur(function(evt){
_2aa();
_2a9();
hasFocus=0;
if(!config.mouseDownOnSelect){
hideResults();
}
}).click(function(){
if(hasFocus++>1&&!select.visible()){
onChange(0,true);
}
}).dblclick(function(){
if($.browser.msie){
if(!select.visible()){
onChange(0,true);
}
}
}).bind("search",function(){
var fn=(arguments.length>1)?arguments[1]:null;
function findValueCallback(q,data){
var _2b4;
if(data&&data.length){
for(var i=0;i<data.length;i++){
if(data[i].result.toLowerCase()==q.toLowerCase()){
_2b4=data[i];
break;
}
}
}
if(typeof fn=="function"){
fn(_2b4);
}else{
doCallback(_2b4);
}
}
$.each(trimWords(_29d.val()),function(i,_2b7){
request(_2b7,findValueCallback,findValueCallback);
});
}).bind("flushCache",function(){
cache.flush();
}).bind("setOptions",function(){
$.extend(_29a,arguments[1]);
if("data" in arguments[1]){
cache.populate();
}
}).bind("unautocomplete",function(){
select.unbind();
_29d.unbind();
$(_299.form).unbind(".autocomplete");
});
function selectCurrent(){
var _2b8=select.selected();
if(!_2b8){
return false;
}
var v=_2b8.result;
previousValue=v;
if(_29a.multiple){
var _2ba=trimWords(_29d.val());
if(_2ba.length>1){
v=_2ba.slice(0,_2ba.length-1).join(_29a.multipleSeparator)+_29a.multipleSeparator+v;
}
v+=_29a.multipleSeparator;
}
_29d.val(v);
hideResultsNow();
return [_2b8.data,_2b8.value];
}
function onChange(arg1,_2bc){
if(lastKeyPressCode==KEY.DEL){
select.hide();
return;
}
var _2bd=_29d.val();
if(!_2bc&&_2bd==previousValue){
return;
}
previousValue=_2bd;
_2bd=lastWord(_2bd);
if(_2bd.length>=_29a.minChars){
_2a2.show();
if(!_29a.matchCase){
_2bd=_2bd.toLowerCase();
}
request(_2bd,receiveData,hideResultsNow);
}else{
stopLoading();
select.hide();
}
}
function trimWords(_2be){
if(!_2be){
return [""];
}
var _2bf=_2be.split(_29a.multipleSeparator);
var _2c0=[];
$.each(_2bf,function(i,_2c2){
if($.trim(_2c2)){
_2c0[i]=$.trim(_2c2);
}
});
return _2c0;
}
function lastWord(_2c3){
if(!_29a.multiple){
return _2c3;
}
var _2c4=trimWords(_2c3);
return _2c4[_2c4.length-1];
}
function autoFill(q,_2c6){
if(_29a.autoFill&&(lastWord(_29d.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){
_29d.val(_29d.val()+_2c6.substring(lastWord(previousValue).length));
_254(_299,previousValue.length,previousValue.length+_2c6.length);
}
}
function hideResults(){
clearTimeout(_2ab);
_2ab=setTimeout(hideResultsNow,200);
}
function hideResultsNow(){
var _2c7=select.visible();
select.hide();
clearTimeout(_2ab);
stopLoading();
if(_29a.mustMatch){
_29d.dr.autocomplete.search(function(_2c8){
if(!_2c8){
if(_29a.multiple){
var _2c9=trimWords(_29d.val()).slice(0,-1);
_29d.val(_2c9.join(_29a.multipleSeparator)+(_2c9.length?_29a.multipleSeparator:""));
}else{
_29d.val("");
}
}
});
}
if(_2c7){
_254(_299,_299.value.length,_299.value.length);
}
}
function receiveData(q,data){
if(data&&data.length&&hasFocus){
stopLoading();
select.display(data,q);
autoFill(q,data[0].value);
select.show();
}else{
hideResultsNow();
}
}
function request(term,_2cd,_2ce){
if(!_29a.matchCase){
term=term.toLowerCase();
}
var data=cache.load(term);
if(data&&data.length){
_2cd(term,data);
}else{
if((typeof _29a.url=="string")&&(_29a.url.length>0)){
var _2d0={ajaxTime:new Date()};
$.each(_29a.extraParams,function(key,_2d2){
_2d0[key]=typeof _2d2=="function"?_2d2():_2d2;
});
$.ajax({mode:"abort",port:"autocomplete"+_299.name,dataType:_29a.dataType,url:_29a.url,data:$.extend({query:lastWord(term),limit:_29a.max},_2d0),success:function(data){
var _2d4=_29a.parse&&_29a.parse(data)||parse(data);
cache.add(term,_2d4);
_2cd(term,_2d4);
},error:function(_2d5,_2d6,_2d7){
if(typeof _29a.errorCallback=="function"){
_29a.failureCallback(_2d5,_2d6,_2d7);
}
}});
}else{
select.emptyList();
_2ce(term);
}
}
}
function parse(data){
var _2d9=[];
var rows=data.split("\n");
for(var i=0;i<rows.length;i++){
var row=$.trim(rows[i]);
if(row){
row=row.split("|");
_2d9[_2d9.length]={data:row,value:row[0],result:_29a.formatResult&&_29a.formatResult(row,row[0])||row[0]};
}
}
return _2d9;
}
function stopLoading(){
_2a2.hide();
}
return {boundInput:_29d};
};
var _2dd=function(evt){
var a=$("input.autocomplete, textarea.autocomplete, input.combobox",this);
if(a.length>0){
a.dr.autocomplete();
}
};
$("form").live("beforeIndexFields",_2dd);
$.dr.autocomplete={setDefaults:function(_2e0){
if(_2e0){
$.extend(_250,_2e0);
}
}};
$.namespace("dr",{autocomplete:function(_2e1,_2e2){
var _2e3=false,isUrl=(typeof _2e1=="string")?true:false;
if(!_2e2){
_2e2={};
}
if(arguments.length==0){
_2e3=true;
}
return this.each(function(){
var jObj=$(this);
if(!jObj.data("autocomplete_inited")){
var _2e5=_2e2;
if(_2e3){
isUrl=false;
_2e1=jObj.attr("data-source");
var _2e6=jObj.attr("data-url");
dataOptions=jObj.attr("data-options");
if(!_2e1){
if(!_2e6){
$.dr.utils.logError("("+this.id+") did not contain a data-url or data-source attribute");
return;
}else{
isUrl=true;
_2e1=_2e6;
}
}else{
_2e1=$.dr.utils.evalString(_2e1,"The referenced data-source for ("+this.id+") does not exist.");
if(typeof _2e1=="error"){
return;
}
}
if(dataOptions){
_2e5=$.dr.utils.evalString(dataOptions,"Error parsing autocomplete data-options for ("+this.id+")");
if(typeof _2e5=="error"){
return;
}
}
}
if(this.tagName.toLowerCase()=="textarea"){
if(typeof _2e5.multiple=="undefined"){
_2e5.multiple=true;
}
}
var _2e7=$.extend({},_250,{url:isUrl?_2e1:null,data:isUrl?null:_2e1,delay:isUrl?_250.delay:10},_2e5);
if(jObj.hasClass("combobox")){
_2e7.comboBox=true;
}
_2e7.highlight=_2e7.highlight||function(_2e8){
return _2e8;
};
_2e7.formatMatch=_2e7.formatMatch||_2e7.formatItem;
jObj.data("autocomplete_inited","true");
var ac=new _298(this,_2e7);
jObj.data("autocomplete",ac);
if(!_2e3){
$(this.form).dr.form.initFields(ac.boundInput);
}
}
});
}});
$.namespace("dr.autocomplete",{search:function(_2ea){
return this.trigger("search",[_2ea]);
},flushCache:function(){
return this.trigger("flushCache");
},setOptions:function(_2eb){
return this.trigger("setOptions",[_2eb]);
},destroy:function(){
return this.trigger("unautocomplete");
}});
})(jQuery);
(function($){
$.namespace("dr.button",{disable:function(_2ed){
if(typeof $.dr.processingDialog=="object"){
$.dr.processingDialog.disable();
}
return this.each(function(){
var _2ee=$(this);
if(this.tagName.toLowerCase()=="button"){
var text=(_2ed)?_2ed:(_2ee.hasClass("search"))?$.dr.strings.SEARCHING:(_2ee.hasClass("login"))?$.dr.strings.AUTHORIZING:$.dr.strings.PROCESSING;
_2ee.html("<span><span><span>"+text+"</span></span></span>").addClass("processing");
this.disabled=true;
}
});
},text:function(_2f0,_2f1,_2f2,_2f3){
return this.each(function(){
if(this.tagName.toLowerCase()=="button"){
var _2f4=$(this);
if(_2f3){
_2f4.addClass("rightAlign");
}
_2f4.html("<span><span><span>"+_2f0+"</span></span></span>");
if(_2f2){
_2f4.removeClass(_2f1).addClass(_2f2);
}
}
});
}});
})(jQuery);
DR.Widgets.FauxTree=function(_2f5,guid,_2f7,_2f8,_2f9,_2fa){
this.childNodes=[];
this.parentNode=_2f5;
this.isExpanded=false;
if(_2f9!==undefined){
this.saveState=_2f9;
this.cookieName=_2fa;
}else{
this.saveState=false;
this.cookieName=null;
}
this.isDirectory=_2f7;
this.hasCheckbox=(_2f8===true)?true:false;
this.guid=guid;
this.obj=document.getElementById(this.guid);
var _2fb=guid.split(DR.Widgets.FauxTree.PATH_SEPARATOR);
this.level=_2fb.length;
this.shortId=_2fb[_2fb.length-1];
};
DR.Widgets.FauxTree.PATH_SEPARATOR=".";
DR.Widgets.FauxTree.INDENTED_COLUMN_POSITION=0;
DR.Widgets.FauxTree.EXPANDED_CHILDREN_DISPLAY_VALUE="";
DR.Widgets.FauxTree.COLLAPSED_CHILDREN_DISPLAY_VALUE="none";
DR.Widgets.FauxTree.EMPTY_DIRECTORY_STYLE="empty";
DR.Widgets.FauxTree.EXPANDED_DIRECTORY_STYLE="expanded";
DR.Widgets.FauxTree.COLLAPSED_DIRECTORY_STYLE="collapsed";
DR.Widgets.FauxTree.ITEM_STYLE="item";
DR.Widgets.FauxTree.FAUX_TREE_ROOT="FauxTreeRoot";
DR.Widgets.FauxTree.NODE_LOOKUP_TABLE=[];
DR.Widgets.FauxTree.countNodes=function(){
var num=0;
for(var i in DR.Widgets.FauxTree.NODE_LOOKUP_TABLE){
num++;
}
alert(num);
};
DR.Widgets.FauxTree.isNode=function(node){
return node.guid;
};
DR.Widgets.FauxTree.initConstants=function(_2ff){
DR.Widgets.FauxTree.INDENTED_COLUMN_POSITION=(_2ff)?_2ff:0;
};
DR.Widgets.FauxTree.prototype={refreshTreeState:function(){
if(this.saveState){
DR.Widgets.FauxTree.NODE_LOOKUP_TABLE[DR.Widgets.FauxTree.FAUX_TREE_ROOT]=this;
this.stateCookie=new DR.Utils.Cookie(this.cookieName);
this.stateCookie.type="Array";
this.stateCookie.load();
this.findChild().revertState();
}
},addItem:function(path,_301){
var _302=path.split(DR.Widgets.FauxTree.PATH_SEPARATOR);
var _303=true;
if(_302.length>1){
_303=true;
}else{
_303=(_301)?true:false;
}
var _304=_302.shift();
var guid=null;
if(this.guid===""){
guid=_304;
}else{
guid=this.guid+DR.Widgets.FauxTree.PATH_SEPARATOR+_304;
}
if(!this.childNodes[_304]){
this.childNodes[_304]=new DR.Widgets.FauxTree(this,guid,_303,this.hasCheckbox,this.saveState);
DR.Widgets.FauxTree.NODE_LOOKUP_TABLE[guid]=this.childNodes[_304];
}
if(_302.length>0){
this.childNodes[_304].addItem(_302.join(DR.Widgets.FauxTree.PATH_SEPARATOR),_301);
}
},findItem:function(path){
return DR.Widgets.FauxTree.NODE_LOOKUP_TABLE[path];
},toggleDirectory:function(_307){
var _308=document.getElementById(_307);
var _309=(_308.className.indexOf(DR.Widgets.FauxTree.EXPANDED_DIRECTORY_STYLE)!=-1)?true:false;
var _30a=this.findItem(_307);
if(_30a.isDirectory){
if(_309){
_30a.collapse();
if(this.saveState){
this.stateCookie.removeArrayValue(_30a.shortId);
}
}else{
_30a.expand();
if(this.saveState){
this.stateCookie.addArrayValue(_30a.shortId);
}
}
}
},findChild:function(){
var _30b;
for(var i in this.childNodes){
_30b=this.childNodes[i];
break;
}
return _30b;
},expandAll:function(){
this.obj.style.display=DR.Widgets.FauxTree.EXPANDED_CHILDREN_DISPLAY_VALUE;
if(this.isDirectory){
if(this.hasChildren()===0){
this.obj.className=DR.Widgets.FauxTree.EMPTY_DIRECTORY_STYLE;
}else{
this.obj.className=(this.isExpanded)?DR.Widgets.FauxTree.EXPANDED_DIRECTORY_STYLE:DR.Widgets.FauxTree.COLLAPSED_DIRECTORY_STYLE;
}
}else{
this.obj.className=DR.Widgets.FauxTree.ITEM_STYLE;
}
$(">td:not(.actionCol)",this.obj).eq(0).addClass("first level"+this.level);
if(this.isDirectory){
this.expand();
for(var i in this.childNodes){
if(DR.Widgets.FauxTree.isNode(this.childNodes[i])){
var _30e=this.childNodes[i];
_30e.expandAll();
}
}
}
},revertState:function(){
if(this.saveState){
var _30f=this.getCookieArray();
if(this.isDirectory){
var _310=false;
if(_30f.length>0){
var i=0;
while(!_310&&i<_30f.length){
if(_30f[i]==this.shortId){
_310=true;
this.expand();
}
i++;
}
}
if(_310){
for(var j in this.childNodes){
if(DR.Widgets.FauxTree.isNode(this.childNodes[j])){
var _313=this.childNodes[j];
_313.revertState();
}
}
}
}
}
},expandNRestoreChildrenState:function(){
this.obj.style.display=DR.Widgets.FauxTree.EXPANDED_CHILDREN_DISPLAY_VALUE;
if(this.isDirectory){
if(this.hasChildren()===0){
this.obj.className=DR.Widgets.FauxTree.EMPTY_DIRECTORY_STYLE;
}else{
this.obj.className=(this.isExpanded)?DR.Widgets.FauxTree.EXPANDED_DIRECTORY_STYLE:DR.Widgets.FauxTree.COLLAPSED_DIRECTORY_STYLE;
}
}else{
this.obj.className=DR.Widgets.FauxTree.ITEM_STYLE;
}
$(">td:not(.actionCol)",this.obj).eq(0).addClass("first level"+this.level);
if(this.saveState){
var _314=this.getCookieArray();
var _315=false;
if(_314.length>0){
var i=0;
while(!_315&&i<_314.length){
if(_314[i]==this.shortId){
this.isExpanded=true;
}
i++;
}
}
}
if(this.isExpanded){
for(var j in this.childNodes){
if(DR.Widgets.FauxTree.isNode(this.childNodes[j])){
var _318=this.childNodes[j];
_318.expandNRestoreChildrenState();
}
}
}
},hasChildren:function(){
for(var i in this.childNodes){
if(DR.Widgets.FauxTree.isNode(this.childNodes[i])){
return true;
}
}
return false;
},collapseNStoreChildrenState:function(){
for(var i in this.childNodes){
if(DR.Widgets.FauxTree.isNode(this.childNodes[i])){
this.childNodes[i].obj.style.display=DR.Widgets.FauxTree.COLLAPSED_CHILDREN_DISPLAY_VALUE;
this.childNodes[i].collapseNStoreChildrenState();
}
}
},expand:function(){
this.isExpanded=true;
this.expandNRestoreChildrenState();
},getCookieArray:function(){
return DR.Widgets.FauxTree.NODE_LOOKUP_TABLE[DR.Widgets.FauxTree.FAUX_TREE_ROOT].stateCookie.arrayValues;
},collapse:function(){
this.isExpanded=false;
this.obj.className=DR.Widgets.FauxTree.COLLAPSED_DIRECTORY_STYLE;
this.collapseNStoreChildrenState();
}};
(function($){
var _31c=[];
var _31d=false;
var _31e={INPUT_FOCUS_CLASS:"inputFocus"};
var _31f={WINDOW_ON_BEFORE_UNLOAD:"There have been changes made to the form that have not been saved."};
$.dr.form={getMessages:function(){
return _31f;
},getDefaults:function(){
return _31e;
},setDefaults:function(_320){
if(_320){
$.extend(_31e,_320);
}
$(document).trigger("afterFormSetDefaults",[_320]);
},setMessages:function(_321){
if(_321){
$.extend(_31f,_321);
}
$(document).trigger("afterFormSetMessages",[_321]);
}};
window.customFormIndexerCallBack=function(){
};
var _322=function(_323){
$("form",_323).dr.form();
customFormIndexerCallBack();
customFormIndexerCallBack=function(){
};
};
var _324=function(_325){
var _326=(parent.overlayStack)?parent.overlayStack.getCurrent():null;
var _327=(typeof _326!=="undefined"&&typeof _326!==null)?_326.loading:false;
if(_327){
var func=function(){
_324(_325);
};
window.setTimeout(func,50);
}else{
_322(_325);
}
};
var _329=function(evt,_32b){
$.dr.form.setDefaults({});
$.dr.form.setMessages({});
$(document).trigger("beforeInitForms");
if($.browser.msie&&$("body.modalPage").length>0){
_324(_32b);
}else{
_322(_32b);
}
};
$.dr.addUnobtrusiveEvent(_329);
var _32c=function(evt){
if(!this.getAttribute("readonly")&&!this.disabled&&this.type!="file"){
if(!(this.type=="select-one"&&DR.Utils.BrowserDetect.version>6)){
$(this).addClass(_31e.INPUT_FOCUS_CLASS);
}
}
};
var _32e=function(evt){
var _330=this;
var func=function(){
if(!_330.getAttribute("readonly")&&!_330.disabled&&_330.type!="file"){
$(_330).removeClass(_31e.INPUT_FOCUS_CLASS);
}
};
window.setTimeout(func,50);
};
$.dr.utils.getSelectOptionValue=function(_332){
if(_332){
if(_332.text!==""&&_332.outerHTML&&_332.outerHTML.toLowerCase().indexOf("value=")==-1){
return _332.text;
}else{
return _332.value;
}
}
};
$.dr.utils.hasFieldChanged=function(obj){
var type=obj.type;
if(type=="checkbox"||type=="radio"){
if(obj.defaultChecked!=obj.checked){
return true;
}
}else{
if(type=="select-one"){
if($(obj).dr.form.field.getDefaultValue()!=$(obj).val()){
return true;
}
}else{
if(type=="select-multiple"){
var _335=$(obj).val();
_335=(_335===null)?"":_335.join(",");
if($(obj).dr.form.field.getDefaultValue()!=_335){
return true;
}
}else{
if($(obj).dr.form.field.getDefaultValue()!=$(obj).val()){
return true;
}
}
}
}
return false;
};
$.dr.utils.getLabel=function(obj){
var _337;
if($(obj).data("label")===undefined){
var _338=$(obj.form).data("labels");
if(_338===undefined){
_338=$("label",obj.form);
$(obj.form).data("labels",_338);
}
var _339=_338.filter("[for="+obj.id+"]");
_337=(_339.length)?_339.text().replace(":",""):obj.name;
$(obj).data("label",_337);
}
return _337;
};
var _33a=function(_33b){
var _33c=_33b.onsubmit;
_33b.onsubmit=function(){
var _33d=true;
if(typeof _33c=="function"){
var test=_33c();
_33d=(typeof test=="undefined"||test)?true:false;
}
var _33f=$(_33b).data("behavior");
var _340=(_33d&&$(_33b).dr.form.validate())?true:false;
if(_33f&&_33f.checkChanges&&_340){
$(_33b).dr.form.enableCheckChanges(false);
}
$(_33b).trigger("dr-aftervalidation",_340);
return _340;
};
var _341=_33b.onsubmit;
_33b._nativeFormSubmit=_33b.submit;
_33b.submit=function(){
if(_341()){
if($.browser.msie){
_33b._nativeFormSubmit();
}else{
_33b.submit=_33b._nativeFormSubmit;
if(_33b.submit!==undefined){
_33b.submit();
}
}
}
};
};
var _342=function(_343,_344){
this.formObj=_343;
this.options=_344;
this.init();
};
_342.prototype={init:function(){
this.firstField=null;
this.normalizeName();
this.bindBehavior();
},normalizeName:function(){
var _345=this.formObj;
var _346="name";
var n=_345.attributes[_346];
var f="form_"+new Date().getTime();
if(n){
if(!($.browser.msie&&n.value==="")){
f=n.value;
}
}
_345.setAttribute("name",f);
_345._formName=f;
this.formIndex=_31c.length;
_31c.push(_345);
},bindBehavior:function(){
var _349=this.formObj;
var _34a=$(this.formObj);
var _34b=(_34a.attr("data-behavior")=="standard")?true:false;
var _34c=(_34a.attr("data-behavior")=="search")?true:false;
var _34d=(_34a.attr("data-enable-field-events")=="false")?false:true;
var _34e=(_34a.attr("data-check-changes")=="false")?false:true;
var _34f=(_34a.attr("data-auto-focus")=="false")?false:true;
var _350=(_34a.attr("data-force-check-changes")=="true")?true:false;
this.checkChanges=(_34b&&(_34e||_350))?true:false;
this.autoFocus=((_34b||_34c)&&_34f)?true:false;
this.enableFieldEvents=((_34b||_34c)&&_34d)?true:false;
this.forceCheckChanges=_350;
this.customFieldSelector=_34a.attr("data-custom-field-selector");
if(_34b||_34c){
var _351=($.browser.msie)?$(":input",this.formObj):$(this.formObj.elements);
this.initFields(_351);
if(_34e||_350){
this.addUnloadEvent();
}
if(this.autoFocus){
this.focusFirstElement();
}
_33a(_349);
}
},initFields:function(_352,_353){
if(this.formObj.getAttribute("_inited")===null||_353){
var _354=this;
if(typeof this.customFieldSelector!=="undefined"){
_352=_352.filter(this.customFieldSelector);
}
var _355=_352.length;
var _356=$.dr.getPlugins("form");
for(var i=0;i<_356.length;i++){
_356[i].call(this,_352);
}
_352.filter("input[type=text],input[type=password],select,textarea").focus(_32c).blur(_32e).end();
if(this.autoFocus&&this.firstField===null&&!_31d&&$(this.formObj).filter(":visible").length>0){
_352.filter("input[type=text],input[type=password],select,textarea").filter(":visible").filter(":first").each(function(i){
_354.firstField=this;
_31d=true;
return false;
});
}
}
this.formObj.setAttribute("_inited","true");
},focusFirstElement:function(){
var obj=this.firstField;
if(obj!==null){
try{
obj.focus();
if(obj.type=="text"||obj.type=="textarea"){
obj.select();
}
}
catch(e){
}
}
},addUnloadEvent:function(){
if(typeof window.onbeforeunload!="function"){
var _35a=function(){
var _35b=false;
for(var i=0;i<_31c.length;i++){
var _35d=_31c[i];
var _35e=$(_35d).data("behavior");
if(_35e){
if(_35e.checkChanges&&!_35e.forceCheckChanges){
if($(_35d).dr.form.checkForChanges()){
_35b=true;
break;
}
}
}
}
if(_35b){
if($.browser.msie){
window.onerror=function(err){
window.event.returnValue=(err.toLowerCase().indexOf("unspecified error")>=0)?true:false;
};
}
var m=_31f.WINDOW_ON_BEFORE_UNLOAD;
if(!$.browser.safari){
m="\n"+m+"\n";
}
if(typeof evt=="undefined"){
evt=window.event;
}
if(evt){
evt.returnValue=m;
}
$(document).trigger("showChangesWarning");
return m;
}
};
window.onbeforeunload=_35a;
}
}};
$.namespace("dr",{form:function(_361){
try{
if($.browser.msie){
$("fieldset:not(.noBackground)",this).filter(function(){
return ($("> legend",this).length==0);
}).addClass("noBackground");
}
_361=(typeof _361=="object")?$.extend(true,_31e,_361):_31e;
var _362=this.each(function(){
var _363=$(this);
var opts=$.extend(true,{},_361);
var _365=_363.attr("data-options");
if(_365){
_365=$.dr.utils.evalString(_365);
$.extend(true,opts,_365);
}
_363.data("dataOptions",opts);
if(_363.attr("data-behavior")=="standard"||_363.attr("data-behavior")=="search"){
if(this.tagName.toLowerCase()=="form"){
_363.trigger("beforeIndexFields");
_363.data("behavior",new _342(this,opts));
_363.trigger("afterIndexFields");
}
}
});
_31d=false;
return _362;
}
catch(e){
$.dr.utils.logError("Error when binding form behavior",e);
}
}});
function getFormObj(_366){
if(_366.length>0){
var f=$(_366[0]).data("behavior");
return (f)?f:{};
}
}
$.namespace("dr.form",{get:function(){
return getFormObj(this);
},setOptions:function(_368){
if(_368){
$.extend(getFormObj(this).options,_368);
}
$(document).trigger("afterFormSetOptions",[_368]);
},getChangedFields:function(){
var _369=this[0];
return $(":input",_369).not(":button").not(":hidden").filter(function(){
if($.dr.utils.hasFieldChanged(this)){
return true;
}
return false;
});
},enableCheckChanges:function(flag){
getFormObj(this).checkChanges=flag;
},enableAutoFocus:function(flag){
getFormObj(this).autoFocus=flag;
},reIndex:function(){
var _36c=getFormObj(this);
if(typeof _36c.fieldsWithValidation!=="undefined"){
_36c.fieldsWithValidation=[];
}
if(typeof _36c.initFields!=="undefined"){
_36c.initFields(($.browser.msie)?$(":input",_36c):$(_36c.elements));
}
},initFields:function(_36d,_36e){
var _36f=getFormObj(this);
if(typeof _36d==="string"){
_36d=$(_36d,_36f);
}
_36e=(_36e===false)?false:true;
_36f.initFields(_36d,_36e);
},checkForChanges:function(){
var _370=$(this).dr.form.getChangedFields();
return (_370.length>0)?true:false;
},displayChangedFields:function(){
return this.each(function(){
var _371=$(this).dr.form.getChangedFields();
console.log("Changed Fields for "+this._formName);
if(_371.length>0){
for(var i=0;i<_371.length;i++){
var _373=_371[i];
console.log("ID: <b>"+_373.id+"</b>");
console.log("     VALUE:"+$(_373).dr.form.field.getDefaultValue());
console.log("     NEW_VALUE:"+$(_373).val());
}
}else{
console.log("None");
}
});
},destroy:function(){
return this.each(function(){
if($(this).data("behavior")){
$(this).data("behavior",null);
}
});
}});
$.namespace("dr.form.field",{getDefaultValue:function(){
if(this.length){
var elem=this[0];
var type=elem.type;
if(type=="checkbox"||type=="radio"){
if(elem.defaultChecked){
return true;
}else{
return false;
}
}else{
if($.nodeName(elem,"select")){
var _376=[];
var _377=elem.options;
for(var i=0;i<_377.length;i++){
if(_377[i].defaultSelected){
var val=$.dr.utils.getSelectOptionValue(_377[i]);
if(type=="select-one"){
return val;
}else{
_376.push(val);
}
}
}
if(type=="select-one"&&_376.length===0){
return $.dr.utils.getSelectOptionValue(_377[0]);
}
return (_376.length>0)?_376.join(","):"";
}else{
return elem.defaultValue.replace(/\r/g,"");
}
}
}
}});
})(jQuery);
(function($){
var _37b={PAGES_START_AT_ZERO:false,PAGING_OVERRIDE:null,SELECT_ALL_ACROSS_PAGES_ENABLED:true,SELECT_ALL_RESULTS:"all",SUBMIT_TYPE:"get",CLIENTSIDE_SORTING_ENABLED:true,SEARCH_PERSIST_CALLBACK:function(){
}};
var _37c={SORT_BY:"Sort by {0}",INVALID_NUMBER:"Please enter a valid number.",VIEW_SELECTIONS:"View Selections",CLEAR_SELECTIONS:"Clear Selections",VIEW_ALL_MSG:"Only Selected {0} are Visible",VIEW_ALL_LINK:"Remove This Filter",ITEMS:"Items",ITEM:"Item",SELECTED:"Selected",SELECT_ALL:"Select/Clear All",ALL_ITEMS_SELECTED:"All {0} Selected",SELECT_ALL_ITEMS:"Select All {0} {1}"};
var _37d="TD.actionCol input[type=checkbox], TD.actionCol input[type=radio]";
var _37e=function(_37f,_380){
var form=$("input:first",_37f.container).parents("form");
if(form.length>0){
form=form[0];
var _382=$("input.listAction",form);
if(_382.length==1){
_382.val(_380);
form.submit();
}
}
};
var list=function(_384){
this.containerId=_384;
this.searchPanel=null;
this.container=(typeof _384=="string")?$("#"+_384):_384;
this.actionRowTop=$("DIV.actionRow",this.container);
this.actionRowBottom=$("DIV.actionRowBottom",this.container);
this.submitType=_37b.SUBMIT_TYPE;
this.hasRadios=false;
this.clientSideSortingEnabled=_37b.CLIENTSIDE_SORTING_ENABLED;
this.buttonsTop=[];
this.buttonsBottom=[];
this.currentSelectedItem=null;
this.selectedItems=[];
this.disabledBtnArray=[];
this.disabledButtons=[];
this.selectedItemsValues=[];
this.persistedSelectionCount=0;
this.paddedList="";
this.persistedSelections="";
this.init();
};
list.prototype={init:function(){
this.initPaging();
this.initCheckboxes(true);
this.initSelectAll();
this.initButtons();
this.refreshState(true);
this.initSelectionCounter();
this.initSortableColumns();
this.initTabs();
},initCheckboxes:function(init){
var _386=this;
if(init){
this.items=$(_37d,this.container).click(function(){
_386.toggle(this);
}).addClass("initalized");
}else{
$("TD.actionCol input[type=checkbox]:not(.initalized), TD.actionCol input[type=radio]:not(.initalized)",this.container).click(function(){
_386.toggle(this);
}).addClass("initalized");
this.items=$(_37d,this.container);
}
this.hasRadios=(this.items.filter(":radio:first").length>0)?true:false;
},initTabs:function(){
var _387=$(".listTabsContent",this.container);
var _388=$(".listTabs",this.container);
var _389=this;
$(".search",_388).click(function(){
_389.toggleTab("search");
return false;
});
$(".columns",_388).click(function(){
_389.toggleTab("columns");
return false;
});
this.listTabsContent=_387;
this.listTabs=_388;
if($(".searchExpanded",this.container).val()=="true"&&!$(".listTabsContent",this.container).is(":visible")){
$(".search",_388).removeClass("selected");
_389.toggleTab("search");
}
$("button.search",_387).removeAttr("disabled");
},toggleTab:function(id){
var _38b=this.listTabsContent;
var _38c=this.listTabs;
var _38d=$(".search",_38c);
var _38e=$(".columns",_38c);
var _38f=(_38d.hasClass("selected"))?"search":(_38e.hasClass("selected"))?"columns":null;
$("div",_38c).removeClass("selected");
var _390=$(".searchExpanded",this.container);
if(_38f==id){
_38b.hide();
_390.val("false");
}else{
_38b.show();
$("."+id,_38c).addClass("selected");
$("."+id,_38b).show();
_38f=(id=="search")?"columns":"search";
if(id=="search"){
_390.val("true");
}else{
_390.val("false");
}
$("."+_38f,_38b).hide();
var _391=$("."+id+" :input",_38b).filter("input[type=text], textarea, select");
if(_391.length>0){
try{
_391[0].focus();
}
catch(e){
}
}
}
_37b.SEARCH_PERSIST_CALLBACK(this.container,(_38d.hasClass("selected"))?"true":"false");
},initSelectAll:function(){
var _392=this;
var th=$("thead th.actionCol:first",this.container);
if(th.length>0){
th.html("<input title=\""+_37c.SELECT_ALL+"\" type=\"checkbox\" class=\"selectAll\" />");
this.selectAllCheckbox=$("INPUT.selectAll",this.container).click(function(){
_392.toggleSelectAll();
}).get(0);
if(this.hasRadios||this.items.length===0){
$(this.selectAllCheckbox).hide().insertAfter("<span>&nbsp;</span>");
}
}
},initButtons:function(){
var _394=(this.actionRowTop)?this.actionRowTop:this.actionRowBottom;
var _395=this;
if(_394){
var _396=$("BUTTON.single,BUTTON.multiple",this.actionRowBottom);
var _397=$("BUTTON.single,BUTTON.multiple",_394).each(function(i){
var btn=$(this);
var _39a="_single";
var _39b=btn.hasClass("single");
var _39c=btn.hasClass("multiple");
if(_39b||_39c){
_395.buttonsTop[_395.buttonsTop.length]={buttonObj:this,name:this.name,isSingle:_39b,isMultiple:_39c};
if(_396.length>0){
_395.buttonsBottom[_395.buttonsBottom.length]={buttonObj:_396[i],name:_396[i].name,isSingle:_39b,isMultiple:_39c};
}
}
});
}
$("UL.buttons BUTTON[name]",this.container).not("[onclick]").click(function(){
var _39d=$(this);
var name=_39d.attr("name");
var _39f=$(this).attr("data-confirm-action");
if(_39f){
var func=function(ok){
if(ok){
_395.submitActionButton(_39d[0],name);
}
};
$.dr.confirm(_39f,func);
}else{
_395.submitActionButton(this,name);
}
});
},submitActionButton:function(btn,_3a3){
btn=(typeof btn=="String")?document.getElementById(btn):btn;
_3a3=(_3a3)?_3a3:btn.name;
_37e(this,_3a3);
},initSortableColumns:function(){
var _3a4=$("TABLE.clientSideSort:first",this.container);
var _3a5=$("TABLE THEAD A",this.container).filter(function(){
var href=this.href;
if(!href){
$(this).css("cursor","pointer");
return true;
}
href=href.replace(window.location.href,"");
return (href.length==0||href.indexOf("#")===0);
}).each(function(){
$(this).attr("title",_37c.SORT_BY.replace("{0}",$(this).text()));
});
$("TABLE THEAD TH",this.container).filter(function(){
return $("a",this).length>0;
}).addClass("sortable");
if(_3a4.length>0||(this.totalPages==1&&this.clientSideSortingEnabled)){
if(typeof $.fn.tablesorter=="function"){
if(_3a4.length==0){
_3a4=$("TABLE.dataTable",this.container);
}
var _3a7=0;
var _3a8=0;
var _3a9=($("TABLE THEAD TH.actionCol",this.container).length>0)?1:0;
$("TABLE THEAD TH",this.container).not("TH.actionCol").each(function(_3aa){
var td=$(this);
if(td.hasClass("ascending")){
_3a7=_3aa+_3a9;
}else{
if(td.hasClass("descending")){
_3a7=_3aa+_3a9;
_3a8=1;
}
}
});
var _3ac={sortList:[[_3a7,_3a8]]};
if(_3a9){
_3ac.headers={0:{sorter:false}};
}
_3a4.tablesorter(_3ac);
}
}else{
var _3ad=this;
_3a5.click(function(){
var _3ae=$(this).attr("data-sort-column");
_3ad.changeSortColumn(this,_3ae);
return false;
});
}
},initSelectionCounter:function(){
this.persistedSelections=$(".persistedSelections",this.container);
var _3af=$(".itemCount",this.container);
this.allSelected=false;
if(this.persistedSelections.length>0&&_3af.length){
this.submitType="post";
var val=this.persistedSelections.val();
if(val=="all"){
this.allSelected=true;
this.persistedSelectionCount=this.totalItems-this.items.length;
}else{
var _3b1=val.replace(/,\s/g,",");
var _3b2=","+_3b1+",";
this.items.each(function(){
var _3b3=new RegExp(","+this.value+",");
if(_3b3.test(_3b2)){
_3b2=_3b2.replace(_3b3,",");
}
});
var _3b4="";
var _3b5=_3b2.length;
if(_3b5>2){
_3b4=_3b2.substring(1,_3b2.length-1);
}
$(".persistedSelections",_3af).val(_3b4);
this.persistedSelectionCount=(_3b4.length==0)?0:_3b4.split(",").length;
}
var _3b6=$(".itemType",_3af);
this.itemType=(_3b6.length>0)?_3b6.val():_37c.ITEMS;
this.viewingOnlySelections=($(".viewingOnlySelections",_3af).val()=="true")?true:false;
var _3b7=$(".itemTypeSingular",_3af);
this.itemTypeSingular=(_3b7.length>0)?_3b7.val():_37c.ITEM;
var _3b8=$(".allSelectedMessage",_3af).val();
if(!_3b8){
_3b8=_37c.ALL_ITEMS_SELECTED.replace("{0}",this.itemType);
}
var _3b9=$(".viewingOnlySelectionsMessage",_3af).val();
if(!_3b9){
_3b9=_37c.VIEW_ALL_MSG.replace("{0}",this.itemType);
}
var _3ba=$(".viewingOnlySelectionsLink",_3af).val();
if(!_3ba){
_3ba=_37c.VIEW_ALL_LINK;
}
var _3bb=_37c.SELECT_ALL_ITEMS.replace("{0}","<strong>"+this.totalItems+"</strong>").replace("{1}",this.itemType);
var _3bc=_37c.VIEW_ALL_MSG.replace("{0}",this.itemType);
var s=[];
s.push("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr>");
s.push("<td class=\"count\">"+this.persistedSelectionCount+this.selectedItems.length+"</td>");
s.push("<td class=\"itemLabel\">"+this.itemType+"</td>");
s.push("<td>");
s.push("<div class=\"selectAll\" style=\"display:none\"><span class=\"link\">"+_3bb+"</span></div>");
s.push("<div class=\"selected\" style=\"display:none\"><span class=\"msg\">"+_3b8+"</span></div>");
s.push("</td>");
if(this.viewingOnlySelections){
s.push("<td><div class=\"selectedFilter\" ><span class=\"msg\">"+_3b9+" &nbsp;  | &nbsp; <span class=\"msgLink\">"+_3ba+"</span></span></div></td>");
}else{
s.push("<td class=\"view\"><span class=\"link\">"+_37c.VIEW_SELECTIONS+"</span></td>");
}
s.push("<td class=\"clear\"><span class=\"link\">"+_37c.CLEAR_SELECTIONS+"</span></td>");
s.push("</tr></table>");
_3af.append(s.join(""));
this.itemLabel=$(".itemLabel",_3af);
if(this.persistedSelectionCount>0){
$(".clear, .view",_3af).show();
}else{
$(".clear, .view",_3af).hide();
}
this.refreshSelectionCount();
var _3be=this;
$(".selectAll .link",_3af).click(function(){
var _3bf=_37b.SELECT_ALL_RESULTS;
if(_3be.totalPages==1){
_3bf=_3be.persistedSelections;
}
$(".persistedSelections",_3af).val(_3bf);
$(".clear, .selected",_3af).show();
$(".selectAll, .view",_3af).hide();
$(".count",_3af).text(_3be.totalItems);
});
$(".clear .link",_3af).click(function(){
_3be.selectAllCheckbox.checked=false;
_3be.toggleSelectAll();
_3be.persistedSelectionCount=0;
$(".persistedSelections",_3af).val("");
$(".count",_3af).text(0);
$("div, .selected, .clear, .view, .selectAll",_3af).hide();
if(_3be.viewingOnlySelections){
_37e(_3be,"viewAll");
}
});
if(this.allSelected){
$(".selected",_3af).show();
}
$(".view .link",_3af).click(function(){
_37e(_3be,"viewSelections");
});
$(".msgLink",_3af).click(function(){
_37e(_3be,"viewAll");
});
}
},refreshSelectionCount:function(){
var _3c0=this.persistedSelectionCount+this.selectedItems.length;
$(".itemCount .count",this.container).text(_3c0);
if(this.itemLabel){
var _3c1=this.itemType;
if(_3c0==1){
_3c1=this.itemTypeSingular;
}
this.itemLabel.text(_3c1+" "+_37c.SELECTED);
}
var view=$(".itemCount .view",this.container);
if(_3c0==0||$(".persistedSelections",this.container).val()==_37b.SELECT_ALL_RESULTS){
view.hide();
}else{
view.show();
}
},toggleSelectAllMsg:function(_3c3){
if(_37b.SELECT_ALL_ACROSS_PAGES_ENABLED){
var _3c4=$(".itemCount",this.container);
if(_3c3){
if(!this.viewingOnlySelections){
$(".selectAll").show();
$(".selected",_3c4).hide();
}
}else{
if(this.allSelected){
this.persistedSelectionCount==0;
this.allSelected=false;
$(".count",_3c4).text(0);
}
if(this.persistedSelectionCount==0){
$(".clear",_3c4).hide();
}
$("div:not(.selectedFilter)",_3c4).hide();
if($(".persistedSelections",this.container).val()==_37b.SELECT_ALL_RESULTS){
$(".persistedSelections",this.container).val("");
this.persistedSelectionCount=0;
}
}
}
},refreshState:function(init){
this.disabledBtnArray=[];
this.disabledButtons=[];
this.disabledButtonNameArray=[];
var _3c6=this;
this.selectedItems=this.items.filter(":checked").each(function(){
if(typeof this.onclick=="function"){
this.onclick();
}
_3c6.updateDisabledButtons(this,true,false);
if(init){
_3c6.highlightRow(this);
}
});
this.refreshButtonState();
this.refreshSelectAllState(false);
},updateDisabledButtons:function(item,add,_3c9){
var _3ca=item.getAttribute("data-disabled-buttons");
if(_3ca!==undefined&&_3ca!==null){
var _3ca=_3ca.trim().split(" ");
for(var i=0;i<_3ca.length;i++){
var _3cc=_3ca[i];
var _3cd=0;
var _3ce=this.disabledButtons[_3cc];
if(_3ce!==undefined){
if(_3c9&&!add){
_3cd=_3ce-1;
}else{
_3cd=_3ce+1;
}
}else{
if(add){
_3cd=1;
}
}
this.disabledButtons[_3cc]=_3cd;
}
}
},refreshButtonState:function(){
for(var j=0;j<this.buttonsTop.length;j++){
var btn=this.buttonsTop[j];
var _3d1=(this.selectedItems.length==0)?true:false;
if(this.disabledButtons[btn.name]!==undefined){
if(this.disabledButtons[btn.name]>0){
_3d1=true;
}
}
if(!_3d1){
if(this.selectedItems.length>=2&&btn.isSingle){
_3d1=true;
}
}
btn.buttonObj.disabled=_3d1;
if(this.buttonsBottom.length>0){
this.buttonsBottom[j].buttonObj.disabled=_3d1;
}
}
},refreshSelectAllState:function(_3d2){
if(this.selectAllCheckbox){
if(!this.selectAllCheckbox.disabled){
this.selectAllCheckbox.checked=(this.selectedItems.length==this.items.length)?true:false;
}
}
if(!_3d2){
this.refreshSelectionCount();
}
},toggle:function(item){
if(item.type=="radio"){
if(this.currentSelectedItem!=item&&this.currentSelectedItem!==null){
this.highlightRow(this.currentSelectedItem);
}
this.currentSelectedItem=item;
}else{
if(!item.checked){
this.toggleSelectAllMsg(false);
}
}
this.highlightRow(item);
this.refreshSelectionCount();
this.selectedItems=this.items.filter(":checked");
this.updateDisabledButtons(item,item.checked,true);
this.refreshButtonState();
this.refreshSelectAllState(false);
},toggleSelectAll:function(){
var _3d4=this.items;
var _3d5=(this.selectAllCheckbox&&this.selectAllCheckbox.checked)?true:false;
this.items.attr("checked",_3d5);
this.tableRows=$("TABLE.dataTable > TBODY > TR:not(.unselectable)",this.container);
if(_3d5){
this.tableRows.addClass("selected");
}else{
this.tableRows.removeClass("selected");
}
this.refreshState();
this.toggleSelectAllMsg(_3d5);
},highlightRow:function(obj){
var _3d7=(obj.checked)?true:false;
var row=obj.parentNode.parentNode;
if(_3d7){
$(row).addClass("selected");
}else{
$(row).removeClass("selected");
}
},changeSortColumn:function(obj,_3da){
var _3db="ascending";
var _3dc=$(obj).attr("data-default-sort-direction");
if(_3dc){
if(_3dc.indexOf("desc")>-1||_3dc.indexOf("descending")>-1){
_3db="descending";
}
}
var _3dd=_3db;
if($(obj.parentNode).hasClass("ascending")||$(obj.parentNode).hasClass("descending")){
var _3de=$(obj.parentNode).hasClass("descending")?"descending":"ascending";
_3dd=(_3de=="ascending")?"descending":"ascending";
}
if(this.sortColumn.length>0&&this.sortColumn.length>0){
if(DR.Widgets.Button!==undefined){
DR.Widgets.Button.disableSearchButton=function(){
};
}
this.sortColumn.val(_3da);
this.sortDirection.val(_3dd);
this.changePage(1,false,null);
}else{
if(console){
console.log("sortColumn and/or  sortDirection not found");
}
}
},initPaging:function(){
this.controls=$(".pagination",this.container);
this.itemCountContainers=$(".items",this.container);
this.refreshItemCount();
var _3df=this;
$("A",this.controls).click(function(){
_3df.handlePagerClick(this);
return false;
});
this.pageInputs=$("INPUT.currentPage",this.controls);
this.pageInputs.val(this.originalPageValue);
this.pageInputs.keypress(function(evt){
_3df.doEnterPush(evt,this);
});
this.pageUrl=$(".pageUrl",this.container);
this.searchFilters=$(".searchFilters",this.container);
this.sortColumn=$(".sortColumn",this.container);
this.sortDirection=$(".sortDirection",this.container);
this.resetPagerState();
},refreshItemCount:function(){
this.originalPage=$(".originalPage",this.container);
this.originalPageValue=parseInt(this.originalPage.val(),10);
this.currentPage=this.originalPageValue;
this.totalPages=parseInt($("input.totalPages",this.container).val(),10);
this.totalItems=$(".totalItems",this.container).val();
this.firstItem=$(".firstItemOnPage",this.container).val();
this.lastItem=$(".lastItemOnPage",this.container).val();
$(".totalItems",this.itemCountContainers).text(this.totalItems);
$(".firstItem",this.itemCountContainers).text(this.firstItem);
$(".lastItem",this.itemCountContainers).text(this.lastItem);
this.itemCountContainers.css("visibility","visible");
},handlePagerClick:function(link){
link=$(link);
if(link.hasClass("off")){
return;
}else{
if(link.hasClass("first")){
this.changePage(1);
}else{
if(link.hasClass("prev")){
this.changePage(this.originalPageValue-1);
}else{
if(link.hasClass("next")){
this.changePage(this.originalPageValue+1);
}else{
if(link.hasClass("last")){
this.changePage(this.totalPages);
}
}
}
}
}
},resetPagerState:function(){
var _3e2=this.totalPages;
var _3e3=this.currentPage;
$(".totalPages",this.controls).text(_3e2);
var _3e4=false;
if(_3e2==1){
_3e4=true;
$("A",this.controls).addClass("off");
}else{
if(_3e3==1){
$("A.first, A.prev",this.controls).addClass("off");
$("A.next, A.last",this.controls).removeClass("off");
}else{
if(this.currentPage==_3e2){
$("A.first, A.prev",this.controls).removeClass("off");
$("A.next, A.last",this.controls).addClass("off");
}else{
$("A",this.controls).removeClass("off");
}
}
}
if(_3e4){
this.pageInputs.attr("disabled","disabled");
}else{
this.pageInputs.removeAttr("disabled");
}
},doEnterPush:function(evt,el){
var key=(evt.which)?evt.which:event.keyCode;
if(key==13){
var _3e8=el.value;
if(isNaN(_3e8)||_3e8<0){
alert(_37c.INVALID_NUMBER);
el.select();
if(evt.preventDefault){
evt.preventDefault();
}else{
if(window.event){
window.event.cancelBubble=true;
window.event.returnValue=false;
}
}
return false;
}else{
if(_3e8>this.totalPages){
_3e8=this.totalPages;
}else{
if(parseInt(_3e8,10)===0){
_3e8=1;
}
}
this.changePage(_3e8,true,evt);
}
}
},changePage:function(_3e9,_3ea,evt){
this.currentPage=_3e9;
if(_37b.PAGES_START_AT_ZERO){
_3e9--;
}
if(typeof _37b.PAGING_OVERRIDE=="function"){
_37b.PAGING_OVERRIDE(this.container,_3e9);
}else{
if(this.submitType.toLowerCase()=="post"){
var _3ec=$(".currentPage",this.container);
_3ec.val(_3e9);
_3ec[0].form.submit();
}else{
var url="";
url+=this.pageUrl.val()+"?";
url+=this.searchFilters.val();
url+="&"+this.sortColumn[0].name+"="+this.sortColumn.val();
url+="&"+this.sortDirection[0].name+"="+this.sortDirection.val();
url+="&page="+_3e9;
window.location=url;
}
}
if(_3ea){
if(evt.preventDefault){
evt.preventDefault();
}else{
if(window.event){
window.event.cancelBubble=true;
window.event.returnValue=false;
}
}
return false;
}
}};
$.dr.list={getMessages:function(){
return _37c;
},getDefaults:function(){
return _37b;
},setDefaults:function(_3ee){
if(_3ee){
$.extend(_37b,_3ee);
}
$(document).trigger("afterListSetDefaults",[_3ee]);
},setMessages:function(_3ef){
if(_3ef){
$.extend(_37c,_3ef);
}
$(document).trigger("afterListSetMessages",[_3ef]);
}};
var _3f0=function(evt,_3f2){
var _3f3=$("DIV.listControl",_3f2).each(function(_3f4){
var _3f5=$("TABLE.dataTable",this);
if(_3f5.length>0||$("div.listTabs",this).length>0){
var id=this.getAttribute("id");
if(!id){
id="list_"+_3f4+"_"+new Date().getTime();
this.id=id;
}
$(this).data("list",new list(id));
}
});
};
$.dr.addUnobtrusiveEvent(_3f0);
$.namespace("dr",{list:function(){
return this.each(function(){
var _3f7=this;
if(this.tagName!="body"){
_3f7=this.parentNode;
}
_3f0(null,_3f7);
});
}});
$.namespace("dr.list",{refreshState:function(){
return this.each(function(){
var _3f8=$(this).data("list");
if(_3f8){
_3f8.refreshItemCount();
_3f8.resetPagerState();
_3f8.initCheckboxes(false);
_3f8.refreshState();
}
});
}});
})(jQuery);
DR.Utils.Logger=function(id){
this.id=id;
this.items=null;
this.inited=false;
this.disabled=false;
};
DR.Utils.Logger.prototype={init:function(str){
if(this.overlay===undefined){
var d=document.createElement("div");
d.id=this.id+"_logger";
var c=document.createElement("div");
c.className="modalScrollerMediumHeight";
c.style.width="300px";
c.style.height="300px";
this.overlayContent=c;
var b=document.createElement("div");
b.className="pageButtons";
b.innerHTML="<button onclick=\""+this.id+".clear();\" >Clear</button><button onclick=\"overlayStack.hideCurrent();\" style=\"margin-right:0;\">Close</button>";
d.appendChild(c);
d.appendChild(b);
var _3fe=$("div.content:first")||$("body");
_3fe.append(d);
this.overlay=new DR.Widgets.InlineModelessOverlay(this.id+"_logger");
this.overlay.setTitle("Logger");
this.overlay.setSize(350,350);
this.overlay.show();
this.inited=true;
}
},hide:function(str){
if(this.inited){
overlayStack.hideCurrent();
}
},clear:function(str){
if(this.inited){
this.items=null;
this.overlayContent.innerHTML="";
}
},disable:function(){
this.disabled=true;
},log:function(str,_402){
if(this.disabled){
return;
}
if(!this.inited){
this.init();
overlayStack.disableCurrent();
}
str=str+"";
if(this.items===null){
this.items=[str];
}else{
this.items.push(str);
}
if(_402!==false){
this.refresh();
}
},refresh:function(str){
var h="<table cellpadding=\"0\" cellspacing=\"0\" class=\"dataTable\" style=\"border:1px solid #666;\">";
h+="<thead><th style=\"width:20px;\">ID</th><th>Value</th></thead>";
h+="<tbody>";
var _405=this.items;
for(var i=0;i<_405.length;i++){
h+="<tr><td>"+(i+1)+"</td><td>"+_405[i]+"</td></tr>";
}
h+="</tbody></table>";
this.overlayContent.innerHTML=h;
this.refreshScroll();
var _407=this;
var func=function(){
_407.refreshScroll();
};
window.setTimeout(func,1000);
},refreshScroll:function(str){
this.overlayContent.scrollTop=parseInt(this.overlayContent.offsetHeight,10);
}};
var DR_Utils_Logger=new DR.Utils.Logger("DR_Utils_Logger");
function log(_40a){
DR_Utils_Logger.log(_40a);
}
(function($){
$.namespace("dr",{message:function(type){
return this.each(function(){
var _40d=$(this);
var _40e="messageDialog";
var _40f=type;
_40d.wrap("<div class=\""+_40e+"\" ><div class=\"messageDialogContent\"></div></div>").removeAttr("style").addClass(_40f).parent().dr.shadows().prepend("<a class=\"close\" href=\"#\">Close</a>");
$("."+_40e).css({"top":"-"+$("."+_40e).height()+"px","left":($(window).width()/2)-($("."+_40e).width()/2)+"px"}).animate({top:0},1000);
$("a.close").click(function(){
$("."+_40e).animate({top:"-"+$("."+_40e).height()+"px"},500);
return false;
});
$(window).resize(function(){
$("."+_40e).animate({"left":($(window).width()/2)-($("."+_40e).width()/2)+"px"});
});
});
}});
})(jQuery);
DR.Widgets.ModelessOverlay=function(id,url,_412){
this.id=id;
this.parentId=-1;
this.parentWindowIndex=-1;
this.url=url;
this.stackID="";
this.title="&nbsp;";
this.built=false;
this.isOpen=false;
this.hasFocus=false;
this.hasChildren=false;
this.hasModalChildren=false;
this.blurWindow=false;
this.isInStack=false;
this.modalMaskBuilt=false;
this.modelessMaskBuilt=false;
this.loading=false;
this.cancelFunction="";
this.callBackFunction="";
this.abortFunction="";
this.modalType="Modeless";
this.inline=false;
this.titleBarHeight=28;
this.borderWidth=2;
this.inlineDialogPadding=10;
this.shadowRight=36;
this.shadowBottom=36;
this.contentWidth=580;
this.contentHeight=520;
this.waitToLoadIframe=true;
this.ieTimeout=false;
this.enableDragging=true;
this.dragObject=null;
this.autoCenter=true;
this.scrollBarsHidden=false;
this.width=this.contentWidth+this.shadowRight+(this.borderWidth*2);
this.height=this.contentHeight+this.shadowBottom+this.titleBarHeight+(this.borderWidth*2);
this.optionalClassName=(_412)?_412:null;
};
DR.Widgets.ModelessOverlay.prototype={show:function(){
this.checkBrowser();
if(window!=top&&!this.inline){
this.addToStack();
parent.overlayStack.addChildWindow(this,overlayStack.currentWindow);
}else{
if(!this.built){
this.addToStack();
this.build();
}
if(!this.modalMaskBuilt){
this.buildModalMask();
}
if(this.modalType=="Modal"){
this.modalMask.style.display="block";
this.modalMaskIEOver.style.display="block";
this.modalMask.className="modalOverlayMask";
}
if(this.modalType=="Modeless"){
this.modalMask.className="modelessOverlayMask";
}
this.isOpen=true;
this.position();
var func=function(){
overlayStack.getCurrent().center(false);
};
window.setTimeout(func,10);
this.focus();
this.refreshMaskSize();
this.refreshSize();
this.dialog.style.display="block";
this.showLoading();
this.hideDocScrollBars();
this.center();
if(!this.inline){
if(this.waitToLoadIframe){
var _414=function(){
overlayStack.buildIframe();
};
window.setTimeout(_414,50);
this.ieTimeout=true;
}else{
this.buildIframe();
}
if(this.modalType=="Modal"){
this.addEvent(document,"keypress",DR.Utils.suppressKeypress,1);
}
}
}
},position:function(){
if(this.anchorId){
this.setPositionTo();
}else{
this.center();
}
},setPositionTo:function(){
var _415=new DR.Utils.Position(this.dialog);
this.dialog.style.position="absolute";
_415.setRelativePosition(this.anchorId,DR.Utils.Position.ON_LEFT,DR.Utils.Position.DRAW_RIGHT,DR.Utils.Position.ON_TOP,DR.Utils.Position.DRAW_DOWN,(0-this.shadowRight/2),0,false);
},center:function(_416){
if(!this.anchorId){
var w=this.width;
var h=this.height;
overlayStack.getPageSize();
var x,y;
var _41a=0;
var _41b=0;
var _41c=0;
var _41d=(DR.Utils.BrowserDetect.browser=="Explorer"&&DR.Utils.BrowserDetect.version<7)?true:false;
if(document.documentElement){
if(_41d){
if($("body.modalPage").length==0&&!_416){
_41a=18;
_41b=1;
_41c=9;
}
x=document.documentElement.scrollLeft+document.body.scrollLeft;
y=document.documentElement.scrollTop+document.body.scrollTop;
}
}
if(this.autoCenter||(!this.autoCenter&&!_416)){
if(_41d){
this.dialog.style.left=(x+(overlayStack.doc.windowWidth/2)-((w-_41a)/2+_41b))+"px";
this.dialog.style.top=(y+(overlayStack.doc.windowHeight/2)-((h-_41a)/2+_41c))+"px";
}else{
this.dialog.style.left=Math.round(overlayStack.doc.windowWidth/2-w/2)+"px";
this.dialog.style.top=Math.round(overlayStack.doc.windowHeight/2-h/2)+"px";
}
}
}
},refreshMaskSize:function(){
overlayStack.refreshMaskSize();
},addToStack:function(){
if(!this.isInStack){
this.stackId=overlayStack.add(this);
this.isInStack=true;
}
},checkBrowser:function(){
if(document.all){
this.browserType="IE";
this.filtersSupported=true;
this.iframeTransparency=true;
this.waitToLoadIframe=true;
}else{
this.broswerType="Standard";
this.filtersSupported=false;
this.iframeTransparency=false;
this.waitToLoadIframe=false;
}
this.isIE7=(navigator.appVersion.indexOf("MSIE 7")>-1);
},focus:function(){
if(overlayStack.checkAnyOpen()&&this.isOpen){
if(!this.hasChildren&&!this.hasModalChildren){
overlayStack.bringToFront(this.stackId);
}else{
if(this.hasChildren){
window.frames[this.iframe.id].overlayStack.focusCurrent(false);
}
}
if(window!=top){
parent.overlayStack.setCurrentHasChildren(true);
parent.overlayStack.blurCurrent();
}
overlayStack.blurOtherWindows();
}else{
if(window!=top){
parent.overlayStack.focusCurrent(true);
}
}
this.hasFocus=true;
this.isBlurred=false;
},blur:function(){
DR.Utils.addCSSClass(this.contentTable,"inActive");
if(this.hasChildren&&this.blurWindow){
this.blurWindow=false;
window.frames[this.iframe.id].overlayStack.blurCurrent();
}
this.isBlurred=true;
},cancel:function(){
if(typeof this.cancelFunction=="function"){
this.cancelFunction();
}
this.close();
},setCancelFunction:function(func){
if(typeof func=="function"){
this.cancelFunction=func;
}
},setCallBackFunction:function(func){
if(typeof func=="function"){
this.callBackFunction=func;
}
},setAbortFunction:function(func){
if(typeof func=="function"||func===null){
this.abortFunction=func;
}
},callBack:function(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,_42a){
if(typeof this.callBackFunction=="function"){
this.callBackFunction(arg1,arg2,arg3,arg3,arg4,arg5,arg6,arg7,arg8,arg9,_42a);
}
},close:function(){
if(typeof this.abortFunction=="function"){
this.abortFunction();
}else{
this.isOpen=false;
this.hasFocus=false;
this.dialog.style.display="none";
overlayStack.setCurrentWindow(this.stackId);
if(!overlayStack.checkAnyModalOpen()){
if(this.modalType=="Modal"){
this.modalMask.style.display="none";
this.modalMaskIEOver.style.display="none";
this.enableScrollBars();
}
}
if(!overlayStack.checkAnyModelessOpen()||!overlayStack.checkAnyModelessOpen()){
if(window!=top){
parent.overlayStack.setCurrentHasChildren(false);
parent.overlayStack.focusCurrent(true);
}
}
if(!this.inline){
if(this.parentId>-1&&this.parentWindowIndex>-1){
window.frames[overlayStack.windows[this.parentId].iframe.id].overlayStack.destroyWindow(this.parentWindowIndex);
}
overlayStack.setCurrentHasModalChildren(false);
overlayStack.destroyCurrent();
if(this.modalType=="Modal"){
this.removeEvent(document,"keypress",DR.Utils.suppressKeypress,1);
}
}else{
overlayStack.bringOpenOverlayToFront();
}
}
},hideDocScrollBars:function(){
if(this.modalType=="Modal"){
if(this.browserType=="IE"&&DR.Utils.BrowserDetect.version<7){
var a=document.getElementsByTagName("html")[0];
a.style.overflow="hidden";
this.scrollBarsHidden=true;
}else{
}
}
},enableScrollBars:function(){
if(!overlayStack.checkAnyModalOpen()&&this.modalType=="Modal"){
if(this.browserType=="IE"){
var a=document.getElementsByTagName("html")[0];
a.style.overflow="auto";
this.scrollBarsHidden=false;
}else{
}
}
},hideLoading:function(){
if(!this.inline&&!this.ieTimeout&&this.iframeSpacer){
this.iframeSpacer.style.display="none";
this.iframe.style.display="block";
this.iframe.style.visibility="visible";
this.loading=false;
if(document.addEventListener){
}
overlayStack.setCurrentHasChildren(false);
}
},showLoading:function(){
if(!this.inline){
this.iframeSpacer.style.display="block";
if(this.iframe){
this.iframe.style.display="none";
this.iframe.style.visibility="hidden";
}
this.loading=true;
}
},buildModalMask:function(){
if(document.getElementById("modalMask")===null){
var d=document.createElement("div");
d.id="modalMask";
d.className="modalOverlayMask";
var f=document.createElement("IFRAME");
f.className="modalOverlayMaskIframe";
f.id="modalOverlayMaskIframe";
f.src=$.dr.BLANK_PAGE_URL;
d.appendChild(f);
var dd=document.createElement("div");
dd.className="modalOverlayMaskDiv";
dd.id="modalOverlayMaskDiv";
this.modalMaskIframe=f;
this.modalMaskIEOver=DR.Utils.addToBody(dd);
this.modalMask=DR.Utils.addToBody(d);
f=null;
dd=null;
d=null;
}else{
this.modalMask=document.getElementById("modalMask");
this.modalMaskIframe=document.getElementById("modalOverlayMaskIframe");
this.modalMaskIEOver=document.getElementById("modalOverlayMaskDiv");
}
this.modalMaskBuilt=true;
},buildModelessMask:function(){
if(!document.body.modelessMask){
var d=document.createElement("div");
d.id="modelessMask";
d.className="modelessOverlayMask";
this.modelessMask=DR.Utils.addToBody(d);
d=null;
}
this.modelessMaskBuilt=true;
},build:function(){
var _431=document.getElementsByTagName("BODY")[0];
var _432=document.createElement("div");
_432.id="modal_"+this.id;
_432.className="modalOverlay";
var _433=this;
var ie6=false;
var _435=" colspan=\"2\"  rowspan=\"2\"";
if(DR.Utils.BrowserDetect.browser=="Explorer"&&DR.Utils.BrowserDetect.version<7){
ie6=true;
_435="";
this.shadowRight=8;
this.shadowBottom=8;
}
var s=[];
var _437="";
if(this.optionalClassName!=null){
_437="class=\""+this.optionalClassName+"\"";
}
var _438="";
if(this.disabled){
_438="style=\"display:none\"";
}
if(this.modalType=="Modeless"){
s[s.length]="<div class=\"modalWrapper\" id=\"{0}_modalWrapper\">";
s[s.length]="<div class=\"divFloat\" id=\"{0}_divFloat\">";
}
s[s.length]="<div id=\"{0}_contentTable\" "+_437+" >";
s[s.length]="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"wrapperTbl\">";
if(!ie6){
s[s.length]="<tr><td colspan=\"2\" class=\"topLeft\">&nbsp;</td><td colspan=\"2\" class=\"topRight\">&nbsp;</td></tr>";
s[s.length]="<tr><td class=\"leftTop\">&nbsp;</td>";
}else{
s[s.length]="<tr>";
}
s[s.length]="<td "+_435+" id=\"{0}_content\" >";
s[s.length]="<div class=\"inner\" id=\"{0}_inner\" >";
s[s.length]="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"titleBar\" id=\"{0}_titleTbl\">";
s[s.length]="<tr>";
s[s.length]="<td class=\"title\" ><div id=\"{0}_title\">"+this.title+"</div></td>";
s[s.length]="<td class=\"close\" "+_438+" title=\""+DR.Widgets.ModalOverlay.CLOSE_WINDOW+"\"><a href=\"#\" onmousedown=\"if (window.event){window.event.cancelBubble = true;}else{event.preventDefault();event.stopPropagation();}\" id=\"{0}_closeLink\" ></a></td>";
s[s.length]="</tr>";
s[s.length]="</table>";
if(!this.inline){
s[s.length]="<div id=\"{0}_iframeSpacer\" >";
s[s.length]="<div class=\"modalLoading\" id=\"{0}_loadingDiv\" >";
s[s.length]="<div class=\"modalLoadingTextWrapper\" id=\"{0}_loadingTextWrapper\" >";
s[s.length]="<div class=\"modalLoadingText\">"+DR.Widgets.ModalOverlay.LOADING_WINDOW+"</div>";
s[s.length]="<div class=\"modalLoadingImg\"></div>";
s[s.length]="</div>";
s[s.length]="</div>";
s[s.length]="</div>";
}
s[s.length]="</div>";
s[s.length]="</td>";
s[s.length]="<td class=\"rightTop\">&nbsp;</td></tr>";
if(!ie6){
s[s.length]="<tr><td class=\"leftBottom\">&nbsp;</td><td class=\"rightBottom\">&nbsp;</td></tr>";
s[s.length]="<tr><td colspan=\"2\" class=\"bottomLeft\">&nbsp;</td><td colspan=\"2\" class=\"bottomRight\">&nbsp;</td></tr>";
}else{
s[s.length]="<tr><td class=\"bottomLeft\">&nbsp;</td><td class=\"bottomRight\">&nbsp;</td></tr>";
}
s[s.length]="</table>";
s[s.length]="</div>";
if(this.modalType=="Modeless"){
s[s.length]="</div>";
s[s.length]="<iframe  src=\""+$.dr.BLANK_PAGE_URL+"\" class=\"modelessOverlayMaskIframe\" id=\"{0}_modelessOverlayMaskIframe\" ></iframe>";
s[s.length]="</div>";
}
s=s.join("");
s=s.replace(/\{0\}/g,this.id);
_432.innerHTML=s;
if(this.inline){
var _439=document.getElementById(this.inlineId);
_439.style.display="block";
dParent=_439.parentNode;
this.dialog=dParent.insertBefore(_432,_439);
var _43a=document.createElement("div");
_43a.className="inlineDialog";
getElem(this.id+"_inner").appendChild(_43a);
this.dialogClone=_43a;
_43a.appendChild(_439);
}else{
this.dialog=_431.appendChild(_432);
this.iframeWrapper=getElem(this.id+"_inner");
this.iframeSpacer=getElem(this.id+"_iframeSpacer");
this.loadingDiv=getElem(this.id+"_loadingDiv");
this.loadingTextWrapper=getElem(this.id+"_loadingTextWrapper");
}
if(this.modalType=="Modeless"){
this.modelessMaskingDiv=getElem(this.id+"_divFloat");
this.modelessMaskingIframe=getElem(this.id+"_modelessOverlayMaskIframe");
}
this.windowIcon=getElem(this.id+"_title");
this.contentTable=getElem(this.id+"_contentTable");
this.closeLink=getElem(this.id+"_closeLink");
getElem(this.id+"_closeLink").onclick=function(){
_433.cancel();
return false;
};
function myDialogInitDrag(_43b){
_433.initDrag(_43b);
}
if(this.enableDragging){
getElem(this.id+"_titleTbl").onmousedown=myDialogInitDrag;
}
overlayStack.addWindowEventHandlers();
function eventMyDialogFocus(_43c){
_433.focus();
}
_432.onclick=eventMyDialogFocus;
s=null;
function cleanupIE_Events(){
_432.detachEvent("onclick",eventMyDialogFocus);
overlayStack.destroyAll();
window.detachEvent("onunload",cleanupIE_Events);
}
if(this.browserType=="IE"){
window.attachEvent("onunload",cleanupIE_Events);
}else{
_432=null;
}
this.built=true;
},buildIframe:function(){
this.iframeCountID=overlayStack.getNewIframeID();
var _43d=document.createElement("IFRAME");
_43d.id="modal_iframe_"+this.iframeCountID;
_43d.name="modal_iframe_"+this.iframeCountID;
_43d.frameBorder=0;
if(this.iframeTransparency){
_43d.allowTransparency=true;
}
var self=this;
function myDialogHideLoading(){
self.hideLoading();
}
function myDialogFocus(){
self.focus();
}
if(document.attachEvent){
_43d.attachEvent("onload",myDialogHideLoading);
}else{
_43d.addEventListener("load",myDialogHideLoading,false);
}
if(this.url.indexOf("modalTime")==-1){
var _43f=new Date().getTime();
if(this.url.indexOf("?")==-1){
this.url+="?modalTime="+_43f;
}else{
this.url+="&modalTime="+_43f;
}
}
_43d.src=this.url;
_43d.style.display="none";
this.iframeWrapper.appendChild(_43d);
this.iframe=_43d;
function cleanupIE_Events(){
if(_43d){
_43d.detachEvent("onload",myDialogHideLoading);
_43d.detachEvent("onfocus",myDialogFocus);
}
window.detachEvent("onunload",cleanupIE_Events);
}
if(this.browserType=="IE"){
window.attachEvent("onunload",cleanupIE_Events);
}else{
_43d=null;
}
this.refreshSize();
},refreshSize:function(){
overlayStack.getPageSize();
this.width=this.contentWidth+this.shadowRight+(this.borderWidth*2);
this.height=this.contentHeight+this.shadowBottom+this.titleBarHeight+(this.borderWidth*2);
if(this.width>overlayStack.doc.windowWidth){
this.width=overlayStack.doc.windowWidth;
this.contentWidth=this.width-this.shadowRight-(this.borderWidth*2);
}
if(this.height>overlayStack.doc.windowHeight){
this.height=overlayStack.doc.windowHeight;
this.contentHeight=this.height-this.shadowBottom-this.titleBarHeight-(this.borderWidth*2);
}
var w=this.width+"px";
var h=this.height+"px";
var cw=this.contentWidth+"px";
var ch=this.contentHeight+"px";
this.dialog.style.width=w;
this.dialog.style.height=h;
if(!this.inline){
this.iframeSpacer.style.width=cw;
this.iframeSpacer.style.height=ch;
if(this.iframe){
this.iframe.style.width=cw;
this.iframe.style.height=ch;
}
this.loadingDiv.style.width=cw;
this.loadingDiv.style.height=ch;
this.loadingTextWrapper.style.top=(Math.round(this.contentHeight/2)-40)+"px";
this.loadingTextWrapper.style.left=(Math.round(this.contentWidth/2)-100)+"px";
}
if(this.modalType=="Modeless"){
this.modelessMaskingDiv.style.width=w;
this.modelessMaskingDiv.style.height=h;
this.modelessMaskingIframe.style.width=w;
this.modelessMaskingIframe.style.height=h;
}
},setSize:function(w,h){
this.contentWidth=parseInt(w,10);
this.contentHeight=parseInt(h,10);
if(this.inline){
this.contentWidth+=this.inlineDialogPadding*2;
this.contentHeight+=this.inlineDialogPadding*2;
}
this.width=this.contentWidth+this.shadowRight+(this.borderWidth*2);
this.height=this.contentHeight+this.shadowBottom+this.titleBarHeight+(this.borderWidth*2);
},setAnchorId:function(_446){
if(_446.length>0){
this.anchorId=_446;
}
},setDragNDrop:function(v){
this.enableDragging=v;
},setAutoCenter:function(v){
this.autoCenter=v;
},setTitle:function(_449){
if(_449!==""){
this.title=_449;
if(this.windowIcon){
this.windowIcon.innerHTML=_449;
}
}
},setDisabled:function(flag){
this.disabled=flag;
},disable:function(){
this.disabled=true;
this.closeLink.style.visibility="hidden";
},initDrag:function(_44b){
if(this.dragObject===null){
this.dragObject=new DR.Utils.DragObject(this.dialog);
this.dragObject.setType("Absolute",this);
this.dragObject.setMoveDragCallback(true);
this.dragObject.setStopDragCallback(true);
}
this.dragObject.initDrag(_44b);
},moveDrag:function(){
if(!this.inline){
this.loadingDiv.style.visibility="hidden";
this.iframe.style.display="none";
this.iframeSpacer.style.display="block";
}else{
this.dialogClone.style.visibility="hidden";
}
if(this.filtersSupported){
this.contentTable.style.filter="alpha(opacity=50)";
}else{
this.contentTable.style.opacity="0.5";
}
if(this.modalType=="Modeless"){
this.modalMask.className="modelessOverlayMask";
this.modalMask.style.display="block";
this.modalMaskIEOver.style.display="block";
}
this.focus();
},stopDrag:function(){
if(!this.inline){
if(this.loading){
this.loadingDiv.style.visibility="visible";
}else{
this.iframeSpacer.style.display="none";
this.iframe.style.display="block";
}
}else{
this.dialogClone.style.visibility="visible";
}
if(this.filtersSupported){
this.contentTable.style.filter="";
}else{
this.contentTable.style.opacity="1";
}
if(this.modalType=="Modeless"){
this.modalMask.style.display="none";
this.modalMaskIEOver.style.display="none";
}
},addEvent:function(obj,evt,fn,_44f){
if(obj.addEventListener){
obj.addEventListener(evt,fn,Boolean(_44f));
return true;
}else{
if(obj.attachEvent){
var r=obj.attachEvent("on"+evt,fn);
return r;
}else{
return false;
}
}
},removeEvent:function(obj,evt,fn,_454){
if(obj.addEventListener){
obj.removeEventListener(evt,fn,Boolean(_454));
return true;
}else{
if(obj.attachEvent){
var r=obj.detachEvent("on"+evt,fn);
return r;
}else{
return false;
}
}
}};
DR.Widgets.ModelessOverlay.open=function(url,_457,_458,_459){
var _45a=new Date().getTime();
var m=new DR.Widgets.ModelessOverlay("modal_"+_45a,url);
var t=_459;
if(!_459){
t="&nbsp;";
}
m.setTitle(t);
m.setSize(_457,_458);
m.show();
return m;
};
DR.Widgets.ModelessOverlay.close=function(){
parent.overlayStack.closeCurrent();
};
DR.Widgets.ModalOverlay=function(id,url,_45f){
this.id=id;
this.url=url;
this.optionalClassName=(_45f)?_45f:null;
};
DR.Widgets.ModalOverlay.prototype=new DR.Widgets.ModelessOverlay();
DR.Widgets.ModalOverlay.prototype.modalType="Modal";
DR.Widgets.ModalOverlay.CLOSE_WINDOW="Close Window";
DR.Widgets.ModalOverlay.LOADING_WINDOW="Loading please wait...";
DR.Widgets.ModalOverlay.open=function(url,_461,_462,_463){
var _464=new Date().getTime();
var m=new DR.Widgets.ModalOverlay("modal_"+_464,url);
var t=_463;
if(!_463){
t="&nbsp;";
}
m.setTitle(t);
m.setSize(_461,_462);
m.show();
return m;
};
DR.Widgets.ModalOverlay.close=function(){
parent.overlayStack.closeCurrent();
};
DR.Widgets.InlineModalOverlay=function(id,_468){
this.id=id;
this.inlineId=id;
this.optionalClassName=(_468)?_468:null;
};
DR.Widgets.InlineModalOverlay.prototype=new DR.Widgets.ModelessOverlay();
DR.Widgets.InlineModalOverlay.prototype.modalType="Modal";
DR.Widgets.InlineModalOverlay.prototype.inline=true;
DR.Widgets.InlineModelessOverlay=function(id,_46a){
this.id=id;
this.inlineId=id;
this.optionalClassName=(_46a)?_46a:null;
};
DR.Widgets.InlineModelessOverlay.prototype=new DR.Widgets.ModelessOverlay();
DR.Widgets.InlineModelessOverlay.prototype.modalType="Modeless";
DR.Widgets.InlineModelessOverlay.prototype.inline=true;
DR.Widgets.ModalOverlay.iframeFunctionCallback="";
DR.Widgets.ModalOverlay.iframeCallbackTimeout=function(){
eval(DR.Widgets.ModalOverlay.iframeFunctionCallback);
};
DR.Widgets.ModalOverlay.iframeCallback=function(func){
DR.Widgets.ModalOverlay.iframeFunctionCallback=func;
setTimeout("DR.Widgets.ModalOverlay.iframeCallbackTimeout()",1);
};
(function($){
var _46d={type:"modal",inline:false,width:620,height:590,url:null,id:null,title:"&nbsp;",cancelFunction:null,callBackFunction:null,abortFunction:null,draggable:true,centered:true,relativePositioned:false,optionalClassName:null,showCloseIcon:true};
$.dr.overlay=function(_46e){
_46e=$.extend({},_46d,_46e);
var m,id=_46e.id,url=_46e.url,type=_46e.type,inline=_46e.inline,optionalClassName=_46e.optionalClassName;
if(inline){
var d=$("#"+id).data("overlay");
if(d){
d.show();
return;
}
}else{
if(url.length===0){
return;
}
}
var _471=DR.Widgets;
if(!id){
id="modal_"+new Date().getTime();
}
if(!inline&&type=="modal"){
m=new _471.ModalOverlay(id,url,optionalClassName);
}else{
if(!inline&&type=="modeless"){
m=new _471.ModelessOverlay(id,url,optionalClassName);
}else{
if(type=="modal"){
m=new _471.InlineModalOverlay(id,optionalClassName);
}else{
if(type=="modeless"){
m=new _471.InlineModelessOverlay(id,optionalClassName);
}
}
}
}
m.setTitle(_46e.title);
m.setSize(_46e.width,_46e.height);
if(!_46e.draggable){
m.setDragNDrop(false);
}
if(!_46e.centered){
m.setAutoCenter(false);
}
if(_46e.anchorId){
m.setAutoCenter(false);
m.setAnchorId(_46e.anchorId);
}
if(typeof _46e.cancelFunction=="function"){
m.cancelFunction=_46e.cancelFunction;
}
if(typeof _46e.callBackFunction=="function"){
m.callBackFunction=_46e.callBackFunction;
}
if(typeof _46e.abortFunction=="function"){
m.abortFunction=_46e.abortFunction;
}
if(!_46e.showCloseIcon){
m.setDisabled(true);
}
m.show();
if(inline){
$("#"+id).data("overlay",m);
}
return m;
};
$.dr.overlay.close=function(){
DR.Widgets.ModalOverlay.close();
};
$.namespace("dr",{overlay:function(_472){
return this.each(function(){
var opts=$.extend({},_472,{inline:true,id:this.id});
$.dr.overlay(opts);
});
}});
var _474=function(obj){
return $(obj).data("overlay");
};
$.namespace("dr.overlay",{setTitle:function(_476){
return this.each(function(){
var m=_474(this);
if(m){
m.setTitle(_476);
}
});
}});
})(jQuery);
DR.Widgets.ModalOverlayStack=function(){
this.windows=[];
this.zIndex=100000;
this.windowIndex=-1;
this.iframeCounter=-1;
this.currentWindow=-1;
this.focusAndBlurSet=false;
};
DR.Widgets.ModalOverlayStack.prototype={add:function(obj){
this.windowIndex++;
this.windows[this.windowIndex]=obj;
this.currentWindow=this.windowIndex;
return this.windowIndex;
},addChildWindow:function(obj,_47a){
this.setCurrentHasModalChildren(true);
var m=new DR.Widgets.ModalOverlay(obj.id,obj.url);
m.parentId=this.currentWindow;
m.parentWindowIndex=_47a;
m.setTitle(obj.title);
m.setDragNDrop(obj.enableDragging);
if(typeof (obj.callBackFunction)=="function"){
m.setCallBackFunction(obj.callBackFunction);
}
if(typeof (obj.cancelFunction)=="function"){
m.setCancelFunction(obj.cancelFunction);
}
if(typeof (obj.abortFunction)=="function"){
m.setAbortFunction(obj.abortFunction);
}
m.setSize(obj.contentWidth,obj.contentHeight);
m.show();
obj=null;
},getCurrent:function(){
if(this.currentWindow>-1){
var c=this.windows[this.currentWindow];
return c;
}
},getById:function(id){
for(var i=0;i<this.windows.length;i++){
if(this.windows[i].id==id){
return this.windows[i];
break;
}
}
return null;
},checkCurrentLoading:function(){
if(this.currentWindow>-1){
var c=this.windows[this.currentWindow];
return c.loading;
}
},disableCurrent:function(){
if(this.currentWindow>-1){
var c=this.windows[this.currentWindow];
c.closeLink.style.visibility="hidden";
}
},enableCurrent:function(){
if(this.currentWindow>-1){
var c=this.windows[this.currentWindow];
c.closeLink.style.visibility="visible";
}
},setCurrentWindow:function(id){
this.currentWindow=id;
},getNewIframeID:function(){
this.iframeCounter++;
return this.iframeCounter;
},bringOpenOverlayToFront:function(){
for(var i=0;i<this.windows.length;i++){
if(this.windows[i].isOpen){
overlayStack.bringToFront(i);
return;
}
}
},checkAnyOpen:function(){
var _484=false;
for(var i=0;i<this.windows.length;i++){
if(this.windows[i].isOpen){
_484=true;
}
}
return _484;
},checkAnyModalOpen:function(){
var _486=false;
for(var i=0;i<this.windows.length;i++){
if(this.windows[i].isOpen&&this.windows[i].modalType=="Modal"){
_486=true;
}
}
return _486;
},checkAnyModelessOpen:function(){
var _488=false;
for(var i=0;i<this.windows.length;i++){
if(this.windows[i].isOpen&&this.windows[i].modalType=="Modeless"){
_488=true;
}
}
return _488;
},setCurrentHasChildren:function(flag){
if(this.currentWindow>-1){
var c=this.windows[this.currentWindow];
c.hasChildren=flag;
}
},setCurrentHasModalChildren:function(flag){
if(this.currentWindow>-1){
var c=this.windows[this.currentWindow];
c.hasModalChildren=flag;
}
},resizeCurrent:function(_48e,_48f){
if(this.currentWindow>-1){
var c=this.windows[this.currentWindow];
c.setSize(_48e,_48f);
c.refreshSize();
c.position();
}
},blurCurrent:function(){
if(this.currentWindow>-1){
var c=this.windows[this.currentWindow];
c.blurWindow=false;
c.blur();
}
},hideCurrent:function(){
if(this.currentWindow>-1){
var c=this.windows[this.currentWindow];
c.dialog.style.display="none";
c.enableScrollBars();
}
},blurOtherWindows:function(){
for(var i=0;i<this.windows.length;i++){
if(this.windows[i].stackId!=this.currentWindow){
this.windows[i].hasFocus=false;
this.windows[i].blur();
}
}
},windowOnBlur:function(){
if(this.currentWindow>-1){
var c=this.windows[this.currentWindow];
c.blurWindow=true;
c.blur();
}
},focusCurrent:function(_495){
if(this.currentWindow>-1){
var c=this.windows[this.currentWindow];
if(!c.hasFocus||_495){
c.focus();
}
}
},bringToFront:function(id){
if(this.windowIndex>-1){
this.currentWindow=id;
var c=this.windows[this.currentWindow];
this.zIndex=this.zIndex+5;
if(this.currentWindow>-1){
c.dialog.style.zIndex=this.zIndex;
c.modalMask.style.zIndex=this.zIndex-2;
c.modalMaskIEOver.style.zIndex=this.zIndex-1;
DR.Utils.removeCSSClass(c.contentTable,"inActive");
}
}
},addWindowEventHandlers:function(){
function overlayStackFocusParent(){
if(window!=top){
parent.overlayStack.setCurrentHasChildren(false);
parent.overlayStack.focusCurrent(true);
}
}
if(!overlayStack.focusAndBlurSet){
if(window.attachEvent){
window.attachEvent("onunload",overlayStackFocusParent);
}else{
window.addEventListener("unload",overlayStackFocusParent,false);
}
var _499=window.onresize;
if(typeof window.onresize!="function"){
window.onresize=function(){
overlayStack.refreshMaskSize();
};
this.onResizeSet=true;
}else{
if(!this.onResizeSet){
window.onresize=function(){
overlayStack.refreshMaskSize();
_499();
};
}
}
overlayStack.focusAndBlurSet=true;
}
function cleanupEvents(){
window.detachEvent("onunload",cleanupEvents);
window.onresize=null;
}
if(window.attachEvent){
window.attachEvent("onunload",cleanupEvents);
}
},refreshMaskSize:function(){
if(this.currentWindow>-1){
var c=this.windows[this.currentWindow];
this.getPageSize();
if(document.all){
c.modalMask.style.width=this.doc.windowWidth+"px";
c.modalMaskIframe.style.width=this.doc.windowWidth+"px";
c.modalMaskIEOver.style.width=this.doc.windowWidth+"px";
}
c.modalMask.style.height=this.doc.pageHeight+"px";
c.modalMaskIframe.style.height=this.doc.pageHeight+"px";
c.modalMaskIEOver.style.height=this.doc.pageHeight+"px";
}
},buildIframe:function(){
if(this.currentWindow>-1){
this.windows[this.currentWindow].ieTimeout=false;
this.windows[this.currentWindow].buildIframe();
}
},closeCurrent:function(){
if(this.currentWindow>-1){
this.windows[this.currentWindow].cancel();
}
},cancelCurrent:function(){
if(this.currentWindow>-1){
this.windows[this.currentWindow].cancel();
}
},destroyAll:function(){
var _49b=false;
for(var i=0;i<this.windows.length;i++){
if(!this.windows[i].inline){
this.currentWindow=i;
this.destroyCurrent();
}
}
return _49b;
},destroyCurrent:function(){
if(this.currentWindow>-1){
this.destroyWindow(this.currentWindow);
}
},destroyWindow:function(_49d){
if(_49d>-1){
var _49e=this.windows[_49d];
var _49f=-1;
if(_49e.parentId>-1){
_49f=_49e.parentId;
}
if(!_49e.inline){
if(_49e.iframe){
_49e.iframe.parentNode.removeChild(_49e.iframe);
_49e.iframeSpacer.parentNode.removeChild(_49e.iframeSpacer);
_49e.contentTable.parentNode.removeChild(_49e.contentTable);
_49e.windowIcon.parentNode.removeChild(_49e.windowIcon);
_49e.dialog.parentNode.removeChild(_49e.dialog);
this.windows[_49d].iframe=null;
this.windows[_49d].modalMask=null;
this.windows[_49d].modelessMaskingDiv=null;
this.windows[_49d].modelessMaskingIframe=null;
this.windows[_49d].modalMaskIframe=null;
this.windows[_49d].modalMaskIEOver=null;
this.windows[_49d].iframeSpacer=null;
this.windows[_49d].contentTable=null;
this.windows[_49d].windowIcon=null;
this.windows[_49d].dialog=null;
}
_49e=null;
this.windows[_49d]=null;
this.windows.splice(_49d,1);
this.windowIndex--;
this.currentWindow=-1;
_49d=this.windows.length-1;
}
if(_49f>-1&&_49d>-1){
this.windows[_49f].hasModalChildren=false;
this.windows[_49f].focus();
this.reorderStack(false);
}else{
this.reorderStack(true);
}
}
},reorderStack:function(_4a0){
var _4a1=-1;
for(var i=0;i<this.windows.length;i++){
if(this.windows[i].isOpen){
this.windows[i].stackId=i;
_4a1=i;
}
}
if(_4a1>-1&&_4a0){
this.currentWindow=_4a1;
this.windows[this.currentWindow].focus();
}
},callBack:function(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,_4ac){
if(this.currentWindow>-1){
var _4ad=this.windows[this.currentWindow];
if(_4ad.parentId>-1){
window.frames[this.windows[_4ad.parentId].iframe.id].overlayStack.callBack(arg1,arg2,arg3,arg3,arg4,arg5,arg6,arg7,arg8,arg9,_4ac);
}else{
_4ad.callBack(arg1,arg2,arg3,arg3,arg4,arg5,arg6,arg7,arg8,arg9,_4ac);
}
}
},getPageSize:function(){
var _4ae,yScroll,pageHeight,pageWidth;
var obj={};
if(window.innerHeight&&window.scrollMaxY){
_4ae=document.body.scrollWidth;
yScroll=window.innerHeight+window.scrollMaxY;
}else{
if(document.body.scrollHeight>document.body.offsetHeight){
_4ae=document.body.scrollWidth;
yScroll=document.body.scrollHeight;
}else{
_4ae=document.body.offsetWidth;
yScroll=document.body.offsetHeight;
}
}
var _4b0,windowHeight;
if(self.innerHeight){
_4b0=self.innerWidth;
windowHeight=self.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
_4b0=document.documentElement.clientWidth;
windowHeight=document.documentElement.clientHeight;
}else{
if(document.body){
_4b0=document.body.clientWidth;
windowHeight=document.body.clientHeight;
}
}
}
if(yScroll<windowHeight){
pageHeight=windowHeight;
}else{
pageHeight=yScroll;
}
if(_4ae<_4b0){
pageWidth=_4b0;
}else{
pageWidth=_4ae;
}
if(this.doc===undefined){
this.doc={};
}
this.doc.pageWidth=pageWidth;
this.doc.pageHeight=pageHeight;
this.doc.windowWidth=_4b0;
this.doc.windowHeight=windowHeight;
}};
overlayStack=new DR.Widgets.ModalOverlayStack();
DR.Widgets.Prompt=function(){
this._type="Prompt";
this.built=false;
this.questionDiv=null;
this.liveChangeTextDiv=null;
this.textInput=null;
this.overlay=null;
this.size="normal";
this.isPrompt=false;
this.isAlert=false;
this.isCriticalConfirm=false;
this.isConfirm=false;
this.isCheckboxPrompt=false;
this.modalWarning=false;
this.isSuccess=false;
this.iconClass="";
this.width=521;
this.height=200;
};
DR.Widgets.Prompt.PROMPT="Prompt";
DR.Widgets.Prompt.CHECKBOX_PROMPT="Prompt";
DR.Widgets.Prompt.CHECKBOX_PROMPT_QUESTION="I agree";
DR.Widgets.Prompt.ALERT="Alert";
DR.Widgets.Prompt.WARNING="Warning";
DR.Widgets.Prompt.CONFIRM="Confirm";
DR.Widgets.Prompt.SUCCESS="Success";
DR.Widgets.Prompt.LIVE_CHANGE="Live Change Warning";
DR.Widgets.Prompt.LIVE_CHANGE_QUESTION="Please enter your username as it appears below to confirm you want to save these changes.{0}Username: {1}";
DR.Widgets.Prompt.INCORRECT_VALUE="The value you entered is incorrect.";
DR.Widgets.Prompt.prototype={init:function(){
switch(this._type){
case "Prompt":
this.modalTitle=DR.Widgets.Prompt.PROMPT;
this.isPrompt=true;
this.iconClass="modalPrompt";
break;
case "CheckboxPrompt":
this.modalTitle=DR.Widgets.Prompt.CHECKBOX_PROMPT;
this.isCheckboxPrompt=true;
this.iconClass="modalPrompt";
this.height=300;
break;
case "Confirm":
this.modalTitle=DR.Widgets.Prompt.CONFIRM;
this.isConfirm=true;
this.iconClass="";
break;
case "Alert":
this.modalTitle=DR.Widgets.Prompt.ALERT;
this.isAlert=true;
this.iconClass="modalAlert";
break;
case "Warning":
this.modalTitle=DR.Widgets.Prompt.WARNING;
this.isWarning=true;
this.iconClass="modalWarning";
break;
case "Success":
this.modalTitle=DR.Widgets.Prompt.SUCCESS;
this.isSuccess=true;
this.iconClass="modalSuccess";
break;
case "Critical_Confirm":
this.modalTitle=DR.Widgets.Prompt.LIVE_CHANGE;
this.isCriticalConfirm=true;
this.iconClass="modalLiveChange";
this.height=300;
break;
}
this.instanceId="DR.Utils."+this._type.toUpperCase();
this.prefixId="modal_"+this._type;
var d=document.createElement("div");
d.id=this.prefixId+"_container";
var f=document.createElement("div");
f.className="questionBg";
var q=document.createElement("div");
q.className="question";
var _4b4=document.createElement("div");
q.appendChild(_4b4);
this.questionDiv=_4b4;
var _4b5="check";
var _4b6=this.instanceId+".cancel()";
var _4b7=this.instanceId+".ok()";
var _4b8;
var _4b9;
if(this.isPrompt||this.isCriticalConfirm){
_4b8=document.createElement("div");
_4b8.className="input";
_4b8.innerHTML="<input type=\"text\" id=\""+this.prefixId+"_input\" autocomplete=\"off\" onkeyup=\""+this.instanceId+".enterKey(event)\" />";
_4b5="save";
}
if(this.isCheckboxPrompt){
_4b8=document.createElement("div");
_4b8.className="input";
_4b8.innerHTML="<input type=\"checkbox\" id=\""+this.prefixId+"_input\" /><label for=\""+this.prefixId+"_input\">"+DR.Widgets.Prompt.CHECKBOX_PROMPT_QUESTION+"</label>";
_4b5="save";
}
var _4b9;
var _4ba="";
if(this.isCriticalConfirm){
var _4b9=document.createElement("div");
_4b9.className="liveChangeText";
this.liveChangeTextDiv=_4b9;
}
var s="";
if(!this.isAlert&&!this.isSuccess){
s+="<button id=\""+this.prefixId+"_cancelBtn\" class=\"button secondary\" type=\"button\" onclick=\""+_4b6+"\"></button>";
}
s+="<button id=\""+this.prefixId+"_okBtn\" type=\"button\" class=\"button secondary\" onclick=\""+_4b7+"\" style=\"margin-right:0;\"></button>";
var _4bc=document.createElement("div");
_4bc.className="pageButtons";
_4bc.innerHTML=s;
if(this.isPrompt||this.isCriticalConfirm||this.isCheckboxPrompt){
f.appendChild(q);
d.appendChild(f);
if(this.isCriticalConfirm){
d.appendChild(_4b9);
}
d.appendChild(_4b8);
}else{
f.appendChild(q);
d.appendChild(f);
}
d.appendChild(_4bc);
var _4bd=$("div.content:first")||$("body");
_4bd.append(d);
this.okButton=getElem(this.prefixId+"_okBtn");
if(!this.isAlert&&!this.isSuccess){
this.cancelButton=getElem(this.prefixId+"_cancelBtn");
}
if(this.isPrompt||this.isCriticalConfirm){
$(this.cancelButton).dr.button.text($.dr.strings.CANCEL);
if(this.isCriticalConfirm){
$(this.okButton).dr.button.text($.dr.strings.OK);
}else{
$(this.okButton).dr.button.text($.dr.strings.SAVE);
}
this.textInput=getElem(this.prefixId+"_input");
}else{
if(this.isCheckboxPrompt){
this.textInput=$("#"+this.prefixId+"_input").parent("div");
this.textInput.addClass("checkbox-prompt");
$(this.okButton).attr("disabled","disabled");
}else{
if(this.isAlert||this.isSuccess){
$(this.okButton).dr.button.text($.dr.strings.OK);
}else{
$(this.cancelButton).dr.button.text($.dr.strings.NO);
$(this.okButton).dr.button.text($.dr.strings.YES);
}
}
}
if(this.isCheckboxPrompt){
}
var opts={inline:true,id:this.prefixId+"_container",optionalClassName:this.iconClass+" modalConfirm",showCloseIcon:false,width:this.width,height:this.height};
if(this.isSuccess){
opts.type="modeless";
}
this.overlay=$.dr.overlay(opts);
},open:function(_4bf,text,_4c1,_4c2,_4c3,_4c4,_4c5,_4c6){
if((this.isAlert||this.isSuccess||typeof (_4c1)=="function"||_4c1===null)&&typeof (_4bf)=="string"){
if(_4c3){
this.acceptKey=_4c3.trim();
var _4c7=(_4c6)?_4c6:DR.Widgets.Prompt.LIVE_CHANGE_QUESTION;
_4c7=_4c7.replaceBreaks().replace("{1}","<strong><span id=\"liveChangeKey\">"+this.acceptKey+"<span></strong>");
this.liveChangeTextDiv.innerHTML=_4c7;
}
this.questionDiv.innerHTML=_4bf;
this.overlay.setTitle(_4c2||this.modalTitle);
this.overlay.setDisabled(true);
this.overlay.show();
if(this.isPrompt||this.isCriticalConfirm){
if(this.isCriticalConfirm){
_4c6;
}
this.textInput.value=text;
this.textInput.focus();
this.textInput.select();
}else{
if(this.isCheckboxPrompt){
var _4c8=_4c4||$.dr.strings.OK;
if(text&&text!==""){
var _4c9=$("label",this.textInput).html(text);
}else{
var _4c9=$("label",this.textInput).html(DR.Widgets.Prompt.CHECKBOX_PROMPT_QUESTION);
}
var btn=this.okButton;
if(_4c5){
var _4cb=parseInt(_4c5,10);
$(btn).dr.button.text(_4cb).attr("disabled","disabled");
var fn=function(){
_4cb--;
if(_4cb===0){
$(btn).dr.button.text(_4c8);
$(btn).removeAttr("disabled");
}else{
$(btn).dr.button.text(_4cb.toString());
setTimeout(fn,1000);
}
};
setTimeout(fn,1000);
}else{
$(btn).removeAttr("disabled");
$(btn).dr.button.text(_4c8);
}
}else{
if(this.isSuccess){
this.okButton.focus();
}
}
}
this.callback=_4c1;
}
},ok:function(){
var _4cd=true;
if(typeof (this.callback)=="function"){
if(this.isPrompt){
this.callback(this.textInput.value);
}else{
if(this.isCheckboxPrompt){
if(this.textInput.find("[type=\"checkbox\"]")[0].checked){
var t=this.textInput.find("label").text();
this.callback(true,t);
}else{
this.callback(false);
}
}else{
if(this.isCriticalConfirm){
if(this.acceptKey==this.textInput.value.trim()){
this.callback(true);
}else{
_4cd=false;
this.showCriticalConfirmWarning();
}
}else{
this.callback(true);
}
}
}
}
if(_4cd){
this.overlay.cancel();
}
},enterKey:function(evt){
var key=(evt.which)?evt.which:event.keyCode;
if(key==13){
var val=this.textInput.value.trim();
if((this.lastValue!==undefined&&this.lastValue!=val)||(this.isCriticalConfirm&&this.acceptKey==val)){
this.ok();
}
this.lastValue=val;
}
},showCriticalConfirmWarning:function(){
alert(DR.Widgets.Prompt.INCORRECT_VALUE);
this.textInput.focus();
this.textInput.select();
},cancel:function(){
this.overlay.cancel();
if(typeof (this.callback)=="function"){
if(this.isPrompt||this.isCheckboxPrompt){
this.callback(null);
}else{
this.callback(false);
}
}
}};
DR.Widgets.CheckboxPrompt=function(){
this._type="CheckboxPrompt";
};
DR.Widgets.CheckboxPrompt.prototype=new DR.Widgets.Prompt();
DR.Widgets.Confirm=function(){
this._type="Confirm";
};
DR.Widgets.Confirm.prototype=new DR.Widgets.Prompt();
DR.Widgets.Warning=function(){
this._type="Warning";
};
DR.Widgets.Warning.prototype=new DR.Widgets.Prompt();
DR.Widgets.Alert=function(){
this._type="Alert";
};
DR.Widgets.Alert.prototype=new DR.Widgets.Prompt();
DR.Widgets.Success=function(){
this._type="Success";
};
DR.Widgets.Success.prototype=new DR.Widgets.Prompt();
DR.Widgets.CriticalConfirm=function(){
this._type="Critical_Confirm";
};
DR.Widgets.CriticalConfirm.prototype=new DR.Widgets.Prompt();
DR.Utils.alert=function(_4d2,_4d3,_4d4){
if(!DR.Utils.ALERT){
DR.Utils.ALERT=new DR.Widgets.Alert();
DR.Utils.ALERT.init();
}
DR.Utils.ALERT.open(_4d2,null,_4d3,_4d4);
};
DR.Utils.ALERT=null;
DR.Utils.success=function(_4d5,_4d6,_4d7){
if(!DR.Utils.SUCCESS){
DR.Utils.SUCCESS=new DR.Widgets.Success();
DR.Utils.SUCCESS.init();
}
DR.Utils.SUCCESS.open(_4d5,null,_4d6,_4d7);
};
DR.Utils.SUCCESS=null;
DR.Utils.warning=function(_4d8,_4d9,_4da){
if(!DR.Utils.WARNING){
DR.Utils.WARNING=new DR.Widgets.Warning();
DR.Utils.WARNING.init();
}
DR.Utils.WARNING.open(_4d8,null,_4d9,_4da);
};
DR.Utils.WARNING=null;
DR.Utils.confirm=function(_4db,_4dc,_4dd){
if(!DR.Utils.CONFIRM){
DR.Utils.CONFIRM=new DR.Widgets.Confirm();
DR.Utils.CONFIRM.init();
}
DR.Utils.CONFIRM.open(_4db,null,_4dc,_4dd);
};
DR.Utils.CONFIRM=null;
DR.Utils.prompt=function(_4de,text,_4e0,_4e1){
if(!DR.Utils.PROMPT){
DR.Utils.PROMPT=new DR.Widgets.Prompt();
DR.Utils.PROMPT.init();
}
DR.Utils.PROMPT.open(_4de,text,_4e0,_4e1);
};
DR.Utils.PROMPT=null;
DR.Utils.checkboxPrompt=function(text,_4e3,_4e4,_4e5,_4e6,_4e7){
if(!DR.Utils.CHECKBOXPROMPT){
DR.Utils.CHECKBOXPROMPT=new DR.Widgets.CheckboxPrompt();
DR.Utils.CHECKBOXPROMPT.init();
}
DR.Utils.CHECKBOXPROMPT.open(text,_4e3,_4e4,_4e5,null,_4e6,_4e7);
};
DR.Utils.PROMPT=null;
DR.Utils.criticalConfirm=function(_4e8,text,_4ea,_4eb,_4ec,_4ed){
if(!DR.Utils.CRITICAL_CONFIRM){
DR.Utils.CRITICAL_CONFIRM=new DR.Widgets.CriticalConfirm();
DR.Utils.CRITICAL_CONFIRM.init();
}
DR.Utils.CRITICAL_CONFIRM.open(_4e8,text,_4ea,_4eb,_4ec,null,null,_4ed);
};
DR.Utils.CRITICAL_CONFIRM=null;
(function($){
var _4ef={title:null,callback:null};
var _4f0;
var _4f1=function(_4f2){
_4f2=(_4f2)?_4f2:{};
return $.extend({},_4ef,_4f2);
};
$.dr.alert=function(text,_4f4){
_4f4=_4f1(_4f4);
DR.Utils.alert(text,_4f4.callback,_4f4.title);
};
$.dr.success=function(text,_4f6){
_4f6=_4f1(_4f6);
DR.Utils.success(text,_4f6.callback,_4f6.title);
};
$.dr.warning=function(text,_4f8,_4f9){
_4f9=_4f1(_4f9);
DR.Utils.warning(text,_4f8,_4f9.title);
};
$.dr.confirm=function(text,_4fb,_4fc){
_4fc=_4f1(_4fc);
DR.Utils.confirm(text,_4fb,_4fc.title);
};
$.dr.checkboxPrompt=function(text,_4fe,_4ff,_500){
_500=_4f1(_500);
DR.Utils.checkboxPrompt(text,_4fe,_4ff,_500.title,_500.buttonText,_500.timer);
};
$.dr.prompt=function(text,_502,_503,_504){
_504=_4f1(_504);
DR.Utils.prompt(text,_502,_503,_504.title);
};
$.dr.criticalConfirm=function(text,_506,_507,_508,_509){
_509=_4f1(_509);
DR.Utils.criticalConfirm(text,_506,_507,_509.title,_508,_509.acceptQuestion);
};
})(jQuery);
DR.Widgets.PanelSet=function(obj){
this.layout="TwoColumn";
this.sidebarOpenCSSClass="sidebarOpen";
this.sidebarClosedCSSClass="sidebarClosed";
this.buttonSelectedCSSClass="selected";
this.column1Open=true;
this.container=(typeof obj=="string")?document.getElementById(obj):obj;
this.defaultSearchField=null;
this.column1Button=null;
this.column1=null;
this.column2=null;
this.column1Width=200;
this.column2Width=null;
this.panelWidth=720;
this.panelHeight=430;
this.autoHeightSizing=true;
this.handleWidth=10;
this.leftPadding=0;
this.column1MinWidth=170;
this.column2MinWidth=170;
this.dragObject=null;
this.resizeCallback=null;
this.saveCookieState=false;
this.saveUserDataState=true;
this.stateCookie=null;
this.stateCookieID=null;
this.dataTableContainer=null;
};
DR.Widgets.PanelSet.prototype={init:function(){
this.loadState();
var self=this;
var _50c=window.onresize;
var _50d=function(){
self.refreshPanelSize();
self.refresh();
};
window.onresize=function(){
_50d();
if(typeof (_50c)=="function"){
_50c();
}
};
var _50e,winOnload;
function cleanupEvents(){
window.detachEvent("onresize",winOnload);
window.detachEvent("onresize",_50d);
window.detachEvent("onunload",cleanupEvents);
}
if(DR.Utils.BrowserDetect.browser=="Explorer"){
if(DR.Utils.BrowserDetect.version<7){
if(this.column2){
var d=this.column2.getElementsByTagName("div");
for(var i=0;i<d.length;i++){
var c=d[i].className;
if(c){
if(c.indexOf("dataTableContainer")>-1){
this.dataTableContainer=d[i];
break;
}
}
}
}
}
_50e=window.onload;
winOnload=function(){
self.drawInterface();
};
window.onload=function(){
winOnload();
if(typeof (_50e)=="function"){
_50e();
}
};
if(window.attachEvent){
window.attachEvent("onunload",cleanupEvents);
}
}else{
this.drawInterface();
}
},drawInterface:function(){
this.refreshPanelSize();
this.attachHandles();
this.refresh();
this.show();
},setColumn1Id:function(id){
this.column1=document.getElementById(id);
},setColumn2Id:function(id){
this.column2=document.getElementById(id);
},setColumn1Width:function(w){
this.column1Width=parseInt(w,10);
},show:function(){
this.container.style.visibility="visible";
},setPanelSize:function(w,h){
if(w!==undefined&&h!==undefined){
this.panelWidth=parseInt(w,10);
this.panelHeight=parseInt(h,10);
}
},setPanelHeight:function(h){
if(h!==undefined){
this.autoHeightSizing=false;
this.panelHeight=parseInt(h,10);
}
},refreshPanelSize:function(w,h){
if(DR.Utils.BrowserDetect.browser=="Explorer"){
this.panelWidth=this.container.offsetWidth;
if(this.autoHeightSizing&&DR.Utils.BrowserDetect.version>6){
this.panelHeight=jQuery("TABLE.panelTable",this.container)[0].offsetHeight;
}
}else{
this.panelWidth=this.container.offsetWidth;
}
},setColumn1DefaultWidth:function(w){
if(w!==undefined){
this.column1Width=parseInt(w,10);
}
},setColumn2DefaultWidth:function(w){
if(w!==undefined){
this.column2Width=parseInt(w,10);
}
},setColumn1MinWidth:function(w){
if(w!==undefined){
this.column1MinWidth=parseInt(w,10);
}
},setColumn1ButtonId:function(id){
if(id!==undefined){
this.column1Button=document.getElementById(id);
}
},setDefaultSearchFocusFieldId:function(id){
if(id!==undefined){
this.defaultSearchField=document.getElementById(id);
}
},setUserDataStorageIds:function(_51f,_520){
if(_51f!==undefined&&_520!==undefined){
this.userDataPageName=_51f;
this.userDataSetting=_520;
}
},setColumn2MinWidth:function(w){
if(w!==undefined){
this.column2MinWidth=parseInt(w,10);
}
},getColumn1Width:function(){
return this.column1Width;
},getColumn2Width:function(){
return this.column2Width;
},setResizeCallback:function(func){
if(typeof func=="function"){
this.resizeCallback=func;
}
},setStateCookieID:function(_523){
this.saveCookieState=true;
this.stateCookieID=_523+"_LeftWidth";
},loadState:function(){
if(this.saveCookieState&&this.stateCookie===null){
this.stateCookie=new DR.Utils.Cookie(this.stateCookieID);
this.stateCookie.load();
var v=this.stateCookie.value;
if(v!==null){
this.column1Width=parseInt(v,10);
}
}
},saveState:function(_525){
if(this.saveUserDataState&&$.dr.userdata!==null){
if(_525=="width"){
$.dr.userdata.save(this.userDataPageName,this.userDataSetting+"Width",this.column1Width,"String");
}else{
var _526="";
if(!this.column1Open){
_526="collapsed";
}
$.dr.userdata.save(this.userDataPageName,this.userDataSetting+"Collapsed",_526,"String");
}
}else{
if(this.saveCookieState&&this.stateCookie===null){
this.stateCookie.setValue(""+this.column1Width+"");
}
}
},attachHandles:function(){
var _527;
if(this.layout=="TwoColumn"){
_527="H";
}else{
if(this.layout=="TwoRow"){
_527="V";
}
}
var self=this;
this.hiddenHandle=document.createElement("div");
this.hiddenHandle.style.position="absolute";
this.hiddenHandle.style.top="0px";
this.hiddenHandle.style.display="none";
this.staticHandle=document.createElement("div");
this.staticHandle.style.position="absolute";
this.staticHandle.style.top="0px";
this.staticHandle.style.display="block";
function handleOnMousedown(_529){
self.initDrag(_529);
}
this.staticHandle.onmousedown=handleOnMousedown;
this.hiddenHandle.className="splitContainerHiddenHandle"+_527;
this.staticHandle.className="splitContainerHandle"+_527;
this.container.appendChild(this.staticHandle);
this.container.appendChild(this.hiddenHandle);
function cleanupEvents(){
self.staticHandle.detachEvent("onmousedown",handleOnMousedown);
window.detachEvent("onunload",cleanupEvents);
}
if(window.attachEvent){
window.attachEvent("onunload",cleanupEvents);
}
},refresh:function(){
var h=this.panelHeight-2;
if(this.hiddenHandle){
if(DR.Utils.BrowserDetect.browser=="Explorer"){
if(this.autoHeightSizing){
}
this.hiddenHandle.style.height=(h+2)+"px";
this.staticHandle.style.height=(h+2)+"px";
}else{
this.hiddenHandle.style.height="100%";
this.staticHandle.style.height="100%";
}
}
this.refreshColumn1Width();
if(!(DR.Utils.BrowserDetect.browser=="Explorer"&&DR.Utils.BrowserDetect.version<7)){
this.fixColumn1Width();
}else{
this.column2Width=this.container.offsetWidth-this.column1Width;
if(this.dataTableContainer){
this.dataTableContainer.style.width=(this.column2Width-20)+"px";
}
}
if(this.hiddenHandle){
this.hiddenHandle.style.left=(this.column1Width)+"px";
this.staticHandle.style.left=(this.column1Width)+"px";
}
if(typeof this.resizeCallback=="function"){
this.resizeCallback();
}
},fixColumn1Width:function(_52b){
if(this.container.className.indexOf(this.sidebarClosedCSSClass)==-1){
var a=this.column1.childNodes;
for(var i=0;i<a.length;i++){
if(a[i].tagName){
var newW=(a[i].offsetWidth);
if(jQuery.browser.safari){
newW=newW+2;
}
this.column1.style.width=newW+"px";
this.column1Width=newW+this.leftPadding;
}
}
}
},refreshColumn1Width:function(_52f){
this.column1.style.width=(this.column1Width-this.leftPadding)+"px";
},initDrag:function(_530){
if(this.dragObject===null){
this.dragObject=new DR.Utils.DragObject(this.hiddenHandle);
this.dragObject.setType("PanelSet",this);
this.dragObject.setMoveDragCallback(true);
this.dragObject.setStopDragCallback(true);
}
this.dragObject.initDrag(_530);
},moveDrag:function(x,y){
this.hiddenHandle.style.display="block";
},stopDrag:function(x,y){
if(this.layout=="TwoColumn"){
this.column1Width=parseInt(this.hiddenHandle.style.left,10);
this.saveState("width");
}
this.dragObject.isDragging=false;
this.dragObject.isInitialized=false;
this.hiddenHandle.style.display="none";
this.refresh();
if(typeof this.resizeCallback=="function"){
this.resizeCallback(this.column1Width);
}
},hideColumn1:function(){
if(DR.Utils.BrowserDetect.browser=="Explorer"){
this.column1.style.display="none";
}
DR.Utils.replaceCSSClass(this.container,this.sidebarOpenCSSClass,this.sidebarClosedCSSClass);
DR.Utils.removeCSSClass(this.column1Button,"selected");
this.column1Open=false;
this.saveState("column1Visible");
},showColumn1:function(){
if(DR.Utils.BrowserDetect.browser=="Explorer"){
this.column1.style.display="block";
}
DR.Utils.replaceCSSClass(this.container,this.sidebarClosedCSSClass,this.sidebarOpenCSSClass);
DR.Utils.addCSSClass(this.column1Button,this.buttonSelectedCSSClass);
if(this.defaultSearchField){
this.defaultSearchField.focus();
this.defaultSearchField.select();
}
this.column1Open=true;
this.saveState("column1Visible");
},toggleColumn1:function(){
if(this.container.className.indexOf(this.sidebarClosedCSSClass)>-1){
this.showColumn1();
}else{
this.hideColumn1();
}
}};
(function($){
var imgs=[],$dialog,$span,frameTimeout,open=false,isIE6=($.browser.msie&&$.browser.version==6),stopEventDefined=false;
var _537={enabled:true,showText:true,text:"Processing...",cssClass:"processingDialog",imgSrc:"sprites/spinner-sprite-36-fff",imgExt:"gif",imgPrefix:"bg",frames:8,frameInterval:90,beforeUnloadDelay:2000,shadowVisible:true};
var _538=function(){
var _539=this;
var _53a=$(window).scrollTop();
var _53b=$(window).height();
var _53c=$(window).width();
var _53d=_539.height();
var _53e=_539.width();
var posY=(!isIE6)?(_53b/2)-(_53d/2):(_53b/2)-(_53d/2)+_53a;
var posX=(_53c/2)-(_53e/2);
_539.css({"top":posY,"left":posX});
};
var _541=function(){
var _542=0;
var func=function(test){
if(_542>=_537.frames){
_542=0;
}
$span.attr("class",_537.imgPrefix+_542);
_542++;
frameTimeout=setTimeout(func,_537.frameInterval);
};
func();
};
var _545=function(){
if(typeof (frameTimeout)!="undefined"){
clearTimeout(frameTimeout);
}
};
var _546=function(){
var _547=this;
$(window).bind("resize scroll",function(){
_538.call(_547);
});
};
$.dr.processingDialog={show:function(){
if(!_537.enabled||open){
return;
}
open=true;
$dialog.show();
_541.call($span);
_538.call($dialog);
_546.call($dialog);
if(!stopEventDefined&&$.browser.msie){
stopEventDefined=true;
document.attachEvent("onstop",$.dr.processingDialog.hide);
}
},hide:function(){
open=false;
_545();
$dialog.hide();
},enable:function(){
_537.enabled=true;
},disable:function(){
_537.enabled=false;
$.dr.processingDialog.hide();
}};
$(document).bind("showChangesWarning",function(){
$.dr.processingDialog.disable();
});
var init=function(){
$dialog=$("<div class=\""+_537.cssClass+" "+_537.imgPrefix+"\"><span>"+_537.text+"</span></div>").hide().prependTo("body");
$span=$("span",$dialog);
if(isIE6){
$dialog.css("position","absolute");
}
if(!_537.showText){
$dialog.find("> span").addClass("hide");
}
if(_537.shadowVisible){
$dialog.find("> span").dr.shadows();
}
var _549=new Image();
_549.src=$.dr.IMAGE_PATH+_537.imgSrc+"."+_537.imgExt;
var func=function(){
setTimeout($.dr.processingDialog.show,_537.beforeUnloadDelay);
};
$(window).bind("beforeunload",func);
};
$.dr.addDomReadyEvent(init,"domReadyLate");
})(jQuery);
DR.Widgets.SessionTimeout=function(){
};
DR.Widgets.SessionTimeout.KEEP_ALIVE_URL="";
DR.Widgets.SessionTimeout.SESSION_EXPIRED_TITLE="Session Expired";
DR.Widgets.SessionTimeout.SESSION_WARNING_TITLE="Session Timeout Warning";
DR.Widgets.SessionTimeout.sessionAboutToTimeoutTimerLimit=50;
DR.Widgets.SessionTimeout.timerLimit=60;
DR.Widgets.SessionTimeout.enabled=false;
DR.Widgets.SessionTimeout.init=function(){
if(DR.Widgets.SessionTimeout.enabled){
DR.Widgets.SessionTimeout.startTime=new Date().getTime();
DR.Widgets.SessionTimeout.overlay=null;
DR.Widgets.SessionTimeout.aboutToTimeoutOverlay=null;
DR.Widgets.SessionTimeout.sessionAboutToTimeoutTimerLimit=DR.Widgets.SessionTimeout.sessionAboutToTimeoutTimerLimit*1000*60;
DR.Widgets.SessionTimeout.timerLimit=DR.Widgets.SessionTimeout.timerLimit*1000*60;
window.setTimeout("DR.Widgets.SessionTimeout.check()",10000);
}
};
DR.Widgets.SessionTimeout.showAboutToTimeoutOverlay=function(){
if(DR.Widgets.SessionTimeout.aboutToTimeoutOverlay===null){
DR.Widgets.SessionTimeout.aboutToTimeoutOverlay=new DR.Widgets.InlineModalOverlay("sessionAboutToTimeoutOverlay");
DR.Widgets.SessionTimeout.aboutToTimeoutOverlay.setTitle(DR.Widgets.SessionTimeout.SESSION_WARNING_TITLE);
DR.Widgets.SessionTimeout.aboutToTimeoutOverlay.setSize(450,200);
}
if(!DR.Widgets.SessionTimeout.aboutToTimeoutOverlay.isOpen){
DR.Widgets.SessionTimeout.aboutToTimeoutOverlay.show();
overlayStack.disableCurrent();
getElem("keepAliveBtn").focus();
}
};
DR.Widgets.SessionTimeout.showOverlay=function(){
DR.Widgets.SessionTimeout.aboutToTimeoutOverlay.close();
if(DR.Widgets.SessionTimeout.overlay===null){
DR.Widgets.SessionTimeout.overlay=new DR.Widgets.InlineModalOverlay("sessionTimeoutOverlay");
}
DR.Widgets.SessionTimeout.overlay.setTitle(DR.Widgets.SessionTimeout.SESSION_EXPIRED_TITLE);
DR.Widgets.SessionTimeout.overlay.setSize(450,200);
DR.Widgets.SessionTimeout.overlay.show();
overlayStack.disableCurrent();
};
DR.Widgets.SessionTimeout.check=function(){
var _54b=new Date().getTime();
var _54c=_54b-DR.Widgets.SessionTimeout.startTime;
if(_54c>DR.Widgets.SessionTimeout.timerLimit){
DR.Widgets.SessionTimeout.showOverlay();
return;
}else{
if(_54c>DR.Widgets.SessionTimeout.sessionAboutToTimeoutTimerLimit){
DR.Widgets.SessionTimeout.showAboutToTimeoutOverlay();
}
}
window.setTimeout("DR.Widgets.SessionTimeout.check()",10000);
};
DR.Widgets.SessionTimeout.keepAlive=function(){
DR.Widgets.SessionTimeout.sessionTimeoutStartTime=new Date().getTime();
DR.Widgets.SessionTimeout.aboutToTimeoutOverlay.close();
jQuery.ajax({type:"GET",url:DR.Widgets.SessionTimeout.keepAliveUrl});
};
(function($){
$.extend({tablesorter:new function(){
var _54e=[],widgets=[];
this.defaults={cssHeader:"th_header",cssAsc:"descending",cssDesc:"ascending",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(_552,_553){
if(_552.config.debug){
var _554="";
}
var rows=_552.tBodies[0].rows;
if(_552.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&&($(_553[i]).metadata()&&$(_553[i]).metadata().sorter)){
p=getParserById($(_553[i]).metadata().sorter);
}else{
if((_552.config.headers[i]&&_552.config.headers[i].sorter)){
p=getParserById(_552.config.headers[i].sorter);
}
}
if(!p){
p=detectParserForColumn(_552,cells[i]);
}
if(_552.config.debug){
_554+="column:"+i+" parser:"+p.id+"\n";
}
list.push(p);
}
}
if(_552.config.debug){
log(_554);
}
return list;
}
function detectParserForColumn(_559,node){
var l=_54e.length;
for(var i=1;i<l;i++){
if(_54e[i].is($.trim(getElementText(_559.config,node)),_559,node)){
return _54e[i];
}
}
return _54e[0];
}
function getParserById(name){
var l=_54e.length;
for(var i=0;i<l;i++){
if(_54e[i].id.toLowerCase()==name.toLowerCase()){
return _54e[i];
}
}
return false;
}
function buildCache(_560){
if(_560.config.debug){
var _561=new Date();
}
var _562=(_560.tBodies[0]&&_560.tBodies[0].rows.length)||0,totalCells=(_560.tBodies[0].rows[0]&&_560.tBodies[0].rows[0].cells.length)||0,_54e=_560.config.parsers,cache={row:[],normalized:[]};
for(var i=0;i<_562;++i){
var c=_560.tBodies[0].rows[i],cols=[];
cache.row.push($(c));
for(var j=0;j<totalCells;++j){
cols.push(_54e[j].format(getElementText(_560.config,c.cells[j]),_560,c.cells[j]));
}
cols.push(i);
cache.normalized.push(cols);
cols=null;
}
if(_560.config.debug){
benchmark("Building cache for "+_562+" rows:",_561);
}
return cache;
}
function getElementText(_566,node){
if(!node){
return "";
}
var t="";
if(_566.textExtraction=="simple"){
if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){
t=node.childNodes[0].innerHTML;
}else{
t=node.innerHTML;
}
}else{
if(typeof (_566.textExtraction)=="function"){
t=_566.textExtraction(node);
}else{
t=$(node).text();
}
}
return t;
}
function appendToTable(_569,_56a){
if(_569.config.debug){
var _56b=new Date();
}
var c=_56a,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(_569.tBodies[0]),rows=[];
for(var i=0;i<totalRows;i++){
rows.push(r[n[i][checkCell]]);
if(!_569.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(_569.config.appender){
_569.config.appender(_569,rows);
}
rows=null;
if(_569.config.debug){
benchmark("Rebuilt table:",_56b);
}
applyWidget(_569);
setTimeout(function(){
$(_569).trigger("sortEnd");
},0);
}
function buildHeaders(_571){
if(_571.config.debug){
var time=new Date();
}
var meta=($.metadata)?true:false,tableHeadersRows=[];
for(var i=0;i<_571.tHead.rows.length;i++){
tableHeadersRows[i]=0;
}
$tableHeaders=$("thead th",_571);
$tableHeaders.each(function(_575){
this.count=0;
this.column=_575;
this.order=formatSortingOrder(_571.config.sortInitialOrder);
if(checkHeaderMetadata(this)||checkHeaderOptions(_571,_575)){
this.sortDisabled=true;
}
if(!this.sortDisabled){
$(this).addClass(_571.config.cssHeader);
}
_571.config.headerList[_575]=this;
});
if(_571.config.debug){
benchmark("Built headers:",time);
log($tableHeaders);
}
return $tableHeaders;
}
function checkCellColSpan(_576,rows,row){
var arr=[],r=_576.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(_576,headerArr,row++));
}else{
if(_576.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(_57d,i){
if((_57d.config.headers[i])&&(_57d.config.headers[i].sorter===false)){
return true;
}
return false;
}
function applyWidget(_57f){
var c=_57f.config.widgets;
var l=c.length;
for(var i=0;i<l;i++){
getWidgetById(c[i]).format(_57f);
}
}
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(_58b,_58c,list,css){
_58c.removeClass(css[0]).removeClass(css[1]);
var h=[];
_58c.each(function(_590){
if(!this.sortDisabled){
h[this.column]=$(this);
}
});
var l=list.length;
for(var i=0;i<l;i++){
if(list[i][0]){
h[list[i][0]].addClass(css[list[i][1]]);
}
}
}
function fixColumnWidth(_593,_594){
var c=_593.config;
if(c.widthFixed){
var _596=$("<colgroup>");
$("tr:first td",_593.tBodies[0]).each(function(){
_596.append($("<col>").css("width",$(this).width()));
});
$(_593).prepend(_596);
}
}
function updateHeaderSortCount(_597,_598){
var c=_597.config,l=_598.length;
for(var i=0;i<l;i++){
var s=_598[i],o=c.headerList[s[0]];
o.count=s[1];
o.count++;
}
}
function multisort(_59c,_59d,_59e){
if(_59c.config.debug){
var _59f=new Date();
}
var _5a0="var sortWrapper = function(a,b) {",l=_59d.length;
for(var i=0;i<l;i++){
var c=_59d[i][0];
var _5a3=_59d[i][1];
var s=(getCachedSortType(_59c.config.parsers,c)=="text")?((_5a3==0)?"sortText":"sortTextDesc"):((_5a3==0)?"sortNumeric":"sortNumericDesc");
var e="e"+i;
_5a0+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";
_5a0+="if("+e+") { return "+e+"; } ";
_5a0+="else { ";
}
var _5a6=_59e.normalized[0].length-1;
_5a0+="return a["+_5a6+"]-b["+_5a6+"];";
for(var i=0;i<l;i++){
_5a0+="}; ";
}
_5a0+="return 0; ";
_5a0+="}; ";
eval(_5a0);
_59e.normalized.sort(sortWrapper);
if(_59c.config.debug){
benchmark("Sorting on "+_59d.toString()+" and dir "+_5a3+" time:",_59f);
}
return _59e;
}
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(_5af,i){
return _5af[i].type;
}
this.construct=function(_5b1){
return this.each(function(){
if(!this.tHead||!this.tBodies){
return;
}
var _5b2,$document,$headers,cache,config,shiftDown=0,sortOrder;
this.config={};
config=$.extend(this.config,$.tablesorter.defaults,_5b1);
_5b2=$(this);
$headers=buildHeaders(this);
this.config.parsers=buildParserCache(this,$headers);
cache=buildCache(this);
var _5b3=[config.cssDesc,config.cssAsc];
fixColumnWidth(this);
$headers.click(function(e){
_5b2.trigger("sortStart");
var _5b5=(_5b2[0].tBodies[0]&&_5b2[0].tBodies[0].rows.length)||0;
if(!this.sortDisabled&&_5b5>0){
var _5b6=$(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(_5b2[0],$headers,config.sortList,_5b3);
appendToTable(_5b2[0],multisort(_5b2[0],config.sortList,cache));
},1);
return false;
}
}).mousedown(function(){
if(config.cancelSelection){
this.onselectstart=function(){
return false;
};
return false;
}
});
_5b2.bind("update",function(){
this.config.parsers=buildParserCache(this,$headers);
cache=buildCache(this);
}).bind("sorton",function(e,list){
$(this).trigger("sortStart");
config.sortList=list;
var _5bd=config.sortList;
updateHeaderSortCount(this,_5bd);
setHeadersCss(this,$headers,_5bd,_5b3);
appendToTable(this,multisort(this,_5bd,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){
_5b2.trigger("sorton",[config.sortList]);
}
applyWidget(this);
});
};
this.addParser=function(_5c0){
var l=_54e.length,a=true;
for(var i=0;i<l;i++){
if(_54e[i].id.toLowerCase()==_5c0.id.toLowerCase()){
a=false;
}
}
if(a){
_54e.push(_5c0);
}
};
this.addWidget=function(_5c3){
widgets.push(_5c3);
};
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,_5c9){
var _5ca="\\"+_5c9.decimal;
var exp="/(^[+]?0("+_5ca+"0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)"+_5ca+"(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*"+_5ca+"0+$)/";
return RegExp(exp).test($.trim(s));
};
this.clearTableBody=function(_5cc){
if($.browser.msie){
function empty(){
while(this.firstChild){
this.removeChild(this.firstChild);
}
}
empty.apply(_5cc.tBodies[0]);
}else{
_5cc.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,_5d1){
var c=_5d1.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,_5e5){
var c=_5e5.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,_5eb,cell){
var c=_5eb.config,p=(!c.parserMetadataName)?"sortValue":c.parserMetadataName;
return $(cell).metadata()[p];
},type:"numeric"});
ts.addWidget({id:"zebra",format:function(_5ee){
if(_5ee.config.debug){
var time=new Date();
}
$("tr:visible",_5ee.tBodies[0]).filter(":even").removeClass(_5ee.config.widgetZebra.css[1]).addClass(_5ee.config.widgetZebra.css[0]).end().filter(":odd").removeClass(_5ee.config.widgetZebra.css[0]).addClass(_5ee.config.widgetZebra.css[1]);
if(_5ee.config.debug){
$.tablesorter.benchmark("Applying Zebra widget",time);
}
}});
})(jQuery);
(function($){
var _5f1=$.support.style,hOffset=($.browser.msie)?-5:-5,spanOffset=($.browser.msie)?0:3,wOffset=($.browser.msie)?2:($.browser.safari)?-1:1;
$.namespace("dr",{taskbar:function(){
return this.not(".inited").addClass(".inited").each(function(){
var _5f2=$("button",this);
var _5f3=0;
_5f2.each(function(){
var span=$("span.icon span",this);
var _5f5=span.width();
var _5f6=(_5f5<50)?70:(_5f5>=300)?300:_5f5+17;
$(this).css("max-width","none").width(_5f6);
span.width(_5f6-17);
if($.browser.msie){
$("span.icon",this).width(_5f6-17+wOffset);
}
var h=$(this).height();
if(h>_5f3){
_5f3=h;
}
if(BrowserDetect.browser=="Explorer"&&BrowserDetect.version==6){
$(this).hover(function(){
if(!$(this).hasClass("selected")){
$(this).addClass("hover");
}
},function(){
$(this).removeClass("hover");
});
}
});
_5f3=Math.min(Math.max(_5f3,67),117);
_5f2.each(function(){
$(this).height(_5f3-hOffset);
$("span.icon",this).height(_5f3-hOffset-spanOffset);
});
$("ul, div.related",this).css("visibility","visible");
});
}});
var _5f8=function(){
$("div.taskbar",document).dr.taskbar();
};
$.dr.addDomReadyEvent(_5f8,"domReadyEarly");
})(jQuery);
DR.Widgets.ToolTip=function(_5f9,_5fa){
if(DR.Utils.BrowserDetect.isIE6()){
return null;
}
this.refObj=_5f9;
this.edgeX="Left";
this.edgeY="Bottom";
this.drawDirectionX="Right";
this.drawDirectionY="Down";
this._type=_5fa;
this.mouseOverTimeOut=1100;
this.mouseOutTimeOut=300;
if(_5fa=="menuTooltip"){
this.cssClass="menuTooltip";
this._offsetX=7;
this._offsetY=0;
this.edgeX="Right";
this.edgeY="Top";
}else{
if(_5fa=="codePreview"){
this.cssClass="menuTooltip";
this._offsetX=0;
this._offsetY=2;
this.edgeX="Right";
this.edgeY="Top";
}else{
this.cssClass="taskTooltip";
this._offsetX=0;
this._offsetY=5;
this.edgeX="Left";
this.edgeY="Bottom";
}
}
this.drawDirectionX="Right";
this.drawDirectionY="Down";
this.shadowOffset=4;
this.init();
};
DR.Widgets.ToolTip.prototype={init:function(){
if(this.refObj.title!=undefined){
if(this.refObj.title.trim()!=""){
this.build();
var _5fb=this;
var _5fc=function(){
_5fb.markToShow=true;
window.setTimeout(function(){
if(_5fb.markToShow){
_5fb.show();
}
},this.mouseOverTimeOut);
};
var _5fd=function(){
_5fb.markToShow=false;
window.setTimeout(function(){
if(!_5fb.markToShow){
_5fb.hide();
}
},this.mouseOutTimeOut);
};
var hide=function(){
_5fb.hide();
};
jQuery(this.refObj).mouseover(_5fc);
jQuery(this.refObj).mouseout(_5fd);
jQuery(this.refObj).click(hide);
jQuery(this.tooltip).mouseover(_5fc);
jQuery(this.tooltip).mouseout(_5fd);
jQuery(this.tooltip).click(hide);
}
}
},build:function(){
var d=document.createElement("div");
d.className=this.cssClass;
d.innerHTML=this.refObj.title;
this.refObj.removeAttribute("title");
DR.Utils.addToBody(d);
this.tooltip=d;
var s=document.createElement("div");
s.className="taskTooltipShadow";
s.innerHTML="&nbsp;";
DR.Utils.addToBody(s);
this.shadow=s;
},show:function(){
var _601=jQuery(this.tooltip).height()+2*10+2*1;
var _602=jQuery(this.tooltip).width()+2*10+2*1;
var _603=jQuery(window).height();
if(_601>_603){
_601=_603-200;
this.tooltip.style.height=(_601+2*10+2*1)+"px";
}
this.tooltip.style.display="block";
this.shadow.style.height=_601+"px";
this.shadow.style.width=_602+"px";
this.shadow.style.display="block";
this._position();
},hide:function(){
this.shadow.style.display="none";
this.tooltip.style.display="none";
},_position:function(){
DR.Utils.Position.snapTo(this.refObj,this.tooltip,this._offsetX,this._offsetY,this.edgeX,this.edgeY,this.drawDirectionX,this.drawDirectionY,true);
this.shadow.style.top=(parseInt(this.tooltip.style.top,10)+this.shadowOffset)+"px";
this.shadow.style.left=(parseInt(this.tooltip.style.left,10)+this.shadowOffset)+"px";
}};
$.namespace("dr",{tooltip:function(type){
return this.each(function(){
type=(type)?type:"taskTooltip";
if(this.tooltip===undefined){
this.tooltip=new DR.Widgets.ToolTip(this,type);
}
});
}});
DR.Widgets.TreeMenu=function(_605){
this.container=getElem(_605);
this.currentTreeNodeId=null;
this.currentTreeNodeHasChildren=false;
this.labelOnclick=null;
this.defaultNodeId="";
this.saveState=false;
this.saveSelectedItem="";
this.stateCookie=null;
this.cookieName="";
this.stateCookieSelected=null;
this.cookieSelectedName="";
this.rootNodeCookie=null;
this.rootNodeCookieID="";
this.ready=true;
this.checkBrowser();
};
DR.Widgets.TreeMenu.prototype={selectNode:function(obj){
var node=null;
var _608=false;
if(typeof obj=="object"){
node=obj.parentNode.parentNode;
}else{
if(typeof obj=="string"){
node=document.getElementById(obj);
_608=true;
}else{
return null;
}
}
var id=node.id;
id=id.replace("treeNode_","");
var _60a=id;
id=id.replace("treeRoot_Node_","");
var _60b=document.getElementById(node.id+"_child");
if(node.className=="treeNodeClosed"||node.className=="treeNodeClosedSelected"){
if(_60b){
node.className="treeNodeOpenSelected";
_60b.style.display="block";
}else{
node.className="treeNodeEmptySelected";
}
this.saveNodeState(id,"selected");
}else{
if(node.className=="treeNodeOpen"){
if(_60b){
_60b.style.display="block";
node.className="treeNodeOpenSelected";
}
this.saveNodeState(id,"selected");
}else{
if(node.className=="treeNodeEmptyOpen"||node.className=="treeNodeEmpty"||node.className=="treeNodeEmptySelected"){
node.className="treeNodeEmptySelected";
this.saveNodeState(id,"selected");
}else{
if(node.className=="doc"){
node.className="docSelected";
this.saveNodeState(id,"selected");
}
}
}
}
if(!this.ready){
this.makeVisible(node);
if(this.browserType=="IE"){
var _60c=this;
var func=function(){
_60c.scrollToNode(node);
};
window.setTimeout(func,100);
}else{
this.scrollToNode(node);
}
}
if(_608){
this.scrollToNode(node);
}
this.setCurrentNodeOff(node.id);
if(!_60b){
this.currentTreeNodeHasChildren=false;
}else{
if(_60b.childNodes.length>0){
this.currentTreeNodeHasChildren=true;
}
}
this.currentTreeNodeId=node.id;
if(typeof this.labelOnclick=="function"){
this.labelOnclick(id,node.id);
}
},scrollToNode:function(node){
var xpos=node.offsetLeft;
var ypos=node.offsetTop;
this.container.scrollTop=Math.max(ypos-28,0);
this.container.scrollLeft=xpos;
},toggleNode:function(obj){
var node=null;
if(typeof obj=="object"){
node=obj.parentNode.parentNode;
}else{
if(typeof obj=="string"){
if(obj.length==0){
log("hi");
}
node=document.getElementById(obj);
}else{
return null;
}
}
var id=node.id;
id=id.replace("treeNode_","");
var _614=document.getElementById(node.id+"_child");
if(node.className=="treeNodeClosed"){
if(_614){
node.className="treeNodeOpen";
_614.style.display="block";
this.saveNodeState(id,"open");
}else{
node.className="treeNodeEmpty";
}
}else{
if(node.className=="treeNodeClosedSelected"){
node.className="treeNodeOpenSelected";
_614.style.display="block";
this.saveNodeState(id,"open");
}else{
if(node.className=="treeNodeOpen"){
if(_614){
_614.style.display="none";
node.className="treeNodeClosed";
this.saveNodeState(id,"closed");
}
}else{
if(node.className=="treeNodeOpenSelected"){
if(_614){
_614.style.display="none";
node.className="treeNodeClosedSelected";
this.saveNodeState(id,"closed");
}
}
}
}
}
},saveNodeState:function(id,_616){
if(typeof id=="string"&&this.ready){
if(this.saveState){
if(_616=="open"){
this.stateCookie.addArrayValue(id);
}else{
if(_616=="closed"){
this.stateCookie.removeArrayValue(id);
}else{
if(_616=="selected"){
this.stateCookie.addArrayValue(id);
}
}
}
}
if(this.saveSelectedItem&&_616=="selected"){
this.stateCookieSelected.setValue(id);
}
}
},setCurrentNodeOff:function(id){
if(this.currentTreeNodeId!==null&&this.currentTreeNodeId!=id){
var node=document.getElementById(this.currentTreeNodeId);
if(node){
if(node.className=="docSelected"){
node.className="doc";
}else{
if(this.currentTreeNodeHasChildren){
node.className="treeNodeOpen";
}else{
node.className="treeNodeEmpty";
}
}
}
}
},setLabelOnlick:function(func){
if(typeof func=="function"){
this.labelOnclick=func;
}
},setDefaultNodeId:function(id){
if(typeof id=="string"){
this.defaultNodeId=id;
}
},setRootNodeId:function(id){
if(typeof id=="string"){
this.rootNodeCookie=new DR.Utils.Cookie(this.cookieName+"_rootID");
this.rootNodeCookie.type="Single";
this.rootNodeCookie.load();
var v=this.rootNodeCookie.value;
if(v!=id&&v!==""&&v!==null){
if(this.saveState){
this.stateCookie.clear();
}
if(this.saveSelectedItem){
this.stateCookieSelected.clear();
}
this.initCookies();
}
this.rootNodeCookie.setValue(id);
}
},goUp:function(){
var node=document.getElementById(this.currentTreeNodeId);
if(node){
var _61e=node.parentNode.parentNode;
this.selectNode(_61e.id);
}
},enableSaveState:function(_61f){
if(typeof _61f=="string"){
this.cookieName=_61f;
this.saveState=true;
this.saveSelectedItem=true;
this.initCookies();
}
},enableLastSelected:function(_620){
if(typeof _620=="string"){
this.cookieName=_620;
this.saveSelectedItem=true;
this.initCookies();
}
},initCookies:function(){
if(this.cookieName!==""){
if(this.saveState){
this.stateCookie=new DR.Utils.Cookie(this.cookieName);
this.stateCookie.type="Array";
this.stateCookie.load();
}
if(this.saveSelectedItem){
this.cookieSelectedName=this.cookieName+"_on";
this.stateCookieSelected=new DR.Utils.Cookie(this.cookieSelectedName);
this.stateCookieSelected.type="Single";
this.stateCookieSelected.load();
}
}
},refreshState:function(){
if(this.cookieName!==""){
this.ready=false;
if(this.saveState){
var a=this.stateCookie.arrayValues;
for(var i=0;i<a.length;i++){
if(a[i]!=v){
if(document.getElementById("treeNode_"+a[i])){
this.toggleNode("treeNode_"+a[i]);
}else{
this.stateCookie.removeArrayValue(a[i]);
}
}
}
}
if(this.saveSelectedItem){
var v=this.stateCookieSelected.value;
if(v!==""&&v!==null&&document.getElementById("treeNode_"+v)){
this.selectNode("treeNode_"+v);
}else{
if(this.defaultNodeId!==""){
this.selectNode(this.defaultNodeId);
}
}
}
this.ready=true;
}
},makeVisible:function(obj){
var p=obj.parentNode;
while(p){
if((p.tagName=="BODY")||(p.tagName=="HTML")){
break;
}
if(p.className=="treeNodeClosed"){
this.toggleNode(p.id);
}
p=p.parentNode;
}
},checkBrowser:function(){
if(document.all){
this.browserType="IE";
}else{
this.broswerType="Standard";
}
}};
(function($){
var _627="fckeditor.js",SCRIPT_LOADING=false,REFRESH_INTERVAL=500,EDITORS=[],CUSTOM_TOOLBAR_SETS=[],DEFAULT_CONFIG={BasePath:$.dr.FRAMEWORK_PATH+"external/fckeditor/",Width:"700",Height:"300",ToolbarSet:"default"};
var _628=function(){
return (typeof FCKeditor_IsCompatibleBrowser=="function")?true:false;
};
var _629=function(){
return (typeof FCKeditorAPI=="undefined")?false:true;
};
var _62a=function(id){
return FCKeditorAPI.GetInstance(id);
};
var _62c=function(html){
var h=html.replace(/\<b\>/g,"<strong>");
h=h.replace(/\<\/b>/g,"</strong>");
h=h.replace(/\<i>/g,"<em>");
h=h.replace(/\<\/i>/g,"</em>");
return h;
};
var _62f=function(_630,id,_632){
this.textareaObj=_630;
this.id=id;
this.editorObj=null;
var c=$.extend({},DEFAULT_CONFIG);
this.config=(_632)?$.extend(c,_632):c;
this.refreshTimer=null;
this.init();
};
_62f.prototype={init:function(){
if(_628()){
this.bindEditor();
}else{
if(!SCRIPT_LOADING){
this.loadScript();
}else{
this.checkScriptReady();
}
}
},loadScript:function(){
var _634=this;
SCRIPT_LOADING=true;
$.getScript(this.config.BasePath+_627,function(){
SCRIPT_LOADING=false;
_634.checkScriptReady();
});
},checkScriptReady:function(){
var _635=this;
var func=function(){
if(_628()){
_635.bindEditor();
}else{
_635.checkScriptReady();
}
};
window.setTimeout(func,100);
},bindEditor:function(){
var _637=new FCKeditor(this.id);
$.extend(true,_637,this.config);
_637.ReplaceTextarea();
this.editorObj=_637;
this.checkAPIReady();
},checkAPIReady:function(){
var _638=this;
var func=function(){
if(_629()){
var _63a=_62a(_638.id);
if(typeof _63a=="undefined"){
_638.checkAPIReady();
}else{
if(typeof _63a.EditorDocument=="undefined"){
_638.checkAPIReady();
}else{
_638.synchronize();
}
}
}else{
_638.checkAPIReady();
}
};
window.setTimeout(func,10);
},synchronize:function(){
var _63b=this;
var _63c=function(){
_63b.updateTextarea();
_63b.synchronize();
};
this.refreshTimer=window.setTimeout(_63c,REFRESH_INTERVAL);
},updateTextarea:function(a){
this.textareaObj.value=this.getHTML();
},setHTML:function(html){
var _63f=_62a(this.id);
if(!_63f){
return undefined;
}else{
html=_62c(html);
_63f.SetHTML(html);
}
},getHTML:function(){
var _640=_62a(this.id);
if(typeof _640!="undefined"){
return _640.GetXHTML(true);
}
return undefined;
}};
$.namespace("dr",{wysiwyg:function(_641){
DEFAULT_CONFIG.BasePath=$.dr.FRAMEWORK_PATH+"external/fckeditor/";
this.each(function(){
if(this.tagName.toLowerCase()=="textarea"){
if(!this.wysiwyg){
var id=this.id||this.name;
if(EDITORS[id]){
clearTimeout(EDITORS[id].refreshTimer);
EDITORS[id]=null;
}
this.value=_62c(this.value);
var _643=new _62f(this,id,_641);
EDITORS[id]=_643;
this.wysiwyg=_643;
}
}
});
return this;
}});
$.namespace("dr.wysiwyg",{setHTML:function(html){
this.each(function(){
if(this.wysiwyg){
this.wysiwyg.setHTML(html);
}
});
return this;
},getHTML:function(html){
if(this.length){
var elem=this[0];
var h="";
if(elem.wysiwyg){
h=elem.wysiwyg.getHTML();
}
return h;
}
return undefined;
}});
$.dr.wysiwyg={setDefaultConfig:function(_648){
if(typeof _648=="object"){
$.extend(DEFAULT_CONFIG,_648);
}
},addToolbarSet:function(_649){
if(typeof _649=="object"){
if(_649.name&&_649.settings){
CUSTOM_TOOLBAR_SETS.push(_649);
}
}
},getCustomToolbarSets:function(){
return CUSTOM_TOOLBAR_SETS;
}};
var _64a=function(_64b){
_64b.filter("textarea.basic_wysiwyg, textarea.wysiwyg").each(function(){
var $obj=$(this);
if($obj.hasClass("basic_wysiwyg")){
$obj.dr.wysiwyg({ToolbarSet:"basic"});
}else{
$obj.dr.wysiwyg();
}
});
};
$.dr.addPlugin("form",_64a);
})(jQuery);
String.THOUSANDS_SEPARATOR=",";
String.prototype.formatNumber=function(){
return this.replace(/\d{1,3}(?=(\d{3})+(?!\d))/g,"$&"+String.THOUSANDS_SEPARATOR);
};
Date.prototype.dr_getDOY=function(){
var _64d=new Date(this.getFullYear(),0,1);
return Math.ceil((this-_64d)/86400000);
};
jQuery.dr=window.jQuery.dr||{};
$.dr.baseChart={initChart:function(_64e){
var obj=$("#"+_64e);
if(obj.hasClass("stockChartContainer")){
if(!(window[_64e] instanceof $.dr.stockChart)){
try{
window[_64e]=new $.dr.stockChart(_64e);
window[_64e].initChart(_64e+"_flashObjectId");
}
catch(e){
}
}
}else{
try{
window[_64e]=new Object();
}
catch(e){
}
}
}};
amChartInited=function(_650){
$.dr.baseChart.initChart(_650);
};
amProcessCompleted=function(_651,_652){
if(window[_651]){
window[_651].processCompletedCallback(_652);
}
};
window.amReturnData=function(_653,data){
if(window[_653]){
window[_653].returnDataCallback(unescape(data));
}
};
window.amReturnSettings=function(_655,_656){
if(window[_655]){
window[_655].returnSettingsCallback(_656);
}
};
window.amReturnParam=function(_657,_658){
if(window[_657]){
window[_657].returnParamCallback(_658);
}
};
window.amError=function(_659,_65a){
if(window[_659]){
window[_659].errorCallback(_65a);
}
};
window.amRolledOver=function(_65b,date,_65d){
if(window[_65b]){
window[_65b].rolledOverCallback(date,_65d);
}
};
window.amClickedOn=function(_65e,date,_660){
if(window[_65e]){
window[_65e].clickedOnCallback(date,_660);
}
};
window.amRolledOverEvent=function(_661,date,_663,id,url){
if(window[_661]){
window[_661].rolledOverEventCallback(date,_663,id,url);
}
};
window.amClickedOnEvent=function(_666,date,_668,id,url){
if(window[_666]){
window[_666].clickedOnEventCallback(date,_668,id,url);
}
};
window.amGetZoom=function(_66b,from,to){
if(window[_66b]){
window[_66b].getZoomCallback(from,to);
}
};
window.amReturnImageData=function(_66e,data){
};
window.amSliceClick=function(_670,_671,_672,_673,_674,_675,_676){
};
window.amSliceOver=function(_677,_678,_679,_67a,_67b,_67c,_67d){
};
window.amSliceOut=function(_67e){
};
(function($){
var _680=function(_681){
var did=$(_681).val();
var _683=[];
_683.push("<data_sets>");
_683.push("<data_set did='"+did+"'>");
_683.push("<compare_list_box selected='true' /></data_set></data_sets>");
return _683.join("");
};
var _684=function(_685){
var _686=$(_685).attr("data-chart");
var _687=$(_685).attr("id");
var _688=$(":selected",_685).text();
var _689=$(_685).val();
var _68a=_689;
var _68b=[];
_68b.push("<charts>");
_68b.push("<chart cid='"+((_686!=null)?_686:0)+"'>");
_68b.push("<title>"+_688+"</title>");
_68b.push("<graphs>");
_68b.push("<graph gid='0'>");
_68b.push("<data_sources>");
_68b.push("<close>"+_689+"</close>");
_68b.push("</data_sources>");
_68b.push("<compare_source>"+_68a+"</compare_source>");
_68b.push("<legend><date key='false' title='false'><![CDATA[{close}]]></date><period key='false' title='false'> <![CDATA[<b>{close}</b>]]></period></legend>");
_68b.push("</graph></graphs></chart></charts>");
if(_686==0){
_68b.push("<scroller><graph_data_source>"+_689+"</graph_data_source></scroller>");
}
DR.USER_DATA.save("sitePulseHomeDetail"+GC.CURRENT_SITE_ID,_687,_689,"String");
return _68b.join("");
};
var _68c=function(_68d,_68e){
var _68f=[];
_68f.push("<period_selector><from>");
_68f.push(new $.dr.date($(_68d).val(),$.dr.date.getDefaultFormat()).toFormattedString(_68e));
_68f.push("</from></period_selector>");
return _68f.join("");
};
var _690=function(_691,_692){
var _693=[];
var _694=new $.dr.date($(_691).val(),$.dr.date.getDefaultFormat());
_694.setDate(_694.getDate()+1);
_693.push("<period_selector><to>");
_693.push(_694.toFormattedString(_692));
_693.push("</to></period_selector>");
return _693.join("");
};
var _695=function(_696){
var _697=[];
$(".changeGraphColumn",_696.chartContainerObj).change(function(_698){
_696.changeGraphSrcColumn(_698.target);
});
$(".applyGraphColumn",_696.chartContainerObj).each(function(){
_697.push(this);
});
return _697;
};
var _699=function(_69a){
var _69b=[];
$(".applySettings",_69a.chartContainerObj).each(function(){
_69b.push(this);
$(this).click(function(_69c){
_69a.applySettings(_69c.target);
});
});
return _69b;
};
var _69d=function(_69e){
var _69f=null;
$(".changeCompareTo:first",_69e.chartContainerObj).change(function(_6a0){
_69e.changeCompareTo(_6a0.target);
});
$(".applyCompareTo:first",_69e.chartContainerObj).each(function(){
_69f=this;
});
return _69f;
};
var _6a1=function(_6a2){
$("select.changeData").change(function(){
_6a2.changeSelectDataSet($(this).val());
}).keyup(function(){
_6a2.changeSelectDataSet($(this).val());
});
};
var _6a3=function(_6a4){
var _6a5=null;
$(".applyRangeStart:first",_6a4).each(function(){
_6a5=this;
});
return _6a5;
};
var _6a6=function(_6a7){
var _6a8=null;
$(".applyRangeEnd:first",_6a7).each(function(){
_6a8=this;
});
return _6a8;
};
var _6a9=function(_6aa){
var _6ab=[];
$(".dynamicHighlight",_6aa).each(function(){
var _6ac=this.getAttribute("data-precision");
var _6ad=this.getAttribute("data-prefix");
var _6ae=this.getAttribute("data-suffix");
_6ab.push({elemObj:this,precision:(_6ac!=null&&!isNaN(_6ac))?_6ac:2,formula:this.getAttribute("data-formula"),prefix:(_6ad)?_6ad:"",suffix:(_6ae)?_6ae:""});
});
return _6ab;
};
var _6af=function(_6b0){
$(".staticHighlightControl",_6b0.chartContainerObj).change(function(_6b1){
_6b0.changeStaticHighlight(_6b1.target);
});
};
var _6b2=function(_6b3){
var _6b4=[];
$(".staticHighlight",_6b3).each(function(){
var _6b5=this.getAttribute("data-precision");
var _6b6=this.getAttribute("data-prefix");
var _6b7=this.getAttribute("data-suffix");
var _6b8=this.getAttribute("data-type-ref");
var type=this.getAttribute("data-type");
_6b4.push({elemObj:this,precision:(_6b5!=null&&!isNaN(_6b5))?_6b5:2,formula:this.getAttribute("data-formula"),prefix:(_6b6)?_6b6:"",suffix:(_6b7)?_6b7:"",type:type,typeRef:_6b8});
});
return _6b4;
};
var _6ba=function(_6bb){
var _6bc=_6bb.indexOf("<columns>");
var _6bd=_6bb.indexOf("</columns>");
var _6be=[];
if(_6bc>-1&&_6bd>-1){
_6be=_6bb.substring(_6bc+9,_6bd);
_6be=_6be.split("<column>").join("").split("</column>");
_6be=(_6be instanceof Array)?_6be:[];
}
return _6be;
};
var _6bf=function(col,_6c1){
var pos=-1;
if(!isNaN(col)){
pos=col;
}else{
pos=$.inArray(col,_6c1);
}
return pos;
};
var _6c3=function(_6c4){
_6c4.getSettings();
};
var _6c5=function(_6c6){
_6c6.getData(0);
};
var _6c7=function(_6c8,_6c9){
_6c8.compareDataSet(_6c9);
};
var _6ca=function(_6cb,_6cc){
_6cb.uncompareDataSet(_6cc);
};
var _6cd=function(_6ce){
_6ce.uncompareAll();
};
var _6cf=function(_6d0,_6d1){
_6d0.selectDataSet(_6d1);
};
var _6d2=function(_6d3){
_6d3.hideEvents();
};
var _6d4=function(_6d5){
_6d5.showEvents();
};
var _6d6=function(_6d7){
_6d7.showAll();
};
var _6d8=function(_6d9,data){
_6d9.setData(data);
};
var _6db=function(_6dc){
_6dc.rebuild();
};
var _6dd=function(_6de){
_6de.reloadData();
};
var _6df=function(_6e0,_6e1){
_6e0.reloadSettings(_6e1);
};
var _6e2=function(_6e3,_6e4,_6e5,_6e6){
var _6e7=[];
_6e7.push("<settings>");
_6e7.push(_6e4);
_6e7.push("</settings>");
_6e3.setSettings(_6e7.join(""),_6e5,_6e6);
};
var _6e8=function(_6e9,data,_6eb){
_6e9.appendData(data,_6eb);
};
var _6ec=function(_6ed,_6ee,_6ef){
_6ed.getParam(_6ee);
};
var _6f0=function(_6f1,from,to,_6f4){
var _6f5=new $.dr.date(to,_6f4);
_6f5.setDate(_6f5.getDate()+1);
_6f1.setZoom(from,_6f5.toFormattedString());
};
var _6f6=function(_6f7,_6f8){
var _6f9=0;
var days=1;
var _6fb=$.dr.stockChart.STATIC_TYPES;
if(_6f7.typeRef){
_6f7.type=$("#"+_6f7.typeRef).val();
}
if(_6f7.type){
for(var t in _6fb){
if(t==_6f7.type){
_6f9=_6fb[t].offset;
days=_6fb[t].days;
break;
}
}
}
_6f7.chartObj=_6f8;
_6f7.startOffset=_6f9;
_6f7.numDays=days;
_6f7.avg=function(_6fd){
return _6f8.staticData.avg(this,_6fd);
};
_6f7.sum=function(_6fe){
return _6f8.staticData.sum(this,_6fe);
};
var _6ff="0";
with(_6f7){
_6ff=eval(formula);
if(!isNaN(_6ff)){
_6ff=prefix+_6ff.toFixed(precision).formatNumber()+suffix;
}else{
_6ff=$.dr.stockChart.DATA_NOT_AVAILABLE;
}
}
$(_6f7.elemObj).html(_6ff);
$(_6f7.elemObj).trigger("staticChange");
};
$.dr.stockChart=function(_700,_701){
this.dataDateFmt=(_701)?_701:"yyyy-mm-dd";
this.chartPrefix=_700;
var _702=$("#"+this.chartPrefix);
this.chartContainerObj=(_702.length>0)?_702:document;
};
$.dr.stockChart.prototype={initChart:function(id){
this.flashChartObj=document.getElementById(id);
this.dynamicHighlights={};
this.staticHighlights=[];
this.controls={};
this.controls.apply=[];
this.controls.graphColumn=[];
this.controls.fromDate=_6a3(this.chartContainerObj);
this.controls.toDate=_6a6(this.chartContainerObj);
this.controls.compareTo=_69d(this);
this.controls.changeDataSet=_6a1(this);
this.controls.apply=_699(this);
this.controls.graphColumn=_695(this);
_6af(this);
this.staticHighlights=_6b2(this.chartContainerObj);
this.dynamicHighlights=_6a9(this.chartContainerObj);
this.rangeFromDate=null;
this.rangeToDate=null;
this.chartSettingsXML=null;
this.columnNames=[];
this.isDataLoaded=false;
this.chartData=null;
this.numDataColumns=0;
this.dataPoints=0;
this.chartDataLoc=[];
this.dataStartDate=null;
this.dataEndDate=null;
this.rangeTotals=[];
this.rangeAverages=[];
this.rangeDataPoints=0;
if(!this.rangeFromDate&&this.controls.fromDate){
this.rangeFromDate=new $.dr.date($(this.controls.fromDate).val(),$.dr.date.getDefaultFormat()).toFormattedString(this.dataDateFmt);
}
if(!this.rangeToDate&&this.controls.toDate){
this.rangeToDate=new $.dr.date($(this.controls.toDate).val(),$.dr.date.getDefaultFormat()).toFormattedString(this.dataDateFmt);
}
_6c3(this.flashChartObj);
this.columnNames=_6ba(this.chartSettingsXML);
_6c5(this.flashChartObj);
this.dataStartDate=this.chartData[0][0];
this.dataEndDate=this.chartData[this.chartData.length-1][0];
this.updateStaticHighlights();
this.getZoomCallback(this.rangeFromDate,this.rangeToDate);
this.syncBoundControls();
},syncBoundControls:function(){
for(var _704 in this.controls){
switch(_704){
case "compareTo":
break;
case "graphColumn":
for(var c=0;c<this.controls[_704].length;c++){
}
break;
case "fromDate":
break;
case "toDate":
break;
default:
break;
}
}
},setCustomDateControls:function(_706,end){
if(this.controls.toDate){
$(this.controls.toDate).val(new $.dr.date(this.rangeToDate,this.dataDateFmt).toFormattedString($.dr.date.getDefaultFormat()));
}
if(this.controls.fromDate){
$(this.controls.fromDate).val(new $.dr.date(this.rangeFromDate,this.dataDateFmt).toFormattedString($.dr.date.getDefaultFormat()));
}
},getZoomCallback:function(from,to){
this.rangeFromDate=from;
this.rangeToDate=to;
this.setCustomDateControls();
this.update();
},rolledOverCallback:function(date,_70b){
},processCompletedCallback:function(_70c){
_6c3(this.flashChartObj);
},errorCallback:function(_70d){
},clickedOnCallback:function(date,_70f){
if(_70f=="DD"){
_6f0(this.flashChartObj,date,date,this.dataDateFmt);
}else{
if(_70f=="WW"){
var _710=new $.dr.date(date,this.dataDateFmt);
_710.setDate(_710.getDate()+6);
_6f0(this.flashChartObj,date,_710.toFormattedString(),this.dataDateFmt);
}else{
if(_70f=="MM"){
var _710=new $.dr.date(date,this.dataDateFmt);
_710.setMonth(_710.getMonth()+1);
_710.setDate(_710.getDate()-1);
_6f0(this.flashChartObj,date,_710.toFormattedString(),this.dataDateFmt);
}
}
}
},rolledOverEventCallback:function(date,_712,id,url){
},clickedOnEventCallback:function(date,_716,id,url){
},returnSettingsCallback:function(_719){
this.chartSettingsXML=unescape(_719);
},returnDataCallback:function(_71a){
var _71b=new Date().getTime();
this.chartData=_71a.split("\n");
this.chartData.reverse();
for(var i=0;i<this.chartData.length;i++){
var temp=this.chartData[i].split(",");
if(temp.length>1){
this.chartData[i]=temp;
this.chartDataLoc[i]=this.chartData[i][0];
temp=null;
}else{
var _71e=this.chartData.splice(i,1);
i--;
}
}
var _71f=new Date().getTime();
this.dataPoints=this.chartData.length;
this.numDataColumns=this.chartData[0].length;
this.isDataLoaded=true;
_71a=null;
},returnParamCallback:function(_720){
},changeStaticHighlight:function(obj){
var _722=obj.id;
for(var i=0;i<this.staticHighlights.length;i++){
var _724=this.staticHighlights[i];
for(var r in _724){
if(r=="typeRef"&&_724[r]==_722){
_6f6(this.staticHighlights[i],this);
}
}
}
},updateStaticHighlights:function(){
for(var i=0;i<this.staticHighlights.length;i++){
_6f6(this.staticHighlights[i],this);
}
},staticData:{avg:function(_727,col){
var _729=this.sum(_727,col)/_727.numDays;
return Number(_729);
},sum:function(_72a,col){
var _72c=_6bf(col,_72a.chartObj.columnNames);
var _72d=Number.NaN;
var _72e=(_72a.chartObj.chartData.length-1)-_72a.startOffset;
var _72f=_72e-(_72a.numDays);
if(_72c>-1){
_72d=0;
for(var i=_72e;i>_72f;i--){
var val=Number(_72a.chartObj.chartData[i][_72c]);
_72d+=((val==NaN)?0:val);
}
}
return Number(_72d);
}},changeCompareTo:function(_732){
var _733=$(_732).val();
_6cd(this.flashChartObj);
if(_733!=""){
_6c7(this.flashChartObj,_733);
}
},changeSelectDataSet:function(data){
_6cf(this.flashChartObj,data);
},changeGraphSrcColumn:function(_735){
var _736=_684(_735);
_6e2(this.flashChartObj,_736,true);
},applySettings:function(){
var _737=[];
for(var _738 in this.controls){
switch(_738){
case "compareTo":
break;
case "graphColumn":
for(var c=0;c<this.controls[_738].length;c++){
_737.push(_684(this.controls[_738][c]));
}
break;
case "fromDate":
_737.push(_68c(this.controls.fromDate,this.dataDateFmt));
break;
case "toDate":
_737.push(_690(this.controls.toDate,this.dataDateFmt));
break;
default:
break;
}
}
_6e2(this.flashChartObj,_737.join(""),true);
},update:function(){
if(!this.isDataLoaded){
var _73a=this;
window.setTimeout(function(){
_73a.update();
},1000);
}else{
var _73b=parseInt(jQuery.inArray(this.rangeToDate,this.chartDataLoc));
var _73c=parseInt(jQuery.inArray(this.rangeFromDate,this.chartDataLoc));
this.rangeDataPoints=(_73b-_73c)+1;
for(var col=1;col<this.numDataColumns;col++){
this.rangeTotals[col]=0;
this.rangeAverages[col]=0;
}
for(var row=_73c;row<=_73b;row++){
for(var col=1;col<this.numDataColumns;col++){
var val=Number(this.chartData[row][col]);
this.rangeTotals[col]=this.rangeTotals[col]+((val==NaN)?0:val);
}
}
for(var _740=1;_740<this.rangeTotals.length;_740++){
this.rangeAverages[_740]=this.rangeTotals[_740]/this.rangeDataPoints;
}
this.updateDynamicHighlights();
}
},sum:function(col){
var _742=_6bf(col,this.columnNames);
return (_742>-1)?this.rangeTotals[_742]:Number.NaN;
},avg:function(col){
var _744=_6bf(col,this.columnNames);
return (_744>-1)?this.rangeAverages[_744]:Number.NaN;
},dataPoints:function(){
return this.rangeDataPoints;
},updateDynamicHighlights:function(){
for(var _745 in this.dynamicHighlights){
var _746=this.dynamicHighlights[_745];
var _747=0;
with(this){
_747=eval(_746.formula);
if(!isNaN(_747)){
_747=_746.prefix+_747.toFixed(_746.precision).formatNumber()+_746.suffix;
}else{
_747=$.dr.stockChart.DATA_NOT_AVAILABLE;
}
}
$(_746.elemObj).html(_747);
}
}};
$.dr.stockChart.DATA_NOT_AVAILABLE="n/a";
$.dr.stockChart.SUM="sum";
$.dr.stockChart.AVG="avg";
$.dr.stockChart.TEXT="text";
$.dr.stockChart.VALUE="value";
$.dr.stockChart.DOY=new Date().dr_getDOY();
$.dr.stockChart.STATIC_TYPES={mtd:{offset:0,days:new Date().getDate()},ytd:{offset:0,days:$.dr.stockChart.DOY},wtd:{offset:0,days:new Date().getDay()+1},prev365:{offset:364,days:365},prev7:{offset:6,days:7},prev90:{offset:89,days:90},prev30:{offset:29,days:30},prev1:{offset:1,days:1},cur1:{offset:0,days:1},cur365:{offset:0,days:365},cur90:{offset:0,days:90},cur30:{offset:0,days:30},cur7:{offset:0,days:7},cur60:{offset:0,days:60},prev60:{offset:59,days:60}};
})(jQuery);
(function($){
var _749={deepLink:true,activeTab:0,displayEffect:{animation:"fade",speed:"normal"}};
var _74a=function(){
$(this).parents(".tabSet").css("visibility","visible");
};
$.namespace("dr",{fingertabs:function(_74b){
var _74c=$.extend(true,{},_749,_74b);
var _74d,currentPath,activeTab,tabIDArray=[],effectType=_74c.displayEffect.animation.toLowerCase(),animation={show:$.fn.show,hide:$.fn.hide,speed:_74c.displayEffect.speed};
if($.browser.msie){
effectType="";
}
if(effectType=="fade"){
animation=$.extend(animation,{show:$.fn.fadeIn,hide:$.fn.fadeOut});
}else{
if(effectType=="slide"){
animation=$.extend(animation,{show:$.fn.slideDown,hide:$.fn.slideUp});
}else{
if(effectType!="expand"){
animation.speed=0;
}
}
}
var _74e=function(_74f,_750,_751){
$(this).find("td.tab > dl > dt").removeClass("active").eq(_74f).toggleClass("active").end().end().find("td.tabContainer > dl > dd").hide().eq(_74f).show();
_750.call($(".tabContent",this).hide().eq(_74f),_751);
activeTab=_74f;
};
return this.each(function(){
var _752=$(this);
$(this).wrap("<div class=\"fingerTabSet\"><div class=\"tabSet\">");
var _753=$(this).parents("div.tabSet");
_753.prepend("<table class=\"tabLayoutTable\"><tbody><tr><td class=\"tab\"><td class=\"tabContainer\"></tr></tbody></table>").find("table td.tab").append(_752).end().find("table td.tabContainer").append("<dl class=\"foo\"").end().curReturn;
_752.find(">dt").each(function(_754){
$(this).click(function(){
_74e.call($(this).parents(".tabSet > table"),_754,animation.show,animation.speed);
return false;
});
}).end().find(">dd").appendTo(_753.find("td.tabContainer > dl"));
_74e.call(_752.parents(".tabSet > table"),_74c.activeTab,animation.show,1);
_74a.call(_752);
});
}});
var _755=function(evt,_757){
$("dl.fingertabs",_757).dr.fingertabs();
};
$.dr.addUnobtrusiveEvent(_755,"unobtrusiveEventEarly");
})(jQuery);
(function($){
var _759=function(){
$(".iconWell .popup > div",this).dr.shadows();
var _75a=false;
var _75b=function(){
$(".iconWell > li.hover").removeClass("hover");
};
var _75c=function(evt){
if(evt){
if($(evt.target).parents("ul.iconWell").length==0){
_75b();
$("body").unbind("mouseover",_75c);
_75a=false;
}
}
};
$(".iconWell > li").mouseenter(function(){
_75b();
$(this).addClass("hover");
if(!_75a){
$("body").bind("mouseover",_75c);
_75a=true;
}
});
};
$.dr.addDomReadyEvent(_759,"domReadyEarly");
})(jQuery);
(function($){
$.fn.extend({setMaxHeight:function(tag,_760){
return this.each(function(){
var _761=0,mh=0;
if(jQuery.isArray(tag)){
for(var i=0,len=tag.length;i<len;i++){
if(typeof tag[i]!=="undefined"){
var mh=Math.max($(this).getMaxHeight(tag[i]),_760);
if(mh>_761){
_761=mh;
}
}
}
}else{
if(typeof tag!=="undefined"){
_761=Math.max($(this).getMaxHeight(tag),_760);
}
}
$(this).height(_761);
});
},getMaxHeight:function(tag){
var _765=0;
$(tag,this).each(function(){
_765=Math.max(_765,$(this).outerHeight(true));
});
return _765;
}});
})(jQuery);
(function($){
var _767="";
var _768="";
var _769=220;
var _76a="More about {0}";
var _76b;
var _76c={RECENT_ITEMS_URL:"test-json.jsp",RECENT_ITEMS_KEY:"key",HELP_CALLBACK:function(url){
var obj={url:url,width:500,height:500};
$.dr.popup(obj);
},ERROR_CALLBACK:function(xhr,_770,_771){
$.dr.utils.logError(_771);
},EXTERNAL_LINK_MOUSEOVER:function(){
var $li=$(this);
var _773=$li.find(">a");
var args=Array.prototype.slice.call(arguments);
var _775=args[0];
var _776=args[1];
var _777=args[3];
var _778;
if(!$li.data("loaded")){
var _779=_773.attr("href");
if(_779.indexOf("#")===-1){
$.dr.menu.setHelpContainerText.apply(this,[_775,_776.LOADING_MASK,"expanded"]);
$.ajax({url:_779,dataType:"text",success:function(_77a){
var _77b=$(_77a);
if(_77b.hasClass("menu")){
$li.removeClass("external").addClass("more");
_778=$li.find("div.tier3-container");
var _77c=[_77b.html()].concat(args);
$.dr.menu.addMenu.apply(_778,_77c);
if($li.hasClass("hover")){
$.dr.menu.setActiveMenu(_778);
args[2]="collapsed";
$.dr.menu.setHelpContainer.apply(window,args);
}
}else{
if(_77b.hasClass("helpText")){
$li.data("loaded",_77b.html());
$.dr.menu.setHelpContainerText.apply($li[0],[_775,_77b.html(),"expanded"]);
}
}
},error:function(xhr,_77e){
$.dr.menu.setHelpContainerText.apply($li[0],[_775,"Error retrieving content: "+xhr.status+" "+xhr.statusText,"expanded"]);
}});
}
}else{
$.dr.menu.setHelpContainerText.apply($li[0],[_775,$li.data("loaded"),"expanded"]);
}
},LOADING_MASK:"<div class=\"loadingSmall\"><div class=\"abs\"><span>Loading</span></div></div>"};
var _77f=function(str){
return str.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;");
};
var _781=function(_782,_783){
if(typeof (_782)!="undefined"&&_782!==null){
clearTimeout(_782);
}
if(typeof _783!=="undefined"&_783!==null){
_783.stop(true,true);
_783.css("left","").css("width","");
}
};
var _784=function(xhr){
$.dr.utils.logError(xhr);
};
var _786=function(_787,txt,size){
var _78a=_787.parents(".mega-menu");
_787.find(".help-text-container").html(txt).find("a.helpPopup").click(function(){
_76c.HELP_CALLBACK($(this).attr("data-help-url"));
_78a.hide(0).parent().removeClass("hover");
return false;
});
if(size==="collapsed"){
_787.removeClass("mega-menu-help-expanded").addClass("mega-menu-help-collapsed");
}else{
_787.addClass("mega-menu-help-expanded").removeClass("mega-menu-help-collapsed");
}
};
var _78b=function(_78c,txt,key,size){
var $ric=$(".recent-items-container",_78c);
$ric.find(".ric-subcontainer").hide();
var $sub=$("#ric_"+key);
if(!$sub.length){
$sub=$ric.append("<div id=\"ric_"+key+"\" class=\"ric-subcontainer\">").find("#ric_"+key);
}
$sub.html(txt).show();
var _792=_78c.parents(".mega-menu");
$sub.find("a.recent-item").click(function(e){
_792.hide(0).parent().removeClass("hover");
});
var _794=$sub.find(".recentScroller");
if(_794.length){
var h2h=$sub.find(">h2").outerHeight();
var h=_78c.innerHeight();
_794.height(h-h2h);
}
if(size==="collapsed"){
_78c.removeClass("mega-menu-help-expanded").addClass("mega-menu-help-collapsed");
}else{
_78c.addClass("mega-menu-help-expanded").removeClass("mega-menu-help-collapsed");
}
};
var _797=function(args){
var _799=(args.length)?$.dr.menu.strings[args[0]]||{}:{};
for(var i=1,len=args.length;i<len;i++){
if(_799[args[i]]){
_799=_799[args[i]];
}else{
break;
}
}
return _799.label||_767;
};
var _79b=function(args){
var _79d=(args.length)?$.dr.menu.strings[args[0]]||{}:{};
for(var i=1,len=args.length;i<len;i++){
if(_79d[args[i]]){
_79d=_79d[args[i]];
}else{
break;
}
}
return _79d.label||_767;
};
var _79f=function(args){
var _7a1=(args.length)?$.dr.menu.strings[args[0]]||{}:{};
for(var i=1,len=args.length;i<len;i++){
if(_7a1[args[i]]){
_7a1=_7a1[args[i]];
}else{
break;
}
}
return _7a1.helpText||_768;
};
var _7a3=function(args){
var _7a5=(args.length)?$.dr.menu.strings[args[0]]||{}:{};
for(var i=1,len=args.length;i<len;i++){
if(_7a5[args[i]]){
_7a5=_7a5[args[i]];
}else{
break;
}
}
return _7a5.helpLink||null;
};
var _7a7=function(){
var args=arguments;
var key=args[(args.length-1)];
var html="";
var _7ab=_797(args);
var _7ac=_79f(args);
var link=_7a3(args);
var _7ae="info";
if(key){
var c=$("#"+key).attr("class"),classNames=[];
if(c&&c.length){
classNames=c.split(" ");
}
for(var i=0,len=classNames.length;i<len;i++){
if(classNames[i]!=="more"&&classNames[i]!=="standalone"&&classNames[i]!=="external"&&classNames[i]!=="tier3-list"&&classNames[i]!=="tier1"&&classNames[i]!=="hover"&&classNames[i]!=="active"){
_7ae=classNames[i];
}
}
}
if(_7ab){
html+="<h2 class=\""+_7ae+"\">"+_7ab+"</h2>";
}
if(_7ac){
html+="<p>"+_7ac+"</p>";
}
if(link){
html+="<p><a class=\"helpPopup\" data-help-url=\""+link+"\" href=\""+link+"\">"+_76a.replace("{0}",_7ab)+"</a></p>";
}
return html;
};
var _7b1=function(){
var args=Array.prototype.slice.apply(arguments);
var _7b3=args.shift();
var _7b4,list;
var key=args[(args.length-1)];
var list="<div class=\"recentScroller\"><ul>";
for(var i=0,len=_7b3.length;i<len;i++){
list+="<li><a href=\""+_7b3[i][1]+"\" class=\"recent-item\">"+_77f(_7b3[i][0])+"</a></li>";
}
list+="</ul></div>";
_7b4="<h2 class=\""+key+"\">Recent "+_79b.apply(this,args)+"</h2>";
return _7b4+list;
};
var _7b8=function(){
var _7b9=this;
var args=Array.prototype.slice.apply(arguments);
var _7bb=args.shift();
var size=args.shift();
var key=args[(args.length-1)];
if(typeof hasRecentItems!=="undefined"&&hasRecentItems[key]){
$(".help-text-container",_7b9).hide();
$(".recent-items-container",_7b9).show();
_78b(_7b9,_76c.LOADING_MASK,key,size);
$.dr.menu.getRecentItemsJson(key,_7bb,function(json,_7bf){
var html=_7b1(json.items,args);
_78b(_7b9,html,key,size);
});
}else{
$(".help-text-container",_7b9).show();
$(".recent-items-container",_7b9).hide();
var html=_7a7.apply(this,args);
_786(_7b9,html,size);
}
};
var _7c2=[{open:500,close:500},{open:500,close:500}];
var _7c3,tier2ID,tier3ID;
$.dr.menu={cache:{},showMethod:($.browser.msie)?$.fn.show:$.fn.fadeIn,hideMethod:($.browser.msie)?$.fn.hide:$.fn.fadeOut,TO:null,animator:null,setActiveMenu:function(jObj){
_76b=jObj;
_76b.show();
_76b.parent().addClass("active");
},getActiveMenu:function(){
return _76b;
},getRecentItemsJson:function(key,_7c6,_7c7,_7c8){
var _7c9=this;
if(typeof this.cache[key]==="undefined"){
this.cache[key]={};
}
if(this.cache[key].xhrData){
var _7ca=(typeof this.cache[key].xhrRequest==="boolean")?false:true;
_7c7(this.cache[key].xhrData,_7ca);
}else{
if(!this.cache[key].xhrRequest){
var data={ajaxTime:new Date().getTime()};
data[_7c6.RECENT_ITEMS_KEY]=key;
this.cache[key].xhrRequest=$.ajax({data:data,dataType:"json",url:_7c6.RECENT_ITEMS_URL,success:function(json){
_7c9.cache[key].xhrData=json;
if(typeof _7c7==="function"){
_7c7(json,false);
}
},error:function(xhr,_7ce,_7cf){
delete _7c9.cache[key];
if(typeof _7c8==="function"){
_7c8(xhr,_7ce,_7cf);
}else{
_7c6.ERROR_CALLBACK.call(this,xhr,_7ce,_7cf);
}
}});
}
}
},setRecentItemsJson:function(key,_7d1,_7d2){
if(typeof this.cache[key]==="undefined"){
this.cache[key]={};
}
this.cache[key].xhrData={items:_7d1};
this.cache[key].xhrRequest=true;
},getDefaults:function(){
return _76c;
},setDefaults:function(_7d3){
if(_7d3){
$.extend(true,_76c,_7d3);
}
$(document).trigger("afterMenuSetDefaults",[_7d3]);
},setHelpContainer:function(){
var args=Array.prototype.slice.call(arguments);
var _7d5=args.shift();
_7b8.apply(_7d5,args);
},setHelpContainerText:function(){
_786.apply(this,arguments);
},addMenu:function(){
var _7d6=$(this);
var args=Array.prototype.slice.call(arguments);
_7d6.html(args.shift());
var _7d8=args[0];
$("ul.tier3-list",_7d6).hover(function(){
var _7d9=$(this);
_781($.dr.menu.TO,$.dr.menu.animator);
_7d8.addClass("hover");
_7d9.addClass("hover").find("a").addClass("over");
tier3ID=_7d9.attr("id");
$.dr.menu.TO=setTimeout(function(){
var _7da=args.slice();
_7da.push(tier3ID);
_7da[2]="collapsed";
$.dr.menu.setHelpContainer.apply(this,_7da);
_7d9.addClass("active").siblings().removeClass("active");
},_7c2[1].open);
},function(){
var _7db=$(this);
_781($.dr.menu.TO,$.dr.menu.animator);
_7db.removeClass("hover").find("a").removeClass("over");
var _7dc=_7db.parents(".mega-menu").find(".help-text");
$.dr.menu.TO=setTimeout(function(){
_7dc.removeClass("hover");
_7db.removeClass("active").siblings().removeClass("active");
var _7dd=args.slice();
_7dd[2]="collapsed";
$.dr.menu.setHelpContainer.apply(this,_7dd);
},_7c2[1].close);
});
},strings:{}};
$.namespace("dr",{menu:function(_7de){
var _7df=$(this),fadeSpeed=$.browser.msie?0:200;
var _7e0=function(_7e1,_7e2){
childWidth=$(_7e2).width();
windowWidth=$(window).width();
posX=$(_7e1).offset().left;
targetPosX=posX-(childWidth*0.05)-10;
if((targetPosX+childWidth)>windowWidth){
targetPosX=windowWidth-childWidth;
}else{
if(targetPosX<0){
targetPosX=0;
}
}
return targetPosX;
};
var _7e3=function(){
$(".mega-menu",_7df).each(function(idx){
$(this).css({"left":_7e0($(this).parent(),$(this))+"px","display":"none"});
});
};
return this.each(function(_7e5){
var _7e6=$.extend(true,_7de,_76c);
$(".wrapper",_7df).dr.shadows().find(".inner").setMaxHeight(["ul","div"],_769);
$(".mega-menu",this).bind("menuOpen",function(e){
var _7e8=$(e.target);
_781($.dr.menu.TO,$.dr.menu.animator);
var $li=_7e8.parents("ul.nav >li");
_7c3=$li.attr("id");
var _7ea=$(".help-text",_7e8).removeClass("hover");
if(_7e8.find("ul.tier2-list>li.active").length==0){
_7b8.call(_7ea,_7e6,"expanded",_7c3);
}else{
_7b8.call(_7ea,_7e6,"collapsed",_7c3,tier2ID);
}
$.dr.menu.TO=setTimeout(function(){
$.dr.menu.showMethod.call(_7e8,fadeSpeed,function(){
_7e8.data("active",true);
});
},_7e8.data("interval").open-fadeSpeed);
}).bind("menuClose",function(e){
var _7ec=$(e.target);
_781($.dr.menu.TO,$.dr.menu.animator);
if(_7ec.data("active")){
$.dr.menu.TO=setTimeout(function(){
$.dr.menu.hideMethod.call(_7ec,fadeSpeed,function(){
_7ec.data("active",false).parent().removeClass("hover");
});
},_7ec.data("interval").close);
}else{
_7ec.hide().parent().removeClass("hover");
}
$("ul.tier3-list",$(this)).removeClass("active");
tier3ID=null;
}).each(function(idx){
$(this).data("idx",idx).data("active",false).data("interval",{open:_7c2[$(this).parents(".mega-menu").length].open,close:_7c2[$(this).parents(".mega-menu").length].close});
}).find("a").click(function(){
if($(this).parent().hasClass("more")||$(this).parent().hasClass("external")){
return false;
}else{
$(".mega-menu",_7df).hide();
}
});
$("> li",this).hover(function(){
$(".mega-menu:not(:eq("+$(".mega-menu",$(this)).data("idx")+"))",_7df).hide().parent().removeClass("hover");
$(".mega-menu",$(this)).trigger("menuOpen").parent().addClass("hover");
},function(){
$(".mega-menu",$(this)).trigger("menuClose");
}).filter(":has(.mega-menu)").find("> a").click(function(e){
e.preventDefault();
});
$("ul.tier2-list>li>a",this).bind("mouseover",function(evt){
_781($.dr.menu.TO,$.dr.menu.animator);
var _7f0=$.dr.menu.getActiveMenu();
var $a=$(evt.target);
var $li=$a.parent();
var _7f3=$li.parent().siblings(".help-text").removeClass("hover");
if(tier3ID){
$("ul.tier3-list",_7df).removeClass("active");
tier3ID=null;
}
if($li.hasClass("more")){
var fn=function(){
tier2ID=$li.attr("id");
if(_7f0){
_7f0.parent("li").removeClass("active");
_7f0.hide();
}
_7f0=$a.siblings("div.tier3-container").show();
_7f0.parent().addClass("active");
$.dr.menu.setActiveMenu(_7f0);
_7b8.call(_7f3,_7e6,"collapsed",_7c3,tier2ID);
};
$.dr.menu.animator=_7f3;
if(_7f3.hasClass("mega-menu-help-collapsed")){
$.dr.menu.TO=setTimeout(fn,_7c2[0].open);
}else{
$.dr.menu.TO=setTimeout(function(){
$.dr.menu.animator.removeClass("hover").animate({left:"+=210px",width:"-=210px"},fadeSpeed,fn);
},_7c2[0].open);
}
}else{
if($a.parent().hasClass("standalone")){
$.dr.menu.animator=_7f3;
var fn=function(){
tier2ID=$li.attr("id");
if(_7f0){
_7f0.parent("li").removeClass("active");
_7f0.hide();
}
_7b8.call(_7f3,_7e6,"expanded",_7c3,tier2ID);
};
if(_7f3.hasClass("mega-menu-help-expanded")){
$.dr.menu.TO=setTimeout(fn,_7c2[0].close);
}else{
$.dr.menu.TO=setTimeout(function(){
$.dr.menu.animator.removeClass("hover").animate({left:"-=210px",width:"+=210px"},fadeSpeed,fn);
},_7c2[1].close);
}
}else{
if($a.parent().hasClass("external")){
$.dr.menu.animator=_7f3;
var fn=function(){
tier2ID=$li.attr("id");
if(_7f0){
_7f0.parent("li").removeClass("active");
_7f0.hide();
}
_7e6.EXTERNAL_LINK_MOUSEOVER.call($li[0],_7f3,_7e6,"expanded",_7c3,tier2ID);
};
if(_7f3.hasClass("mega-menu-help-expanded")){
$.dr.menu.TO=setTimeout(fn,_7c2[0].close);
}else{
$.dr.menu.TO=setTimeout(function(){
$.dr.menu.animator.removeClass("hover").animate({left:"-=210px",width:"+=210px"},fadeSpeed,fn);
},_7c2[1].close);
}
}
}
}
$li.addClass("hover");
}).bind("mouseout",function(evt){
_781($.dr.menu.TO,$.dr.menu.animator);
var _7f6=$.dr.menu.getActiveMenu();
var $a=$(evt.target);
var $li=$a.parent();
var _7f9=$li.parent().siblings(".help-text").removeClass("hover");
$li.removeClass("hover");
var fn=function(){
if(_7f6){
_7f6.parent("li").removeClass("active");
_7f6.hide();
}
_7f6=null;
_7b8.call(_7f9,_7e6,_7c3);
};
$.dr.menu.animator=_7f9;
if(_7f9.hasClass("mega-menu-help-expanded")){
$.dr.menu.TO=setTimeout(fn,_7c2[0].close);
}else{
$.dr.menu.TO=setTimeout(function(){
$.dr.menu.animator.animate({left:"-=210px",width:"+=210px"},fadeSpeed,fn);
},_7c2[1].close);
}
});
$(".tier2-list div.tier3-container",_7df).each(function(){
$(this).height($(this).parents(".inner").innerHeight());
}).hide().bind("mouseenter",function(){
if(!tier3ID){
_781($.dr.menu.TO,$.dr.menu.animator);
}
});
$("ul.tier3-list").hover(function(){
var _7fb=$(this);
_781($.dr.menu.TO,$.dr.menu.animator);
var _7fc=_7fb.parents(".mega-menu").find(".help-text").addClass("hover");
_7fb.addClass("hover").find("a").addClass("over");
tier3ID=_7fb.attr("id");
$.dr.menu.TO=setTimeout(function(){
_7b8.call(_7fc,_7e6,"collapsed",_7c3,tier2ID,tier3ID);
_7fb.addClass("active").siblings().removeClass("active");
},_7c2[1].open);
},function(){
var _7fd=$(this);
_781($.dr.menu.TO,$.dr.menu.animator);
_7fd.removeClass("hover").find("a").removeClass("over");
var _7fe=_7fd.parents(".mega-menu").find(".help-text");
$.dr.menu.TO=setTimeout(function(){
tier3ID=null;
_7fe.removeClass("hover");
_7fd.removeClass("active").siblings().removeClass("active");
_7b8.call(_7fe,_7e6,"collapsed",_7c3,tier2ID);
},_7c2[1].close);
});
$(".help-text",this).each(function(){
$(this).height($(this).parent().innerHeight());
}).bind("mouseenter",function(evt){
_781($.dr.menu.TO);
if(!tier3ID){
$(this).removeClass("hover").removeClass("actve");
}
}).bind("mouseleave",function(evt){
var _801=$(this);
_801.removeClass("hover");
});
$(window).bind("load resize",_7e3);
});
}});
var _802=function(){
$(".nav").dr.menu();
};
$.dr.addDomReadyEvent(_802,"domReadyEarly");
})(jQuery);
(function($){
$.namespace("dr",{navigation:function(){
var _804=$(this),timeout="",fadeSpeed=!$.browser.msie?"fast":0;
var _805=[{"open":"100","close":"800"}];
var rows={"dfltCol":"3","oneCol":"1","twoCol":"2"};
var _807=function(_808,_809){
childWidth=$(_809).width();
windowWidth=$(window).width();
posX=$(_808).offset().left;
targetPosX=posX-(childWidth*0.05)-10;
if((targetPosX+childWidth)>windowWidth){
targetPosX=windowWidth-childWidth;
}else{
if(targetPosX<0){
targetPosX=0;
}
}
return targetPosX;
};
var _80a=function(){
$(".menu",_804).each(function(idx){
$(this).css({"left":_807($(this).parent(),$(this))+"px","display":"none"});
});
};
var _80c=function(){
var _80d="";
for(var key in rows){
if($(this).attr("class").match(key)){
_80d=rows[key];
}
}
return _80d==""?rows.dfltCol:_80d;
};
return this.each(function(){
$(".menu:not(.mega-menu)",this).bind("menuOpen",function(e){
var _810=$(e.target);
if(typeof (timeout)!="undefined"){
clearTimeout(timeout);
}
timeout=setTimeout(function(){
_810.fadeIn(fadeSpeed,function(){
_810.data("active",true);
});
},_810.data("interval").open);
}).bind("menuClose",function(e){
var _812=$(e.target);
if(typeof (timeout)!="undefined"){
clearTimeout(timeout);
}
if(_812.data("active")){
timeout=setTimeout(function(){
_812.fadeOut(fadeSpeed,function(){
_812.data("active",false).parent().removeClass("hover");
});
},_812.data("interval").close);
}else{
_812.hide().parent().removeClass("hover");
}
}).each(function(idx){
$(this).data("idx",idx).data("active",false).data("interval",{open:_805[$(this).parents(".menu").length].open,close:_805[$(this).parents(".menu").length].close});
}).find("a").click(function(){
$(".menu",_804).hide();
}).end().find("> ul").dr.shadows().each(function(){
var _814=$(this),rowHeights=[];
$(this).children().each(function(_815){
var row=_815==0?0:Math.floor(_815/_80c.call(_814));
$(this).data("row",row);
if(typeof (rowHeights[row])=="undefined"){
rowHeights[row]=0;
}
rowHeights[row]=$(this).height()>rowHeights[row]?$(this).height():rowHeights[row];
});
$(this).children().each(function(){
$(this).height(rowHeights[$(this).data("row")]);
});
});
$("> li",this).hover(function(){
$(".menu:not(:eq("+$(".menu",$(this)).data("idx")+"))",_804).hide().parent().removeClass("hover");
$(".menu",$(this)).trigger("menuOpen").parent().addClass("hover");
},function(){
$(".menu",$(this)).trigger("menuClose");
}).filter(":has(.menu)").find("> a").click(function(e){
e.preventDefault();
});
$(window).bind("load resize",_80a);
});
}});
var _818=function(){
$(".nav").dr.navigation();
};
$.dr.addDomReadyEvent(_818,"domReadyEarly");
})(jQuery);
(function($){
$.namespace("dr",{shadows:function(){
$(this).each(function(){
if(!$.browser.msie||$.browser.msie&&$.browser.version>6){
$(this).wrap($("<div class=\"shadow\"><div class=\"topLeft\"><div class=\"topRight\"></div></div></div>").append("<div class=\"bottomLeft\"></div><div class=\"bottomRight\"></div>"));
}else{
$(this.parentNode).bgiframe();
}
});
return $(this);
}});
})(jQuery);
(function($){
var _81b="",defaults={deepLink:true,activeTab:0,displayEffect:{animation:"fade",speed:"normal"}};
var _81c=function(ypos){
$(this).stop().animate({backgroundPosition:"0 "+ypos+"px"},250);
};
var _81e=function(){
_81c.call(this,-535);
};
var _81f=function(){
_81c.call(this,-500);
};
$.namespace("dr",{tabs:function(_820){
var _821=$.extend(true,defaults,_820);
var _822=_821.displayEffect.animation.toLowerCase(),animation={show:$.fn.show,hide:$.fn.hide,speed:_821.displayEffect.speed};
if($.browser.msie){
_822="none";
}
switch(_822){
case "fade":
animation=$.extend(animation,{show:$.fn.fadeIn,hide:$.fn.fadeOut});
break;
case "slide":
animation=$.extend(animation,{show:$.fn.slideDown,hide:$.fn.slideUp});
break;
case "none":
animation.speed=0;
break;
}
return this.dr.bindPluginEvent("beforechange",_821.beforechange).dr.bindPluginEvent("beforeanimate",_821.beforeanimate).dr.bindPluginEvent("afteranimate",_821.afteranimate).each(function(){
var _823=$(this),defaultTab=0,activeTab,tabIDArray=[];
var _824=function(_825,_826){
var _827=true;
if(!isNaN(activeTab)){
if(_825===activeTab){
_827=false;
}else{
var _828=_823.find("> dd:eq("+activeTab+") > div.tabContent")[0];
_827=_823.find("> dt").eq(activeTab).add(_823).dr.triggerEach("beforechange",[_828,activeTab,_825]);
}
}
return (_827!==false);
};
var _829=function(_82a,_82b,_82c){
activeTab=_82a;
var _82d=_823.find("> dd").hide().eq(_82a).show().end().find("> div.tabContent").hide().eq(_82a);
var _82e=_823.find("> dt").removeClass("active").eq(_82a).addClass("active")[0];
var _82f=_823.add(_82e).dr.triggerEach("beforeanimate",[_82d[0],_82a,_82e]);
var _830=function(){
_823.add(_82e).dr.triggerEach("afteranimate",[_82d[0],_82a]);
};
if(_82f===false){
_82d.show();
_830.call(_82d[0]);
}else{
if($.isFunction(_82f)){
_82f.call(_82d[0],_830);
}else{
_82b.call(_82d,_82c,_830);
}
}
};
var _831=function(){
_823.find("> dt").each(function(_832){
var _833=encodeURI((_832==0)?"/":"/"+$.trim($(this).text()).replace(/\s+/g,"-"));
$(this).data("label",_833).data("count",_832).click(function(){
if(_824.call(this,_832)){
$.address.value($(this).data("label"));
}
return false;
});
tabIDArray.push(_833.toLowerCase());
});
$.address.change(function(_834){
var _835=encodeURI($.trim(_834.value)).toLowerCase();
var _836=_823.find("> dt").filter(function(){
var _837=$(this).data("label");
return (_837)?(_837.toLowerCase()==_835):false;
}).data("count");
if(activeTab!=_836&&_81b!=_834.path){
if(typeof activeTab==="undefined"&&typeof defaultTab!=="undefined"&&_834.path=="/"){
_836=defaultTab;
}
var _838=false;
for(var i=0;i<tabIDArray.length;i++){
if(tabIDArray[i]==_835){
_829(_836,animation.show,animation.speed);
break;
}
}
}
_81b=_834.path;
});
};
var _83a=(_821.deepLink&&!_823.parents("dl.tabs").length&&!$("body").hasClass("modalPage"));
var _83b=_823.find("> dt").find("script").remove().end().prependTo(this).each(function(_83c){
var $dt=$(this);
var _83e="";
if(!$dt.hasClass("tab")){
_83e="tab ";
}
if((_83c===0)&&!$dt.hasClass("first")){
_83e+="first ";
}
if($dt.hasClass("active")){
defaultTab=_83c;
}
if($("a",this).length){
_83e+="tabLink";
_83a=false;
}else{
if(!_83a&&!$dt.hasClass("preventClick")){
$dt.bind("click show",function(){
if(_824.call(this,_83c)){
_829(_83c,animation.show,animation.speed);
}
return false;
});
}
}
if(_83e.length){
$dt.addClass($.trim(_83e));
}
}).hover(_81e,_81f).length;
var _83f=_823.find("> dd").each(function(){
var $dd=$(this);
if(!$dd.hasClass("tabContainer")){
$dd.addClass("tabContainer");
}
if(!$dd.find("> div.tabContent").length){
$dd.wrapInner("<div class=\"tabContent\">");
}
}).length;
var _841="";
for(var i=_83f;i<_83b;i++){
_841+="<dd class=\"tabContainer\"><div class=\"tabContent\"/></dd>";
}
if(_841.length){
_823.append(_841);
}
if(_83a){
if($.address.ready()){
_831();
}else{
$(document).bind("onAddressActivated",function(){
_831();
});
$.address.activate();
}
}else{
_829(defaultTab||_821.activeTab,animation.show,0);
}
});
}});
$.dr.utils.createPluginEvent("dr.tabs.beforechange");
$.dr.utils.createPluginEvent("dr.tabs.beforeanimate");
$.dr.utils.createPluginEvent("dr.tabs.afteranimate");
$.dr.tabs={getDefaults:function(){
return defaults;
},setDefaults:function(_843){
if(_843){
$.extend(true,defaults,_843);
}
$(document).trigger("afterTabSetDefaults",[_843]);
}};
$.dr.addUnobtrusiveEvent(function(evt,_845){
$("dl.tabs",_845).dr.tabs();
},"unobtrusiveEventEarly");
})(jQuery);
function Color(){
this.red=0;
this.green=0;
this.blue=0;
this.hex="000000";
}
function HexColor(hex){
this.setHex(hex);
}
HexColor.prototype=new Color();
function RGBColor(r,g,b){
this.setRGBColor(r,g,b);
}
RGBColor.prototype=new Color();
Color.HEX_VALUES="0123456789ABCDEF";
Color.HEX_SYMBOL="#";
Color.DEC_VALUES="0123456789.%";
Color.PERCENT_SYMBOL="%";
Color.MSG_NOT_VALID_HEX_ERROR="Invalid hexidecimal code. Hexidecimal colors contain the following characters only: 0123456789ABCDEF.";
Color.rgbToHexColor=function(r,g,b){
return Color.decToHex(r)+Color.decToHex(g)+Color.decToHex(b);
};
Color.decToHex=function(n){
var h=Color.HEX_VALUES.substr(n&15,1);
while(n>15){
n>>=4;
h=Color.HEX_VALUES.substr(n&15,1)+h;
}
if(h.length==1){
h="0"+h;
}
return h;
};
Color.hexToRgb=function(h){
h=(Color.parseHex)?Color.parseHex(h):"FFFFFF";
var _850=new RGBColor(Color.hexToDec(h.substring(0,2)),Color.hexToDec(h.substring(2,4)),Color.hexToDec(h.substring(4,6)));
return _850;
};
Color.hexToDec=function(h){
return parseInt(h,16);
};
Color.parseHex=function(h){
h=h.toUpperCase();
var _853=null;
var _854=null;
if((h.indexOf("#")!=-1&&h.length==7)||(h.indexOf("#")==-1&&h.length==6)){
_853=/\#{0,1}((([ABCDEF]|\d){2}){3})/;
_854=h.match(_853);
h=(_854!==null)?_854[1]:null;
}else{
if((h.indexOf("#")!=-1&&h.length==4)||(h.indexOf("#")==-1&&h.length==3)){
_853=/\#{0,1}(([ABCDEF]|\d{1})([ABCDEF]|\d{1})([ABCDEF]|\d{1}))/;
_854=h.match(_853);
h=(_854!==null)?_854[2]+_854[2]+_854[3]+_854[3]+_854[4]+_854[4]:null;
}else{
_853=/\#{0,1}(([ABCDEF]|\d){1,6})/;
_854=h.match(_853);
h=(_854!==null)?_854[1]:"000000";
while(h.length<6){
h+="0";
}
}
}
return h;
};
Color.percentToDec=function(p){
if(String(p).indexOf(Color.PERCENT_SYMBOL)){
try{
p=parseFloat(p);
}
catch(e){
p=0;
}
}
p=Math.min(100,Math.abs(p))/100;
return Math.round(p*255);
};
Color.decToPercent=function(dec){
return dec/255*100;
};
Color.hexMask=function(evt,obj){
var key=(evt.which)?evt.which:event.keyCode;
var _85a=String.fromCharCode(key).toUpperCase();
var _85b=Color.HEX_VALUES+"#";
if((key===null)||(key===0)||(key==8)||(key==9)||(key==13)||(key==27)){
return true;
}else{
if((Color.HEX_VALUES.indexOf(_85a)>-1||((Color.HEX_SYMBOL.indexOf(_85a)>-1)&&obj.value.length<=0))){
return _85a;
}else{
return false;
}
}
};
Color.decMask=function(evt){
var key=(evt.which)?evt.which:event.keyCode;
var _85e=String.fromCharCode(key).toUpperCase();
if((key===null)||(key===0)||(key==8)||(key==9)||(key==13)||(key==27)){
return true;
}else{
if((Color.DEC_VALUES.indexOf(_85e)>-1)){
return _85e;
}else{
return false;
}
}
};
Color.prototype.setRGBColor=function(r,g,b){
this.setRedChannel(r);
this.setGreenChannel(g);
this.setBlueChannel(b);
};
Color.prototype.setRedChannel=function(ch){
this.red=this.setChannel(ch);
this.rgbUpdated();
};
Color.prototype.setGreenChannel=function(ch){
this.green=this.setChannel(ch);
this.rgbUpdated();
};
Color.prototype.setBlueChannel=function(ch){
this.blue=this.setChannel(ch);
this.rgbUpdated();
};
Color.prototype.setChannel=function(ch){
if(String(ch).indexOf(Color.PERCENT_SYMBOL)!=-1){
ch=Color.percentToDec(ch);
}
try{
ch=parseInt(ch,10);
if(isNaN(ch)){
ch=0;
}
}
catch(e){
ch=0;
}
finally{
ch=Math.min(255,Math.abs(ch));
}
return ch;
};
Color.prototype.setHex=function(h){
this.hex=Color.parseHex(h);
if(this.hex!==null){
this.hexUpdated();
}else{
alert(Color.MSG_NOT_VALID_HEX_ERROR);
this.hex="000000";
}
};
Color.prototype.rgbUpdated=function(){
this.hex=Color.rgbToHexColor(this.red,this.green,this.blue);
};
Color.prototype.hexUpdated=function(){
var _867=Color.hexToRgb(this.hex);
this.red=_867.red;
this.green=_867.green;
this.blue=_867.blue;
};
Color.prototype.toString=function(){
return this.red+","+this.green+","+this.blue;
};
Color.prototype.toRGBString=function(){
return this.toString();
};
Color.prototype.toHexString=function(){
return "#"+this.hex;
};
(function($){
var _869=function(_86a,fObj){
if(typeof fObj=="string"){
this.inputId=fObj;
this.inputObj=getElem(fObj);
}else{
this.inputId=fObj.id;
this.inputObj=fObj;
}
if(this.inputObj===null){
return;
}
this.pickerObjId=_86a;
this.imagePrefix=$.dr.IMAGE_PATH+"/colorPicker/";
this.rampLeftOffset=12;
this.sliderIconSize=11;
this.rampScale=100;
this.defaultHexColor="000000";
this._open=false;
this.sampleColorObj=null;
this.sampleColorId=this.inputId+"_sample";
this.pickerIconObj=null;
this.pickerIconId=this.inputId+"_icon";
this.currentColor=new Color();
if(this.inputObj.value.trim()!=""){
this.currentColor.setHex(this.inputObj.value);
}
this.currentChannel=null;
this.isDragging=false;
this.popupBound=false;
this.buildUI();
};
var _86c="Red",RED_SLIDER_ALT="Drag to adjust the red channel",GREEN_RAMP_ALT="Green",GREEN_SLIDER_ALT="Drag to adjust the green channel",BLUE_RAMP_ALT="BLUE",BLUE_SLIDER_ALT="Drag to adjust the blue channel",POPUP_UI=null,INSTANCE=null;
_869.prototype={init:function(){
if(!this.popUpBound){
this.buildPopup();
this.bindToInstance();
}
},buildUI:function(){
this.init();
if(DR.Utils.hasCSSClass(this.inputObj,"Enabled")){
this.sampleColorObj=getElem(this.sampleColorId);
this.pickerIconObj=getElem(this.pickerIconId);
}else{
var _86d=this.inputObj.parentNode;
var _86e=false;
while(!_86e){
if((_86d.tagName=="BODY")||(_86d.tagName=="HTML")){
break;
}
if(_86d.tagName=="DIV"||_86d.tagName=="DD"||_86d.tagName=="TD"){
_86e=true;
}else{
_86d=_86d.parentNode;
}
}
var _86f=document.createElement("div");
_86f.className="colorPickerSample";
_86f.innerHTML="<div id=\""+this.sampleColorId+"\" style=\"background-color:"+this.currentColor.toHexString()+"\"></div>";
_86f=DR.Utils.insertAfter(_86d,_86f,this.inputObj);
this.sampleColorObj=getElem(this.sampleColorId);
var d=document.createElement("div");
d.className="colorPickerHandle";
d.innerHTML="&nbsp;";
d.id=this.pickerIconId;
this.pickerIconObj=DR.Utils.insertAfter(_86d,d,_86f);
var _871=this;
var func=function(evt){
_871.toggle(evt);
};
DR.Utils.addEvent(this.pickerIconObj,"click",func);
DR.Utils.addEvent(this.sampleColorObj,"click",func);
DR.Utils.addEvent(this.inputObj,"click",func);
var _874=_86d.getElementsByTagName("span");
var _875=false;
if(_874.length>0){
if(DR.Utils.hasCSSClass(_874[0],"hint")){
_875=true;
}
}
if(!_875){
var s=document.createElement("span");
s.innerHTML="#"+this.defaultHexColor;
s.className="hint";
DR.Utils.insertAfter(_86d,s,this.pickerIconObj);
}
DR.Utils.addCSSClass(this.inputObj,"colorPickerEnabled");
}
},buildPopup:function(){
if(POPUP_UI===null){
var _877=document.getElementsByTagName("body")[0];
var div=document.createElement("DIV");
var ramp="";
ramp+="<div class=\"{0}Ramp\">";
ramp+="\t<div id=\"colorPickerRamp_{0}\" class=\"ramp\"><img src=\""+this.imagePrefix+"{0}_ramp.gif\" width=\"122\" height=\"19\" border=\"0\" onmouseup=\"$.dr.colorPicker.getInstance().stopDrag();\" onmousedown=\"$.dr.colorPicker.getInstance().startDrag('{0}', event);\"  ondragstart=\"return false;\" title=\"{RAMP_ALT}\" /></div>";
ramp+="\t<div class=\"rampInput\"><input name=\"{0}\"  id=\"colorPickerInput_{0}\" maxlength=\"5\"  value=\"0\" onkeypress=\"return Color.decMask(event);\"  onchange=\"$.dr.colorPicker.getInstance().changeInput(this);\" /></div>";
ramp+="\t<div id=\"colorPickerSlider_{0}\" class=\"rampSlider\"><img name=\"{0}_slider_img\" src=\""+this.imagePrefix+"slider_head.gif\"  width=\"11\" height=\"6\" border=\"0\" onmouseup=\"$.dr.colorPicker.getInstance().stopDrag();\" onmousedown=\"$.dr.colorPicker.getInstance().startDrag('{0}', event);\" ondragstart=\"return false;\" title=\"{SLIDER_ALT}\" /></div>";
ramp+="</div>";
var h="";
h+="<div id=\"colorPickerPopup\" class=\"colorPickerPopup\" >";
h+="\t<div class=\"swatch\"><div class=\"frame\"><div id=\"colorPickerSample\"></div></div></div>";
h+="\t<div id=\"colorPickerRamps\" class=\"ramps\">";
h+=ramp.replace(/\{0\}/g,"red").replace(/{RAMP_ALT}/,_86c).replace(/{SLIDER_ALT}/,RED_SLIDER_ALT);
h+=ramp.replace(/\{0\}/g,"green").replace(/{RAMP_ALT}/,GREEN_RAMP_ALT).replace(/{SLIDER_ALT}/,GREEN_SLIDER_ALT);
h+=ramp.replace(/\{0\}/g,"blue").replace(/{RAMP_ALT}/,BLUE_RAMP_ALT).replace(/{SLIDER_ALT}/,BLUE_SLIDER_ALT);
h+="\t\t<div class=\"hexInput\">";
h+="\t\t\t#<input id=\"colorPickerHex\" name=\"hex\" value=\""+this.defaultHexColor+"\" maxlength=\"7\" onkeypress=\"$.dr.colorPicker.getInstance().doEnter(event); return Color.hexMask(event, this);\" onchange=\"$.dr.colorPicker.getInstance().changeHex();\" />";
h+="\t\t</div>";
h+="\t</div>";
h+="</div>";
div.innerHTML=h;
POPUP_UI=_877.appendChild(div);
}
},bindToInstance:function(){
this.popupId="colorPickerPopup";
this.popupObj=getElem(this.popupId);
this.colorPickerRampsObj=getElem("colorPickerRamps");
this.colorPickerHexInputObj=getElem("colorPickerHex");
this.colorPickersampleColorObj=getElem("colorPickerSample");
var c="colorPickerSlider_";
var r="colorPickerRamp_";
var i="colorPickerInput_";
this.channels={};
this.channels.red={};
this.channels.red.slider=getElem(c+"red");
this.channels.red.ramp=getElem(r+"red");
this.channels.red.input=getElem(i+"red");
this.channels.green={};
this.channels.green.slider=getElem(c+"green");
this.channels.green.ramp=getElem(r+"green");
this.channels.green.input=getElem(i+"green");
this.channels.blue={};
this.channels.blue.slider=getElem(c+"blue");
this.channels.blue.ramp=getElem(r+"blue");
this.channels.blue.input=getElem(i+"blue");
this.popUpBound=true;
var _87e=function(evt){
if(window.event){
window.event.cancelBubble=true;
}else{
evt.stopPropagation();
evt.preventDefault();
}
};
this.stopClick=_87e;
DR.Utils.addEvent(this.popupObj,"click",_87e,false);
},show:function(evt){
if(this.inputObj.value.trim()!=""){
this.update();
}else{
INSTANCE=this;
}
if(this.inputObj.disabled){
return;
}
this.popupObj.style.display="block";
var _881=5;
var _882=0;
var _883="Right";
var _884="Top";
var _885="Right";
var _886="Down";
DR.Utils.Position.snapTo(this.inputObj,this.popupObj,_881,_882,_883,_884,_885,_886);
var _887=this;
var func=function(){
_887.addDocumentOnclick();
};
window.setTimeout(func,50);
this._open=true;
},addDocumentOnclick:function(){
var _889=this;
var func=function(){
_889.hide();
};
this.hideFunc=func;
DR.Utils.addEvent(document,"click",func,false);
},hide:function(){
this.popupObj.style.display="none";
if(this.hideFunc){
DR.Utils.removeEvent(document,"click",this.hideFunc);
}
this._open=false;
},toggle:function(evt){
var xLoc=parseInt(DR.Utils.getStyle(this.popupObj,"left"),10);
if(xLoc<-100){
this.popupObj.style.display="none";
}
if(this.popupObj.style.display=="block"&&this._open){
this.hide();
}else{
this.show(evt);
}
},startDrag:function(_88d,evt){
this.currentChannel=_88d;
var _88f=this;
var _890=function(evt){
_88f.doDrag(evt);
};
var _892=function(evt){
_88f.stopDrag(evt);
};
this.mouseup=_892;
this.mousemove=_890;
DR.Utils.addEvent(document,"mousemove",_890,false);
DR.Utils.addEvent(document,"mouseup",_892,false);
this.dragSlider(evt);
this.isDragging=true;
if(document.addEventListener){
evt.stopPropagation();
evt.preventDefault();
}
},stopDrag:function(){
DR.Utils.removeEvent(document,"mousemove",this.mousemove);
DR.Utils.removeEvent(document,"mouseup",this.mouseup);
this.isDragging=false;
this.currentChannel=null;
},doDrag:function(evt){
if(this.isDragging){
if(!evt){
evt=window.event;
}
this.dragSlider(evt);
}
return false;
},dragSlider:function(evt){
evt=(evt)?evt:event;
var _896=this.popupObj.offsetLeft+this.colorPickerRampsObj.offsetLeft;
_896+=(this.rampLeftOffset-(this.sliderIconSize/2));
var x=this.constrainSlider(evt.clientX-_896+document.body.parentNode.scrollLeft);
var p=x-this.rampLeftOffset+"%";
if(this.currentChannel=="red"){
this.currentColor.setRedChannel(p);
}else{
if(this.currentChannel=="green"){
this.currentColor.setGreenChannel(p);
}
}
if(this.currentChannel=="blue"){
this.currentColor.setBlueChannel(p);
}
this.update();
},constrainSlider:function(x){
var _89a=this.rampLeftOffset;
var _89b=_89a+this.rampScale;
var newX=Math.min(Math.max(_89a,x),_89b);
return newX;
},positionSliders:function(){
this.positionSlider(this.channels.red.slider,this.currentColor.red);
this.positionSlider(this.channels.green.slider,this.currentColor.green);
this.positionSlider(this.channels.blue.slider,this.currentColor.blue);
},positionSlider:function(_89d,dec){
var _89f=Math.round(Color.decToPercent(dec));
_89f=_89f+this.rampLeftOffset;
_89d.style.left=_89f+"px";
},update:function(){
INSTANCE=this;
this.channels.red.input.value=this.currentColor.red;
this.channels.green.input.value=this.currentColor.green;
this.channels.blue.input.value=this.currentColor.blue;
if(this.currentColor.hex){
this.colorPickerHexInputObj.value=this.currentColor.hex;
this.colorPickersampleColorObj.style.backgroundColor=this.currentColor.toHexString();
}
this.positionSliders();
this.inputObj.value=this.currentColor.toHexString();
this.sampleColorObj.style.backgroundColor=this.currentColor.toHexString();
},changeInput:function(obj){
var _8a1=obj.value;
var _8a2=obj.name;
if(_8a2=="red"){
this.currentColor.setRedChannel(_8a1);
}else{
if(_8a2=="green"){
this.currentColor.setGreenChannel(_8a1);
}
}
if(_8a2=="blue"){
this.currentColor.setBlueChannel(_8a1);
}
this.currentChannel=_8a2;
this.update();
},changeHex:function(){
var hex=this.colorPickerHexInputObj.value;
this.currentColor.setHex(hex);
this.update();
},setBaseInput:function(){
this.inputObj.value=this.currentColor.toHexString();
},getBaseInput:function(){
var hex=null;
if(this.inputObj!==null){
hex=this.inputObj.value;
}
},doEnter:function(evt,_8a6){
var key=(evt.which)?evt.which:event.keyCode;
var _8a8=(_8a6)?true:false;
if(key==13){
if(!_8a8){
this.changeHex();
}else{
this.update();
}
}
}};
$.namespace("dr",{colorPicker:function(){
return this.each(function(){
if(this.type=="text"){
if(!$(this).hasClass("colorPicker_inited")){
$(this).addClass("colorPicker");
var _8a9="jQuery('#"+this.id+"').get(0).colorPicker";
this.colorPicker=new _869(_8a9,this);
$(this).addClass("colorPicker_inited");
}
}
});
}});
$.dr.colorPicker={getInstance:function(){
return INSTANCE;
}};
var _8aa=function(_8ab){
_8ab.filter("input[type=text].colorPicker").dr.colorPicker();
};
$.dr.addPlugin("form",_8aa);
})(jQuery);
(function($){
var _8ad=0,ANY_DATE_PICKERS_OPEN=false;
var _8ae={CSS_CLASS_DATE:"date",CSS_CLASS_TODAYS_DATE:"todaysDate",CSS_CLASS_DISPLAY_DATE_CLASS:"displayDate",CSS_CLASS_DISPLAY_MONTH_DATE:"displayMonthDate",CSS_CLASS_OTHER_MONTH_DATE:"otherMonthDate",YEAR_SELECT_OFFSET:4,DEFAULT_TEXT:"Calendar"};
var _8af="January",FEBRUARY="February",MARCH="March",APRIL="April",MAY="May",JUNE="June",JULY="July",AUGUST="August",SEPTEMBER="September",OCTOBER="October",NOVEMBER="November",DECEMBER="December",JANUARY_ABBRV="Jan",FEBRUARY_ABBRV="Feb",MARCH_ABBRV="Mar",APRIL_ABBRV="Apr",MAY_ABBRV="May",JUNE_ABBRV="Jun",JULY_ABBRV="Jul",AUGUST_ABBRV="Aug",SEPTEMBER_ABBRV="Sep",OCTOBER_ABBRV="Oct",NOVEMBER_ABBRV="Nov",DECEMBER_ABBRV="Dec",SUNDAY_ABBRV="S",MONDAY_ABBRV="M",TUESDAY_ABBRV="T",WEDNESDAY_ABBRV="W",THURSDAY_ABBRV="T",FRIDAY_ABBRV="F",SATURDAY_ABBRV="S",TODAY="Go to Today's Date";
var _8b0=[_8af,FEBRUARY,MARCH,APRIL,MAY,JUNE,JULY,AUGUST,SEPTEMBER,OCTOBER,NOVEMBER,DECEMBER],MONTH_ABBREVIATIONS=[JANUARY_ABBRV,FEBRUARY_ABBRV,MARCH_ABBRV,APRIL_ABBRV,MAY_ABBRV,JUNE_ABBRV,JULY_ABBRV,AUGUST_ABBRV,SEPTEMBER_ABBRV,OCTOBER_ABBRV,NOVEMBER_ABBRV,DECEMBER_ABBRV],DAY_HEADERS=[SUNDAY_ABBRV,MONDAY_ABBRV,TUESDAY_ABBRV,WEDNESDAY_ABBRV,THURSDAY_ABBRV,FRIDAY_ABBRV,SATURDAY_ABBRV];
$.dr.date.getMonthName=function(i){
return _8b0[i];
};
$.dr.date.getMonthAbbr=function(i){
return MONTH_ABBREVIATIONS[i];
};
$.dr.date.getDayAbbr=function(i){
return DAY_HEADERS[i];
};
var _8b4=function(_8b5,fObj,_8b7,_8b8){
this.pickerObjId=_8b5;
this.init(fObj,_8b7,_8b8);
};
_8b4.prototype={init:function(fObj,_8ba,_8bb){
if(typeof fObj=="string"){
this.inputId=fObj;
this.inputObj=getElem(fObj);
}else{
if(fObj.id){
this.inputId=fObj.id;
}else{
this.inputId=fObj.getAttribute("datePickerId");
}
this.inputObj=fObj;
}
if(this.inputObj===null){
return;
}
this.dateFormat=(_8bb)?_8bb:$.dr.date.getDefaultFormat();
this._label=(_8ba)?_8ba.replace(":",""):_8ae.DEFAULT_TEXT;
this.pickerIcon=null;
this.pickerIconId=this.inputId+"_icon";
this.popupId="picker_"+this.inputId;
this.popupObj=null;
this.contentArea=null;
this.calendarArea=null;
this.menuArea=null;
this.overlay=null;
this.todaysDate=null;
this.todaysMonth=null;
this.todaysDay=null;
this.todaysYear=null;
this.displayMonth=null;
this.displayDay=null;
this.displayYear=null;
this.displayDateOffset=null;
this.inputFieldMonth=null;
this.inputFieldDay=null;
this.inputFieldYear=null;
this.currentMonthHasTodaysDate=false;
this.hasInputFieldValue=false;
this.menuBuilt=false;
this.menuMonthSelect=null;
this.menuYearSelect=null;
this.numDaysInMonth=[0,31,28,31,30,31,30,31,31,30,31,30,31];
this.setTodaysDate();
this.attachIcon();
},attachIcon:function(){
if(!$(this.inputObj).hasClass("Enabled")){
var _8bc=this.inputObj.parentNode;
var _8bd=false;
while(!_8bd){
if((_8bc.tagName=="BODY")||(_8bc.tagName=="HTML")){
break;
}
if(_8bc.tagName=="DIV"||_8bc.tagName=="DD"||_8bc.tagName=="TD"){
_8bd=true;
}else{
_8bc=_8bc.parentNode;
}
}
var divs=_8bc.getElementsByTagName("div");
var _8bf=false;
var _8c0=null;
if(divs.length>0){
if($(divs[0]).hasClass("Handle")){
this.pickerIcon=divs[0];
}
}
if(this.pickerIcon===null){
var d=document.createElement("div");
d.innerHTML="&nbsp;";
d.className="datePickerHandle";
d.id=this.pickerIconId;
var _8c2=this;
var func=function(evt){
_8c2.toggle(evt);
};
$(d).click(func);
$(this.inputObj).click(func);
this.pickerIcon=DR.Utils.insertAfter(_8bc,d,this.inputObj);
}
var _8c5=_8bc.getElementsByTagName("span");
var _8c6=false;
if(_8c5.length>0){
if($(_8c5[0]).hasClass("hint")){
_8c6=true;
}
}
if(!_8c6){
var s=document.createElement("span");
s.className="hint";
var _8c8=new $.dr.date(new Date(),this.dateFormat);
s.innerHTML=this.dateFormat+" ("+_8c8.toFormattedString()+")";
s.title=s.innerHTML;
DR.Utils.insertAfter(_8bc,s,this.pickerIcon);
}
$(this.inputObj).addClass("datePickerEnabled").attr("autocomplete","off");
}
},toggle:function(evt,_8ca){
if(this.contentArea===null){
var _8cb=document.getElementById(this.popupId);
if(_8cb===null){
var _8cc=document.getElementsByTagName("body")[0];
var d=document.createElement("DIV");
d.id=this.popupId;
d.className="datePickerContent";
this.contentArea=_8cc.appendChild(d);
var d=document.createElement("DIV");
d.id="menuArea_"+this.popupId;
this.menuArea=this.contentArea.appendChild(d);
var d=document.createElement("DIV");
d.id="calendarArea_"+this.popupId;
d.className="calendarArea";
this.calendarArea=this.contentArea.appendChild(d);
}else{
this.contentArea=_8cb;
this.menuArea=document.getElementById("menuArea_"+this.popupId);
this.calendarArea=document.getElementById("calendarArea_"+this.popupId);
}
}
if(this.popupObj===null){
this.show(evt);
}else{
if(this.popupObj.display=="block"){
this.hide();
}else{
this.show(evt);
}
}
},show:function(evt){
ANY_DATE_PICKERS_OPEN=true;
if(this.inputObj.disabled){
return;
}
var _8cf=this;
var func=function(evt){
_8cf.shouldHide(evt);
};
this.shouldHideFunc=func;
$(document).click(func);
this.setInputFieldDate();
this.refreshCalendar();
this.showPopup();
var _8d2=this.overlay.shadowRight;
var _8d3=this.overlay.shadowBottom;
var _8d4=-(_8d2/2);
var _8d5=0;
if(DR.Utils.BrowserDetect.browser=="Explorer"&&DR.Utils.BrowserDetect.version<7){
_8d4=0;
_8d5=2;
}
var _8d6="Left";
var _8d7="Bottom";
var _8d8="Right";
var _8d9="Down";
DR.Utils.Position.snapTo(this.inputObj,this.popupObj,_8d4,_8d5,_8d6,_8d7,_8d8,_8d9);
},shouldHide:function(evt){
var o=evt.target;
var _8dc=(o.id==this.inputId+"_todayLink")?true:false;
while(o){
var _8dd=(o.getAttribute)?o.getAttribute("datePickerId"):null;
if(this.inputId==_8dd){
_8dc=true;
break;
}else{
if(o.id!==undefined){
if(o.id==("modal_"+this.popupId)||o.id==this.pickerIconId||o.id==this.inputId){
_8dc=true;
break;
}
}
}
o=o.parentNode;
}
if(!_8dc){
this.hide();
$(document).unbind("click",this.shouldHide);
}
},hide:function(){
if(this.overlay!==null){
$(document).unbind("click",this.shouldHideFunc);
this.overlay.close();
}
ANY_DATE_PICKERS_OPEN=false;
},showPopup:function(){
if(!ANY_DATE_PICKERS_OPEN){
var _8de=this;
var func=function(){
_8de.showPopup();
};
window.setTimeout(func,50);
}else{
if(this.popupObj===null){
var _8e0=overlayStack.getById(this.popupId);
if(_8e0===null){
var w=this.contentArea.offsetWidth-10;
var h=this.contentArea.offsetHeight-10;
$("#"+this.popupId).dr.overlay({type:"modeless",width:w,height:h,anchorId:this.popupId});
this.overlay=$("#"+this.popupId).data("overlay");
}else{
this.overlay=_8e0;
}
this.overlay.setTitle(this._label);
this.popupObj=$("#modal_"+this.popupId).addClass("datePickerOverlay")[0];
this.overlay.show();
}else{
this.overlay.show();
}
}
},updateDateInput:function(evt,year,_8e5,day){
this.inputObj.value=this.getDateString(year,_8e5,day);
if(typeof this.inputObj.onchange=="function"){
this.inputObj.onchange();
}
this.hide();
},getDateString:function(year,_8e8,day){
var date=new Date();
date.setFullYear(year,_8e8-1,day);
return new $.dr.date(date,this.dateFormat).toFormattedString();
},refreshCalendar:function(){
if(arguments.length==2){
if(arguments[0]!=this.displayYear||arguments[1]!=this.displayMonth){
this.calculateDisplayDate(arguments[0],arguments[1]);
this.calculateOffset();
this.calendarArea.innerHTML=this.writeCalendar(arguments[0],arguments[1]);
}
}else{
if(arguments.length==3){
this.calculateDisplayDate(arguments[0],arguments[1],arguments[2]);
this.calculateOffset();
this.calendarArea.innerHTML=this.writeCalendar(arguments[0],arguments[1],arguments[2]);
}else{
this.calculateDisplayDate();
this.calculateOffset();
this.calendarArea.innerHTML=this.writeCalendar();
}
}
},setTodaysDate:function(){
this.todaysDate=new $.dr.date(new Date(),this.dateFormat);
this.todaysMonth=this.todaysDate.getMonth()+1;
this.todaysDay=this.todaysDate.getDate();
this.todaysYear=this.todaysDate.getFullYear();
},setInputFieldDate:function(){
this.hasInputFieldValue=false;
if(this.inputObj!==null){
if(this.inputObj.value!==""){
var date=new $.dr.date(this.inputObj.value,this.dateFormat);
if(date.isValid()){
this.inputFieldMonth=date.getMonth()+1;
this.inputFieldDay=date.getDate();
this.inputFieldYear=date.getFullYear();
this.hasInputFieldValue=true;
}
}
}
},loadPreviousMonth:function(){
var _8ec=this.displayMonth-1;
var year=this.displayYear;
if(_8ec<1){
_8ec=12;
year--;
}
this.refreshCalendar(year,_8ec);
},loadNextMonth:function(){
var _8ee=this.displayMonth+1;
var year=this.displayYear;
if(_8ee>12){
_8ee=1;
year++;
}
this.refreshCalendar(year,_8ee);
},calculateDisplayDate:function(){
if(arguments.length>0){
var day=1;
if(arguments.length==3){
day=arguments[2];
}
var date=$.dr.date.getISODate(arguments[0],arguments[1],day);
this.displayMonth=date.getMonth()+1;
this.displayDay=date.getDate();
this.displayYear=date.getFullYear();
}else{
if(this.inputObj){
if(this.inputObj.value!==""){
var date=new $.dr.date(this.inputObj.value,this.dateFormat);
if(date.isValid()){
var _8f2=date.getMonth()+1;
this.displayMonth=date.getMonth()+1;
this.displayDay=date.getDate();
this.displayYear=date.getFullYear();
}
}else{
this.displayMonth=this.todaysMonth;
this.displayDay=this.todaysDay;
this.displayYear=this.todaysYear;
}
}else{
this.displayMonth=this.todaysMonth;
this.displayDay=this.todaysDay;
this.displayYear=this.todaysYear;
}
}
if($.dr.date.isLeapYear(this.displayYear)){
this.numDaysInMonth[2]=29;
}
},calculateOffset:function(){
var date=$.dr.date.getISODate(this.displayYear,this.displayMonth,1);
var _8f4=date.getDay();
this.displayDateOffset=(_8f4>=_8ad)?_8f4-_8ad:7-_8ad+_8f4;
},refreshMenu:function(){
if(this.menuYearSelect!==null){
if(this.menuYearSelect.options.length==0){
this.menuBuilt=false;
}else{
var _8f5=parseInt(this.menuYearSelect.options[0].value,10);
var _8f6=parseInt(this.menuYearSelect.options[this.menuYearSelect.options.length-1].value,10);
if((this.displayYear<=_8f5)||(this.displayYear>=_8f6)){
this.menuBuilt=false;
}
}
}
if(!this.menuBuilt){
var _8f7="";
var _8f8;
_8f7+="<div class=\"monthYearPicker\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" ><tr>\n";
_8f7+="<td class=\"previousArrow\"><a href=\"#\" onclick=\""+this.pickerObjId+".loadPreviousMonth(); return false;\"><span>&lt;&lt;</span></a></td>";
var _8f9=this.pickerObjId+".refreshCalendar("+this.pickerObjId+".displayYear, this.options[this.selectedIndex].value-0)";
var _8fa=this.pickerObjId+".refreshCalendar(this.options[this.selectedIndex].value-0, "+this.pickerObjId+".displayMonth)";
_8f7+="<td class=\"monthTD\"><select name=\"cpMonth\" id=\""+this.inputId+"_monthControl\" onkeyup=\""+_8f9+"\" onchange=\""+_8f9+"\" >";
for(var _8fb=1;_8fb<=12;_8fb++){
_8f8=(_8fb==this.displayMonth)?"SELECTED":"";
_8f7+="<option value=\""+_8fb+"\" "+_8f8+">"+_8b0[_8fb-1]+"</option>";
}
_8f7+="</select></td>";
_8f7+="<td class=\"yearTD\"><select name=\"cpYear\" id=\""+this.inputId+"_yearControl\" onkeyup=\""+_8fa+"\" onchange=\""+_8fa+"\" >";
for(var _8fc=this.displayYear-_8ae.YEAR_SELECT_OFFSET;_8fc<=this.displayYear+_8ae.YEAR_SELECT_OFFSET;_8fc++){
_8f8=(_8fc==this.displayYear)?"selected":"";
_8f7+="<option value=\""+_8fc+"\" "+_8f8+">"+_8fc+"</option>";
}
_8f7+="</select></td><td class=\"nextArrow\" ><a href=\"#\" onclick=\""+this.pickerObjId+".loadNextMonth(); return false;\"><span>&gt;&gt;</span></a></td></tr>\n";
_8f7+="</table></div>\n";
this.menuArea.innerHTML=_8f7;
this.menuMonthSelect=getElem(this.inputId+"_monthControl");
this.menuYearSelect=getElem(this.inputId+"_yearControl");
this.menuBuilt=true;
}else{
DR.Utils.FormUtils.setValue(this.menuMonthSelect,{},this.displayMonth);
DR.Utils.FormUtils.setValue(this.menuYearSelect,{},this.displayYear);
}
},writeCalendar:function(){
this.refreshMenu();
var _8fd="";
_8fd+="<div class=\"datesArea\"><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"calendar\"><thead><tr>";
var _8fe=this.displayMonth;
var _8ff=1;
var _900=this.displayYear;
if(this.displayDateOffset>0){
_8fe--;
if(_8fe<1){
_8fe=12;
_900--;
}
_8ff=(this.numDaysInMonth[_8fe]-this.displayDateOffset)+1;
}
for(var j=0;j<7;j++){
_8fd+="<th class=\"dayOfWeekName\" width=\"14%\">"+DAY_HEADERS[(_8ad+j)%7]+"</th>\n";
}
_8fd+="</thead><tbody>";
for(var row=1;row<=6;row++){
_8fd+="<tr>\n";
for(var col=1;col<=7;col++){
var _904=$.dr.date.getISODate(_900,_8fe,_8ff);
var _905=this.setDateClassName(_904);
if((row>4)&&(col==1)&&(_905==_8ae.CSS_CLASS_OTHER_MONTH_DATE)){
_8fd+="<td colspan=\"7\">&nbsp;</td>";
break;
}else{
_8fd+="<td class=\""+_8ae.CSS_CLASS_DATE+" "+_905+"\"><a href=\"#\" onclick=\""+this.pickerObjId+".updateDateInput(event, "+_900+", "+_8fe+", "+_8ff+"); return false;\" class=\""+_905+"\">"+_8ff+"</a></td>\n";
}
_8ff++;
if(_8ff>this.numDaysInMonth[_8fe]){
_8ff=1;
_8fe++;
}
if(_8fe>12){
_8fe=1;
_900++;
}
}
_8fd+="</tr>";
}
_8fd+="</tbody></table></div>\n";
if(!this.currentMonthHasTodaysDate){
_8fd+="<div class=\"todayLink\"><a href=\"#\" id=\""+this.inputId+"_todayLink\" onclick=\""+this.pickerObjId+".refreshCalendar("+this.todaysYear+", "+this.todaysMonth+", "+this.todaysDay+"); return false;\">"+TODAY+"</a></div>";
}
this.currentMonthHasTodaysDate=false;
return _8fd;
},setDateClassName:function(date){
var _907=date.getMonth()+1;
var year=date.getFullYear();
var day=date.getDate();
var _90a="";
if(this.hasInputFieldValue&&_907==this.inputFieldMonth&&year==this.inputFieldYear&&day==this.inputFieldDay){
_90a=_8ae.CSS_CLASS_DISPLAY_DATE_CLASS+" ";
}
if(_907==this.todaysMonth&&year==this.todaysYear&&day==this.todaysDay){
this.currentMonthHasTodaysDate=true;
_90a+=_8ae.CSS_CLASS_TODAYS_DATE;
}else{
if(_907==this.displayMonth&&year==this.displayYear){
_90a+=_8ae.CSS_CLASS_DISPLAY_MONTH_DATE;
}else{
_90a+=_8ae.CSS_CLASS_OTHER_MONTH_DATE;
}
}
return _90a;
}};
$.namespace("dr",{datePicker:function(){
return this.each(function(_90b){
if(this.type=="text"){
var _90c=$(this);
if(!_90c.hasClass("datePicker_inited")){
_90c.addClass("datePicker");
var _90d=_90c.attr("data-format");
var jRef="#"+this.id;
if(!this.id){
var id="datePicker_count_"+_90b+"_rndNbr_"+new Date().getTime();
_90c.addClass(id);
jRef="."+id;
_90c.attr("datePickerId",id);
}
var _910="jQuery(jQuery('"+jRef+"').get(0)).data('datePicker')";
var _911=$.dr.utils.getLabel(this);
if(_911==this.name){
_911=null;
}
_90c.data("datePicker",new _8b4(_910,this,_911,_90d));
_90c.addClass("datePicker_inited");
}
}
});
}});
var _912=function(_913){
_913.filter("input[type=text].datePicker").dr.datePicker();
};
$.dr.addPlugin("form",_912);
$.dr.datePicker={setDefaults:function(_914){
if(_914){
$.extend(_8ae,_914);
}
}};
})(jQuery);
(function($){
var _916={VALIDATE_HIDDEN_FIELDS:false,VALIDATION_ENABLED:true,SHOW_INLINE_ERRORS:true,SHOW_INLINE_ERRORS_ONBLUR:false,INLINE_ERROR_POSITION:"above",INLINE_ERROR_CLASS:"error",INPUT_ERROR_CLASS:"inputError",GROUP_BOX_CLASS:"errorMessage",GROUP_BOX_POSITION:"above",GROUP_BOX_ENABLED:true,GROUP_BOX_POSITION_ABOVE_FORM:false,FOCUS_FIRST_ERROR:true,NUMBER_LOCALE:"en_US",CURRENCY:"$",TRUNCATE_ONPASTE:false};
var _917={EXPAND_BUTTON_TOOL_TIP:"Click here to expand the editing area",COLLAPSE_BUTTON_TOOL_TIP:"Click here to return the editing area to its normal size",GROUP_ERROR_BOX_TITLE:"The following errors occurred:",GROUP_ERROR_BOX_ITEM_TITLE:"Click to jump to field",REQUIRED:"{LABEL} is required.",X_CHARACTERS_REMAINING:"{0} characters remaining",X_OF_Y_CHARACTERS_REMAINING:"{0} of {1} characters remaining",X_OVER_THE_LIMIT:"{0} characters over maximum limit of {1}.",MAX_CHARS:"The field length limit ({LIMIT}) for this field has been reached. The data has been shortened to fit within the limit.",CHAR_LENGTH:"{LABEL} is over the {MAX_CHARS} maximum character limit.",RANGE:"{LABEL} is out of range. Valid range is {MIN} to {MAX}.",RANGE_MIN:"{LABEL} is less than the minimum value of {MIN}.",RANGE_MAX:"{LABEL} is greater than the maximum value of {MAX}.",EMAIL:"{LABEL} is not a valid email address.",URL:"{LABEL} is not a valid url. Valid format is {EXAMPLE}.",PHONE_NUMBER:"{LABEL} is not a valid phone number. Valid format is {EXAMPLE}.",ALPHA:"{LABEL} is not alphabetic.",ALPHA_NUMERIC:"{LABEL} is not alpha numeric.",DECIMAL:"{LABEL} is not a valid decimal number. Valid format is ({EXAMPLE}).",INTEGER:"{LABEL} is not a valid integer.",NUMERIC:"{LABEL} is not a valid number.",CURRENCY:"{LABEL} is not a valid currency amount. Valid format is ({EXAMPLE})."};
var _918=function(val,_91a,msg,_91c,_91d){
_91c=(_91c)?_91c:"";
_91d=(_91d)?_91d:"";
return msg.replace(/\{LABEL\}/g,_91a).replace(/\{VALUE\}/g,val).replace(/\{FORMAT\}/g,_91c).replace(/\{EXAMPLE\}/g,_91d);
};
var _91e={email:[_917.EMAIL,"",function(val){
return /^[a-zA-Z0-9\-_.]+[a-zA-Z0-9\-_]@[a-zA-Z0-9][a-zA-Z0-9\-.]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/.test(val);
}],url:[_917.URL,"http://website.com",function(val,_921){
if(_921=="website"){
return /^(http:|https:)(\/){2}?[^\/]\S+\.\S+/.test(val);
}else{
return /^[a-zA-Z0-9\-.+]*:(\/){2}[\S]?/.test(val);
}
}],phonenumber:[_917.PHONE_NUMBER,"###-###-####",function(val,_923){
if(!_923){
return /^(\+)?(\d{1,3})?(([0-9]{1})?([- .(]|[ (]{1,2})?([0-9a-zA-Z]{3})([- .)]|[ )]{1,2})?[0-9a-zA-Z]{3}([- .]{1})[0-9a-zA-Z]{4})?(( )?([#][0-9a-zA-Z]{1,10}))?$/.test(val);
}else{
if(_923=="strict"){
return /^[1-9]\d{2}-\d{3}-\d{4}$/.test(val);
}else{
if(_923=="integer"){
return /^\d{10}$/.test(val);
}
}
}
}],alpha:[_917.ALPHA,"",function(val){
return /^[a-zA-Z]+$/.test(val);
}],alphanumeric:[_917.ALPHA_NUMERIC,"",function(val){
return /^[0-9A-Za-z-_ @#]+$/.test(val);
}],currency:[_917.CURRENCY,"#,###.##",function(val,_927,obj){
if(val===null||val===undefined){
return false;
}
if(!_927){
_927=_916.CURRENCY;
}
var num=val.replace(_927,"");
if(_927==" CAD"){
num=num.replace("C$","");
num=num.replace("$","");
}
num=$.dr.utils.normalizeNumber(num,$.dr.utils.getNumberFormat(obj));
return /^\d*[0-9](\.)?(\d){1,2}?$/.test(num);
}],decimal:[_917.DECIMAL,"###,###.##",function(val,_92b,obj){
if(val===null||val===undefined){
return false;
}
var num=$.dr.utils.normalizeNumber(val,$.dr.utils.getNumberFormat(obj));
return /^\d*[0-9](\.\d*[0-9])?$/.test(num);
}],integer:[_917.INTEGER,"",function(val){
return /^[+-]?[0-9]+$/.test(val);
}],numeric:[_917.NUMERIC,"",function(val,_930,obj){
if(val===null||val===undefined){
return false;
}
return !isNaN(Number($.dr.utils.normalizeNumber(val,$.dr.utils.getNumberFormat(obj))));
}]};
var _932={dataType:function(obj,val,_935,_936){
var _937=true;
var _938=obj.getAttribute("data-type");
var _939=obj.getAttribute("data-example");
var _93a=obj.getAttribute("data-format");
var msg="";
var jObj=$(obj);
if(_938!==null){
_938=_938.toLowerCase();
var _93d=_91e[_938];
if(_93d===undefined){
if(window.console){
console.log("The validator for data-type=\""+_938+"\" for field with name \""+obj.name+"\" does not exist.");
}
return true;
}
if(val.isBlank()){
$(obj.form).dr.form.removeError(obj,_938);
}else{
var _93e=_93d[0];
var _93f=(_939!==null)?_939:_93d[1];
if(!$.dr.form.isDataValidForType(_938,val,_93a,obj)){
msg=_93e;
}else{
var min=obj.getAttribute("data-min");
var max=obj.getAttribute("data-max");
var _942=$.dr.form.isDataValidForType(_938,min,_93a,obj);
var _943=$.dr.form.isDataValidForType(_938,max,_93a,obj);
if(min!==null||max!==null){
if((min!==null&&!_942)||(max!==null&&!_943)){
_937=false;
msg="The value is correct for {LABEL}, but the specified range options are not of the correct data type.";
}else{
var _944,upperBound,value;
if(_938=="date"&&typeof $.dr.date=="function"){
value=new $.dr.date(val,_93a).getTime();
_944=(min!==null)?new $.dr.date(min,_93a).getTime():null;
upperBound=(max!==null)?new $.dr.date(max,_93a).getTime():null;
}else{
if(_938=="time12hr"||_938=="time24hr"){
value=$.dr.date.getDateFromTime(val);
_944=(min!==null)?$.dr.date.getDateFromTime(min):null;
upperBound=(max!==null)?$.dr.date.getDateFromTime(max):null;
}else{
var _945=$.dr.utils.getNumberFormat(obj);
value=$.dr.utils.convertCurrencyToNumber(obj,val,_93a,_945);
_944=$.dr.utils.convertCurrencyToNumber(obj,min,_93a,_945);
upperBound=$.dr.utils.convertCurrencyToNumber(obj,max,_93a,_945);
}
}
if(!isNaN(value)){
if(min!==null&&max!==null){
if(!isNaN(_944)&&!isNaN(upperBound)){
if(!(value>=_944&&value<=upperBound)){
msg=_917.RANGE.replace(/\{MAX\}/g,max).replace(/\{MIN\}/g,min);
}
}
}else{
if(max!==null&&!isNaN(upperBound)){
if(value>upperBound){
msg=_917.RANGE_MAX.replace(/\{MAX\}/g,max);
}
}else{
if(min!==null&&!isNaN(_944)){
if(value<_944){
msg=_917.RANGE_MIN.replace(/\{MIN\}/g,min);
}
}
}
}
}
}
}
}
if(msg!==""&&_936){
_937=false;
var _946=_918(val,jObj.data("label"),msg,_93a,_93f);
$(obj.form).dr.form.throwError(obj,_938,_946,_935);
}else{
$(obj.form).dr.form.removeError(obj,_938);
}
}
}
return _937;
},required:function(obj,val,_949,_94a){
var _94b=true;
var _94c=(obj.getAttribute("data-required")=="true")?true:false;
if(_94c){
switch(obj.type){
case "select-one":
case "text":
case "password":
case "textarea":
_94b=!val.isBlank();
break;
case "checkbox":
case "radio":
var _94d=$(obj.form[obj.name]);
_94b=(_94d.filter(":checked").length>0)?true:false;
obj=_94d[0];
if(!_94b){
var _94e=$(obj).parents("dl:first").find("dt:first label").text();
$(obj).data("label",(_94e.length>0)?_94e.replace(":",""):"A selection");
}
break;
case "select-multiple":
_94b=(val!==null)?!(val+"").isBlank():false;
break;
}
if(!_94b&&_94a){
var _94f=_918(val,$(obj).data("label"),_917.REQUIRED);
$(obj.form).dr.form.throwError(obj,"required",_94f,_949);
}else{
$(obj.form).dr.form.removeError(obj,"required");
}
}
return _94b;
},customValidator:function(obj,val,_952,_953){
var _954=true;
var _955=obj.getAttribute("data-custom-validator");
if(_955){
if(_953){
var _956=(function(){
return eval(_955);
}).call(obj);
if(_956===false){
_954=false;
var _957=obj.getAttribute("data-custom-validator-message");
if(_957){
$(obj.form).dr.form.throwError(obj,"custom",_957,_952);
}
}
}
if(_954){
$(obj.form).dr.form.removeError(obj,"custom");
}
}
return _954;
},maxLength:function(obj,val,_95a,_95b){
var _95c=true;
var jObj=$(obj);
var _95e=jObj.attr("data-maxlength");
if(_95e!==undefined){
if(!isNaN(_95e)&&_95b){
if(obj.type=="textarea"){
var _95f=(jObj.attr("data-force-truncate")=="true")?true:false;
_95c=$.dr.utils.validateTextAreaLength(obj,_95e,_95f);
}else{
var _960=DR.Utils.FormUtils.getUTF8Bytes(val).byteCount;
_95c=(_960<=_95e)?true:false;
}
}
if(!_95c){
var _961=_917.CHAR_LENGTH.replace(/\{LABEL\}/g,$(obj).data("label")).replace(/\{MAX_CHARS\}/g,_95e);
$(obj.form).dr.form.throwError(obj,"maxlength",_961,_95a);
}else{
$(obj.form).dr.form.removeError(obj,"maxlength");
}
}
return _95c;
}};
$.dr.form.isDataValidForType=function(_962,val,_964,obj){
var _966=_91e[_962.toLowerCase()];
if(_962===undefined){
return undefined;
}else{
return _966[2].call(this,val,_964,obj);
}
};
$.dr.utils.getNumberFormat=function(obj){
var _968=$(obj).attr("data-number-locale");
return (_968!==null)?_968:_916.NUMBER_LOCALE;
};
var _969=["IL","CN","JP","MY","KR","KP","TH","TW","PH","IN","PK","SG","HK","MX","PR","NG","BW","ZW"];
$.dr.utils.convertCurrencyToNumber=function(obj,val,_96c,_96d){
if(val===null||val===undefined){
return false;
}
if(!_96c){
_96c=_916.CURRENCY;
}
var num=val.replace(_96c,"");
if(_96c==" CAD"){
num=num.replace("C$","");
num=num.replace("$","");
}
num=Number($.dr.utils.normalizeNumber(num,_96d));
return num;
};
$.dr.utils.normalizeNumber=function(num,_970){
if(num===null||num===undefined){
return null;
}
_970=(_970)?_970:_916.NUMBER_LOCALE;
var arr=_970.split("_");
if(arr.length!=2){
_970="en_US";
arr=["en","US"];
}
var _972=arr[0].toLowerCase();
var _973=arr[1].toUpperCase();
var _974=(_972=="en")?true:false;
for(var i=0;i<_969.length;i++){
if(_969[i]==_973){
_974=true;
break;
}
}
var _976=num.indexOf(",");
var _977=num.indexOf(".");
if(_974){
if(_977>=_976||_977==-1||_976==-1){
num=num.replace(/,/g,"");
}
}else{
if(_976>=_977||_977==-1||_976==-1){
num=num.replace(/\./g,"").replace(/,/g,".");
var _978=_970.split(".");
if(_978.length==2){
num=_978[0].replace(/ /g,"");
}else{
num=num.replace(/ /g,"");
}
}
}
return num;
};
$.dr.form.addValidators=function(_979){
if(typeof method=="object"){
$.extend(_932,_979);
}
};
$.dr.form.addDataTypeValidator=function(_97a){
if(typeof _97a=="object"){
$.extend(_91e,_97a);
}
};
$.dr.form.validateField=function(obj,_97c){
try{
var jObj=$(obj);
var _97e=(jObj.data("validationEnabled")!==false);
var val=jObj.val();
var _980=jObj.data("label");
if(!_980){
_980=$.dr.utils.getLabel(obj);
jObj.data("label",_980);
}
var _981=true;
var _982=true;
var _983=jObj.attr("data-conditional-validation");
if(_983||!$(obj.form).dr.form.isValidationEnabled()){
var _984=(function(){
return eval(_983);
}).call(obj);
if(_984===false){
_982=false;
$(obj.form).dr.form.removeErrors(obj);
}
}
if(_982){
for(var _985 in _932){
var _986=_932[_985].call(this,obj,val,_97c,_97e);
if(!_986){
_981=false;
}
}
}
return _981;
}
catch(e){
$.dr.utils.logError("Javascript exception when validating field (id="+obj.id+")",e);
}
};
var _987=function(){
$.dr.form.validateField(this,true);
};
var _988=($.browser.msie)?"paste":"input";
var _989=function(_98a){
if(_98a.length>0){
var _98b=$(this.formObj).data("formValidator");
if(_98b){
var _98c=_98a.filter(":input:not(:button)").filter("[data-maxlength], [data-required], [data-type], [data-custom-validator]");
if(_98c.length>0){
_98b.fieldsWithValidation=_98c;
_98b.options.validationEnabled=true;
_98c.filter(":not([id])").each(function(){
$(this).attr("id","rndID_"+new Date().getTime());
}).end().filter("input[type=text],input[type=password], select, textarea").blur(_987).change(_987).filter("*[data-maxlength]").keyup(_987).bind(_988,_987).end().end().filter(":radio, :checkbox").click(_987).end();
if($.browser.mozilla){
_98c.filter("input[type=file]").bind("change",_987);
}
}
}
}
};
$.dr.addPlugin("form",_989);
var _98d=function(_98e,_98f){
this.formObj=_98e;
this.options=_98f;
this.init();
};
_98d.prototype={init:function(){
this.validationErrors=[];
this.fieldsWithValidation=null;
this.errorGroupBoxOpen=false;
this.validationErrors=[];
},validate:function(){
try{
var _990=this.fieldsWithValidation;
if(_990===null){
return true;
}
if(!this.options.VALIDATE_HIDDEN_FIELDS){
if(this.validationErrors.length>0){
var _991=this;
_990.filter(":hidden").each(function(){
_991.removeErrors(this);
});
}
_990=_990.filter(":visible");
}
_990.each(function(){
$.dr.form.validateField(this,false);
});
if(this.validationErrors.length>0){
this.showValidationErrors(true);
return false;
}else{
this.hideErrorGroupBox();
return true;
}
}
catch(e){
$.dr.utils.logError("Error when validating form.",e);
}
},showErrorGroupBox:function(h){
var _993;
if(this.options.GROUP_BOX_POSITION_ABOVE_FORM){
_993=document.getElementById(this.formObj._formName+"_groupErrorBox");
}else{
_993=document.getElementById("contentArea_groupErrorBox");
}
if(!_993){
this.options.GROUP_BOX_POSITION_ABOVE_FORM=true;
var _994=this.formObj.parentNode;
var d=document.createElement("div");
d.className=this.options.GROUP_BOX_CLASS;
d.id=this.formObj._formName+"_groupErrorBox";
if(this.options.GROUP_BOX_POSITION=="above"){
var f=this.formObj;
_994.insertBefore(d,f);
}else{
d.style.marginTop="15px";
_994.appendChild(d,this);
}
_993=d;
}
var s="<div style=\"margin-bottom:10px;\"><strong>"+_917.GROUP_ERROR_BOX_TITLE+"</strong></div><ul>";
s+=h;
s+="</ul>";
_993.innerHTML=s;
_993.style.display="block";
this.errorGroupBoxOpen=true;
},hideErrorGroupBox:function(){
var _998=document.getElementById("contentArea_groupErrorBox");
if(!_998||this.options.GROUP_BOX_POSITION_ABOVE_FORM){
_998=document.getElementById(this.formObj._formName+"_groupErrorBox");
}
if(_998){
_998.style.display="none";
this.errorGroupBoxOpen=false;
}
},hideError:function(fObj,_99a){
var _99b=document.getElementById(fObj.id+"_"+_99a+"_error");
var _99c=document.getElementById(fObj.id+"_"+_99a+"_group_error");
var _99d;
if(_99b){
_99d=_99b.parentNode;
_99d.removeChild(_99b);
_99b=null;
_99d=null;
}
if(_99c){
_99d=_99c.parentNode;
_99d.removeChild(_99c);
_99c=null;
_99d=null;
}
if(this.validationErrors.length===0){
this.hideErrorGroupBox();
}else{
if(this.errorGroupBoxOpen){
this.showValidationErrors(false);
}
}
if(this.checkErrorExists(fObj)==-1){
$(fObj).removeClass(this.options.INPUT_ERROR_CLASS);
}
},displayInlineError:function(fObj,_99f,_9a0,_9a1){
if((_9a1&&this.options.SHOW_INLINE_ERRORS_ONBLUR)||(!_9a1)){
var _9a2=document.getElementById(fObj.id+"_"+_99f+"_error");
if(!_9a2){
var _9a3=fObj.parentNode;
var a=_9a3.childNodes;
var _9a5=false;
for(var i=0;i<a.length;i++){
if(a[i].className=="error"){
_9a5=true;
a[i].style.display="none";
}
}
var e=document.createElement("div");
e.className=this.options.INLINE_ERROR_CLASS;
e.innerHTML=_9a0;
e.id=fObj.id+"_"+_99f+"_error";
if(this.options.INLINE_ERROR_POSITION=="above"){
var o=document.getElementById(fObj.id);
_9a3.insertBefore(e,o);
}else{
_9a3.appendChild(e,fObj);
}
}
}
if(!($.browser.safari&&fObj.type=="file")&&fObj.type!="radio"&&fObj.type!="checkbox"){
$(fObj).addClass(this.options.INPUT_ERROR_CLASS);
}
},showValidationErrors:function(_9a9){
var h="";
var a=this.validationErrors;
var _9ac=false;
for(var i=0;i<a.length;i++){
var _9ae=false;
var _9af=a[i].errMsg;
var fObj=a[i].obj;
var type=fObj.type;
var _9b2=a[i].errType;
if(this.options.SHOW_INLINE_ERRORS){
this.displayInlineError(fObj,_9b2,_9af,false);
}
if(this.options.FOCUS_FIRST_ERROR){
if(DR.Utils.FormUtils.checkAllowFocus(fObj)){
if(!_9ac&&_9a9){
var e=document.getElementById(fObj.id+"_"+_9b2+"_error");
if(e){
e.scrollIntoView();
}
fObj.focus();
_9ac=true;
}
_9ae=true;
}
}
var _9b4=_9af;
if(_9ae){
_9b4="<a href=\"#\" title=\""+_917.GROUP_ERROR_BOX_ITEM_TITLE+"\" onclick=\"document.getElementById('"+fObj.id+"_"+_9b2+"_error').scrollIntoView();document.getElementById('"+fObj.id+"').focus();return false;\" >"+_9af+"</a>";
}
if(this.options.GROUP_BOX_ENABLED){
h+="<li id=\""+fObj.id+"_"+_9b2+"_group_error\" >"+_9b4+"</li>";
}
fObj=null;
}
if(this.options.GROUP_BOX_ENABLED){
this.showErrorGroupBox(h);
}
},checkErrorExists:function(fObj,_9b6){
var _9b7=-1;
var a=this.validationErrors;
for(var i=0;i<a.length;i++){
if(a[i].obj.id==fObj.id&&(a[i].errType==_9b6||_9b6===undefined)){
_9b7=i;
break;
}
}
return _9b7;
},throwError:function(fObj,_9bb,_9bc,_9bd){
var _9be=this.checkErrorExists(fObj,_9bb);
if(_9be==-1){
var e={};
e.errMsg=_9bc;
e.errType=_9bb;
e.obj=fObj;
this.validationErrors.push(e);
if(_9bd){
this.displayInlineError(fObj,_9bb,_9bc,_9bd);
}
e=null;
}
return _9be;
},removeError:function(fObj,_9c1){
var _9c2=this.checkErrorExists(fObj,_9c1);
if(_9c2!=-1){
this.validationErrors.splice(_9c2,1);
this.hideError(fObj,_9c1);
}
},removeErrors:function(fObj){
var a=this.validationErrors;
for(var i=0;i<a.length;i++){
if(a[i].obj.id==fObj.id){
var _9c6=a[i].errType;
this.validationErrors.splice(i,1);
this.hideError(fObj,_9c6);
}
}
}};
var _9c7=function(evt){
var opts=$.extend(true,{},_916);
var _9ca=$(this).data("dataOptions");
if(_9ca){
$.extend(true,opts,_9ca);
}
$(this).data("formValidator",new _98d(this,opts));
};
$("form").live("beforeIndexFields",_9c7);
function getValidatorObj(_9cb){
if(_9cb.length>0){
return $(_9cb[0]).data("formValidator");
}
}
$.namespace("dr.form",{validate:function(){
return getValidatorObj(this).validate();
},enableValidation:function(flag){
var v=getValidatorObj(this);
v.options.validationEnabled=flag;
v.validate();
},isValidationEnabled:function(){
return getValidatorObj(this).options.validationEnabled;
},throwError:function(obj,_9cf,_9d0,_9d1){
getValidatorObj(this).throwError(obj,_9cf,_9d0,_9d1);
},removeError:function(obj,_9d3){
getValidatorObj(this).removeError(obj,_9d3);
},removeErrors:function(obj){
getValidatorObj(this).removeErrors(obj);
}});
$.namespace("dr.form.field",{enableValidation:function(flag){
flag=(!flag)?false:true;
return this.each(function(){
$(this).data("validationEnabled",flag);
$.dr.form.validateField(this,flag);
});
}});
var _9d6=function(_9d7,_9d8,_9d9){
var _9da=(_9d7.hasClass("largeHeight"))?"large":(_9d7.hasClass("medium"))?"medium":"small";
var _9db=_9da;
var _9dc=_9d7.data("originalHeight");
if(!_9dc){
var _9dd=_9d7.attr("data-default-height");
if(_9dd!==undefined){
_9dc=_9dd.replace("Height","");
}else{
_9dc=_9da;
}
_9d7.data("originalHeight",_9dc);
}
if(_9d9){
_9db=(_9da=="large")?_9dc:"large";
_9d7.addClass(_9db+"Height").removeClass(_9da+"Height");
}
var _9de=_917.COLLAPSE_BUTTON_TOOL_TIP,text=$.dr.strings.COLLAPSE,linkClass="collapse";
if(_9db!="large"){
_9de=_917.EXPAND_BUTTON_TOOL_TIP;
text=$.dr.strings.EXPAND;
linkClass="expand";
}
_9d8.text(text).attr({"title":_9de,"class":linkClass});
if(_9d7.attr("data-persist-state")=="true"&&$.dr.userdata!==null){
var _9df=_9d7.attr("data-persist-page-name");
if(_9df===undefined&&pageInfo){
_9df=pageInfo.pageName;
}
$.dr.userdata.save(_9df,_9d7.id+"Height",_9db,"String");
}
};
$.dr.utils.validateTextAreaLength=function(obj,_9e1,_9e2){
if(obj){
var _9e3=(_9e2===true)?true:_916.TRUNCATE_ONPASTE;
var _9e4=(obj.getAttribute("alertOpen")=="true")?true:false;
var c=document.getElementById(obj.id+"_counter");
if(!c){
return;
}
var v=obj.value;
var _9e7=v.length;
if(_9e3){
if(v.length>_9e1){
v=v.substr(0,_9e1);
}
}
var _9e8=DR.Utils.FormUtils.getUTF8Bytes(v).byteCount;
var _9e9;
if(_9e8===0){
_9e9=_917.X_CHARACTERS_REMAINING.replace("{0}",_9e1);
}else{
var _9ea=_9e1-_9e8;
if(_9e3){
_9ea=Math.max(_9ea,0);
}
if(_9e8>_9e1&&!_9e3){
_9ea=_9ea*(-1);
_9e9=_917.X_OVER_THE_LIMIT.replace("{0}",_9ea);
_9e9=_9e9.replace("{1}",_9e1);
}else{
_9e9=_917.X_OF_Y_CHARACTERS_REMAINING.replace("{0}",_9ea);
_9e9=_9e9.replace("{1}",_9e1);
}
}
c.innerHTML=_9e9;
var _9eb=true;
if(_9e8>_9e1){
_9eb=false;
}
if(_9e8>=_9e1){
if(_9e3){
_9eb=true;
var _9ec=v.makeUT8CharsFitLength(_9e8,_9e1);
if(obj.value!=_9ec){
obj.value=_9ec;
}
if((_9e7>_9e1||_9e8>_9e1)&&!_9e4){
obj.setAttribute("alertOpen","true");
var _9ed=_917.MAX_CHARS.replace(/\{LIMIT\}/g,_9e1);
alert(_9ed);
}else{
obj.setAttribute("alertOpen","false");
}
}
$(obj).addClass(_916.INPUT_ERROR_CLASS);
$(c.parentNode).addClass("limit");
}else{
$(obj).removeClass(_916.INPUT_ERROR_CLASS);
$(c.parentNode).removeClass("limit");
obj.setAttribute("alertOpen","false");
}
return _9eb;
}
};
var _9ee=function(_9ef){
_9ef.filter("textarea:not(.wysiwyg, .basic_wysiwyg)").each(function(){
var obj=this;
var _9f1=$(this);
if(_9f1.data("textarea_inited")){
return;
}
var _9f2=false;
var _9f3=_9f1.attr("data-maxlength");
var _9f4=(_9f1.attr("data-expand-collapse")=="false")?false:true;
if($.browser.safari){
_9f4=false;
var _9f5=parseInt(document.defaultView.getComputedStyle(obj,"").getPropertyValue("width"),10);
if(_9f5>0){
obj.style.maxWidth=_9f5+"px";
}
}
if((_9f3!=="undefined"&&parseInt(_9f3,10)>0)||_9f4){
_9f2=true;
}
if(_9f2){
var _9f6=obj.className;
var gs=_9f6.match(/(gridSpan[\d]+(\s|$))/);
var _9f8=(gs)?gs[0]:"gridSpan11";
var _9f9=document.createElement("div");
_9f9.className=_9f8;
var _9fa=document.createElement("div");
_9fa.className="textareaInfo";
var _9fb="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:100%;\" ><tr>";
if(_9f3!==undefined){
_9fb+="<td class=\"remaining\"><span id=\""+obj.id+"_counter\" >&nbsp;</span></td>";
}
if(_9f4){
if($.browser.safari){
obj.style.maxWidth=_9f1.width()+"px";
}else{
_9fb+="<td class=\"expandCollapseButton\"><a></a></td>";
}
}
_9fb+="</tr></table>";
_9fa.innerHTML=_9fb;
$("a",_9fa).click(function(){
_9d6(_9f1,$(this),true);
}).each(function(){
_9d6(_9f1,$(this),false);
});
_9f9.appendChild(_9fa);
var _9fc=obj.parentNode;
_9fc.insertBefore(_9f9,obj.nextSibling);
if(_9f3!==undefined){
var _9fd=(_9f1.attr("data-force-truncate")=="true")?true:false;
$.dr.utils.validateTextAreaLength(obj,_9f3,_9fd);
}
_9f1.data("textarea_inited","true");
}
});
};
$.dr.addPlugin("form",_9ee);
var _9fe=function(){
$.extend(_917,$.dr.form.getMessages());
};
var _9ff=function(){
$.extend(_916,$.dr.form.getDefaults());
};
$(document).bind("afterFormSetMessages",_9fe);
$(document).bind("afterFormSetDefaults",_9ff);
$.dr.addDomReadyEvent(_9fe,"early");
$.dr.addDomReadyEvent(_9ff,"early");
})(jQuery);
var Utils=DR.Utils;
Utils.Prompt=DR.Utils.prompt;
Utils.confirm=DR.Utils.confirm;
var submitActionForm=DR.Utils.FormUtils.submitActionForm;
var BrowserDetect=DR.Utils.BrowserDetect;
var FormUtils=DR.Utils.FormUtils;
var Cookie=DR.Utils.Cookie;
var PanelSet=DR.Widgets.PanelSet;
var Toggle=DR.Utils.Toggle;
var getElem=DR.Utils.getElem;
var ModalOverlay=DR.Widgets.ModalOverlay;
var InlineModalOverlay=DR.Widgets.InlineModalOverlay;
var iframeCallback=DR.Widgets.ModalOverlay.iframeCallback;


