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")}})})();
/**
 * @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(){}
};

/* Copyright (c) 2008 Gilberto Saraiva (saraivagilberto@gmail.com || http://gsaraiva.projects.pro.br)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Version: 2008.0.1.2 -
 * Under development and testing
 *
 * Contributors:
 *    Marc van Neerven (marc@smartsite.nl) - Javascript .apply structure (function.this = current filter)
 *
 * Requires: $ 1.2+
 *
 * Support/Site: http://gsaraiva.projects.pro.br/openprj/?page=$namespace
 */

(function( $ ){
  $.fn.extend({ curReturn: null, $Init: $.fn.init });

  $.fn.extend({
  	init: function( selector, context ) {
      $.fn.curReturn = new $.fn.$Init(selector, context);
      return $.fn.curReturn;
  	}
  });

  $.extend({
    namespaceData: {},
    namespaceExtend: function(NameSpaces){
      if(eval(NameSpaces) != undefined){ $.extend(eval(NameSpaces), {}); }else{ eval(NameSpaces + " = {};"); }
    },
    namespace: function(namespaces, objects, inherited){

      // check to see if they want to make existing jQuery plugins available
	  if(arguments.length < 3) inherited = true;  
      
	  if(typeof objects == "function"){
        if(namespaces.match(".")){
          var nss = namespaces.split(".");
          var snss = "";
          for(var i = 0; i < nss.length; i++){
            snss += "['" + nss[i] + "']";

            $.namespaceExtend("$.namespaceData" + snss);
            $.namespaceExtend("$.fn" + snss);
          }
		  
          eval("$.namespaceData" + snss + " = arguments[1];");
          eval("$.fn" + snss + " = " + "function(){ return eval(\"$.namespaceData" + snss + ( (inherited) ? ".apply" : "") + "($.fn.curReturn, arguments)\"); }");

        }else{
          $.extend({
            namespaces: function(){
              return objects($.fn.curReturn);
            }
          });
        }
      }else{
             
        for(var space in objects){
          $.namespace(namespaces + "." + space, objects[space], inherited);
        };
      }
    }
  });
})( jQuery );if(!window.console){
window.console=function(){
};
}
(function($){
var _2=[];
$.dr=window.jQuery.dr||{VERSION:"1.7.0.0.4.3",VERSION_CREATION_DATE:"201003231843",BUILD_ID:"1.7.0.0.4.3",FRAMEWORK_PATH:"//ui1.img.digitalrivercontent.net/drui/1.7.0.0.4.3/",IMAGE_PATH:"//ui1.img.digitalrivercontent.net/drui/1.7.0.0.4.3/images/",BLANK_PAGE_URL:"//ui1.img.digitalrivercontent.net/drui/1.7.0.0.4.3/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",COLLAPSE:"Collapse",DONE:"Done",EXPAND:"Expand",SAVE:"Save",NEXT:"Next",YES:"Yes",NO:"No",FINISH:"Finish",CANCEL:"Cancel",OK:"OK"},init:function(){
var _3,isModal=($("body.modalPage").length>0)?true:false;
if(isModal){
$.dr.IS_MODAL=true;
_3=new DR.Utils.PageSizer();
window.setTimeout(function(){
_3.initModalScroller();
},100);
}
if(typeof customOnload=="function"){
customOnload();
}
$.dr.triggerDomReadyEvents();
if(isModal){
try{
parent.overlayStack.getCurrent().center(true);
}
catch(e){
}
}
},addDomReadyEvent:function(_4,_5){
var _6=(_5)?_5:"domReadyLate";
$(document).bind(_6,_4);
},triggerDomReadyEvents:function(){
$(document).trigger("domReadyEarly");
$(document).trigger("domReadyNormal");
$(document).trigger("domReadyLate");
},addUnobtrusiveEvent:function(_7,_8){
var _9=(_8)?_8:"unobtrusiveEventNormal";
$(document).bind(_9,_7);
},triggerUnobtrusiveEvents:function(_a){
$(document).trigger("unobtrusiveEventEarly",[_a]);
$(document).trigger("unobtrusiveEventNormal",[_a]);
$(document).trigger("unobtrusiveEventLate",[_a]);
},addPlugin:function(_b,_c){
if(_b&&typeof _c=="function"){
if(typeof _2[_b]==="undefined"){
_2[_b]=[];
}
_2[_b].push(_c);
}
},getPlugins:function(_d){
return _2[_d];
}};
var _e=function(){
$.dr.triggerUnobtrusiveEvents(document);
};
$.dr.addDomReadyEvent(_e,"domReadyNormal");
})(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||{};
$.dr.utils.logError=function(_10,err){
if(window.console){
console.error(_10);
if(err){
console.error("Error: ",err);
}
}
};
$.dr.utils.evalString=function(str,_13){
var o;
if(!str){
return;
}
if(str.trim().length==0){
return;
}
try{
eval("o="+str);
}
catch(e){
if(_13){
$.dr.utils.logError(_13,e);
}
o="error";
}
return o;
};
$.fn.setData=function(_15){
return this.each(function(){
for(var _16 in _15){
$(this).data(_16,_15[_16]);
}
});
};
var _17=document.defaultView&&document.defaultView.getComputedStyle;
$.dr.utils.getComputedValue=function(obj,_19){
if(_17){
return document.defaultView.getComputedStyle(obj,"").getPropertyValue(_19);
}else{
return obj.currentStyle[_19];
}
};
$.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 _1c=null;
if(this.isStandardsMode){
if(document.documentElement){
_1c=document.documentElement.clientWidth;
}
}else{
_1c=document.body.clientWidth;
}
return _1c;
},getAvailableContentHeight:function(){
var _1d=null;
if(this.isStandardsMode){
if(document.documentElement){
_1d=document.documentElement.clientHeight;
}
}else{
_1d=document.body.clientHeight;
}
return _1d;
},searchString:function(_1e){
for(var i=0;i<_1e.length;i++){
var _20=_1e[i].string;
var _21=_1e[i].prop;
this.versionSearchString=_1e[i].versionSearch||_1e[i].identity;
if(_20){
if(_20.indexOf(_1e[i].subString)!=-1){
return _1e[i].identity;
}
}else{
if(_21){
return _1e[i].identity;
}
}
}
},isIE6:function(){
if(this.version==6&&this.browser=="Explorer"){
return true;
}
return false;
},searchVersion:function(_22){
var _23=_22.indexOf(this.versionSearchString);
if(_23==-1){
return;
}
return parseFloat(_22.substring(_23+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(_24){
this.name=_24;
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(_25){
if(!this.nameArrayValuesLoaded){
this.load();
}
if(_25!==null){
_25=new Date(_25);
if(_25.constructor==Date){
this.expires=_25.toGMTString();
}else{
alert(DR.Utils.Cookie.ERROR_VALID_DATE);
}
}
},setExpireDays:function(_26){
this.defaultExpireDays=_26;
},load:function(){
var _27=document.cookie;
if(_27===""){
return false;
}
var _28=_27.indexOf(this.name+"=");
if(_28!=-1){
_28+=this.name.length+1;
var _29=_27.indexOf(";",_28);
if(_29==-1){
_29=_27.length;
}
var _2a=unescape(_27.substring(_28,_29));
if(this.type=="Single"){
this.value=_2a;
this.nameArrayValuesLoaded=true;
}else{
if(this.type=="NameValuePair"){
this.splitCookiePairs(_2a);
}else{
if(this.type=="Array"){
this.splitCookieArray(_2a);
}
}
}
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(_2c){
if(!this.nameArrayValuesLoaded){
this.load();
}
this.value=_2c;
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(_2e){
this.type="Array";
if(!this.arrayValuesLoaded){
this.load();
}
var _2f="";
var ary=this.arrayValues;
var _31=[];
var k=0;
if(ary.length>0){
for(var i=0;i<ary.length;i++){
if(ary[i]!=_2e){
_2f+=ary[i]+this.arraySeperator;
_31[k]=ary[i];
k++;
}
}
}
_31[k]=_2e;
_2f+=_2e+this.arraySeperator;
this.arrayValues=_31;
this.value=_2f;
this.save();
},removeArrayValue:function(_34){
this.type="Array";
var _35="";
var ary=this.arrayValues;
var _37=[];
var k=0;
for(var i=0;i<ary.length;i++){
if(ary[i]!=_34){
_35+=ary[i]+this.arraySeperator;
_37[k]=ary[i];
k++;
}
}
this.arrayValues=_37;
this.value=_35;
this.save();
},setNameValuePair:function(_3a,_3b){
var v=_3b+"";
if(_3a.indexOf("&")==-1&&_3a.indexOf(":")==-1&&v.indexOf("&")==-1&&v.indexOf(":")==-1){
if(!this.nameArrayValuesLoaded){
this.load();
}
this.type="NameValuePair";
this.nameArrayValues[_3a]=_3b;
this.save();
}
},getValue:function(_3d){
if(!this.nameArrayValuesLoaded){
this.load();
}
if(_3d){
return this.nameArrayValues[_3d];
}else{
return this.value;
}
},removeValue:function(_3e){
if(!this.nameArrayValuesLoaded){
this.load();
}
delete this.nameArrayValues.name;
this.save();
},removeAllValues:function(){
if(!this.nameArrayValuesLoaded){
this.load();
}
this.nameArrayValues=[];
},splitCookiePairs:function(_3f){
var _40=_3f.split(this.nameArraySeperator);
for(var i=0;i<_40.length;i++){
_40[i]=_40[i].split(this.nameArrayInnerSeperator);
}
this.nameArrayValues=[];
for(var j=0;j<_40.length;j++){
this.nameArrayValues[_40[j][0]]=_40[j][1];
}
this.joinNameValuePairs();
},splitCookieArray:function(_43){
var ary=[];
if(_43!==null){
var i=0;
while(_43.indexOf(this.arraySeperator)!="-1"){
ary[i]=_43.substring(0,_43.indexOf(this.arraySeperator));
i++;
_43=_43.substring(_43.indexOf(this.arraySeperator)+1,_43.length);
}
}
this.arrayValues=ary;
this.joinArrayValues();
},joinNameValuePairs:function(){
var _46=[];
for(var i in this.nameArrayValues){
_46[_46.length]=i+this.nameArrayInnerSeperator+this.nameArrayValues[i];
}
var v=_46.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(_4b){
var _4c=new Date();
_4c.setTime(_4c.getTime());
if(_4b){
var _4d=_4b*1000*60*60*24;
var _4e=new Date(_4c.getTime()+(_4d));
return _4e;
}
}};
DR.Utils.replaceCSSClass=function(_4f,_50,_51){
_4f=(typeof _4f=="object")?_4f:document.getElementById(_4f);
if(_4f){
_4f.className=_4f.className.replace(_50,_51).trim();
}
};
DR.Utils.hasCSSClass=function(_52,_53){
_52=(typeof _52=="object")?_52:document.getElementById(_52);
if(_52){
if(_52.className.indexOf(_53)>-1){
return true;
}
}
return false;
};
DR.Utils.removeCSSClass=function(_54,_55){
_54=(typeof _54=="object")?_54:document.getElementById(_54);
if(_54){
_54.className=_54.className.replace(_55,"").trim();
}
};
DR.Utils.addCSSClass=function(_56,_57){
_56=(typeof _56=="object")?_56:document.getElementById(_56);
if(_56){
DR.Utils.removeCSSClass(_56,_57);
_56.className=(_57+" "+_56.className).trim();
}
};
DR.Utils.setCSSClass=function(_58,_59){
_58=(typeof _58=="object")?_58:document.getElementById(_58);
if(_58){
_58.className=_59;
}
};
DR.Utils.getStyle=function(id,_5b){
var obj=(typeof id=="object")?id:document.getElementById(id);
var _5d="";
if(document.defaultView&&document.defaultView.getComputedStyle){
DR.Utils.styleObj=document.defaultView.getComputedStyle(obj,null);
_5d=DR.Utils.styleObj?eval("DR.Utils.styleObj."+_5b):null;
}else{
if(obj.currentStyle){
_5d=obj.currentStyle[_5b];
}
}
return _5d;
};
DR.Utils.disableListLink=function(id,_5f){
var li=(typeof id=="object")?id:document.getElementById(id);
DR.Utils.addCSSClass(li,"disabled");
var a=li.getElementsByTagName("a");
if(a.length==1){
var _62=a[0];
_62.removeAttribute("href");
if(typeof (_62.onclick)=="function"){
_62.onclick_disabled=_62.onclick;
}
if(typeof (_5f)=="function"){
_62.onclick=_5f;
}
}
};
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 _66=a[0];
_66.setAttribute("href","#");
var od=_66.getAttribute("onclick_disabled");
if(typeof (od)=="function"){
_66.onclick=_66.onclick_disabled;
}else{
if(typeof (od)=="object"){
_66.onclick=eval(_66.onclick_disabled);
}
}
_66.removeAttribute("onclick_disabled");
}
};
DR.Utils.insertBefore=function(_68,_69,_6a){
var _6b=_68.tagName.toLowerCase();
if(document.all&&_6b=="td"){
var n=parentNode.appendChild(_69,_6a);
_68.appendChild(_6a,n);
}else{
_68.insertBefore(_69,_6a);
}
};
DR.Utils.insertAfter=function(_6d,_6e,_6f){
return _6d.insertBefore(_6e,_6f.nextSibling);
};
DR.Utils.addToBody=function(el){
var _71=document.getElementsByTagName("BODY")[0];
var _72=_71.firstChild;
_71.insertBefore(el,_72);
_71=null;
_72=null;
return el;
};
DR.Utils.attachCssStyleSheet=function(url){
var _74=document.getElementsByTagName("head")[0];
var _75=document.createElement("link");
_75.type="text/css";
_75.rel="stylesheet";
_75.href=url;
_74.appendChild(_75);
};
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(_78,_79){
if(_78.indexOf(".")==-1){
_78="."+_78;
}
if(typeof _79=="object"){
return jQuery(_78,_79);
}else{
if(typeof _79=="string"&&_79!==""){
if(_79.indexOf("#")==-1){
_79="#"+_79;
}
return jQuery(_79+" "+_78);
}else{
return jQuery(_78);
}
}
};
DR.Utils.getFirstElementByClassName=function(_7a,_7b){
var _7c=DR.Utils.getElementsByClassName(_7a,_7b);
if(_7c.length>0){
return _7c[0];
}
return null;
};
DR.Utils.getElementsBySelectorPath=function(_7d,_7e){
if(_7d.indexOf(".")==-1){
_7d="."+_7d;
}
if(typeof _7e=="object"){
return jQuery(_7d,_7e);
}else{
if(typeof _7e=="string"&&_7e!==""){
if(_7e.indexOf("#")==-1){
_7e="#"+_7e;
}
return jQuery(_7e+" "+_7d);
}else{
return jQuery(_7d);
}
}
};
DR.Utils.getFirstElementBySelectorPath=function(_7f,_80){
var _81=DR.Utils.getElementsBySelectorPath(_7f,_80);
if(_81.length>0){
return _81[0];
}
return null;
};
DR.Utils.attachDRFrameworkCSS=function(){
var _82=navigator.appName;
var _83=(_82.indexOf("Explorer")>-1);
var _84=(navigator.appVersion.indexOf("MSIE 7")>-1);
var _85=(navigator.userAgent.indexOf("AppleWebKit")>-1);
var _86="dr-stylesheet-ff-compressed.css";
if(_84){
_86="dr-stylesheet-ie7-compressed.css";
}else{
if(_83){
_86="dr-stylesheet-ie6-compressed.css";
}
}
var url=$.dr.FRAMEWORK_PATH+"css/"+_86;
DR.Utils.attachCssStyleSheet(url);
};
DR.Utils.replaceHtml=function(el,_89){
var div=typeof el==="string"?document.getElementById(el):el;
return jQuery(div).html(_89);
};
DR.Utils.DragObject=function(_8b){
if(typeof _8b=="object"){
this.type="Absolute";
this.dragObj=_8b;
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(_8c,_8d){
if(typeof _8c=="string"){
this.type=_8c;
}
if(typeof _8d=="object"){
this.parentObj=_8d;
}
},setSnapToMouse:function(_8e){
this.snapToMouse=Boolean(_8e);
},setMoveDragCallback:function(_8f){
this.moveCallback=Boolean(_8f);
},setStopDragCallback:function(_90){
this.stopCallback=Boolean(_90);
},initDrag:function(_91){
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=_91.clientX+window.scrollX;
y=_91.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 _93=this;
if(this.moveDragFunc===null){
this.moveDragFunc=function(_94){
_93.moveDrag(_94);
};
this.stopDragFunc=function(_95){
_93.stopDrag(_95);
};
}
this.attachEvents();
if(!this.snapToMouse){
this.cancelEventPropagation(_91);
}
},moveDrag:function(_96){
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=_96.clientX+window.scrollX;
y=_96.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 _98=Math.max(x-parseInt(this.parentObj.container.offsetLeft,10)-this.dragObjLeft,this.parentObj.column1MinWidth);
var _99=Math.min(_98,this.parentObj.panelWidth-this.parentObj.column2MinWidth-this.parentObj.leftPadding);
this.dragObj.style.left=_99+"px";
}else{
if(this.parentObj.layout=="TwoRow"){
this.dragObj.style.top=(this.dragObjTop+y-parseInt(this.parentObj.container.offsetTop,10))+"px";
}
}
}
}
this.cancelEventPropagation(_96);
}
},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(_9a){
if(window.event){
window.event.cancelBubble=true;
window.event.returnValue=false;
}else{
_9a.preventDefault();
}
}};
DR.Utils.customOnload=function(){
};
DR.Utils.addEvent=function(obj,evt,fn,_9e){
if(obj.addEventListener){
obj.addEventListener(evt,fn,Boolean(_9e));
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,_a3){
if(obj.removeEventListener){
obj.removeEventListener(evt,fn,Boolean(_a3));
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(_a8,url){
if(_a8){
var _aa=(typeof _a8=="object")?_a8:document.forms[_a8];
_aa.setAttribute("action",url);
}
},submit:function(_ab){
if(_ab){
var _ac=(typeof _ab=="object")?_ab:document.forms[_ab];
_ac.submit();
}
},getField:function(_ad,frm){
var _af=(typeof frm=="object")?frm:document.forms[frm];
return _af.elements[_ad];
},getValue:function(fld,frm){
var _b2=null;
if(frm!==undefined&&typeof fld!="object"){
_b2=(typeof frm=="object")?frm:document.forms[frm];
}
if(!_b2){
return null;
}
var _b3=(typeof fld=="object")?fld:_b2.elements[fld];
if(!_b3){
return null;
}
var _b4=(!_b3.type&&!!_b3[0])?_b3[0].type:_b3.type;
if(!_b4){
return null;
}
var _b5=(_b4.substring(0,6)=="select")?"select":_b4;
var _b6=[];
var _b7=false;
if(typeof _b3.type=="undefined"){
_b7=true;
}
if(_b5=="select"){
if(_b7){
for(var i=0;i<_b3.length;i++){
_b6.push(DR.Utils.FormUtils.getSelectOptionValue(_b3[i]));
}
}else{
if(_b3.multiple){
for(var j=0;j<_b3.options.length;j++){
if(_b3.options[j].selected){
_b6.push(DR.Utils.FormUtils.getSelectOptionValue(_b3.options[j]));
}
}
}else{
try{
_b6.push(DR.Utils.FormUtils.getSelectOptionValue(_b3.options[_b3.selectedIndex]));
}
catch(err){
}
}
}
}else{
if((_b5=="checkbox")||(_b5=="radio")){
if(_b7){
for(var k=0;k<_b3.length;k++){
if(_b3[k].checked){
_b6.push(_b3[k].value);
}
}
}else{
if(_b3.checked){
_b6.push(_b3.value);
}
}
}else{
if(_b7){
for(var m=0;m<_b3.length;m++){
_b6.push(_b3[m].value);
}
}else{
_b6.push(_b3.value);
}
}
}
return _b6.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(_be){
if(_be){
var a=[];
for(var i=0;i<_be.options.length;i++){
if(_be.options[i].selected){
a.push(_be.options[i].text);
}
}
return a.join(", ");
}
},setSelectOptionValue:function(o,val){
var _c3=(o.value==val||o.text==val);
o.selected=_c3;
return _c3;
},checkAllowFocus:function(_c4){
var _c5=DR.Utils.getStyle(_c4,"display");
var _c6=DR.Utils.getStyle(_c4,"visibility");
if(_c6=="hidden"||_c5=="none"||_c4.disabled||_c4.readonly){
return false;
}else{
var p=_c4.parentNode;
var _c8=false;
while(p){
_c5=DR.Utils.getStyle(p,"display");
_c6=DR.Utils.getStyle(p,"visibility");
if(p.tagName=="BODY"||p.tagName=="HTML"){
break;
}
if((_c5=="none")||(_c6=="hidden")){
_c8=true;
break;
}
p=p.parentNode;
}
if(!_c8){
return true;
}else{
return false;
}
}
},setValue:function(fld,frm,_cb){
var _cc=(typeof frm=="object")?frm:document.forms[frm];
var _cd=(typeof fld=="object")?fld:_cc.elements[fld];
var i=0;
if(_cd){
var _cf=(_cd.type)?_cd.type:_cd[0].type;
switch(_cf){
case "text":
case "textarea":
case "password":
_cd.value=_cb;
break;
case "checkbox":
_cd.checked=(_cb)?true:false;
break;
case "radio":
for(i=0;i<_cd.length;i++){
if(_cd[i].value==_cb){
_cd[i].checked=true;
break;
}
}
break;
case "select-one":
case "select-multiple":
if(typeof _cb=="object"){
for(var j=0;j<_cb.length;j++){
for(i=0;i<_cd.options.length;i++){
if(_cd.options[i].value==_cb[j]){
_cd.options[i].selected=true;
}
}
}
}else{
for(i=0;i<_cd.options.length;i++){
if(_cd.options[i].value==_cb||_cd.options[i].text==_cb){
_cd.options[i].selected=true;
break;
}
}
}
break;
default:
break;
}
}
},getDisabled:function(_d1,_d2){
},setDisabled:function(_d3,_d4,_d5,_d6){
},getReadonly:function(_d7,_d8){
},setReadonly:function(_d9,_da,_db,_dc){
},setOperationAndSubmit:function(_dd,_de){
var _df=_dd.id||_dd.name;
var _e0=_dd.form.operation;
if(typeof _e0=="object"){
_e0.value=_df;
}
DR.Utils.FormUtils.submit(_dd.form);
if(_de){
_de.returnValue=false;
_de.cancelBubble=true;
}
return false;
},submitActionForm:function(obj,evt){
var _e3=obj.id||obj.name;
var _e4=obj.form.action;
if(typeof _e4=="object"){
_e4.value=_e3;
}
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 _e6=val.length;
var _e7=encodeURI(val);
var _e8;
var _e9;
if(_e7.indexOf("%")!=-1){
_e8=_e7.split("%");
_e9=_e8.length-1;
if(_e9===0){
_e9++;
}
var tmp=_e7.length-(_e9*3);
_e9=_e9+tmp;
}else{
_e9=_e6;
}
if(DR.Utils.BrowserDetect.browser!="Explorer"){
var _eb=val.replace(/\n/g,"..").length;
var _ec=_eb-_e6;
_e9=_e9+_ec;
}
return {bytes:_e7,byteCount:_e9};
}};
(function($){
var _ee="yyyy-mm-dd",DATE_FORMAT_PATTERN,PARSED_DATE_SEGMENTS,DAY_POS,MONTH_POS,YEAR_POS,REG_EX_PAT;
var _ef=function(_f0,_f1){
for(var i=0;i<_f1.length;i++){
if(_f1[i].indexOf(_f0)!=-1){
return i;
}
}
return -1;
};
var _f3=function(fmt){
var _f5=/(([y]{2,4}|[m]{1,2}|[d]{1,2})|([-\/ .]+?))/gi;
return fmt.toLowerCase().match(_f5);
};
var _f6=function(_f7){
var _f8="^";
for(var i=0;i<_f7.length;i++){
if(/[mdy]/i.test(_f7[i])){
if(typeof _f7[i]!="undefined"){
var _fa=_f7[i].length;
var _fb=_fa;
if(_fa==1){
_fb=2;
}
_f8+="(\\d{"+_fa+","+_fb+"})";
}
}else{
_f8+="([\\"+_f7[i]+"]{1})";
}
}
return (_f8+"$");
};
var _fc=function(_fd){
var _fe=(_fd)?_f3(_fd):PARSED_DATE_SEGMENTS;
var _ff=(_fd)?_ef("d",_fe):DAY_POS;
var _100=(_fd)?_ef("m",_fe):MONTH_POS;
var _101=(_fd)?_ef("y",_fe):YEAR_POS;
var _102=(_fd)?_f6(_fe):REG_EX_PAT;
var _103={format:_fd,yearPos:_101,monthPos:_100,datePos:_ff,regExPat:_102,segments:_fe};
return _103;
};
var _104=function(_105,_106){
var _107=_fc(_106);
var _108=new RegExp(_107.regExPat).exec(_105);
var _109={};
var _10a=false;
var date,month,year;
if(_108){
_108=_108.slice(1);
date=_108[_107.datePos];
month=Number(_108[_107.monthPos])-1;
year=_108[_107.yearPos];
_109=new Date(((year.length==2)?((year<70)?Number("20"+year):Number("19"+year)):year),month,date);
var _10c=_109.getDate();
var _10d=_109.getMonth();
var _10e=(year.length==2)?String(_109.getFullYear()).slice(2):_109.getFullYear();
if(_10c==date&&_10d==month&&_10e==year){
_10a=true;
}
}
return (_10a)?_109:null;
};
$.dr.date=function(_10f,fmt){
var _111=(fmt==null||fmt==""||fmt=="undefined")?DATE_FORMAT_PATTERN:fmt;
var date=null;
if(_10f instanceof Date){
if(_10f.isValid()){
date=_10f;
}
}else{
date=_104(_10f,_111);
}
if(date==null){
return (new Date("invalid date"));
}else{
date.format=_111;
return date;
}
};
$.dr.date.prototype=new Date();
Date.prototype.isValid=function(){
var _113=this;
return !(_113===null||_113===undefined||(typeof _113=="object"&&_113=="Invalid Date")||(typeof _113=="object"&&_113=="NaN"));
};
Date.prototype.getFormat=function(){
return this.format;
};
Date.prototype.toFormattedString=function(_114){
var year=this.getFullYear();
var day=this.getDate();
var _117=this.getMonth()+1;
var _118=(_114)?_114:((this.format)?this.format:_ee);
var _119=_fc(_118).segments;
var _11a="";
for(var i=0;i<_119.length;i++){
var s=_119[i];
var d=s;
switch(s.toLowerCase().charAt(0)){
case "m":
if(s.length==2){
_117=(_117<10)?"0"+_117:_117;
}
d=_117;
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;
}
_11a+=d;
}
return _11a;
};
$.dr.date.setDefaultFormat=function(fmt){
DATE_FORMAT_PATTERN=fmt;
PARSED_DATE_SEGMENTS=_f3(fmt);
MONTH_POS=_ef("m",PARSED_DATE_SEGMENTS);
YEAR_POS=_ef("y",PARSED_DATE_SEGMENTS);
Day_POS=_ef("d",PARSED_DATE_SEGMENTS);
REG_EX_PAT=_f6(PARSED_DATE_SEGMENTS);
};
$.dr.date.setDefaultFormat(_ee);
$.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,_128,day){
if(year.length==2){
year=parseInt(year,10);
year=(year<70)?Number("20"+year):Number("19"+year);
}
day=(day<10)?"0"+day:day;
_128=(_128<10)?"0"+_128:_128;
return new $.dr.date(year+"-"+_128+"-"+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 _12b=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,_12d){
if(val===null||val===undefined){
return false;
}
var date=new $.dr.date(val,_12d);
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,_133){
if(val===null||val===undefined){
return false;
}
if(!_133){
_133="yyyy";
}
if(_133.toLowerCase()=="yy"&&val.length==2&&!isNaN(val)){
return true;
}else{
if(_133.toLowerCase()=="yyyy"&&val.length==4&&!isNaN(val)){
return true;
}
}
return false;
}]});
}
};
$(document).bind("beforeInitForms",_12b);
})(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 _135=window.onresize;
var _136=function(){
self.refreshModalScroller();
};
window.onresize=function(){
_136();
if(typeof (_135)=="function"){
_135();
}
};
function cleanupEvents(){
window.detachEvent("onresize",_136);
}
if(DR.Utils.BrowserDetect.browser=="Explorer"){
if(window.attachEvent){
window.attachEvent("onunload",cleanupEvents);
}
}
},refresh:function(){
var _137,yScroll,pageHeight,pageWidth;
var obj={};
if(window.innerHeight&&window.scrollMaxY){
_137=document.body.scrollWidth;
yScroll=window.innerHeight+window.scrollMaxY;
}else{
if(document.body.scrollHeight>document.body.offsetHeight){
_137=document.body.scrollWidth;
yScroll=document.body.scrollHeight;
}else{
_137=document.body.offsetWidth;
yScroll=document.body.offsetHeight;
}
}
var _139,windowHeight;
if(self.innerHeight){
_139=self.innerWidth;
windowHeight=self.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
_139=document.documentElement.clientWidth;
windowHeight=document.documentElement.clientHeight;
}else{
if(document.body){
_139=document.body.clientWidth;
windowHeight=document.body.clientHeight;
}
}
}
if(yScroll<windowHeight){
pageHeight=windowHeight;
}else{
pageHeight=yScroll;
}
if(_137<_139){
pageWidth=_139;
}else{
pageWidth=_137;
}
if(this.doc===undefined){
this.doc={};
}
this.pageWidth=pageWidth;
this.pageHeight=pageHeight;
this.windowWidth=_139;
this.windowHeight=windowHeight;
},refreshModalScroller:function(){
var d=$(".modalScroller");
if(d.length==0){
d=$("#modalScroller");
}
if(d.length>0){
d=d[0];
this.refresh();
var _13b=this.windowHeight;
var _13c=this.windowWidth;
var _13d=d.offsetTop;
var _13e=$(".pageButtons");
var _13f=(_13e.length>0)?_13e[0].offsetHeight:0;
_13f=_13f+32;
var _140=_13b;
if(_13c<790){
}
var _141=_140-d.offsetTop-_13f;
if(_141>0){
d.style.height=_141+"px";
}
}
}};
(function($){
var _143={url:"",width:740,height:500,target:"",centered:true,type:"normal"};
$.dr.popup=function(_144){
_144=$.extend({},_143,_144);
if(_144.url==""||_144.url==null){
$.dr.utils.logError("Must supply a url");
return;
}
var s="";
switch(_144.type){
case "console":
s="resizable,scrollbars,height="+_144.height+",width="+_144.width;
break;
case "fixed":
s="status,scrollbars,height="+_144.height+",width="+_144.width;
break;
case "normal":
s="toolbar,scrollbars,resizable,location,height="+_144.height+",width="+_144.width;
break;
case "full":
s="toolbar,menubar,scrollbars,resizable,location,height="+_144.height+",width="+_144.width;
break;
default:
if(_144.type){
s=_144.type;
}
break;
}
if(_144.centered){
if(window.screen){
var l=(screen.width-parseInt(_144.width,10))/2;
var t=(screen.height-parseInt(_144.height))/2;
s+=",left="+l+",top="+t;
}
}
tg=_144.target;
return window.open(_144.url,tg,s);
};
})(jQuery);
DR.Utils.Position=function(_148){
this.obj=(typeof _148=="object")?_148:document.getElementById(_148);
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(_14b,_14c,_14d,_14e,_14f,_150,_151,_152){
this.setRelativeXPosition(_14b,_14c,_14d,_150,_152);
this.setRelativeYPosition(_14b,_14e,_14f,_151,_152);
},setRelativeXPosition:function(_153,_154,_155,_156,_157){
var _158=new DR.Utils.Position(_153);
var _159=_158.left;
var _15a=DR.Utils.BrowserDetect.getAvailableContentWidth();
if(_154==DR.Utils.Position.ON_CENTER){
_159=_158.left+(Math.floor(_158.width/2));
}else{
if(_154==DR.Utils.Position.ON_RIGHT){
_159=_158.right;
}
}
if(_155==DR.Utils.Position.DRAW_LEFT){
if(_157||(_159-this.width-_156)>=0){
_159=_159-this.width-_156;
}else{
if((_159+this.width+_156)<_15a){
_159=_159+this.width+_156;
}else{
_159=0;
}
}
}else{
if(_155==DR.Utils.Position.DRAW_RIGHT){
if(_157||(_159+this.width+_156)<_15a){
_159=_159+_156;
}else{
if((_159-this.width-_156)>0){
_159=_159-this.width+_158.width;
}else{
_159=_15a;
}
}
}else{
if(_155==DR.Utils.Position.DRAW_CENTERED){
if(_157||(_159-Math.floor((this.width-_156)/2))>0){
_159=_159-Math.floor((this.width-_156)/2);
}else{
_159=0;
}
}
}
}
this.setX(_159);
},setRelativeYPosition:function(_15b,_15c,_15d,_15e,_15f){
var _160=new DR.Utils.Position(_15b);
var _161=_160.top;
var _162=DR.Utils.BrowserDetect.getAvailableContentHeight();
if(_15c==DR.Utils.Position.ON_MIDDLE){
_161=_160.top+(Math.floor(_160.height/2));
}else{
if(_15c==DR.Utils.Position.ON_BOTTOM){
_161=_160.bottom;
}
}
if(_15d==DR.Utils.Position.DRAW_UP){
if(_15f||(_161-this.height-_15e)>0){
_161=_161-this.height-_15e;
}else{
if((_161+_160.height+this.height+_15e)<_162){
_161=_161+_160.height+_15e;
}else{
_161=0;
}
}
}else{
if(_15d==DR.Utils.Position.DRAW_DOWN){
var _163=_161+this.height+_15e;
if(_15f||(_163)<_162){
_161=_161+_160.height+_15e;
}else{
if((_161-this.height-_15e)>0){
_161=_161-this.height-_15e;
}else{
_161=_162;
}
}
}else{
if(_15d==DR.Utils.Position.DRAW_CENTERED){
if(_15f||(_161-Math.floor((this.height-_15e)/2))>0){
_161=_161-Math.floor((this.height-_15e)/2);
}else{
_161=0;
}
}
}
}
this.setY(_161);
},setX:function(left){
this.obj.style.left=left+"px";
},setY:function(top){
this.obj.style.top=top+"px";
},getX:function(){
var curX=0;
var _167=this.obj;
if(_167.offsetParent){
while(_167.offsetParent){
curX+=_167.offsetLeft;
if(_167.clientLeft&&(_167.tagName=="TD")||(_167.tagName=="TH")){
curX+=_167.clientLeft;
}
_167=_167.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 _169=this.obj;
if(_169.offsetParent){
while(_169.offsetParent){
curY+=_169.offsetTop;
if(_169.clientTop&&(_169.tagName=="TD")||(_169.tagName=="TH")){
curY+=_169.clientTop;
}
_169=_169.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(_16a,_16b,_16c,_16d,_16e,_16f,_170,_171,_172){
sourceObj=(typeof _16a=="object")?_16a:document.getElementById(_16a);
targetObj=(typeof _16b=="object")?_16b:document.getElementById(_16b);
_16c=(_16c!==undefined)?_16c:0;
_16d=(_16d!==undefined)?_16d:0;
_16e=(_16e!==undefined)?_16e:"Right";
_16f=(_16f!==undefined)?_16f:"Top";
_170=(_170!==undefined)?_170:"Right";
_171=(_171!==undefined)?_171:"Down";
_172=(_172==false)?false:true;
var _173=sourceY=0,_width,_height;
var obj=sourceObj;
while(obj.offsetParent){
_173+=obj.offsetLeft;
if(obj.scrollLeft){
_173-=obj.scrollLeft;
}
sourceY+=obj.offsetTop;
if(obj.scrollTop){
sourceY-=obj.scrollTop;
}
obj=obj.offsetParent;
}
obj=sourceObj;
while(obj.offsetParent){
if(obj.scrollLeft){
_173-=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){
_173+=obj.clientLeft;
}
}
if(DR.Utils.hasCSSClass(obj,"searchBody")){
_173-=11;
}
}
obj=obj.parentNode;
}
sourceWidth=sourceObj.offsetWidth;
sourceHeight=sourceObj.offsetHeight;
targetX=_173;
targetY=sourceY;
if(_16e=="Right"){
targetX=_173+sourceWidth;
}
if(_16f=="Bottom"){
targetY=sourceY+sourceHeight;
}
if(_172){
var _175,scrollY;
if(window.scrollX){
_175=window.scrollX;
scrollY=window.scrollY;
}else{
_175=document.documentElement.scrollLeft+document.body.scrollLeft;
scrollY=document.documentElement.scrollTop+document.body.scrollTop;
}
targetWidth=targetObj.offsetWidth;
targetHeight=targetObj.offsetHeight;
var _176=DR.Utils.BrowserDetect.getAvailableContentWidth();
var _177=DR.Utils.BrowserDetect.getAvailableContentHeight();
var _178=_173+targetWidth+_16c;
var _179=_173-targetWidth-_16c;
var _17a=false;
var _17b=false;
if(_178<=(_176+_175-sourceWidth)){
_17a=true;
}
if(_179>_175){
_17b=true;
}
if((_170=="Right"&&_17a)||(_170=="Left"&&!_17b&&_17a)){
targetX+=_16c;
}else{
if(_17b){
targetX=_173-targetWidth-_16c;
}
}
var _17c=sourceY+targetHeight+_16d;
var _17d=sourceY-targetHeight-_16d;
var _17e=false;
var _17f=false;
if(_17c<=(_177+scrollY-sourceHeight)){
_17e=true;
}
if(_17d>scrollY){
_17f=true;
}
if((_171=="Down"&&_17e)||(_171=="Up"&&!_17f&&_17e)){
targetY+=_16d;
}else{
if(_17f){
targetY=sourceY-targetHeight-_16d;
}
}
}else{
targetX+=_16c;
targetY+=_16d;
}
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 _184;
alert(args[i]);
var pair=args[i].split("=");
var _186=unescape(pair[0]);
if(pair.length==2){
val=unescape(pair[1]);
}else{
val=_186;
}
this.params[_186]=val;
}
};
DR.Utils.Querystring.prototype.get=function(_187){
var val=this.params[_187];
return val;
};
String.prototype.stripSpaces=function(){
return this.replace(/ /g,"");
};
String.prototype.stripWhitepace=function(){
return this.replace(/\s/g,"");
};
String.prototype.squeezeWhitespace=function(_189){
return this.replace(/\s+/g,(arguments.length===1)?_189:" ");
};
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(_18b,_18c){
return (_18c<args.length)?args[_18c]:_18b;
});
};
String.prototype.replaceBreaks=function(){
return this.replaceTokens("<br/><br/>");
};
String.prototype.trimLastLetter=function(){
var _18d=this.length;
var _18e=encodeURI(this.substr(_18d-1,_18d));
var _18f=1;
if(DR.Utils.BrowserDetect.browser=="Explorer"&&_18e=="%0A"){
_18f=2;
}
return this.substr(0,_18d-_18f);
};
String.prototype.stripDoubleQuotes=function(){
return this.replace(/"/g,"");
};
String.prototype.isBlank=function(){
return /^\s*$/.test(this);
};
String.prototype.makeUT8CharsFitLength=function(_190,_191){
if(_190===0||_190==_191){
return this;
}
var _192=false;
var _193=this.length;
var _194=_193/_190;
var _195=Math.round(_191*_194,0);
var _196;
var _197="";
var _198=false;
var _199=_195;
var i=0;
while(!_192&&i<100){
var _19b=this.substr(0,_199);
var _19c=DR.Utils.FormUtils.getUTF8Bytes(_19b).byteCount;
if(_19c==_191){
_192=true;
_196=_19b;
}else{
if(_19c<_191&&_198){
_192=true;
_196=_19b;
}else{
if(_19c<_191){
if(_197=="negative"){
_198=true;
}
_199++;
_197="positive";
}else{
if(_19c>_191){
if(_197=="positive"){
_198=true;
}
_199--;
_197="negative";
}
}
}
}
}
return _196;
};
DR.Utils.Toggle=function(){
};
DR.Utils.Toggle.disabledFromCheckbox=function(_19d,_19e){
var _19f=(typeof _19d=="object")?_19d:document.getElementById(_19d);
if(typeof _19e=="string"){
_19e=_19e.stripSpaces().split(",");
for(var i=0;i<_19e.length;i++){
DR.Utils.Toggle.setDisabled(_19e[i],!DR.Utils.Toggle.isChecked(_19d));
}
}
};
DR.Utils.Toggle.disabledFromRadioButton=function(_1a1,_1a2){
var _1a3=(typeof _1a1=="object")?_1a1:document.getElementById(_1a1);
var _1a4=(_1a3.value=="true"||_1a3.value==true)?false:true;
if(typeof _1a2=="string"){
_1a2=_1a2.stripSpaces().split(",");
for(var i=0;i<_1a2.length;i++){
DR.Utils.Toggle.setDisabled(_1a2[i],_1a4);
}
}
};
DR.Utils.Toggle.isChecked=function(_1a6){
var _1a7=(typeof _1a6=="object")?_1a6:document.getElementById(_1a6);
if(_1a7){
return (_1a7.checked)?true:false;
}else{
return false;
}
};
DR.Utils.Toggle.setDisabled=function(_1a8,_1a9){
var _1aa=(typeof _1a8=="object")?_1a8:document.getElementById(_1a8);
if(_1aa){
_1aa.disabled=(_1a9=="true"||_1a9==true)?true:false;
}
};
DR.Utils.Toggle.setVisibility=function(_1ab,_1ac){
var _1ad=(typeof _1ab=="object")?_1ab:document.getElementById(_1ab);
if(_1ad){
if(_1ac){
$(_1ad).fadeIn();
}else{
$(_1ad).hide();
}
}
};
DR.Utils.Toggle.enableTab=function(_1ae){
var _1af=(typeof _1ae=="object")?_1ae:document.getElementById(_1ae);
_1af=_1af.parentNode;
var tabs=(_1af.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(_1af,"selected");
DR.Utils.Toggle.setVisibility("tabContent_"+_1af.id,true);
};
DR.Utils.Toggle.visibilityFromLink=function(_1b2,_1b3,_1b4){
var _1b5=(typeof _1b2=="object")?_1b2:document.getElementById(_1b2);
var _1b6=(_1b5.className=="collapsedImage")?true:false;
var _1b7=(_1b5.className=="collapsedImage")?"expandedImage":"collapsedImage";
if(typeof _1b3=="string"){
_1b3=_1b3.stripSpaces().split(",");
for(var i=0;i<_1b3.length;i++){
DR.Utils.Toggle.setVisibility(_1b3[i],_1b6);
}
}
if(typeof _1b4=="string"){
_1b4=_1b4.stripSpaces().split(",");
for(var j=0;j<_1b4.length;j++){
DR.Utils.Toggle.setVisibility(_1b4[j],!_1b6);
}
}
DR.Utils.replaceCSSClass(_1b5,_1b5.className,_1b7);
};
DR.Utils.Toggle.visibilityFromCheckbox=function(_1ba,_1bb,_1bc){
var _1bd=(typeof _1ba=="object")?_1ba:document.getElementById(_1ba);
var _1be=(_1bd.checked)?true:false;
if(typeof _1bb=="string"){
_1bb=_1bb.stripSpaces().split(",");
for(var i=0;i<_1bb.length;i++){
DR.Utils.Toggle.setVisibility(_1bb[i],_1be);
}
}
if(typeof _1bc=="string"){
_1bc=_1bc.stripSpaces().split(",");
for(var j=0;j<_1bc.length;j++){
DR.Utils.Toggle.setVisibility(_1bc[j],!_1be);
}
}
};
DR.Utils.Toggle.visibilityFromRadioButton=function(_1c1,_1c2,_1c3){
var _1c4=(typeof _1c1=="object")?_1c1:document.getElementById(_1c1);
if(typeof _1c2=="string"){
_1c2=_1c2.stripSpaces().split(",");
for(var i=0;i<_1c2.length;i++){
DR.Utils.Toggle.setVisibility(_1c2[i],true);
}
}
if(typeof _1c3=="string"){
_1c3=_1c3.stripSpaces().split(",");
for(var j=0;j<_1c3.length;j++){
DR.Utils.Toggle.setVisibility(_1c3[j],false);
}
}
};
DR.Utils.Toggle.childTable=function(_1c7,_1c8){
var _1c9=document.getElementById(_1c8);
var _1ca=(_1c9.style.display!="none");
if(_1ca){
_1c9.style.display="none";
_1c7.className="first collapsed";
}else{
_1c9.style.display="";
_1c7.className="first expanded";
}
};
DR.Utils.Toggle.childTableFromCheckbox=function(_1cb,_1cc,_1cd){
var _1ce=document.getElementById(_1cd);
var _1cf=(_1ce.style.display!="none");
if(!_1cb.checked){
_1ce.style.display="none";
_1cc.className="first collapsed";
}else{
_1ce.style.display="";
_1cc.className="first expanded";
}
};
(function($){
var _1d1={active:0,autoHeight:false,collapsible:false,refreshOnChange:false,followRemoteLinks:true,defaultUnit:"px",header:">dt"};
var _1d2=function(_1d3,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 _1d5=$(ui.newHeader).find("a");
if(_1d5.length===0){
$.dr.utils.logError("Panel not formatted correctly, no enclosing A tag.");
return;
}
var _1d6=_1d5[0].getAttribute("href");
var fn=function(res,_1d9){
if(_1d9==="success"){
$.dr.triggerUnobtrusiveEvents(this);
$(this).trigger("accordionload",[this]);
if(!ui.options.refreshOnChange){
$(this).addClass("loaded");
}
}
};
if(_1d6&&_1d6.indexOf("#")==-1){
var _1da;
var _1db=_1d5[0].getAttribute("data-options");
if(_1db){
var dO=$.dr.utils.evalString(_1db);
if(typeof dO.selector==="string"){
_1da=[_1d6,dO.selector].join(" ");
}
}else{
_1da=_1d6;
}
if(!ui.newContent.parent(".ui-accordion-content").hasClass("loaded")&&ui.options.followRemoteLinks){
var _1dd=ui.newContent.parent(".ui-accordion-content");
var _1de=new Date().getTime();
_1dd.load(_1da,{noCache:_1de},fn);
}
}
};
$.namespace("dr",{accordion:function(_1df){
var _1e0=arguments.length===0?true:false;
return this.each(function(){
if(typeof $(this).accordion!=="undefined"){
var _1e1={};
if(_1e0){
_1d1.changestart=_1d2;
var _1e2=this.getAttribute("data-options");
if(_1e2){
_1e1=$.dr.utils.evalString(_1e2,"Error parsing accodion data-options for ("+this.id||"accordian"+")");
if(typeof _1df==="error"){
_1e1={};
}
}
}
var _1e3=$.extend(true,{},_1d1,_1df,_1e1);
if($.browser.msie&&!_1e3.height){
_1e3.animated=false;
}
if(_1e3.height){
_1e3.active=0;
_1e3.collapsible=false;
_1e3.fillSpace=true;
$(this).wrap("<div class=\"acc-wrapper\"></div>");
$(this).parent(".acc-wrapper").height(parseInt(_1e3.height,10)+_1e3.defaultUnit);
if(_1e3.width){
$(this).parent(".acc-wrapper").width(parseInt(_1e3.width,10)+_1e3.defaultUnit);
}
}else{
if(_1e3.width){
$(this).width(parseInt(_1e3.width,10)+_1e3.defaultUnit);
}
}
$(this).accordion(_1e3);
if(_1e3.active!==false){
var _1e4=$(this).find(_1e3.header).eq(_1e3.active);
if(_1e4){
var ui={newContent:_1e4.next().children(),newHeader:_1e4,options:_1e3};
_1d2("change",ui);
}
}
}else{
$.dr.utils.logError("The jquery-ui js file is not present on this page.");
}
});
}});
$.dr.accordion={getDefaults:function(){
return _1d1;
},setDefaults:function(_1e6){
if(_1e6){
$.extend(_1d1,_1e6);
}
$(document).trigger("afterAccordionSetDefaults",[_1e6]);
}};
var _1e7=function(evt,_1e9){
$(".accordion",_1e9).dr.accordion();
};
$.dr.addUnobtrusiveEvent(_1e7,"unobtrusiveEventEarly");
})(jQuery);
(function($){
var _1eb={header:"p:first",containerCls:"drui-collapsible-container",selector:".collapsible",preventDefault:true,change:function(_1ec,vis,_1ee){
}};
$.namespace("dr",{collapsible:function(_1ef){
return this.each(function(i){
var _1f1=$(this).attr("data-options");
if(_1f1&&!_1ef){
_1ef=$.dr.utils.evalString(_1f1);
}
var _1f2=$.extend(true,{},_1eb,_1ef);
var self=$(this);
if(typeof _1f2.change==="function"){
$(this).bind("collapsiblechange",_1f2.change);
}
$(this).data("options",_1f2);
$(this).find(_1f2.header).each(function(){
$(this).addClass("drui-collapsible-header");
$(this).next().addClass(_1f2.containerCls);
if($(this).hasClass("collapsed")||$(this).addClass("drui-collapsible-collapsed")){
$(this).removeClass("collapsed");
$(this).addClass("drui-collapsible-collapsed");
$("."+_1f2.containerCls,$(this).parents(_1f2.selector)).hide();
$(this).trigger("collapsiblechange",[false,_1f2]);
}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(_1f2.selector).dr.collapsible.expand();
}else{
$(this).parents(_1f2.selector).dr.collapsible.collapse();
}
if(_1f2.preventDefault){
evt.preventDefault();
}
});
});
});
}});
$.namespace("dr.collapsible",{collapse:function(evt){
var _1f7=$(this).data("options");
if($(_1f7.header,$(this)).hasClass("drui-collapsible-collapsed")){
return this;
}
$(this).trigger("collapsiblechangestart",[false,_1f7]);
$("."+_1f7.containerCls,$(this)).slideUp("fast",function(){
$(this).parents(_1f7.selector).trigger("collapsiblechange",[false,_1f7]);
});
$(_1f7.header,$(this)).toggleClass("drui-collapsible-collapsed");
$(_1f7.header,$(this)).toggleClass("drui-collapsible-active");
return this;
},expand:function(evt){
var _1f9=$(this).data("options");
if($(_1f9.header,$(this)).hasClass("drui-collapsible-active")){
return this;
}
$(this).trigger("collapsiblechangestart",[true,_1f9]);
$("."+_1f9.containerCls,$(this)).slideDown("fast",function(){
$(this).parents(_1f9.selector).trigger("collapsiblechange",[true,_1f9]);
});
$(_1f9.header,$(this)).toggleClass("drui-collapsible-collapsed");
$(_1f9.header,$(this)).toggleClass("drui-collapsible-active");
return this;
},toggle:function(vis){
if(!!vis){
this.dr.collapsible.expand();
}else{
this.dr.collapsible.collapse();
}
}});
var _1fb=function(evt,_1fd){
$(".collapsible",_1fd).dr.collapsible();
};
$.dr.addUnobtrusiveEvent(_1fb,"unobtrusiveEventEarly");
})(jQuery);
DR.Widgets.AjaxPanel=function(_1fe,_1ff){
this.settingName="";
this.newSettingName="";
this.panelId=_1fe;
this.content=getElem(_1fe);
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=(_1ff)?true:false;
};
DR.Widgets.AjaxPanel.prototype={get:function(url,_201){
this.markLoading();
this.url=url;
this.queryStringData=(_201)?_201:"";
var _202=this;
$.ajax({url:this.url,data:this.queryStringData+"&ajaxTime="+new Date().getTime(),type:"GET",dataType:"html",success:function(_203){
if($.browser.msie){
_203=_203.replace("<script","<br style=\"display:none\"/> <script");
}
_202.content.innerHTML=_203;
_202.loaded=true;
_202.loading=false;
_202.prepare();
_202.runScripts();
if(typeof _202.loadCallback=="function"){
_202.loadCallback(_203);
}
},error:function(xhr){
if(xhr.status=="500"){
DR.Utils.replaceHtml(_202.content,xhr.responseText);
_202.loaded=true;
_202.loading=false;
_202.saving=false;
_202.prepare();
_202.runScripts();
}else{
if(xhr.status=="403"){
window.location=$.dr.LOGIN_URL;
}
}
}});
if(typeof _202.beforeLoadCallback=="function"){
_202.beforeLoadCallback();
}
this.loading=true;
},refresh:function(){
this.get(this.url,this.queryStringData);
},prepare:function(){
if(this.currentForm!==null){
var _205=this.currentForm;
$(_205).dr.form.destroy();
}
$.dr.triggerUnobtrusiveEvents(this.content);
var _206=$("form",this.content);
if(_206.length==0&&this.currentForm!==null){
_206.dr.form.destroy();
this.currentForm=null;
}else{
for(var i=0;i<_206.length;i++){
var _205=_206[i];
this.currentForm=_205;
this.addHijackForm();
}
}
},addHijackForm:function(){
var _208=this;
var _209=this.currentForm.onsubmit;
var _20a;
if(typeof _209!="function"){
_20a=function(_20b){
if(_20b!==false){
_208.hijackForm();
return false;
}else{
return true;
}
};
}else{
_20a=function(_20c){
var test=_209();
if(test){
if(_20c!==false){
_208.hijackForm();
return false;
}else{
return true;
}
}
return false;
};
}
this.currentForm.onsubmit=_20a;
},runScripts:function(){
var div=this.content;
var _20f=$("script",div);
this.errors=[];
var _210=[];
var _211=(navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")==-1)?true:false;
for(var i=0;i<_20f.length;i++){
var _213=_20f[i];
var h=_213.innerHTML;
if(h.indexOf("document.write")==-1){
if(_213.src){
var head=document.getElementsByTagName("head")[0];
var _216=document.createElement("script");
_216.setAttribute("type","text/javascript");
_216.setAttribute("src",_213.src);
head.appendChild(_216);
}else{
if(h){
if(_211){
_210.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(_211){
var s=[];
for(var i=0;i<_210.length;i++){
s.push("try{"+_210[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(_219){
var url=this.url+"?"+this.queryStringData+"&ajaxTime="+new Date().getTime();
var _21b=$(this.currentForm).serialize();
var _21c=this;
var _21d=function(o){
_21c.hijackFailureCallback(o);
};
var _21f;
this.loaded=false;
_21f=function(data,o){
_21c.hijackSaveCallback(data,o);
if(typeof _219=="function"){
_219();
}
};
var _222=this.currentForm;
$(_222).dr.form.reIndex();
$.ajax({type:"POST",url:url,success:_21f,error:_21d,data:_21b});
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 _226=data;
if($.browser.msie){
_226=_226.replace("<script","<br style=\"display:none\"/> <script");
}
this.content.innerHTML=_226;
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 _228=(!this.loaded)?0:250;
this.loaded=false;
var _229=this;
var func=function(){
_229.markLoadingST();
};
window.setTimeout(func,_228);
}
},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 _22d=150;
this.saving=true;
var _22e=this;
var func=function(){
_22e.markSavingST();
};
window.setTimeout(func,_22d);
}
},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(_232){
if(this.currentForm==null){
_232();
return false;
}
var _233=this.checkFormChanges();
if(_233){
if(this.currentForm!==undefined){
var _234=this.currentForm.onsubmit;
if(typeof _234=="function"){
var _235=_234(false);
if(_235===false){
return false;
}
}
}
this.checkChangeCallback=_232;
var _236=this;
var _237=function(_238){
_236.checkChangesConfirmCallback(_238);
};
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,_237,this.UNSAVED_CHANGES_CONFIRM_TITLE);
return true;
}else{
_232();
return false;
}
},checkFormChanges:function(){
var _23a=this.currentForm;
if(!_23a){
return false;
}
if($(_23a).dr.form.get().checkChanges){
if($(_23a).dr.form.checkForChanges()){
return true;
}
}
return false;
},checkChangesConfirmCallback:function(_23b){
var _23c=false;
if(_23b){
var _23d=this.currentForm;
if($(_23d).dr.form.validate()){
this.hijackForm();
return;
}else{
_23c=true;
}
}
if(!_23c){
this.checkChangeCallback();
}
},getCurrentForm:function(){
var _23e=this.currentForm;
return _23e;
}};
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 _240={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(_242,term){
return _242.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");
},scroll:true,scrollHeight:180};
var _244=function(_245,_246,end){
if(_245.createTextRange){
var _248=_245.createTextRange();
_248.collapse(true);
_248.moveStart("character",_246);
_248.moveEnd("character",end);
_248.select();
}else{
if(_245.setSelectionRange){
_245.setSelectionRange(_246,end);
}else{
if(_245.selectionStart){
_245.selectionStart=_246;
_245.selectionEnd=end;
}
}
}
_245.focus();
};
var _249=function(_24a){
var data={};
var _24c=0;
function matchSubset(s,sub){
if(!_24a.matchCase){
s=s.toLowerCase();
}
var i=s.indexOf(sub);
if(i==-1){
return false;
}
return i==0||_24a.matchContains;
}
function add(q,_251){
if(_24c>_24a.cacheLength){
flush();
}
if(!data[q]){
_24c++;
}
data[q]=_251;
}
function populate(){
if(!_24a.data){
return false;
}
var _252={},nullData=0;
if(!_24a.url){
_24a.cacheLength=1;
}
_252[""]=[];
for(var i=0,ol=_24a.data.length;i<ol;i++){
var _254=_24a.data[i];
_254=(typeof _254=="string")?[_254]:_254;
var _255=_24a.formatMatch(_254,i+1,_24a.data.length);
if(_255===false){
continue;
}
var _256=_255.charAt(0).toLowerCase();
if(!_252[_256]){
_252[_256]=[];
}
var row={value:_255,data:_254,result:_24a.formatResult&&_24a.formatResult(_254)||_255};
_252[_256].push(row);
if(nullData++<_24a.max){
_252[""].push(row);
}
}
$.each(_252,function(i,_259){
_24a.cacheLength++;
add(i,_259);
});
}
setTimeout(populate,25);
function flush(){
data={};
_24c=0;
}
return {flush:flush,add:add,populate:populate,load:function(q){
if(!_24a.cacheLength||!_24c){
return null;
}
if(!_24a.url&&_24a.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(_24a.matchSubset){
for(var i=q.length-1;i>=_24a.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 _263=function(_264,_265,_266,_267,_268,_269){
var _26a={ACTIVE:"ac_over"};
var _26b,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(_26d){
if(target(_26d).nodeName&&target(_26d).nodeName.toUpperCase()=="LI"){
active=$("li",list).removeClass(_26a.ACTIVE).index(target(_26d));
$(target(_26d)).addClass(_26a.ACTIVE);
}
}).click(function(_26e){
$(target(_26e)).addClass(_26a.ACTIVE);
var _26f=_266();
if(_26f!==null){
_268(_26f);
}
_265.focus();
return false;
}).mousedown(function(){
_267.mouseDownOnSelect=true;
}).mouseup(function(){
_267.mouseDownOnSelect=false;
});
if(_264.width>0){
popup.css("width",_264.width);
}
needsInit=false;
}
function target(_270){
var _271=_270.target;
while(_271&&_271.tagName!="LI"){
_271=_271.parentNode;
}
if(!_271){
return [];
}
return _271;
}
function moveSelect(step){
_26b.slice(active,active+1).removeClass(_26a.ACTIVE);
movePosition(step);
var _273=_26b.slice(active,active+1).addClass(_26a.ACTIVE);
if(_264.scroll){
var _274=0;
_26b.slice(0,active).each(function(){
_274+=this.offsetHeight;
});
if((_274+_273[0].offsetHeight-list.scrollTop())>list[0].clientHeight){
list.scrollTop(_274+_273[0].offsetHeight-list.innerHeight());
}else{
if(_274<list.scrollTop()){
list.scrollTop(_274);
}
}
}
}
function movePosition(step){
active+=step;
if(active<0){
active=0;
}else{
if(active>=_26b.size()){
active=_26b.size()-1;
}
}
}
function limitNumberOfItems(_276){
return _264.max&&_264.max<_276?_264.max:_276;
}
function fillList(){
list.empty();
var max=limitNumberOfItems(data.length);
for(var i=0;i<max;i++){
if(!data[i]){
continue;
}
var _279=_264.formatItem(data[i].data,i+1,max,data[i].value,term);
if(_279===false){
continue;
}
var li=$("<li/>").html(_264.highlight(_279,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];
$.data(li,"ac_data",data[i]);
}
_26b=list.find("li");
if(_264.selectFirst){
_26b.slice(0,1).addClass(_26a.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!=_26b.size()-1&&active+9>_26b.size()){
moveSelect(_26b.size()-1-active);
}else{
moveSelect(9);
}
},hide:function(){
popup&&popup.slideUp(function(){
_269.parent().removeClass("ac_open");
shadow.hide();
});
_26b&&_26b.removeClass(_26a.ACTIVE);
active=-1;
},visible:function(){
return shadow&&shadow.is(":visible");
},current:function(){
return this.visible()&&(_26b.filter("."+_26a.ACTIVE)[0]||_264.selectFirst&&_26b[0]);
},show:function(){
var _27d=_265.offsetWidth-2;
var _27e=$(_265).offset();
_269.parent().addClass("ac_open");
popup.css({width:typeof _264.width=="string"||_264.width>0?_264.width:_27d});
popup.show();
shadow.show();
var _27f=-(20/2);
var _280=-1;
if(DR.Utils.BrowserDetect.browser=="Explorer"&&DR.Utils.BrowserDetect.version<7){
_27f=0;
}
var _281="Left";
var _282="Bottom";
var _283="Right";
var _284="Down";
DR.Utils.Position.snapTo(_265,shadow[0],_27f,_280,_281,_282,_283,_284,false);
if(_264.scroll){
list.scrollTop(0);
list.css({maxHeight:_264.scrollHeight,overflow:"auto"});
if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){
var _285=0;
_26b.each(function(){
_285+=this.offsetHeight;
});
var _286=_285>_264.scrollHeight;
list.css("height",_286?_264.scrollHeight:_285);
if(!_286){
_26b.width(list.width()-parseInt(_26b.css("padding-left"))-parseInt(_26b.css("padding-right")));
}
}
}
},selected:function(){
var _287=_26b&&_26b.filter("."+_26a.ACTIVE).removeClass(_26a.ACTIVE);
return _287&&_287.length&&$.data(_287[0],"ac_data");
},emptyList:function(){
list&&list.empty();
},unbind:function(){
popup&&popup.remove();
}};
};
var _288=function(_289,_28a,_28b){
var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};
var _28d=$(_289),originalInput=_289,boundInput=null;
var _28e=($.browser.msie)?6:4;
var _28f=_28d.dr.computedWidth()+_28e;
_28f=(_28f>_28e)?_28f:(_289.offsetWidth);
var _290=$("<div class=\"ac_wrapper\" style=\"width:"+_28f+"px;\" />");
boundInput=_28d.clone();
boundInput.removeAttr("name").removeAttr("id");
if(_289.tagName.toLowerCase()=="textarea"){
boundInput.css("max-width",_289.offsetWidth+"px").css("max-height",_289.offsetHeight+"px");
_290.addClass("ac_textareaWrapper");
}
boundInput.appendTo(_290);
boundInput.val(_28d.val());
boundInput.attr("data-expand-collapse","false");
_28d.attr("data-expand-collapse","false");
_28d.data("validationEnabled",false);
_290.insertBefore(_28d);
_290.wrap("<div class=\"autocomplete\" />");
_28d.hide();
_28d=boundInput;
_289=boundInput[0];
var _291=_289;
var _292=$("<span class=\"loading\" />").appendTo(_290).hide();
if(_28a.comboBox){
_290.addClass("ac_comboBox");
var _293=$("<span class=\"handle\" />").appendTo(_290).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){
if(_28a.showAllOptions){
_289.value="";
}
_289.focus();
hasFocus=1;
onChange(0,true);
}
};
var _298=($.browser.msie)?200:20;
setTimeout(func,_298);
evt.preventDefault();
});
}
var _299=function(){
if(boundInput!==null){
$(originalInput).val(boundInput.val());
}
};
var _29a=function(){
if($.dr&&$.dr.form&&$.dr.form.validateField){
$.dr.form.validateField(_289,true);
}
};
_28d=$(_289).attr("autocomplete","off");
var _29b,previousValue="",cache=new _249(_28a),hasFocus=0,lastKeyPressCode,config={mouseDownOnSelect:false},select=new _263(_28a,_289,selectCurrent,config,doCallback,_290),blockSubmit;
$.browser.opera&&$(_289.form).bind("submit.autocomplete",function(){
if(blockSubmit){
blockSubmit=false;
return false;
}
});
function doCallback(_29c){
_29a();
if(!_29c){
return;
}
_299();
if(typeof _28a.callback=="function"){
var func=function(){
_28a.callback(_29c[0],_29c[1]);
};
setTimeout(func,10);
}
}
_28d.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(_29e){
lastKeyPressCode=_29e.keyCode;
switch(_29e.keyCode){
case KEY.UP:
_29e.preventDefault();
if(select.visible()){
select.prev();
}else{
onChange(0,true);
}
break;
case KEY.DOWN:
_29e.preventDefault();
if(select.visible()){
select.next();
}else{
onChange(0,true);
}
break;
case KEY.PAGEUP:
_29e.preventDefault();
if(select.visible()){
select.pageUp();
}else{
onChange(0,true);
}
break;
case KEY.PAGEDOWN:
_29e.preventDefault();
if(select.visible()){
select.pageDown();
}else{
onChange(0,true);
}
break;
case _28a.multiple&&$.trim(_28a.multipleSeparator)==","&&KEY.COMMA:
case KEY.TAB:
case KEY.RETURN:
var _29f=selectCurrent();
if(_29f!==null){
blockSubmit=true;
if(!_28a.multiple){
if(_29e.keyCode==KEY.RETURN){
_29e.keyCode=KEY.TAB;
_29e.preventDefault();
}else{
_29e.keyCode=KEY.TAB;
}
}else{
_29e.preventDefault();
}
doCallback(_29f);
}
break;
case KEY.ESC:
select.hide();
break;
default:
clearTimeout(_29b);
_29b=setTimeout(onChange,_28a.delay);
break;
}
_299();
_29a();
}).focus(function(){
hasFocus++;
}).blur(function(evt){
_29a();
_299();
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 _2a4;
if(data&&data.length){
for(var i=0;i<data.length;i++){
if(data[i].result.toLowerCase()==q.toLowerCase()){
_2a4=data[i];
break;
}
}
}
if(typeof fn=="function"){
fn(_2a4);
}else{
doCallback(_2a4);
}
}
var _2a6=0;
$.each(trimWords(_28d.val()),function(i,_2a8){
_2a6++;
request(_2a8,findValueCallback,findValueCallback);
});
if(_2a6==0){
request("",findValueCallback,findValueCallback);
}
}).bind("flushCache",function(){
cache.flush();
}).bind("setOptions",function(){
$.extend(_28a,arguments[1]);
if("data" in arguments[1]){
cache.populate();
}
}).bind("unautocomplete",function(){
select.unbind();
_28d.unbind();
$(_289.form).unbind(".autocomplete");
});
function selectCurrent(){
var _2a9=select.selected();
if(!_2a9){
return false;
}
var v=_2a9.result;
previousValue=v;
if(_28a.multiple){
var _2ab=trimWords(_28d.val());
if(_2ab.length>1){
v=_2ab.slice(0,_2ab.length-1).join(_28a.multipleSeparator)+_28a.multipleSeparator+v;
}
v+=_28a.multipleSeparator;
}
_28d.val(v);
hideResultsNow();
return [_2a9.data,_2a9.value];
}
function onChange(arg1,_2ad){
if(lastKeyPressCode==KEY.DEL){
select.hide();
return;
}
var _2ae=_28d.val();
if(!_2ad&&_2ae==previousValue){
return;
}
previousValue=_2ae;
_2ae=lastWord(_2ae);
if(_2ae.length>=_28a.minChars){
_292.show();
if(!_28a.matchCase){
_2ae=_2ae.toLowerCase();
}
request(_2ae,receiveData,hideResultsNow);
}else{
stopLoading();
select.hide();
}
}
function trimWords(_2af){
if(!_2af){
return [""];
}
var _2b0=_2af.split(_28a.multipleSeparator);
var _2b1=[];
$.each(_2b0,function(i,_2b3){
if($.trim(_2b3)){
_2b1[i]=$.trim(_2b3);
}
});
return _2b1;
}
function lastWord(_2b4){
if(!_28a.multiple){
return _2b4;
}
var _2b5=trimWords(_2b4);
return _2b5[_2b5.length-1];
}
function autoFill(q,_2b7){
if(_28a.autoFill&&(lastWord(_28d.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){
_28d.val(_28d.val()+_2b7.substring(lastWord(previousValue).length));
_244(_289,previousValue.length,previousValue.length+_2b7.length);
}
}
function hideResults(){
clearTimeout(_29b);
_29b=setTimeout(hideResultsNow,200);
}
function hideResultsNow(){
var _2b8=select.visible();
select.hide();
clearTimeout(_29b);
stopLoading();
if(_28a.mustMatch){
_28d.trigger("search",[function(_2b9){
if(!_2b9){
if(_28a.multiple){
var _2ba=trimWords(_28d.val()).slice(0,-1);
_28d.val(_2ba.join(_28a.multipleSeparator)+(_2ba.length?_28a.multipleSeparator:""));
}else{
_28d.val("");
}
$(originalInput).val("");
}
}]);
}
if(_2b8){
_244(_289,_289.value.length,_289.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,_2be,_2bf){
if(!_28a.matchCase){
term=term.toLowerCase();
}
var data=cache.load(term);
if(data&&data.length){
_2be(term,data);
}else{
if((typeof _28a.url=="string")&&(_28a.url.length>0)){
var _2c1={ajaxTime:new Date()};
$.each(_28a.extraParams,function(key,_2c3){
_2c1[key]=typeof _2c3=="function"?_2c3():_2c3;
});
$.ajax({mode:"abort",port:"autocomplete"+_289.name,dataType:_28a.dataType,url:_28a.url,data:$.extend({query:lastWord(term),limit:_28a.max},_2c1),success:function(data){
var _2c5=_28a.parse&&_28a.parse(data)||parse(data);
cache.add(term,_2c5);
_2be(term,_2c5);
},error:function(_2c6,_2c7,_2c8){
if(typeof _28a.errorCallback=="function"){
_28a.failureCallback(_2c6,_2c7,_2c8);
}
}});
}else{
select.emptyList();
_2bf(term);
}
}
}
function parse(data){
var _2ca=[];
var rows=data.split("\n");
for(var i=0;i<rows.length;i++){
var row=$.trim(rows[i]);
if(row){
row=row.split("|");
_2ca[_2ca.length]={data:row,value:row[0],result:_28a.formatResult&&_28a.formatResult(row,row[0])||row[0]};
}
}
return _2ca;
}
function stopLoading(){
_292.hide();
}
return {boundInput:_28d};
};
var _2ce=function(evt){
var a=$("input.autocomplete, textarea.autocomplete, input.combobox",this);
if(a.length>0){
a.dr.autocomplete();
}
};
$("form").live("beforeIndexFields",_2ce);
$.dr.autocomplete={setDefaults:function(_2d1){
if(_2d1){
$.extend(_240,_2d1);
}
}};
$.namespace("dr",{autocomplete:function(_2d2,_2d3){
var _2d4=false,isUrl=(typeof _2d2=="string")?true:false;
if(!_2d3){
_2d3={};
}
if(arguments.length==0){
_2d4=true;
}
return this.each(function(){
var jObj=$(this);
if(!jObj.data("autocomplete_inited")){
var _2d6=_2d3;
if(_2d4){
isUrl=false;
_2d2=jObj.attr("data-source");
var _2d7=jObj.attr("data-url");
dataOptions=jObj.attr("data-options");
if(!_2d2){
if(!_2d7){
$.dr.utils.logError("("+this.id+") did not contain a data-url or data-source attribute");
return;
}else{
isUrl=true;
_2d2=_2d7;
}
}else{
_2d2=$.dr.utils.evalString(_2d2,"The referenced data-source for ("+this.id+") does not exist.");
if(typeof _2d2=="error"){
return;
}
}
if(dataOptions){
_2d6=$.dr.utils.evalString(dataOptions,"Error parsing autocomplete data-options for ("+this.id+")");
if(typeof _2d6=="error"){
return;
}
}
}
if(this.tagName.toLowerCase()=="textarea"){
if(typeof _2d6.multiple=="undefined"){
_2d6.multiple=true;
}
}
var _2d8=$.extend({},_240,{url:isUrl?_2d2:null,data:isUrl?null:_2d2,delay:isUrl?_240.delay:10},_2d6);
if(jObj.hasClass("combobox")){
_2d8.comboBox=true;
}
_2d8.highlight=_2d8.highlight||function(_2d9){
return _2d9;
};
_2d8.formatMatch=_2d8.formatMatch||_2d8.formatItem;
jObj.data("autocomplete_inited","true");
var ac=new _288(this,_2d8);
jObj.data("autocomplete",ac);
if(!_2d4){
$(this.form).dr.form.initFields(ac.boundInput);
}
}
});
}});
$.namespace("dr.autocomplete",{search:function(_2db){
return this.trigger("search",[_2db]);
},flushCache:function(){
return this.trigger("flushCache");
},setOptions:function(_2dc){
return this.trigger("setOptions",[_2dc]);
},destroy:function(){
return this.trigger("unautocomplete");
}});
})(jQuery);
(function($){
$.namespace("dr.button",{disable:function(_2de){
if(typeof $.dr.processingDialog=="object"){
$.dr.processingDialog.disable();
}
return this.each(function(){
var _2df=$(this);
if(this.tagName.toLowerCase()=="button"){
var text=(_2de)?_2de:(_2df.hasClass("search"))?$.dr.strings.SEARCHING:(_2df.hasClass("login"))?$.dr.strings.AUTHORIZING:$.dr.strings.PROCESSING;
_2df.html("<span><span><span>"+text+"</span></span></span>").addClass("processing");
this.disabled=true;
}
});
},text:function(_2e1,_2e2,_2e3,_2e4){
return this.each(function(){
if(this.tagName.toLowerCase()=="button"){
var _2e5=$(this);
if(_2e4){
_2e5.addClass("rightAlign");
}
_2e5.html("<span><span><span>"+_2e1+"</span></span></span>");
if(_2e3){
_2e5.removeClass(_2e2).addClass(_2e3);
}
}
});
}});
})(jQuery);
DR.Widgets.FauxTree=function(_2e6,guid,_2e8,_2e9,_2ea,_2eb){
this.childNodes=[];
this.parentNode=_2e6;
this.isExpanded=false;
if(_2ea!==undefined){
this.saveState=_2ea;
this.cookieName=_2eb;
}else{
this.saveState=false;
this.cookieName=null;
}
this.isDirectory=_2e8;
this.hasCheckbox=(_2e9===true)?true:false;
this.guid=guid;
this.obj=document.getElementById(this.guid);
var _2ec=guid.split(DR.Widgets.FauxTree.PATH_SEPARATOR);
this.level=_2ec.length;
this.shortId=_2ec[_2ec.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(_2f0){
DR.Widgets.FauxTree.INDENTED_COLUMN_POSITION=(_2f0)?_2f0: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,_2f2){
var _2f3=path.split(DR.Widgets.FauxTree.PATH_SEPARATOR);
var _2f4=true;
if(_2f3.length>1){
_2f4=true;
}else{
_2f4=(_2f2)?true:false;
}
var _2f5=_2f3.shift();
var guid=null;
if(this.guid===""){
guid=_2f5;
}else{
guid=this.guid+DR.Widgets.FauxTree.PATH_SEPARATOR+_2f5;
}
if(!this.childNodes[_2f5]){
this.childNodes[_2f5]=new DR.Widgets.FauxTree(this,guid,_2f4,this.hasCheckbox,this.saveState);
DR.Widgets.FauxTree.NODE_LOOKUP_TABLE[guid]=this.childNodes[_2f5];
}
if(_2f3.length>0){
this.childNodes[_2f5].addItem(_2f3.join(DR.Widgets.FauxTree.PATH_SEPARATOR),_2f2);
}
},findItem:function(path){
return DR.Widgets.FauxTree.NODE_LOOKUP_TABLE[path];
},toggleDirectory:function(_2f8){
var _2f9=document.getElementById(_2f8);
var _2fa=(_2f9.className.indexOf(DR.Widgets.FauxTree.EXPANDED_DIRECTORY_STYLE)!=-1)?true:false;
var _2fb=this.findItem(_2f8);
if(_2fb.isDirectory){
if(_2fa){
_2fb.collapse();
if(this.saveState){
this.stateCookie.removeArrayValue(_2fb.shortId);
}
}else{
_2fb.expand();
if(this.saveState){
this.stateCookie.addArrayValue(_2fb.shortId);
}
}
}
},findChild:function(){
var _2fc;
for(var i in this.childNodes){
_2fc=this.childNodes[i];
break;
}
return _2fc;
},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 _2ff=this.childNodes[i];
_2ff.expandAll();
}
}
}
},revertState:function(){
if(this.saveState){
var _300=this.getCookieArray();
if(this.isDirectory){
var _301=false;
if(_300.length>0){
var i=0;
while(!_301&&i<_300.length){
if(_300[i]==this.shortId){
_301=true;
this.expand();
}
i++;
}
}
if(_301){
for(var j in this.childNodes){
if(DR.Widgets.FauxTree.isNode(this.childNodes[j])){
var _304=this.childNodes[j];
_304.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 _305=this.getCookieArray();
var _306=false;
if(_305.length>0){
var i=0;
while(!_306&&i<_305.length){
if(_305[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 _309=this.childNodes[j];
_309.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 _30d=[];
var _30e=false;
var _30f={INPUT_FOCUS_CLASS:"inputFocus"};
var _310={WINDOW_ON_BEFORE_UNLOAD:"There have been changes made to the form that have not been saved."};
$.dr.form={getMessages:function(){
return _310;
},getDefaults:function(){
return _30f;
},setDefaults:function(_311){
if(_311){
$.extend(_30f,_311);
}
$(document).trigger("afterFormSetDefaults",[_311]);
},setMessages:function(_312){
if(_312){
$.extend(_310,_312);
}
$(document).trigger("afterFormSetMessages",[_312]);
}};
window.customFormIndexerCallBack=function(){
};
var _313=function(_314){
$("form",_314).dr.form();
customFormIndexerCallBack();
customFormIndexerCallBack=function(){
};
};
var _315=function(_316){
var _317=(parent.overlayStack)?parent.overlayStack.getCurrent():null;
var _318=(typeof _317!=="undefined"&&typeof _317!==null)?_317.loading:false;
if(_318){
var func=function(){
_315(_316);
};
window.setTimeout(func,50);
}else{
_313(_316);
}
};
var _31a=function(evt,_31c){
$.dr.form.setDefaults({});
$.dr.form.setMessages({});
$(document).trigger("beforeInitForms");
if($.browser.msie&&$("body.modalPage").length>0){
_315(_31c);
}else{
_313(_31c);
}
};
$.dr.addUnobtrusiveEvent(_31a);
var _31d=function(evt){
if(!this.getAttribute("readonly")&&!this.disabled&&this.type!="file"){
if(!(this.type=="select-one"&&DR.Utils.BrowserDetect.version>6)){
$(this).addClass(_30f.INPUT_FOCUS_CLASS);
}
}
};
var _31f=function(evt){
var _321=this;
var func=function(){
if(!_321.getAttribute("readonly")&&!_321.disabled&&_321.type!="file"){
$(_321).removeClass(_30f.INPUT_FOCUS_CLASS);
}
};
window.setTimeout(func,50);
};
$.dr.utils.getSelectOptionValue=function(_323){
if(_323){
if(_323.text!==""&&_323.outerHTML&&_323.outerHTML.toLowerCase().indexOf("value=")==-1){
return _323.text;
}else{
return _323.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 _326=$(obj).val();
_326=(_326===null)?"":_326.join(",");
if($(obj).dr.form.field.getDefaultValue()!=_326){
return true;
}
}else{
if($(obj).dr.form.field.getDefaultValue()!=$(obj).val()){
return true;
}
}
}
}
return false;
};
$.dr.utils.getLabel=function(obj){
var _328;
if($(obj).data("label")===undefined){
var _329=$(obj.form).data("labels");
if(_329===undefined){
_329=$("label",obj.form);
$(obj.form).data("labels",_329);
}
var _32a=_329.filter("[for="+obj.id+"]");
_328=(_32a.length)?_32a.text().replace(":",""):obj.name;
$(obj).data("label",_328);
}
return _328;
};
var _32b=function(_32c){
var _32d=_32c.onsubmit;
_32c.onsubmit=function(){
var _32e=true;
if(typeof _32d=="function"){
var test=_32d();
_32e=(typeof test=="undefined"||test)?true:false;
}
var _330=$(_32c).data("behavior");
var _331=(_32e&&$(_32c).dr.form.validate())?true:false;
if(_330&&_330.checkChanges&&_331){
$(_32c).dr.form.enableCheckChanges(false);
}
$(_32c).trigger("dr-aftervalidation",_331);
return _331;
};
var _332=_32c.onsubmit;
_32c._nativeFormSubmit=_32c.submit;
_32c.submit=function(){
if(_332()){
if($.browser.msie){
_32c._nativeFormSubmit();
}else{
_32c.submit=_32c._nativeFormSubmit;
if(_32c.submit!==undefined){
_32c.submit();
}
}
}
};
};
var _333=function(_334,_335){
this.formObj=_334;
this.options=_335;
this.init();
};
_333.prototype={init:function(){
this.firstField=null;
this.normalizeName();
this.bindBehavior();
},normalizeName:function(){
var _336=this.formObj;
var _337="name";
var n=_336.attributes[_337];
var f="form_"+new Date().getTime();
if(n){
if(!($.browser.msie&&n.value==="")){
f=n.value;
}
}
_336.setAttribute("name",f);
_336._formName=f;
this.formIndex=_30d.length;
_30d.push(_336);
},bindBehavior:function(){
var _33a=this.formObj;
var _33b=$(this.formObj);
var _33c=(_33b.attr("data-behavior")=="standard")?true:false;
var _33d=(_33b.attr("data-behavior")=="search")?true:false;
var _33e=(_33b.attr("data-enable-field-events")=="false")?false:true;
var _33f=(_33b.attr("data-check-changes")=="false")?false:true;
var _340=(_33b.attr("data-auto-focus")=="false")?false:true;
var _341=(_33b.attr("data-force-check-changes")=="true")?true:false;
this.checkChanges=(_33c&&(_33f||_341))?true:false;
this.autoFocus=((_33c||_33d)&&_340)?true:false;
this.enableFieldEvents=((_33c||_33d)&&_33e)?true:false;
this.forceCheckChanges=_341;
this.customFieldSelector=_33b.attr("data-custom-field-selector");
if(_33c||_33d){
var _342=($.browser.msie)?$(":input",this.formObj):$(this.formObj.elements);
this.initFields(_342);
if(_33f||_341){
this.addUnloadEvent();
}
if(this.autoFocus){
this.focusFirstElement();
}
_32b(_33a);
}
},initFields:function(_343,_344){
if(this.formObj.getAttribute("_inited")===null||_344){
var _345=this;
if(typeof this.customFieldSelector!=="undefined"){
_343=_343.filter(this.customFieldSelector);
}
var _346=_343.length;
var _347=$.dr.getPlugins("form");
for(var i=0;i<_347.length;i++){
_347[i].call(this,_343);
}
_343.filter("input[type=text],input[type=password],select,textarea").focus(_31d).blur(_31f).end();
if(this.autoFocus&&this.firstField===null&&!_30e&&$(this.formObj).filter(":visible").length>0){
_343.filter("input[type=text],input[type=password],select,textarea").filter(":visible").filter(":first").each(function(i){
_345.firstField=this;
_30e=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 _34b=function(){
var _34c=false;
for(var i=0;i<_30d.length;i++){
var _34e=_30d[i];
var _34f=$(_34e).data("behavior");
if(_34f){
if(_34f.checkChanges&&!_34f.forceCheckChanges){
if($(_34e).dr.form.checkForChanges()){
_34c=true;
break;
}
}
}
}
if(_34c){
if($.browser.msie){
window.onerror=function(err){
window.event.returnValue=(err.toLowerCase().indexOf("unspecified error")>=0)?true:false;
};
}
var m=_310.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=_34b;
}
}};
$.namespace("dr",{form:function(_352){
try{
if($.browser.msie){
$("fieldset:not(.noBackground)",this).filter(function(){
return ($("> legend",this).length==0);
}).addClass("noBackground");
}
_352=(typeof _352=="object")?$.extend(true,_30f,_352):_30f;
var _353=this.each(function(){
var _354=$(this);
var opts=$.extend(true,{},_352);
var _356=_354.attr("data-options");
if(_356){
_356=$.dr.utils.evalString(_356);
$.extend(true,opts,_356);
}
_354.data("dataOptions",opts);
if(_354.attr("data-behavior")=="standard"||_354.attr("data-behavior")=="search"){
if(this.tagName.toLowerCase()=="form"){
_354.trigger("beforeIndexFields");
_354.data("behavior",new _333(this,opts));
_354.trigger("afterIndexFields");
}
}
});
_30e=false;
return _353;
}
catch(e){
$.dr.utils.logError("Error when binding form behavior",e);
}
}});
function getFormObj(_357){
if(_357.length>0){
var f=$(_357[0]).data("behavior");
return (f)?f:{};
}
}
$.namespace("dr.form",{get:function(){
return getFormObj(this);
},setOptions:function(_359){
if(_359){
$.extend(getFormObj(this).options,_359);
}
$(document).trigger("afterFormSetOptions",[_359]);
},getChangedFields:function(){
var _35a=this[0];
return $(":input",_35a).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 _35d=getFormObj(this);
if(typeof _35d.fieldsWithValidation!=="undefined"){
_35d.fieldsWithValidation=[];
}
_35d.initFields(($.browser.msie)?$(":input",_35d):$(_35d.elements));
},initFields:function(_35e,_35f){
var _360=getFormObj(this);
_35f=(_35f===false)?false:true;
_360.initFields(_35e,_35f);
},checkForChanges:function(){
var _361=$(this).dr.form.getChangedFields();
return (_361.length>0)?true:false;
},displayChangedFields:function(){
return this.each(function(){
var _362=$(this).dr.form.getChangedFields();
console.log("Changed Fields for "+this._formName);
if(_362.length>0){
for(var i=0;i<_362.length;i++){
var _364=_362[i];
console.log("ID: <b>"+_364.id+"</b>");
console.log("     VALUE:"+$(_364).dr.form.field.getDefaultValue());
console.log("     NEW_VALUE:"+$(_364).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 _367=[];
var _368=elem.options;
for(var i=0;i<_368.length;i++){
if(_368[i].defaultSelected){
var val=$.dr.utils.getSelectOptionValue(_368[i]);
if(type=="select-one"){
return val;
}else{
_367.push(val);
}
}
}
if(type=="select-one"&&_367.length===0){
return $.dr.utils.getSelectOptionValue(_368[0]);
}
return (_367.length>0)?_367.join(","):"";
}else{
return elem.defaultValue.replace(/\r/g,"");
}
}
}
}});
})(jQuery);
(function($){
var _36c={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 _36d={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 _36e="TD.actionCol input[type=checkbox], TD.actionCol input[type=radio]";
var _36f=function(_370,_371){
var form=$("input:first",_370.container).parents("form");
if(form.length>0){
form=form[0];
var _373=$("input.listAction",form);
if(_373.length==1){
_373.val(_371);
form.submit();
}
}
};
var list=function(_375){
this.containerId=_375;
this.searchPanel=null;
this.container=(typeof _375=="string")?$("#"+_375):_375;
this.actionRowTop=$("DIV.actionRow",this.container);
this.actionRowBottom=$("DIV.actionRowBottom",this.container);
this.submitType=_36c.SUBMIT_TYPE;
this.hasRadios=false;
this.clientSideSortingEnabled=_36c.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 _377=this;
if(init){
this.items=$(_36e,this.container).click(function(){
_377.toggle(this);
}).addClass("initalized");
}else{
$("TD.actionCol input[type=checkbox]:not(.initalized), TD.actionCol input[type=radio]:not(.initalized)",this.container).click(function(){
_377.toggle(this);
}).addClass("initalized");
this.items=$(_36e,this.container);
}
this.hasRadios=(this.items.filter(":radio:first").length>0)?true:false;
},initTabs:function(){
var _378=$(".listTabsContent",this.container);
var _379=$(".listTabs",this.container);
var _37a=this;
$(".search",_379).click(function(){
_37a.toggleTab("search");
return false;
});
$(".columns",_379).click(function(){
_37a.toggleTab("columns");
return false;
});
this.listTabsContent=_378;
this.listTabs=_379;
if($(".searchExpanded",this.container).val()=="true"&&!$(".listTabsContent",this.container).is(":visible")){
$(".search",_379).removeClass("selected");
_37a.toggleTab("search");
}
$("button.search",_378).removeAttr("disabled");
},toggleTab:function(id){
var _37c=this.listTabsContent;
var _37d=this.listTabs;
var _37e=$(".search",_37d);
var _37f=$(".columns",_37d);
var _380=(_37e.hasClass("selected"))?"search":(_37f.hasClass("selected"))?"columns":null;
$("div",_37d).removeClass("selected");
var _381=$(".searchExpanded",this.container);
if(_380==id){
_37c.hide();
_381.val("false");
}else{
_37c.show();
$("."+id,_37d).addClass("selected");
$("."+id,_37c).show();
_380=(id=="search")?"columns":"search";
if(id=="search"){
_381.val("true");
}else{
_381.val("false");
}
$("."+_380,_37c).hide();
var _382=$("."+id+" :input",_37c).filter("input[type=text], textarea, select");
if(_382.length>0){
try{
_382[0].focus();
}
catch(e){
}
}
}
_36c.SEARCH_PERSIST_CALLBACK(this.container,(_37e.hasClass("selected"))?"true":"false");
},initSelectAll:function(){
var _383=this;
var th=$("thead th.actionCol:first",this.container);
if(th.length>0){
th.html("<input title=\""+_36d.SELECT_ALL+"\" type=\"checkbox\" class=\"selectAll\" />");
this.selectAllCheckbox=$("INPUT.selectAll",this.container).click(function(){
_383.toggleSelectAll();
}).get(0);
if(this.hasRadios||this.items.length===0){
$(this.selectAllCheckbox).hide().insertAfter("<span>&nbsp;</span>");
}
}
},initButtons:function(){
var _385=(this.actionRowTop)?this.actionRowTop:this.actionRowBottom;
var _386=this;
if(_385){
var _387=$("BUTTON.single,BUTTON.multiple",this.actionRowBottom);
var _388=$("BUTTON.single,BUTTON.multiple",_385).each(function(i){
var btn=$(this);
var _38b="_single";
var _38c=btn.hasClass("single");
var _38d=btn.hasClass("multiple");
if(_38c||_38d){
_386.buttonsTop[_386.buttonsTop.length]={buttonObj:this,name:this.name,isSingle:_38c,isMultiple:_38d};
if(_387.length>0){
_386.buttonsBottom[_386.buttonsBottom.length]={buttonObj:_387[i],name:_387[i].name,isSingle:_38c,isMultiple:_38d};
}
}
});
}
$("UL.buttons BUTTON[name]",this.container).not("[onclick]").click(function(){
var _38e=$(this);
var name=_38e.attr("name");
var _390=$(this).attr("data-confirm-action");
if(_390){
var func=function(ok){
if(ok){
_386.submitActionButton(_38e[0],name);
}
};
$.dr.confirm(_390,func);
}else{
_386.submitActionButton(this,name);
}
});
},submitActionButton:function(btn,_394){
btn=(typeof btn=="String")?document.getElementById(btn):btn;
_394=(_394)?_394:btn.name;
_36f(this,_394);
},initSortableColumns:function(){
var _395=$("TABLE.clientSideSort:first",this.container);
var _396=$("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",_36d.SORT_BY.replace("{0}",$(this).text()));
});
$("TABLE THEAD TH",this.container).filter(function(){
return $("a",this).length>0;
}).addClass("sortable");
if(_395.length>0||(this.totalPages==1&&this.clientSideSortingEnabled)){
if(typeof $.fn.tablesorter=="function"){
if(_395.length==0){
_395=$("TABLE.dataTable",this.container);
}
var _398=0;
var _399=0;
var _39a=($("TABLE THEAD TH.actionCol",this.container).length>0)?1:0;
$("TABLE THEAD TH",this.container).not("TH.actionCol").each(function(_39b){
var td=$(this);
if(td.hasClass("ascending")){
_398=_39b+_39a;
}else{
if(td.hasClass("descending")){
_398=_39b+_39a;
_399=1;
}
}
});
var _39d={sortList:[[_398,_399]]};
if(_39a){
_39d.headers={0:{sorter:false}};
}
_395.tablesorter(_39d);
}
}else{
var _39e=this;
_396.click(function(){
var _39f=$(this).attr("data-sort-column");
_39e.changeSortColumn(this,_39f);
return false;
});
}
},initSelectionCounter:function(){
this.persistedSelections=$(".persistedSelections",this.container);
var _3a0=$(".itemCount",this.container);
this.allSelected=false;
if(this.persistedSelections.length>0&&_3a0.length){
this.submitType="post";
var val=this.persistedSelections.val();
if(val=="all"){
this.allSelected=true;
this.persistedSelectionCount=this.totalItems-this.items.length;
}else{
var _3a2=val.replace(/,\s/g,",");
var _3a3=","+_3a2+",";
this.items.each(function(){
var _3a4=new RegExp(","+this.value+",");
if(_3a4.test(_3a3)){
_3a3=_3a3.replace(_3a4,",");
}
});
var _3a5="";
var _3a6=_3a3.length;
if(_3a6>2){
_3a5=_3a3.substring(1,_3a3.length-1);
}
$(".persistedSelections",_3a0).val(_3a5);
this.persistedSelectionCount=(_3a5.length==0)?0:_3a5.split(",").length;
}
var _3a7=$(".itemType",_3a0);
this.itemType=(_3a7.length>0)?_3a7.val():_36d.ITEMS;
this.viewingOnlySelections=($(".viewingOnlySelections",_3a0).val()=="true")?true:false;
var _3a8=$(".itemTypeSingular",_3a0);
this.itemTypeSingular=(_3a8.length>0)?_3a8.val():_36d.ITEM;
var _3a9=$(".allSelectedMessage",_3a0).val();
if(!_3a9){
_3a9=_36d.ALL_ITEMS_SELECTED.replace("{0}",this.itemType);
}
var _3aa=$(".viewingOnlySelectionsMessage",_3a0).val();
if(!_3aa){
_3aa=_36d.VIEW_ALL_MSG.replace("{0}",this.itemType);
}
var _3ab=$(".viewingOnlySelectionsLink",_3a0).val();
if(!_3ab){
_3ab=_36d.VIEW_ALL_LINK;
}
var _3ac=_36d.SELECT_ALL_ITEMS.replace("{0}","<strong>"+this.totalItems+"</strong>").replace("{1}",this.itemType);
var _3ad=_36d.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\">"+_3ac+"</span></div>");
s.push("<div class=\"selected\" style=\"display:none\"><span class=\"msg\">"+_3a9+"</span></div>");
s.push("</td>");
if(this.viewingOnlySelections){
s.push("<td><div class=\"selectedFilter\" ><span class=\"msg\">"+_3aa+" &nbsp;  | &nbsp; <span class=\"msgLink\">"+_3ab+"</span></span></div></td>");
}else{
s.push("<td class=\"view\"><span class=\"link\">"+_36d.VIEW_SELECTIONS+"</span></td>");
}
s.push("<td class=\"clear\"><span class=\"link\">"+_36d.CLEAR_SELECTIONS+"</span></td>");
s.push("</tr></table>");
_3a0.append(s.join(""));
this.itemLabel=$(".itemLabel",_3a0);
if(this.persistedSelectionCount>0){
$(".clear, .view",_3a0).show();
}else{
$(".clear, .view",_3a0).hide();
}
this.refreshSelectionCount();
var _3af=this;
$(".selectAll .link",_3a0).click(function(){
var _3b0=_36c.SELECT_ALL_RESULTS;
if(_3af.totalPages==1){
_3b0=_3af.persistedSelections;
}
$(".persistedSelections",_3a0).val(_3b0);
$(".clear, .selected",_3a0).show();
$(".selectAll, .view",_3a0).hide();
$(".count",_3a0).text(_3af.totalItems);
});
$(".clear .link",_3a0).click(function(){
_3af.selectAllCheckbox.checked=false;
_3af.toggleSelectAll();
_3af.persistedSelectionCount=0;
$(".persistedSelections",_3a0).val("");
$(".count",_3a0).text(0);
$("div, .selected, .clear, .view, .selectAll",_3a0).hide();
if(_3af.viewingOnlySelections){
_36f(_3af,"viewAll");
}
});
if(this.allSelected){
$(".selected",_3a0).show();
}
$(".view .link",_3a0).click(function(){
_36f(_3af,"viewSelections");
});
$(".msgLink",_3a0).click(function(){
_36f(_3af,"viewAll");
});
}
},refreshSelectionCount:function(){
var _3b1=this.persistedSelectionCount+this.selectedItems.length;
$(".itemCount .count",this.container).text(_3b1);
if(this.itemLabel){
var _3b2=this.itemType;
if(_3b1==1){
_3b2=this.itemTypeSingular;
}
this.itemLabel.text(_3b2+" "+_36d.SELECTED);
}
var view=$(".itemCount .view",this.container);
if(_3b1==0||$(".persistedSelections",this.container).val()==_36c.SELECT_ALL_RESULTS){
view.hide();
}else{
view.show();
}
},toggleSelectAllMsg:function(_3b4){
if(_36c.SELECT_ALL_ACROSS_PAGES_ENABLED){
var _3b5=$(".itemCount",this.container);
if(_3b4){
if(!this.viewingOnlySelections){
$(".selectAll").show();
$(".selected",_3b5).hide();
}
}else{
if(this.allSelected){
this.persistedSelectionCount==0;
this.allSelected=false;
$(".count",_3b5).text(0);
}
if(this.persistedSelectionCount==0){
$(".clear",_3b5).hide();
}
$("div:not(.selectedFilter)",_3b5).hide();
if($(".persistedSelections",this.container).val()==_36c.SELECT_ALL_RESULTS){
$(".persistedSelections",this.container).val("");
this.persistedSelectionCount=0;
}
}
}
},refreshState:function(init){
this.disabledBtnArray=[];
this.disabledButtons=[];
this.disabledButtonNameArray=[];
var _3b7=this;
this.selectedItems=this.items.filter(":checked").each(function(){
if(typeof this.onclick=="function"){
this.onclick();
}
_3b7.updateDisabledButtons(this,true,false);
if(init){
_3b7.highlightRow(this);
}
});
this.refreshButtonState();
this.refreshSelectAllState(false);
},updateDisabledButtons:function(item,add,_3ba){
var _3bb=item.getAttribute("data-disabled-buttons");
if(_3bb!==undefined&&_3bb!==null){
var _3bb=_3bb.trim().split(" ");
for(var i=0;i<_3bb.length;i++){
var _3bd=_3bb[i];
var _3be=0;
var _3bf=this.disabledButtons[_3bd];
if(_3bf!==undefined){
if(_3ba&&!add){
_3be=_3bf-1;
}else{
_3be=_3bf+1;
}
}else{
if(add){
_3be=1;
}
}
this.disabledButtons[_3bd]=_3be;
}
}
},refreshButtonState:function(){
for(var j=0;j<this.buttonsTop.length;j++){
var btn=this.buttonsTop[j];
var _3c2=(this.selectedItems.length==0)?true:false;
if(this.disabledButtons[btn.name]!==undefined){
if(this.disabledButtons[btn.name]>0){
_3c2=true;
}
}
if(!_3c2){
if(this.selectedItems.length>=2&&btn.isSingle){
_3c2=true;
}
}
btn.buttonObj.disabled=_3c2;
if(this.buttonsBottom.length>0){
this.buttonsBottom[j].buttonObj.disabled=_3c2;
}
}
},refreshSelectAllState:function(_3c3){
if(this.selectAllCheckbox){
if(!this.selectAllCheckbox.disabled){
this.selectAllCheckbox.checked=(this.selectedItems.length==this.items.length)?true:false;
}
}
if(!_3c3){
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 _3c5=this.items;
var _3c6=(this.selectAllCheckbox&&this.selectAllCheckbox.checked)?true:false;
this.items.attr("checked",_3c6);
this.tableRows=$("TABLE.dataTable > TBODY > TR:not(.unselectable)",this.container);
if(_3c6){
this.tableRows.addClass("selected");
}else{
this.tableRows.removeClass("selected");
}
this.refreshState();
this.toggleSelectAllMsg(_3c6);
},highlightRow:function(obj){
var _3c8=(obj.checked)?true:false;
var row=obj.parentNode.parentNode;
if(_3c8){
$(row).addClass("selected");
}else{
$(row).removeClass("selected");
}
},changeSortColumn:function(obj,_3cb){
var _3cc="ascending";
var _3cd=$(obj).attr("data-default-sort-direction");
if(_3cd){
if(_3cd.indexOf("desc")>-1||_3cd.indexOf("descending")>-1){
_3cc="descending";
}
}
var _3ce=_3cc;
if($(obj.parentNode).hasClass("ascending")||$(obj.parentNode).hasClass("descending")){
var _3cf=$(obj.parentNode).hasClass("descending")?"descending":"ascending";
_3ce=(_3cf=="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(_3cb);
this.sortDirection.val(_3ce);
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 _3d0=this;
$("A",this.controls).click(function(){
_3d0.handlePagerClick(this);
return false;
});
this.pageInputs=$("INPUT.currentPage",this.controls);
this.pageInputs.val(this.originalPageValue);
this.pageInputs.keypress(function(evt){
_3d0.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 _3d3=this.totalPages;
var _3d4=this.currentPage;
$(".totalPages",this.controls).text(_3d3);
var _3d5=false;
if(_3d3==1){
_3d5=true;
$("A",this.controls).addClass("off");
}else{
if(_3d4==1){
$("A.first, A.prev",this.controls).addClass("off");
$("A.next, A.last",this.controls).removeClass("off");
}else{
if(this.currentPage==_3d3){
$("A.first, A.prev",this.controls).removeClass("off");
$("A.next, A.last",this.controls).addClass("off");
}else{
$("A",this.controls).removeClass("off");
}
}
}
if(_3d5){
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 _3d9=el.value;
if(isNaN(_3d9)||_3d9<0){
alert(_36d.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(_3d9>this.totalPages){
_3d9=this.totalPages;
}else{
if(parseInt(_3d9,10)===0){
_3d9=1;
}
}
this.changePage(_3d9,true,evt);
}
}
},changePage:function(_3da,_3db,evt){
this.currentPage=_3da;
if(_36c.PAGES_START_AT_ZERO){
_3da--;
}
if(typeof _36c.PAGING_OVERRIDE=="function"){
_36c.PAGING_OVERRIDE(this.container,_3da);
}else{
if(this.submitType.toLowerCase()=="post"){
var _3dd=$(".currentPage",this.container);
_3dd.val(_3da);
_3dd[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="+_3da;
window.location=url;
}
}
if(_3db){
if(evt.preventDefault){
evt.preventDefault();
}else{
if(window.event){
window.event.cancelBubble=true;
window.event.returnValue=false;
}
}
return false;
}
}};
$.dr.list={getMessages:function(){
return _36d;
},getDefaults:function(){
return _36c;
},setDefaults:function(_3df){
if(_3df){
$.extend(_36c,_3df);
}
$(document).trigger("afterListSetDefaults",[_3df]);
},setMessages:function(_3e0){
if(_3e0){
$.extend(_36d,_3e0);
}
$(document).trigger("afterListSetMessages",[_3e0]);
}};
var _3e1=function(evt,_3e3){
var _3e4=$("DIV.listControl",_3e3).each(function(_3e5){
var _3e6=$("TABLE.dataTable",this);
if(_3e6.length>0||$("div.listTabs",this).length>0){
var id=this.getAttribute("id");
if(!id){
id="list_"+_3e5+"_"+new Date().getTime();
this.id=id;
}
$(this).data("list",new list(id));
}
});
};
$.dr.addUnobtrusiveEvent(_3e1);
$.namespace("dr",{list:function(){
return this.each(function(){
var _3e8=this;
if(this.tagName!="body"){
_3e8=this.parentNode;
}
_3e1(null,_3e8);
});
}});
$.namespace("dr.list",{refreshState:function(){
return this.each(function(){
var _3e9=$(this).data("list");
if(_3e9){
_3e9.refreshItemCount();
_3e9.resetPagerState();
_3e9.initCheckboxes(false);
_3e9.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 _3ef=$("div.content:first")||$("body");
_3ef.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,_3f3){
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(_3f3!==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 _3f6=this.items;
for(var i=0;i<_3f6.length;i++){
h+="<tr><td>"+(i+1)+"</td><td>"+_3f6[i]+"</td></tr>";
}
h+="</tbody></table>";
this.overlayContent.innerHTML=h;
this.refreshScroll();
var _3f8=this;
var func=function(){
_3f8.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(_3fb){
DR_Utils_Logger.log(_3fb);
}
(function($){
$.namespace("dr",{message:function(type){
return this.each(function(){
var _3fe=$(this);
var _3ff="messageDialog";
var _400=type;
_3fe.wrap("<div class=\""+_3ff+"\" ><div class=\"messageDialogContent\"></div></div>").removeAttr("style").addClass(_400).parent().dr.shadows().prepend("<a class=\"close\" href=\"#\">Close</a>");
$("."+_3ff).css({"top":"-"+$("."+_3ff).height()+"px","left":($(window).width()/2)-($("."+_3ff).width()/2)+"px"}).animate({top:0},1000);
$("a.close").click(function(){
$("."+_3ff).animate({top:"-"+$("."+_3ff).height()+"px"},500);
return false;
});
$(window).resize(function(){
$("."+_3ff).animate({"left":($(window).width()/2)-($("."+_3ff).width()/2)+"px"});
});
});
}});
})(jQuery);
DR.Widgets.ModelessOverlay=function(id,url,_403){
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=(_403)?_403: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 _405=function(){
overlayStack.buildIframe();
};
window.setTimeout(_405,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 _406=new DR.Utils.Position(this.dialog);
this.dialog.style.position="absolute";
_406.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(_407){
if(!this.anchorId){
var w=this.width;
var h=this.height;
overlayStack.getPageSize();
var x,y;
var _40b=0;
var _40c=0;
var _40d=0;
var _40e=(DR.Utils.BrowserDetect.browser=="Explorer"&&DR.Utils.BrowserDetect.version<7)?true:false;
if(document.documentElement){
if(_40e){
if($("body.modalPage").length==0&&!_407){
_40b=18;
_40c=1;
_40d=9;
}
x=document.documentElement.scrollLeft+document.body.scrollLeft;
y=document.documentElement.scrollTop+document.body.scrollTop;
}
}
if(this.autoCenter||(!this.autoCenter&&!_407)){
if(_40e){
this.dialog.style.left=(x+(overlayStack.doc.windowWidth/2)-((w-_40b)/2+_40c))+"px";
this.dialog.style.top=(y+(overlayStack.doc.windowHeight/2)-((h-_40b)/2+_40d))+"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,_41b){
if(typeof this.callBackFunction=="function"){
this.callBackFunction(arg1,arg2,arg3,arg3,arg4,arg5,arg6,arg7,arg8,arg9,_41b);
}
},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 _422=document.getElementsByTagName("BODY")[0];
var _423=document.createElement("div");
_423.id="modal_"+this.id;
_423.className="modalOverlay";
var _424=this;
var ie6=false;
var _426=" colspan=\"2\"  rowspan=\"2\"";
if(DR.Utils.BrowserDetect.browser=="Explorer"&&DR.Utils.BrowserDetect.version<7){
ie6=true;
_426="";
this.shadowRight=8;
this.shadowBottom=8;
}
var s=[];
var _428="";
if(this.optionalClassName!=null){
_428="class=\""+this.optionalClassName+"\"";
}
var _429="";
if(this.disabled){
_429="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\" "+_428+" >";
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 "+_426+" 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\" "+_429+" 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);
_423.innerHTML=s;
if(this.inline){
var _42a=document.getElementById(this.inlineId);
_42a.style.display="block";
dParent=_42a.parentNode;
this.dialog=dParent.insertBefore(_423,_42a);
var _42b=document.createElement("div");
_42b.className="inlineDialog";
getElem(this.id+"_inner").appendChild(_42b);
this.dialogClone=_42b;
_42b.appendChild(_42a);
}else{
this.dialog=_422.appendChild(_423);
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(){
_424.cancel();
return false;
};
function myDialogInitDrag(_42c){
_424.initDrag(_42c);
}
if(this.enableDragging){
getElem(this.id+"_titleTbl").onmousedown=myDialogInitDrag;
}
overlayStack.addWindowEventHandlers();
function eventMyDialogFocus(_42d){
_424.focus();
}
_423.onclick=eventMyDialogFocus;
s=null;
function cleanupIE_Events(){
_423.detachEvent("onclick",eventMyDialogFocus);
overlayStack.destroyAll();
window.detachEvent("onunload",cleanupIE_Events);
}
if(this.browserType=="IE"){
window.attachEvent("onunload",cleanupIE_Events);
}else{
_423=null;
}
this.built=true;
},buildIframe:function(){
this.iframeCountID=overlayStack.getNewIframeID();
var _42e=document.createElement("IFRAME");
_42e.id="modal_iframe_"+this.iframeCountID;
_42e.name="modal_iframe_"+this.iframeCountID;
_42e.frameBorder=0;
if(this.iframeTransparency){
_42e.allowTransparency=true;
}
var self=this;
function myDialogHideLoading(){
self.hideLoading();
}
function myDialogFocus(){
self.focus();
}
if(document.attachEvent){
_42e.attachEvent("onload",myDialogHideLoading);
}else{
_42e.addEventListener("load",myDialogHideLoading,false);
}
if(this.url.indexOf("modalTime")==-1){
var _430=new Date().getTime();
if(this.url.indexOf("?")==-1){
this.url+="?modalTime="+_430;
}else{
this.url+="&modalTime="+_430;
}
}
_42e.src=this.url;
_42e.style.display="none";
this.iframeWrapper.appendChild(_42e);
this.iframe=_42e;
function cleanupIE_Events(){
if(_42e){
_42e.detachEvent("onload",myDialogHideLoading);
_42e.detachEvent("onfocus",myDialogFocus);
}
window.detachEvent("onunload",cleanupIE_Events);
}
if(this.browserType=="IE"){
window.attachEvent("onunload",cleanupIE_Events);
}else{
_42e=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(_437){
if(_437.length>0){
this.anchorId=_437;
}
},setDragNDrop:function(v){
this.enableDragging=v;
},setAutoCenter:function(v){
this.autoCenter=v;
},setTitle:function(_43a){
if(_43a!==""){
this.title=_43a;
if(this.windowIcon){
this.windowIcon.innerHTML=_43a;
}
}
},setDisabled:function(flag){
this.disabled=flag;
},disable:function(){
this.disabled=true;
this.closeLink.style.visibility="hidden";
},initDrag:function(_43c){
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(_43c);
},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,_440){
if(obj.addEventListener){
obj.addEventListener(evt,fn,Boolean(_440));
return true;
}else{
if(obj.attachEvent){
var r=obj.attachEvent("on"+evt,fn);
return r;
}else{
return false;
}
}
},removeEvent:function(obj,evt,fn,_445){
if(obj.addEventListener){
obj.removeEventListener(evt,fn,Boolean(_445));
return true;
}else{
if(obj.attachEvent){
var r=obj.detachEvent("on"+evt,fn);
return r;
}else{
return false;
}
}
}};
DR.Widgets.ModelessOverlay.open=function(url,_448,_449,_44a){
var _44b=new Date().getTime();
var m=new DR.Widgets.ModelessOverlay("modal_"+_44b,url);
var t=_44a;
if(!_44a){
t="&nbsp;";
}
m.setTitle(t);
m.setSize(_448,_449);
m.show();
return m;
};
DR.Widgets.ModelessOverlay.close=function(){
parent.overlayStack.closeCurrent();
};
DR.Widgets.ModalOverlay=function(id,url,_450){
this.id=id;
this.url=url;
this.optionalClassName=(_450)?_450: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,_452,_453,_454){
var _455=new Date().getTime();
var m=new DR.Widgets.ModalOverlay("modal_"+_455,url);
var t=_454;
if(!_454){
t="&nbsp;";
}
m.setTitle(t);
m.setSize(_452,_453);
m.show();
return m;
};
DR.Widgets.ModalOverlay.close=function(){
parent.overlayStack.closeCurrent();
};
DR.Widgets.InlineModalOverlay=function(id,_459){
this.id=id;
this.inlineId=id;
this.optionalClassName=(_459)?_459: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,_45b){
this.id=id;
this.inlineId=id;
this.optionalClassName=(_45b)?_45b: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 _45e={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(_45f){
_45f=$.extend({},_45e,_45f);
var m,id=_45f.id,url=_45f.url,type=_45f.type,inline=_45f.inline,optionalClassName=_45f.optionalClassName;
if(inline){
var d=$("#"+id).data("overlay");
if(d){
d.show();
return;
}
}else{
if(url.length===0){
return;
}
}
var _462=DR.Widgets;
if(!id){
id="modal_"+new Date().getTime();
}
if(!inline&&type=="modal"){
m=new _462.ModalOverlay(id,url,optionalClassName);
}else{
if(!inline&&type=="modeless"){
m=new _462.ModelessOverlay(id,url,optionalClassName);
}else{
if(type=="modal"){
m=new _462.InlineModalOverlay(id,optionalClassName);
}else{
if(type=="modeless"){
m=new _462.InlineModelessOverlay(id,optionalClassName);
}
}
}
}
m.setTitle(_45f.title);
m.setSize(_45f.width,_45f.height);
if(!_45f.draggable){
m.setDragNDrop(false);
}
if(!_45f.centered){
m.setAutoCenter(false);
}
if(_45f.anchorId){
m.setAutoCenter(false);
m.setAnchorId(_45f.anchorId);
}
if(typeof _45f.cancelFunction=="function"){
m.cancelFunction=_45f.cancelFunction;
}
if(typeof _45f.callBackFunction=="function"){
m.callBackFunction=_45f.callBackFunction;
}
if(typeof _45f.abortFunction=="function"){
m.abortFunction=_45f.abortFunction;
}
if(!_45f.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(_463){
return this.each(function(){
var opts=$.extend({},_463,{inline:true,id:this.id});
$.dr.overlay(opts);
});
}});
var _465=function(obj){
return $(obj).data("overlay");
};
$.namespace("dr.overlay",{setTitle:function(_467){
return this.each(function(){
var m=_465(this);
if(m){
m.setTitle(_467);
}
});
}});
})(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,_46b){
this.setCurrentHasModalChildren(true);
var m=new DR.Widgets.ModalOverlay(obj.id,obj.url);
m.parentId=this.currentWindow;
m.parentWindowIndex=_46b;
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 _475=false;
for(var i=0;i<this.windows.length;i++){
if(this.windows[i].isOpen){
_475=true;
}
}
return _475;
},checkAnyModalOpen:function(){
var _477=false;
for(var i=0;i<this.windows.length;i++){
if(this.windows[i].isOpen&&this.windows[i].modalType=="Modal"){
_477=true;
}
}
return _477;
},checkAnyModelessOpen:function(){
var _479=false;
for(var i=0;i<this.windows.length;i++){
if(this.windows[i].isOpen&&this.windows[i].modalType=="Modeless"){
_479=true;
}
}
return _479;
},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(_47f,_480){
if(this.currentWindow>-1){
var c=this.windows[this.currentWindow];
c.setSize(_47f,_480);
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(_486){
if(this.currentWindow>-1){
var c=this.windows[this.currentWindow];
if(!c.hasFocus||_486){
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 _48a=window.onresize;
if(typeof window.onresize!="function"){
window.onresize=function(){
overlayStack.refreshMaskSize();
};
this.onResizeSet=true;
}else{
if(!this.onResizeSet){
window.onresize=function(){
overlayStack.refreshMaskSize();
_48a();
};
}
}
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 _48c=false;
for(var i=0;i<this.windows.length;i++){
if(!this.windows[i].inline){
this.currentWindow=i;
this.destroyCurrent();
}
}
return _48c;
},destroyCurrent:function(){
if(this.currentWindow>-1){
this.destroyWindow(this.currentWindow);
}
},destroyWindow:function(_48e){
if(_48e>-1){
var _48f=this.windows[_48e];
var _490=-1;
if(_48f.parentId>-1){
_490=_48f.parentId;
}
if(!_48f.inline){
if(_48f.iframe){
_48f.iframe.parentNode.removeChild(_48f.iframe);
_48f.iframeSpacer.parentNode.removeChild(_48f.iframeSpacer);
_48f.contentTable.parentNode.removeChild(_48f.contentTable);
_48f.windowIcon.parentNode.removeChild(_48f.windowIcon);
_48f.dialog.parentNode.removeChild(_48f.dialog);
this.windows[_48e].iframe=null;
this.windows[_48e].modalMask=null;
this.windows[_48e].modelessMaskingDiv=null;
this.windows[_48e].modelessMaskingIframe=null;
this.windows[_48e].modalMaskIframe=null;
this.windows[_48e].modalMaskIEOver=null;
this.windows[_48e].iframeSpacer=null;
this.windows[_48e].contentTable=null;
this.windows[_48e].windowIcon=null;
this.windows[_48e].dialog=null;
}
_48f=null;
this.windows[_48e]=null;
this.windows.splice(_48e,1);
this.windowIndex--;
this.currentWindow=-1;
_48e=this.windows.length-1;
}
if(_490>-1&&_48e>-1){
this.windows[_490].hasModalChildren=false;
this.windows[_490].focus();
this.reorderStack(false);
}else{
this.reorderStack(true);
}
}
},reorderStack:function(_491){
var _492=-1;
for(var i=0;i<this.windows.length;i++){
if(this.windows[i].isOpen){
this.windows[i].stackId=i;
_492=i;
}
}
if(_492>-1&&_491){
this.currentWindow=_492;
this.windows[this.currentWindow].focus();
}
},callBack:function(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,_49d){
if(this.currentWindow>-1){
var _49e=this.windows[this.currentWindow];
if(_49e.parentId>-1){
window.frames[this.windows[_49e.parentId].iframe.id].overlayStack.callBack(arg1,arg2,arg3,arg3,arg4,arg5,arg6,arg7,arg8,arg9,_49d);
}else{
_49e.callBack(arg1,arg2,arg3,arg3,arg4,arg5,arg6,arg7,arg8,arg9,_49d);
}
}
},getPageSize:function(){
var _49f,yScroll,pageHeight,pageWidth;
var obj={};
if(window.innerHeight&&window.scrollMaxY){
_49f=document.body.scrollWidth;
yScroll=window.innerHeight+window.scrollMaxY;
}else{
if(document.body.scrollHeight>document.body.offsetHeight){
_49f=document.body.scrollWidth;
yScroll=document.body.scrollHeight;
}else{
_49f=document.body.offsetWidth;
yScroll=document.body.offsetHeight;
}
}
var _4a1,windowHeight;
if(self.innerHeight){
_4a1=self.innerWidth;
windowHeight=self.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
_4a1=document.documentElement.clientWidth;
windowHeight=document.documentElement.clientHeight;
}else{
if(document.body){
_4a1=document.body.clientWidth;
windowHeight=document.body.clientHeight;
}
}
}
if(yScroll<windowHeight){
pageHeight=windowHeight;
}else{
pageHeight=yScroll;
}
if(_49f<_4a1){
pageWidth=_4a1;
}else{
pageWidth=_49f;
}
if(this.doc===undefined){
this.doc={};
}
this.doc.pageWidth=pageWidth;
this.doc.pageHeight=pageHeight;
this.doc.windowWidth=_4a1;
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 _4a5=document.createElement("div");
q.appendChild(_4a5);
this.questionDiv=_4a5;
var _4a6="check";
var _4a7=this.instanceId+".cancel()";
var _4a8=this.instanceId+".ok()";
var _4a9;
var _4aa;
if(this.isPrompt||this.isCriticalConfirm){
_4a9=document.createElement("div");
_4a9.className="input";
_4a9.innerHTML="<input type=\"text\" id=\""+this.prefixId+"_input\" autocomplete=\"off\" onkeyup=\""+this.instanceId+".enterKey(event)\" />";
_4a6="save";
}
if(this.isCheckboxPrompt){
_4a9=document.createElement("div");
_4a9.className="input";
_4a9.innerHTML="<input type=\"checkbox\" id=\""+this.prefixId+"_input\" /><label for=\""+this.prefixId+"_input\">"+DR.Widgets.Prompt.CHECKBOX_PROMPT_QUESTION+"</label>";
_4a6="save";
}
var _4aa;
var _4ab="";
if(this.isCriticalConfirm){
var _4ab=DR.Widgets.Prompt.LIVE_CHANGE_QUESTION.replaceBreaks();
_4ab=_4ab.replace("{1}","<strong><span id=\"liveChangeKey\">"+this.acceptKey+"<span></strong>");
var _4aa=document.createElement("div");
_4aa.innerHTML=_4ab;
_4aa.className="liveChangeText";
this.liveChangeTextDiv=_4aa;
}
var s="";
if(!this.isAlert&&!this.isSuccess){
s+="<button id=\""+this.prefixId+"_cancelBtn\" class=\"button secondary\" type=\"button\" onclick=\""+_4a7+"\"></button>";
}
s+="<button id=\""+this.prefixId+"_okBtn\" type=\"button\" class=\"button secondary\" onclick=\""+_4a8+"\" style=\"margin-right:0;\"></button>";
var _4ad=document.createElement("div");
_4ad.className="pageButtons";
_4ad.innerHTML=s;
if(this.isPrompt||this.isCriticalConfirm||this.isCheckboxPrompt){
f.appendChild(q);
d.appendChild(f);
if(this.isCriticalConfirm){
d.appendChild(_4aa);
}
d.appendChild(_4a9);
}else{
f.appendChild(q);
d.appendChild(f);
}
d.appendChild(_4ad);
var _4ae=$("div.content:first")||$("body");
_4ae.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(_4b0,text,_4b2,_4b3,_4b4,_4b5,_4b6){
if((this.isAlert||this.isSuccess||typeof (_4b2)=="function"||_4b2===null)&&typeof (_4b0)=="string"){
if(_4b4){
this.acceptKey=_4b4.trim();
getElem("liveChangeKey").innerHTML=this.acceptKey;
}
this.questionDiv.innerHTML=_4b0;
this.overlay.setTitle(_4b3||this.modalTitle);
this.overlay.setDisabled(true);
this.overlay.show();
if(this.isPrompt||this.isCriticalConfirm){
this.textInput.value=text;
this.textInput.focus();
this.textInput.select();
}else{
if(this.isCheckboxPrompt){
var _4b7=_4b5||$.dr.strings.OK;
if(text&&text!==""){
var _4b8=$("label",this.textInput).html(text);
}else{
var _4b8=$("label",this.textInput).html(DR.Widgets.Prompt.CHECKBOX_PROMPT_QUESTION);
}
var btn=this.okButton;
if(_4b6){
var _4ba=parseInt(_4b6,10);
$(btn).dr.button.text(_4ba).attr("disabled","disabled");
var fn=function(){
_4ba--;
if(_4ba===0){
$(btn).dr.button.text(_4b7);
$(btn).removeAttr("disabled");
}else{
$(btn).dr.button.text(_4ba.toString());
setTimeout(fn,1000);
}
};
setTimeout(fn,1000);
}else{
$(btn).removeAttr("disabled");
$(btn).dr.button.text(_4b7);
}
}else{
if(this.isSuccess){
this.okButton.focus();
}
}
}
this.callback=_4b2;
}
},ok:function(){
var _4bc=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{
_4bc=false;
this.showCriticalConfirmWarning();
}
}else{
this.callback(true);
}
}
}
}
if(_4bc){
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(_4c1,_4c2,_4c3){
if(!DR.Utils.ALERT){
DR.Utils.ALERT=new DR.Widgets.Alert();
DR.Utils.ALERT.init();
}
DR.Utils.ALERT.open(_4c1,null,_4c2,_4c3);
};
DR.Utils.ALERT=null;
DR.Utils.success=function(_4c4,_4c5,_4c6){
if(!DR.Utils.SUCCESS){
DR.Utils.SUCCESS=new DR.Widgets.Success();
DR.Utils.SUCCESS.init();
}
DR.Utils.SUCCESS.open(_4c4,null,_4c5,_4c6);
};
DR.Utils.SUCCESS=null;
DR.Utils.warning=function(_4c7,_4c8,_4c9){
if(!DR.Utils.WARNING){
DR.Utils.WARNING=new DR.Widgets.Warning();
DR.Utils.WARNING.init();
}
DR.Utils.WARNING.open(_4c7,null,_4c8,_4c9);
};
DR.Utils.WARNING=null;
DR.Utils.confirm=function(_4ca,_4cb,_4cc){
if(!DR.Utils.CONFIRM){
DR.Utils.CONFIRM=new DR.Widgets.Confirm();
DR.Utils.CONFIRM.init();
}
DR.Utils.CONFIRM.open(_4ca,null,_4cb,_4cc);
};
DR.Utils.CONFIRM=null;
DR.Utils.prompt=function(_4cd,text,_4cf,_4d0){
if(!DR.Utils.PROMPT){
DR.Utils.PROMPT=new DR.Widgets.Prompt();
DR.Utils.PROMPT.init();
}
DR.Utils.PROMPT.open(_4cd,text,_4cf,_4d0);
};
DR.Utils.PROMPT=null;
DR.Utils.checkboxPrompt=function(text,_4d2,_4d3,_4d4,_4d5,_4d6){
if(!DR.Utils.CHECKBOXPROMPT){
DR.Utils.CHECKBOXPROMPT=new DR.Widgets.CheckboxPrompt();
DR.Utils.CHECKBOXPROMPT.init();
}
DR.Utils.CHECKBOXPROMPT.open(text,_4d2,_4d3,_4d4,null,_4d5,_4d6);
};
DR.Utils.PROMPT=null;
DR.Utils.criticalConfirm=function(_4d7,text,_4d9,_4da,_4db){
if(!DR.Utils.CRITICAL_CONFIRM){
DR.Utils.CRITICAL_CONFIRM=new DR.Widgets.CriticalConfirm();
DR.Utils.CRITICAL_CONFIRM.init();
}
DR.Utils.CRITICAL_CONFIRM.open(_4d7,text,_4d9,_4da,_4db);
};
DR.Utils.CRITICAL_CONFIRM=null;
(function($){
var _4dd={title:null,callback:null};
var _4de;
var _4df=function(_4e0){
_4e0=(_4e0)?_4e0:{};
return $.extend({},_4dd,_4e0);
};
$.dr.alert=function(text,_4e2){
_4e2=_4df(_4e2);
DR.Utils.alert(text,_4e2.callback,_4e2.title);
};
$.dr.success=function(text,_4e4){
_4e4=_4df(_4e4);
DR.Utils.success(text,_4e4.callback,_4e4.title);
};
$.dr.warning=function(text,_4e6,_4e7){
_4e7=_4df(_4e7);
DR.Utils.warning(text,_4e6,_4e7.title);
};
$.dr.confirm=function(text,_4e9,_4ea){
_4ea=_4df(_4ea);
DR.Utils.confirm(text,_4e9,_4ea.title);
};
$.dr.checkboxPrompt=function(text,_4ec,_4ed,_4ee){
_4ee=_4df(_4ee);
DR.Utils.checkboxPrompt(text,_4ec,_4ed,_4ee.title,_4ee.buttonText,_4ee.timer);
};
$.dr.prompt=function(text,_4f0,_4f1,_4f2){
_4f2=_4df(_4f2);
DR.Utils.prompt(text,_4f0,_4f1,_4f2.title);
};
$.dr.criticalConfirm=function(text,_4f4,_4f5,_4f6,_4f7){
_4f7=_4df(_4f7);
DR.Utils.criticalConfirm(text,_4f4,_4f5,_4f7.title,_4f6);
};
})(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 _4fa=window.onresize;
var _4fb=function(){
self.refreshPanelSize();
self.refresh();
};
window.onresize=function(){
_4fb();
if(typeof (_4fa)=="function"){
_4fa();
}
};
var _4fc,winOnload;
function cleanupEvents(){
window.detachEvent("onresize",winOnload);
window.detachEvent("onresize",_4fb);
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;
}
}
}
}
}
_4fc=window.onload;
winOnload=function(){
self.drawInterface();
};
window.onload=function(){
winOnload();
if(typeof (_4fc)=="function"){
_4fc();
}
};
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(_50d,_50e){
if(_50d!==undefined&&_50e!==undefined){
this.userDataPageName=_50d;
this.userDataSetting=_50e;
}
},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(_511){
this.saveCookieState=true;
this.stateCookieID=_511+"_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(_513){
if(this.saveUserDataState&&$.dr.userdata!==null){
if(_513=="width"){
$.dr.userdata.save(this.userDataPageName,this.userDataSetting+"Width",this.column1Width,"String");
}else{
var _514="";
if(!this.column1Open){
_514="collapsed";
}
$.dr.userdata.save(this.userDataPageName,this.userDataSetting+"Collapsed",_514,"String");
}
}else{
if(this.saveCookieState&&this.stateCookie===null){
this.stateCookie.setValue(""+this.column1Width+"");
}
}
},attachHandles:function(){
var _515;
if(this.layout=="TwoColumn"){
_515="H";
}else{
if(this.layout=="TwoRow"){
_515="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(_517){
self.initDrag(_517);
}
this.staticHandle.onmousedown=handleOnMousedown;
this.hiddenHandle.className="splitContainerHiddenHandle"+_515;
this.staticHandle.className="splitContainerHandle"+_515;
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(_519){
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(_51d){
this.column1.style.width=(this.column1Width-this.leftPadding)+"px";
},initDrag:function(_51e){
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(_51e);
},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 _525={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 _526=function(){
var _527=this;
var _528=$(window).scrollTop();
var _529=$(window).height();
var _52a=$(window).width();
var _52b=_527.height();
var _52c=_527.width();
var posY=(!isIE6)?(_529/2)-(_52b/2):(_529/2)-(_52b/2)+_528;
var posX=(_52a/2)-(_52c/2);
_527.css({"top":posY,"left":posX});
};
var _52f=function(){
var _530=0;
var func=function(test){
if(_530>=_525.frames){
_530=0;
}
$span.attr("class",_525.imgPrefix+_530);
_530++;
frameTimeout=setTimeout(func,_525.frameInterval);
};
func();
};
var _533=function(){
if(typeof (frameTimeout)!="undefined"){
clearTimeout(frameTimeout);
}
};
var _534=function(){
var _535=this;
$(window).bind("resize scroll",function(){
_526.call(_535);
});
};
$.dr.processingDialog={show:function(){
if(!_525.enabled||open){
return;
}
open=true;
$dialog.show();
_52f.call($span);
_526.call($dialog);
_534.call($dialog);
if(!stopEventDefined&&$.browser.msie){
stopEventDefined=true;
document.attachEvent("onstop",$.dr.processingDialog.hide);
}
},hide:function(){
open=false;
_533();
$dialog.hide();
},enable:function(){
_525.enabled=true;
},disable:function(){
_525.enabled=false;
$.dr.processingDialog.hide();
}};
$(document).bind("showChangesWarning",function(){
$.dr.processingDialog.disable();
});
var init=function(){
$dialog=$("<div class=\""+_525.cssClass+" "+_525.imgPrefix+"\"><span>"+_525.text+"</span></div>").hide().prependTo("body");
$span=$("span",$dialog);
if(isIE6){
$dialog.css("position","absolute");
}
if(!_525.showText){
$dialog.find("> span").addClass("hide");
}
if(_525.shadowVisible){
$dialog.find("> span").dr.shadows();
}
var _537=new Image();
_537.src=$.dr.IMAGE_PATH+_525.imgSrc+"."+_525.imgExt;
var func=function(){
setTimeout($.dr.processingDialog.show,_525.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 _539=new Date().getTime();
var _53a=_539-DR.Widgets.SessionTimeout.startTime;
if(_53a>DR.Widgets.SessionTimeout.timerLimit){
DR.Widgets.SessionTimeout.showOverlay();
return;
}else{
if(_53a>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 _53c=[],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(_540,_541){
if(_540.config.debug){
var _542="";
}
var rows=_540.tBodies[0].rows;
if(_540.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&&($(_541[i]).metadata()&&$(_541[i]).metadata().sorter)){
p=getParserById($(_541[i]).metadata().sorter);
}else{
if((_540.config.headers[i]&&_540.config.headers[i].sorter)){
p=getParserById(_540.config.headers[i].sorter);
}
}
if(!p){
p=detectParserForColumn(_540,cells[i]);
}
if(_540.config.debug){
_542+="column:"+i+" parser:"+p.id+"\n";
}
list.push(p);
}
}
if(_540.config.debug){
log(_542);
}
return list;
}
function detectParserForColumn(_547,node){
var l=_53c.length;
for(var i=1;i<l;i++){
if(_53c[i].is($.trim(getElementText(_547.config,node)),_547,node)){
return _53c[i];
}
}
return _53c[0];
}
function getParserById(name){
var l=_53c.length;
for(var i=0;i<l;i++){
if(_53c[i].id.toLowerCase()==name.toLowerCase()){
return _53c[i];
}
}
return false;
}
function buildCache(_54e){
if(_54e.config.debug){
var _54f=new Date();
}
var _550=(_54e.tBodies[0]&&_54e.tBodies[0].rows.length)||0,totalCells=(_54e.tBodies[0].rows[0]&&_54e.tBodies[0].rows[0].cells.length)||0,_53c=_54e.config.parsers,cache={row:[],normalized:[]};
for(var i=0;i<_550;++i){
var c=_54e.tBodies[0].rows[i],cols=[];
cache.row.push($(c));
for(var j=0;j<totalCells;++j){
cols.push(_53c[j].format(getElementText(_54e.config,c.cells[j]),_54e,c.cells[j]));
}
cols.push(i);
cache.normalized.push(cols);
cols=null;
}
if(_54e.config.debug){
benchmark("Building cache for "+_550+" rows:",_54f);
}
return cache;
}
function getElementText(_554,node){
if(!node){
return "";
}
var t="";
if(_554.textExtraction=="simple"){
if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){
t=node.childNodes[0].innerHTML;
}else{
t=node.innerHTML;
}
}else{
if(typeof (_554.textExtraction)=="function"){
t=_554.textExtraction(node);
}else{
t=$(node).text();
}
}
return t;
}
function appendToTable(_557,_558){
if(_557.config.debug){
var _559=new Date();
}
var c=_558,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(_557.tBodies[0]),rows=[];
for(var i=0;i<totalRows;i++){
rows.push(r[n[i][checkCell]]);
if(!_557.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(_557.config.appender){
_557.config.appender(_557,rows);
}
rows=null;
if(_557.config.debug){
benchmark("Rebuilt table:",_559);
}
applyWidget(_557);
setTimeout(function(){
$(_557).trigger("sortEnd");
},0);
}
function buildHeaders(_55f){
if(_55f.config.debug){
var time=new Date();
}
var meta=($.metadata)?true:false,tableHeadersRows=[];
for(var i=0;i<_55f.tHead.rows.length;i++){
tableHeadersRows[i]=0;
}
$tableHeaders=$("thead th",_55f);
$tableHeaders.each(function(_563){
this.count=0;
this.column=_563;
this.order=formatSortingOrder(_55f.config.sortInitialOrder);
if(checkHeaderMetadata(this)||checkHeaderOptions(_55f,_563)){
this.sortDisabled=true;
}
if(!this.sortDisabled){
$(this).addClass(_55f.config.cssHeader);
}
_55f.config.headerList[_563]=this;
});
if(_55f.config.debug){
benchmark("Built headers:",time);
log($tableHeaders);
}
return $tableHeaders;
}
function checkCellColSpan(_564,rows,row){
var arr=[],r=_564.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(_564,headerArr,row++));
}else{
if(_564.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(_56b,i){
if((_56b.config.headers[i])&&(_56b.config.headers[i].sorter===false)){
return true;
}
return false;
}
function applyWidget(_56d){
var c=_56d.config.widgets;
var l=c.length;
for(var i=0;i<l;i++){
getWidgetById(c[i]).format(_56d);
}
}
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(_579,_57a,list,css){
_57a.removeClass(css[0]).removeClass(css[1]);
var h=[];
_57a.each(function(_57e){
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(_581,_582){
var c=_581.config;
if(c.widthFixed){
var _584=$("<colgroup>");
$("tr:first td",_581.tBodies[0]).each(function(){
_584.append($("<col>").css("width",$(this).width()));
});
$(_581).prepend(_584);
}
}
function updateHeaderSortCount(_585,_586){
var c=_585.config,l=_586.length;
for(var i=0;i<l;i++){
var s=_586[i],o=c.headerList[s[0]];
o.count=s[1];
o.count++;
}
}
function multisort(_58a,_58b,_58c){
if(_58a.config.debug){
var _58d=new Date();
}
var _58e="var sortWrapper = function(a,b) {",l=_58b.length;
for(var i=0;i<l;i++){
var c=_58b[i][0];
var _591=_58b[i][1];
var s=(getCachedSortType(_58a.config.parsers,c)=="text")?((_591==0)?"sortText":"sortTextDesc"):((_591==0)?"sortNumeric":"sortNumericDesc");
var e="e"+i;
_58e+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";
_58e+="if("+e+") { return "+e+"; } ";
_58e+="else { ";
}
var _594=_58c.normalized[0].length-1;
_58e+="return a["+_594+"]-b["+_594+"];";
for(var i=0;i<l;i++){
_58e+="}; ";
}
_58e+="return 0; ";
_58e+="}; ";
eval(_58e);
_58c.normalized.sort(sortWrapper);
if(_58a.config.debug){
benchmark("Sorting on "+_58b.toString()+" and dir "+_591+" time:",_58d);
}
return _58c;
}
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(_59d,i){
return _59d[i].type;
}
this.construct=function(_59f){
return this.each(function(){
if(!this.tHead||!this.tBodies){
return;
}
var _5a0,$document,$headers,cache,config,shiftDown=0,sortOrder;
this.config={};
config=$.extend(this.config,$.tablesorter.defaults,_59f);
_5a0=$(this);
$headers=buildHeaders(this);
this.config.parsers=buildParserCache(this,$headers);
cache=buildCache(this);
var _5a1=[config.cssDesc,config.cssAsc];
fixColumnWidth(this);
$headers.click(function(e){
_5a0.trigger("sortStart");
var _5a3=(_5a0[0].tBodies[0]&&_5a0[0].tBodies[0].rows.length)||0;
if(!this.sortDisabled&&_5a3>0){
var _5a4=$(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(_5a0[0],$headers,config.sortList,_5a1);
appendToTable(_5a0[0],multisort(_5a0[0],config.sortList,cache));
},1);
return false;
}
}).mousedown(function(){
if(config.cancelSelection){
this.onselectstart=function(){
return false;
};
return false;
}
});
_5a0.bind("update",function(){
this.config.parsers=buildParserCache(this,$headers);
cache=buildCache(this);
}).bind("sorton",function(e,list){
$(this).trigger("sortStart");
config.sortList=list;
var _5ab=config.sortList;
updateHeaderSortCount(this,_5ab);
setHeadersCss(this,$headers,_5ab,_5a1);
appendToTable(this,multisort(this,_5ab,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){
_5a0.trigger("sorton",[config.sortList]);
}
applyWidget(this);
});
};
this.addParser=function(_5ae){
var l=_53c.length,a=true;
for(var i=0;i<l;i++){
if(_53c[i].id.toLowerCase()==_5ae.id.toLowerCase()){
a=false;
}
}
if(a){
_53c.push(_5ae);
}
};
this.addWidget=function(_5b1){
widgets.push(_5b1);
};
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,_5b7){
var _5b8="\\"+_5b7.decimal;
var exp="/(^[+]?0("+_5b8+"0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)"+_5b8+"(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*"+_5b8+"0+$)/";
return RegExp(exp).test($.trim(s));
};
this.clearTableBody=function(_5ba){
if($.browser.msie){
function empty(){
while(this.firstChild){
this.removeChild(this.firstChild);
}
}
empty.apply(_5ba.tBodies[0]);
}else{
_5ba.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,_5bf){
var c=_5bf.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,_5d3){
var c=_5d3.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,_5d9,cell){
var c=_5d9.config,p=(!c.parserMetadataName)?"sortValue":c.parserMetadataName;
return $(cell).metadata()[p];
},type:"numeric"});
ts.addWidget({id:"zebra",format:function(_5dc){
if(_5dc.config.debug){
var time=new Date();
}
$("tr:visible",_5dc.tBodies[0]).filter(":even").removeClass(_5dc.config.widgetZebra.css[1]).addClass(_5dc.config.widgetZebra.css[0]).end().filter(":odd").removeClass(_5dc.config.widgetZebra.css[0]).addClass(_5dc.config.widgetZebra.css[1]);
if(_5dc.config.debug){
$.tablesorter.benchmark("Applying Zebra widget",time);
}
}});
})(jQuery);
(function($){
var _5df=$.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 _5e0=$("button",this);
var _5e1=0;
_5e0.each(function(){
var span=$("span.icon span",this);
var _5e3=span.width();
var _5e4=(_5e3<50)?70:(_5e3>=300)?300:_5e3+17;
$(this).css("max-width","none").width(_5e4);
span.width(_5e4-17);
if($.browser.msie){
$("span.icon",this).width(_5e4-17+wOffset);
}
var h=$(this).height();
if(h>_5e1){
_5e1=h;
}
if(BrowserDetect.browser=="Explorer"&&BrowserDetect.version==6){
$(this).hover(function(){
if(!$(this).hasClass("selected")){
$(this).addClass("hover");
}
},function(){
$(this).removeClass("hover");
});
}
});
_5e1=Math.min(Math.max(_5e1,67),117);
_5e0.each(function(){
$(this).height(_5e1-hOffset);
$("span.icon",this).height(_5e1-hOffset-spanOffset);
});
$("ul, div.related",this).css("visibility","visible");
});
}});
var _5e6=function(){
$("div.taskbar",document).dr.taskbar();
};
$.dr.addDomReadyEvent(_5e6,"domReadyEarly");
})(jQuery);
DR.Widgets.ToolTip=function(_5e7,_5e8){
if(DR.Utils.BrowserDetect.isIE6()){
return null;
}
this.refObj=_5e7;
this.edgeX="Left";
this.edgeY="Bottom";
this.drawDirectionX="Right";
this.drawDirectionY="Down";
this._type=_5e8;
this.mouseOverTimeOut=1100;
this.mouseOutTimeOut=300;
if(_5e8=="menuTooltip"){
this.cssClass="menuTooltip";
this._offsetX=7;
this._offsetY=0;
this.edgeX="Right";
this.edgeY="Top";
}else{
if(_5e8=="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 _5e9=this;
var _5ea=function(){
_5e9.markToShow=true;
window.setTimeout(function(){
if(_5e9.markToShow){
_5e9.show();
}
},this.mouseOverTimeOut);
};
var _5eb=function(){
_5e9.markToShow=false;
window.setTimeout(function(){
if(!_5e9.markToShow){
_5e9.hide();
}
},this.mouseOutTimeOut);
};
var hide=function(){
_5e9.hide();
};
jQuery(this.refObj).mouseover(_5ea);
jQuery(this.refObj).mouseout(_5eb);
jQuery(this.refObj).click(hide);
jQuery(this.tooltip).mouseover(_5ea);
jQuery(this.tooltip).mouseout(_5eb);
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 _5ef=jQuery(this.tooltip).height()+2*10+2*1;
var _5f0=jQuery(this.tooltip).width()+2*10+2*1;
var _5f1=jQuery(window).height();
if(_5ef>_5f1){
_5ef=_5f1-200;
this.tooltip.style.height=(_5ef+2*10+2*1)+"px";
}
this.tooltip.style.display="block";
this.shadow.style.height=_5ef+"px";
this.shadow.style.width=_5f0+"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(_5f3){
this.container=getElem(_5f3);
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 _5f6=false;
if(typeof obj=="object"){
node=obj.parentNode.parentNode;
}else{
if(typeof obj=="string"){
node=document.getElementById(obj);
_5f6=true;
}else{
return null;
}
}
var id=node.id;
id=id.replace("treeNode_","");
var _5f8=id;
id=id.replace("treeRoot_Node_","");
var _5f9=document.getElementById(node.id+"_child");
if(node.className=="treeNodeClosed"||node.className=="treeNodeClosedSelected"){
if(_5f9){
node.className="treeNodeOpenSelected";
_5f9.style.display="block";
}else{
node.className="treeNodeEmptySelected";
}
this.saveNodeState(id,"selected");
}else{
if(node.className=="treeNodeOpen"){
if(_5f9){
_5f9.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 _5fa=this;
var func=function(){
_5fa.scrollToNode(node);
};
window.setTimeout(func,100);
}else{
this.scrollToNode(node);
}
}
if(_5f6){
this.scrollToNode(node);
}
this.setCurrentNodeOff(node.id);
if(!_5f9){
this.currentTreeNodeHasChildren=false;
}else{
if(_5f9.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 _602=document.getElementById(node.id+"_child");
if(node.className=="treeNodeClosed"){
if(_602){
node.className="treeNodeOpen";
_602.style.display="block";
this.saveNodeState(id,"open");
}else{
node.className="treeNodeEmpty";
}
}else{
if(node.className=="treeNodeClosedSelected"){
node.className="treeNodeOpenSelected";
_602.style.display="block";
this.saveNodeState(id,"open");
}else{
if(node.className=="treeNodeOpen"){
if(_602){
_602.style.display="none";
node.className="treeNodeClosed";
this.saveNodeState(id,"closed");
}
}else{
if(node.className=="treeNodeOpenSelected"){
if(_602){
_602.style.display="none";
node.className="treeNodeClosedSelected";
this.saveNodeState(id,"closed");
}
}
}
}
}
},saveNodeState:function(id,_604){
if(typeof id=="string"&&this.ready){
if(this.saveState){
if(_604=="open"){
this.stateCookie.addArrayValue(id);
}else{
if(_604=="closed"){
this.stateCookie.removeArrayValue(id);
}else{
if(_604=="selected"){
this.stateCookie.addArrayValue(id);
}
}
}
}
if(this.saveSelectedItem&&_604=="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 _60c=node.parentNode.parentNode;
this.selectNode(_60c.id);
}
},enableSaveState:function(_60d){
if(typeof _60d=="string"){
this.cookieName=_60d;
this.saveState=true;
this.saveSelectedItem=true;
this.initCookies();
}
},enableLastSelected:function(_60e){
if(typeof _60e=="string"){
this.cookieName=_60e;
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 _615="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 _616=function(){
return (typeof FCKeditor_IsCompatibleBrowser=="function")?true:false;
};
var _617=function(){
return (typeof FCKeditorAPI=="undefined")?false:true;
};
var _618=function(id){
return FCKeditorAPI.GetInstance(id);
};
var _61a=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 _61d=function(_61e,id,_620){
this.textareaObj=_61e;
this.id=id;
this.editorObj=null;
var c=$.extend({},DEFAULT_CONFIG);
this.config=(_620)?$.extend(c,_620):c;
this.refreshTimer=null;
this.init();
};
_61d.prototype={init:function(){
if(_616()){
this.bindEditor();
}else{
if(!SCRIPT_LOADING){
this.loadScript();
}else{
this.checkScriptReady();
}
}
},loadScript:function(){
var _622=this;
SCRIPT_LOADING=true;
$.getScript(this.config.BasePath+_615,function(){
SCRIPT_LOADING=false;
_622.checkScriptReady();
});
},checkScriptReady:function(){
var _623=this;
var func=function(){
if(_616()){
_623.bindEditor();
}else{
_623.checkScriptReady();
}
};
window.setTimeout(func,100);
},bindEditor:function(){
var _625=new FCKeditor(this.id);
$.extend(true,_625,this.config);
_625.ReplaceTextarea();
this.editorObj=_625;
this.checkAPIReady();
},checkAPIReady:function(){
var _626=this;
var func=function(){
if(_617()){
var _628=_618(_626.id);
if(typeof _628=="undefined"){
_626.checkAPIReady();
}else{
if(typeof _628.EditorDocument=="undefined"){
_626.checkAPIReady();
}else{
_626.synchronize();
}
}
}else{
_626.checkAPIReady();
}
};
window.setTimeout(func,10);
},synchronize:function(){
var _629=this;
var _62a=function(){
_629.updateTextarea();
_629.synchronize();
};
this.refreshTimer=window.setTimeout(_62a,REFRESH_INTERVAL);
},updateTextarea:function(a){
this.textareaObj.value=this.getHTML();
},setHTML:function(html){
var _62d=_618(this.id);
if(!_62d){
return undefined;
}else{
html=_61a(html);
_62d.SetHTML(html);
}
},getHTML:function(){
var _62e=_618(this.id);
if(typeof _62e!="undefined"){
return _62e.GetXHTML(true);
}
return undefined;
}};
$.namespace("dr",{wysiwyg:function(_62f){
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=_61a(this.value);
var _631=new _61d(this,id,_62f);
EDITORS[id]=_631;
this.wysiwyg=_631;
}
}
});
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(_636){
if(typeof _636=="object"){
$.extend(DEFAULT_CONFIG,_636);
}
},addToolbarSet:function(_637){
if(typeof _637=="object"){
if(_637.name&&_637.settings){
CUSTOM_TOOLBAR_SETS.push(_637);
}
}
},getCustomToolbarSets:function(){
return CUSTOM_TOOLBAR_SETS;
}};
var _638=function(_639){
_639.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",_638);
})(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 _63b=new Date(this.getFullYear(),0,1);
return Math.ceil((this-_63b)/86400000);
};
jQuery.dr=window.jQuery.dr||{};
$.dr.baseChart={initChart:function(_63c){
var obj=$("#"+_63c);
if(obj.hasClass("stockChartContainer")){
if(!(window[_63c] instanceof $.dr.stockChart)){
try{
window[_63c]=new $.dr.stockChart(_63c);
window[_63c].initChart(_63c+"_flashObjectId");
}
catch(e){
}
}
}else{
try{
window[_63c]=new Object();
}
catch(e){
}
}
}};
amChartInited=function(_63e){
$.dr.baseChart.initChart(_63e);
};
amProcessCompleted=function(_63f,_640){
if(window[_63f]){
window[_63f].processCompletedCallback(_640);
}
};
window.amReturnData=function(_641,data){
if(window[_641]){
window[_641].returnDataCallback(unescape(data));
}
};
window.amReturnSettings=function(_643,_644){
if(window[_643]){
window[_643].returnSettingsCallback(_644);
}
};
window.amReturnParam=function(_645,_646){
if(window[_645]){
window[_645].returnParamCallback(_646);
}
};
window.amError=function(_647,_648){
if(window[_647]){
window[_647].errorCallback(_648);
}
};
window.amRolledOver=function(_649,date,_64b){
if(window[_649]){
window[_649].rolledOverCallback(date,_64b);
}
};
window.amClickedOn=function(_64c,date,_64e){
if(window[_64c]){
window[_64c].clickedOnCallback(date,_64e);
}
};
window.amRolledOverEvent=function(_64f,date,_651,id,url){
if(window[_64f]){
window[_64f].rolledOverEventCallback(date,_651,id,url);
}
};
window.amClickedOnEvent=function(_654,date,_656,id,url){
if(window[_654]){
window[_654].clickedOnEventCallback(date,_656,id,url);
}
};
window.amGetZoom=function(_659,from,to){
if(window[_659]){
window[_659].getZoomCallback(from,to);
}
};
window.amReturnImageData=function(_65c,data){
};
window.amSliceClick=function(_65e,_65f,_660,_661,_662,_663,_664){
};
window.amSliceOver=function(_665,_666,_667,_668,_669,_66a,_66b){
};
window.amSliceOut=function(_66c){
};
(function($){
var _66e=function(_66f){
var did=$(_66f).val();
var _671=[];
_671.push("<data_sets>");
_671.push("<data_set did='"+did+"'>");
_671.push("<compare_list_box selected='true' /></data_set></data_sets>");
return _671.join("");
};
var _672=function(_673){
var _674=$(_673).attr("data-chart");
var _675=$(_673).attr("id");
var _676=$(":selected",_673).text();
var _677=$(_673).val();
var _678=_677;
var _679=[];
_679.push("<charts>");
_679.push("<chart cid='"+((_674!=null)?_674:0)+"'>");
_679.push("<title>"+_676+"</title>");
_679.push("<graphs>");
_679.push("<graph gid='0'>");
_679.push("<data_sources>");
_679.push("<close>"+_677+"</close>");
_679.push("</data_sources>");
_679.push("<compare_source>"+_678+"</compare_source>");
_679.push("<legend><date key='false' title='false'><![CDATA[{close}]]></date><period key='false' title='false'> <![CDATA[<b>{close}</b>]]></period></legend>");
_679.push("</graph></graphs></chart></charts>");
if(_674==0){
_679.push("<scroller><graph_data_source>"+_677+"</graph_data_source></scroller>");
}
DR.USER_DATA.save("sitePulseHomeDetail"+GC.CURRENT_SITE_ID,_675,_677,"String");
return _679.join("");
};
var _67a=function(_67b,_67c){
var _67d=[];
_67d.push("<period_selector><from>");
_67d.push(new $.dr.date($(_67b).val(),$.dr.date.getDefaultFormat()).toFormattedString(_67c));
_67d.push("</from></period_selector>");
return _67d.join("");
};
var _67e=function(_67f,_680){
var _681=[];
var _682=new $.dr.date($(_67f).val(),$.dr.date.getDefaultFormat());
_682.setDate(_682.getDate()+1);
_681.push("<period_selector><to>");
_681.push(_682.toFormattedString(_680));
_681.push("</to></period_selector>");
return _681.join("");
};
var _683=function(_684){
var _685=[];
$(".changeGraphColumn",_684.chartContainerObj).change(function(_686){
_684.changeGraphSrcColumn(_686.target);
});
$(".applyGraphColumn",_684.chartContainerObj).each(function(){
_685.push(this);
});
return _685;
};
var _687=function(_688){
var _689=[];
$(".applySettings",_688.chartContainerObj).each(function(){
_689.push(this);
$(this).click(function(_68a){
_688.applySettings(_68a.target);
});
});
return _689;
};
var _68b=function(_68c){
var _68d=null;
$(".changeCompareTo:first",_68c.chartContainerObj).change(function(_68e){
_68c.changeCompareTo(_68e.target);
});
$(".applyCompareTo:first",_68c.chartContainerObj).each(function(){
_68d=this;
});
return _68d;
};
var _68f=function(_690){
$("select.changeData").change(function(){
_690.changeSelectDataSet($(this).val());
}).keyup(function(){
_690.changeSelectDataSet($(this).val());
});
};
var _691=function(_692){
var _693=null;
$(".applyRangeStart:first",_692).each(function(){
_693=this;
});
return _693;
};
var _694=function(_695){
var _696=null;
$(".applyRangeEnd:first",_695).each(function(){
_696=this;
});
return _696;
};
var _697=function(_698){
var _699=[];
$(".dynamicHighlight",_698).each(function(){
var _69a=this.getAttribute("data-precision");
var _69b=this.getAttribute("data-prefix");
var _69c=this.getAttribute("data-suffix");
_699.push({elemObj:this,precision:(_69a!=null&&!isNaN(_69a))?_69a:2,formula:this.getAttribute("data-formula"),prefix:(_69b)?_69b:"",suffix:(_69c)?_69c:""});
});
return _699;
};
var _69d=function(_69e){
$(".staticHighlightControl",_69e.chartContainerObj).change(function(_69f){
_69e.changeStaticHighlight(_69f.target);
});
};
var _6a0=function(_6a1){
var _6a2=[];
$(".staticHighlight",_6a1).each(function(){
var _6a3=this.getAttribute("data-precision");
var _6a4=this.getAttribute("data-prefix");
var _6a5=this.getAttribute("data-suffix");
var _6a6=this.getAttribute("data-type-ref");
var type=this.getAttribute("data-type");
_6a2.push({elemObj:this,precision:(_6a3!=null&&!isNaN(_6a3))?_6a3:2,formula:this.getAttribute("data-formula"),prefix:(_6a4)?_6a4:"",suffix:(_6a5)?_6a5:"",type:type,typeRef:_6a6});
});
return _6a2;
};
var _6a8=function(_6a9){
var _6aa=_6a9.indexOf("<columns>");
var _6ab=_6a9.indexOf("</columns>");
var _6ac=[];
if(_6aa>-1&&_6ab>-1){
_6ac=_6a9.substring(_6aa+9,_6ab);
_6ac=_6ac.split("<column>").join("").split("</column>");
_6ac=(_6ac instanceof Array)?_6ac:[];
}
return _6ac;
};
var _6ad=function(col,_6af){
var pos=-1;
if(!isNaN(col)){
pos=col;
}else{
pos=$.inArray(col,_6af);
}
return pos;
};
var _6b1=function(_6b2){
_6b2.getSettings();
};
var _6b3=function(_6b4){
_6b4.getData(0);
};
var _6b5=function(_6b6,_6b7){
_6b6.compareDataSet(_6b7);
};
var _6b8=function(_6b9,_6ba){
_6b9.uncompareDataSet(_6ba);
};
var _6bb=function(_6bc){
_6bc.uncompareAll();
};
var _6bd=function(_6be,_6bf){
_6be.selectDataSet(_6bf);
};
var _6c0=function(_6c1){
_6c1.hideEvents();
};
var _6c2=function(_6c3){
_6c3.showEvents();
};
var _6c4=function(_6c5){
_6c5.showAll();
};
var _6c6=function(_6c7,data){
_6c7.setData(data);
};
var _6c9=function(_6ca){
_6ca.rebuild();
};
var _6cb=function(_6cc){
_6cc.reloadData();
};
var _6cd=function(_6ce,_6cf){
_6ce.reloadSettings(_6cf);
};
var _6d0=function(_6d1,_6d2,_6d3,_6d4){
var _6d5=[];
_6d5.push("<settings>");
_6d5.push(_6d2);
_6d5.push("</settings>");
_6d1.setSettings(_6d5.join(""),_6d3,_6d4);
};
var _6d6=function(_6d7,data,_6d9){
_6d7.appendData(data,_6d9);
};
var _6da=function(_6db,_6dc,_6dd){
_6db.getParam(_6dc);
};
var _6de=function(_6df,from,to,_6e2){
var _6e3=new $.dr.date(to,_6e2);
_6e3.setDate(_6e3.getDate()+1);
_6df.setZoom(from,_6e3.toFormattedString());
};
var _6e4=function(_6e5,_6e6){
var _6e7=0;
var days=1;
var _6e9=$.dr.stockChart.STATIC_TYPES;
if(_6e5.typeRef){
_6e5.type=$("#"+_6e5.typeRef).val();
}
if(_6e5.type){
for(var t in _6e9){
if(t==_6e5.type){
_6e7=_6e9[t].offset;
days=_6e9[t].days;
break;
}
}
}
_6e5.chartObj=_6e6;
_6e5.startOffset=_6e7;
_6e5.numDays=days;
_6e5.avg=function(_6eb){
return _6e6.staticData.avg(this,_6eb);
};
_6e5.sum=function(_6ec){
return _6e6.staticData.sum(this,_6ec);
};
var _6ed="0";
with(_6e5){
_6ed=eval(formula);
if(!isNaN(_6ed)){
_6ed=prefix+_6ed.toFixed(precision).formatNumber()+suffix;
}else{
_6ed=$.dr.stockChart.DATA_NOT_AVAILABLE;
}
}
$(_6e5.elemObj).html(_6ed);
$(_6e5.elemObj).trigger("staticChange");
};
$.dr.stockChart=function(_6ee,_6ef){
this.dataDateFmt=(_6ef)?_6ef:"yyyy-mm-dd";
this.chartPrefix=_6ee;
var _6f0=$("#"+this.chartPrefix);
this.chartContainerObj=(_6f0.length>0)?_6f0: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=_691(this.chartContainerObj);
this.controls.toDate=_694(this.chartContainerObj);
this.controls.compareTo=_68b(this);
this.controls.changeDataSet=_68f(this);
this.controls.apply=_687(this);
this.controls.graphColumn=_683(this);
_69d(this);
this.staticHighlights=_6a0(this.chartContainerObj);
this.dynamicHighlights=_697(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);
}
_6b1(this.flashChartObj);
this.columnNames=_6a8(this.chartSettingsXML);
_6b3(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 _6f2 in this.controls){
switch(_6f2){
case "compareTo":
break;
case "graphColumn":
for(var c=0;c<this.controls[_6f2].length;c++){
}
break;
case "fromDate":
break;
case "toDate":
break;
default:
break;
}
}
},setCustomDateControls:function(_6f4,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,_6f9){
},processCompletedCallback:function(_6fa){
_6b1(this.flashChartObj);
},errorCallback:function(_6fb){
},clickedOnCallback:function(date,_6fd){
if(_6fd=="DD"){
_6de(this.flashChartObj,date,date,this.dataDateFmt);
}else{
if(_6fd=="WW"){
var _6fe=new $.dr.date(date,this.dataDateFmt);
_6fe.setDate(_6fe.getDate()+6);
_6de(this.flashChartObj,date,_6fe.toFormattedString(),this.dataDateFmt);
}else{
if(_6fd=="MM"){
var _6fe=new $.dr.date(date,this.dataDateFmt);
_6fe.setMonth(_6fe.getMonth()+1);
_6fe.setDate(_6fe.getDate()-1);
_6de(this.flashChartObj,date,_6fe.toFormattedString(),this.dataDateFmt);
}
}
}
},rolledOverEventCallback:function(date,_700,id,url){
},clickedOnEventCallback:function(date,_704,id,url){
},returnSettingsCallback:function(_707){
this.chartSettingsXML=unescape(_707);
},returnDataCallback:function(_708){
var _709=new Date().getTime();
this.chartData=_708.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 _70c=this.chartData.splice(i,1);
i--;
}
}
var _70d=new Date().getTime();
this.dataPoints=this.chartData.length;
this.numDataColumns=this.chartData[0].length;
this.isDataLoaded=true;
_708=null;
},returnParamCallback:function(_70e){
},changeStaticHighlight:function(obj){
var _710=obj.id;
for(var i=0;i<this.staticHighlights.length;i++){
var _712=this.staticHighlights[i];
for(var r in _712){
if(r=="typeRef"&&_712[r]==_710){
_6e4(this.staticHighlights[i],this);
}
}
}
},updateStaticHighlights:function(){
for(var i=0;i<this.staticHighlights.length;i++){
_6e4(this.staticHighlights[i],this);
}
},staticData:{avg:function(_715,col){
var _717=this.sum(_715,col)/_715.numDays;
return Number(_717);
},sum:function(_718,col){
var _71a=_6ad(col,_718.chartObj.columnNames);
var _71b=Number.NaN;
var _71c=(_718.chartObj.chartData.length-1)-_718.startOffset;
var _71d=_71c-(_718.numDays);
if(_71a>-1){
_71b=0;
for(var i=_71c;i>_71d;i--){
var val=Number(_718.chartObj.chartData[i][_71a]);
_71b+=((val==NaN)?0:val);
}
}
return Number(_71b);
}},changeCompareTo:function(_720){
var _721=$(_720).val();
_6bb(this.flashChartObj);
if(_721!=""){
_6b5(this.flashChartObj,_721);
}
},changeSelectDataSet:function(data){
_6bd(this.flashChartObj,data);
},changeGraphSrcColumn:function(_723){
var _724=_672(_723);
_6d0(this.flashChartObj,_724,true);
},applySettings:function(){
var _725=[];
for(var _726 in this.controls){
switch(_726){
case "compareTo":
break;
case "graphColumn":
for(var c=0;c<this.controls[_726].length;c++){
_725.push(_672(this.controls[_726][c]));
}
break;
case "fromDate":
_725.push(_67a(this.controls.fromDate,this.dataDateFmt));
break;
case "toDate":
_725.push(_67e(this.controls.toDate,this.dataDateFmt));
break;
default:
break;
}
}
_6d0(this.flashChartObj,_725.join(""),true);
},update:function(){
if(!this.isDataLoaded){
var _728=this;
window.setTimeout(function(){
_728.update();
},1000);
}else{
var _729=parseInt(jQuery.inArray(this.rangeToDate,this.chartDataLoc));
var _72a=parseInt(jQuery.inArray(this.rangeFromDate,this.chartDataLoc));
this.rangeDataPoints=(_729-_72a)+1;
for(var col=1;col<this.numDataColumns;col++){
this.rangeTotals[col]=0;
this.rangeAverages[col]=0;
}
for(var row=_72a;row<=_729;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 _72e=1;_72e<this.rangeTotals.length;_72e++){
this.rangeAverages[_72e]=this.rangeTotals[_72e]/this.rangeDataPoints;
}
this.updateDynamicHighlights();
}
},sum:function(col){
var _730=_6ad(col,this.columnNames);
return (_730>-1)?this.rangeTotals[_730]:Number.NaN;
},avg:function(col){
var _732=_6ad(col,this.columnNames);
return (_732>-1)?this.rangeAverages[_732]:Number.NaN;
},dataPoints:function(){
return this.rangeDataPoints;
},updateDynamicHighlights:function(){
for(var _733 in this.dynamicHighlights){
var _734=this.dynamicHighlights[_733];
var _735=0;
with(this){
_735=eval(_734.formula);
if(!isNaN(_735)){
_735=_734.prefix+_735.toFixed(_734.precision).formatNumber()+_734.suffix;
}else{
_735=$.dr.stockChart.DATA_NOT_AVAILABLE;
}
}
$(_734.elemObj).html(_735);
}
}};
$.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 _737={deepLink:true,activeTab:0,displayEffect:{animation:"fade",speed:"normal"}};
var _738=function(){
$(this).parents(".tabSet").css("visibility","visible");
};
$.namespace("dr",{fingertabs:function(_739){
var _73a=$.extend(true,{},_737,_739);
var _73b,currentPath,activeTab,tabIDArray=[],effectType=_73a.displayEffect.animation.toLowerCase(),animation={show:$.fn.show,hide:$.fn.hide,speed:_73a.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 _73c=function(_73d,_73e,_73f){
$(this).find("td.tab > dl > dt").removeClass("active").eq(_73d).toggleClass("active").end().end().find("td.tabContainer > dl > dd").hide().eq(_73d).show();
_73e.call($(".tabContent",this).hide().eq(_73d),_73f);
activeTab=_73d;
};
return this.each(function(){
var _740=$(this);
var _741=$(this).wrap("<div class=\"fingerTabSet\"><div class=\"tabSet\">").curReturn;
var $tc=_741.prepend("<table class=\"tabLayoutTable\"><tbody><tr><td class=\"tab\"><td class=\"tabContainer\"></tr></tbody></table>").find("table td.tab").append(_740).end().find("table td.tabContainer").append("<dl class=\"foo\"").end().curReturn;
_740.find(">dt").each(function(_743){
$(this).click(function(){
_73c.call($(this).parents(".tabSet > table"),_743,animation.show,animation.speed);
return false;
});
}).end().find(">dd").appendTo($tc.find("dl"));
_73c.call(_740.parents(".tabSet > table"),_73a.activeTab,animation.show,1);
_738.call(_740);
});
}});
var _744=function(evt,_746){
$("dl.fingertabs",_746).dr.fingertabs();
};
$.dr.addUnobtrusiveEvent(_744,"unobtrusiveEventEarly");
})(jQuery);
(function($){
var _748=function(){
$(".iconWell .popup > div",this).dr.shadows();
var _749=false;
var _74a=function(){
$(".iconWell > li.hover").removeClass("hover");
};
var _74b=function(evt){
if(evt){
if($(evt.target).parents("ul.iconWell").length==0){
_74a();
$("body").unbind("mouseover",_74b);
_749=false;
}
}
};
$(".iconWell > li").mouseenter(function(){
_74a();
$(this).addClass("hover");
if(!_749){
$("body").bind("mouseover",_74b);
_749=true;
}
});
};
$.dr.addDomReadyEvent(_748,"domReadyEarly");
})(jQuery);
(function($){
$.fn.extend({setMaxHeight:function(tag,_74f){
return this.each(function(){
var _750=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]),_74f);
if(mh>_750){
_750=mh;
}
}
}
}else{
if(typeof tag!=="undefined"){
_750=Math.max($(this).getMaxHeight(tag),_74f);
}
}
$(this).height(_750);
});
},getMaxHeight:function(tag){
var _754=0;
$(tag,this).each(function(){
_754=Math.max(_754,$(this).outerHeight(true));
});
return _754;
},isChildOf:function(exp){
var _756=$(this);
return $(this).parents().filter(exp).length>0;
}});
})(jQuery);
(function($){
var _758="";
var _759="";
var _75a=220;
var _75b="<div class=\"loadingSmall\"><div class=\"abs\"><span>Loading</span></div></div>";
var _75c="More about {0}";
var _75d={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);
}};
$.dr.menu={cache:{},showMethod:($.browser.msie)?$.fn.show:$.fn.fadeIn,hideMethod:($.browser.msie)?$.fn.hide:$.fn.fadeOut,getRecentItemsJson:function(key,_761,_762,_763){
var _764=this;
if(typeof this.cache[key]==="undefined"){
this.cache[key]={};
}
if(this.cache[key].xhrData){
var _765=(typeof this.cache[key].xhrRequest==="boolean")?false:true;
_762(this.cache[key].xhrData,_765);
}else{
if(!this.cache[key].xhrRequest){
var data={ajaxTime:new Date().getTime()};
data[_761.RECENT_ITEMS_KEY]=key;
this.cache[key].xhrRequest=$.ajax({data:data,dataType:"json",url:_761.RECENT_ITEMS_URL,success:function(json){
_764.cache[key].xhrData=json;
if(typeof _762==="function"){
_762(json,false);
}
},error:function(xhr){
delete _764.cache[key];
if(typeof _763==="function"){
_763(xhr);
}
}});
}
}
},setRecentItemsJson:function(key,_76a,_76b){
if(typeof this.cache[key]==="undefined"){
this.cache[key]={};
}
this.cache[key].xhrData={items:_76a};
this.cache[key].xhrRequest=true;
},getDefaults:function(){
return _75d;
},setDefaults:function(_76c){
if(_76c){
$.extend(true,_75d,_76c);
}
$(document).trigger("afterMenuSetDefaults",[_76c]);
}};
var _76d=function(_76e,_76f){
if(typeof (_76e)!="undefined"){
clearTimeout(_76e);
}
if(typeof _76f!=="undefined"){
_76f.stop(true,true);
_76f.css("left","").css("width","");
}
};
var _770=function(xhr){
$.dr.utils.logError(xhr);
};
var _772=function(_773,txt,tier){
var _776=_773.parents(".mega-menu");
_773.find(".help-text-container").html(txt).find("a.helpPopup").click(function(){
_75d.HELP_CALLBACK($(this).attr("data-help-url"));
_776.hide(0).parent().removeClass("hover");
return false;
});
if(tier>1){
_773.removeClass("mega-menu-help-expanded").addClass("mega-menu-help-collapsed");
}else{
_773.addClass("mega-menu-help-expanded").removeClass("mega-menu-help-collapsed");
}
};
var _777=function(_778,txt,key,tier){
var $ric=$(".recent-items-container",_778);
$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 _77e=_778.parents(".mega-menu");
$sub.find("a.recent-item").click(function(e){
_77e.hide(0).parent().removeClass("hover");
});
var _780=$sub.find(".recentScroller");
if(_780.length){
var h2h=$sub.find(">h2").outerHeight();
var h=_778.innerHeight();
_780.height(h-h2h);
}
if(tier>1){
_778.removeClass("mega-menu-help-expanded").addClass("mega-menu-help-collapsed");
}else{
_778.addClass("mega-menu-help-expanded").removeClass("mega-menu-help-collapsed");
}
};
var _783=function(args){
var _785=(args.length)?$.dr.menu.strings[args[0]]||{}:{};
for(var i=1,len=args.length;i<len;i++){
if(_785[args[i]]){
_785=_785[args[i]];
}else{
break;
}
}
return _785.label||_758;
};
var _787=function(args){
var _789=(args.length)?$.dr.menu.strings[args[0]]||{}:{};
for(var i=1,len=args.length;i<len;i++){
if(_789[args[i]]){
_789=_789[args[i]];
}else{
break;
}
}
return _789.label||_758;
};
var _78b=function(args){
var _78d=(args.length)?$.dr.menu.strings[args[0]]||{}:{};
for(var i=1,len=args.length;i<len;i++){
if(_78d[args[i]]){
_78d=_78d[args[i]];
}else{
break;
}
}
return _78d.helpText||_759;
};
var _78f=function(args){
var _791=(args.length)?$.dr.menu.strings[args[0]]||{}:{};
for(var i=1,len=args.length;i<len;i++){
if(_791[args[i]]){
_791=_791[args[i]];
}else{
break;
}
}
return _791.helpLink||null;
};
var _793=function(){
var args=arguments;
var key=args[(args.length-1)];
var html="";
var _797=_783(args);
var _798=_78b(args);
var link=_78f(args);
var c=$("#"+key).attr("class"),classNames=[];
if(c.length){
classNames=c.split(" ");
}
var _79b="";
for(var i=0,len=classNames.length;i<len;i++){
if(classNames[i]!=="more"&&classNames[i]!=="standalone"&&classNames[i]!=="tier3-list"&&classNames[i]!=="tier1"&&classNames[i]!=="hover"&&classNames[i]!=="active"){
_79b=classNames[i];
}
}
if(_797){
html+="<h2 class=\""+_79b+"\">"+_797+"</h2>";
}
if(_798){
html+="<p>"+_798+"</p>";
}
if(link){
html+="<p><a class=\"helpPopup\" data-help-url=\""+link+"\" href=\""+link+"\">"+_75c.replace("{0}",_797)+"</a></p>";
}
return html;
};
var _79d=function(){
var args=Array.prototype.slice.apply(arguments);
var _79f=args.shift();
var _7a0,list;
var key=args[(args.length-1)];
var list="<div class=\"recentScroller\"><ul>";
for(var i=0,len=_79f.length;i<len;i++){
list+="<li><a href=\""+_79f[i][1]+"\" class=\"recent-item\">"+_79f[i][0]+"</a></li>";
}
list+="</ul></div>";
_7a0="<h2 class=\""+key+"\">Recent "+_787.apply(this,args)+"</h2>";
return _7a0+list;
};
var _7a4=function(){
var _7a5=this;
var args=Array.prototype.slice.apply(arguments);
var _7a7=args.shift();
var key=args[(args.length-1)];
if(typeof hasRecentItems!=="undefined"&&hasRecentItems[key]){
$(".help-text-container",_7a5).hide();
$(".recent-items-container",_7a5).show().curReturn;
_777(_7a5,_75b,key,args.length);
$.dr.menu.getRecentItemsJson(key,_7a7,function(json,_7aa){
var html=_79d(json.items,args);
_777(_7a5,html,key,args.length);
},_770);
}else{
$(".help-text-container",_7a5).show();
$(".recent-items-container",_7a5).hide();
var html=_793.apply(this,args);
_772(_7a5,html,args.length);
}
};
var _7ad=function(){
var _7ae=this;
var args=Array.prototype.slice.apply(arguments);
var _7b0=args.shift();
var key=args[(args.length-1)];
if(typeof hasRecentItems!=="undefined"&&hasRecentItems[key]){
$(".help-text-container",_7ae).hide();
$(".recent-items-container",_7ae).show().curReturn;
_777(_7ae,_75b,key,args.length);
var fn=function(json,_7b4){
var html=_79d(json.items,key);
_777(_7ae,html,key,1);
};
getRecentItemsJson(key,_7b0,fn,_770);
}else{
$(".help-text-container",_7ae).show();
$(".recent-items-container",_7ae).hide();
var html=_793.apply(this,args);
_772(_7ae,html,1);
}
};
var _7b7=[{open:500,close:500},{open:500,close:500}];
$.namespace("dr",{menu:function(_7b8){
var _7b9=$(this),fadeSpeed=$.browser.msie?0:200;
var _7ba=function(_7bb,_7bc){
childWidth=$(_7bc).width();
windowWidth=$(window).width();
posX=$(_7bb).offset().left;
targetPosX=posX-(childWidth*0.05)-10;
if((targetPosX+childWidth)>windowWidth){
targetPosX=windowWidth-childWidth;
}else{
if(targetPosX<0){
targetPosX=0;
}
}
return targetPosX;
};
var _7bd=function(){
$(".mega-menu",_7b9).each(function(idx){
$(this).css({"left":_7ba($(this).parent(),$(this))+"px","display":"none"});
});
};
return this.each(function(_7bf){
var _7c0=$.extend(true,_7b8,_75d);
$(".wrapper",_7b9).dr.shadows().find(".inner").setMaxHeight(["ul","div"],_75a);
var _7c1,tier1ID,tier2ID,tier3ID,animator;
$(".mega-menu",this).bind("menuOpen",function(e){
var _7c3=$(e.target);
_76d(_7c1,animator);
var $li=_7c3.parents("ul.nav >li");
tier1ID=$li.attr("id");
var _7c5=$(".help-text",_7c3).removeClass("hover");
if(_7c3.find("ul.tier2-list>li.active").length==0){
_7a4.call(_7c5,_7c0,tier1ID);
}else{
_7a4.call(_7c5,_7c0,tier1ID,tier2ID);
}
_7c1=setTimeout(function(){
$.dr.menu.showMethod.call(_7c3,fadeSpeed,function(){
_7c3.data("active",true);
});
},_7c3.data("interval").open-fadeSpeed);
}).bind("menuClose",function(e){
var _7c7=$(e.target);
_76d(_7c1,animator);
if(_7c7.data("active")){
_7c1=setTimeout(function(){
$.dr.menu.hideMethod.call(_7c7,fadeSpeed,function(){
_7c7.data("active",false).parent().removeClass("hover");
});
},_7c7.data("interval").close);
}else{
_7c7.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:_7b7[$(this).parents(".mega-menu").length].open,close:_7b7[$(this).parents(".mega-menu").length].close});
}).find("a").click(function(){
if($(this).parent().hasClass("more")){
return false;
}else{
$(".mega-menu",_7b9).hide();
}
});
$("> li",this).hover(function(){
$(".mega-menu:not(:eq("+$(".mega-menu",$(this)).data("idx")+"))",_7b9).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();
});
var _7ca;
$("ul.tier2-list>li>a",this).bind("mouseover",function(evt){
_76d(_7c1,animator);
var $a=$(evt.target);
var $li=$a.parent();
var _7ce=$li.parent().siblings(".help-text").removeClass("hover");
if(tier3ID){
$("ul.tier3-list",_7b9).removeClass("active");
tier3ID=null;
}
if($li.hasClass("more")){
var fn=function(){
tier2ID=$li.attr("id");
if(_7ca){
_7ca.parent("li").removeClass("active");
_7ca.hide();
}
_7ca=$a.siblings("div.tier3-container").show().curReturn;
_7ca.parent().addClass("active");
_7a4.call(_7ce,_7c0,tier1ID,tier2ID);
};
animator=_7ce;
if(_7ce.hasClass("mega-menu-help-collapsed")){
_7c1=setTimeout(fn,_7b7[0].open);
}else{
_7c1=setTimeout(function(){
animator.removeClass("hover").animate({left:"+=210px",width:"-=210px"},fadeSpeed,fn);
},_7b7[0].open);
}
}else{
if($a.parent().hasClass("standalone")){
animator=_7ce;
var fn=function(){
tier2ID=$li.attr("id");
if(_7ca){
_7ca.parent("li").removeClass("active");
_7ca.hide();
}
_7ad.call(_7ce,_7c0,tier1ID,tier2ID);
};
if(_7ce.hasClass("mega-menu-help-expanded")){
_7c1=setTimeout(fn,_7b7[0].close);
}else{
_7c1=setTimeout(function(){
animator.removeClass("hover").animate({left:"-=210px",width:"+=210px"},fadeSpeed,fn);
},_7b7[1].close);
}
}
}
$li.addClass("hover");
}).bind("mouseout",function(evt){
_76d(_7c1,animator);
var $a=$(evt.target);
var $li=$a.parent();
var _7d3=$li.parent().siblings(".help-text").removeClass("hover");
$li.removeClass("hover");
var fn=function(){
if(_7ca){
_7ca.parent("li").removeClass("active");
_7ca.hide();
}
_7ca=null;
_7a4.call(_7d3,_7c0,tier1ID);
};
animator=_7d3;
if(_7d3.hasClass("mega-menu-help-expanded")){
_7c1=setTimeout(fn,_7b7[0].close);
}else{
_7c1=setTimeout(function(){
animator.animate({left:"-=210px",width:"+=210px"},fadeSpeed,fn);
},_7b7[1].close);
}
});
$(".tier2-list div.tier3-container",_7b9).each(function(){
$(this).height($(this).parents(".inner").innerHeight());
}).hide().bind("mouseenter",function(){
if(!tier3ID){
_76d(_7c1,animator);
}
});
$("ul.tier3-list").hover(function(){
var _7d5=$(this);
_76d(_7c1,animator);
var _7d6=_7d5.parents(".mega-menu").find(".help-text").addClass("hover");
_7d5.addClass("hover").find("a").addClass("over");
tier3ID=_7d5.attr("id");
_7c1=setTimeout(function(){
_7a4.call(_7d6,_7c0,tier1ID,tier2ID,tier3ID);
_7d5.addClass("active").siblings().removeClass("active");
},_7b7[1].open);
},function(){
var _7d7=$(this);
_76d(_7c1,animator);
_7d7.removeClass("hover").find("a").removeClass("over");
var _7d8=_7d7.parents(".mega-menu").find(".help-text");
_7c1=setTimeout(function(){
tier3ID=null;
_7d8.removeClass("hover");
_7d7.removeClass("active").siblings().removeClass("active");
_7a4.call(_7d8,_7c0,tier1ID,tier2ID);
},_7b7[1].close);
});
$(".help-text",this).each(function(){
$(this).height($(this).parent().innerHeight());
}).bind("mouseenter",function(evt){
_76d(_7c1);
if(!tier3ID){
$(this).removeClass("hover").removeClass("actve");
}
}).bind("mouseleave",function(evt){
var _7db=$(this);
_7db.removeClass("hover");
});
$(window).bind("load resize",_7bd);
});
}});
var _7dc=function(){
$(".nav").dr.menu();
};
$.dr.addDomReadyEvent(_7dc,"domReadyEarly");
})(jQuery);
(function($){
$.namespace("dr",{navigation:function(){
var _7de=$(this),timeout="",fadeSpeed=!$.browser.msie?"fast":0;
var _7df=[{"open":"100","close":"800"}];
var rows={"dfltCol":"3","oneCol":"1","twoCol":"2"};
var _7e1=function(_7e2,_7e3){
childWidth=$(_7e3).width();
windowWidth=$(window).width();
posX=$(_7e2).offset().left;
targetPosX=posX-(childWidth*0.05)-10;
if((targetPosX+childWidth)>windowWidth){
targetPosX=windowWidth-childWidth;
}else{
if(targetPosX<0){
targetPosX=0;
}
}
return targetPosX;
};
var _7e4=function(){
$(".menu",_7de).each(function(idx){
$(this).css({"left":_7e1($(this).parent(),$(this))+"px","display":"none"});
});
};
var _7e6=function(){
var _7e7="";
for(var key in rows){
if($(this).attr("class").match(key)){
_7e7=rows[key];
}
}
return _7e7==""?rows.dfltCol:_7e7;
};
return this.each(function(){
$(".menu:not(.mega-menu)",this).bind("menuOpen",function(e){
var _7ea=$(e.target);
if(typeof (timeout)!="undefined"){
clearTimeout(timeout);
}
timeout=setTimeout(function(){
_7ea.fadeIn(fadeSpeed,function(){
_7ea.data("active",true);
});
},_7ea.data("interval").open);
}).bind("menuClose",function(e){
var _7ec=$(e.target);
if(typeof (timeout)!="undefined"){
clearTimeout(timeout);
}
if(_7ec.data("active")){
timeout=setTimeout(function(){
_7ec.fadeOut(fadeSpeed,function(){
_7ec.data("active",false).parent().removeClass("hover");
});
},_7ec.data("interval").close);
}else{
_7ec.hide().parent().removeClass("hover");
}
}).each(function(idx){
$(this).data("idx",idx).data("active",false).data("interval",{open:_7df[$(this).parents(".menu").length].open,close:_7df[$(this).parents(".menu").length].close});
}).find("a").click(function(){
$(".menu",_7de).hide();
}).end().find("> ul").dr.shadows().each(function(){
var _7ee=$(this),rowHeights=[];
$(this).children().each(function(_7ef){
var row=_7ef==0?0:Math.floor(_7ef/_7e6.call(_7ee));
$(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")+"))",_7de).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",_7e4);
});
}});
var _7f2=function(){
$(".nav").dr.navigation();
};
$.dr.addDomReadyEvent(_7f2,"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 _7f5="",defaults={deepLink:true,activeTab:0,displayEffect:{animation:"fade",speed:"normal"}};
var _7f6=function(ypos){
$(this).stop().animate({backgroundPosition:"0 "+ypos+"px"},250);
};
var _7f8=function(){
_7f6.call(this,-535);
};
var _7f9=function(){
_7f6.call(this,-500);
};
$.namespace("dr",{tabs:function(_7fa){
var _7fb=$.extend(true,defaults,_7fa);
var _7fc=_7fb.displayEffect.animation.toLowerCase(),animation={show:$.fn.show,hide:$.fn.hide,speed:_7fb.displayEffect.speed};
if($.browser.msie){
_7fc="none";
}
switch(_7fc){
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.each(function(){
var _7fd=$(this),defaultTab=0,activeTab,tabIDArray=[];
var _7fe=function(_7ff,_800,_801){
_7fd.find("> dt").removeClass("active").eq(_7ff).addClass("active").end().end().find("> dd").hide().eq(_7ff).show();
_800.call(_7fd.find("> dd > div.tabContent").hide().eq(_7ff),_801);
activeTab=_7ff;
};
var _802=function(){
_7fd.find("> dt").each(function(_803){
var _804=encodeURI((_803==0)?"/":"/"+$.trim($(this).text()).replace(/\s+/g,"-"));
$(this).data("label",_804).data("count",_803).click(function(){
$.address.value($(this).data("label"));
});
tabIDArray.push(_804.toLowerCase());
});
$.address.change(function(_805){
var _806=encodeURI($.trim(_805.value)).toLowerCase();
var _807=_7fd.find("> dt").filter(function(){
var _808=$(this).data("label");
return (_808)?(_808.toLowerCase()==_806):false;
}).data("count");
if(activeTab!=_807&&_7f5!=_805.path){
if(typeof activeTab==="undefined"&&typeof defaultTab!=="undefined"&&_805.path=="/"){
_807=defaultTab;
}
var _809=false;
for(var i=0;i<tabIDArray.length;i++){
if(tabIDArray[i]==_806){
_7fe(_807,animation.show,animation.speed);
break;
}
}
}
_7f5=_805.path;
});
};
var _80b=(_7fb.deepLink&&!_7fd.parents("dl.tabs").length&&!$("body").hasClass("modalPage"));
var _80c=_7fd.find("> dt").find("script").remove().end().prependTo(this).each(function(_80d){
var $dt=$(this);
var _80f="";
if(!$dt.hasClass("tab")){
_80f="tab ";
}
if((_80d===0)&&!$dt.hasClass("first")){
_80f+="first ";
}
if($dt.hasClass("active")){
defaultTab=_80d;
}
if($("a",this).length){
_80f+="tabLink";
_80b=false;
}else{
if(!_80b&&!$dt.hasClass("preventClick")){
var _810=function(){
if(!$(this).hasClass("active")){
_7fe(_80d,animation.show,animation.speed);
}
return false;
};
$dt.click(_810).bind("show",_810);
}
}
if(_80f.length){
$dt.addClass($.trim(_80f));
}
}).hover(_7f8,_7f9).length;
var _811=_7fd.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 _813="";
for(var i=_811;i<_80c;i++){
_813+="<dd class=\"tabContainer\"><div class=\"tabContent\"/></dd>";
}
if(_813.length){
_7fd.append(_813);
}
if(_80b){
if($.address.ready()){
_802();
}else{
$(document).bind("onAddressActivated",function(){
_802();
});
$.address.activate();
}
}else{
_7fe(defaultTab||_7fb.activeTab,animation.show,0);
}
});
}});
$.dr.tabs={getDefaults:function(){
return defaults;
},setDefaults:function(_815){
if(_815){
$.extend(true,defaults,_815);
}
$(document).trigger("afterTabSetDefaults",[_815]);
}};
$.dr.addUnobtrusiveEvent(function(evt,_817){
$("dl.tabs",_817).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 _822=new RGBColor(Color.hexToDec(h.substring(0,2)),Color.hexToDec(h.substring(2,4)),Color.hexToDec(h.substring(4,6)));
return _822;
};
Color.hexToDec=function(h){
return parseInt(h,16);
};
Color.parseHex=function(h){
h=h.toUpperCase();
var _825=null;
var _826=null;
if((h.indexOf("#")!=-1&&h.length==7)||(h.indexOf("#")==-1&&h.length==6)){
_825=/\#{0,1}((([ABCDEF]|\d){2}){3})/;
_826=h.match(_825);
h=(_826!==null)?_826[1]:null;
}else{
if((h.indexOf("#")!=-1&&h.length==4)||(h.indexOf("#")==-1&&h.length==3)){
_825=/\#{0,1}(([ABCDEF]|\d{1})([ABCDEF]|\d{1})([ABCDEF]|\d{1}))/;
_826=h.match(_825);
h=(_826!==null)?_826[2]+_826[2]+_826[3]+_826[3]+_826[4]+_826[4]:null;
}else{
_825=/\#{0,1}(([ABCDEF]|\d){1,6})/;
_826=h.match(_825);
h=(_826!==null)?_826[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 _82c=String.fromCharCode(key).toUpperCase();
var _82d=Color.HEX_VALUES+"#";
if((key===null)||(key===0)||(key==8)||(key==9)||(key==13)||(key==27)){
return true;
}else{
if((Color.HEX_VALUES.indexOf(_82c)>-1||((Color.HEX_SYMBOL.indexOf(_82c)>-1)&&obj.value.length<=0))){
return _82c;
}else{
return false;
}
}
};
Color.decMask=function(evt){
var key=(evt.which)?evt.which:event.keyCode;
var _830=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(_830)>-1)){
return _830;
}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 _839=Color.hexToRgb(this.hex);
this.red=_839.red;
this.green=_839.green;
this.blue=_839.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 _83b=function(_83c,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=_83c;
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 _83e="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;
_83b.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 _83f=this.inputObj.parentNode;
var _840=false;
while(!_840){
if((_83f.tagName=="BODY")||(_83f.tagName=="HTML")){
break;
}
if(_83f.tagName=="DIV"||_83f.tagName=="DD"||_83f.tagName=="TD"){
_840=true;
}else{
_83f=_83f.parentNode;
}
}
var _841=document.createElement("div");
_841.className="colorPickerSample";
_841.innerHTML="<div id=\""+this.sampleColorId+"\" style=\"background-color:"+this.currentColor.toHexString()+"\"></div>";
_841=DR.Utils.insertAfter(_83f,_841,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(_83f,d,_841);
var _843=this;
var func=function(evt){
_843.toggle(evt);
};
DR.Utils.addEvent(this.pickerIconObj,"click",func);
DR.Utils.addEvent(this.sampleColorObj,"click",func);
DR.Utils.addEvent(this.inputObj,"click",func);
var _846=_83f.getElementsByTagName("span");
var _847=false;
if(_846.length>0){
if(DR.Utils.hasCSSClass(_846[0],"hint")){
_847=true;
}
}
if(!_847){
var s=document.createElement("span");
s.innerHTML="#"+this.defaultHexColor;
s.className="hint";
DR.Utils.insertAfter(_83f,s,this.pickerIconObj);
}
DR.Utils.addCSSClass(this.inputObj,"colorPickerEnabled");
}
},buildPopup:function(){
if(POPUP_UI===null){
var _849=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}/,_83e).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=_849.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 _850=function(evt){
if(window.event){
window.event.cancelBubble=true;
}else{
evt.stopPropagation();
evt.preventDefault();
}
};
this.stopClick=_850;
DR.Utils.addEvent(this.popupObj,"click",_850,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 _853=5;
var _854=0;
var _855="Right";
var _856="Top";
var _857="Right";
var _858="Down";
DR.Utils.Position.snapTo(this.inputObj,this.popupObj,_853,_854,_855,_856,_857,_858);
var _859=this;
var func=function(){
_859.addDocumentOnclick();
};
window.setTimeout(func,50);
this._open=true;
},addDocumentOnclick:function(){
var _85b=this;
var func=function(){
_85b.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(_85f,evt){
this.currentChannel=_85f;
var _861=this;
var _862=function(evt){
_861.doDrag(evt);
};
var _864=function(evt){
_861.stopDrag(evt);
};
this.mouseup=_864;
this.mousemove=_862;
DR.Utils.addEvent(document,"mousemove",_862,false);
DR.Utils.addEvent(document,"mouseup",_864,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 _868=this.popupObj.offsetLeft+this.colorPickerRampsObj.offsetLeft;
_868+=(this.rampLeftOffset-(this.sliderIconSize/2));
var x=this.constrainSlider(evt.clientX-_868+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 _86c=this.rampLeftOffset;
var _86d=_86c+this.rampScale;
var newX=Math.min(Math.max(_86c,x),_86d);
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(_86f,dec){
var _871=Math.round(Color.decToPercent(dec));
_871=_871+this.rampLeftOffset;
_86f.style.left=_871+"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 _873=obj.value;
var _874=obj.name;
if(_874=="red"){
this.currentColor.setRedChannel(_873);
}else{
if(_874=="green"){
this.currentColor.setGreenChannel(_873);
}
}
if(_874=="blue"){
this.currentColor.setBlueChannel(_873);
}
this.currentChannel=_874;
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,_878){
var key=(evt.which)?evt.which:event.keyCode;
var _87a=(_878)?true:false;
if(key==13){
if(!_87a){
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 _87b="jQuery('#"+this.id+"').get(0).colorPicker";
this.colorPicker=new _83b(_87b,this);
$(this).addClass("colorPicker_inited");
}
}
});
}});
$.dr.colorPicker={getInstance:function(){
return INSTANCE;
}};
var _87c=function(_87d){
_87d.filter("input[type=text].colorPicker").dr.colorPicker();
};
$.dr.addPlugin("form",_87c);
})(jQuery);
(function($){
var _87f=0,ANY_DATE_PICKERS_OPEN=false;
var _880={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 _881="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 _882=[_881,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 _882[i];
};
$.dr.date.getMonthAbbr=function(i){
return MONTH_ABBREVIATIONS[i];
};
$.dr.date.getDayAbbr=function(i){
return DAY_HEADERS[i];
};
var _886=function(_887,fObj,_889,_88a){
this.pickerObjId=_887;
this.init(fObj,_889,_88a);
};
_886.prototype={init:function(fObj,_88c,_88d){
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=(_88d)?_88d:$.dr.date.getDefaultFormat();
this._label=(_88c)?_88c.replace(":",""):_880.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 _88e=this.inputObj.parentNode;
var _88f=false;
while(!_88f){
if((_88e.tagName=="BODY")||(_88e.tagName=="HTML")){
break;
}
if(_88e.tagName=="DIV"||_88e.tagName=="DD"||_88e.tagName=="TD"){
_88f=true;
}else{
_88e=_88e.parentNode;
}
}
var divs=_88e.getElementsByTagName("div");
var _891=false;
var _892=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 _894=this;
var func=function(evt){
_894.toggle(evt);
};
$(d).click(func);
$(this.inputObj).click(func);
this.pickerIcon=DR.Utils.insertAfter(_88e,d,this.inputObj);
}
var _897=_88e.getElementsByTagName("span");
var _898=false;
if(_897.length>0){
if($(_897[0]).hasClass("hint")){
_898=true;
}
}
if(!_898){
var s=document.createElement("span");
s.className="hint";
var _89a=new $.dr.date(new Date(),this.dateFormat);
s.innerHTML=this.dateFormat+" ("+_89a.toFormattedString()+")";
s.title=s.innerHTML;
DR.Utils.insertAfter(_88e,s,this.pickerIcon);
}
$(this.inputObj).addClass("datePickerEnabled").attr("autocomplete","off");
}
},toggle:function(evt,_89c){
if(this.contentArea===null){
var _89d=document.getElementById(this.popupId);
if(_89d===null){
var _89e=document.getElementsByTagName("body")[0];
var d=document.createElement("DIV");
d.id=this.popupId;
d.className="datePickerContent";
this.contentArea=_89e.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=_89d;
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 _8a1=this;
var func=function(evt){
_8a1.shouldHide(evt);
};
this.shouldHideFunc=func;
$(document).click(func);
this.setInputFieldDate();
this.refreshCalendar();
this.showPopup();
var _8a4=this.overlay.shadowRight;
var _8a5=this.overlay.shadowBottom;
var _8a6=-(_8a4/2);
var _8a7=0;
if(DR.Utils.BrowserDetect.browser=="Explorer"&&DR.Utils.BrowserDetect.version<7){
_8a6=0;
_8a7=2;
}
var _8a8="Left";
var _8a9="Bottom";
var _8aa="Right";
var _8ab="Down";
DR.Utils.Position.snapTo(this.inputObj,this.popupObj,_8a6,_8a7,_8a8,_8a9,_8aa,_8ab);
},shouldHide:function(evt){
var o=evt.target;
var _8ae=(o.id==this.inputId+"_todayLink")?true:false;
while(o){
var _8af=(o.getAttribute)?o.getAttribute("datePickerId"):null;
if(this.inputId==_8af){
_8ae=true;
break;
}else{
if(o.id!==undefined){
if(o.id==("modal_"+this.popupId)||o.id==this.pickerIconId||o.id==this.inputId){
_8ae=true;
break;
}
}
}
o=o.parentNode;
}
if(!_8ae){
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 _8b0=this;
var func=function(){
_8b0.showPopup();
};
window.setTimeout(func,50);
}else{
if(this.popupObj===null){
var _8b2=overlayStack.getById(this.popupId);
if(_8b2===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=_8b2;
}
this.overlay.setTitle(this._label);
this.popupObj=$("#modal_"+this.popupId).addClass("datePickerOverlay")[0];
this.overlay.show();
}else{
this.overlay.show();
}
}
},updateDateInput:function(evt,year,_8b7,day){
this.inputObj.value=this.getDateString(year,_8b7,day);
if(typeof this.inputObj.onchange=="function"){
this.inputObj.onchange();
}
this.hide();
},getDateString:function(year,_8ba,day){
var date=new Date();
date.setFullYear(year,_8ba-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 _8be=this.displayMonth-1;
var year=this.displayYear;
if(_8be<1){
_8be=12;
year--;
}
this.refreshCalendar(year,_8be);
},loadNextMonth:function(){
var _8c0=this.displayMonth+1;
var year=this.displayYear;
if(_8c0>12){
_8c0=1;
year++;
}
this.refreshCalendar(year,_8c0);
},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 _8c4=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 _8c6=date.getDay();
this.displayDateOffset=(_8c6>=_87f)?_8c6-_87f:7-_87f+_8c6;
},refreshMenu:function(){
if(this.menuYearSelect!==null){
if(this.menuYearSelect.options.length==0){
this.menuBuilt=false;
}else{
var _8c7=parseInt(this.menuYearSelect.options[0].value,10);
var _8c8=parseInt(this.menuYearSelect.options[this.menuYearSelect.options.length-1].value,10);
if((this.displayYear<=_8c7)||(this.displayYear>=_8c8)){
this.menuBuilt=false;
}
}
}
if(!this.menuBuilt){
var _8c9="";
var _8ca;
_8c9+="<div class=\"monthYearPicker\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" ><tr>\n";
_8c9+="<td class=\"previousArrow\"><a href=\"#\" onclick=\""+this.pickerObjId+".loadPreviousMonth(); return false;\"><span>&lt;&lt;</span></a></td>";
var _8cb=this.pickerObjId+".refreshCalendar("+this.pickerObjId+".displayYear, this.options[this.selectedIndex].value-0)";
var _8cc=this.pickerObjId+".refreshCalendar(this.options[this.selectedIndex].value-0, "+this.pickerObjId+".displayMonth)";
_8c9+="<td class=\"monthTD\"><select name=\"cpMonth\" id=\""+this.inputId+"_monthControl\" onkeyup=\""+_8cb+"\" onchange=\""+_8cb+"\" >";
for(var _8cd=1;_8cd<=12;_8cd++){
_8ca=(_8cd==this.displayMonth)?"SELECTED":"";
_8c9+="<option value=\""+_8cd+"\" "+_8ca+">"+_882[_8cd-1]+"</option>";
}
_8c9+="</select></td>";
_8c9+="<td class=\"yearTD\"><select name=\"cpYear\" id=\""+this.inputId+"_yearControl\" onkeyup=\""+_8cc+"\" onchange=\""+_8cc+"\" >";
for(var _8ce=this.displayYear-_880.YEAR_SELECT_OFFSET;_8ce<=this.displayYear+_880.YEAR_SELECT_OFFSET;_8ce++){
_8ca=(_8ce==this.displayYear)?"selected":"";
_8c9+="<option value=\""+_8ce+"\" "+_8ca+">"+_8ce+"</option>";
}
_8c9+="</select></td><td class=\"nextArrow\" ><a href=\"#\" onclick=\""+this.pickerObjId+".loadNextMonth(); return false;\"><span>&gt;&gt;</span></a></td></tr>\n";
_8c9+="</table></div>\n";
this.menuArea.innerHTML=_8c9;
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 _8cf="";
_8cf+="<div class=\"datesArea\"><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"calendar\"><thead><tr>";
var _8d0=this.displayMonth;
var _8d1=1;
var _8d2=this.displayYear;
if(this.displayDateOffset>0){
_8d0--;
if(_8d0<1){
_8d0=12;
_8d2--;
}
_8d1=(this.numDaysInMonth[_8d0]-this.displayDateOffset)+1;
}
for(var j=0;j<7;j++){
_8cf+="<th class=\"dayOfWeekName\" width=\"14%\">"+DAY_HEADERS[(_87f+j)%7]+"</th>\n";
}
_8cf+="</thead><tbody>";
for(var row=1;row<=6;row++){
_8cf+="<tr>\n";
for(var col=1;col<=7;col++){
var _8d6=$.dr.date.getISODate(_8d2,_8d0,_8d1);
var _8d7=this.setDateClassName(_8d6);
if((row>4)&&(col==1)&&(_8d7==_880.CSS_CLASS_OTHER_MONTH_DATE)){
_8cf+="<td colspan=\"7\">&nbsp;</td>";
break;
}else{
_8cf+="<td class=\""+_880.CSS_CLASS_DATE+" "+_8d7+"\"><a href=\"#\" onclick=\""+this.pickerObjId+".updateDateInput(event, "+_8d2+", "+_8d0+", "+_8d1+"); return false;\" class=\""+_8d7+"\">"+_8d1+"</a></td>\n";
}
_8d1++;
if(_8d1>this.numDaysInMonth[_8d0]){
_8d1=1;
_8d0++;
}
if(_8d0>12){
_8d0=1;
_8d2++;
}
}
_8cf+="</tr>";
}
_8cf+="</tbody></table></div>\n";
if(!this.currentMonthHasTodaysDate){
_8cf+="<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 _8cf;
},setDateClassName:function(date){
var _8d9=date.getMonth()+1;
var year=date.getFullYear();
var day=date.getDate();
var _8dc="";
if(this.hasInputFieldValue&&_8d9==this.inputFieldMonth&&year==this.inputFieldYear&&day==this.inputFieldDay){
_8dc=_880.CSS_CLASS_DISPLAY_DATE_CLASS+" ";
}
if(_8d9==this.todaysMonth&&year==this.todaysYear&&day==this.todaysDay){
this.currentMonthHasTodaysDate=true;
_8dc+=_880.CSS_CLASS_TODAYS_DATE;
}else{
if(_8d9==this.displayMonth&&year==this.displayYear){
_8dc+=_880.CSS_CLASS_DISPLAY_MONTH_DATE;
}else{
_8dc+=_880.CSS_CLASS_OTHER_MONTH_DATE;
}
}
return _8dc;
}};
$.namespace("dr",{datePicker:function(){
return this.each(function(_8dd){
if(this.type=="text"){
var _8de=$(this);
if(!_8de.hasClass("datePicker_inited")){
_8de.addClass("datePicker");
var _8df=_8de.attr("data-format");
var jRef="#"+this.id;
if(!this.id){
var id="datePicker_count_"+_8dd+"_rndNbr_"+new Date().getTime();
_8de.addClass(id);
jRef="."+id;
_8de.attr("datePickerId",id);
}
var _8e2="jQuery(jQuery('"+jRef+"').get(0)).data('datePicker')";
var _8e3=$.dr.utils.getLabel(this);
if(_8e3==this.name){
_8e3=null;
}
_8de.data("datePicker",new _886(_8e2,this,_8e3,_8df));
_8de.addClass("datePicker_inited");
}
}
});
}});
var _8e4=function(_8e5){
_8e5.filter("input[type=text].datePicker").dr.datePicker();
};
$.dr.addPlugin("form",_8e4);
$.dr.datePicker={setDefaults:function(_8e6){
if(_8e6){
$.extend(_880,_8e6);
}
}};
})(jQuery);
(function($){
var _8e8={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 _8e9={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 _8ea=function(val,_8ec,msg,_8ee,_8ef){
_8ee=(_8ee)?_8ee:"";
_8ef=(_8ef)?_8ef:"";
return msg.replace(/\{LABEL\}/g,_8ec).replace(/\{VALUE\}/g,val).replace(/\{FORMAT\}/g,_8ee).replace(/\{EXAMPLE\}/g,_8ef);
};
var _8f0={email:[_8e9.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:[_8e9.URL,"http://website.com",function(val,_8f3){
if(_8f3=="website"){
return /^(http:|https:)(\/){2}?[^\/]\S+\.\S+/.test(val);
}else{
return /^[a-zA-Z0-9\-.+]*:(\/){2}[\S]?/.test(val);
}
}],phonenumber:[_8e9.PHONE_NUMBER,"###-###-####",function(val,_8f5){
if(!_8f5){
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(_8f5=="strict"){
return /^[1-9]\d{2}-\d{3}-\d{4}$/.test(val);
}else{
if(_8f5=="integer"){
return /^\d{10}$/.test(val);
}
}
}
}],alpha:[_8e9.ALPHA,"",function(val){
return /^[a-zA-Z]+$/.test(val);
}],alphanumeric:[_8e9.ALPHA_NUMERIC,"",function(val){
return /^[0-9A-Za-z-_ @#]+$/.test(val);
}],currency:[_8e9.CURRENCY,"#,###.##",function(val,_8f9,obj){
if(val===null||val===undefined){
return false;
}
if(!_8f9){
_8f9=_8e8.CURRENCY;
}
var num=val.replace(_8f9,"");
if(_8f9==" 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:[_8e9.DECIMAL,"###,###.##",function(val,_8fd,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:[_8e9.INTEGER,"",function(val){
return /^[+-]?[0-9]+$/.test(val);
}],numeric:[_8e9.NUMERIC,"",function(val,_902,obj){
if(val===null||val===undefined){
return false;
}
return !isNaN(Number($.dr.utils.normalizeNumber(val,$.dr.utils.getNumberFormat(obj))));
}]};
var _904={dataType:function(obj,val,_907,_908){
var _909=true;
var _90a=obj.getAttribute("data-type");
var _90b=obj.getAttribute("data-example");
var _90c=obj.getAttribute("data-format");
var msg="";
var jObj=$(obj);
if(_90a!==null){
_90a=_90a.toLowerCase();
var _90f=_8f0[_90a];
if(_90f===undefined){
if(window.console){
console.log("The validator for data-type=\""+_90a+"\" for field with name \""+obj.name+"\" does not exist.");
}
return true;
}
if(val.isBlank()){
$(obj.form).dr.form.removeError(obj,_90a);
}else{
var _910=_90f[0];
var _911=(_90b!==null)?_90b:_90f[1];
if(!$.dr.form.isDataValidForType(_90a,val,_90c,obj)){
msg=_910;
}else{
var min=obj.getAttribute("data-min");
var max=obj.getAttribute("data-max");
var _914=$.dr.form.isDataValidForType(_90a,min,_90c,obj);
var _915=$.dr.form.isDataValidForType(_90a,max,_90c,obj);
if(min!==null||max!==null){
if((min!==null&&!_914)||(max!==null&&!_915)){
_909=false;
msg="The value is correct for {LABEL}, but the specified range options are not of the correct data type.";
}else{
var _916,upperBound,value;
if(_90a=="date"&&typeof $.dr.date=="function"){
value=new $.dr.date(val,_90c).getTime();
_916=(min!==null)?new $.dr.date(min,_90c).getTime():null;
upperBound=(max!==null)?new $.dr.date(max,_90c).getTime():null;
}else{
if(_90a=="time12hr"||_90a=="time24hr"){
value=$.dr.date.getDateFromTime(val);
_916=(min!==null)?$.dr.date.getDateFromTime(min):null;
upperBound=(max!==null)?$.dr.date.getDateFromTime(max):null;
}else{
var _917=$.dr.utils.getNumberFormat(obj);
value=$.dr.utils.convertCurrencyToNumber(obj,val,_90c,_917);
_916=$.dr.utils.convertCurrencyToNumber(obj,min,_90c,_917);
upperBound=$.dr.utils.convertCurrencyToNumber(obj,max,_90c,_917);
}
}
if(!isNaN(value)){
if(min!==null&&max!==null){
if(!isNaN(_916)&&!isNaN(upperBound)){
if(!(value>=_916&&value<=upperBound)){
msg=_8e9.RANGE.replace(/\{MAX\}/g,max).replace(/\{MIN\}/g,min);
}
}
}else{
if(max!==null&&!isNaN(upperBound)){
if(value>upperBound){
msg=_8e9.RANGE_MAX.replace(/\{MAX\}/g,max);
}
}else{
if(min!==null&&!isNaN(_916)){
if(value<_916){
msg=_8e9.RANGE_MIN.replace(/\{MIN\}/g,min);
}
}
}
}
}
}
}
}
if(msg!==""&&_908){
_909=false;
var _918=_8ea(val,jObj.data("label"),msg,_90c,_911);
$(obj.form).dr.form.throwError(obj,_90a,_918,_907);
}else{
$(obj.form).dr.form.removeError(obj,_90a);
}
}
}
return _909;
},required:function(obj,val,_91b,_91c){
var _91d=true;
var _91e=(obj.getAttribute("data-required")=="true")?true:false;
if(_91e){
switch(obj.type){
case "select-one":
case "text":
case "password":
case "textarea":
_91d=!val.isBlank();
break;
case "checkbox":
case "radio":
var _91f=$(obj.form[obj.name]);
_91d=(_91f.filter(":checked").length>0)?true:false;
obj=_91f[0];
if(!_91d){
var _920=$(obj).parents("dl:first").find("dt:first label").text();
$(obj).data("label",(_920.length>0)?_920.replace(":",""):"A selection");
}
break;
case "select-multiple":
_91d=(val!==null)?!(val+"").isBlank():false;
break;
}
if(!_91d&&_91c){
var _921=_8ea(val,$(obj).data("label"),_8e9.REQUIRED);
$(obj.form).dr.form.throwError(obj,"required",_921,_91b);
}else{
$(obj.form).dr.form.removeError(obj,"required");
}
}
return _91d;
},customValidator:function(obj,val,_924,_925){
var _926=true;
var _927=obj.getAttribute("data-custom-validator");
var _928=obj.getAttribute("data-custom-validator-message");
if(_927!==null){
var _929=eval(_927);
if(!_929&&_925){
_926=false;
if(_928!==null){
var _92a=_928;
$(obj.form).dr.form.throwError(obj,"custom",_92a,_924);
}
}else{
$(obj.form).dr.form.removeError(obj,"custom");
}
}
return _926;
},maxLength:function(obj,val,_92d,_92e){
var _92f=true;
var jObj=$(obj);
var _931=jObj.attr("data-maxlength");
if(_931!==undefined){
if(!isNaN(_931)&&_92e){
if(obj.type=="textarea"){
var _932=(jObj.attr("data-force-truncate")=="true")?true:false;
_92f=$.dr.utils.validateTextAreaLength(obj,_931,_932);
}else{
var _933=DR.Utils.FormUtils.getUTF8Bytes(val).byteCount;
_92f=(_933<=_931)?true:false;
}
}
if(!_92f){
var _934=_8e9.CHAR_LENGTH.replace(/\{LABEL\}/g,$(obj).data("label")).replace(/\{MAX_CHARS\}/g,_931);
$(obj.form).dr.form.throwError(obj,"maxlength",_934,_92d);
}else{
$(obj.form).dr.form.removeError(obj,"maxlength");
}
}
return _92f;
}};
$.dr.form.isDataValidForType=function(_935,val,_937,obj){
var _939=_8f0[_935.toLowerCase()];
if(_935===undefined){
return undefined;
}else{
return _939[2].call(this,val,_937,obj);
}
};
$.dr.utils.getNumberFormat=function(obj){
var _93b=$(obj).attr("data-number-locale");
return (_93b!==null)?_93b:_8e8.NUMBER_LOCALE;
};
var _93c=["IL","CN","JP","MY","KR","KP","TH","TW","PH","IN","PK","SG","HK","MX","PR","NG","BW","ZW"];
$.dr.utils.convertCurrencyToNumber=function(obj,val,_93f,_940){
if(val===null||val===undefined){
return false;
}
if(!_93f){
_93f=_8e8.CURRENCY;
}
var num=val.replace(_93f,"");
if(_93f==" CAD"){
num=num.replace("C$","");
num=num.replace("$","");
}
num=Number($.dr.utils.normalizeNumber(num,_940));
return num;
};
$.dr.utils.normalizeNumber=function(num,_943){
if(num===null||num===undefined){
return null;
}
_943=(_943)?_943:_8e8.NUMBER_LOCALE;
var arr=_943.split("_");
if(arr.length!=2){
_943="en_US";
arr=["en","US"];
}
var _945=arr[0].toLowerCase();
var _946=arr[1].toUpperCase();
var _947=(_945=="en")?true:false;
for(var i=0;i<_93c.length;i++){
if(_93c[i]==_946){
_947=true;
break;
}
}
var _949=num.indexOf(",");
var _94a=num.indexOf(".");
if(_947){
if(_94a>=_949||_94a==-1||_949==-1){
num=num.replace(/,/g,"");
}
}else{
if(_949>=_94a||_94a==-1||_949==-1){
num=num.replace(/\./g,"").replace(/,/g,".");
var _94b=_943.split(".");
if(_94b.length==2){
num=_94b[0].replace(/ /g,"");
}else{
num=num.replace(/ /g,"");
}
}
}
return num;
};
$.dr.form.addValidators=function(_94c){
if(typeof method=="object"){
$.extend(_904,_94c);
}
};
$.dr.form.addDataTypeValidator=function(_94d){
if(typeof _94d=="object"){
$.extend(_8f0,_94d);
}
};
$.dr.form.validateField=function(obj,_94f){
try{
var _950=($(obj).data("validationEnabled")===false)?false:true;
var jObj=$(obj);
var val=jObj.val();
var _953=jObj.data("label");
if(!_953){
_953=$.dr.utils.getLabel(obj);
jObj.data("label",_953);
}
var _954=true;
var _955=true;
var _956=jObj.attr("data-conditional-validation");
if(_956||!$(obj.form).dr.form.isValidationEnabled()){
if(!eval(_956)){
_955=false;
$(obj.form).dr.form.removeErrors(obj);
}
}
if(_955){
for(var _957 in _904){
var _958=_904[_957].call(this,obj,val,_94f,_950);
if(!_958){
_954=false;
}
}
}
return _954;
}
catch(e){
$.dr.utils.logError("Javascript exception when validating field (id="+obj.id+")",e);
}
};
var _959=function(){
$.dr.form.validateField(this,true);
};
var _95a=($.browser.msie)?"paste":"input";
var _95b=function(_95c){
if(_95c.length>0){
var _95d=$(this.formObj).data("formValidator");
if(_95d){
var _95e=_95c.filter(":input:not(:button)").filter("[data-maxlength], [data-required], [data-type], [data-custom-validator]");
if(_95e.length>0){
_95d.fieldsWithValidation=_95e;
_95d.options.validationEnabled=true;
_95e.filter(":not([id])").each(function(){
$(this).attr("id","rndID_"+new Date().getTime());
}).end().filter("input[type=text],input[type=password], select, textarea").blur(_959).change(_959).filter("*[data-maxlength]").keyup(_959).bind(_95a,_959).end().end().filter(":radio, :checkbox").click(_959).end();
if($.browser.mozilla){
_95e.filter("input[type=file]").bind("change",_959);
}
}
}
}
};
$.dr.addPlugin("form",_95b);
var _95f=function(_960,_961){
this.formObj=_960;
this.options=_961;
this.init();
};
_95f.prototype={init:function(){
this.validationErrors=[];
this.fieldsWithValidation=null;
this.errorGroupBoxOpen=false;
this.validationErrors=[];
},validate:function(){
try{
var _962=this.fieldsWithValidation;
if(_962===null){
return true;
}
if(!this.options.VALIDATE_HIDDEN_FIELDS){
if(this.validationErrors.length>0){
var _963=this;
_962.filter(":hidden").each(function(){
_963.removeErrors(this);
});
}
_962=_962.filter(":visible");
}
_962.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 _965;
if(this.options.GROUP_BOX_POSITION_ABOVE_FORM){
_965=document.getElementById(this.formObj._formName+"_groupErrorBox");
}else{
_965=document.getElementById("contentArea_groupErrorBox");
}
if(!_965){
var _966=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;
_966.insertBefore(d,f);
}else{
d.style.marginTop="15px";
_966.appendChild(d,this);
}
_965=d;
}
var s="<div style=\"margin-bottom:10px;\"><strong>"+_8e9.GROUP_ERROR_BOX_TITLE+"</strong></div><ul>";
s+=h;
s+="</ul>";
_965.innerHTML=s;
_965.style.display="block";
this.errorGroupBoxOpen=true;
},hideErrorGroupBox:function(){
var _96a=document.getElementById("contentArea_groupErrorBox");
if(!_96a||this.options.GROUP_BOX_POSITION_ABOVE_FORM){
_96a=document.getElementById(this.formObj._formName+"_groupErrorBox");
}
if(_96a){
_96a.style.display="none";
this.errorGroupBoxOpen=false;
}
},hideError:function(fObj,_96c){
var _96d=document.getElementById(fObj.id+"_"+_96c+"_error");
var _96e=document.getElementById(fObj.id+"_"+_96c+"_group_error");
var _96f;
if(_96d){
_96f=_96d.parentNode;
_96f.removeChild(_96d);
_96d=null;
_96f=null;
}
if(_96e){
_96f=_96e.parentNode;
_96f.removeChild(_96e);
_96e=null;
_96f=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,_971,_972,_973){
if((_973&&this.options.SHOW_INLINE_ERRORS_ONBLUR)||(!_973)){
var _974=document.getElementById(fObj.id+"_"+_971+"_error");
if(!_974){
var _975=fObj.parentNode;
var a=_975.childNodes;
var _977=false;
for(var i=0;i<a.length;i++){
if(a[i].className=="error"){
_977=true;
a[i].style.display="none";
}
}
var e=document.createElement("div");
e.className=this.options.INLINE_ERROR_CLASS;
e.innerHTML=_972;
e.id=fObj.id+"_"+_971+"_error";
if(this.options.INLINE_ERROR_POSITION=="above"){
var o=document.getElementById(fObj.id);
_975.insertBefore(e,o);
}else{
_975.appendChild(e,fObj);
}
}
}
if(!($.browser.safari&&fObj.type=="file")&&fObj.type!="radio"&&fObj.type!="checkbox"){
$(fObj).addClass(this.options.INPUT_ERROR_CLASS);
}
},showValidationErrors:function(_97b){
var h="";
var a=this.validationErrors;
var _97e=false;
for(var i=0;i<a.length;i++){
var _980=false;
var _981=a[i].errMsg;
var fObj=a[i].obj;
var type=fObj.type;
var _984=a[i].errType;
if(this.options.SHOW_INLINE_ERRORS){
this.displayInlineError(fObj,_984,_981,false);
}
if(this.options.FOCUS_FIRST_ERROR){
if(DR.Utils.FormUtils.checkAllowFocus(fObj)){
if(!_97e&&_97b){
var e=document.getElementById(fObj.id+"_"+_984+"_error");
if(e){
e.scrollIntoView();
}
fObj.focus();
_97e=true;
}
_980=true;
}
}
var _986=_981;
if(_980){
_986="<a href=\"#\" title=\""+_8e9.GROUP_ERROR_BOX_ITEM_TITLE+"\" onclick=\"document.getElementById('"+fObj.id+"_"+_984+"_error').scrollIntoView();document.getElementById('"+fObj.id+"').focus();return false;\" >"+_981+"</a>";
}
if(this.options.GROUP_BOX_ENABLED){
h+="<li id=\""+fObj.id+"_"+_984+"_group_error\" >"+_986+"</li>";
}
fObj=null;
}
if(this.options.GROUP_BOX_ENABLED){
this.showErrorGroupBox(h);
}
},checkErrorExists:function(fObj,_988){
var _989=-1;
var a=this.validationErrors;
for(var i=0;i<a.length;i++){
if(a[i].obj.id==fObj.id&&(a[i].errType==_988||_988===undefined)){
_989=i;
break;
}
}
return _989;
},throwError:function(fObj,_98d,_98e,_98f){
var _990=this.checkErrorExists(fObj,_98d);
if(_990==-1){
var e={};
e.errMsg=_98e;
e.errType=_98d;
e.obj=fObj;
this.validationErrors.push(e);
if(_98f){
this.displayInlineError(fObj,_98d,_98e,_98f);
}
e=null;
}
return _990;
},removeError:function(fObj,_993){
var _994=this.checkErrorExists(fObj,_993);
if(_994!=-1){
this.validationErrors.splice(_994,1);
this.hideError(fObj,_993);
}
},removeErrors:function(fObj){
var a=this.validationErrors;
for(var i=0;i<a.length;i++){
if(a[i].obj.id==fObj.id){
var _998=a[i].errType;
this.validationErrors.splice(i,1);
this.hideError(fObj,_998);
}
}
}};
var _999=function(evt){
var opts=$.extend(true,{},_8e8);
var _99c=$(this).data("dataOptions");
if(_99c){
$.extend(true,opts,_99c);
}
$(this).data("formValidator",new _95f(this,opts));
};
$("form").live("beforeIndexFields",_999);
function getValidatorObj(_99d){
if(_99d.length>0){
return $(_99d[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,_9a1,_9a2,_9a3){
getValidatorObj(this).throwError(obj,_9a1,_9a2,_9a3);
},removeError:function(obj,_9a5){
getValidatorObj(this).removeError(obj,_9a5);
},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 _9a8=function(_9a9,_9aa,_9ab){
var _9ac=(_9a9.hasClass("largeHeight"))?"large":(_9a9.hasClass("medium"))?"medium":"small";
var _9ad=_9ac;
var _9ae=_9a9.data("originalHeight");
if(!_9ae){
var _9af=_9a9.attr("data-default-height");
if(_9af!==undefined){
_9ae=_9af.replace("Height","");
}else{
_9ae=_9ac;
}
_9a9.data("originalHeight",_9ae);
}
if(_9ab){
_9ad=(_9ac=="large")?_9ae:"large";
_9a9.addClass(_9ad+"Height").removeClass(_9ac+"Height");
}
var _9b0=_8e9.COLLAPSE_BUTTON_TOOL_TIP,text=$.dr.strings.COLLAPSE,linkClass="collapse";
if(_9ad!="large"){
_9b0=_8e9.EXPAND_BUTTON_TOOL_TIP;
text=$.dr.strings.EXPAND;
linkClass="expand";
}
_9aa.text(text).attr({"title":_9b0,"class":linkClass});
if(_9a9.attr("data-persist-state")=="true"&&$.dr.userdata!==null){
var _9b1=_9a9.attr("data-persist-page-name");
if(_9b1===undefined&&pageInfo){
_9b1=pageInfo.pageName;
}
$.dr.userdata.save(_9b1,_9a9.id+"Height",_9ad,"String");
}
};
$.dr.utils.validateTextAreaLength=function(obj,_9b3,_9b4){
if(obj){
var _9b5=(_9b4===true)?true:_8e8.TRUNCATE_ONPASTE;
var _9b6=(obj.getAttribute("alertOpen")=="true")?true:false;
var c=document.getElementById(obj.id+"_counter");
if(!c){
return;
}
var v=obj.value;
var _9b9=v.length;
if(_9b5){
if(v.length>_9b3){
v=v.substr(0,_9b3);
}
}
var _9ba=DR.Utils.FormUtils.getUTF8Bytes(v).byteCount;
var _9bb;
if(_9ba===0){
_9bb=_8e9.X_CHARACTERS_REMAINING.replace("{0}",_9b3);
}else{
var _9bc=_9b3-_9ba;
if(_9b5){
_9bc=Math.max(_9bc,0);
}
if(_9ba>_9b3&&!_9b5){
_9bc=_9bc*(-1);
_9bb=_8e9.X_OVER_THE_LIMIT.replace("{0}",_9bc);
_9bb=_9bb.replace("{1}",_9b3);
}else{
_9bb=_8e9.X_OF_Y_CHARACTERS_REMAINING.replace("{0}",_9bc);
_9bb=_9bb.replace("{1}",_9b3);
}
}
c.innerHTML=_9bb;
var _9bd=true;
if(_9ba>_9b3){
_9bd=false;
}
if(_9ba>=_9b3){
if(_9b5){
_9bd=true;
var _9be=v.makeUT8CharsFitLength(_9ba,_9b3);
if(obj.value!=_9be){
obj.value=_9be;
}
if((_9b9>_9b3||_9ba>_9b3)&&!_9b6){
obj.setAttribute("alertOpen","true");
var _9bf=_8e9.MAX_CHARS.replace(/\{LIMIT\}/g,_9b3);
alert(_9bf);
}else{
obj.setAttribute("alertOpen","false");
}
}
$(obj).addClass(_8e8.INPUT_ERROR_CLASS);
$(c.parentNode).addClass("limit");
}else{
$(obj).removeClass(_8e8.INPUT_ERROR_CLASS);
$(c.parentNode).removeClass("limit");
obj.setAttribute("alertOpen","false");
}
return _9bd;
}
};
var _9c0=function(_9c1){
_9c1.filter("textarea:not(.wysiwyg, .basic_wysiwyg)").each(function(){
var obj=this;
var _9c3=$(this);
if(_9c3.data("textarea_inited")){
return;
}
var _9c4=false;
var _9c5=_9c3.attr("data-maxlength");
var _9c6=(_9c3.attr("data-expand-collapse")=="false")?false:true;
if($.browser.safari){
_9c6=false;
var _9c7=parseInt(document.defaultView.getComputedStyle(obj,"").getPropertyValue("width"),10);
if(_9c7>0){
obj.style.maxWidth=_9c7+"px";
}
}
if((_9c5!=="undefined"&&parseInt(_9c5,10)>0)||_9c6){
_9c4=true;
}
if(_9c4){
var _9c8=obj.className;
var gs=_9c8.match(/(gridSpan[\d]+(\s|$))/);
var _9ca=(gs)?gs[0]:"gridSpan11";
var _9cb=document.createElement("div");
_9cb.className=_9ca;
var _9cc=document.createElement("div");
_9cc.className="textareaInfo";
var _9cd="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:100%;\" ><tr>";
if(_9c5!==undefined){
_9cd+="<td class=\"remaining\"><span id=\""+obj.id+"_counter\" >&nbsp;</span></td>";
}
if(_9c6){
if($.browser.safari){
obj.style.maxWidth=_9c3.width()+"px";
}else{
_9cd+="<td class=\"expandCollapseButton\"><a></a></td>";
}
}
_9cd+="</tr></table>";
_9cc.innerHTML=_9cd;
$("a",_9cc).click(function(){
_9a8(_9c3,$(this),true);
}).each(function(){
_9a8(_9c3,$(this),false);
});
_9cb.appendChild(_9cc);
var _9ce=obj.parentNode;
_9ce.insertBefore(_9cb,obj.nextSibling);
if(_9c5!==undefined){
var _9cf=(_9c3.attr("data-force-truncate")=="true")?true:false;
$.dr.utils.validateTextAreaLength(obj,_9c5,_9cf);
}
_9c3.data("textarea_inited","true");
}
});
};
$.dr.addPlugin("form",_9c0);
var _9d0=function(){
$.extend(_8e9,$.dr.form.getMessages());
};
var _9d1=function(){
$.extend(_8e8,$.dr.form.getDefaults());
};
$(document).bind("afterFormSetMessages",_9d0);
$(document).bind("afterFormSetDefaults",_9d1);
$.dr.addDomReadyEvent(_9d0,"early");
$.dr.addDomReadyEvent(_9d1,"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;


