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

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

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

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

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

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

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

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

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

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

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

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

})(jQuery);if(!window.console){
window.console={log:function(){
},error:function(){
},warn:function(){
},profile:function(){
}};
}
(function($){
var _2=[];
$.dr=window.jQuery.dr||{VERSION:"1.7.11.5.1",VERSION_CREATION_DATE:"201104111958",BUILD_ID:"1.7.11.5.1",FRAMEWORK_PATH:window.basePath||"//ui1.img.digitalrivercontent.net/drui/1.7.11.5.1/",IMAGE_PATH:"//ui1.img.digitalrivercontent.net/drui/1.7.11.5.1/images/",BLANK_PAGE_URL:"//ui1.img.digitalrivercontent.net/drui/1.7.11.5.1/html/Blank.html",LOGIN_URL:"",userdata:null,USER_LOCALE:"en_US",IS_INTERNAL_USER:false,IS_MODAL:false,strings:{LOADING:"Loading...",PROCESSING:"Processing...",AUTHORIZING:"Authorizing...",SEARCHING:"Searching...",SEARCH:"Search",APPLY:"Apply",RENAME:"Rename",PROPERTIES:"Properties",MOVE_UP:"Move Up",MOVE_DOWN:"Move Down",DELETE:"Delete",CLOSE:"Close",CLOSE_WINDOW:"Close Window",COLLAPSE:"Collapse",DONE:"Done",EXPAND:"Expand",SAVE:"Save",NEXT:"Next",YES:"Yes",NO:"No",FINISH:"Finish",CANCEL:"Cancel",OK:"OK"},periodCountries:["IL","CN","JP","MY","KR","KP","TH","TW","PH","IN","PK","SG","HK","MX","PR","NG","BW","ZW"],CURRENCY:"$",init:function(){
var _3=$("body.modalPage").length;
if(_3){
$.dr.IS_MODAL=true;
}
if($.isFunction(window.customOnload)){
customOnload();
}
$(document).trigger("domReadyEarly").trigger("unobtrusiveEventEarly",[document]);
$(function(){
if(_3){
setTimeout(function(){
(new DR.Utils.PageSizer()).initModalScroller();
},100);
try{
parent.overlayStack.getCurrent().center(true);
}
catch(e){
}
}
$(document).trigger("domReadyNormal");
$.dr.triggerUnobtrusiveEvents(document);
$(document).trigger("domReadyLate");
});
},addDomReadyEvent:function(_4,_5){
$(document).bind(_5||"domReadyLate",_4);
},addUnobtrusiveEvent:function(_6,_7){
$(document).bind(_7||"unobtrusiveEventNormal",_6);
},triggerUnobtrusiveEvents:function(_8){
if(_8!==document){
$(document).trigger("unobtrusiveEventEarly",[_8]);
}
$(document).trigger("unobtrusiveEventNormal",[_8]).trigger("unobtrusiveEventLate",[_8]);
},addPlugin:function(_9,_a){
if(_9&&typeof _a=="function"){
if(typeof _2[_9]==="undefined"){
_2[_9]=[];
}
_2[_9].push(_a);
}
},getPlugins:function(_b){
return _2[_b];
}};
})(jQuery);
var DR=window.DR||function(){
};
DR.Global=function(){
};
DR.Utils=function(){
};
DR.Widgets=function(){
};
var overlayStack,pageInfo={};
(function($){
$.dr.utils=window.jQuery.dr.utils||{};
$.namespace("dr.bindPluginEvent",function(_d,_e){
if($.isFunction(_e)){
return this.bind(_d,function(_f){
var _10=_e.apply(this,arguments);
if(_10===false){
_f.stopImmediatePropagation();
}
return _10;
});
}else{
return this;
}
});
$.namespace("dr.bindPluginEvents",function(){
var _11=arguments;
return this.each(function(){
for(var i=0;i<_11.length;i++){
for(var e in _11[i]){
$(this).dr.bindPluginEvent(e,_11[i][e]);
}
}
});
});
$.fn.drTriggerEach=function(_14,_15){
var _16=undefined;
this.each(function(){
var _17=$(this).triggerHandler(_14,_15);
if(_17!==undefined){
_16=_17;
if(_17===false){
return false;
}
}
});
return _16;
};
var _18=function(_19){
var _1a=_19.split(".").pop();
$.namespace(_19,function(_1b){
return this.dr.bindPluginEvent(_1a,_1b);
});
};
$.dr.utils.createPluginEvent=function(_1c){
_18(_1c);
};
$.dr.utils.createPluginEvents=function(_1d,_1e){
for(var i=0;i<_1e.length;i++){
_18(_1d+"."+_1e[i]);
}
};
$.dr.getScript=function(_20,_21,_22){
if(_22!==false){
_22=true;
}
return $.ajax({url:_20,dataType:"script",global:false,cache:_22,success:function(_23,_24){
if($.isFunction(_21)){
setTimeout(function(){
_21(_23,_24);
},0);
}
}});
};
$.dr.utils.versionCompare=function(_25,_26){
_25=(_25&&_25.toString())||"0";
_26=(_26&&_26.toString())||"0";
var _27=_25.split(".");
var _28=_26.split(".");
var _29=_27.length;
var _2a=_28.length;
var _2b=Math.min(_29,_2a);
var _2c=0,numericFirst=0,numericSecond=0;
for(var i=0;i<_2b;i++){
numericFirst=parseInt(_27[i],10);
numericSecond=parseInt(_28[i],10);
if(numericFirst<numericSecond){
_2c=-1;
break;
}else{
if(numericFirst>numericSecond){
_2c=1;
break;
}else{
if((i===(_2b-1))&&(_29!==_2a)){
_2c=(_29===_2b)?-1:1;
}
}
}
}
return _2c;
};
$.dr.utils.appendParam=function(url){
for(var i=1;i<arguments.length;i++){
(function(_30){
if(_30){
var _31=(/\?/.test(url))?"&":"?";
url+=_30.replace(/^\?|&?/,_31);
}
})(arguments[i]);
}
return url;
};
$.dr.utils.logError=function(_32,err){
if(window.console){
console.error(_32);
if(err){
console.error("Error: ",err);
}
}
};
$.dr.utils.evalString=function(str,_35){
var o;
if(!str){
return;
}
if(str.trim().length==0){
return;
}
try{
eval("o="+str);
}
catch(e){
if(_35){
$.dr.utils.logError(_35,e);
}
o="error";
}
return o;
};
$.fn.setData=function(_37){
return this.each(function(){
for(var _38 in _37){
$(this).data(_38,_37[_38]);
}
});
};
var _39=document.defaultView&&document.defaultView.getComputedStyle;
$.dr.utils.getComputedValue=function(obj,_3b){
if(_39){
return document.defaultView.getComputedStyle(obj,"").getPropertyValue(_3b);
}else{
return obj.currentStyle[_3b];
}
};
$.dr.utils.normalizeCSSDimension=function(d){
d=d+"";
if(d=="auto"||d.indexOf("%")>0){
return d;
}else{
return d.replace("px")+"px";
}
};
$.dr.utils.legacyMap=function(_3d,map){
map=map||{};
_3d=_3d||{};
for(token in _3d){
if(map[token]!==undefined){
_3d[map[token]]=_3d[token];
}
}
return _3d;
};
$.dr.utils.getNumberFormat=function(obj){
return $.dr.utils.getNumberLocale($(obj).attr("data-number-locale"));
};
$.dr.utils.convertCurrencyToNumber=function(obj,val,_42,_43){
if(val===null||val===undefined){
return false;
}
if(!_42){
_42=$.dr.CURRENCY;
}
var num=val.replace(_42,"");
if(_42==" CAD"){
num=num.replace("C$","");
num=num.replace("$","");
}
num=Number($.dr.utils.normalizeNumber(num,_43));
return num;
};
$.dr.utils.getNumberLocale=function(_45){
return (typeof _45=="string"&&_45.substr(2,1)=="_")?_45:$.dr.USER_LOCALE;
};
$.dr.utils.normalizeNumber=function(num,_47){
if(num===null||num===undefined){
return null;
}
_47=$.dr.utils.getNumberLocale(_47);
var _48=$.dr.utils.isPeriodCountry(_47);
var _49=num.indexOf(",");
var _4a=num.indexOf(".");
if(_48){
if(_4a>=_49||_4a==-1||_49==-1){
num=num.replace(/,/g,"");
}
}else{
if(_49>=_4a||_4a==-1||_49==-1){
num=num.replace(/\./g,"").replace(/,/g,".");
var _4b=_47.split(".");
if(_4b.length==2){
num=_4b[0].replace(/ /g,"");
}else{
num=num.replace(/ /g,"");
}
}
}
return num;
};
$.dr.utils.isPeriodCountry=function(_4c){
var arr=_4c.split("_");
if(arr.length!=2){
arr=["en","US"];
}
var _4e=arr[0].toLowerCase();
var _4f=arr[1].toUpperCase();
var _50=(_4e=="en");
if(!_50){
for(var i=0;i<$.dr.periodCountries.length;i++){
if($.dr.periodCountries[i].toUpperCase()==_4f){
_50=true;
break;
}
}
}
return _50;
};
$.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;
}
}});
$.dr.utils.xmlElement=function(_54,_55,_56){
var _57=function(_58){
var _59="\"";
var _5a;
var _5b="";
var _5c=[];
for(var att in _58){
_5a=_58[att].toString().indexOf(_59);
if(_5a===-1){
_5b=" "+att+"=\""+_58[att]+"\"";
_5c.push(_5b);
}else{
_5b=att+"=\""+_58[att].replace(/"/g,"&quot;")+"\"";
_5c.push(_5b);
}
}
return _5c.join(" ");
};
var _5e="";
if(_56){
_5e=_57(_56);
}
var xml;
if(!_55){
xml="<"+_54+_5e+"/>";
}else{
xml="<"+_54+_5e+">"+_55+"</"+_54+">";
}
return xml;
};
$.fn.getHiddenDimensions=function(_60){
var _61=this,props={position:"absolute",visibility:"hidden",display:"block"},dim={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},$hiddenParents=_61.parents().andSelf().not(":visible"),_60=(_60==null)?false:_60;
var _62=[];
$hiddenParents.each(function(){
var old={};
for(var _64 in props){
old[_64]=this.style[_64];
this.style[_64]=props[_64];
}
_62.push(old);
});
dim.width=_61.width();
dim.outerWidth=_61.outerWidth(_60);
dim.innerWidth=_61.innerWidth();
dim.height=_61.height();
dim.innerHeight=_61.innerHeight();
dim.outerHeight=_61.outerHeight(_60);
$hiddenParents.each(function(i){
var old=_62[i];
for(var _67 in props){
this.style[_67]=old[_67];
}
});
return dim;
};
})(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 _68=null;
if(this.isStandardsMode){
if(document.documentElement){
_68=document.documentElement.clientWidth;
}
}else{
_68=document.body.clientWidth;
}
return _68;
},getAvailableContentHeight:function(){
var _69=null;
if(this.isStandardsMode){
if(document.documentElement){
_69=document.documentElement.clientHeight;
}
}else{
_69=document.body.clientHeight;
}
return _69;
},searchString:function(_6a){
for(var i=0;i<_6a.length;i++){
var _6c=_6a[i].string;
var _6d=_6a[i].prop;
this.versionSearchString=_6a[i].versionSearch||_6a[i].identity;
if(_6c){
if(_6c.indexOf(_6a[i].subString)!=-1){
return _6a[i].identity;
}
}else{
if(_6d){
return _6a[i].identity;
}
}
}
},isIE6:function(){
if(this.version==6&&this.browser=="Explorer"){
return true;
}
return false;
},searchVersion:function(_6e){
var _6f=_6e.indexOf(this.versionSearchString);
if(_6f==-1){
return;
}
return parseFloat(_6e.substring(_6f+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(_70){
this.name=_70;
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(_71){
if(!this.nameArrayValuesLoaded){
this.load();
}
if(_71!==null){
_71=new Date(_71);
if(_71.constructor==Date){
this.expires=_71.toGMTString();
}else{
alert(DR.Utils.Cookie.ERROR_VALID_DATE);
}
}
},setExpireDays:function(_72){
this.defaultExpireDays=_72;
},load:function(){
var _73=document.cookie;
if(_73===""){
return false;
}
var _74=_73.indexOf(this.name+"=");
if(_74!=-1){
_74+=this.name.length+1;
var _75=_73.indexOf(";",_74);
if(_75==-1){
_75=_73.length;
}
var _76=unescape(_73.substring(_74,_75));
if(this.type=="Single"){
this.value=_76;
this.nameArrayValuesLoaded=true;
}else{
if(this.type=="NameValuePair"){
this.splitCookiePairs(_76);
}else{
if(this.type=="Array"){
this.splitCookieArray(_76);
}
}
}
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(_78){
if(!this.nameArrayValuesLoaded){
this.load();
}
this.value=_78;
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(_7a){
this.type="Array";
if(!this.arrayValuesLoaded){
this.load();
}
var _7b="";
var ary=this.arrayValues;
var _7d=[];
var k=0;
if(ary.length>0){
for(var i=0;i<ary.length;i++){
if(ary[i]!=_7a){
_7b+=ary[i]+this.arraySeperator;
_7d[k]=ary[i];
k++;
}
}
}
_7d[k]=_7a;
_7b+=_7a+this.arraySeperator;
this.arrayValues=_7d;
this.value=_7b;
this.save();
},removeArrayValue:function(_80){
this.type="Array";
var _81="";
var ary=this.arrayValues;
var _83=[];
var k=0;
for(var i=0;i<ary.length;i++){
if(ary[i]!=_80){
_81+=ary[i]+this.arraySeperator;
_83[k]=ary[i];
k++;
}
}
this.arrayValues=_83;
this.value=_81;
this.save();
},setNameValuePair:function(_86,_87){
var v=_87+"";
if(_86.indexOf("&")==-1&&_86.indexOf(":")==-1&&v.indexOf("&")==-1&&v.indexOf(":")==-1){
if(!this.nameArrayValuesLoaded){
this.load();
}
this.type="NameValuePair";
this.nameArrayValues[_86]=_87;
this.save();
}
},getValue:function(_89){
if(!this.nameArrayValuesLoaded){
this.load();
}
if(_89){
return this.nameArrayValues[_89];
}else{
return this.value;
}
},removeValue:function(_8a){
if(!this.nameArrayValuesLoaded){
this.load();
}
delete this.nameArrayValues.name;
this.save();
},removeAllValues:function(){
if(!this.nameArrayValuesLoaded){
this.load();
}
this.nameArrayValues=[];
},splitCookiePairs:function(_8b){
var _8c=_8b.split(this.nameArraySeperator);
for(var i=0;i<_8c.length;i++){
_8c[i]=_8c[i].split(this.nameArrayInnerSeperator);
}
this.nameArrayValues=[];
for(var j=0;j<_8c.length;j++){
this.nameArrayValues[_8c[j][0]]=_8c[j][1];
}
this.joinNameValuePairs();
},splitCookieArray:function(_8f){
var ary=[];
if(_8f!==null){
var i=0;
while(_8f.indexOf(this.arraySeperator)!="-1"){
ary[i]=_8f.substring(0,_8f.indexOf(this.arraySeperator));
i++;
_8f=_8f.substring(_8f.indexOf(this.arraySeperator)+1,_8f.length);
}
}
this.arrayValues=ary;
this.joinArrayValues();
},joinNameValuePairs:function(){
var _92=[];
for(var i in this.nameArrayValues){
_92[_92.length]=i+this.nameArrayInnerSeperator+this.nameArrayValues[i];
}
var v=_92.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(_97){
var _98=new Date();
_98.setTime(_98.getTime());
if(_97){
var _99=_97*1000*60*60*24;
var _9a=new Date(_98.getTime()+(_99));
return _9a;
}
}};
DR.Utils.replaceCSSClass=function(_9b,_9c,_9d){
_9b=(typeof _9b=="object")?_9b:document.getElementById(_9b);
if(_9b){
_9b.className=_9b.className.replace(_9c,_9d).trim();
}
};
DR.Utils.hasCSSClass=function(_9e,_9f){
_9e=(typeof _9e=="object")?_9e:document.getElementById(_9e);
if(_9e){
if(_9e.className.indexOf(_9f)>-1){
return true;
}
}
return false;
};
DR.Utils.removeCSSClass=function(_a0,_a1){
_a0=(typeof _a0=="object")?_a0:document.getElementById(_a0);
if(_a0){
_a0.className=_a0.className.replace(_a1,"").trim();
}
};
DR.Utils.addCSSClass=function(_a2,_a3){
_a2=(typeof _a2=="object")?_a2:document.getElementById(_a2);
if(_a2){
DR.Utils.removeCSSClass(_a2,_a3);
_a2.className=(_a3+" "+_a2.className).trim();
}
};
DR.Utils.setCSSClass=function(_a4,_a5){
_a4=(typeof _a4=="object")?_a4:document.getElementById(_a4);
if(_a4){
_a4.className=_a5;
}
};
DR.Utils.getStyle=function(id,_a7){
var obj=(typeof id=="object")?id:document.getElementById(id);
var _a9="";
if(document.defaultView&&document.defaultView.getComputedStyle){
DR.Utils.styleObj=document.defaultView.getComputedStyle(obj,null);
_a9=DR.Utils.styleObj?eval("DR.Utils.styleObj."+_a7):null;
}else{
if(obj.currentStyle){
_a9=obj.currentStyle[_a7];
}
}
return _a9;
};
DR.Utils.disableListLink=function(id,_ab){
var li=(typeof id=="object")?id:document.getElementById(id);
DR.Utils.addCSSClass(li,"disabled");
var a=li.getElementsByTagName("a");
if(a.length==1){
var _ae=a[0];
_ae.removeAttribute("href");
if(typeof (_ae.onclick)=="function"){
_ae.onclick_disabled=_ae.onclick;
}
if(typeof (_ab)=="function"){
_ae.onclick=_ab;
}
}
};
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 _b2=a[0];
_b2.setAttribute("href","#");
var od=_b2.getAttribute("onclick_disabled");
if(typeof (od)=="function"){
_b2.onclick=_b2.onclick_disabled;
}else{
if(typeof (od)=="object"){
_b2.onclick=eval(_b2.onclick_disabled);
}
}
_b2.removeAttribute("onclick_disabled");
}
};
DR.Utils.insertBefore=function(_b4,_b5,_b6){
var _b7=_b4.tagName.toLowerCase();
if(document.all&&_b7=="td"){
var n=parentNode.appendChild(_b5,_b6);
_b4.appendChild(_b6,n);
}else{
_b4.insertBefore(_b5,_b6);
}
};
DR.Utils.insertAfter=function(_b9,_ba,_bb){
return _b9.insertBefore(_ba,_bb.nextSibling);
};
DR.Utils.addToBody=function(el){
var _bd=document.getElementsByTagName("BODY")[0];
var _be=_bd.firstChild;
_bd.insertBefore(el,_be);
_bd=null;
_be=null;
return el;
};
DR.Utils.attachCssStyleSheet=function(url){
var _c0=document.getElementsByTagName("head")[0];
var _c1=document.createElement("link");
_c1.type="text/css";
_c1.rel="stylesheet";
_c1.href=url;
_c0.appendChild(_c1);
};
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(_c4,_c5){
if(_c4.indexOf(".")==-1){
_c4="."+_c4;
}
if(typeof _c5=="object"){
return jQuery(_c4,_c5);
}else{
if(typeof _c5=="string"&&_c5!==""){
if(_c5.indexOf("#")==-1){
_c5="#"+_c5;
}
return jQuery(_c5+" "+_c4);
}else{
return jQuery(_c4);
}
}
};
DR.Utils.getFirstElementByClassName=function(_c6,_c7){
var _c8=DR.Utils.getElementsByClassName(_c6,_c7);
if(_c8.length>0){
return _c8[0];
}
return null;
};
DR.Utils.getElementsBySelectorPath=function(_c9,_ca){
if(_c9.indexOf(".")==-1){
_c9="."+_c9;
}
if(typeof _ca=="object"){
return jQuery(_c9,_ca);
}else{
if(typeof _ca=="string"&&_ca!==""){
if(_ca.indexOf("#")==-1){
_ca="#"+_ca;
}
return jQuery(_ca+" "+_c9);
}else{
return jQuery(_c9);
}
}
};
DR.Utils.getFirstElementBySelectorPath=function(_cb,_cc){
var _cd=DR.Utils.getElementsBySelectorPath(_cb,_cc);
if(_cd.length>0){
return _cd[0];
}
return null;
};
DR.Utils.attachDRFrameworkCSS=function(){
var _ce=navigator.appName;
var _cf=(_ce.indexOf("Explorer")>-1);
var _d0=(navigator.appVersion.indexOf("MSIE 7")>-1);
var _d1=(navigator.userAgent.indexOf("AppleWebKit")>-1);
var _d2="dr-stylesheet-ff-compressed.css";
if(_d0){
_d2="dr-stylesheet-ie7-compressed.css";
}else{
if(_cf){
_d2="dr-stylesheet-ie6-compressed.css";
}
}
var url=$.dr.FRAMEWORK_PATH+"css/"+_d2;
DR.Utils.attachCssStyleSheet(url);
};
DR.Utils.replaceHtml=function(el,_d5){
var div=typeof el==="string"?document.getElementById(el):el;
return jQuery(div).html(_d5);
};
DR.Utils.DragObject=function(_d7){
if(typeof _d7=="object"){
this.type="Absolute";
this.dragObj=_d7;
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(_d8,_d9){
if(typeof _d8=="string"){
this.type=_d8;
}
if(typeof _d9=="object"){
this.parentObj=_d9;
}
},setSnapToMouse:function(_da){
this.snapToMouse=Boolean(_da);
},setMoveDragCallback:function(_db){
this.moveCallback=Boolean(_db);
},setStopDragCallback:function(_dc){
this.stopCallback=Boolean(_dc);
},initDrag:function(_dd){
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=_dd.clientX+window.scrollX;
y=_dd.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 _df=this;
if(this.moveDragFunc===null){
this.moveDragFunc=function(_e0){
_df.moveDrag(_e0);
};
this.stopDragFunc=function(_e1){
_df.stopDrag(_e1);
};
}
this.attachEvents();
if(!this.snapToMouse){
this.cancelEventPropagation(_dd);
}
},moveDrag:function(_e2){
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=_e2.clientX+window.scrollX;
y=_e2.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 _e4=Math.max(x-parseInt(this.parentObj.container.offsetLeft,10)-this.dragObjLeft,this.parentObj.column1MinWidth);
var _e5=Math.min(_e4,this.parentObj.panelWidth-this.parentObj.column2MinWidth-this.parentObj.leftPadding);
this.dragObj.style.left=_e5+"px";
}else{
if(this.parentObj.layout=="TwoRow"){
this.dragObj.style.top=(this.dragObjTop+y-parseInt(this.parentObj.container.offsetTop,10))+"px";
}
}
}
}
this.cancelEventPropagation(_e2);
}
},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(_e6){
if(window.event){
window.event.cancelBubble=true;
window.event.returnValue=false;
}else{
_e6.preventDefault();
}
}};
DR.Utils.customOnload=function(){
};
DR.Utils.addEvent=function(obj,evt,fn,_ea){
if(obj.addEventListener){
obj.addEventListener(evt,fn,Boolean(_ea));
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,_ef){
if(obj.removeEventListener){
obj.removeEventListener(evt,fn,Boolean(_ef));
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(_f4,url){
if(_f4){
var _f6=(typeof _f4=="object")?_f4:document.forms[_f4];
_f6.setAttribute("action",url);
}
},submit:function(_f7){
if(_f7){
var _f8=(typeof _f7=="object")?_f7:document.forms[_f7];
_f8.submit();
}
},getField:function(_f9,frm){
var _fb=(typeof frm=="object")?frm:document.forms[frm];
return _fb.elements[_f9];
},getValue:function(fld,frm){
var _fe=null;
if(frm!==undefined&&typeof fld!="object"){
_fe=(typeof frm=="object")?frm:document.forms[frm];
}
if(!_fe){
return null;
}
var _ff=(typeof fld=="object")?fld:_fe.elements[fld];
if(!_ff){
return null;
}
var _100=(!_ff.type&&!!_ff[0])?_ff[0].type:_ff.type;
if(!_100){
return null;
}
var type=(_100.substring(0,6)=="select")?"select":_100;
var _102=[];
var _103=false;
if(typeof _ff.type=="undefined"){
_103=true;
}
if(type=="select"){
if(_103){
for(var i=0;i<_ff.length;i++){
_102.push(DR.Utils.FormUtils.getSelectOptionValue(_ff[i]));
}
}else{
if(_ff.multiple){
for(var j=0;j<_ff.options.length;j++){
if(_ff.options[j].selected){
_102.push(DR.Utils.FormUtils.getSelectOptionValue(_ff.options[j]));
}
}
}else{
try{
_102.push(DR.Utils.FormUtils.getSelectOptionValue(_ff.options[_ff.selectedIndex]));
}
catch(err){
}
}
}
}else{
if((type=="checkbox")||(type=="radio")){
if(_103){
for(var k=0;k<_ff.length;k++){
if(_ff[k].checked){
_102.push(_ff[k].value);
}
}
}else{
if(_ff.checked){
_102.push(_ff.value);
}
}
}else{
if(_103){
for(var m=0;m<_ff.length;m++){
_102.push(_ff[m].value);
}
}else{
_102.push(_ff.value);
}
}
}
return _102.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(_10a){
if(_10a){
var a=[];
for(var i=0;i<_10a.options.length;i++){
if(_10a.options[i].selected){
a.push(_10a.options[i].text);
}
}
return a.join(", ");
}
},setSelectOptionValue:function(o,val){
var _10f=(o.value==val||o.text==val);
o.selected=_10f;
return _10f;
},checkAllowFocus:function(_110){
var _111=DR.Utils.getStyle(_110,"display");
var _112=DR.Utils.getStyle(_110,"visibility");
if(_112=="hidden"||_111=="none"||_110.disabled||_110.readonly){
return false;
}else{
var p=_110.parentNode;
var _114=false;
while(p){
_111=DR.Utils.getStyle(p,"display");
_112=DR.Utils.getStyle(p,"visibility");
if(p.tagName=="BODY"||p.tagName=="HTML"){
break;
}
if((_111=="none")||(_112=="hidden")){
_114=true;
break;
}
p=p.parentNode;
}
if(!_114){
return true;
}else{
return false;
}
}
},setValue:function(fld,frm,_117){
var _118=(typeof frm=="object")?frm:document.forms[frm];
var _119=(typeof fld=="object")?fld:_118.elements[fld];
var i=0;
if(_119){
var type=(_119.type)?_119.type:_119[0].type;
switch(type){
case "text":
case "textarea":
case "password":
_119.value=_117;
break;
case "checkbox":
_119.checked=(_117)?true:false;
break;
case "radio":
for(i=0;i<_119.length;i++){
if(_119[i].value==_117){
_119[i].checked=true;
break;
}
}
break;
case "select-one":
case "select-multiple":
if(typeof _117=="object"){
for(var j=0;j<_117.length;j++){
for(i=0;i<_119.options.length;i++){
if(_119.options[i].value==_117[j]){
_119.options[i].selected=true;
}
}
}
}else{
for(i=0;i<_119.options.length;i++){
if(_119.options[i].value==_117||_119.options[i].text==_117){
_119.options[i].selected=true;
break;
}
}
}
break;
default:
break;
}
}
},getDisabled:function(_11d,_11e){
},setDisabled:function(_11f,_120,_121,_122){
},getReadonly:function(_123,_124){
},setReadonly:function(_125,_126,_127,_128){
},setOperationAndSubmit:function(_129,_12a){
var _12b=_129.id||_129.name;
var _12c=_129.form.operation;
if(typeof _12c=="object"){
_12c.value=_12b;
}
DR.Utils.FormUtils.submit(_129.form);
if(_12a){
_12a.returnValue=false;
_12a.cancelBubble=true;
}
return false;
},submitActionForm:function(obj,evt){
var _12f=obj.id||obj.name;
var _130=obj.form.action;
if(typeof _130=="object"){
_130.value=_12f;
}
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 _132=val.length;
var _133=encodeURI(val);
var _134;
var _135;
if(_133.indexOf("%")!=-1){
_134=_133.split("%");
_135=_134.length-1;
if(_135===0){
_135++;
}
var tmp=_133.length-(_135*3);
_135=_135+tmp;
}else{
_135=_132;
}
if(DR.Utils.BrowserDetect.browser!="Explorer"){
var _137=val.replace(/\n/g,"..").length;
var _138=_137-_132;
_135=_135+_138;
}
return {bytes:_133,byteCount:_135};
}};
(function($){
var _13a="yyyy-mm-dd",DATE_FORMAT_PATTERN,PARSED_DATE_SEGMENTS,DAY_POS,MONTH_POS,YEAR_POS,REG_EX_PAT;
var _13b=function(_13c,_13d){
for(var i=0;i<_13d.length;i++){
if(_13d[i].indexOf(_13c)!=-1){
return i;
}
}
return -1;
};
var _13f=function(fmt){
var _141=/(([y]{2,4}|[m]{1,2}|[d]{1,2})|([-\/ .]+?))/gi;
return fmt.toLowerCase().match(_141);
};
var _142=function(_143){
var _144="^";
for(var i=0;i<_143.length;i++){
if(/[mdy]/i.test(_143[i])){
if(typeof _143[i]!="undefined"){
var _146=_143[i].length;
var _147=_146;
if(_146==1){
_147=2;
}
_144+="(\\d{"+_146+","+_147+"})";
}
}else{
_144+="([\\"+_143[i]+"]{1})";
}
}
return (_144+"$");
};
var _148=function(_149){
var _14a=(_149)?_13f(_149):PARSED_DATE_SEGMENTS;
var _14b=(_149)?_13b("d",_14a):DAY_POS;
var _14c=(_149)?_13b("m",_14a):MONTH_POS;
var _14d=(_149)?_13b("y",_14a):YEAR_POS;
var _14e=(_149)?_142(_14a):REG_EX_PAT;
var _14f={format:_149,yearPos:_14d,monthPos:_14c,datePos:_14b,regExPat:_14e,segments:_14a};
return _14f;
};
var _150=function(_151,_152){
var _153=_148(_152);
var _154=new RegExp(_153.regExPat).exec(_151);
var _155={};
var _156=false;
var date,month,year;
if(_154){
_154=_154.slice(1);
date=_154[_153.datePos];
month=Number(_154[_153.monthPos])-1;
year=_154[_153.yearPos];
_155=new Date(((year.length==2)?((year<70)?Number("20"+year):Number("19"+year)):year),month,date);
var _158=_155.getDate();
var _159=_155.getMonth();
var _15a=(year.length==2)?String(_155.getFullYear()).slice(2):_155.getFullYear();
if(_158==date&&_159==month&&_15a==year){
_156=true;
}
}
return (_156)?_155:null;
};
$.dr.date=function(_15b,fmt){
var _15d=(fmt==null||fmt==""||fmt=="undefined")?DATE_FORMAT_PATTERN:fmt;
var date=null;
if(_15b instanceof Date){
if(_15b.isValid()){
date=_15b;
}
}else{
date=_150(_15b,_15d);
}
if(date==null){
return (new Date("invalid date"));
}else{
date.format=_15d;
return date;
}
};
$.dr.date.prototype=new Date();
Date.prototype.isValid=function(){
var _15f=this;
return !(_15f===null||_15f===undefined||(typeof _15f=="object"&&_15f=="Invalid Date")||(typeof _15f=="object"&&_15f=="NaN"));
};
Date.prototype.getFormat=function(){
return this.format;
};
Date.prototype.toFormattedString=function(_160){
var year=this.getFullYear();
var day=this.getDate();
var _163=this.getMonth()+1;
var _164=(_160)?_160:((this.format)?this.format:_13a);
var _165=_148(_164).segments;
var _166="";
for(var i=0;i<_165.length;i++){
var s=_165[i];
var d=s;
switch(s.toLowerCase().charAt(0)){
case "m":
if(s.length==2){
_163=(_163<10)?"0"+_163:_163;
}
d=_163;
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;
}
_166+=d;
}
return _166;
};
$.dr.date.setDefaultFormat=function(fmt){
DATE_FORMAT_PATTERN=fmt;
PARSED_DATE_SEGMENTS=_13f(fmt);
MONTH_POS=_13b("m",PARSED_DATE_SEGMENTS);
YEAR_POS=_13b("y",PARSED_DATE_SEGMENTS);
Day_POS=_13b("d",PARSED_DATE_SEGMENTS);
REG_EX_PAT=_142(PARSED_DATE_SEGMENTS);
};
$.dr.date.setDefaultFormat(_13a);
$.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);
return r;
};
$.dr.date.getISODate=function(year,_174,day){
if(year.length==2){
year=parseInt(year,10);
year=(year<70)?Number("20"+year):Number("19"+year);
}
day=(day<10)?"0"+day:day;
_174=(_174<10)?"0"+_174:_174;
return new $.dr.date(year+"-"+_174+"-"+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 _177=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,_179){
if(val===null||val===undefined){
return false;
}
var date=new $.dr.date(val,_179);
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,_17f){
if(val===null||val===undefined){
return false;
}
if(!_17f){
_17f="yyyy";
}
if(_17f.toLowerCase()=="yy"&&val.length==2&&!isNaN(val)){
return true;
}else{
if(_17f.toLowerCase()=="yyyy"&&val.length==4&&!isNaN(val)){
return true;
}
}
return false;
}]});
}
};
$(document).bind("dr-beforeinitforms",_177);
})(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 _181=window.onresize;
var _182=function(){
self.refreshModalScroller();
};
window.onresize=function(){
_182();
if(typeof (_181)=="function"){
_181();
}
};
function cleanupEvents(){
window.detachEvent("onresize",_182);
}
if(DR.Utils.BrowserDetect.browser=="Explorer"){
if(window.attachEvent){
window.attachEvent("onunload",cleanupEvents);
}
}
},refresh:function(){
var _183,yScroll,pageHeight,pageWidth;
var obj={};
if(window.innerHeight&&window.scrollMaxY){
_183=document.body.scrollWidth;
yScroll=window.innerHeight+window.scrollMaxY;
}else{
if(document.body.scrollHeight>document.body.offsetHeight){
_183=document.body.scrollWidth;
yScroll=document.body.scrollHeight;
}else{
_183=document.body.offsetWidth;
yScroll=document.body.offsetHeight;
}
}
var _185,windowHeight;
if(self.innerHeight){
_185=self.innerWidth;
windowHeight=self.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
_185=document.documentElement.clientWidth;
windowHeight=document.documentElement.clientHeight;
}else{
if(document.body){
_185=document.body.clientWidth;
windowHeight=document.body.clientHeight;
}
}
}
if(yScroll<windowHeight){
pageHeight=windowHeight;
}else{
pageHeight=yScroll;
}
if(_183<_185){
pageWidth=_185;
}else{
pageWidth=_183;
}
if(this.doc===undefined){
this.doc={};
}
this.pageWidth=pageWidth;
this.pageHeight=pageHeight;
this.windowWidth=_185;
this.windowHeight=windowHeight;
},refreshModalScroller:function(){
var d=$(".modalScroller");
if(d.length==0){
d=$("#modalScroller");
}
if(d.length>0){
d=d[0];
this.refresh();
var _187=this.windowHeight;
var _188=this.windowWidth;
var _189=d.offsetTop;
var _18a=$(".pageButtons");
var _18b=(_18a.length>0)?_18a[0].offsetHeight:0;
_18b=_18b+32;
var _18c=_187;
if(_188<790){
}
var _18d=_18c-d.offsetTop-_18b;
if(_18d>0){
d.style.height=_18d+"px";
}
}
}};
(function($){
var _18f={url:"",width:740,height:500,target:"",centered:true,type:"normal"};
$.dr.popup=function(_190){
_190=$.extend({},_18f,_190);
if(_190.url==""||_190.url==null){
$.dr.utils.logError("Must supply a url");
return;
}
var s="";
switch(_190.type){
case "console":
s="resizable,scrollbars,height="+_190.height+",width="+_190.width;
break;
case "fixed":
s="status,scrollbars,height="+_190.height+",width="+_190.width;
break;
case "normal":
s="toolbar,scrollbars,resizable,location,height="+_190.height+",width="+_190.width;
break;
case "full":
s="toolbar,menubar,scrollbars,resizable,location,height="+_190.height+",width="+_190.width;
break;
default:
if(_190.type){
s=_190.type;
}
break;
}
if(_190.centered){
if(window.screen){
var l=(screen.width-parseInt(_190.width,10))/2;
var t=(screen.height-parseInt(_190.height))/2;
s+=",left="+l+",top="+t;
}
}
tg=_190.target;
return window.open(_190.url,tg,s);
};
})(jQuery);
DR.Utils.Position=function(_194){
this.obj=(typeof _194=="object")?_194:document.getElementById(_194);
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(_197,_198,_199,_19a,_19b,_19c,_19d,_19e){
this.setRelativeXPosition(_197,_198,_199,_19c,_19e);
this.setRelativeYPosition(_197,_19a,_19b,_19d,_19e);
},setRelativeXPosition:function(_19f,_1a0,_1a1,_1a2,_1a3){
var _1a4=new DR.Utils.Position(_19f);
var _1a5=_1a4.left;
var _1a6=DR.Utils.BrowserDetect.getAvailableContentWidth();
if(_1a0==DR.Utils.Position.ON_CENTER){
_1a5=_1a4.left+(Math.floor(_1a4.width/2));
}else{
if(_1a0==DR.Utils.Position.ON_RIGHT){
_1a5=_1a4.right;
}
}
if(_1a1==DR.Utils.Position.DRAW_LEFT){
if(_1a3||(_1a5-this.width-_1a2)>=0){
_1a5=_1a5-this.width-_1a2;
}else{
if((_1a5+this.width+_1a2)<_1a6){
_1a5=_1a5+this.width+_1a2;
}else{
_1a5=0;
}
}
}else{
if(_1a1==DR.Utils.Position.DRAW_RIGHT){
if(_1a3||(_1a5+this.width+_1a2)<_1a6){
_1a5=_1a5+_1a2;
}else{
if((_1a5-this.width-_1a2)>0){
_1a5=_1a5-this.width+_1a4.width;
}else{
_1a5=_1a6;
}
}
}else{
if(_1a1==DR.Utils.Position.DRAW_CENTERED){
if(_1a3||(_1a5-Math.floor((this.width-_1a2)/2))>0){
_1a5=_1a5-Math.floor((this.width-_1a2)/2);
}else{
_1a5=0;
}
}
}
}
this.setX(_1a5);
},setRelativeYPosition:function(_1a7,_1a8,_1a9,_1aa,_1ab){
var _1ac=new DR.Utils.Position(_1a7);
var _1ad=_1ac.top;
var _1ae=DR.Utils.BrowserDetect.getAvailableContentHeight();
if(_1a8==DR.Utils.Position.ON_MIDDLE){
_1ad=_1ac.top+(Math.floor(_1ac.height/2));
}else{
if(_1a8==DR.Utils.Position.ON_BOTTOM){
_1ad=_1ac.bottom;
}
}
if(_1a9==DR.Utils.Position.DRAW_UP){
if(_1ab||(_1ad-this.height-_1aa)>0){
_1ad=_1ad-this.height-_1aa;
}else{
if((_1ad+_1ac.height+this.height+_1aa)<_1ae){
_1ad=_1ad+_1ac.height+_1aa;
}else{
_1ad=0;
}
}
}else{
if(_1a9==DR.Utils.Position.DRAW_DOWN){
var _1af=_1ad+this.height+_1aa;
if(_1ab||(_1af)<_1ae){
_1ad=_1ad+_1ac.height+_1aa;
}else{
if((_1ad-this.height-_1aa)>0){
_1ad=_1ad-this.height-_1aa;
}else{
_1ad=_1ae;
}
}
}else{
if(_1a9==DR.Utils.Position.DRAW_CENTERED){
if(_1ab||(_1ad-Math.floor((this.height-_1aa)/2))>0){
_1ad=_1ad-Math.floor((this.height-_1aa)/2);
}else{
_1ad=0;
}
}
}
}
this.setY(_1ad);
},setX:function(left){
this.obj.style.left=left+"px";
},setY:function(top){
this.obj.style.top=top+"px";
},getX:function(){
var curX=0;
var _1b3=this.obj;
if(_1b3.offsetParent){
while(_1b3.offsetParent){
curX+=_1b3.offsetLeft;
if(_1b3.clientLeft&&(_1b3.tagName=="TD")||(_1b3.tagName=="TH")){
curX+=_1b3.clientLeft;
}
_1b3=_1b3.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 _1b5=this.obj;
if(_1b5.offsetParent){
while(_1b5.offsetParent){
curY+=_1b5.offsetTop;
if(_1b5.clientTop&&(_1b5.tagName=="TD")||(_1b5.tagName=="TH")){
curY+=_1b5.clientTop;
}
_1b5=_1b5.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(_1b6,_1b7,_1b8,_1b9,_1ba,_1bb,_1bc,_1bd,_1be){
sourceObj=(typeof _1b6=="object")?_1b6:document.getElementById(_1b6);
targetObj=(typeof _1b7=="object")?_1b7:document.getElementById(_1b7);
_1b8=(_1b8!==undefined)?_1b8:0;
_1b9=(_1b9!==undefined)?_1b9:0;
_1ba=(_1ba!==undefined)?_1ba:"Right";
_1bb=(_1bb!==undefined)?_1bb:"Top";
_1bc=(_1bc!==undefined)?_1bc:"Right";
_1bd=(_1bd!==undefined)?_1bd:"Down";
_1be=(_1be==false)?false:true;
var _1bf=sourceY=0,_width,_height;
var obj=sourceObj;
while(obj.offsetParent){
_1bf+=obj.offsetLeft;
if(obj.scrollLeft){
_1bf-=obj.scrollLeft;
}
sourceY+=obj.offsetTop;
if(obj.scrollTop){
sourceY-=obj.scrollTop;
}
obj=obj.offsetParent;
}
obj=sourceObj;
while(obj.offsetParent){
if(obj.scrollLeft){
_1bf-=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){
_1bf+=obj.clientLeft;
}
}
if(DR.Utils.hasCSSClass(obj,"searchBody")){
_1bf-=11;
}
}
obj=obj.parentNode;
}
sourceWidth=sourceObj.offsetWidth;
sourceHeight=sourceObj.offsetHeight;
targetX=_1bf;
targetY=sourceY;
if(_1ba=="Right"){
targetX=_1bf+sourceWidth;
}
if(_1bb=="Bottom"){
targetY=sourceY+sourceHeight;
}
if(_1be){
var _1c1,scrollY;
if(window.scrollX){
_1c1=window.scrollX;
scrollY=window.scrollY;
}else{
_1c1=document.documentElement.scrollLeft+document.body.scrollLeft;
scrollY=document.documentElement.scrollTop+document.body.scrollTop;
}
targetWidth=targetObj.offsetWidth;
targetHeight=targetObj.offsetHeight;
var _1c2=DR.Utils.BrowserDetect.getAvailableContentWidth();
var _1c3=DR.Utils.BrowserDetect.getAvailableContentHeight();
var _1c4=_1bf+targetWidth+_1b8;
var _1c5=_1bf-targetWidth-_1b8;
var _1c6=false;
var _1c7=false;
if(_1c4<=(_1c2+_1c1-sourceWidth)){
_1c6=true;
}
if(_1c5>_1c1){
_1c7=true;
}
if((_1bc=="Right"&&_1c6)||(_1bc=="Left"&&!_1c7&&_1c6)){
targetX+=_1b8;
}else{
if(_1c7){
targetX=_1bf-targetWidth-_1b8;
}
}
var _1c8=sourceY+targetHeight+_1b9;
var _1c9=sourceY-targetHeight-_1b9;
var _1ca=false;
var _1cb=false;
if(_1c8<=(_1c3+scrollY-sourceHeight)){
_1ca=true;
}
if(_1c9>scrollY){
_1cb=true;
}
if((_1bd=="Down"&&_1ca)||(_1bd=="Up"&&!_1cb&&_1ca)){
targetY+=_1b9;
}else{
if(_1cb){
targetY=sourceY-targetHeight-_1b9;
}
}
}else{
targetX+=_1b8;
targetY+=_1b9;
}
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 _1d0;
alert(args[i]);
var pair=args[i].split("=");
var _1d2=unescape(pair[0]);
if(pair.length==2){
val=unescape(pair[1]);
}else{
val=_1d2;
}
this.params[_1d2]=val;
}
};
DR.Utils.Querystring.prototype.get=function(_1d3){
var val=this.params[_1d3];
return val;
};
String.prototype.stripSpaces=function(){
return this.replace(/ /g,"");
};
String.prototype.stripWhitepace=function(){
return this.replace(/\s/g,"");
};
String.prototype.squeezeWhitespace=function(_1d5){
return this.replace(/\s+/g,(arguments.length===1)?_1d5:" ");
};
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(_1d7,_1d8){
return (_1d8<args.length)?args[_1d8]:_1d7;
});
};
String.prototype.replaceBreaks=function(){
return this.replaceTokens("<br/><br/>");
};
String.prototype.trimLastLetter=function(){
var _1d9=this.length;
var _1da=encodeURI(this.substr(_1d9-1,_1d9));
var _1db=1;
if(DR.Utils.BrowserDetect.browser=="Explorer"&&_1da=="%0A"){
_1db=2;
}
return this.substr(0,_1d9-_1db);
};
String.prototype.stripDoubleQuotes=function(){
return this.replace(/"/g,"");
};
String.prototype.isBlank=function(){
return /^\s*$/.test(this);
};
String.prototype.makeUT8CharsFitLength=function(_1dc,_1dd){
if(_1dc===0||_1dc==_1dd){
return this;
}
var _1de=false;
var _1df=this.length;
var _1e0=_1df/_1dc;
var _1e1=Math.round(_1dd*_1e0,0);
var _1e2;
var _1e3="";
var _1e4=false;
var _1e5=_1e1;
var i=0;
while(!_1de&&i<100){
var _1e7=this.substr(0,_1e5);
var _1e8=DR.Utils.FormUtils.getUTF8Bytes(_1e7).byteCount;
if(_1e8==_1dd){
_1de=true;
_1e2=_1e7;
}else{
if(_1e8<_1dd&&_1e4){
_1de=true;
_1e2=_1e7;
}else{
if(_1e8<_1dd){
if(_1e3=="negative"){
_1e4=true;
}
_1e5++;
_1e3="positive";
}else{
if(_1e8>_1dd){
if(_1e3=="positive"){
_1e4=true;
}
_1e5--;
_1e3="negative";
}
}
}
}
}
return _1e2;
};
String.prototype.capitalize=function(){
return this.charAt(0).toUpperCase()+this.slice(1);
};
String.prototype.formatNum=function(_1e9,_1ea,_1eb,_1ec){
var _1ed=$.dr.USER_LOCALE,defaultPrec=2,defaultCurr={prefix:"",postfix:""};
var _1ee=function(_1ef){
return (_1ef.length==5&&_1ef.toString().substr(2,1)=="_"&&isNaN(parseInt(_1ef,10)));
};
var _1f0=function(_1f1){
return (_1f1===false||!isNaN(parseInt(_1f1,10)));
};
var _1f2=function(c){
return (typeof c=="object");
};
var _1f4=function(c){
return (c.postfix||c.prefix);
};
switch(arguments.length){
case 1:
if(_1f0(_1e9)){
_1eb=_1e9;
}
if(_1f2(_1e9)){
_1ec=_1e9;
}
if(_1ee(_1e9)){
_1ea=_1e9;
_1e9=_1ed;
}
break;
case 2:
if(_1ee(_1e9)&&_1f2(_1ea)){
_1ec=_1ea;
_1ea=_1e9;
_1e9="";
}
if(_1ee(_1e9)&&_1f0(_1ea)){
_1eb=_1ea;
_1ea=_1e9;
}
if(_1f0(_1e9)&&_1f2(_1ea)){
_1ec=_1ea;
_1eb=_1e9;
}
break;
case 3:
if(_1ee(_1e9)&&_1f0(_1ea)&&_1f2(_1eb)){
_1ec=_1eb;
_1eb=_1ea;
_1ea=_1e9;
_1e9=_1ed;
}
if(_1ee(_1e9)&&_1ee(_1ea)&&_1f2(_1eb)){
_1ec=_1eb;
}
break;
}
_1e9=(_1ee(_1e9))?_1e9:_1ed;
_1ea=(_1ea!=undefined&&_1ee(_1ea))?_1ea:_1ed;
_1eb=(_1f0(_1eb))?_1eb:defaultPrec;
_1ec=(_1f2(_1ec)&&_1f4(_1ec))?$.extend(defaultCurr,_1ec):defaultCurr;
var val=(_1eb===false)?parseFloat($.dr.utils.normalizeNumber(this,_1e9)).toString():parseFloat($.dr.utils.normalizeNumber(this,_1e9)).toFixed(_1eb);
if(isNaN(val)){
return this.toString();
}
var seps=($.dr.utils.isPeriodCountry(_1ea))?{t:",",d:"."}:{t:".",d:","};
var nums=val.split(".");
var _1f9=function(_1fa,_1fb){
nums[0]=nums[0].replace(/\d{1,3}(?=(\d{3})+(?!\d))/g,"$&"+_1fa);
return nums.join(_1fb);
};
return ((_1ec.prefix!="")?_1ec.prefix:"")+_1f9(seps.t,seps.d)+((_1ec.postfix!="")?"&nbsp;"+_1ec.postfix:"");
};
Number.prototype.formatNum=function(_1fc,_1fd,_1fe,_1ff){
return this.toString().formatNum(_1fc,_1fd,_1fe,_1ff);
};
DR.Utils.Toggle=function(){
};
DR.Utils.Toggle.disabledFromCheckbox=function(_200,_201){
var _202=(typeof _200=="object")?_200:document.getElementById(_200);
if(typeof _201=="string"){
_201=_201.stripSpaces().split(",");
for(var i=0;i<_201.length;i++){
DR.Utils.Toggle.setDisabled(_201[i],!DR.Utils.Toggle.isChecked(_200));
}
}
};
DR.Utils.Toggle.disabledFromRadioButton=function(_204,_205){
var _206=(typeof _204=="object")?_204:document.getElementById(_204);
var _207=(_206.value=="true"||_206.value==true)?false:true;
if(typeof _205=="string"){
_205=_205.stripSpaces().split(",");
for(var i=0;i<_205.length;i++){
DR.Utils.Toggle.setDisabled(_205[i],_207);
}
}
};
DR.Utils.Toggle.isChecked=function(_209){
var _20a=(typeof _209=="object")?_209:document.getElementById(_209);
if(_20a){
return (_20a.checked)?true:false;
}else{
return false;
}
};
DR.Utils.Toggle.setDisabled=function(_20b,_20c){
var _20d=(typeof _20b=="object")?_20b:document.getElementById(_20b);
if(_20d){
_20d.disabled=(_20c=="true"||_20c==true)?true:false;
}
};
DR.Utils.Toggle.setVisibility=function(_20e,_20f){
var _210=(typeof _20e=="object")?_20e:document.getElementById(_20e);
if(_210){
if(_20f){
$(_210).fadeIn();
}else{
$(_210).hide();
}
}
};
DR.Utils.Toggle.enableTab=function(_211){
var _212=(typeof _211=="object")?_211:document.getElementById(_211);
_212=_212.parentNode;
var tabs=(_212.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(_212,"selected");
DR.Utils.Toggle.setVisibility("tabContent_"+_212.id,true);
};
DR.Utils.Toggle.visibilityFromLink=function(_215,_216,_217){
var _218=(typeof _215=="object")?_215:document.getElementById(_215);
var _219=(_218.className=="collapsedImage")?true:false;
var _21a=(_218.className=="collapsedImage")?"expandedImage":"collapsedImage";
if(typeof _216=="string"){
_216=_216.stripSpaces().split(",");
for(var i=0;i<_216.length;i++){
DR.Utils.Toggle.setVisibility(_216[i],_219);
}
}
if(typeof _217=="string"){
_217=_217.stripSpaces().split(",");
for(var j=0;j<_217.length;j++){
DR.Utils.Toggle.setVisibility(_217[j],!_219);
}
}
DR.Utils.replaceCSSClass(_218,_218.className,_21a);
};
DR.Utils.Toggle.visibilityFromCheckbox=function(_21d,_21e,_21f){
var _220=(typeof _21d=="object")?_21d:document.getElementById(_21d);
var _221=(_220.checked)?true:false;
if(typeof _21e=="string"){
_21e=_21e.stripSpaces().split(",");
for(var i=0;i<_21e.length;i++){
DR.Utils.Toggle.setVisibility(_21e[i],_221);
}
}
if(typeof _21f=="string"){
_21f=_21f.stripSpaces().split(",");
for(var j=0;j<_21f.length;j++){
DR.Utils.Toggle.setVisibility(_21f[j],!_221);
}
}
};
DR.Utils.Toggle.visibilityFromRadioButton=function(_224,_225,_226){
var _227=(typeof _224=="object")?_224:document.getElementById(_224);
if(typeof _225=="string"){
_225=_225.stripSpaces().split(",");
for(var i=0;i<_225.length;i++){
DR.Utils.Toggle.setVisibility(_225[i],true);
}
}
if(typeof _226=="string"){
_226=_226.stripSpaces().split(",");
for(var j=0;j<_226.length;j++){
DR.Utils.Toggle.setVisibility(_226[j],false);
}
}
};
DR.Utils.Toggle.childTable=function(_22a,_22b){
var _22c=document.getElementById(_22b);
var _22d=(_22c.style.display!="none");
if(_22d){
_22c.style.display="none";
_22a.className="first collapsed";
}else{
_22c.style.display="";
_22a.className="first expanded";
}
};
DR.Utils.Toggle.childTableFromCheckbox=function(_22e,_22f,_230){
var _231=document.getElementById(_230);
var _232=(_231.style.display!="none");
if(!_22e.checked){
_231.style.display="none";
_22f.className="first collapsed";
}else{
_231.style.display="";
_22f.className="first expanded";
}
};
(function($){
var _234={active:0,autoHeight:false,collapsible:false,refreshOnChange:false,followRemoteLinks:true,defaultUnit:"px",header:">dt"};
var _235=function(_236,ui){
var $dd;
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;
}else{
$dd=ui.newHeader.next();
}
var _239=$(ui.newHeader).find("a");
if(_239.length===0){
return;
}
var _23a=_239[0].getAttribute("href");
var fn=function(res,_23d){
if(_23d==="success"){
$.dr.triggerUnobtrusiveEvents(this);
$(this).trigger("accordionload",[this,res]);
if(!ui.options.refreshOnChange){
$(this).addClass("loaded");
}
}
};
if(_23a&&_23a.indexOf("#")==-1){
var _23e;
var _23f=_239[0].getAttribute("data-options");
if(_23f){
var dO=$.dr.utils.evalString(_23f);
if(typeof dO.selector==="string"){
_23e=[_23a,dO.selector].join(" ");
}
}else{
_23e=_23a;
}
if($dd&&!$dd.hasClass("loaded")&&ui.options.followRemoteLinks){
$dd.load(_23e,{ajaxTime:(new Date()).getTime()},fn);
}
}
};
var _241=function(_242,_243){
return _242?typeof _242=="number"?_243.filter(":eq("+_242+")"):_243.not(_243.not(_242)):_242===false?$([]):_243.filter(":eq(0)");
};
$.namespace("dr",{accordion:function(_244){
var _245=arguments.length===0?true:false;
return this.each(function(){
if(typeof $(this).accordion!=="undefined"){
var _246={};
if(_245){
_234.change=_235;
var _247=this.getAttribute("data-options");
if(_247){
_246=$.dr.utils.evalString(_247,"Error parsing accodion data-options for ("+this.id||"accordian"+")");
if(typeof _244==="error"){
_246={};
}
}
}
var _248=$.extend(true,{},_234,_244,_246);
if($.browser.msie&&!_248.height){
_248.animated=false;
}
if(_248.height){
_248.active=0;
_248.collapsible=false;
_248.fillSpace=true;
$(this).wrap("<div class=\"acc-wrapper\"></div>");
$(this).parent(".acc-wrapper").height(parseInt(_248.height,10)+_248.defaultUnit);
if(_248.width){
$(this).parent(".acc-wrapper").width(parseInt(_248.width,10)+_248.defaultUnit);
}
}else{
if(_248.width){
$(this).width(parseInt(_248.width,10)+_248.defaultUnit);
}
}
$.dr.accordion.setOptions(_248);
$(this).accordion(_248);
if($.browser.msie){
$(this).find(_248.header).each(function(){
this.onselectstart=function(){
return false;
};
});
}
if(_248.active!==false){
var _249=$(this).find(_248.header).eq(_248.active);
if(_249){
var ui={newContent:_249.next().children(),newHeader:_249,options:_248};
setTimeout(function(){
_235("change",ui);
},0);
}
}
}else{
$.dr.utils.logError("The jquery-ui js file is not present on this page.");
}
});
}});
$.dr.accordion={options:{},getDefaults:function(){
return _234;
},setDefaults:function(_24b){
if(_24b){
$.extend(_234,_24b);
}
$(document).trigger("afterAccordionSetDefaults",[_24b]);
},setOptions:function(_24c){
this.options=_24c;
},getOptions:function(){
return this.options;
}};
$.namespace("dr.accordion.show",function(_24d,_24e){
return this.each(function(){
var $acc=$(this);
if($acc.is(".accordion")){
var _250=$.dr.accordion.getOptions();
var _251=$(_250.header,this);
if(_24d!==false){
var _252=_251.index(_251.filter(".ui-state-active"));
var _253=_251.index(_241.call(this,_24d,_251));
if(typeof _24e==="function"&&_253!==_252){
$acc.one("accordionchange",function(_254,ui){
_24e.call(this,_254,ui);
});
}else{
if(_24e&&typeof _24e==="function"){
_24e.call(this);
}
}
}
$acc.accordion("activate",_24d);
}
});
});
var _256=function(evt,_258){
$(".accordion",_258).dr.accordion();
};
$.dr.addUnobtrusiveEvent(_256,"unobtrusiveEventEarly");
})(jQuery);
(function($){
var _25a={header:"p:first",containerCls:"drui-collapsible-container",selector:".collapsible",preventDefault:true,change:function(_25b,vis,_25d){
}};
$.namespace("dr",{collapsible:function(_25e){
return this.each(function(i){
var _260=$(this).attr("data-options");
if(_260&&!_25e){
_25e=$.dr.utils.evalString(_260);
}
var _261=$.extend(true,{},_25a,_25e);
var self=$(this);
if(typeof _261.change==="function"){
$(this).bind("collapsiblechange",_261.change);
}
$(this).data("options",_261);
$(this).find(_261.header).each(function(){
$(this).addClass("drui-collapsible-header");
$(this).next().addClass(_261.containerCls);
if($(this).hasClass("collapsed")||$(this).addClass("drui-collapsible-collapsed")){
$(this).removeClass("collapsed");
$(this).addClass("drui-collapsible-collapsed");
$("."+_261.containerCls,$(this).parents(_261.selector)).hide();
$(this).trigger("collapsiblechange",[false,_261]);
}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(_261.selector).dr.collapsible.expand();
}else{
$(this).parents(_261.selector).dr.collapsible.collapse();
}
if(_261.preventDefault){
evt.preventDefault();
}
});
});
});
}});
$.namespace("dr.collapsible",{collapse:function(evt){
var _266=$(this).data("options");
if($(_266.header,$(this)).hasClass("drui-collapsible-collapsed")){
return this;
}
$(this).trigger("collapsiblechangestart",[false,_266]);
$("."+_266.containerCls,$(this)).slideUp("fast",function(){
$(this).parents(_266.selector).trigger("collapsiblechange",[false,_266]);
});
$(_266.header,$(this)).toggleClass("drui-collapsible-collapsed");
$(_266.header,$(this)).toggleClass("drui-collapsible-active");
return this;
},expand:function(evt){
var _268=$(this).data("options");
if($(_268.header,$(this)).hasClass("drui-collapsible-active")){
return this;
}
$(this).trigger("collapsiblechangestart",[true,_268]);
$("."+_268.containerCls,$(this)).slideDown("fast",function(){
$(this).parents(_268.selector).trigger("collapsiblechange",[true,_268]);
});
$(_268.header,$(this)).toggleClass("drui-collapsible-collapsed");
$(_268.header,$(this)).toggleClass("drui-collapsible-active");
return this;
},toggle:function(vis){
if(!!vis){
this.dr.collapsible.expand();
}else{
this.dr.collapsible.collapse();
}
}});
var _26a=function(evt,_26c){
$(".collapsible",_26c).dr.collapsible();
};
$.dr.addUnobtrusiveEvent(_26a,"unobtrusiveEventEarly");
})(jQuery);
(function($){
var _26e={LOADING:$.dr.strings.LOADING,PROCESSING:$.dr.strings.PROCESSING,SAVING_CHANGES:"Saving changes to {0}",SAVE_SUCCESSFUL:"Changes to {0} were saved successfully.",UNSAVED_CHANGES_CONFIRM_TITLE:"Unsaved Changes",UNSAVED_CHANGES_CONFIRM_QUESTION:"Do you want to save your changes to {0} before performing the requested action?",UNSAVED_CHANGES_CONFIRM_QUESTION_LOAD:"Do you want to save your changes to {0} before loading {1}?"};
var _26f={messages:{},selector:"",url:"",params:"",postingMaskEnabled:false,isSaveMode:false,showSuccessOverlay:false,preventCache:true,preventCacheParamName:"ajaxTime",title:"",newTitle:"",height:"",width:"",loadingMaskDelay:500,postingMaskDelay:1500,autoLoad:true,beforeload:null,loadsuccess:null,loaderror:null,beforepost:null,postsuccess:null,posterror:null,beforerender:null,afterrender:null,resize:null,ajaxcomplete:null};
var _270=function(_271,_272){
this.settingName="";
this.newSettingName="";
this.panelId=_271;
this.content=(typeof _271==="string")?getElem(_271):_271;
this.$content=$(this.content);
this.currentForm=null;
this.loaded=false;
this.loading=false;
this.saving=false;
this.isSaveMode=true;
this.url="";
this.queryStringData="";
this.errors=[];
this.showSuccessMessage=true;
this.saveCallback=null;
this.loadCallback=null;
this.checkChangeCallback=null;
this.isModal=(_272)?true:false;
this.options={messages:_26e,loadingMaskDelay:500,postingMaskDelay:500,preventCache:true,preventCacheParamName:"ajaxTime"};
};
_270.prototype={setOptions:function(_273){
_273=$.extend(true,{},_26f,this.options,_273);
this.url=_273.url;
this.panelId=_273.id;
this.settingName=_273.title;
this.newSettingName=_273.newTitle;
this.isModal=_273.postingMaskEnabled;
this.showSuccessMessage=_273.showSuccessOverlay;
this.isSaveMode=_273.isSaveMode;
if(typeof _273.params=="object"){
this.queryStringData=$.param(_273.params,true);
}else{
if(typeof _273.params=="string"){
this.queryStringData=_273.params;
}
}
if(this.content&&_273.width!=""){
$(this.content).css("width",$.dr.utils.normalizeCSSDimension(_273.width));
}
if(this.content&&_273.height!=""){
$(this.content).css("height",$.dr.utils.normalizeCSSDimension(_273.height));
}
this.options=_273;
},get:function(url,_275){
var _276=this;
if(_276.$content.drTriggerEach("beforeload")!==false){
_276.markLoading();
_276.url=url;
if(_275){
_276.queryStringData=_275;
url=$.dr.utils.appendParam(url,_275);
}
if(_276.options.preventCache){
url=$.dr.utils.appendParam(url,_276.options.preventCacheParamName+"="+(new Date()).getTime());
}
$.ajax({url:url,type:"GET",dataType:"html",success:function(data,_278,_279){
_276.loaded=true;
_276.loading=false;
if(_276.$content.drTriggerEach("loadsuccess",[data,_278,_279])!==false){
if(_276.$content.drTriggerEach("beforerender",[data,_278,_279])!==false){
_276.render(data);
if($.isFunction(_276.loadCallback)){
setTimeout(function(){
_276.loadCallback(data);
},0);
}
setTimeout(function(){
_276.$content.drTriggerEach("afterrender",[data,_278,_279]);
},0);
}
}
setTimeout(function(){
_276.$content.drTriggerEach("ajaxcomplete",[data,_278,_279]);
},1);
},error:function(_27a,_27b,_27c){
_276.loaded=true;
_276.loading=false;
_276.saving=false;
if(_276.$content.drTriggerEach("loaderror",[_27a,_27b,_27c])!==false){
if(_27a.status=="500"){
_276.render(_27a.responseText);
}else{
if(_27a.status=="403"){
window.location=$.dr.LOGIN_URL;
}
}
}
setTimeout(function(){
_276.$content.drTriggerEach("ajaxcomplete",[_27a.responseText,_27b,_27a]);
},1);
}});
}
if($.isFunction(_276.beforeLoadCallback)){
_276.beforeLoadCallback();
}
_276.loading=true;
},refresh:function(){
this.get(this.url,this.queryStringData);
},render:function(html){
if($.browser.msie){
html=html.replace("<script","<br style=\"display:none\"/> <script");
}
this.content.innerHTML=html;
if(this.currentForm!==null){
var _27e=this.currentForm;
$(_27e).dr.form.destroy();
}
$.dr.triggerUnobtrusiveEvents(this.content);
var _27f=$("form",this.content);
if(_27f.length==0&&this.currentForm!==null){
_27f.dr.form.destroy();
this.currentForm=null;
}else{
for(var i=0;i<_27f.length;i++){
var _27e=_27f[i];
this.currentForm=_27e;
this.addHijackForm();
}
}
this.runScripts();
},runScripts:function(){
var div=this.content;
var _282=$("script",div);
this.errors=[];
var _283=[];
var _284=(navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")==-1)?true:false;
for(var i=0;i<_282.length;i++){
var _286=_282[i];
var h=_286.innerHTML;
if(h.indexOf("document.write")==-1){
if(_286.src){
$.dr.getScript(_286.src);
}else{
if(h){
if(_284){
_283.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(_284){
var _288=this;
var _289=function(){
for(var i=0;i<_283.length;i++){
try{
eval(_283[i]);
}
catch(e){
_288.errors.push(e);
}
}
_288.displayScriptErrors();
};
window.setTimeout(_289,0);
}
},displayScriptErrors:function(){
if(this.errors.length>0&&$.dr.IS_INTERNAL_USER){
$.dr.alert("There were javascript errors when loading "+this.settingName+":<br/><br/>"+this.errors.join("<br/><br/>"));
}
},addHijackForm:function(){
var _28b=this;
var _28c=this.currentForm.onsubmit;
this.currentForm.onsubmit=function(_28d){
var _28e=true;
if($.isFunction(_28c)){
_28e=(_28c.call(this)!==false);
}
if(_28e&&(_28d!==false)){
_28b.hijackForm();
_28e=false;
}
return _28e;
};
},hijackForm:function(_28f){
var _290=this;
var _291=$(this.currentForm).serialize();
if(_290.$content.drTriggerEach("beforepost",[_291])!==false){
var url=$.dr.utils.appendParam(this.url,this.queryStringData,this.options.preventCacheParamName+"="+(new Date()).getTime());
var _293=function(_294,_295,_296){
_290.hijackFailureCallback(_294,_295,_296);
};
var _297;
this.loaded=false;
_297=function(data,_299,_29a){
_290.hijackSaveCallback(data,_299,_29a);
if($.isFunction(_28f)){
_28f();
}
};
var _29b=this.currentForm;
$(_29b).dr.form.reIndex();
$.ajax({type:"POST",url:url,success:_297,error:_293,data:_291});
this.saving=true;
this.markSaving();
}
},hijackSaveCallback:function(data,_29d,_29e){
var _29f=this;
if(data!==undefined){
this.saving=false;
this.loaded=true;
if(typeof $.dr.processingDialog=="object"){
$.dr.processingDialog.hide();
}
if(this.showSuccessMessage){
var msg=this.options.messages.SAVE_SUCCESSFUL.replace("{0}",this.settingName);
$.dr.success(msg);
}
if($.isFunction(this.checkChangeCallback)){
this.checkChangeCallback();
}else{
if(_29f.$content.drTriggerEach("postsuccess",[data,_29d,_29e])!==false){
if(_29f.$content.drTriggerEach("beforerender",[data,_29d,_29e])!==false){
_29f.render(data);
if($.isFunction(_29f.saveCallback)){
_29f.saveCallback(data);
}
setTimeout(function(){
_29f.$content.drTriggerEach("afterrender",[data,_29d,_29e]);
},0);
}
}
}
}
setTimeout(function(){
_29f.$content.drTriggerEach("ajaxcomplete",[data,_29d,_29e]);
},1);
},hijackFailureCallback:function(_2a1,_2a2,_2a3){
var _2a4=this;
if(typeof $.dr.processingDialog=="object"){
$.dr.processingDialog.hide();
}
if(_2a4.$content.drTriggerEach("posterror",[_2a1,_2a2,_2a3])!==false){
if(_2a1.status=="403"){
window.location=$.dr.LOGIN_URL;
}else{
if(_2a1.status=="500"){
_2a4.render(_2a1.responseText);
}
}
}
setTimeout(function(){
_2a4.$content.drTriggerEach("ajaxcomplete",[_2a1.responseText,_2a2,_2a1]);
},1);
},markLoading:function(){
if(!this.saving){
this.loaded=false;
var _2a5=this;
var func=function(){
if(!_2a5.loaded){
var _2a7=(_2a5.settingName.length>0)?" "+_2a5.settingName:"";
var msg=_2a5.options.messages.LOADING.replace("...",_2a7+"...");
_2a5.showLoadingMask(msg);
}
};
setTimeout(func,this.options.loadingMaskDelay);
}
},markSaving:function(){
if(!this.loading){
this.saving=true;
var _2a9=this;
var func=function(){
if(!_2a9.loaded){
if(_2a9.isModal){
var _2ab=(_2a9.isSaveMode)?_2a9.options.messages.SAVING_CHANGES:_2a9.options.messages.PROCESSING;
var _2ac=(_2a9.settingName.length>0)?" "+_2a9.settingName:"";
var msg=_2ab.replace("{0}",_2ac+"...");
_2a9.showLoadingMask(msg);
}else{
if(typeof $.dr.processingDialog=="object"){
$.dr.processingDialog.show();
}
}
}
};
setTimeout(func,this.options.postingMaskDelay);
}
},showLoadingMask:function(msg){
var h=Math.max(150,$(this.content).height());
var _2b0=Math.round(h/2)-9;
var _2b1="<div class=\"loadingTabContent\" style=\"height:"+h+"px;\" ><span style=\"margin-top:"+_2b0+"px\">"+msg+"</span></div>";
this.content.innerHTML=_2b1;
},checkChanges:function(_2b2){
if(this.currentForm==null){
_2b2(false);
return false;
}
var _2b3=this.checkFormChanges();
if(_2b3){
if(this.currentForm!==undefined){
var _2b4=this.currentForm.onsubmit;
if($.isFunction(_2b4)){
var _2b5=_2b4(false);
if(_2b5===false){
return false;
}
}
}
this.checkChangeCallback=_2b2;
var _2b6=this;
var _2b7=function(_2b8){
_2b6.checkChangesConfirmCallback(_2b8);
};
var q;
if(this.settingName==this.newSettingName){
q=this.options.messages.UNSAVED_CHANGES_CONFIRM_QUESTION;
q=q.replace("{0}",this.settingName);
}else{
q=this.options.messages.UNSAVED_CHANGES_CONFIRM_QUESTION_LOAD;
q=q.replace("{0}",this.settingName);
q=q.replace("{1}",this.newSettingName);
}
$.dr.warning(q,_2b7,{title:this.options.messages.UNSAVED_CHANGES_CONFIRM_TITLE});
return true;
}else{
_2b2(false);
return false;
}
},checkFormChanges:function(){
var _2ba=this.currentForm;
if(!_2ba){
return false;
}
if($(_2ba).dr.form.get().checkChanges){
if($(_2ba).dr.form.checkForChanges()){
return true;
}
}
return false;
},checkChangesConfirmCallback:function(_2bb){
var _2bc=false;
if(_2bb){
var _2bd=this.currentForm;
if($(_2bd).dr.form.validate()){
this.hijackForm();
return;
}else{
_2bc=true;
}
}
if(!_2bc){
this.checkChangeCallback();
}
},busy:function(){
return (this.loading||this.saving);
},isLoading:function(){
return (this.loading);
},isLoaded:function(){
return (this.loaded);
},posting:function(){
return (this.saving);
},getCurrentForm:function(){
var _2be=this.currentForm;
return _2be;
}};
$.namespace("dr.ajaxpanel",function(_2bf){
var _2c0=new Date().getTime();
var _2c1=$.extend(true,{},_26f,_2bf);
return this.dr.bindPluginEvents({"beforeload":_2c1.beforeload,"loadsuccess":_2c1.loadsuccess,"loaderror":_2c1.loaderror,"beforerender":_2c1.beforerender,"afterrender":_2c1.afterrender,"beforepost":_2c1.beforepost,"postsuccess":_2c1.postsuccess,"posterror":_2c1.posterror,"resize":_2c1.resize,"ajaxcomplete":_2c1.ajaxcomplete}).each(function(){
_2c1=$.extend(true,{},_2c1);
var _2c2=$(this);
_2c1.container=_2c2;
var _2c3=_2c2.data("ajaxpanel"),url=_2c1.url;
if(!_2c3){
_2c3=new _270(_2c2[0],_2c1.postingMaskEnabled);
}
_2c3.setOptions(_2c1);
if(_2c1.autoLoad&&url.length!==0&&!_2c3.busy()){
_2c3.refresh();
}
_2c2.data("ajaxpanel",_2c3);
});
});
$.dr.utils.createPluginEvents("dr.ajaxpanel",["beforeload","loadsuccess","loaderror","beforepost","postsuccess","posterror","beforerender","afterrender","resize","ajaxcomplete"]);
var _2c4=function(){
var _2c5=this;
args=Array.prototype.slice.call(arguments);
var _2c6=args.shift();
var _2c7=args.shift();
this.each(function(){
var _2c8=$(this).data("ajaxpanel");
if(_2c8){
if($.isFunction(_2c8[_2c7])){
var r=_2c8[_2c7].apply(_2c8,args);
if(typeof r!=="undefined"){
_2c5=r;
}
}
}else{
_2c5=_2c6;
}
});
return _2c5;
};
$.namespace("dr.ajaxpanel",{setOptions:function(_2ca){
_2c4.call(this,this,"setOptions",_2ca);
},refresh:function(){
_2c4.call(this,this,"refresh");
return this;
},render:function(html){
if(!_2c4.call(this,false,"busy")){
_2c4.call(this,this,"render",html);
}
return this;
},posting:function(){
return _2c4.call(this,false,"posting");
},loaded:function(){
return _2c4.call(this,false,"isLoaded");
},loading:function(){
return _2c4.call(this,false,"isLoading");
},busy:function(){
return _2c4.call(this,false,"busy");
},checkChanges:function(_2cc){
return _2c4.call(this,false,"checkChanges",_2cc);
}});
})(jQuery);
DR.Widgets.AjaxPanel=function(_2cd,_2ce){
this.settingName="";
this.newSettingName="";
this.panelId=_2cd;
this.content=(typeof _2cd==="string")?getElem(_2cd):_2cd;
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=(_2ce)?true:false;
};
DR.Widgets.AjaxPanel.prototype={get:function(url,_2d0){
this.markLoading();
this.url=url;
if(_2d0){
this.queryStringData=_2d0;
url=$.dr.utils.appendParam(url,_2d0);
}
var _2d1=this;
$.ajax({url:$.dr.utils.appendParam(url,"ajaxTime="+(new Date()).getTime()),type:"GET",dataType:"html",success:function(_2d2){
if($.browser.msie){
_2d2=_2d2.replace("<script","<br style=\"display:none\"/> <script");
}
_2d1.content.innerHTML=_2d2;
_2d1.loaded=true;
_2d1.loading=false;
_2d1.prepare();
_2d1.runScripts();
if(typeof _2d1.loadCallback=="function"){
_2d1.loadCallback(_2d2);
}
},error:function(xhr){
if(xhr.status=="500"){
DR.Utils.replaceHtml(_2d1.content,xhr.responseText);
_2d1.loaded=true;
_2d1.loading=false;
_2d1.saving=false;
_2d1.prepare();
_2d1.runScripts();
}else{
if(xhr.status=="403"){
window.location=$.dr.LOGIN_URL;
}
}
}});
if(typeof _2d1.beforeLoadCallback=="function"){
_2d1.beforeLoadCallback();
}
this.loading=true;
},refresh:function(){
this.get(this.url,this.queryStringData);
},prepare:function(){
if(this.currentForm!==null){
var _2d4=this.currentForm;
$(_2d4).dr.form.destroy();
}
$.dr.triggerUnobtrusiveEvents(this.content);
var _2d5=$("form",this.content);
if(_2d5.length==0&&this.currentForm!==null){
_2d5.dr.form.destroy();
this.currentForm=null;
}else{
for(var i=0;i<_2d5.length;i++){
var _2d4=_2d5[i];
this.currentForm=_2d4;
this.addHijackForm();
}
}
},addHijackForm:function(){
var _2d7=this;
var _2d8=this.currentForm.onsubmit;
this.currentForm.onsubmit=function(_2d9){
var _2da=true;
if($.isFunction(_2d8)){
_2da=(_2d8.call(this)!==false);
}
if(_2da&&(_2d9!==false)){
_2d7.hijackForm();
_2da=false;
}
return _2da;
};
},runScripts:function(){
var div=this.content;
var _2dc=$("script",div);
this.errors=[];
var _2dd=[];
var _2de=(navigator.userAgent.indexOf("Safari")>-1&&navigator.userAgent.indexOf("Chrome")==-1)?true:false;
for(var i=0;i<_2dc.length;i++){
var _2e0=_2dc[i];
var h=_2e0.innerHTML;
if(h.indexOf("document.write")==-1){
if(_2e0.src){
var head=document.getElementsByTagName("head")[0];
var _2e3=document.createElement("script");
_2e3.setAttribute("type","text/javascript");
_2e3.setAttribute("src",_2e0.src);
head.appendChild(_2e3);
}else{
if(h){
if(_2de){
_2dd.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(_2de){
var s=[];
for(var i=0;i<_2dd.length;i++){
s.push("try{"+_2dd[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(_2e6){
var url=$.dr.utils.appendParam(this.url,this.queryStringData,"ajaxTime="+(new Date()).getTime());
var _2e8=$(this.currentForm).serialize();
var _2e9=this;
var _2ea=function(o){
_2e9.hijackFailureCallback(o);
};
var _2ec;
this.loaded=false;
_2ec=function(data,o){
_2e9.hijackSaveCallback(data,o);
if(typeof _2e6=="function"){
_2e6();
}
};
var _2ef=this.currentForm;
$(_2ef).dr.form.reIndex();
$.ajax({type:"POST",url:url,success:_2ec,error:_2ea,data:_2e8});
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 _2f3=data;
if($.browser.msie){
_2f3=_2f3.replace("<script","<br style=\"display:none\"/> <script");
}
this.content.innerHTML=_2f3;
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 _2f5=(!this.loaded)?0:250;
this.loaded=false;
var _2f6=this;
var func=function(){
_2f6.markLoadingST();
};
window.setTimeout(func,_2f5);
}
},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 _2fa=150;
this.saving=true;
var _2fb=this;
var func=function(){
_2fb.markSavingST();
};
window.setTimeout(func,_2fa);
}
},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(_2ff){
if(this.currentForm==null){
_2ff();
return false;
}
var _300=this.checkFormChanges();
if(_300){
if(this.currentForm!==undefined){
var _301=this.currentForm.onsubmit;
if(typeof _301=="function"){
var _302=_301(false);
if(_302===false){
return false;
}
}
}
this.checkChangeCallback=_2ff;
var _303=this;
var _304=function(_305){
_303.checkChangesConfirmCallback(_305);
};
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,_304,this.UNSAVED_CHANGES_CONFIRM_TITLE);
return true;
}else{
_2ff();
return false;
}
},checkFormChanges:function(){
var _307=this.currentForm;
if(!_307){
return false;
}
if($(_307).dr.form.get().checkChanges){
if($(_307).dr.form.checkForChanges()){
return true;
}
}
return false;
},checkChangesConfirmCallback:function(_308){
var _309=false;
if(_308){
var _30a=this.currentForm;
if($(_30a).dr.form.validate()){
this.hijackForm();
return;
}else{
_309=true;
}
}
if(!_309){
this.checkChangeCallback();
}
},getCurrentForm:function(){
var _30b=this.currentForm;
return _30b;
}};
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 _30d={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(_30f,term){
return _30f.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");
},scroll:true,scrollHeight:180};
var _311=function(_312,_313,end){
if(_312.createTextRange){
var _315=_312.createTextRange();
_315.collapse(true);
_315.moveStart("character",_313);
_315.moveEnd("character",end);
_315.select();
}else{
if(_312.setSelectionRange){
_312.setSelectionRange(_313,end);
}else{
if(_312.selectionStart){
_312.selectionStart=_313;
_312.selectionEnd=end;
}
}
}
_312.focus();
};
var _316=function(_317){
var data={};
var _319=0;
function matchSubset(s,sub){
if(!_317.matchCase){
s=s.toLowerCase();
}
var i=s.indexOf(sub);
if(i==-1){
return false;
}
return i==0||_317.matchContains;
}
function add(q,_31e){
if(_319>_317.cacheLength){
flush();
}
if(!data[q]){
_319++;
}
data[q]=_31e;
}
function populate(){
if(!_317.data){
return false;
}
var _31f={},nullData=0;
if(!_317.url){
_317.cacheLength=1;
}
_31f[""]=[];
for(var i=0,ol=_317.data.length;i<ol;i++){
var _321=_317.data[i];
_321=(typeof _321=="string")?[_321]:_321;
var _322=_317.formatMatch(_321,i+1,_317.data.length);
if(_322===false){
continue;
}
var _323=_322.charAt(0).toLowerCase();
if(!_31f[_323]){
_31f[_323]=[];
}
var row={value:_322,data:_321,result:_317.formatResult&&_317.formatResult(_321)||_322};
_31f[_323].push(row);
if(nullData++<_317.max){
_31f[""].push(row);
}
}
$.each(_31f,function(i,_326){
_317.cacheLength++;
add(i,_326);
});
}
setTimeout(populate,25);
function flush(){
data={};
_319=0;
}
return {flush:flush,add:add,populate:populate,load:function(q){
if(!_317.cacheLength||!_319){
return null;
}
if(!_317.url&&_317.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(_317.matchSubset){
for(var i=q.length-1;i>=_317.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 _330=function(_331,_332,_333,_334,_335,_336){
var _337={ACTIVE:"ac_over"};
var _338,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(_33a){
if(target(_33a).nodeName&&target(_33a).nodeName.toUpperCase()=="LI"){
active=$("li",list).removeClass(_337.ACTIVE).index(target(_33a));
$(target(_33a)).addClass(_337.ACTIVE);
}
}).click(function(_33b){
$(target(_33b)).addClass(_337.ACTIVE);
var _33c=_333();
if(_33c!==null){
_335(_33c);
}
_332.focus();
return false;
}).mousedown(function(){
_334.mouseDownOnSelect=true;
}).mouseup(function(){
_334.mouseDownOnSelect=false;
});
if(_331.width>0){
popup.css("width",_331.width);
}
needsInit=false;
}
function target(_33d){
var _33e=_33d.target;
while(_33e&&_33e.tagName!="LI"){
_33e=_33e.parentNode;
}
if(!_33e){
return [];
}
return _33e;
}
function moveSelect(step){
_338.slice(active,active+1).removeClass(_337.ACTIVE);
movePosition(step);
var _340=_338.slice(active,active+1).addClass(_337.ACTIVE);
if(_331.scroll){
var _341=0;
_338.slice(0,active).each(function(){
_341+=this.offsetHeight;
});
if((_341+_340[0].offsetHeight-list.scrollTop())>list[0].clientHeight){
list.scrollTop(_341+_340[0].offsetHeight-list.innerHeight());
}else{
if(_341<list.scrollTop()){
list.scrollTop(_341);
}
}
}
}
function movePosition(step){
active+=step;
if(active<0){
active=0;
}else{
if(active>=_338.size()){
active=_338.size()-1;
}
}
}
function limitNumberOfItems(_343){
return _331.max&&_331.max<_343?_331.max:_343;
}
function fillList(){
list.empty();
var max=limitNumberOfItems(data.length);
for(var i=0;i<max;i++){
if(!data[i]){
continue;
}
var _346=_331.formatItem(data[i].data,i+1,max,data[i].value,term);
if(_346===false){
continue;
}
var li=$("<li/>").html(_331.highlight(_346,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];
$.data(li,"ac_data",data[i]);
}
_338=list.find("li");
if(_331.selectFirst){
_338.slice(0,1).addClass(_337.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!=_338.size()-1&&active+9>_338.size()){
moveSelect(_338.size()-1-active);
}else{
moveSelect(9);
}
},hide:function(){
popup&&popup.slideUp(function(){
_336.parent().removeClass("ac_open");
shadow.hide();
});
_338&&_338.removeClass(_337.ACTIVE);
active=-1;
},visible:function(){
return shadow&&shadow.is(":visible");
},current:function(){
return this.visible()&&(_338.filter("."+_337.ACTIVE)[0]||_331.selectFirst&&_338[0]);
},show:function(){
var _34a=_332.offsetWidth-2;
var _34b=$(_332).offset();
_336.parent().addClass("ac_open");
popup.css({width:typeof _331.width=="string"||_331.width>0?_331.width:_34a});
popup.show();
shadow.show();
var _34c=-(20/2);
var _34d=-1;
if(DR.Utils.BrowserDetect.browser=="Explorer"&&DR.Utils.BrowserDetect.version<7){
_34c=0;
}
var _34e="Left";
var _34f="Bottom";
var _350="Right";
var _351="Down";
DR.Utils.Position.snapTo(_332,shadow[0],_34c,_34d,_34e,_34f,_350,_351,false);
if(_331.scroll){
list.scrollTop(0);
list.css({maxHeight:_331.scrollHeight,overflow:"auto"});
if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){
var _352=0;
_338.each(function(){
_352+=this.offsetHeight;
});
var _353=_352>_331.scrollHeight;
list.css("height",_353?_331.scrollHeight:_352);
if(!_353){
_338.width(list.width()-parseInt(_338.css("padding-left"))-parseInt(_338.css("padding-right")));
}
}
}
},selected:function(){
var _354=_338&&_338.filter("."+_337.ACTIVE).removeClass(_337.ACTIVE);
return _354&&_354.length&&$.data(_354[0],"ac_data");
},emptyList:function(){
list&&list.empty();
},unbind:function(){
popup&&popup.remove();
}};
};
var _355=function(_356,_357,_358){
var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};
var _35a=$(_356),originalInput=_356,boundInput=null;
var _35b=($.browser.msie)?6:4;
var _35c=_35a.dr.computedWidth()+_35b;
_35c=(_35c>_35b)?_35c:(_356.offsetWidth);
var _35d=$("<div class=\"ac_wrapper\" style=\"width:"+_35c+"px;\" />");
boundInput=_35a.clone();
boundInput.removeAttr("name").removeAttr("id");
if(_356.tagName.toLowerCase()=="textarea"){
boundInput.css("max-width",_356.offsetWidth+"px").css("max-height",_356.offsetHeight+"px");
_35d.addClass("ac_textareaWrapper");
}
boundInput.appendTo(_35d);
boundInput.val(_35a.val());
boundInput.attr("data-expand-collapse","false");
_35a.attr("data-expand-collapse","false");
_35a.data("validationEnabled",false);
_35d.insertBefore(_35a);
_35d.wrap("<div class=\"autocomplete\" />");
_35a.hide();
_35a=boundInput;
_356=boundInput[0];
var _35e=_356;
var _35f=$("<span class=\"loading\" />").appendTo(_35d).hide();
if(_357.comboBox){
_35d.addClass("ac_comboBox");
var _360=$("<span class=\"handle\" />").appendTo(_35d).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){
_356.focus();
hasFocus=1;
onChange(0,true);
}
};
var _365=($.browser.msie)?200:20;
setTimeout(func,_365);
evt.preventDefault();
});
}
var _366=function(){
if(boundInput!==null){
$(originalInput).val(boundInput.val());
}
};
var _367=function(){
if($.dr&&$.dr.form&&$.dr.form.validateField){
$.dr.form.validateField(_356,true);
}
};
_35a=$(_356).attr("autocomplete","off");
var _368,previousValue="",cache=new _316(_357),hasFocus=0,lastKeyPressCode,config={mouseDownOnSelect:false},select=new _330(_357,_356,selectCurrent,config,doCallback,_35d),blockSubmit;
$.browser.opera&&$(_356.form).bind("submit.autocomplete",function(){
if(blockSubmit){
blockSubmit=false;
return false;
}
});
function doCallback(_369){
_367();
if(!_369){
return;
}
_366();
if(typeof _357.callback=="function"){
var func=function(){
_357.callback(_369[0],_369[1]);
};
setTimeout(func,10);
}
}
_35a.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(_36b){
lastKeyPressCode=_36b.keyCode;
switch(_36b.keyCode){
case KEY.UP:
_36b.preventDefault();
if(select.visible()){
select.prev();
}else{
onChange(0,true);
}
break;
case KEY.DOWN:
_36b.preventDefault();
if(select.visible()){
select.next();
}else{
onChange(0,true);
}
break;
case KEY.PAGEUP:
_36b.preventDefault();
if(select.visible()){
select.pageUp();
}else{
onChange(0,true);
}
break;
case KEY.PAGEDOWN:
_36b.preventDefault();
if(select.visible()){
select.pageDown();
}else{
onChange(0,true);
}
break;
case _357.multiple&&$.trim(_357.multipleSeparator)==","&&KEY.COMMA:
case KEY.TAB:
case KEY.RETURN:
var _36c=selectCurrent();
if(_36c!==null){
blockSubmit=true;
if(!_357.multiple){
if(_36b.keyCode==KEY.RETURN){
_36b.keyCode=KEY.TAB;
_36b.preventDefault();
}else{
_36b.keyCode=KEY.TAB;
}
}else{
_36b.preventDefault();
}
doCallback(_36c);
}
break;
case KEY.ESC:
select.hide();
break;
default:
clearTimeout(_368);
_368=setTimeout(onChange,_357.delay);
break;
}
_366();
_367();
}).focus(function(){
hasFocus++;
}).blur(function(evt){
_367();
_366();
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 _371;
if(data&&data.length){
for(var i=0;i<data.length;i++){
if(data[i].result.toLowerCase()==q.toLowerCase()){
_371=data[i];
break;
}
}
}
if(typeof fn=="function"){
fn(_371);
}else{
doCallback(_371);
}
}
$.each(trimWords(_35a.val()),function(i,_374){
request(_374,findValueCallback,findValueCallback);
});
}).bind("flushCache",function(){
cache.flush();
}).bind("setOptions",function(){
$.extend(_357,arguments[1]);
if("data" in arguments[1]){
cache.populate();
}
}).bind("unautocomplete",function(){
select.unbind();
_35a.unbind();
$(_356.form).unbind(".autocomplete");
});
function selectCurrent(){
var _375=select.selected();
if(!_375){
return false;
}
var v=_375.result;
previousValue=v;
if(_357.multiple){
var _377=trimWords(_35a.val());
if(_377.length>1){
v=_377.slice(0,_377.length-1).join(_357.multipleSeparator)+_357.multipleSeparator+v;
}
v+=_357.multipleSeparator;
}
_35a.val(v);
hideResultsNow();
return [_375.data,_375.value];
}
function onChange(arg1,_379){
if(lastKeyPressCode==KEY.DEL){
select.hide();
return;
}
var _37a=_35a.val();
if(!_379&&_37a==previousValue){
return;
}
previousValue=_37a;
_37a=lastWord(_37a);
if(_37a.length>=_357.minChars){
_35f.show();
if(!_357.matchCase){
_37a=_37a.toLowerCase();
}
request(_37a,receiveData,hideResultsNow);
}else{
stopLoading();
select.hide();
}
}
function trimWords(_37b){
if(!_37b){
return [""];
}
var _37c=_37b.split(_357.multipleSeparator);
var _37d=[];
$.each(_37c,function(i,_37f){
if($.trim(_37f)){
_37d[i]=$.trim(_37f);
}
});
return _37d;
}
function lastWord(_380){
if(!_357.multiple){
return _380;
}
var _381=trimWords(_380);
return _381[_381.length-1];
}
function autoFill(q,_383){
if(_357.autoFill&&(lastWord(_35a.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){
_35a.val(_35a.val()+_383.substring(lastWord(previousValue).length));
_311(_356,previousValue.length,previousValue.length+_383.length);
}
}
function hideResults(){
clearTimeout(_368);
_368=setTimeout(hideResultsNow,200);
}
function hideResultsNow(){
var _384=select.visible();
select.hide();
clearTimeout(_368);
stopLoading();
if(_357.mustMatch){
_35a.dr.autocomplete.search(function(_385){
if(!_385){
if(_357.multiple){
var _386=trimWords(_35a.val()).slice(0,-1);
_35a.val(_386.join(_357.multipleSeparator)+(_386.length?_357.multipleSeparator:""));
}else{
_35a.val("");
}
}
});
}
if(_384){
_311(_356,_356.value.length,_356.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,_38a,_38b){
if(!_357.matchCase){
term=term.toLowerCase();
}
var data=cache.load(term);
if(data&&data.length){
_38a(term,data);
}else{
if((typeof _357.url=="string")&&(_357.url.length>0)){
var _38d={ajaxTime:new Date()};
$.each(_357.extraParams,function(key,_38f){
_38d[key]=typeof _38f=="function"?_38f():_38f;
});
$.ajax({mode:"abort",port:"autocomplete"+_356.name,dataType:_357.dataType,url:_357.url,data:$.extend({query:lastWord(term),limit:_357.max},_38d),success:function(data){
var _391=_357.parse&&_357.parse(data)||parse(data);
cache.add(term,_391);
_38a(term,_391);
},error:function(_392,_393,_394){
if(typeof _357.errorCallback=="function"){
_357.failureCallback(_392,_393,_394);
}
}});
}else{
select.emptyList();
_38b(term);
}
}
}
function parse(data){
var _396=[];
var rows=data.split("\n");
for(var i=0;i<rows.length;i++){
var row=$.trim(rows[i]);
if(row){
row=row.split("|");
_396[_396.length]={data:row,value:row[0],result:_357.formatResult&&_357.formatResult(row,row[0])||row[0]};
}
}
return _396;
}
function stopLoading(){
_35f.hide();
}
return {boundInput:_35a};
};
var _39a=function(evt){
var a=$("input.autocomplete, textarea.autocomplete, input.combobox",this);
if(a.length>0){
a.dr.autocomplete();
}
};
$("form").live("dr-beforeindexfields",_39a);
$.dr.autocomplete={setDefaults:function(_39d){
if(_39d){
$.extend(_30d,_39d);
}
}};
$.namespace("dr",{autocomplete:function(_39e,_39f){
var _3a0=false,isUrl=(typeof _39e=="string")?true:false;
if(!_39f){
_39f={};
}
if(arguments.length==0){
_3a0=true;
}
return this.each(function(){
var jObj=$(this);
if(!jObj.data("autocomplete_inited")){
var _3a2=_39f;
if(_3a0){
isUrl=false;
_39e=jObj.attr("data-source");
var _3a3=jObj.attr("data-url");
dataOptions=jObj.attr("data-options");
if(!_39e){
if(!_3a3){
$.dr.utils.logError("("+this.id+") did not contain a data-url or data-source attribute");
return;
}else{
isUrl=true;
_39e=_3a3;
}
}else{
_39e=$.dr.utils.evalString(_39e,"The referenced data-source for ("+this.id+") does not exist.");
if(typeof _39e=="error"){
return;
}
}
if(dataOptions){
_3a2=$.dr.utils.evalString(dataOptions,"Error parsing autocomplete data-options for ("+this.id+")");
if(typeof _3a2=="error"){
return;
}
}
}
if(this.tagName.toLowerCase()=="textarea"){
if(typeof _3a2.multiple=="undefined"){
_3a2.multiple=true;
}
}
var _3a4=$.extend({},_30d,{url:isUrl?_39e:null,data:isUrl?null:_39e,delay:isUrl?_30d.delay:10},_3a2);
if(jObj.hasClass("combobox")){
_3a4.comboBox=true;
}
_3a4.highlight=_3a4.highlight||function(_3a5){
return _3a5;
};
_3a4.formatMatch=_3a4.formatMatch||_3a4.formatItem;
jObj.data("autocomplete_inited","true");
var ac=new _355(this,_3a4);
jObj.data("autocomplete",ac);
if(!_3a0){
$(this.form).dr.form.initFields(ac.boundInput);
}
}
});
}});
$.namespace("dr.autocomplete",{search:function(_3a7){
return this.trigger("search",[_3a7]);
},flushCache:function(){
return this.trigger("flushCache");
},setOptions:function(_3a8){
return this.trigger("setOptions",[_3a8]);
},destroy:function(){
return this.trigger("unautocomplete");
}});
})(jQuery);
(function($){
$.namespace("dr.button",{disable:function(_3aa){
var _3ab=(_3aa===false)?true:false;
if(!_3ab&&typeof $.dr.processingDialog=="object"){
$.dr.processingDialog.disable();
}
return this.each(function(){
if(this.tagName.toLowerCase()=="button"){
if(!_3ab){
var _3ac=$(this);
if(!_3ac.data("originalText")){
_3ac.data("originalText",_3ac.text());
}
var text=(_3aa)?_3aa:(_3ac.hasClass("search"))?$.dr.strings.SEARCHING:(_3ac.hasClass("login"))?$.dr.strings.AUTHORIZING:$.dr.strings.PROCESSING;
_3ac.html("<span><span><span>"+text+"</span></span></span>").addClass("processing");
}
this.disabled=true;
}
});
},enable:function(){
return this.each(function(){
var _3ae=$(this);
var _3af=_3ae.data("originalText");
if(_3af){
_3ae.dr.button.text(_3af);
}
_3ae.removeClass("processing");
this.disabled=false;
});
if(typeof $.dr.processingDialog=="object"){
$.dr.processingDialog.enable();
}
},text:function(_3b0,_3b1,_3b2,_3b3){
return this.each(function(){
if(this.tagName.toLowerCase()=="button"){
var _3b4=$(this);
if(_3b3===true){
_3b4.addClass("rightAlign");
}else{
if(_3b3===false){
_3b4.removeClass("rightAlign");
}
}
if(_3b0&&_3b0.length>0){
_3b4.data("originalText",_3b0);
_3b4.html("<span><span><span>"+_3b0+"</span></span></span>");
}
if(_3b2){
_3b4.removeClass(_3b1).addClass(_3b2);
}
}
});
}});
})(jQuery);
DR.Widgets.FauxTree=function(_3b5,guid,_3b7,_3b8,_3b9,_3ba){
this.childNodes=[];
this.parentNode=_3b5;
this.isExpanded=false;
if(_3b9!==undefined){
this.saveState=_3b9;
this.cookieName=_3ba;
}else{
this.saveState=false;
this.cookieName=null;
}
this.isDirectory=_3b7;
this.hasCheckbox=(_3b8===true)?true:false;
this.guid=guid;
this.obj=document.getElementById(this.guid);
var _3bb=guid.split(DR.Widgets.FauxTree.PATH_SEPARATOR);
this.level=_3bb.length;
this.shortId=_3bb[_3bb.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(_3bf){
DR.Widgets.FauxTree.INDENTED_COLUMN_POSITION=(_3bf)?_3bf: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,_3c1){
var _3c2=path.split(DR.Widgets.FauxTree.PATH_SEPARATOR);
var _3c3=true;
if(_3c2.length>1){
_3c3=true;
}else{
_3c3=(_3c1)?true:false;
}
var _3c4=_3c2.shift();
var guid=null;
if(this.guid===""){
guid=_3c4;
}else{
guid=this.guid+DR.Widgets.FauxTree.PATH_SEPARATOR+_3c4;
}
if(!this.childNodes[_3c4]){
this.childNodes[_3c4]=new DR.Widgets.FauxTree(this,guid,_3c3,this.hasCheckbox,this.saveState);
DR.Widgets.FauxTree.NODE_LOOKUP_TABLE[guid]=this.childNodes[_3c4];
}
if(_3c2.length>0){
this.childNodes[_3c4].addItem(_3c2.join(DR.Widgets.FauxTree.PATH_SEPARATOR),_3c1);
}
},findItem:function(path){
return DR.Widgets.FauxTree.NODE_LOOKUP_TABLE[path];
},toggleDirectory:function(_3c7){
var _3c8=document.getElementById(_3c7);
var _3c9=(_3c8.className.indexOf(DR.Widgets.FauxTree.EXPANDED_DIRECTORY_STYLE)!=-1)?true:false;
var _3ca=this.findItem(_3c7);
if(_3ca.isDirectory){
if(_3c9){
_3ca.collapse();
if(this.saveState){
this.stateCookie.removeArrayValue(_3ca.shortId);
}
}else{
_3ca.expand();
if(this.saveState){
this.stateCookie.addArrayValue(_3ca.shortId);
}
}
}
},findChild:function(){
var _3cb;
for(var i in this.childNodes){
_3cb=this.childNodes[i];
break;
}
return _3cb;
},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 _3ce=this.childNodes[i];
_3ce.expandAll();
}
}
}
},revertState:function(){
if(this.saveState){
var _3cf=this.getCookieArray();
if(this.isDirectory){
var _3d0=false;
if(_3cf.length>0){
var i=0;
while(!_3d0&&i<_3cf.length){
if(_3cf[i]==this.shortId){
_3d0=true;
this.expand();
}
i++;
}
}
if(_3d0){
for(var j in this.childNodes){
if(DR.Widgets.FauxTree.isNode(this.childNodes[j])){
var _3d3=this.childNodes[j];
_3d3.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 _3d4=this.getCookieArray();
var _3d5=false;
if(_3d4.length>0){
var i=0;
while(!_3d5&&i<_3d4.length){
if(_3d4[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 _3d8=this.childNodes[j];
_3d8.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 _3dc=[];
var _3dd=false;
var _3de={inputFocusClass:"inputFocus"};
var _3df={INPUT_FOCUS_CLASS:"inputFocusClass"};
var _3e0={WINDOW_ON_BEFORE_UNLOAD:"There have been changes made to the form that have not been saved."};
var _3e1=false;
var _3e2=false;
$.dr.form={getMessages:function(){
return _3e0;
},getDefaults:function(){
return _3de;
},setDefaults:function(_3e3){
if(_3e3){
_3e3=$.dr.utils.legacyMap(_3e3,_3df);
$.extend(_3de,_3e3);
}
$(document).trigger("dr-afterformsetdefaults",[_3e3]);
},setMessages:function(_3e4){
if(_3e4){
$.extend(_3e0,_3e4);
}
$(document).trigger("dr-afterformsetmessages",[_3e4]);
}};
window.customFormIndexerCallBack=function(){
};
var _3e5=function(_3e6){
$("form",_3e6).dr.form();
customFormIndexerCallBack();
customFormIndexerCallBack=function(){
};
};
var _3e7=function(_3e8){
var _3e9=(parent.overlayStack)?parent.overlayStack.getCurrent():null;
var _3ea=(typeof _3e9!=="undefined"&&typeof _3e9!==null&&_3e9!==null)?_3e9.loading:false;
if(_3ea){
var func=function(){
_3e7(_3e8);
};
window.setTimeout(func,50);
}else{
_3e5(_3e8);
}
};
var _3ec=function(evt,_3ee){
$.dr.form.setDefaults({});
$.dr.form.setMessages({});
$(document).trigger("dr-beforeinitforms");
if($.browser.msie&&$("body.modalPage").length>0){
_3e7(_3ee);
}else{
_3e5(_3ee);
}
};
$.dr.addUnobtrusiveEvent(_3ec);
var _3ef=function(evt){
if(!this.getAttribute("readonly")&&!this.disabled&&this.type!="file"){
if(!(this.type=="select-one"&&$.browser.msie&&parseInt($.browser.version.slice(0,1),10)>6)){
$(this).addClass(_3de.inputFocusClass);
}
}
};
var _3f1=function(evt){
var _3f3=this;
var func=function(){
if(!_3f3.getAttribute("readonly")&&!_3f3.disabled&&_3f3.type!="file"){
$(_3f3).removeClass(_3de.inputFocusClass);
}
};
window.setTimeout(func,50);
};
$.dr.utils.getSelectOptionValue=function(_3f5){
if(_3f5){
if(_3f5.text!==""&&_3f5.outerHTML&&_3f5.outerHTML.toLowerCase().indexOf("value=")==-1){
return _3f5.text;
}else{
return _3f5.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 _3f8=$(obj).val();
_3f8=(_3f8===null)?"":_3f8.join(",");
if($(obj).dr.form.field.getDefaultValue()!=_3f8){
return true;
}
}else{
if($(obj).dr.form.field.getDefaultValue()!=$(obj).val()){
return true;
}
}
}
}
return false;
};
$.dr.utils.getLabel=function(obj){
var _3fa=$(obj).data("label");
if(!_3fa){
var _3fb=$(obj.form).data("labels");
if(!_3fb){
_3fb=$("label",obj.form);
$(obj.form).data("labels",_3fb);
}
var _3fc=_3fb.filter("label[for=\""+obj.id+"\"]");
_3fa=_3fc.text().replace(":","");
if(!_3fa){
_3fa=obj.name;
}
$(obj).data("label",_3fa);
}
return _3fa;
};
var _3fd=function(_3fe){
var _3ff=_3fe.onsubmit;
_3fe.onsubmit=function(){
var _400=true;
if($.isFunction(_3ff)){
_400=(_3ff.call(this)!==false);
}
if(_400){
_400=$(_3fe).dr.form.validate();
}
if(_400){
var _401=$(_3fe).data("behavior");
if(_401&&_401.checkChanges){
$(_3fe).dr.form.enableCheckChanges(false);
}
}
$(_3fe).trigger("dr-aftervalidation",[_400]);
return _400;
};
_3fe._nativeFormSubmit=_3fe.submit;
_3fe.submit=function(){
if(_3fe.onsubmit.call(this)){
_3fe._nativeFormSubmit();
}
};
};
var _402=function(_403,_404){
this.formObj=_403;
this.options=_404;
this.init();
};
_402.prototype={init:function(){
this.firstField=null;
this.normalizeName();
this.bindBehavior();
},normalizeName:function(){
var _405=this.formObj;
var _406="name";
var n=_405.attributes[_406];
var f="form_"+new Date().getTime();
if(n){
if(!($.browser.msie&&n.value==="")){
f=n.value;
}
}
_405.setAttribute("name",f);
_405._formName=f;
this.formIndex=_3dc.length;
_3dc.push(_405);
},bindBehavior:function(){
var _409=this.formObj;
var _40a=$(this.formObj);
var _40b=(_40a.attr("data-behavior")=="standard")?true:false;
var _40c=(_40a.attr("data-behavior")=="search")?true:false;
var _40d=(_40a.attr("data-enable-field-events")=="false")?false:true;
var _40e=(_40a.attr("data-check-changes")=="false")?false:true;
var _40f=(_40a.attr("data-auto-focus")=="false")?false:true;
var _410=(_40a.attr("data-force-check-changes")=="true")?true:false;
this.checkChanges=(_40b&&(_40e||_410))?true:false;
this.autoFocus=((_40b||_40c)&&_40f)?true:false;
this.enableFieldEvents=((_40b||_40c)&&_40d)?true:false;
this.forceCheckChanges=_410;
this.customFieldSelector=_40a.attr("data-custom-field-selector");
if(_40b||_40c){
var _411=($.browser.msie)?$($.makeArray(this.formObj.elements)):$(this.formObj.elements);
this.initFields(_411);
if(_40e||_410){
this.addUnloadEvent();
}
if(this.autoFocus){
this.focusFirstElement();
}
_3fd(_409);
}
},initFields:function(_412,_413){
if(this.formObj.getAttribute("_inited")===null||_413){
var _414=this;
if(typeof this.customFieldSelector!=="undefined"){
_412=_412.filter(this.customFieldSelector);
}
var _415;
if(_413){
$(this.formObj).removeData("labels");
_415=_412.filter(function(i){
var di=$(this).data("data-inited");
return di!=="true";
});
}
var _418=$.dr.getPlugins("form");
for(var i=0;i<_418.length;i++){
_418[i].call(this,(_415&&_415.length>0)?_415:_412);
}
var _41a="input:text,input:password,select,textarea";
var _41b=function(e){
if($.isFunction(e.data.handler)){
var _41d=e.target;
if($(_41d).is(_414.customFieldSelector||_41a)){
e.data.handler.call(_41d,e);
}
}
};
if(_413){
$(this.formObj).unbind("focusin._form").unbind("focusout._form");
}
$(this.formObj).bind("focusin._form",{handler:_3ef},_41b).bind("focusout._form",{handler:_3f1},_41b);
if(this.autoFocus&&this.firstField===null&&!_3dd&&$(this.formObj).filter(":visible").length>0){
_412.each(function(){
var _41e=$(this);
if(_41e.is(_41a)&&_41e.is(":visible")){
_414.firstField=this;
_3dd=true;
return false;
}
});
}
}
this.formObj.setAttribute("_inited","true");
_412.each(function(i,e){
var _421=typeof $(e).data("data-inited")==="undefined";
if(_421){
$(e).data("data-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(!_3e1){
_3e1=true;
$(window).bind("beforeunload",function(){
if(!_3e2){
_3e2=true;
var _423=false;
for(var i=0;i<_3dc.length;i++){
var _425=_3dc[i];
var _426=$(_425).data("behavior");
if(_426){
if(_426.checkChanges&&!_426.forceCheckChanges){
if($(_425).dr.form.checkForChanges()){
_423=true;
break;
}
}
}
}
if(_423){
if($.browser.msie){
window.onerror=function(err){
window.event.returnValue=(err.toLowerCase().indexOf("unspecified error")>=0)?true:false;
};
}
var m=_3e0.WINDOW_ON_BEFORE_UNLOAD;
if(!$.browser.safari){
m="\n"+m+"\n";
}
$(document).trigger("dr-showchangeswarning");
return m;
}
}
});
}
}};
$.namespace("dr",{form:function(_429){
try{
if($.browser.msie){
$("fieldset:not(.noBackground)",this).filter(function(){
return ($("> legend",this).length==0);
}).addClass("noBackground");
}
_429=$.dr.utils.legacyMap(_429,_3df);
_429=(typeof _429=="object")?$.extend(true,_3de,_429):_3de;
var _42a=this.each(function(){
var _42b=$(this);
var opts=$.extend(true,{},_429);
var _42d=_42b.attr("data-options");
if(_42d){
_42d=$.dr.utils.evalString(_42d);
$.extend(true,opts,_42d);
}
_42b.data("dataOptions",opts);
if(_42b.attr("data-behavior")=="standard"||_42b.attr("data-behavior")=="search"){
if(this.tagName.toLowerCase()=="form"){
_42b.trigger("dr-beforeindexfields");
_42b.data("behavior",new _402(this,opts));
_42b.trigger("dr-afterindexfields");
}
}
});
_3dd=false;
return _42a;
}
catch(e){
$.dr.utils.logError("Error when binding form behavior",e);
}
}});
function getFormObj(_42e){
if(_42e.length>0){
var f=$(_42e[0]).data("behavior");
return (f)?f:{};
}
}
$.namespace("dr.form",{get:function(){
return getFormObj(this);
},setOptions:function(_430){
if(_430){
$.extend(getFormObj(this).options,_430);
}
$(document).trigger("dr-afterformsetoptions",[_430]);
},getChangedFields:function(){
var _431=this[0];
return $(":input",_431).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 _434=getFormObj(this);
if(typeof _434.fieldsWithValidation!=="undefined"){
_434.fieldsWithValidation=[];
}
if(typeof _434.initFields!=="undefined"){
_434.initFields(($.browser.msie)?$(":input",_434.formObj):$(_434.formObj.elements),true);
}
},initFields:function(_435,_436){
var _437=getFormObj(this);
if(typeof _435==="string"){
_435=$(_435,_437);
}
_436=(_436===false)?false:true;
_437.initFields(_435,_436);
},checkForChanges:function(){
var _438=$(this).dr.form.getChangedFields();
return (_438.length>0)?true:false;
},displayChangedFields:function(){
return this.each(function(){
var _439=$(this).dr.form.getChangedFields();
console.log("Changed Fields for "+this._formName);
if(_439.length>0){
for(var i=0;i<_439.length;i++){
var _43b=_439[i];
console.log("ID: <b>"+_43b.id+"</b>");
console.log("     VALUE:"+$(_43b).dr.form.field.getDefaultValue());
console.log("     NEW_VALUE:"+$(_43b).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 _43e=[];
var _43f=elem.options;
for(var i=0;i<_43f.length;i++){
if(_43f[i].defaultSelected){
var val=$.dr.utils.getSelectOptionValue(_43f[i]);
if(type=="select-one"){
return val;
}else{
_43e.push(val);
}
}
}
if(type=="select-one"&&_43e.length===0){
return $.dr.utils.getSelectOptionValue(_43f[0]);
}
return (_43e.length>0)?_43e.join(","):"";
}else{
return elem.defaultValue.replace(/\r/g,"");
}
}
}
}});
})(jQuery);
(function($){
var _443={pagesStartAtZero:false,pagingOverride:null,selectAllAcrossPagesEnabled:true,selectAllResults:"all",submitType:"get",clientsideSortingEnabled:true,searchPersistCallback:function(){
}};
var _444={PAGES_START_AT_ZERO:"pagesStartAtZero",PAGING_OVERRIDE:"pagingOverride",SELECT_ALL_ACROSS_PAGES_ENABLED:"selectAllAcrossPagesEnabled",SELECT_ALL_RESULTS:"selectAllResults",SUBMIT_TYPE:"submitType",CLIENTSIDE_SORTING_ENABLED:"clientsideSortingEnabled",SEARCH_PERSIST_CALLBACK:"searchPersistCallback"};
var _445={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 _446="TD.actionCol input[type=checkbox], TD.actionCol input[type=radio]";
var _447=function(_448,_449){
var form=$("input:first",_448.container).parents("form");
if(form.length>0){
form=form[0];
var _44b=$("input.listAction",form);
if(_44b.length==1){
_44b.val(_449);
form.submit();
}
}
};
var list=function(_44d){
this.containerId=_44d;
this.searchPanel=null;
this.container=(typeof _44d=="string")?$("#"+_44d):_44d;
this.actionRowTop=$("DIV.actionRow",this.container);
this.actionRowBottom=$("DIV.actionRowBottom",this.container);
this.submitType=_443.submitType;
this.hasRadios=false;
this.clientSideSortingEnabled=_443.clientsideSortingEnabled;
this.buttonsTop=[];
this.buttonsBottom=[];
this.currentSelectedItem=null;
this.selectedItemLength=0;
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.initSelectionCounter();
this.refreshState(true);
this.initSortableColumns();
this.initTabs();
},initCheckboxes:function(init){
var _44f=this;
if(init){
this.items=$(_446,this.container).click(function(){
_44f.toggle(this);
}).addClass("initalized");
}else{
$("TD.actionCol input[type=checkbox]:not(.initalized), TD.actionCol input[type=radio]:not(.initalized)",this.container).click(function(){
_44f.toggle(this);
}).addClass("initalized");
this.items=$(_446,this.container);
}
this.hasRadios=(this.items.filter(":radio:first").length>0)?true:false;
},initTabs:function(){
var _450=$(".listTabsContent",this.container);
var _451=$(".listTabs",this.container);
var _452=this;
$(".search",_451).click(function(){
_452.toggleTab("search");
return false;
});
$(".columns",_451).click(function(){
_452.toggleTab("columns");
return false;
});
this.listTabsContent=_450;
this.listTabs=_451;
if($(".searchExpanded",this.container).val()=="true"&&!$(".listTabsContent",this.container).is(":visible")){
$(".search",_451).removeClass("selected");
_452.toggleTab("search");
}
$("button.search",_450).removeAttr("disabled");
},toggleTab:function(id){
var _454=this.listTabsContent;
var _455=this.listTabs;
var _456=$(".search",_455);
var _457=$(".columns",_455);
var _458=(_456.hasClass("selected"))?"search":(_457.hasClass("selected"))?"columns":null;
$("div",_455).removeClass("selected");
var _459=$(".searchExpanded",this.container);
if(_458==id){
_454.hide();
_459.val("false");
}else{
_454.show();
$("."+id,_455).addClass("selected");
$("."+id,_454).show();
_458=(id=="search")?"columns":"search";
if(id=="search"){
_459.val("true");
}else{
_459.val("false");
}
$("."+_458,_454).hide();
var _45a=$("."+id+" :input",_454).filter("input[type=text], textarea, select");
if(_45a.length>0){
try{
_45a[0].focus();
}
catch(e){
}
}
}
_443.searchPersistCallback(this.container,(_456.hasClass("selected"))?"true":"false");
},initSelectAll:function(){
var _45b=this;
var th=$("thead th.actionCol:first",this.container);
if(th.length>0){
th.html("<input title=\""+_445.SELECT_ALL+"\" type=\"checkbox\" class=\"selectAll\" />");
this.selectAllCheckbox=$("INPUT.selectAll",this.container).click(function(){
_45b.toggleSelectAll();
}).get(0);
if(this.hasRadios||this.items.length===0){
$(this.selectAllCheckbox).hide().insertAfter("<span>&nbsp;</span>");
}
}
},initButtons:function(){
var _45d=(this.actionRowTop)?this.actionRowTop:this.actionRowBottom;
var _45e=this;
if(_45d){
var _45f=$("BUTTON.single,BUTTON.multiple",this.actionRowBottom);
var _460=$("BUTTON.single,BUTTON.multiple",_45d).each(function(i){
var btn=$(this);
var _463="_single";
var _464=btn.hasClass("single");
var _465=btn.hasClass("multiple");
if(_464||_465){
_45e.buttonsTop[_45e.buttonsTop.length]={buttonObj:this,name:this.name,isSingle:_464,isMultiple:_465};
if(_45f.length>0&&typeof _45f[i]!==undefined){
_45e.buttonsBottom[_45e.buttonsBottom.length]={buttonObj:_45f[i],name:_45f[i].name,isSingle:_464,isMultiple:_465};
}
}
});
}
$("UL.buttons BUTTON[name]",this.container).not("[onclick]").click(function(){
var _466=$(this);
var name=_466.attr("name");
var _468=$(this).attr("data-confirm-action");
if(_468){
var func=function(ok){
if(ok){
_45e.submitActionButton(_466[0],name);
}
};
$.dr.confirm(_468,func);
}else{
_45e.submitActionButton(this,name);
}
});
},submitActionButton:function(btn,_46c){
btn=(typeof btn=="String")?document.getElementById(btn):btn;
_46c=(_46c)?_46c:btn.name;
_447(this,_46c);
},initSortableColumns:function(){
var _46d=$("TABLE.clientSideSort:first",this.container);
var _46e=$("TABLE THEAD A",this.container).filter(function(){
var href=this.href;
if(!href){
$(this).css("cursor","pointer");
return true;
}
var _470=window.location.href.replace(window.location.hash,"");
href=href.replace(_470,"");
return (href.length==0||href.indexOf("#")===0);
}).each(function(){
$(this).attr("title",_445.SORT_BY.replace("{0}",$(this).text()));
});
$("TABLE THEAD TH",this.container).filter(function(){
return $("a",this).length>0;
}).addClass("sortable");
if(_46d.length>0&&this.totalPages==1&&this.clientSideSortingEnabled){
if(typeof $.fn.tablesorter=="function"){
if(_46d.length==0){
_46d=$("TABLE.dataTable",this.container);
}
var _471=0;
var _472=0;
var _473=($("TABLE THEAD TH.actionCol",this.container).length>0)?1:0;
$("TABLE THEAD TH",this.container).not("TH.actionCol").each(function(_474){
var td=$(this);
if(td.hasClass("ascending")){
_471=_474+_473;
}else{
if(td.hasClass("descending")){
_471=_474+_473;
_472=1;
}
}
});
var _476={sortList:[[_471,_472]]};
if(_473){
_476.headers={0:{sorter:false}};
}
_46d.tablesorter(_476);
}
}else{
var _477=this;
_46e.click(function(){
var _478=$(this).attr("data-sort-column");
_477.changeSortColumn(this,_478);
return false;
});
}
},initSelectionCounter:function(){
this.persistedSelections=$(".persistedSelections",this.container);
var _479=$(".itemCount",this.container);
this.allSelected=false;
if(this.persistedSelections.length>0&&_479.length){
this.submitType="post";
var val=this.persistedSelections.val();
if(val=="all"){
this.allSelected=true;
this.persistedSelectionCount=this.totalItems-this.items.length;
}else{
var _47b=val.replace(/,\s/g,",");
var _47c=","+_47b+",";
this.items.each(function(){
var _47d=new RegExp(","+this.value+",");
if(_47d.test(_47c)){
_47c=_47c.replace(_47d,",");
}
});
var _47e="";
var _47f=_47c.length;
if(_47f>2){
_47e=_47c.substring(1,_47c.length-1);
}
$(".persistedSelections",this.container).val(_47e);
this.persistedSelectionCount=(_47e.length==0)?0:_47e.split(",").length;
}
var _480=$(".itemType",this.container);
this.itemType=(_480.length>0)?_480.val():_445.ITEMS;
this.viewingOnlySelections=($(".viewingOnlySelections",this.container).val()=="true")?true:false;
var _481=$(".itemTypeSingular",this.container);
this.itemTypeSingular=(_481.length>0)?_481.val():_445.ITEM;
var _482=$(".allSelectedMessage",this.container).val();
if(!_482){
_482=_445.ALL_ITEMS_SELECTED.replace("{0}",this.itemType);
}
var _483=$(".viewingOnlySelectionsMessage",this.container).val();
if(!_483){
_483=_445.VIEW_ALL_MSG.replace("{0}",this.itemType);
}
var _484=$(".viewingOnlySelectionsLink",this.container).val();
if(!_484){
_484=_445.VIEW_ALL_LINK;
}
var _485=_445.SELECT_ALL_ITEMS.replace("{0}","<strong>"+this.totalItems+"</strong>").replace("{1}",this.itemType);
var _486=_445.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.selectedItemLength+"</td>");
s.push("<td class=\"itemLabel\">"+this.itemType+"</td>");
s.push("<td>");
s.push("<div class=\"selectAll\" style=\"display:none\"><span class=\"link\">"+_485+"</span></div>");
s.push("<div class=\"selected\" style=\"display:none\"><span class=\"msg\">"+_482+"</span></div>");
s.push("</td>");
if(this.viewingOnlySelections){
s.push("<td><div class=\"selectedFilter\" ><span class=\"msg\">"+_483+" &nbsp;  | &nbsp; <span class=\"msgLink\">"+_484+"</span></span></div></td>");
}else{
s.push("<td class=\"view\"><span class=\"link\">"+_445.VIEW_SELECTIONS+"</span></td>");
}
s.push("<td class=\"clear\"><span class=\"link\">"+_445.CLEAR_SELECTIONS+"</span></td>");
s.push("</tr></table>");
_479.append(s.join(""));
this.itemLabel=$(".itemLabel",_479);
if(this.persistedSelectionCount>0){
$(".clear, .view",_479).show();
}else{
$(".clear, .view",_479).hide();
}
this.refreshSelectionCount();
var _488=this;
$(".selectAll .link",_479).click(function(){
var _489=_443.selectAllResults;
if(_488.totalPages==1){
_489=_488.persistedSelections;
}
$(".persistedSelections",this.container).val(_489);
$(".clear, .selected",_479).show();
$(".selectAll, .view",_479).hide();
$(".count",_479).text(_488.totalItems);
});
$(".clear .link",_479).click(function(){
_488.selectAllCheckbox.checked=false;
_488.toggleSelectAll();
_488.persistedSelectionCount=0;
$(".persistedSelections",this.container).val("");
$(".count",_479).text(0);
$("div, .selected, .clear, .view, .selectAll",_479).hide();
if(_488.viewingOnlySelections){
_447(_488,"viewAll");
}
});
if(this.allSelected){
$(".selected",_479).show();
}
$(".view .link",_479).click(function(){
_447(_488,"viewSelections");
});
$(".msgLink",_479).click(function(){
_447(_488,"viewAll");
});
}
},refreshSelectionCount:function(){
var _48a=this.persistedSelectionCount+this.selectedItemLength;
$(".itemCount .count",this.container).text(_48a);
if(this.itemLabel){
var _48b=this.itemType;
if(_48a==1){
_48b=this.itemTypeSingular;
}
this.itemLabel.text(_48b+" "+_445.SELECTED);
}
var view=$(".itemCount .view",this.container);
if(_48a==0||$(".persistedSelections",this.container).val()==_443.selectAllResults){
view.hide();
}else{
view.show();
}
},toggleSelectAllMsg:function(_48d){
if(_443.selectAllAcrossPagesEnabled){
var _48e=$(".itemCount",this.container);
if(_48d){
if(!this.viewingOnlySelections){
$(".selectAll").show();
$(".selected",_48e).hide();
}
}else{
if(this.allSelected){
this.persistedSelectionCount==0;
this.allSelected=false;
$(".count",_48e).text(0);
}
if(this.persistedSelectionCount==0){
$(".clear",_48e).hide();
}
$("div:not(.selectedFilter)",_48e).hide();
if($(".persistedSelections",this.container).val()==_443.selectAllResults){
$(".persistedSelections",this.container).val("");
this.persistedSelectionCount=0;
}
}
}
},refreshState:function(init){
this.disabledBtnArray=[];
this.disabledButtons=[];
this.disabledButtonNameArray=[];
var _490=this;
this.selectedItemLength=0;
this.items.each(function(){
if(typeof this.onclick=="function"){
this.onclick();
}
if(this.checked){
_490.selectedItemLength++;
_490.updateDisabledButtons(this,true,false);
if(init){
_490.highlightRow(this);
}
}
});
this.refreshButtonState();
this.refreshSelectAllState(false);
},updateDisabledButtons:function(item,add,_493){
var _494=item.getAttribute("data-disabled-buttons");
if(_494!==undefined&&_494!==null){
var _494=_494.trim().split(" ");
for(var i=0;i<_494.length;i++){
var _496=_494[i];
var _497=0;
var _498=this.disabledButtons[_496];
if(_498!==undefined){
if(_493&&!add){
_497=_498-1;
}else{
_497=_498+1;
}
}else{
if(add){
_497=1;
}
}
this.disabledButtons[_496]=_497;
}
}
},refreshButtonState:function(){
var _499=this.persistedSelectionCount+this.selectedItemLength;
for(var j=0;j<this.buttonsTop.length;j++){
var btn=this.buttonsTop[j];
var _49c=(_499==0)?true:false;
if(this.disabledButtons[btn.name]!==undefined){
if(this.disabledButtons[btn.name]>0){
_49c=true;
}
}
if(!_49c){
if(_499>=2&&btn.isSingle){
_49c=true;
}
}
btn.buttonObj.disabled=_49c;
if(this.buttonsBottom.length>0&&typeof this.buttonsBottom[j]!==undefined){
this.buttonsBottom[j].buttonObj.disabled=_49c;
}
}
},refreshSelectAllState:function(_49d){
if(this.selectAllCheckbox){
if(!this.selectAllCheckbox.disabled){
this.selectAllCheckbox.checked=(this.selectedItemLength==this.items.length)?true:false;
}
}
if(!_49d){
this.refreshSelectionCount();
}
},toggle:function(item){
if(item.type=="radio"){
if(this.currentSelectedItem!=item&&this.currentSelectedItem!==null){
this.highlightRow(this.currentSelectedItem);
this.updateDisabledButtons(this.currentSelectedItem,false,true);
}
this.currentSelectedItem=item;
}else{
if(!item.checked){
this.toggleSelectAllMsg(false);
}
}
this.highlightRow(item);
this.refreshSelectionCount();
this.selectedItemLength=this.items.filter(":checked").length;
this.updateDisabledButtons(item,item.checked,true);
this.refreshButtonState();
this.refreshSelectAllState(false);
},toggleSelectAll:function(){
var _49f=this.items;
var _4a0=(this.selectAllCheckbox&&this.selectAllCheckbox.checked)?true:false;
this.items.attr("checked",_4a0);
this.tableRows=$("TABLE.dataTable > TBODY > TR:not(.unselectable)",this.container);
if(_4a0){
this.tableRows.addClass("selected");
}else{
this.tableRows.removeClass("selected");
}
this.refreshState();
this.toggleSelectAllMsg(_4a0);
},highlightRow:function(obj){
var _4a2=(obj.checked)?true:false;
var row=obj.parentNode.parentNode;
if(_4a2){
$(row).addClass("selected");
}else{
$(row).removeClass("selected");
}
},changeSortColumn:function(obj,_4a5){
var _4a6="ascending";
var _4a7=$(obj).attr("data-default-sort-direction");
if(_4a7){
if(_4a7.indexOf("desc")>-1||_4a7.indexOf("descending")>-1){
_4a6="descending";
}
}
var _4a8=_4a6;
if($(obj.parentNode).hasClass("ascending")||$(obj.parentNode).hasClass("descending")){
var _4a9=$(obj.parentNode).hasClass("descending")?"descending":"ascending";
_4a8=(_4a9=="ascending")?"descending":"ascending";
}
if(this.sortColumn.length>0){
if(DR.Widgets.Button!==undefined){
DR.Widgets.Button.disableSearchButton=function(){
};
}
this.sortColumn.val(_4a5);
this.sortDirection.val(_4a8);
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 _4aa=this;
$("A",this.controls).click(function(){
_4aa.handlePagerClick(this);
return false;
});
this.pageInputs=$("INPUT.currentPage",this.controls);
this.pageInputs.val(this.originalPageValue);
this.pageInputs.keypress(function(evt){
_4aa.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);
if(isNaN(this.totalPages)){
this.totalPages=1;
}
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 _4ad=this.totalPages;
var _4ae=this.currentPage;
$("strong.totalPages",this.controls).text(_4ad);
var _4af=false;
if(_4ad==1){
_4af=true;
$("A",this.controls).addClass("off");
}else{
if(_4ae==1){
$("A.first, A.prev",this.controls).addClass("off");
$("A.next, A.last",this.controls).removeClass("off");
}else{
if(this.currentPage==_4ad){
$("A.first, A.prev",this.controls).removeClass("off");
$("A.next, A.last",this.controls).addClass("off");
}else{
$("A",this.controls).removeClass("off");
}
}
}
if(_4af){
this.pageInputs.attr("disabled","disabled");
}else{
this.pageInputs.removeAttr("disabled");
}
},doEnterPush:function(evt,el){
if(evt.keyCode==13){
var _4b2=el.value;
if(isNaN(_4b2)||_4b2<0){
alert(_445.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(_4b2>this.totalPages){
_4b2=this.totalPages;
}else{
if(parseInt(_4b2,10)===0){
_4b2=1;
}
}
this.changePage(_4b2,true,evt);
}
}
},changePage:function(_4b3,_4b4,evt){
this.currentPage=_4b3;
if(_443.pagesStartAtZero){
_4b3--;
}
if(typeof _443.pagingOverride=="function"){
_443.pagingOverride(this.container,_4b3);
}else{
if(this.submitType.toLowerCase()=="post"){
var _4b6=$(".currentPage",this.container);
_4b6.val(_4b3);
_4b6[0].form.submit();
}else{
var url="";
url+=this.pageUrl?this.pageUrl.val()+"?":"?";
url+="&page="+_4b3;
if(this.searchFilters){
url+="&"+this.searchFilters.val();
}
if(this.sortColumn[0]&&this.sortDirection[0]){
url+="&"+this.sortColumn[0].name+"="+this.sortColumn.val();
url+="&"+this.sortDirection[0].name+"="+this.sortDirection.val();
}
window.location=url;
}
}
if(_4b4){
if(evt.preventDefault){
evt.preventDefault();
}else{
if(window.event){
window.event.cancelBubble=true;
window.event.returnValue=false;
}
}
return false;
}
}};
$.dr.list={getMessages:function(){
return _445;
},getDefaults:function(){
return _443;
},setDefaults:function(_4b8){
if(_4b8){
_4b8=$.dr.utils.legacyMap(_4b8,_444);
$.extend(_443,_4b8);
}
$(document).trigger("afterListSetDefaults",[_4b8]);
},setMessages:function(_4b9){
if(_4b9){
$.extend(_445,_4b9);
}
$(document).trigger("afterListSetMessages",[_4b9]);
}};
var _4ba=function(evt,_4bc){
var _4bd=$("DIV.listControl",_4bc).each(function(_4be){
var _4bf=$("TABLE.dataTable",this);
if(_4bf.length>0||$("div.listTabs",this).length>0){
var id=this.getAttribute("id");
if(!id){
id="list_"+_4be+"_"+new Date().getTime();
this.id=id;
}
$(this).data("list",new list(id));
}
});
};
$.dr.addUnobtrusiveEvent(_4ba);
$.namespace("dr",{list:function(){
return this.each(function(){
var _4c1=this;
if(this.tagName!="body"){
_4c1=this.parentNode;
}
_4ba(null,_4c1);
});
}});
$.namespace("dr.list",{refreshState:function(){
return this.each(function(){
var _4c2=$(this).data("list");
if(_4c2){
_4c2.refreshItemCount();
_4c2.resetPagerState();
_4c2.initCheckboxes(false);
_4c2.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 _4c8=$("div.content:first")||$("body");
_4c8.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,_4cc){
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(_4cc!==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 _4cf=this.items;
for(var i=0;i<_4cf.length;i++){
h+="<tr><td>"+(i+1)+"</td><td>"+_4cf[i]+"</td></tr>";
}
h+="</tbody></table>";
this.overlayContent.innerHTML=h;
this.refreshScroll();
var _4d1=this;
var func=function(){
_4d1.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(_4d4){
DR_Utils_Logger.log(_4d4);
}
(function($){
$.namespace("dr",{message:function(type){
return this.each(function(){
var _4d7=$(this);
var _4d8="messageDialog";
var _4d9=type;
_4d7.wrap("<div class=\""+_4d8+"\" ><div class=\"messageDialogContent\"></div></div>").removeAttr("style").addClass(_4d9).parent().dr.shadows().prepend("<a class=\"close\" href=\"#\">Close</a>");
$("."+_4d8).css({"top":"-"+$("."+_4d8).height()+"px","left":($(window).width()/2)-($("."+_4d8).width()/2)+"px"}).animate({top:0},1000);
$("a.close").click(function(){
$("."+_4d8).animate({top:"-"+$("."+_4d8).height()+"px"},500);
return false;
});
$(window).resize(function(){
$("."+_4d8).animate({"left":($(window).width()/2)-($("."+_4d8).width()/2)+"px"});
});
});
}});
})(jQuery);
DR.Widgets.ModelessOverlay=function(id,url,_4dc){
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.Dragging=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=(_4dc)?_4dc: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 _4de=function(){
overlayStack.buildIframe();
};
window.setTimeout(_4de,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 _4df=new DR.Utils.Position(this.dialog);
this.dialog.style.position="absolute";
_4df.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(_4e0){
if(!this.anchorId){
var w=this.width;
var h=this.height;
overlayStack.getPageSize();
var x,y;
var _4e4=0;
var _4e5=0;
var _4e6=0;
var _4e7=(DR.Utils.BrowserDetect.browser=="Explorer"&&DR.Utils.BrowserDetect.version<7)?true:false;
if(document.documentElement){
if(_4e7){
if($("body.modalPage").length==0&&!_4e0){
_4e4=18;
_4e5=1;
_4e6=9;
}
x=document.documentElement.scrollLeft+document.body.scrollLeft;
y=document.documentElement.scrollTop+document.body.scrollTop;
}
}
if(this.autoCenter||(!this.autoCenter&&!_4e0)){
if(_4e7){
this.dialog.style.left=(x+(overlayStack.doc.windowWidth/2)-((w-_4e4)/2+_4e5))+"px";
this.dialog.style.top=(y+(overlayStack.doc.windowHeight/2)-((h-_4e4)/2+_4e6))+"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,_4f4){
if(typeof this.callBackFunction=="function"){
this.callBackFunction(arg1,arg2,arg3,arg3,arg4,arg5,arg6,arg7,arg8,arg9,_4f4);
}
},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.ScrollBars();
}
}
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{
}
}
},ScrollBars: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 _4fb=document.getElementsByTagName("BODY")[0];
var _4fc=document.createElement("div");
_4fc.id="modal_"+this.id;
_4fc.className="modalOverlay";
var _4fd=this;
var ie6=false;
var _4ff=" colspan=\"2\"  rowspan=\"2\"";
if(DR.Utils.BrowserDetect.browser=="Explorer"&&DR.Utils.BrowserDetect.version<7){
ie6=true;
_4ff="";
this.shadowRight=8;
this.shadowBottom=8;
}
var s=[];
var _501="";
if(this.optionalClassName!=null){
_501="class=\""+this.optionalClassName+"\"";
}
var _502="";
if(this.disabled){
_502="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\" "+_501+" >";
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 "+_4ff+" 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\" "+_502+" 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);
_4fc.innerHTML=s;
if(this.inline){
var _503=document.getElementById(this.inlineId);
_503.style.display="block";
dParent=_503.parentNode;
this.dialog=dParent.insertBefore(_4fc,_503);
var _504=document.createElement("div");
_504.className="inlineDialog";
getElem(this.id+"_inner").appendChild(_504);
this.dialogClone=_504;
_504.appendChild(_503);
}else{
this.dialog=_4fb.appendChild(_4fc);
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(){
_4fd.cancel();
return false;
};
function myDialogInitDrag(_505){
_4fd.initDrag(_505);
}
if(this.Dragging){
getElem(this.id+"_titleTbl").onmousedown=myDialogInitDrag;
}
overlayStack.addWindowEventHandlers();
function eventMyDialogFocus(_506){
_4fd.focus();
}
_4fc.onclick=eventMyDialogFocus;
s=null;
function cleanupIE_Events(){
_4fc.detachEvent("onclick",eventMyDialogFocus);
overlayStack.destroyAll();
window.detachEvent("onunload",cleanupIE_Events);
}
if(this.browserType=="IE"){
window.attachEvent("onunload",cleanupIE_Events);
}else{
_4fc=null;
}
this.built=true;
},buildIframe:function(){
this.iframeCountID=overlayStack.getNewIframeID();
var _507=document.createElement("IFRAME");
_507.id="modal_iframe_"+this.iframeCountID;
_507.name="modal_iframe_"+this.iframeCountID;
_507.frameBorder=0;
if(this.iframeTransparency){
_507.allowTransparency=true;
}
var self=this;
function myDialogHideLoading(){
self.hideLoading();
}
function myDialogFocus(){
self.focus();
}
if(document.attachEvent){
_507.attachEvent("onload",myDialogHideLoading);
}else{
_507.addEventListener("load",myDialogHideLoading,false);
}
if(this.url.indexOf("modalTime")==-1){
var _509=new Date().getTime();
if(this.url.indexOf("?")==-1){
this.url+="?modalTime="+_509;
}else{
this.url+="&modalTime="+_509;
}
}
_507.src=this.url;
_507.style.display="none";
this.iframeWrapper.appendChild(_507);
this.iframe=_507;
function cleanupIE_Events(){
if(_507){
_507.detachEvent("onload",myDialogHideLoading);
_507.detachEvent("onfocus",myDialogFocus);
}
window.detachEvent("onunload",cleanupIE_Events);
}
if(this.browserType=="IE"){
window.attachEvent("onunload",cleanupIE_Events);
}else{
_507=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(_510){
if(_510.length>0){
this.anchorId=_510;
}
},setDragNDrop:function(v){
this.Dragging=v;
},setAutoCenter:function(v){
this.autoCenter=v;
},setTitle:function(_513){
if(_513!==""){
this.title=_513;
if(this.windowIcon){
this.windowIcon.innerHTML=_513;
}
}
},setDisabled:function(flag){
this.disabled=flag;
},disable:function(){
this.disabled=true;
$(this.closeLink).hide();
},enable:function(){
this.disabled=false;
$(this.closeLink).show();
},initDrag:function(_515){
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(_515);
},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,_519){
if(obj.addEventListener){
obj.addEventListener(evt,fn,Boolean(_519));
return true;
}else{
if(obj.attachEvent){
var r=obj.attachEvent("on"+evt,fn);
return r;
}else{
return false;
}
}
},removeEvent:function(obj,evt,fn,_51e){
if(obj.addEventListener){
obj.removeEventListener(evt,fn,Boolean(_51e));
return true;
}else{
if(obj.attachEvent){
var r=obj.detachEvent("on"+evt,fn);
return r;
}else{
return false;
}
}
}};
DR.Widgets.ModelessOverlay.open=function(url,_521,_522,_523){
var _524=new Date().getTime();
var m=new DR.Widgets.ModelessOverlay("modal_"+_524,url);
var t=_523;
if(!_523){
t="&nbsp;";
}
m.setTitle(t);
m.setSize(_521,_522);
m.show();
return m;
};
DR.Widgets.ModelessOverlay.close=function(){
parent.overlayStack.closeCurrent();
};
DR.Widgets.ModalOverlay=function(id,url,_529){
this.id=id;
this.url=url;
this.optionalClassName=(_529)?_529: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,_52b,_52c,_52d){
var _52e=new Date().getTime();
var m=new DR.Widgets.ModalOverlay("modal_"+_52e,url);
var t=_52d;
if(!_52d){
t="&nbsp;";
}
m.setTitle(t);
m.setSize(_52b,_52c);
m.show();
return m;
};
DR.Widgets.ModalOverlay.close=function(){
parent.overlayStack.closeCurrent();
};
DR.Widgets.InlineModalOverlay=function(id,_532){
this.id=id;
this.inlineId=id;
this.optionalClassName=(_532)?_532: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,_534){
this.id=id;
this.inlineId=id;
this.optionalClassName=(_534)?_534:null;
};
DR.Widgets.InlineModelessOverlay.prototype=new DR.Widgets.ModelessOverlay();
DR.Widgets.InlineModelessOverlay.prototype.modalType="Modeless";
DR.Widgets.InlineModelessOverlay.prototype.inline=true;
DR.Widgets.ModalOverlay.iframeCallback=function(func){
if($.isFunction(func)){
func="("+func+")();";
}
setTimeout(func,1);
};
(function($){
var _537={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(_538){
_538=$.extend({},_537,_538);
var m,id=_538.id,url=_538.url,type=_538.type,inline=_538.inline,optionalClassName=_538.optionalClassName;
if(inline){
var d=$("#"+id).data("overlay");
if(d){
d.show();
return;
}
}else{
if(url.length===0){
return;
}
}
var _53b=DR.Widgets;
if(!id){
id="modal_"+new Date().getTime();
}
if(!inline&&type=="modal"){
m=new _53b.ModalOverlay(id,url,optionalClassName);
}else{
if(!inline&&type=="modeless"){
m=new _53b.ModelessOverlay(id,url,optionalClassName);
}else{
if(type=="modal"){
m=new _53b.InlineModalOverlay(id,optionalClassName);
}else{
if(type=="modeless"){
m=new _53b.InlineModelessOverlay(id,optionalClassName);
}
}
}
}
m.setTitle(_538.title);
m.setSize(_538.width,_538.height);
if(!_538.draggable){
m.setDragNDrop(false);
}
if(!_538.centered){
m.setAutoCenter(false);
}
if(_538.anchorId){
m.setAutoCenter(false);
m.setAnchorId(_538.anchorId);
}
if(typeof _538.cancelFunction=="function"){
m.cancelFunction=_538.cancelFunction;
}
if(typeof _538.callBackFunction=="function"){
m.callBackFunction=_538.callBackFunction;
}
if(typeof _538.abortFunction=="function"){
m.abortFunction=_538.abortFunction;
}
if(!_538.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(_53c){
return this.each(function(){
var opts=$.extend({},_53c,{inline:true,id:this.id});
$.dr.overlay(opts);
});
}});
var _53e=function(obj){
return $(obj).data("overlay");
};
$.namespace("dr.overlay",{setTitle:function(_540){
return this.each(function(){
var m=_53e(this);
if(m){
m.setTitle(_540);
}
});
}});
})(jQuery);
DR.Widgets.ModalOverlayStack=function(){
this.windows=[];
this.zIndex=100000;
this.windowIndex=-1;
this.iframeCounter=-1;
this.currentWindow=-1;
this.focusAndBlurSet=false;
this.doc={};
};
DR.Widgets.ModalOverlayStack.prototype={add:function(obj){
this.windowIndex++;
this.windows[this.windowIndex]=obj;
this.currentWindow=this.windowIndex;
return this.windowIndex;
},addChildWindow:function(obj,_544){
this.setCurrentHasModalChildren(true);
var m=new DR.Widgets.ModalOverlay(obj.id,obj.url);
m.parentId=this.currentWindow;
m.parentWindowIndex=_544;
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 _54e=false;
for(var i=0;i<this.windows.length;i++){
if(this.windows[i].isOpen){
_54e=true;
}
}
return _54e;
},checkAnyModalOpen:function(){
var _550=false;
for(var i=0;i<this.windows.length;i++){
if(this.windows[i].isOpen&&this.windows[i].modalType=="Modal"){
_550=true;
}
}
return _550;
},checkAnyModelessOpen:function(){
var _552=false;
for(var i=0;i<this.windows.length;i++){
if(this.windows[i].isOpen&&this.windows[i].modalType=="Modeless"){
_552=true;
}
}
return _552;
},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(_558,_559){
if(this.currentWindow>-1){
var c=this.windows[this.currentWindow];
c.setSize(_558,_559);
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(_55f){
if(this.currentWindow>-1){
var c=this.windows[this.currentWindow];
if(!c.hasFocus||_55f){
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 _563=window.onresize;
if(typeof window.onresize!="function"){
window.onresize=function(){
overlayStack.refreshMaskSize();
};
this.onResizeSet=true;
}else{
if(!this.onResizeSet){
window.onresize=function(){
overlayStack.refreshMaskSize();
_563();
};
}
}
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 _565=false;
for(var i=0;i<this.windows.length;i++){
if(!this.windows[i].inline){
this.currentWindow=i;
this.destroyCurrent();
}
}
return _565;
},destroyCurrent:function(){
if(this.currentWindow>-1){
this.destroyWindow(this.currentWindow);
}
},destroyWindow:function(_567){
if(_567>-1){
var _568=this.windows[_567];
var _569=-1;
if(_568.parentId>-1){
_569=_568.parentId;
}
if(!_568.inline){
if(_568.iframe){
_568.iframe.parentNode.removeChild(_568.iframe);
_568.iframeSpacer.parentNode.removeChild(_568.iframeSpacer);
_568.contentTable.parentNode.removeChild(_568.contentTable);
_568.windowIcon.parentNode.removeChild(_568.windowIcon);
_568.dialog.parentNode.removeChild(_568.dialog);
this.windows[_567].iframe=null;
this.windows[_567].modalMask=null;
this.windows[_567].modelessMaskingDiv=null;
this.windows[_567].modelessMaskingIframe=null;
this.windows[_567].modalMaskIframe=null;
this.windows[_567].modalMaskIEOver=null;
this.windows[_567].iframeSpacer=null;
this.windows[_567].contentTable=null;
this.windows[_567].windowIcon=null;
this.windows[_567].dialog=null;
}
_568=null;
this.windows[_567]=null;
this.windows.splice(_567,1);
this.windowIndex--;
this.currentWindow=-1;
_567=this.windows.length-1;
}
if(_569>-1&&_567>-1){
this.windows[_569].hasModalChildren=false;
this.windows[_569].focus();
this.reorderStack(false);
}else{
this.reorderStack(true);
}
}
},reorderStack:function(_56a){
var _56b=-1;
for(var i=0;i<this.windows.length;i++){
if(this.windows[i].isOpen){
this.windows[i].stackId=i;
_56b=i;
}
}
if(_56b>-1&&_56a){
this.currentWindow=_56b;
this.windows[this.currentWindow].focus();
}
},callBack:function(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,_576){
if(this.currentWindow>-1){
var _577=this.windows[this.currentWindow];
if(_577.parentId>-1){
window.frames[this.windows[_577.parentId].iframe.id].overlayStack.callBack(arg1,arg2,arg3,arg3,arg4,arg5,arg6,arg7,arg8,arg9,_576);
}else{
_577.callBack(arg1,arg2,arg3,arg3,arg4,arg5,arg6,arg7,arg8,arg9,_576);
}
}
},getPageSize:function(){
var _578,yScroll,pageHeight,pageWidth;
var obj={};
if(window.innerHeight&&window.scrollMaxY){
_578=document.body.scrollWidth;
yScroll=window.innerHeight+window.scrollMaxY;
}else{
if(document.body.scrollHeight>document.body.offsetHeight){
_578=document.body.scrollWidth;
yScroll=document.body.scrollHeight;
}else{
_578=document.body.offsetWidth;
yScroll=document.body.offsetHeight;
}
}
var _57a,windowHeight;
if(self.innerHeight){
_57a=self.innerWidth;
windowHeight=self.innerHeight;
}else{
if(document.documentElement&&document.documentElement.clientHeight){
_57a=document.documentElement.clientWidth;
windowHeight=document.documentElement.clientHeight;
}else{
if(document.body){
_57a=document.body.clientWidth;
windowHeight=document.body.clientHeight;
}
}
}
if(yScroll<windowHeight){
pageHeight=windowHeight;
}else{
pageHeight=yScroll;
}
if(_578<_57a){
pageWidth=_57a;
}else{
pageWidth=_578;
}
this.doc.pageWidth=pageWidth;
this.doc.pageHeight=pageHeight;
this.doc.windowWidth=_57a;
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 _57e=document.createElement("div");
q.appendChild(_57e);
this.questionDiv=_57e;
var _57f="check";
var _580=this.instanceId+".cancel()";
var _581=this.instanceId+".ok()";
var _582;
var _583;
if(this.isPrompt||this.isCriticalConfirm){
_582=document.createElement("div");
_582.className="input";
_582.innerHTML="<input type=\"text\" id=\""+this.prefixId+"_input\" autocomplete=\"off\" onkeyup=\""+this.instanceId+".enterKey(event)\" />";
_57f="save";
}
if(this.isCheckboxPrompt){
_582=document.createElement("div");
_582.className="input";
_582.innerHTML="<input type=\"checkbox\" id=\""+this.prefixId+"_input\" /><label for=\""+this.prefixId+"_input\">"+DR.Widgets.Prompt.CHECKBOX_PROMPT_QUESTION+"</label>";
_57f="save";
}
var _583;
var _584="";
if(this.isCriticalConfirm){
var _583=document.createElement("div");
_583.className="liveChangeText";
this.liveChangeTextDiv=_583;
}
var s="";
if(!this.isAlert&&!this.isSuccess){
s+="<button id=\""+this.prefixId+"_cancelBtn\" class=\"button secondary\" type=\"button\" onclick=\""+_580+"\"></button>";
}
s+="<button id=\""+this.prefixId+"_okBtn\" type=\"button\" class=\"button secondary\" onclick=\""+_581+"\" style=\"margin-right:0;\"></button>";
var _586=document.createElement("div");
_586.className="pageButtons";
_586.innerHTML=s;
if(this.isPrompt||this.isCriticalConfirm||this.isCheckboxPrompt){
f.appendChild(q);
d.appendChild(f);
if(this.isCriticalConfirm){
d.appendChild(_583);
}
d.appendChild(_582);
}else{
f.appendChild(q);
d.appendChild(f);
}
d.appendChild(_586);
var _587=$("div.content:first")||$("body");
_587.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(_589,text,_58b,_58c,_58d,_58e,_58f,_590){
if((this.isAlert||this.isSuccess||typeof (_58b)=="function"||_58b===null)&&typeof (_589)=="string"){
if(_58d){
this.acceptKey=_58d.trim();
var _591=(_590)?_590:DR.Widgets.Prompt.LIVE_CHANGE_QUESTION;
_591=_591.replaceBreaks().replace("{1}","<strong><span id=\"liveChangeKey\">"+this.acceptKey+"<span></strong>");
this.liveChangeTextDiv.innerHTML=_591;
}
this.questionDiv.innerHTML=_589;
this.overlay.setTitle(_58c||this.modalTitle);
this.overlay.setDisabled(true);
this.overlay.show();
if(this.isPrompt||this.isCriticalConfirm){
if(this.isCriticalConfirm){
_590;
}
this.textInput.value=text;
this.textInput.focus();
this.textInput.select();
}else{
if(this.isCheckboxPrompt){
var _592=_58e||$.dr.strings.OK;
if(text&&text!==""){
var _593=$("label",this.textInput).html(text);
}else{
var _593=$("label",this.textInput).html(DR.Widgets.Prompt.CHECKBOX_PROMPT_QUESTION);
}
var btn=this.okButton;
if(_58f){
var _595=parseInt(_58f,10);
$(btn).dr.button.text(_595).attr("disabled","disabled");
var fn=function(){
_595--;
if(_595===0){
$(btn).dr.button.text(_592);
$(btn).removeAttr("disabled");
}else{
$(btn).dr.button.text(_595.toString());
setTimeout(fn,1000);
}
};
setTimeout(fn,1000);
}else{
$(btn).removeAttr("disabled");
$(btn).dr.button.text(_592);
}
}else{
if(this.isSuccess){
this.okButton.focus();
}
}
}
this.callback=_58b;
}
},ok:function(){
var _597=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{
_597=false;
this.showCriticalConfirmWarning();
}
}else{
this.callback(true);
}
}
}
}
if(_597){
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(_59c,_59d,_59e){
if(!DR.Utils.ALERT){
DR.Utils.ALERT=new DR.Widgets.Alert();
DR.Utils.ALERT.init();
}
DR.Utils.ALERT.open(_59c,null,_59d,_59e);
};
DR.Utils.ALERT=null;
DR.Utils.success=function(_59f,_5a0,_5a1){
if(!DR.Utils.SUCCESS){
DR.Utils.SUCCESS=new DR.Widgets.Success();
DR.Utils.SUCCESS.init();
}
DR.Utils.SUCCESS.open(_59f,null,_5a0,_5a1);
};
DR.Utils.SUCCESS=null;
DR.Utils.warning=function(_5a2,_5a3,_5a4){
if(!DR.Utils.WARNING){
DR.Utils.WARNING=new DR.Widgets.Warning();
DR.Utils.WARNING.init();
}
DR.Utils.WARNING.open(_5a2,null,_5a3,_5a4);
};
DR.Utils.WARNING=null;
DR.Utils.confirm=function(_5a5,_5a6,_5a7){
if(!DR.Utils.CONFIRM){
DR.Utils.CONFIRM=new DR.Widgets.Confirm();
DR.Utils.CONFIRM.init();
}
DR.Utils.CONFIRM.open(_5a5,null,_5a6,_5a7);
};
DR.Utils.CONFIRM=null;
DR.Utils.prompt=function(_5a8,text,_5aa,_5ab){
if(!DR.Utils.PROMPT){
DR.Utils.PROMPT=new DR.Widgets.Prompt();
DR.Utils.PROMPT.init();
}
DR.Utils.PROMPT.open(_5a8,text,_5aa,_5ab);
};
DR.Utils.PROMPT=null;
DR.Utils.checkboxPrompt=function(text,_5ad,_5ae,_5af,_5b0,_5b1){
if(!DR.Utils.CHECKBOXPROMPT){
DR.Utils.CHECKBOXPROMPT=new DR.Widgets.CheckboxPrompt();
DR.Utils.CHECKBOXPROMPT.init();
}
DR.Utils.CHECKBOXPROMPT.open(text,_5ad,_5ae,_5af,null,_5b0,_5b1);
};
DR.Utils.PROMPT=null;
DR.Utils.criticalConfirm=function(_5b2,text,_5b4,_5b5,_5b6,_5b7){
if(!DR.Utils.CRITICAL_CONFIRM){
DR.Utils.CRITICAL_CONFIRM=new DR.Widgets.CriticalConfirm();
DR.Utils.CRITICAL_CONFIRM.init();
}
DR.Utils.CRITICAL_CONFIRM.open(_5b2,text,_5b4,_5b5,_5b6,null,null,_5b7);
};
DR.Utils.CRITICAL_CONFIRM=null;
(function($){
var _5b9={title:null,callback:null};
var _5ba;
var _5bb=function(_5bc){
_5bc=(_5bc)?_5bc:{};
return $.extend({},_5b9,_5bc);
};
$.dr.alert=function(text,_5be){
_5be=_5bb(_5be);
DR.Utils.alert(text,_5be.callback,_5be.title);
};
$.dr.success=function(text,_5c0){
_5c0=_5bb(_5c0);
DR.Utils.success(text,_5c0.callback,_5c0.title);
};
$.dr.warning=function(text,_5c2,_5c3){
_5c3=_5bb(_5c3);
DR.Utils.warning(text,_5c2,_5c3.title);
};
$.dr.confirm=function(text,_5c5,_5c6){
_5c6=_5bb(_5c6);
DR.Utils.confirm(text,_5c5,_5c6.title);
};
$.dr.checkboxPrompt=function(text,_5c8,_5c9,_5ca){
_5ca=_5bb(_5ca);
DR.Utils.checkboxPrompt(text,_5c8,_5c9,_5ca.title,_5ca.buttonText,_5ca.timer);
};
$.dr.prompt=function(text,_5cc,_5cd,_5ce){
_5ce=_5bb(_5ce);
DR.Utils.prompt(text,_5cc,_5cd,_5ce.title);
};
$.dr.criticalConfirm=function(text,_5d0,_5d1,_5d2,_5d3){
_5d3=_5bb(_5d3);
DR.Utils.criticalConfirm(text,_5d0,_5d1,_5d3.title,_5d2,_5d3.acceptQuestion);
};
})(jQuery);
(function($){
function renderOption(id,_5d6){
var html="<label><input type=\"checkbox\" value=\""+_5d6.value+"\"";
if(_5d6.selected){
html+=" checked=\"checked\"";
}
html+=" />"+_5d6.text+"</label>";
return html;
}
function renderOptions(id,_5d9,o){
var html="";
for(var i=0;i<_5d9.length;i++){
if(_5d9[i].optgroup){
html+="<label class=\"optGroup\">";
if(o.optGroupSelectable){
html+="<input type=\"checkbox\" class=\"optGroup\" />"+_5d9[i].optgroup;
}else{
html+=_5d9[i].optgroup;
}
html+="</label><div class=\"optGroupContainer\">";
html+=renderOptions(id,_5d9[i].options,o);
html+="</div>";
}else{
html+=renderOption(id,_5d9[i]);
}
}
return html;
}
function buildOptions(_5dd){
var _5de=$(this);
var _5df=_5de.next(".multiSelectOptions");
var o=_5de.data("config");
var _5e1=_5de.data("callback");
_5df.html("");
var html="";
if(o.selectAll){
html+="<label class=\"selectAll\"><input type=\"checkbox\" class=\"selectAll\" />"+o.selectAllText+"</label>";
}
html+=renderOptions(_5de.attr("id"),_5dd,o);
_5df.html(html);
var _5e3=_5df.getHiddenDimensions().width,msOuterWidth=_5de.getHiddenDimensions().outerWidth,msoHeight=_5df.getHiddenDimensions().height;
var _5e4=_5df.msoWidth;
var _5e5=false;
if(msoHeight>o.listHeight){
_5df.css("height",o.listHeight+"px");
_5e5=true;
}else{
_5df.css("height","");
}
var _5e6=_5e5&&(_5e4==_5e3)?17:0;
if((_5e3+_5e6)<msOuterWidth){
_5df.css("width",msOuterWidth-2+"px");
}else{
_5df.css("width",(_5e3+_5e6)+"px");
}
_5e3=_5df.getHiddenDimensions().width;
msoHeight=_5df.getHiddenDimensions().height;
if($.fn.bgiframe){
_5de.next(".multiSelectOptions").bgiframe({width:_5e3,height:msoHeight});
}
if(o.selectAll){
_5df.find("INPUT.selectAll").bind("click",function(){
_5df.find("INPUT:checkbox").attr("checked",$(this).attr("checked")).parent("LABEL").toggleClass("checked",$(this).attr("checked")).end().trigger("dr-multiselectChecked");
});
}
if(o.optGroupSelectable){
_5df.addClass("optGroupHasCheckboxes");
_5df.find("INPUT.optGroup").click(function(){
$(this).parent().next().find("INPUT:checkbox").attr("checked",$(this).attr("checked")).parent("LABEL").toggleClass("checked",$(this).attr("checked"));
});
}
_5df.find("INPUT:checkbox").click(function(){
$(this).parent("LABEL").toggleClass("checked",$(this).attr("checked"));
updateSelected.call(_5de);
_5de.focus();
if($(this).parent().parent().hasClass("optGroupContainer")){
updateOptGroup.call(_5de,$(this).parent().parent().prev());
}
if(_5e1){
_5e1($(this));
}
});
_5df.each(function(){
$(this).find("INPUT:checked").parent().addClass("checked");
});
updateSelected.call(_5de);
if(o.optGroupSelectable){
_5df.find("LABEL.optGroup").each(function(){
updateOptGroup.call(_5de,$(this));
});
}
_5df.find("LABEL:has(INPUT)").hover(function(){
$(this).parent().find("LABEL").removeClass("hover");
$(this).addClass("hover");
},function(){
$(this).parent().find("LABEL").removeClass("hover");
});
_5de.keydown(function(e){
var _5e8=$(this).next(".multiSelectOptions");
if(_5e8.css("visibility")!="hidden"){
if(e.keyCode==9){
$(this).addClass("focus").trigger("click");
$(this).focus().next(":input").focus();
return true;
}
if(e.keyCode==27||e.keyCode==37||e.keyCode==39){
$(this).addClass("focus").trigger("click");
}
if(e.keyCode==40||e.keyCode==38){
var _5e9=_5e8.find("LABEL");
var _5ea=_5e9.index(_5e9.filter(".hover"));
var _5eb=-1;
if(_5ea<0){
_5e8.find("LABEL:first").addClass("hover");
}else{
if(e.keyCode==40&&_5ea<_5e9.length-1){
_5eb=_5ea+1;
}else{
if(e.keyCode==38&&_5ea>0){
_5eb=_5ea-1;
}
}
}
if(_5eb>=0){
$(_5e9.get(_5ea)).removeClass("hover");
$(_5e9.get(_5eb)).addClass("hover");
adjustViewPort(_5e8);
}
return false;
}
if(e.keyCode==13||e.keyCode==32){
var _5ec=_5e8.find("LABEL.hover INPUT:checkbox");
_5ec.attr("checked",!_5ec.attr("checked")).parent("LABEL").toggleClass("checked",_5ec.attr("checked"));
_5ec.trigger("dr-multiselectChecked",[e.keyCode]);
if(_5ec.hasClass("selectAll")){
_5e8.find("INPUT:checkbox").attr("checked",_5ec.attr("checked")).parent("LABEL").addClass("checked").toggleClass("checked",_5ec.attr("checked")).end().trigger("dr-multiselectChecked");
}
updateSelected.call(_5de);
if(e.keyCode==13){
_5de.multiSelectOptionsHide();
}
if(_5e1){
_5e1($(this));
}
return false;
}
if(e.keyCode>=33&&e.keyCode<=126){
var _5ed=_5e8.find("LABEL:startsWith("+String.fromCharCode(e.keyCode)+")");
var _5ee=_5ed.index(_5ed.filter("LABEL.hover"));
var _5ef=_5ed.filter(function(_5f0){
return _5f0>_5ee;
});
_5ed=(_5ef.length>=1?_5ef:_5ed).filter("LABEL:first");
if(_5ed.length==1){
_5e8.find("LABEL.hover").removeClass("hover");
_5ed.addClass("hover");
adjustViewPort(_5e8);
}
}
}else{
if(e.keyCode==38||e.keyCode==40||e.keyCode==13||e.keyCode==32){
$(this).removeClass("focus").trigger("click");
_5e8.find("LABEL:first").addClass("hover");
return false;
}
if(e.keyCode==9){
_5e8.next(":input").focus();
return true;
}
}
if(e.keyCode==13){
return false;
}
});
}
function adjustViewPort(_5f1){
var _5f2=_5f1.find("LABEL.hover").position().top+_5f1.find("LABEL.hover").outerHeight();
if(_5f2>_5f1.innerHeight()){
_5f1.scrollTop(_5f1.scrollTop()+_5f2-_5f1.innerHeight());
}
if(_5f1.find("LABEL.hover").position().top<0){
_5f1.scrollTop(_5f1.scrollTop()+_5f1.find("LABEL.hover").position().top);
}
}
function updateOptGroup(_5f3){
var _5f4=$(this);
var o=_5f4.data("config");
if(o.optGroupSelectable){
var _5f6=true;
$(_5f3).next().find("INPUT:checkbox").each(function(){
if(!$(this).attr("checked")){
_5f6=false;
return false;
}
});
$(_5f3).find("INPUT.optGroup").attr("checked",_5f6).parent("LABEL").toggleClass("checked",_5f6);
}
}
function updateSelected(){
var _5f7=$(this);
var _5f8=_5f7.next(".multiSelectOptions");
var o=_5f7.data("config");
var i=0;
var _5fb=true;
var _5fc="";
_5f8.find("INPUT:checkbox").not(".selectAll, .optGroup").each(function(){
if($(this).attr("checked")){
i++;
_5fc=_5fc+$(this).parent().text()+", ";
}else{
_5fb=false;
}
});
_5fc=_5fc.replace(/\s*\,\s*$/,"");
if(i==0){
var _5fd="Select";
var _5fe=(o.noneSelected===true)?_5fd+" "+_5f7.prev().attr("title"):(typeof o.noneSelected==="string")?o.noneSelected:"&nbsp;";
_5f7.find("span").html(_5fe);
}else{
if(o.oneOrMoreSelected=="*"){
_5f7.find("span").html(_5fc);
_5f7.attr("title",_5fc);
}else{
_5f7.find("span").html(o.oneOrMoreSelected.replace("%",i));
}
}
if(o.selectAll){
_5f8.find("INPUT.selectAll").attr("checked",_5fb).parent("LABEL").toggleClass("checked",_5fb);
}
}
$.extend($.fn,{multiSelect:function(o,_600){
if(!o){
o={};
}
if(o.selectAll==undefined){
o.selectAll=true;
}
if(o.selectAllText==undefined){
var _601="Select All";
o.selectAllText=_601+" "+((o.useTitleForSelectText)?$(this).attr("title"):"");
$.trim(o.selectAllText);
}
if(typeof o.noneSelected!="string"){
if(o.noneSelected==true){
var _602="Select";
}else{
if(o.noneSelected==undefined||o.noneSelected==null||o.noneSelected==false){
o.noneSelected="&nbsp;";
}
}
}
if(o.noneSelected==undefined||o.noneSelected==null){
}
if(o.oneOrMoreSelected==undefined){
o.oneOrMoreSelected="*";
}
if(o.optGroupSelectable==undefined){
o.optGroupSelectable=false;
}
if(o.listHeight==undefined){
o.listHeight=250;
}
$(this).each(function(){
var _603=$(this);
if(!$(_603).hasClass("_inited")){
var html="<a href=\"javascript:;\" class=\"multiSelect\"><span></span></a>";
html+="<div class=\"multiSelectOptions\" style=\"position: absolute; z-index: 99999; visibility: hidden;\"></div>";
$(_603).after(html);
var _605=$(_603).next(".multiSelect");
var _606=_605.next(".multiSelectOptions");
var _607=parseInt(_605.css("paddingRight"),10)||0;
var _608=parseInt($(_603).getHiddenDimensions().width-_607,10);
_605.find("span").css("width",_608+"px");
_605.data("config",o);
_605.data("callback",_600);
var _609=[];
$(_603).children().each(function(){
if(this.tagName.toUpperCase()=="OPTGROUP"){
var _60a=[];
_609.push({optgroup:$(this).attr("label"),options:_60a});
$(this).children("OPTION").each(function(){
if($(this).val()!=""){
_60a.push({text:$(this).html(),value:$(this).val(),selected:$(this).attr("selected")});
}
});
}else{
if(this.tagName.toUpperCase()=="OPTION"){
if($(this).val()!=""){
_609.push({text:$(this).html(),value:$(this).val(),selected:$(this).attr("selected")});
}
}
}
});
$(_603).hide();
_605.attr("id",$(_603).attr("id")+"_ms");
buildOptions.call(_605,_609);
var _606=_605.next(".multiSelectOptions");
_606.find("input").bind("dr-multiselectChecked change",function(e,_60c){
var val=$(e.target).val();
var opt=$(_603).find("option[value='"+val+"']");
if($(e.target).attr("checked")){
opt.attr("selected","selected");
}else{
opt.removeAttr("selected");
}
setTimeout(function(){
$(_603).trigger("change");
if(_60c!=13){
_605.multiSelectReposition();
}
},0);
});
_605.hover(function(){
$(this).addClass("hover");
},function(){
$(this).removeClass("hover");
}).click(function(){
if($(this).hasClass("active")){
$(this).multiSelectOptionsHide();
}else{
$(this).multiSelectOptionsShow();
}
return false;
}).focus(function(){
$(this).addClass("focus");
}).blur(function(){
$(this).removeClass("focus");
});
$(document).click(function(_60f){
if(!($(_60f.target).parents().andSelf().is(".multiSelectOptions"))){
_605.multiSelectOptionsHide();
}
});
$(_603).addClass("_inited");
}
});
},multiSelectOptionsUpdate:function(_610){
buildOptions.call($(this),_610);
},multiSelectOptionsHide:function(){
$(this).trigger("dr-beforeClose.multiSelect");
$(this).removeClass("active").removeClass("hover").next(".multiSelectOptions").css("visibility","hidden");
},multiSelectOptionsShow:function(){
var _611=$(this);
var _612=_611.next(".multiSelectOptions");
var o=_611.data("config");
$(".multiSelect").multiSelectOptionsHide();
_612.find("LABEL").removeClass("hover");
_611.addClass("active").next(".multiSelectOptions").css("visibility","visible");
_611.focus();
_611.next(".multiSelectOptions").scrollTop(0);
this.multiSelectReposition();
},multiSelectReposition:function(){
var _614=$(this);
var _615=_614.position();
_614.next(".multiSelectOptions").css({top:_615.top+$(this).outerHeight()+"px"});
_614.next(".multiSelectOptions").css({left:_615.left+"px"});
},selectedValuesString:function(){
var _616="";
$(this).next(".multiSelectOptions").find("INPUT:checkbox:checked").not(".optGroup, .selectAll").each(function(){
_616+=$(this).attr("value")+",";
});
return _616.replace(/\s*\,\s*$/,"");
}});
$.expr[":"].startsWith=function(el,i,m){
var _61a=m[3];
if(!_61a){
return false;
}
return eval("/^[/s]*"+_61a+"/i").test($(el).text());
};
})(jQuery);
var defaults={selectAll:true,selectAllText:null,oneOrMoreSelected:"*",listHeight:250,noneSelected:false},requestSent=false;
function collectMultiSelectOptions(_61b){
var _61c=[];
$(_61b).children().each(function(){
if(this.tagName.toUpperCase()=="OPTGROUP"){
var _61d=[];
_61c.push({optgroup:$(this).attr("label"),options:_61d});
$(this).children("OPTION").each(function(){
if($(this).val()!=""){
_61d.push({text:$(this).html(),value:$(this).val(),selected:$(this).attr("selected")});
}
});
}else{
if(this.tagName.toUpperCase()=="OPTION"){
if($(this).val()!=""){
_61c.push({text:$(this).html(),value:$(this).val(),selected:$(this).attr("selected")});
}
}
}
});
return _61c;
}
$.namespace("dr",{multiselect:function(opts){
$(this).each(function(){
$(this).data("oldSize",$(this).attr("size"));
$(this).attr("size",1);
});
var _61f=$.extend(true,{},defaults,opts);
$selects=this;
$selects.multiSelect(_61f);
var _620="inputError";
$selects.bind("dr-field-removeError",function(evt,_622){
if(!$(this).hasClass(_620)){
$(this).next().removeClass(_620);
}
}).bind("dr-field-throwError",function(evt,_624,_625){
if(!$(this).hasClass("inputFocus")){
$(this).next().addClass(_620);
}
});
return this;
}});
$.namespace("dr.multiselect",{destroy:function(){
this.each(function(){
var _626=$(this);
if(!$(this).hasClass(".multiSelect")){
_626=$(this).next(".multiSelect");
}
_626.next().remove();
var _627=_626.prev().find("option").length;
var size=_626.prev().data("oldSize")||((_627>=6)?6:_627);
_626.prev().show().attr("size",size).css("visibility","visible").removeClass("_inited");
_626.removeData().remove();
});
},open:function(){
this.each(function(){
var _629=$(this);
if(!$(this).hasClass(".multiSelect")){
_629=$(this).next(".multiSelect");
}
_629.multiSelectOptionsShow();
});
},close:function(){
this.each(function(){
var _62a=$(this);
if(!$(this).hasClass(".multiSelect")){
_62a=$(this).next(".multiSelect");
}
var _62b=_62a.next(".multiSelectOptions");
_62a.multiSelectOptionsHide();
});
},setOptions:function(opts){
this.each(function(){
var _62d=$(this);
if(!$(this).hasClass(".multiSelect")){
_62d=$(this).next(".multiSelect");
}
var _62e=_62d.prev();
$.extend(true,_62d.data("config"),opts);
var _62f=collectMultiSelectOptions(_62e);
_62d.multiSelectOptionsUpdate(_62f);
});
},getSelectedValues:function(){
var _630=$(this);
if(!$(this).hasClass(".multiSelect")){
_630=$(this).next(".multiSelect");
}
return _630.selectedValuesString();
}});
$.dr.multiselect={setOptions:function(opts){
$.extend(true,defaults,opts);
}};
var addMultiSelects=function(_632){
var _633=$("select[multiple].multiselect");
if(_633.length>0){
_633.each(function(){
var opts=_633.attr("data-options");
if(opts){
opts=$.dr.utils.evalString(opts);
}
if(typeof opts=="object"){
$(this).dr.multiselect(opts);
}else{
$(this).dr.multiselect();
}
});
}
};
$.dr.addUnobtrusiveEvent(addMultiSelects);
$.dr.addDomReadyEvent(function(){
$.dr.form.addValidationSelector("select[multiple].multiselect");
});
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 _637=window.onresize;
var _638=function(){
self.refreshPanelSize();
self.refresh();
};
window.onresize=function(){
_638();
if(typeof (_637)=="function"){
_637();
}
};
var _639,winOnload;
function cleanupEvents(){
window.detachEvent("onresize",winOnload);
window.detachEvent("onresize",_638);
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;
}
}
}
}
}
_639=window.onload;
winOnload=function(){
self.drawInterface();
};
window.onload=function(){
winOnload();
if(typeof (_639)=="function"){
_639();
}
};
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(_64a,_64b){
if(_64a!==undefined&&_64b!==undefined){
this.userDataPageName=_64a;
this.userDataSetting=_64b;
}
},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(_64e){
this.saveCookieState=true;
this.stateCookieID=_64e+"_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(_650){
if(this.saveUserDataState&&$.dr.userdata!==null){
if(_650=="width"){
$.dr.userdata.save(this.userDataPageName,this.userDataSetting+"Width",this.column1Width,"String");
}else{
var _651="";
if(!this.column1Open){
_651="collapsed";
}
$.dr.userdata.save(this.userDataPageName,this.userDataSetting+"Collapsed",_651,"String");
}
}else{
if(this.saveCookieState&&this.stateCookie===null){
this.stateCookie.setValue(""+this.column1Width+"");
}
}
},attachHandles:function(){
var _652;
if(this.layout=="TwoColumn"){
_652="H";
}else{
if(this.layout=="TwoRow"){
_652="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(_654){
self.initDrag(_654);
}
this.staticHandle.onmousedown=handleOnMousedown;
this.hiddenHandle.className="splitContainerHiddenHandle"+_652;
this.staticHandle.className="splitContainerHandle"+_652;
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(_656){
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(_65a){
this.column1.style.width=(this.column1Width-this.leftPadding)+"px";
},initDrag:function(_65b){
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(_65b);
},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 _662={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 _663=function(){
var _664=this;
var _665=$(window).scrollTop();
var _666=$(window).height();
var _667=$(window).width();
var _668=_664.height();
var _669=_664.width();
var posY=(!isIE6)?(_666/2)-(_668/2):(_666/2)-(_668/2)+_665;
var posX=(_667/2)-(_669/2);
_664.css({"top":posY,"left":posX});
};
var _66c=function(){
var _66d=0;
var func=function(test){
if(_66d>=_662.frames){
_66d=0;
}
$span.attr("class",_662.imgPrefix+_66d);
_66d++;
frameTimeout=setTimeout(func,_662.frameInterval);
};
func();
};
var _670=function(){
if(typeof (frameTimeout)!="undefined"){
clearTimeout(frameTimeout);
}
};
var _671=function(){
var _672=this;
$(window).bind("resize scroll",function(){
_663.call(_672);
});
};
$.dr.processingDialog={show:function(){
if(!_662.enabled||open){
return;
}
open=true;
$dialog.show();
_66c.call($span);
_663.call($dialog);
_671.call($dialog);
if(!stopEventDefined&&$.browser.msie){
stopEventDefined=true;
document.attachEvent("onstop",$.dr.processingDialog.hide);
}
},hide:function(){
open=false;
if($dialog){
_670();
$dialog.hide();
}
},enable:function(){
_662.enabled=true;
},disable:function(){
_662.enabled=false;
$.dr.processingDialog.hide();
}};
$(document).bind("dr-showchangeswarning",function(){
$.dr.processingDialog.disable();
});
var init=function(){
$dialog=$("<div class=\""+_662.cssClass+" "+_662.imgPrefix+"\"><span>"+_662.text+"</span></div>").hide().prependTo("body");
$span=$("span",$dialog);
if(isIE6){
$dialog.css("position","absolute");
}
if(!_662.showText){
$dialog.find("> span").addClass("hide");
}
if(_662.shadowVisible){
$dialog.find("> span").dr.shadows();
}
var _674=new Image();
_674.src=$.dr.IMAGE_PATH+_662.imgSrc+"."+_662.imgExt;
var func=function(){
setTimeout($.dr.processingDialog.show,_662.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="#gen.jsMsg.SessionTimeout.SESSION_EXPIRED_TITLE#";
DR.Widgets.SessionTimeout.SESSION_WARNING_TITLE="#gen.jsMsg.SessionTimeout.SESSION_WARNING_TITLE#";
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 _676=new Date().getTime();
var _677=_676-DR.Widgets.SessionTimeout.startTime;
if(_677>DR.Widgets.SessionTimeout.timerLimit){
DR.Widgets.SessionTimeout.showOverlay();
return;
}else{
if(_677>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 _679=[],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(_67d,_67e){
if(_67d.config.debug){
var _67f="";
}
var rows=_67d.tBodies[0].rows;
if(_67d.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&&($(_67e[i]).metadata()&&$(_67e[i]).metadata().sorter)){
p=getParserById($(_67e[i]).metadata().sorter);
}else{
if((_67d.config.headers[i]&&_67d.config.headers[i].sorter)){
p=getParserById(_67d.config.headers[i].sorter);
}
}
if(!p){
p=detectParserForColumn(_67d,cells[i]);
}
if(_67d.config.debug){
_67f+="column:"+i+" parser:"+p.id+"\n";
}
list.push(p);
}
}
if(_67d.config.debug){
log(_67f);
}
return list;
}
function detectParserForColumn(_684,node){
var l=_679.length;
for(var i=1;i<l;i++){
if(_679[i].is($.trim(getElementText(_684.config,node)),_684,node)){
return _679[i];
}
}
return _679[0];
}
function getParserById(name){
var l=_679.length;
for(var i=0;i<l;i++){
if(_679[i].id.toLowerCase()==name.toLowerCase()){
return _679[i];
}
}
return false;
}
function buildCache(_68b){
if(_68b.config.debug){
var _68c=new Date();
}
var _68d=(_68b.tBodies[0]&&_68b.tBodies[0].rows.length)||0,totalCells=(_68b.tBodies[0].rows[0]&&_68b.tBodies[0].rows[0].cells.length)||0,_679=_68b.config.parsers,cache={row:[],normalized:[]};
for(var i=0;i<_68d;++i){
var c=_68b.tBodies[0].rows[i],cols=[];
cache.row.push($(c));
for(var j=0;j<totalCells;++j){
cols.push(_679[j].format(getElementText(_68b.config,c.cells[j]),_68b,c.cells[j]));
}
cols.push(i);
cache.normalized.push(cols);
cols=null;
}
if(_68b.config.debug){
benchmark("Building cache for "+_68d+" rows:",_68c);
}
return cache;
}
function getElementText(_691,node){
if(!node){
return "";
}
var t="";
if(_691.textExtraction=="simple"){
if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){
t=node.childNodes[0].innerHTML;
}else{
t=node.innerHTML;
}
}else{
if(typeof (_691.textExtraction)=="function"){
t=_691.textExtraction(node);
}else{
t=$(node).text();
}
}
return t;
}
function appendToTable(_694,_695){
if(_694.config.debug){
var _696=new Date();
}
var c=_695,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(_694.tBodies[0]),rows=[];
for(var i=0;i<totalRows;i++){
rows.push(r[n[i][checkCell]]);
if(!_694.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(_694.config.appender){
_694.config.appender(_694,rows);
}
rows=null;
if(_694.config.debug){
benchmark("Rebuilt table:",_696);
}
applyWidget(_694);
setTimeout(function(){
$(_694).trigger("sortEnd");
},0);
}
function buildHeaders(_69c){
if(_69c.config.debug){
var time=new Date();
}
var meta=($.metadata)?true:false,tableHeadersRows=[];
for(var i=0;i<_69c.tHead.rows.length;i++){
tableHeadersRows[i]=0;
}
$tableHeaders=$("thead th",_69c);
$tableHeaders.each(function(_6a0){
this.count=0;
this.column=_6a0;
this.order=formatSortingOrder(_69c.config.sortInitialOrder);
if(checkHeaderMetadata(this)||checkHeaderOptions(_69c,_6a0)){
this.sortDisabled=true;
}
if(!this.sortDisabled){
$(this).addClass(_69c.config.cssHeader);
}
_69c.config.headerList[_6a0]=this;
});
if(_69c.config.debug){
benchmark("Built headers:",time);
log($tableHeaders);
}
return $tableHeaders;
}
function checkCellColSpan(_6a1,rows,row){
var arr=[],r=_6a1.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(_6a1,headerArr,row++));
}else{
if(_6a1.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(_6a8,i){
if((_6a8.config.headers[i])&&(_6a8.config.headers[i].sorter===false)){
return true;
}
return false;
}
function applyWidget(_6aa){
var c=_6aa.config.widgets;
var l=c.length;
for(var i=0;i<l;i++){
getWidgetById(c[i]).format(_6aa);
}
}
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(_6b6,_6b7,list,css){
_6b7.removeClass(css[0]).removeClass(css[1]);
var h=[];
_6b7.each(function(_6bb){
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(_6be,_6bf){
var c=_6be.config;
if(c.widthFixed){
var _6c1=$("<colgroup>");
$("tr:first td",_6be.tBodies[0]).each(function(){
_6c1.append($("<col>").css("width",$(this).width()));
});
$(_6be).prepend(_6c1);
}
}
function updateHeaderSortCount(_6c2,_6c3){
var c=_6c2.config,l=_6c3.length;
for(var i=0;i<l;i++){
var s=_6c3[i],o=c.headerList[s[0]];
o.count=s[1];
o.count++;
}
}
function multisort(_6c7,_6c8,_6c9){
if(_6c7.config.debug){
var _6ca=new Date();
}
var _6cb="var sortWrapper = function(a,b) {",l=_6c8.length;
for(var i=0;i<l;i++){
var c=_6c8[i][0];
var _6ce=_6c8[i][1];
var s=(getCachedSortType(_6c7.config.parsers,c)=="text")?((_6ce==0)?"sortText":"sortTextDesc"):((_6ce==0)?"sortNumeric":"sortNumericDesc");
var e="e"+i;
_6cb+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";
_6cb+="if("+e+") { return "+e+"; } ";
_6cb+="else { ";
}
var _6d1=_6c9.normalized[0].length-1;
_6cb+="return a["+_6d1+"]-b["+_6d1+"];";
for(var i=0;i<l;i++){
_6cb+="}; ";
}
_6cb+="return 0; ";
_6cb+="}; ";
eval(_6cb);
_6c9.normalized.sort(sortWrapper);
if(_6c7.config.debug){
benchmark("Sorting on "+_6c8.toString()+" and dir "+_6ce+" time:",_6ca);
}
return _6c9;
}
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(_6da,i){
return _6da[i].type;
}
this.construct=function(_6dc){
return this.each(function(){
if(!this.tHead||!this.tBodies){
return;
}
var _6dd,$document,$headers,cache,config,shiftDown=0,sortOrder;
this.config={};
config=$.extend(this.config,$.tablesorter.defaults,_6dc);
_6dd=$(this);
$headers=buildHeaders(this);
this.config.parsers=buildParserCache(this,$headers);
cache=buildCache(this);
var _6de=[config.cssDesc,config.cssAsc];
fixColumnWidth(this);
$headers.click(function(e){
_6dd.trigger("sortStart");
var _6e0=(_6dd[0].tBodies[0]&&_6dd[0].tBodies[0].rows.length)||0;
if(!this.sortDisabled&&_6e0>0){
var _6e1=$(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(_6dd[0],$headers,config.sortList,_6de);
appendToTable(_6dd[0],multisort(_6dd[0],config.sortList,cache));
},1);
return false;
}
}).mousedown(function(){
if(config.cancelSelection){
this.onselectstart=function(){
return false;
};
return false;
}
});
_6dd.bind("update",function(){
this.config.parsers=buildParserCache(this,$headers);
cache=buildCache(this);
}).bind("sorton",function(e,list){
$(this).trigger("sortStart");
config.sortList=list;
var _6e8=config.sortList;
updateHeaderSortCount(this,_6e8);
setHeadersCss(this,$headers,_6e8,_6de);
appendToTable(this,multisort(this,_6e8,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){
_6dd.trigger("sorton",[config.sortList]);
}
applyWidget(this);
});
};
this.addParser=function(_6eb){
var l=_679.length,a=true;
for(var i=0;i<l;i++){
if(_679[i].id.toLowerCase()==_6eb.id.toLowerCase()){
a=false;
}
}
if(a){
_679.push(_6eb);
}
};
this.addWidget=function(_6ee){
widgets.push(_6ee);
};
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,_6f4){
var _6f5="\\"+_6f4.decimal;
var exp="/(^[+]?0("+_6f5+"0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)"+_6f5+"(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*"+_6f5+"0+$)/";
return RegExp(exp).test($.trim(s));
};
this.clearTableBody=function(_6f7){
if($.browser.msie){
function empty(){
while(this.firstChild){
this.removeChild(this.firstChild);
}
}
empty.apply(_6f7.tBodies[0]);
}else{
_6f7.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,_6fc){
var c=_6fc.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,_710){
var c=_710.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,_716,cell){
var c=_716.config,p=(!c.parserMetadataName)?"sortValue":c.parserMetadataName;
return $(cell).metadata()[p];
},type:"numeric"});
ts.addWidget({id:"zebra",format:function(_719){
if(_719.config.debug){
var time=new Date();
}
$("tr:visible",_719.tBodies[0]).filter(":even").removeClass(_719.config.widgetZebra.css[1]).addClass(_719.config.widgetZebra.css[0]).end().filter(":odd").removeClass(_719.config.widgetZebra.css[0]).addClass(_719.config.widgetZebra.css[1]);
if(_719.config.debug){
$.tablesorter.benchmark("Applying Zebra widget",time);
}
}});
})(jQuery);
(function($){
var _71c=$.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 _71d=$("button",this);
var _71e=0;
_71d.each(function(){
var span=$("span.icon span",this);
var _720=span.width();
var _721=(_720<50)?70:(_720>=300)?300:_720+17;
$(this).css("max-width","none").width(_721);
span.width(_721-17);
if($.browser.msie){
$("span.icon",this).width(_721-17+wOffset);
}
var h=$(this).height();
if(h>_71e){
_71e=h;
}
if(BrowserDetect.browser=="Explorer"&&BrowserDetect.version==6){
$(this).hover(function(){
if(!$(this).hasClass("selected")){
$(this).addClass("hover");
}
},function(){
$(this).removeClass("hover");
});
}
});
_71e=Math.min(Math.max(_71e,67),117);
_71d.each(function(){
$(this).height(_71e-hOffset);
$("span.icon",this).height(_71e-hOffset-spanOffset);
});
$("ul, div.related",this).css("visibility","visible");
});
}});
var _723=function(){
$("div.taskbar",document).dr.taskbar();
};
$.dr.addDomReadyEvent(_723,"domReadyEarly");
})(jQuery);
DR.Widgets.ToolTip=function(_724,_725){
if(DR.Utils.BrowserDetect.isIE6()){
return null;
}
this.refObj=_724;
this.edgeX="Left";
this.edgeY="Bottom";
this.drawDirectionX="Right";
this.drawDirectionY="Down";
this._type=_725;
this.mouseOverTimeOut=1100;
this.mouseOutTimeOut=300;
if(_725=="menuTooltip"){
this.cssClass="menuTooltip";
this._offsetX=7;
this._offsetY=0;
this.edgeX="Right";
this.edgeY="Top";
}else{
if(_725=="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 _726=this;
var _727=function(){
_726.markToShow=true;
window.setTimeout(function(){
if(_726.markToShow){
_726.show();
}
},this.mouseOverTimeOut);
};
var _728=function(){
_726.markToShow=false;
window.setTimeout(function(){
if(!_726.markToShow){
_726.hide();
}
},this.mouseOutTimeOut);
};
var hide=function(){
_726.hide();
};
jQuery(this.refObj).mouseover(_727);
jQuery(this.refObj).mouseout(_728);
jQuery(this.refObj).click(hide);
jQuery(this.tooltip).mouseover(_727);
jQuery(this.tooltip).mouseout(_728);
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 _72c=jQuery(this.tooltip).height()+2*10+2*1;
var _72d=jQuery(this.tooltip).width()+2*10+2*1;
var _72e=jQuery(window).height();
if(_72c>_72e){
_72c=_72e-200;
this.tooltip.style.height=(_72c+2*10+2*1)+"px";
}
this.tooltip.style.display="block";
this.shadow.style.height=_72c+"px";
this.shadow.style.width=_72d+"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(_730){
this.container=getElem(_730);
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 _733=false;
if(typeof obj=="object"){
node=obj.parentNode.parentNode;
}else{
if(typeof obj=="string"){
node=document.getElementById(obj);
_733=true;
}else{
return null;
}
}
var id=node.id;
id=id.replace("treeNode_","");
var _735=id;
id=id.replace("treeRoot_Node_","");
var _736=document.getElementById(node.id+"_child");
if(node.className=="treeNodeClosed"||node.className=="treeNodeClosedSelected"){
if(_736){
node.className="treeNodeOpenSelected";
_736.style.display="block";
}else{
node.className="treeNodeEmptySelected";
}
this.saveNodeState(id,"selected");
}else{
if(node.className=="treeNodeOpen"){
if(_736){
_736.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 _737=this;
var func=function(){
_737.scrollToNode(node);
};
window.setTimeout(func,100);
}else{
this.scrollToNode(node);
}
}
if(_733){
this.scrollToNode(node);
}
this.setCurrentNodeOff(node.id);
if(!_736){
this.currentTreeNodeHasChildren=false;
}else{
if(_736.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 _73f=document.getElementById(node.id+"_child");
if(node.className=="treeNodeClosed"){
if(_73f){
node.className="treeNodeOpen";
_73f.style.display="block";
this.saveNodeState(id,"open");
}else{
node.className="treeNodeEmpty";
}
}else{
if(node.className=="treeNodeClosedSelected"){
node.className="treeNodeOpenSelected";
_73f.style.display="block";
this.saveNodeState(id,"open");
}else{
if(node.className=="treeNodeOpen"){
if(_73f){
_73f.style.display="none";
node.className="treeNodeClosed";
this.saveNodeState(id,"closed");
}
}else{
if(node.className=="treeNodeOpenSelected"){
if(_73f){
_73f.style.display="none";
node.className="treeNodeClosedSelected";
this.saveNodeState(id,"closed");
}
}
}
}
}
},saveNodeState:function(id,_741){
if(typeof id=="string"&&this.ready){
if(this.saveState){
if(_741=="open"){
this.stateCookie.addArrayValue(id);
}else{
if(_741=="closed"){
this.stateCookie.removeArrayValue(id);
}else{
if(_741=="selected"){
this.stateCookie.addArrayValue(id);
}
}
}
}
if(this.saveSelectedItem&&_741=="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 _749=node.parentNode.parentNode;
this.selectNode(_749.id);
}
},enableSaveState:function(_74a){
if(typeof _74a=="string"){
this.cookieName=_74a;
this.saveState=true;
this.saveSelectedItem=true;
this.initCookies();
}
},enableLastSelected:function(_74b){
if(typeof _74b=="string"){
this.cookieName=_74b;
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 _752="fckeditor.js",SCRIPT_LOADING=false,REFRESH_INTERVAL=100000000,EDITORS=[],CUSTOM_TOOLBAR_SETS=[],DEFAULT_CONFIG={BasePath:$.dr.FRAMEWORK_PATH+"external/fckeditor/",Width:"700",Height:"300",ToolbarSet:"default"};
var _753=function(){
return (typeof FCKeditor_IsCompatibleBrowser=="function")?true:false;
};
var _754=function(){
return (typeof FCKeditorAPI=="undefined")?false:true;
};
var _755=function(id){
return FCKeditorAPI.GetInstance(id);
};
var _757=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 _75a=function(_75b,id,_75d){
this.textareaObj=_75b;
this.id=id;
this.editorObj=null;
var c=$.extend(true,{},DEFAULT_CONFIG);
this.config=(_75d)?$.extend(true,c,_75d):c;
this.refreshTimer=null;
this.init();
};
_75a.prototype={init:function(){
if(_753()){
this.bindEditor();
}else{
if(!SCRIPT_LOADING){
this.loadScript();
}else{
this.checkScriptReady();
}
}
},loadScript:function(){
var _75f=this;
SCRIPT_LOADING=true;
$.getScript(this.config.BasePath+_752,function(){
SCRIPT_LOADING=false;
_75f.checkScriptReady();
});
},checkScriptReady:function(){
var _760=this;
var func=function(){
if(_753()){
_760.bindEditor();
}else{
_760.checkScriptReady();
}
};
window.setTimeout(func,100);
},bindEditor:function(){
var _762=new FCKeditor(this.id);
$.extend(true,_762,this.config);
_762.ReplaceTextarea();
this.editorObj=_762;
this.checkAPIReady();
},checkAPIReady:function(){
var _763=this;
var func=function(){
if(_754()){
var _765=_755(_763.id);
if(typeof _765=="undefined"){
_763.checkAPIReady();
}else{
if(typeof _765.EditorDocument=="undefined"){
_763.checkAPIReady();
}else{
_763.synchronize();
}
}
}else{
_763.checkAPIReady();
}
};
window.setTimeout(func,10);
},synchronize:function(){
var _766=this;
var _767=function(){
_766.updateTextarea();
_766.synchronize();
};
this.refreshTimer=window.setTimeout(_767,REFRESH_INTERVAL);
},updateTextarea:function(a){
this.textareaObj.value=this.getHTML();
},setHTML:function(html){
var _76a=_755(this.id);
if(!_76a){
return undefined;
}else{
html=_757(html);
_76a.SetHTML(html);
}
},getHTML:function(){
var _76b=_755(this.id);
if(typeof _76b!="undefined"){
return _76b.GetXHTML(true);
}
return undefined;
}};
$.namespace("dr",{wysiwyg:function(_76c){
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=_757(this.value);
var _76e=new _75a(this,id,_76c);
EDITORS[id]=_76e;
this.wysiwyg=_76e;
}
}
});
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(_773){
if(typeof _773=="object"){
$.extend(true,DEFAULT_CONFIG,_773);
}
},addToolbarSet:function(_774){
if(typeof _774=="object"){
if(_774.name&&_774.settings){
CUSTOM_TOOLBAR_SETS.push(_774);
}
}
},getCustomToolbarSets:function(){
return CUSTOM_TOOLBAR_SETS;
}};
var _775=function(_776){
_776.filter("textarea.basic_wysiwyg, textarea.wysiwyg").each(function(){
var $obj=$(this);
if($obj.hasClass("basic_wysiwyg")){
$obj.dr.wysiwyg({ToolbarSet:"basic"});
}else{
var _778=$obj.attr("data-options");
var _779;
if(_778){
_779=$.dr.utils.evalString(_778,"Error parsing data-options for wysiwyg ("+this.id+")");
}
$obj.dr.wysiwyg(_779);
}
});
};
$.dr.addPlugin("form",_775);
})(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 _77a=new Date(this.getFullYear(),0,1);
return Math.ceil((this-_77a)/86400000);
};
jQuery.dr=window.jQuery.dr||{};
$.dr.baseChart={initChart:function(_77b){
var obj=$("#"+_77b);
if(obj.hasClass("stockChartContainer")){
if(!(window[_77b] instanceof $.dr.stockChart)){
try{
window[_77b]=new $.dr.stockChart(_77b);
window[_77b].initChart(_77b+"_flashObjectId");
}
catch(e){
}
}
}else{
try{
window[_77b]=new Object();
}
catch(e){
}
}
}};
amChartInited=function(_77d){
$.dr.baseChart.initChart(_77d);
};
amProcessCompleted=function(_77e,_77f){
if(window[_77e]){
window[_77e].processCompletedCallback(_77f);
}
};
window.amReturnData=function(_780,data){
if(window[_780]){
window[_780].returnDataCallback(unescape(data));
}
};
window.amReturnSettings=function(_782,_783){
if(window[_782]){
window[_782].returnSettingsCallback(_783);
}
};
window.amReturnParam=function(_784,_785){
if(window[_784]){
window[_784].returnParamCallback(_785);
}
};
window.amError=function(_786,_787){
if(window[_786]){
window[_786].errorCallback(_787);
}
};
window.amRolledOver=function(_788,date,_78a){
if(window[_788]){
window[_788].rolledOverCallback(date,_78a);
}
};
window.amClickedOn=function(_78b,date,_78d){
if(window[_78b]){
window[_78b].clickedOnCallback(date,_78d);
}
};
window.amRolledOverEvent=function(_78e,date,_790,id,url){
if(window[_78e]){
window[_78e].rolledOverEventCallback(date,_790,id,url);
}
};
window.amClickedOnEvent=function(_793,date,_795,id,url){
if(window[_793]){
window[_793].clickedOnEventCallback(date,_795,id,url);
}
};
window.amGetZoom=function(_798,from,to){
if(window[_798]){
window[_798].getZoomCallback(from,to);
}
};
window.amReturnImageData=function(_79b,data){
};
window.amSliceClick=function(_79d,_79e,_79f,_7a0,_7a1,_7a2,_7a3){
};
window.amSliceOver=function(_7a4,_7a5,_7a6,_7a7,_7a8,_7a9,_7aa){
};
window.amSliceOut=function(_7ab){
};
(function($){
var _7ad=function(_7ae){
var did=$(_7ae).val();
var _7b0=[];
_7b0.push("<data_sets>");
_7b0.push("<data_set did='"+did+"'>");
_7b0.push("<compare_list_box selected='true' /></data_set></data_sets>");
return _7b0.join("");
};
var _7b1=function(_7b2){
var _7b3=$(_7b2).attr("data-chart");
var _7b4=$(_7b2).attr("id");
var _7b5=$(":selected",_7b2).text();
var _7b6=$(_7b2).val();
var _7b7=_7b6;
var _7b8=[];
_7b8.push("<charts>");
_7b8.push("<chart cid='"+((_7b3!=null)?_7b3:0)+"'>");
_7b8.push("<title>"+_7b5+"</title>");
_7b8.push("<graphs>");
_7b8.push("<graph gid='0'>");
_7b8.push("<data_sources>");
_7b8.push("<close>"+_7b6+"</close>");
_7b8.push("</data_sources>");
_7b8.push("<compare_source>"+_7b7+"</compare_source>");
_7b8.push("<legend><date key='false' title='false'><![CDATA[{close}]]></date><period key='false' title='false'> <![CDATA[<b>{close}</b>]]></period></legend>");
_7b8.push("</graph></graphs></chart></charts>");
if(_7b3==0){
_7b8.push("<scroller><graph_data_source>"+_7b6+"</graph_data_source></scroller>");
}
DR.USER_DATA.save("sitePulseHomeDetail"+GC.CURRENT_SITE_ID,_7b4,_7b6,"String");
return _7b8.join("");
};
var _7b9=function(_7ba,_7bb){
var _7bc=[];
_7bc.push("<period_selector><from>");
_7bc.push(new $.dr.date($(_7ba).val(),$.dr.date.getDefaultFormat()).toFormattedString(_7bb));
_7bc.push("</from></period_selector>");
return _7bc.join("");
};
var _7bd=function(_7be,_7bf){
var _7c0=[];
var _7c1=new $.dr.date($(_7be).val(),$.dr.date.getDefaultFormat());
_7c1.setDate(_7c1.getDate()+1);
_7c0.push("<period_selector><to>");
_7c0.push(_7c1.toFormattedString(_7bf));
_7c0.push("</to></period_selector>");
return _7c0.join("");
};
var _7c2=function(_7c3){
var _7c4=[];
$(".changeGraphColumn",_7c3.chartContainerObj).change(function(_7c5){
_7c3.changeGraphSrcColumn(_7c5.target);
});
$(".applyGraphColumn",_7c3.chartContainerObj).each(function(){
_7c4.push(this);
});
return _7c4;
};
var _7c6=function(_7c7){
var _7c8=[];
$(".applySettings",_7c7.chartContainerObj).each(function(){
_7c8.push(this);
$(this).click(function(_7c9){
_7c7.applySettings(_7c9.target);
});
});
return _7c8;
};
var _7ca=function(_7cb){
var _7cc=null;
$(".changeCompareTo:first",_7cb.chartContainerObj).change(function(_7cd){
_7cb.changeCompareTo(_7cd.target);
});
$(".applyCompareTo:first",_7cb.chartContainerObj).each(function(){
_7cc=this;
});
return _7cc;
};
var _7ce=function(_7cf){
$("select.changeData").change(function(){
_7cf.changeSelectDataSet($(this).val());
}).keyup(function(){
_7cf.changeSelectDataSet($(this).val());
});
};
var _7d0=function(_7d1){
var _7d2=null;
$(".applyRangeStart:first",_7d1).each(function(){
_7d2=this;
});
return _7d2;
};
var _7d3=function(_7d4){
var _7d5=null;
$(".applyRangeEnd:first",_7d4).each(function(){
_7d5=this;
});
return _7d5;
};
var _7d6=function(_7d7){
var _7d8=[];
$(".dynamicHighlight",_7d7).each(function(){
var _7d9=this.getAttribute("data-precision");
var _7da=this.getAttribute("data-prefix");
var _7db=this.getAttribute("data-suffix");
_7d8.push({elemObj:this,precision:(_7d9!=null&&!isNaN(_7d9))?_7d9:2,formula:this.getAttribute("data-formula"),prefix:(_7da)?_7da:"",suffix:(_7db)?_7db:""});
});
return _7d8;
};
var _7dc=function(_7dd){
$(".staticHighlightControl",_7dd.chartContainerObj).change(function(_7de){
_7dd.changeStaticHighlight(_7de.target);
});
};
var _7df=function(_7e0){
var _7e1=[];
$(".staticHighlight",_7e0).each(function(){
var _7e2=this.getAttribute("data-precision");
var _7e3=this.getAttribute("data-prefix");
var _7e4=this.getAttribute("data-suffix");
var _7e5=this.getAttribute("data-type-ref");
var type=this.getAttribute("data-type");
_7e1.push({elemObj:this,precision:(_7e2!=null&&!isNaN(_7e2))?_7e2:2,formula:this.getAttribute("data-formula"),prefix:(_7e3)?_7e3:"",suffix:(_7e4)?_7e4:"",type:type,typeRef:_7e5});
});
return _7e1;
};
var _7e7=function(_7e8){
var _7e9=_7e8.indexOf("<columns>");
var _7ea=_7e8.indexOf("</columns>");
var _7eb=[];
if(_7e9>-1&&_7ea>-1){
_7eb=_7e8.substring(_7e9+9,_7ea);
_7eb=_7eb.split("<column>").join("").split("</column>");
_7eb=(_7eb instanceof Array)?_7eb:[];
}
return _7eb;
};
var _7ec=function(col,_7ee){
var pos=-1;
if(!isNaN(col)){
pos=col;
}else{
pos=$.inArray(col,_7ee);
}
return pos;
};
var _7f0=function(_7f1){
_7f1.getSettings();
};
var _7f2=function(_7f3){
_7f3.getData(0);
};
var _7f4=function(_7f5,_7f6){
_7f5.compareDataSet(_7f6);
};
var _7f7=function(_7f8,_7f9){
_7f8.uncompareDataSet(_7f9);
};
var _7fa=function(_7fb){
_7fb.uncompareAll();
};
var _7fc=function(_7fd,_7fe){
_7fd.selectDataSet(_7fe);
};
var _7ff=function(_800){
_800.hideEvents();
};
var _801=function(_802){
_802.showEvents();
};
var _803=function(_804){
_804.showAll();
};
var _805=function(_806,data){
_806.setData(data);
};
var _808=function(_809){
_809.rebuild();
};
var _80a=function(_80b){
_80b.reloadData();
};
var _80c=function(_80d,_80e){
_80d.reloadSettings(_80e);
};
var _80f=function(_810,_811,_812,_813){
var _814=[];
_814.push("<settings>");
_814.push(_811);
_814.push("</settings>");
_810.setSettings(_814.join(""),_812,_813);
};
var _815=function(_816,data,_818){
_816.appendData(data,_818);
};
var _819=function(_81a,_81b,_81c){
_81a.getParam(_81b);
};
var _81d=function(_81e,from,to,_821){
var _822=new $.dr.date(to,_821);
_822.setDate(_822.getDate()+1);
_81e.setZoom(from,_822.toFormattedString());
};
var _823=function(_824,_825){
var _826=0;
var days=1;
var _828=$.dr.stockChart.STATIC_TYPES;
if(_824.typeRef){
_824.type=$("#"+_824.typeRef).val();
}
if(_824.type){
for(var t in _828){
if(t==_824.type){
_826=_828[t].offset;
days=_828[t].days;
break;
}
}
}
_824.chartObj=_825;
_824.startOffset=_826;
_824.numDays=days;
_824.avg=function(_82a){
return _825.staticData.avg(this,_82a);
};
_824.sum=function(_82b){
return _825.staticData.sum(this,_82b);
};
var _82c="0";
with(_824){
_82c=eval(formula);
if(!isNaN(_82c)){
_82c=prefix+_82c.toFixed(precision).formatNumber()+suffix;
}else{
_82c=$.dr.stockChart.DATA_NOT_AVAILABLE;
}
}
$(_824.elemObj).html(_82c);
$(_824.elemObj).trigger("staticChange");
};
$.dr.stockChart=function(_82d,_82e){
this.dataDateFmt=(_82e)?_82e:"yyyy-mm-dd";
this.chartPrefix=_82d;
var _82f=$("#"+this.chartPrefix);
this.chartContainerObj=(_82f.length>0)?_82f: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=_7d0(this.chartContainerObj);
this.controls.toDate=_7d3(this.chartContainerObj);
this.controls.compareTo=_7ca(this);
this.controls.changeDataSet=_7ce(this);
this.controls.apply=_7c6(this);
this.controls.graphColumn=_7c2(this);
_7dc(this);
this.staticHighlights=_7df(this.chartContainerObj);
this.dynamicHighlights=_7d6(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);
}
_7f0(this.flashChartObj);
this.columnNames=_7e7(this.chartSettingsXML);
_7f2(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 _831 in this.controls){
switch(_831){
case "compareTo":
break;
case "graphColumn":
for(var c=0;c<this.controls[_831].length;c++){
}
break;
case "fromDate":
break;
case "toDate":
break;
default:
break;
}
}
},setCustomDateControls:function(_833,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,_838){
},processCompletedCallback:function(_839){
_7f0(this.flashChartObj);
},errorCallback:function(_83a){
},clickedOnCallback:function(date,_83c){
if(_83c=="DD"){
_81d(this.flashChartObj,date,date,this.dataDateFmt);
}else{
if(_83c=="WW"){
var _83d=new $.dr.date(date,this.dataDateFmt);
_83d.setDate(_83d.getDate()+6);
_81d(this.flashChartObj,date,_83d.toFormattedString(),this.dataDateFmt);
}else{
if(_83c=="MM"){
var _83d=new $.dr.date(date,this.dataDateFmt);
_83d.setMonth(_83d.getMonth()+1);
_83d.setDate(_83d.getDate()-1);
_81d(this.flashChartObj,date,_83d.toFormattedString(),this.dataDateFmt);
}
}
}
},rolledOverEventCallback:function(date,_83f,id,url){
},clickedOnEventCallback:function(date,_843,id,url){
},returnSettingsCallback:function(_846){
this.chartSettingsXML=unescape(_846);
},returnDataCallback:function(_847){
var _848=new Date().getTime();
this.chartData=_847.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 _84b=this.chartData.splice(i,1);
i--;
}
}
var _84c=new Date().getTime();
this.dataPoints=this.chartData.length;
this.numDataColumns=this.chartData[0].length;
this.isDataLoaded=true;
_847=null;
},returnParamCallback:function(_84d){
},changeStaticHighlight:function(obj){
var _84f=obj.id;
for(var i=0;i<this.staticHighlights.length;i++){
var _851=this.staticHighlights[i];
for(var r in _851){
if(r=="typeRef"&&_851[r]==_84f){
_823(this.staticHighlights[i],this);
}
}
}
},updateStaticHighlights:function(){
for(var i=0;i<this.staticHighlights.length;i++){
_823(this.staticHighlights[i],this);
}
},staticData:{avg:function(_854,col){
var _856=this.sum(_854,col)/_854.numDays;
return Number(_856);
},sum:function(_857,col){
var _859=_7ec(col,_857.chartObj.columnNames);
var _85a=Number.NaN;
var _85b=(_857.chartObj.chartData.length-1)-_857.startOffset;
var _85c=_85b-(_857.numDays);
if(_859>-1){
_85a=0;
for(var i=_85b;i>_85c;i--){
var val=Number(_857.chartObj.chartData[i][_859]);
_85a+=((val==NaN)?0:val);
}
}
return Number(_85a);
}},changeCompareTo:function(_85f){
var _860=$(_85f).val();
_7fa(this.flashChartObj);
if(_860!=""){
_7f4(this.flashChartObj,_860);
}
},changeSelectDataSet:function(data){
_7fc(this.flashChartObj,data);
},changeGraphSrcColumn:function(_862){
var _863=_7b1(_862);
_80f(this.flashChartObj,_863,true);
},applySettings:function(){
var _864=[];
for(var _865 in this.controls){
switch(_865){
case "compareTo":
break;
case "graphColumn":
for(var c=0;c<this.controls[_865].length;c++){
_864.push(_7b1(this.controls[_865][c]));
}
break;
case "fromDate":
_864.push(_7b9(this.controls.fromDate,this.dataDateFmt));
break;
case "toDate":
_864.push(_7bd(this.controls.toDate,this.dataDateFmt));
break;
default:
break;
}
}
_80f(this.flashChartObj,_864.join(""),true);
},update:function(){
if(!this.isDataLoaded){
var _867=this;
window.setTimeout(function(){
_867.update();
},1000);
}else{
var _868=parseInt(jQuery.inArray(this.rangeToDate,this.chartDataLoc));
var _869=parseInt(jQuery.inArray(this.rangeFromDate,this.chartDataLoc));
this.rangeDataPoints=(_868-_869)+1;
for(var col=1;col<this.numDataColumns;col++){
this.rangeTotals[col]=0;
this.rangeAverages[col]=0;
}
for(var row=_869;row<=_868;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 _86d=1;_86d<this.rangeTotals.length;_86d++){
this.rangeAverages[_86d]=this.rangeTotals[_86d]/this.rangeDataPoints;
}
this.updateDynamicHighlights();
}
},sum:function(col){
var _86f=_7ec(col,this.columnNames);
return (_86f>-1)?this.rangeTotals[_86f]:Number.NaN;
},avg:function(col){
var _871=_7ec(col,this.columnNames);
return (_871>-1)?this.rangeAverages[_871]:Number.NaN;
},dataPoints:function(){
return this.rangeDataPoints;
},updateDynamicHighlights:function(){
for(var _872 in this.dynamicHighlights){
var _873=this.dynamicHighlights[_872];
var _874=0;
with(this){
_874=eval(_873.formula);
if(!isNaN(_874)){
_874=_873.prefix+_874.toFixed(_873.precision).formatNumber()+_873.suffix;
}else{
_874=$.dr.stockChart.DATA_NOT_AVAILABLE;
}
}
$(_873.elemObj).html(_874);
}
}};
$.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 _876={activeTab:0,bottomPad:20,autoClick:true};
var _877=function(url,_879){
var _87a=(/\?/.test(url))?"&":"?";
return url+_879.replace(/^\?|&?/,_87a);
};
var ie6=$.browser.msie&&($.browser.version<=6);
var _87c="<div class=\"tabFingers\"><div class=\"fingerRightWrapper\"></div></div>";
var _87d="div.tabFingers:first";
var _87e="> dl > dt";
var _87f="> dl > dd";
if(ie6){
_87c="<table class=\"tabFingers\"><tbody><tr><td class=\"fingerRight\"></td></tr></tbody></table>";
_87d="table.tabFingers:first > tbody > tr";
_87e="> td.fingerLeft "+_87e;
_87f="> td.fingerRight "+_87f;
}else{
_87f="> div "+_87f;
}
$.namespace("dr.fingertabs",function(_880){
var _881=$.extend(_876,_880);
return this.dr.bindPluginEvents({"beforechange":_881.beforechange,"afterchange":_881.afterchange}).each(function(){
var _882=undefined;
var _883=$("> dt",this).remove().addClass("fingerLeft").each(function(_884){
if($(this).hasClass("active")){
_881.activeTab=_884;
$(this).removeClass("active");
}
}).wrapAll("<dl class=\"fingertabs fingerLeft\"></dl>").parent();
var _885=$(this).find("> dd").not(":eq("+_881.activeTab+")").hide().end().find("script").remove().end().addClass("fingerRight").end().addClass("fingerRight").wrap(_87c).parent().parent();
if(ie6){
_885.prepend("<td class=\"fingerLeft\"></td>").find("> td.fingerLeft").append(_883);
}else{
var _886=_885.append(_883).find("> dl").height()+_881.bottomPad;
_885.find(_87f).css("min-height",_886+"px");
}
var _887=_885.find(_87e).each(function(_888){
var _889={};
var _88a=$("a[href]",this).get(0);
if(_88a&&(_88a.target!=="_self")&&((_88a.protocol===location.protocol)&&(_88a.hostname===location.hostname))){
_889.url=_88a.href;
_889.ajaxParam=$(_88a).attr("data-ajax-param");
}
$(this).click(function(e,_88c,_88d){
if(_888!==_882){
var _88e=$(this);
var _88f=_88e.parents(_87d);
var _890=_88f.find(_87e);
var _891=_88f.find(_87f);
var _892=_891.eq(_882).parent().add(_88e.parent());
if(_88c||(_892.add(_890[_882]).drTriggerEach("beforechange",[_891[_882],_882,_888,_890[_882],_88e[0]])!==false)){
_890.eq(_882).removeClass("active").end().eq(_888).addClass("active");
_891.eq(_882).hide().end().eq(_888).show();
_882=_888;
var _893=function(_894,_895){
if($.isFunction(_88d)){
_88d.call(this);
}
_892.add(_894).drTriggerEach("afterchange",[this,_895,_895,_894]);
};
if(_88a){
if($(e.target).is("a[href]")){
e.preventDefault();
}
if(_889.url){
var _896=_891.eq(_888).data("ajaxpanel");
if(!_896){
_891.eq(_888).dr.ajaxpanel({url:_889.url,params:_889.ajaxParam,title:_88e.text(),showSuccessMessage:false,load:function(){
_893.call(_891[_888],_88e[0],_888);
}});
}else{
if(_896.loaded){
_893.call(_891[_888],_88e[0],_888);
}
}
}else{
if($(e.target).is("dt")){
location=_88a.href;
}
}
}else{
_893.call(_891[_888],_88e[0],_888);
}
}else{
return false;
}
}else{
return false;
}
});
if(ie6){
$(this).hover(function(){
$(this).toggleClass("fingerLeftHover");
});
}
});
$(this).data("fingertabs-activeTab",_881.activeTab);
if(_881.autoClick){
_887.eq(_881.activeTab).triggerHandler("click");
}
});
});
$.dr.utils.createPluginEvents("dr.fingertabs",["beforechange","afterchange"]);
$.namespace("dr.fingertabs.show",function(_897,_898){
return this.each(function(){
var _899=this;
if($(this).is("dl.fingertabs")&&(_897>=0)){
_899=$(this).parents(_87d).find(_87e).get(_897);
}else{
_898=_897;
}
if($(_899).is("dt.fingerLeft")){
$(_899).triggerHandler("click",[true,_898]);
}
});
});
$.dr.addUnobtrusiveEvent(function(evt,_89b){
$("dl.fingertabs",_89b).dr.fingertabs({autoClick:false});
},"unobtrusiveEventEarly");
$.dr.addUnobtrusiveEvent(function(evt,_89d){
$("dl.fingertabs",_89d).each(function(){
var _89e=$(this).data("fingertabs-activeTab");
$(this).dr.fingertabs.show(_89e);
});
},"unobtrusiveEventLate");
})(jQuery);
(function($){
var _8a0=function(){
$(".iconWell .popup > div",this).dr.shadows();
var _8a1=false;
var _8a2=function(){
$(".iconWell > li.hover").removeClass("hover");
};
var _8a3=function(evt){
if(evt){
if($(evt.target).parents("ul.iconWell").length==0){
_8a2();
$("body").unbind("mouseover",_8a3);
_8a1=false;
}
}
};
$(".iconWell > li").mouseenter(function(){
_8a2();
$(this).addClass("hover");
if(!_8a1){
$("body").bind("mouseover",_8a3);
_8a1=true;
}
});
};
$.dr.addDomReadyEvent(_8a0,"domReadyEarly");
})(jQuery);
(function($){
$.fn.extend({setMaxHeight:function(tag,_8a7){
return this.each(function(){
var _8a8=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]),_8a7);
if(mh>_8a8){
_8a8=mh;
}
}
}
}else{
if(typeof tag!=="undefined"){
_8a8=Math.max($(this).getMaxHeight(tag),_8a7);
}
}
$(this).height(_8a8);
});
},getMaxHeight:function(tag){
var _8ac=0;
$(tag,this).each(function(){
_8ac=Math.max(_8ac,$(this).outerHeight(true));
});
return _8ac;
}});
})(jQuery);
(function($){
var _8ae="";
var _8af="";
var _8b0=220;
var _8b1="More about {0}";
var _8b2;
var _8b3={recentItemsUrl:"test-json.jsp",recentItemsKey:"key",helpCallback:function(url){
var obj={url:url,width:500,height:500};
$.dr.popup(obj);
},errorCallback:function(xhr,_8b7,_8b8){
$.dr.utils.logError(_8b8);
},externalLinkMouseover:function(){
var $li=$(this);
var _8ba=$li.find(">a");
var args=Array.prototype.slice.call(arguments);
var _8bc=args[0];
var _8bd=args[1];
var _8be=args[3];
var _8bf;
if(!$li.data("loaded")){
var _8c0=_8ba.attr("href");
if(_8c0.indexOf("#")===-1){
$.dr.menu.setHelpContainerText.apply(this,[_8bc,_8bd.loadingMask,"expanded"]);
$.ajax({url:_8c0,dataType:"text",success:function(_8c1){
var _8c2=$(_8c1);
if(_8c2.hasClass("menu")){
$li.removeClass("external").addClass("more");
_8bf=$li.find("div.tier3-container");
var _8c3=[_8c2.html()].concat(args);
$.dr.menu.addMenu.apply(_8bf,_8c3);
if($li.hasClass("hover")){
$.dr.menu.setActiveMenu(_8bf);
args[2]="collapsed";
$.dr.menu.setHelpContainer.apply(window,args);
}
}else{
if(_8c2.hasClass("helpText")){
$li.data("loaded",_8c2.html());
$.dr.menu.setHelpContainerText.apply($li[0],[_8bc,_8c2.html(),"expanded"]);
}
}
},error:function(xhr,_8c5){
$.dr.menu.setHelpContainerText.apply($li[0],[_8bc,"Error retrieving content: "+xhr.status+" "+xhr.statusText,"expanded"]);
}});
}
}else{
$.dr.menu.setHelpContainerText.apply($li[0],[_8bc,$li.data("loaded"),"expanded"]);
}
},loadingMask:"<div class=\"loadingSmall\"><div class=\"abs\"><span>Loading</span></div></div>"};
var _8c6={RECENT_ITEMS_URL:"recentItemsUrl",RECENT_ITEMS_KEY:"recentItemsKey",HELP_CALLBACK:"helpCallback",ERROR_CALLBACK:"errorCallback",EXTERNAL_LINK_MOUSEOVER:"externalLinkMouseover",LOADING_MASK:"loadingMask"};
var _8c7=function(str){
return str.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;");
};
var _8c9=function(_8ca,_8cb){
if(typeof (_8ca)!="undefined"&&_8ca!==null){
clearTimeout(_8ca);
}
if(typeof _8cb!=="undefined"&_8cb!==null){
_8cb.stop(true,true);
_8cb.css("left","").css("width","");
}
};
var _8cc=function(xhr){
$.dr.utils.logError(xhr);
};
var _8ce=function(_8cf,txt,size){
var _8d2=_8cf.parents(".mega-menu");
_8cf.find(".help-text-container").html(txt).find("a.helpPopup").click(function(){
_8b3.helpCallback($(this).attr("data-help-url"));
_8d2.hide(0).parent().removeClass("hover");
return false;
});
if(size==="collapsed"){
_8cf.removeClass("mega-menu-help-expanded").addClass("mega-menu-help-collapsed");
}else{
_8cf.addClass("mega-menu-help-expanded").removeClass("mega-menu-help-collapsed");
}
};
var _8d3=function(_8d4,txt,key,size){
var $ric=$(".recent-items-container",_8d4);
$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 _8da=_8d4.parents(".mega-menu");
$sub.find("a.recent-item").click(function(e){
_8da.hide(0).parent().removeClass("hover");
});
var _8dc=$sub.find(".recentScroller");
if(_8dc.length){
var h2h=$sub.find(">h2").outerHeight();
var h=_8d4.innerHeight();
_8dc.height(h-h2h);
}
if(size==="collapsed"){
_8d4.removeClass("mega-menu-help-expanded").addClass("mega-menu-help-collapsed");
}else{
_8d4.addClass("mega-menu-help-expanded").removeClass("mega-menu-help-collapsed");
}
};
var _8df=function(args){
var _8e1=(args.length)?$.dr.menu.strings[args[0]]||{}:{};
for(var i=1,len=args.length;i<len;i++){
if(_8e1[args[i]]){
_8e1=_8e1[args[i]];
}else{
break;
}
}
return _8e1.label||_8ae;
};
var _8e3=function(args){
var _8e5=(args.length)?$.dr.menu.strings[args[0]]||{}:{};
for(var i=1,len=args.length;i<len;i++){
if(_8e5[args[i]]){
_8e5=_8e5[args[i]];
}else{
break;
}
}
return _8e5.label||_8ae;
};
var _8e7=function(args){
var _8e9=(args.length)?$.dr.menu.strings[args[0]]||{}:{};
for(var i=1,len=args.length;i<len;i++){
if(_8e9[args[i]]){
_8e9=_8e9[args[i]];
}else{
break;
}
}
return _8e9.helpText||_8af;
};
var _8eb=function(args){
var _8ed=(args.length)?$.dr.menu.strings[args[0]]||{}:{};
for(var i=1,len=args.length;i<len;i++){
if(_8ed[args[i]]){
_8ed=_8ed[args[i]];
}else{
break;
}
}
return _8ed.helpLink||null;
};
var _8ef=function(){
var args=arguments;
var key=args[(args.length-1)];
var html="";
var _8f3=_8df(args);
var _8f4=_8e7(args);
var link=_8eb(args);
var _8f6="info";
if(key){
var c=$("#"+key).attr("class"),classNames=[];
if(c&&c.length){
classNames=c.split(" ");
}
for(var i=0,len=classNames.length;i<len;i++){
if(classNames[i]!=="more"&&classNames[i]!=="standalone"&&classNames[i]!=="external"&&classNames[i]!=="tier3-list"&&classNames[i]!=="tier1"&&classNames[i]!=="hover"&&classNames[i]!=="active"){
_8f6=classNames[i];
}
}
}else{
return "";
}
if(_8f3){
html+="<h2 class=\""+_8f6+"\">"+_8f3+"</h2>";
}
if(_8f4){
html+="<p>"+_8f4+"</p>";
}
if(link){
html+="<p><a class=\"helpPopup\" data-help-url=\""+link+"\" href=\""+link+"\">"+_8b1.replace("{0}",_8f3)+"</a></p>";
}
return html;
};
var _8f9=function(){
var args=Array.prototype.slice.apply(arguments);
var _8fb=args.shift();
var _8fc,list;
var key=args[(args.length-1)];
var list="<div class=\"recentScroller\"><ul>";
for(var i=0,len=_8fb.length;i<len;i++){
list+="<li><a href=\""+_8fb[i][1]+"\" class=\"recent-item\">"+_8c7(_8fb[i][0])+"</a></li>";
}
list+="</ul></div>";
_8fc="<h2 class=\""+key+"\">Recent "+_8e3.apply(this,args)+"</h2>";
return _8fc+list;
};
var _900=function(){
var _901=this;
var args=Array.prototype.slice.apply(arguments);
var _903=args.shift();
var size=args.shift();
var key=args[(args.length-1)];
if(typeof hasRecentItems!=="undefined"&&hasRecentItems[key]){
$(".help-text-container",_901).hide();
$(".recent-items-container",_901).show();
_8d3(_901,_8b3.loadingMask,key,size);
$.dr.menu.getRecentItemsJson(key,_903,function(json,_907){
var html=_8f9(json.items,args);
_8d3(_901,html,key,size);
});
}else{
$(".help-text-container",_901).show();
$(".recent-items-container",_901).hide();
var html=_8ef.apply(this,args);
if(html){
_8ce(_901,html,size);
}else{
_8ce(_901,"",size);
}
}
};
var _90a=[{open:400,close:400},{open:400,close:400}];
var _90b,tier2ID,tier3ID;
$.dr.menu={cache:{},showMethod:($.browser.msie)?$.fn.show:$.fn.fadeIn,hideMethod:($.browser.msie)?$.fn.hide:$.fn.fadeOut,TO:null,animator:null,setActiveMenu:function(jObj){
_8b2=jObj;
_8b2.show();
_8b2.parent().addClass("active");
},getActiveMenu:function(){
return _8b2;
},getRecentItemsJson:function(key,_90e,_90f,_910){
var _911=this;
if(typeof this.cache[key]==="undefined"){
this.cache[key]={};
}
if(this.cache[key].xhrData){
var _912=(typeof this.cache[key].xhrRequest==="boolean")?false:true;
_90f(this.cache[key].xhrData,_912);
}else{
if(!this.cache[key].xhrRequest){
var data={ajaxTime:new Date().getTime()};
data[_90e.recentItemsKey]=key;
this.cache[key].xhrRequest=$.ajax({data:data,dataType:"json",url:_90e.recentItemsUrl,success:function(json){
_911.cache[key].xhrData=json;
if(typeof _90f==="function"){
_90f(json,false);
}
},error:function(xhr,_916,_917){
delete _911.cache[key];
if(typeof _910==="function"){
_910(xhr,_916,_917);
}else{
_90e.errorCallback.call(this,xhr,_916,_917);
}
}});
}
}
},setRecentItemsJson:function(key,_919,_91a){
if(typeof this.cache[key]==="undefined"){
this.cache[key]={};
}
this.cache[key].xhrData={items:_919};
this.cache[key].xhrRequest=true;
},getDefaults:function(){
return _8b3;
},setDefaults:function(_91b){
if(_91b){
_91b=$.dr.utils.legacyMap(_91b,_8c6);
$.extend(true,_8b3,_91b);
}
$(document).trigger("afterMenuSetDefaults",[_91b]);
},setHelpContainer:function(){
var args=Array.prototype.slice.call(arguments);
var _91d=args.shift();
_900.apply(_91d,args);
},setHelpContainerText:function(){
_8ce.apply(this,arguments);
},addMenu:function(){
var _91e=$(this);
var args=Array.prototype.slice.call(arguments);
_91e.html(args.shift());
var _920=args[0];
$("ul.tier3-list",_91e).hover(function(){
var _921=$(this);
_8c9($.dr.menu.TO,$.dr.menu.animator);
_920.addClass("hover");
_921.addClass("hover").find("a").addClass("over");
tier3ID=_921.attr("id");
$.dr.menu.TO=setTimeout(function(){
var _922=args.slice();
_922.push(tier3ID);
_922[2]="collapsed";
$.dr.menu.setHelpContainer.apply(this,_922);
_921.addClass("active").siblings().removeClass("active");
},_90a[1].open);
},function(){
var _923=$(this);
_8c9($.dr.menu.TO,$.dr.menu.animator);
_923.removeClass("hover").find("a").removeClass("over");
var _924=_923.parents(".mega-menu").find(".help-text");
$.dr.menu.TO=setTimeout(function(){
_924.removeClass("hover");
_923.removeClass("active").siblings().removeClass("active");
var _925=args.slice();
_925[2]="collapsed";
$.dr.menu.setHelpContainer.apply(this,_925);
},_90a[1].close);
});
},setPosition:function(_926){
_926.css({"left":this.getPosition(_926.parent(),_926)+"px","display":"none"});
},getPosition:function(_927,_928){
childWidth=$(_928).width();
windowWidth=$(window).width();
posX=$(_927).offset().left;
targetPosX=posX-(childWidth*0.05)-10;
if((targetPosX+childWidth)>windowWidth){
targetPosX=windowWidth-childWidth;
}else{
if(targetPosX<0){
targetPosX=0;
}
}
return targetPosX;
},strings:{}};
$.namespace("dr",{menu:function(_929){
var _92a=$(this),fadeSpeed=$.browser.msie?0:200;
return this.each(function(_92b){
if(_929){
_929=$.dr.utils.legacyMap(_929,_8c6);
}
var _92c=$.extend(true,_929,_8b3);
$(".wrapper",_92a).dr.shadows().find(".inner").setMaxHeight(["ul","div"],_8b0);
$(".mega-menu",this).bind("menuOpen",function(e){
var _92e=$(e.target);
_8c9($.dr.menu.TO,$.dr.menu.animator);
var $li=_92e.parents("ul.nav >li");
_90b=$li.attr("id");
var _930=$(".help-text",_92e).removeClass("hover");
if(_92e.find("ul.tier2-list>li.active").length==0){
_900.call(_930,_92c,"expanded",_90b);
}else{
_900.call(_930,_92c,"collapsed",_90b,tier2ID);
}
$.dr.menu.setPosition.call($.dr.menu,_92e);
$.dr.menu.TO=setTimeout(function(){
$.dr.menu.showMethod.call(_92e,fadeSpeed,function(){
_92e.data("active",true);
});
},_92e.data("interval").open-fadeSpeed);
}).bind("menuClose",function(e){
var _932=$(e.target);
_8c9($.dr.menu.TO,$.dr.menu.animator);
if(_932.data("active")){
$.dr.menu.TO=setTimeout(function(){
$.dr.menu.hideMethod.call(_932,fadeSpeed,function(){
_932.data("active",false).parent().removeClass("hover");
});
},_932.data("interval").close);
}else{
_932.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:_90a[$(this).parents(".mega-menu").length].open,close:_90a[$(this).parents(".mega-menu").length].close});
}).find("a").click(function(){
if($(this).parent().hasClass("more")||$(this).parent().hasClass("external")){
if($(this).attr("href").length&&!$(this).attr("href").match(/#$/)){
$(".mega-menu",_92a).hide();
}else{
return false;
}
}else{
$(".mega-menu",_92a).hide();
}
});
$("> li",this).hover(function(){
$(".mega-menu:not(:eq("+$(".mega-menu",$(this)).data("idx")+"))",_92a).hide().parent().removeClass("hover");
$(".mega-menu",$(this)).trigger("menuOpen").parent().addClass("hover");
},function(){
$(".mega-menu",$(this)).trigger("menuClose");
}).filter(":has(.mega-menu)").find("> a").click(function(e){
e.preventDefault();
});
$("ul.tier2-list>li>a",this).bind("mouseover",function(evt){
_8c9($.dr.menu.TO,$.dr.menu.animator);
var _936=$.dr.menu.getActiveMenu();
var $a=$(evt.target);
var $li=$a.parent();
var _939=$li.parent().siblings(".help-text").removeClass("hover");
if(tier3ID){
$("ul.tier3-list",_92a).removeClass("active");
tier3ID=null;
}
if($a.attr("href").length&&!$a.attr("href").match(/#$/)){
$a.addClass("active-link");
}
if($li.hasClass("more")){
var fn=function(){
tier2ID=$li.attr("id");
if(_936){
_936.parent("li").removeClass("active");
_936.hide();
}
_936=$a.siblings("div.tier3-container").show();
_936.parent().addClass("active");
$.dr.menu.setActiveMenu(_936);
_900.call(_939,_92c,"collapsed",_90b,tier2ID);
};
$.dr.menu.animator=_939;
if(_939.hasClass("mega-menu-help-collapsed")){
$.dr.menu.TO=setTimeout(fn,_90a[0].open);
}else{
$.dr.menu.TO=setTimeout(function(){
$.dr.menu.animator.removeClass("hover").animate({left:"+=210px",width:"-=210px"},fadeSpeed,fn);
},_90a[0].open);
}
}else{
if($a.parent().hasClass("standalone")){
$.dr.menu.animator=_939;
var fn=function(){
tier2ID=$li.attr("id");
if(_936){
_936.parent("li").removeClass("active");
_936.hide();
}
_900.call(_939,_92c,"expanded",_90b,tier2ID);
};
if(_939.hasClass("mega-menu-help-expanded")){
$.dr.menu.TO=setTimeout(fn,_90a[0].close);
}else{
$.dr.menu.TO=setTimeout(function(){
$.dr.menu.animator.removeClass("hover").animate({left:"-=210px",width:"+=210px"},fadeSpeed,fn);
},_90a[1].close);
}
}else{
if($a.parent().hasClass("external")){
$.dr.menu.animator=_939;
var fn=function(){
tier2ID=$li.attr("id");
if(_936){
_936.parent("li").removeClass("active");
_936.hide();
}
_92c.externalLinkMouseover.call($li[0],_939,_92c,"expanded",_90b,tier2ID);
};
if(_939.hasClass("mega-menu-help-expanded")){
$.dr.menu.TO=setTimeout(fn,_90a[0].close);
}else{
$.dr.menu.TO=setTimeout(function(){
$.dr.menu.animator.removeClass("hover").animate({left:"-=210px",width:"+=210px"},fadeSpeed,fn);
},_90a[1].close);
}
}
}
}
$li.addClass("hover");
}).bind("mouseout",function(evt){
_8c9($.dr.menu.TO,$.dr.menu.animator);
var _93c=$.dr.menu.getActiveMenu();
var $a=$(evt.target);
var $li=$a.parent();
var _93f=$li.parent().siblings(".help-text").removeClass("hover");
$li.removeClass("hover");
$a.removeClass("active-link");
var fn=function(){
if(_93c){
_93c.parent("li").removeClass("active");
_93c.hide();
}
_93c=null;
_900.call(_93f,_92c,_90b);
};
$.dr.menu.animator=_93f;
if(_93f.hasClass("mega-menu-help-expanded")){
$.dr.menu.TO=setTimeout(fn,_90a[0].close);
}else{
$.dr.menu.TO=setTimeout(function(){
$.dr.menu.animator.animate({left:"-=210px",width:"+=210px"},fadeSpeed,fn);
},_90a[1].close);
}
});
$(".tier2-list div.tier3-container",_92a).each(function(){
$(this).height($(this).parents(".inner").innerHeight());
}).hide().bind("mouseenter",function(){
if(!tier3ID){
_8c9($.dr.menu.TO,$.dr.menu.animator);
}
});
$("ul.tier3-list").hover(function(){
var _941=$(this);
_8c9($.dr.menu.TO,$.dr.menu.animator);
var _942=_941.parents(".mega-menu").find(".help-text").addClass("hover");
_941.addClass("hover").find("a").addClass("over");
tier3ID=_941.attr("id");
$.dr.menu.TO=setTimeout(function(){
_900.call(_942,_92c,"collapsed",_90b,tier2ID,tier3ID);
_941.addClass("active").siblings().removeClass("active");
},_90a[1].open);
},function(){
var _943=$(this);
_8c9($.dr.menu.TO,$.dr.menu.animator);
_943.removeClass("hover").find("a").removeClass("over");
var _944=_943.parents(".mega-menu").find(".help-text");
$.dr.menu.TO=setTimeout(function(){
tier3ID=null;
_944.removeClass("hover");
_943.removeClass("active").siblings().removeClass("active");
_900.call(_944,_92c,"collapsed",_90b,tier2ID);
},_90a[1].close);
});
$(".help-text",this).each(function(){
$(this).height($(this).parent().innerHeight());
}).bind("mouseenter",function(evt){
_8c9($.dr.menu.TO);
if(!tier3ID){
$(this).removeClass("hover").removeClass("actve");
}
}).bind("mouseleave",function(evt){
var _947=$(this);
_947.removeClass("hover");
});
});
}});
var _948=function(){
$(".nav").dr.menu();
};
$.dr.addDomReadyEvent(_948,"domReadyEarly");
})(jQuery);
(function($){
$.namespace("dr",{navigation:function(){
var _94a=$(this),timeout="",fadeSpeed=!$.browser.msie?"fast":0;
var _94b=[{"open":"100","close":"800"}];
var rows={"dfltCol":"3","oneCol":"1","twoCol":"2"};
var _94d=function(_94e,_94f){
childWidth=$(_94f).width();
windowWidth=$(window).width();
posX=$(_94e).offset().left;
targetPosX=posX-(childWidth*0.05)-10;
if((targetPosX+childWidth)>windowWidth){
targetPosX=windowWidth-childWidth;
}else{
if(targetPosX<0){
targetPosX=0;
}
}
return targetPosX;
};
var _950=function(){
$(".menu",_94a).each(function(idx){
$(this).css({"left":_94d($(this).parent(),$(this))+"px","display":"none"});
});
};
var _952=function(){
var _953="";
for(var key in rows){
if($(this).attr("class").match(key)){
_953=rows[key];
}
}
return _953==""?rows.dfltCol:_953;
};
return this.each(function(){
$(".menu:not(.mega-menu)",this).bind("menuOpen",function(e){
var _956=$(e.target);
if(typeof (timeout)!="undefined"){
clearTimeout(timeout);
}
timeout=setTimeout(function(){
_956.fadeIn(fadeSpeed,function(){
_956.data("active",true);
});
},_956.data("interval").open);
}).bind("menuClose",function(e){
var _958=$(e.target);
if(typeof (timeout)!="undefined"){
clearTimeout(timeout);
}
if(_958.data("active")){
timeout=setTimeout(function(){
_958.fadeOut(fadeSpeed,function(){
_958.data("active",false).parent().removeClass("hover");
});
},_958.data("interval").close);
}else{
_958.hide().parent().removeClass("hover");
}
}).each(function(idx){
$(this).data("idx",idx).data("active",false).data("interval",{open:_94b[$(this).parents(".menu").length].open,close:_94b[$(this).parents(".menu").length].close});
}).find("a").click(function(){
$(".menu",_94a).hide();
}).end().find("> ul").dr.shadows().each(function(){
var _95a=$(this),rowHeights=[];
$(this).children().each(function(_95b){
var row=_95b==0?0:Math.floor(_95b/_952.call(_95a));
$(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")+"))",_94a).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",_950);
});
}});
var _95e=function(){
$(".nav").dr.navigation();
};
$.dr.addDomReadyEvent(_95e,"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 _961="",defaults={deepLink:true,activeTab:0,displayEffect:{animation:"fade",speed:"normal"}};
var _962=function(ypos){
$(this).stop().animate({backgroundPosition:"0 "+ypos+"px"},250);
};
var _964=function(){
_962.call(this,-535);
};
var _965=function(){
_962.call(this,-500);
};
$.namespace("dr",{tabs:function(_966){
var _967=$.extend(true,defaults,_966);
var _968=_967.displayEffect.animation.toLowerCase(),animation={show:$.fn.show,hide:$.fn.hide,speed:_967.displayEffect.speed};
if($.browser.msie){
_968="none";
}
switch(_968){
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;
animation=$.extend(animation,{show:$.fn.show,hide:$.fn.hide});
break;
}
return this.dr.bindPluginEvents({"beforechange":_967.beforechange,"beforeanimate":_967.beforeanimate,"afteranimate":_967.afteranimate}).each(function(){
var _969=$(this),defaultTab=0,activeTab,tabIDArray=[];
var _96a=function(_96b,_96c){
var _96d=true;
if(!isNaN(activeTab)){
if(_96b===activeTab){
_96d=false;
}else{
var _96e=_969.find("> dd:eq("+activeTab+") > div.tabContent")[0];
_96d=_969.find("> dt").eq(activeTab).add(_969).drTriggerEach("beforechange",[_96e,activeTab,_96b]);
}
}
return (_96d!==false);
};
var _96f=function(_970,_971,_972){
activeTab=_970;
var _973=_969.find("> dd").hide().eq(_970).show().end().find("> div.tabContent").hide().eq(_970);
var _974=_969.find("> dt").removeClass("active").eq(_970).addClass("active")[0];
var _975=_969.add(_974).drTriggerEach("beforeanimate",[_973[0],_970,_974]);
var _976=function(){
_969.add(_974).drTriggerEach("afteranimate",[_973[0],_970]);
};
if(_975===false||_972===0){
_973.show();
_976.call(_973[0]);
}else{
if($.isFunction(_975)){
_975.call(_973[0],_976);
}else{
_971.call(_973,_972,_976);
}
}
};
var _977=function(){
_969.find("> dt").each(function(_978){
var _979=encodeURI((_978==0)?"/":"/"+$.trim($(this).text()).replace(/\s+/g,"-"));
$(this).data("label",_979).data("count",_978).click(function(){
if(_96a.call(this,_978)){
$.address.value($(this).data("label"));
}
return false;
});
tabIDArray.push(_979.toLowerCase());
});
$.address.change(function(_97a){
var _97b=encodeURI($.trim(_97a.value)).toLowerCase();
var _97c=_969.find("> dt").filter(function(){
var _97d=$(this).data("label");
return (_97d)?(_97d.toLowerCase()==_97b):false;
}).data("count");
if(activeTab!=_97c&&_961!=_97a.path){
if(typeof activeTab==="undefined"&&typeof defaultTab!=="undefined"&&_97a.path=="/"){
_97c=defaultTab;
}
var _97e=false;
for(var i=0;i<tabIDArray.length;i++){
if(tabIDArray[i]==_97b){
_96f(_97c,animation.show,animation.speed);
break;
}
}
}
_961=_97a.path;
});
};
var _980=(_967.deepLink&&!_969.parents("dl.tabs").length&&!$("body").hasClass("modalPage"));
var _981=_969.find("> dt").find("script").remove().end().prependTo(this).each(function(_982){
var $dt=$(this);
var _984="";
if(!$dt.hasClass("tab")){
_984="tab ";
}
if((_982===0)&&!$dt.hasClass("first")){
_984+="first ";
}
if($dt.hasClass("active")){
defaultTab=_982;
}
if($("a",this).length){
_984+="tabLink";
_980=false;
}else{
if(!_980&&!$dt.hasClass("preventClick")){
$dt.bind("click show",function(){
if(_96a.call(this,_982)){
_96f(_982,animation.show,animation.speed);
}
return false;
});
}
}
if(_984.length){
$dt.addClass($.trim(_984));
}
}).hover(_964,_965).length;
var _985=_969.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 _987="";
for(var i=_985;i<_981;i++){
_987+="<dd class=\"tabContainer\"><div class=\"tabContent\"/></dd>";
}
if(_987.length){
_969.append(_987);
}
if(_980){
if($.address.ready()){
_977();
}else{
$(document).bind("onAddressActivated",function(){
_977();
});
$.address.activate();
}
}else{
_96f(defaultTab||_967.activeTab,animation.show,0);
}
});
}});
$.dr.utils.createPluginEvents("dr.tabs",["beforechange","beforeanimate","afteranimate"]);
$.dr.tabs={getDefaults:function(){
return defaults;
},setDefaults:function(_989){
if(_989){
$.extend(true,defaults,_989);
}
$(document).trigger("afterTabSetDefaults",[_989]);
}};
$.dr.addUnobtrusiveEvent(function(evt,_98b){
$("dl.tabs",_98b).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="Not a valid hex color. Valid hex characters are 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 _996=new RGBColor(Color.hexToDec(h.substring(0,2)),Color.hexToDec(h.substring(2,4)),Color.hexToDec(h.substring(4,6)));
return _996;
};
Color.hexToDec=function(h){
return parseInt(h,16);
};
Color.parseHex=function(h){
h=h.toUpperCase();
var _999=null;
var _99a=null;
if((h.indexOf("#")!=-1&&h.length==7)||(h.indexOf("#")==-1&&h.length==6)){
_999=/\#{0,1}((([ABCDEF]|\d){2}){3})/;
_99a=h.match(_999);
h=(_99a!==null)?_99a[1]:null;
}else{
if((h.indexOf("#")!=-1&&h.length==4)||(h.indexOf("#")==-1&&h.length==3)){
_999=/\#{0,1}(([ABCDEF]|\d{1})([ABCDEF]|\d{1})([ABCDEF]|\d{1}))/;
_99a=h.match(_999);
h=(_99a!==null)?_99a[2]+_99a[2]+_99a[3]+_99a[3]+_99a[4]+_99a[4]:null;
}else{
_999=/\#{0,1}(([ABCDEF]|\d){1,6})/;
_99a=h.match(_999);
h=(_99a!==null)?_99a[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 _9a0=String.fromCharCode(key).toUpperCase();
var _9a1=Color.HEX_VALUES+"#";
if((key===null)||(key===0)||(key==8)||(key==9)||(key==13)||(key==27)){
return true;
}else{
if((Color.HEX_VALUES.indexOf(_9a0)>-1||((Color.HEX_SYMBOL.indexOf(_9a0)>-1)&&obj.value.length<=0))){
return _9a0;
}else{
return false;
}
}
};
Color.decMask=function(evt){
var key=(evt.which)?evt.which:event.keyCode;
var _9a4=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(_9a4)>-1)){
return _9a4;
}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 _9ad=Color.hexToRgb(this.hex);
this.red=_9ad.red;
this.green=_9ad.green;
this.blue=_9ad.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 _9af=function(_9b0,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=_9b0;
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 _9b2="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;
_9af.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 _9b3=this.inputObj.parentNode;
var _9b4=false;
while(!_9b4){
if((_9b3.tagName=="BODY")||(_9b3.tagName=="HTML")){
break;
}
if(_9b3.tagName=="DIV"||_9b3.tagName=="DD"||_9b3.tagName=="TD"){
_9b4=true;
}else{
_9b3=_9b3.parentNode;
}
}
var _9b5=document.createElement("div");
_9b5.className="colorPickerSample";
_9b5.innerHTML="<div id=\""+this.sampleColorId+"\" style=\"background-color:"+this.currentColor.toHexString()+"\"></div>";
_9b5=DR.Utils.insertAfter(_9b3,_9b5,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(_9b3,d,_9b5);
var _9b7=this;
var func=function(evt){
_9b7.toggle(evt);
};
DR.Utils.addEvent(this.pickerIconObj,"click",func);
DR.Utils.addEvent(this.sampleColorObj,"click",func);
DR.Utils.addEvent(this.inputObj,"click",func);
var _9ba=_9b3.getElementsByTagName("span");
var _9bb=false;
if(_9ba.length>0){
if(DR.Utils.hasCSSClass(_9ba[0],"hint")){
_9bb=true;
}
}
if(!_9bb){
var s=document.createElement("span");
s.innerHTML="#"+this.defaultHexColor;
s.className="hint";
DR.Utils.insertAfter(_9b3,s,this.pickerIconObj);
}
DR.Utils.addCSSClass(this.inputObj,"colorPickerEnabled");
}
},buildPopup:function(){
if(POPUP_UI===null){
var _9bd=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}/,_9b2).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=_9bd.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 _9c4=function(evt){
if(window.event){
window.event.cancelBubble=true;
}else{
evt.stopPropagation();
evt.preventDefault();
}
};
this.stopClick=_9c4;
DR.Utils.addEvent(this.popupObj,"click",_9c4,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 _9c7=5;
var _9c8=0;
var _9c9="Right";
var _9ca="Top";
var _9cb="Right";
var _9cc="Down";
DR.Utils.Position.snapTo(this.inputObj,this.popupObj,_9c7,_9c8,_9c9,_9ca,_9cb,_9cc);
var _9cd=this;
var func=function(){
_9cd.addDocumentOnclick();
};
window.setTimeout(func,50);
this._open=true;
},addDocumentOnclick:function(){
var _9cf=this;
var func=function(){
_9cf.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(_9d3,evt){
this.currentChannel=_9d3;
var _9d5=this;
var _9d6=function(evt){
_9d5.doDrag(evt);
};
var _9d8=function(evt){
_9d5.stopDrag(evt);
};
this.mouseup=_9d8;
this.mousemove=_9d6;
DR.Utils.addEvent(document,"mousemove",_9d6,false);
DR.Utils.addEvent(document,"mouseup",_9d8,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 _9dc=this.popupObj.offsetLeft+this.colorPickerRampsObj.offsetLeft;
_9dc+=(this.rampLeftOffset-(this.sliderIconSize/2));
var x=this.constrainSlider(evt.clientX-_9dc+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 _9e0=this.rampLeftOffset;
var _9e1=_9e0+this.rampScale;
var newX=Math.min(Math.max(_9e0,x),_9e1);
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(_9e3,dec){
var _9e5=Math.round(Color.decToPercent(dec));
_9e5=_9e5+this.rampLeftOffset;
_9e3.style.left=_9e5+"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 _9e7=obj.value;
var _9e8=obj.name;
if(_9e8=="red"){
this.currentColor.setRedChannel(_9e7);
}else{
if(_9e8=="green"){
this.currentColor.setGreenChannel(_9e7);
}
}
if(_9e8=="blue"){
this.currentColor.setBlueChannel(_9e7);
}
this.currentChannel=_9e8;
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,_9ec){
var key=(evt.which)?evt.which:event.keyCode;
var _9ee=(_9ec)?true:false;
if(key==13){
if(!_9ee){
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 _9ef="jQuery('#"+this.id+"').get(0).colorPicker";
this.colorPicker=new _9af(_9ef,this);
$(this).addClass("colorPicker_inited");
}
}
});
}});
$.dr.colorPicker={getInstance:function(){
return INSTANCE;
}};
var _9f0=function(_9f1){
_9f1.filter("input[type=text].colorPicker").dr.colorPicker();
};
$.dr.addPlugin("form",_9f0);
})(jQuery);
(function($){
var _9f3=0,ANY_DATE_PICKERS_OPEN=false;
var _9f4={cssClassDate:"date",cssClassTodaysDate:"todaysDate",cssClassDisplayDateClass:"displayDate",cssClassDisplayMonthDate:"displayMonthDate",cssClassOtherMonthDate:"otherMonthDate",yearSelectOffset:4,defaultText:"Calendar"};
var _9f5={CSS_CLASS_DATE:"cssClassDate",CSS_CLASS_TODAYS_DATE:"cssClassTodaysDate",CSS_CLASS_DISPLAY_DATE_CLASS:"cssClassDisplayDateClass",CSS_CLASS_DISPLAY_MONTH_DATE:"cssClassDisplayMonthDate",CSS_CLASS_OTHER_MONTH_DATE:"cssClassOtherMonthDate",YEAR_SELECT_OFFSET:"yearSelectOffset",DEFAULT_TEXT:"defaultText"};
var _9f6="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 _9f7=[_9f6,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 _9f7[i];
};
$.dr.date.getMonthAbbr=function(i){
return MONTH_ABBREVIATIONS[i];
};
$.dr.date.getDayAbbr=function(i){
return DAY_HEADERS[i];
};
var _9fb=function(_9fc,fObj,_9fe,_9ff){
this.pickerObjId=_9fc;
this.init(fObj,_9fe,_9ff);
};
_9fb.prototype={init:function(fObj,_a01,_a02){
if(typeof fObj=="string"){
this.inputId=fObj;
this.inputObj=getElem(fObj);
}else{
if(fObj.getAttribute("datePickerId")){
this.inputId=fObj.getAttribute("datePickerId");
}else{
this.inputId=fObj.id;
}
this.inputObj=fObj;
}
if(this.inputObj===null){
return;
}
this.dateFormat=(_a02)?_a02:$.dr.date.getDefaultFormat();
this._label=(_a01)?_a01.replace(":",""):_9f4.defaultText;
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 _a03=this.inputObj.parentNode;
var _a04=false;
while(!_a04){
if((_a03.tagName=="BODY")||(_a03.tagName=="HTML")){
break;
}
if(_a03.tagName=="DIV"||_a03.tagName=="DD"||_a03.tagName=="TD"){
_a04=true;
}else{
_a03=_a03.parentNode;
}
}
var divs=_a03.getElementsByTagName("div");
var _a06=false;
var _a07=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 _a09=this;
var func=function(evt){
_a09.toggle(evt);
};
$(d).click(func);
$(this.inputObj).click(func);
this.pickerIcon=DR.Utils.insertAfter(_a03,d,this.inputObj);
}
var _a0c=_a03.getElementsByTagName("span");
var _a0d=false;
if(_a0c.length>0){
if($(_a0c[0]).hasClass("hint")){
_a0d=true;
}
}
if(!_a0d){
var s=document.createElement("span");
s.className="hint";
var _a0f=new $.dr.date(new Date(),this.dateFormat);
s.innerHTML=this.dateFormat+" ("+_a0f.toFormattedString()+")";
s.title=s.innerHTML;
DR.Utils.insertAfter(_a03,s,this.pickerIcon);
}
$(this.inputObj).addClass("datePickerEnabled").attr("autocomplete","off");
}
},toggle:function(evt,_a11){
if(this.contentArea===null){
var _a12=document.getElementById(this.popupId);
if(_a12===null){
var _a13=document.getElementsByTagName("body")[0];
var d=document.createElement("DIV");
d.id=this.popupId;
d.className="datePickerContent";
this.contentArea=_a13.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=_a12;
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 _a16=this;
var func=function(evt){
_a16.shouldHide(evt);
};
this.shouldHideFunc=func;
$(document).click(func);
this.setInputFieldDate();
this.refreshCalendar();
this.showPopup();
var _a19=this.overlay.shadowRight;
var _a1a=this.overlay.shadowBottom;
var _a1b=-(_a19/2);
var _a1c=0;
if(DR.Utils.BrowserDetect.browser=="Explorer"&&DR.Utils.BrowserDetect.version<7){
_a1b=0;
_a1c=2;
}
var _a1d="Left";
var _a1e="Bottom";
var _a1f="Right";
var _a20="Down";
DR.Utils.Position.snapTo(this.inputObj,this.popupObj,_a1b,_a1c,_a1d,_a1e,_a1f,_a20);
},shouldHide:function(evt){
var o=evt.target;
var _a23=(o.id==this.inputId+"_todayLink")?true:false;
while(o){
var _a24=(o.getAttribute)?o.getAttribute("datePickerId"):null;
if(this.inputId==_a24){
_a23=true;
break;
}else{
if(o.id!==undefined){
if(o.id==("modal_"+this.popupId)||o.id==this.pickerIconId||o.id==this.inputId){
_a23=true;
break;
}
}
}
o=o.parentNode;
}
if(!_a23){
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 _a25=this;
var func=function(){
_a25.showPopup();
};
window.setTimeout(func,50);
}else{
if(this.popupObj===null){
var _a27=overlayStack.getById(this.popupId);
if(_a27===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=_a27;
}
this.overlay.setTitle(this._label);
this.popupObj=$("#modal_"+this.popupId).addClass("datePickerOverlay")[0];
this.overlay.show();
}else{
this.overlay.show();
}
}
},updateDateInput:function(evt,year,_a2c,day){
this.inputObj.value=this.getDateString(year,_a2c,day);
if(typeof this.inputObj.onchange=="function"){
this.inputObj.onchange();
}
$(this.inputObj).triggerHandler("change");
this.hide();
},getDateString:function(year,_a2f,day){
var date=new Date();
date.setFullYear(year,_a2f-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 _a33=this.displayMonth-1;
var year=this.displayYear;
if(_a33<1){
_a33=12;
year--;
}
this.refreshCalendar(year,_a33);
},loadNextMonth:function(){
var _a35=this.displayMonth+1;
var year=this.displayYear;
if(_a35>12){
_a35=1;
year++;
}
this.refreshCalendar(year,_a35);
},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 _a39=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 _a3b=date.getDay();
this.displayDateOffset=(_a3b>=_9f3)?_a3b-_9f3:7-_9f3+_a3b;
},refreshMenu:function(){
if(this.menuYearSelect!==null){
if(this.menuYearSelect.options.length==0){
this.menuBuilt=false;
}else{
var _a3c=parseInt(this.menuYearSelect.options[0].value,10);
var _a3d=parseInt(this.menuYearSelect.options[this.menuYearSelect.options.length-1].value,10);
if((this.displayYear<=_a3c)||(this.displayYear>=_a3d)){
this.menuBuilt=false;
}
}
}
if(!this.menuBuilt){
var _a3e="";
var _a3f;
_a3e+="<div class=\"monthYearPicker\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" ><tr>\n";
_a3e+="<td class=\"previousArrow\"><a href=\"#\" onclick=\""+this.pickerObjId+".loadPreviousMonth(); return false;\"><span>&lt;&lt;</span></a></td>";
var _a40=this.pickerObjId+".refreshCalendar("+this.pickerObjId+".displayYear, this.options[this.selectedIndex].value-0)";
var _a41=this.pickerObjId+".refreshCalendar(this.options[this.selectedIndex].value-0, "+this.pickerObjId+".displayMonth)";
_a3e+="<td class=\"monthTD\"><select name=\"cpMonth\" id=\""+this.inputId+"_monthControl\" onkeyup=\""+_a40+"\" onchange=\""+_a40+"\" >";
for(var _a42=1;_a42<=12;_a42++){
_a3f=(_a42==this.displayMonth)?"SELECTED":"";
_a3e+="<option value=\""+_a42+"\" "+_a3f+">"+_9f7[_a42-1]+"</option>";
}
_a3e+="</select></td>";
_a3e+="<td class=\"yearTD\"><select name=\"cpYear\" id=\""+this.inputId+"_yearControl\" onkeyup=\""+_a41+"\" onchange=\""+_a41+"\" >";
for(var _a43=this.displayYear-_9f4.yearSelectOffset;_a43<=this.displayYear+_9f4.yearSelectOffset;_a43++){
_a3f=(_a43==this.displayYear)?"selected":"";
_a3e+="<option value=\""+_a43+"\" "+_a3f+">"+_a43+"</option>";
}
_a3e+="</select></td><td class=\"nextArrow\" ><a href=\"#\" onclick=\""+this.pickerObjId+".loadNextMonth(); return false;\"><span>&gt;&gt;</span></a></td></tr>\n";
_a3e+="</table></div>\n";
this.menuArea.innerHTML=_a3e;
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 _a44="";
_a44+="<div class=\"datesArea\"><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"calendar\"><thead><tr>";
var _a45=this.displayMonth;
var _a46=1;
var _a47=this.displayYear;
if(this.displayDateOffset>0){
_a45--;
if(_a45<1){
_a45=12;
_a47--;
}
_a46=(this.numDaysInMonth[_a45]-this.displayDateOffset)+1;
}
for(var j=0;j<7;j++){
_a44+="<th class=\"dayOfWeekName\" width=\"14%\">"+DAY_HEADERS[(_9f3+j)%7]+"</th>\n";
}
_a44+="</thead><tbody>";
for(var row=1;row<=6;row++){
_a44+="<tr>\n";
for(var col=1;col<=7;col++){
var _a4b=$.dr.date.getISODate(_a47,_a45,_a46);
var _a4c=this.setDateClassName(_a4b);
if((row>4)&&(col==1)&&(_a4c==_9f4.cssClassOtherMonthDate)){
_a44+="<td colspan=\"7\">&nbsp;</td>";
break;
}else{
_a44+="<td class=\""+_9f4.cssClassDate+" "+_a4c+"\"><a href=\"#\" onclick=\""+this.pickerObjId+".updateDateInput(event, "+_a47+", "+_a45+", "+_a46+"); return false;\" class=\""+_a4c+"\">"+_a46+"</a></td>\n";
}
_a46++;
if(_a46>this.numDaysInMonth[_a45]){
_a46=1;
_a45++;
}
if(_a45>12){
_a45=1;
_a47++;
}
}
_a44+="</tr>";
}
_a44+="</tbody></table></div>\n";
if(!this.currentMonthHasTodaysDate){
_a44+="<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 _a44;
},setDateClassName:function(date){
var _a4e=date.getMonth()+1;
var year=date.getFullYear();
var day=date.getDate();
var _a51="";
if(this.hasInputFieldValue&&_a4e==this.inputFieldMonth&&year==this.inputFieldYear&&day==this.inputFieldDay){
_a51=_9f4.cssClassDisplayDateClass+" ";
}
if(_a4e==this.todaysMonth&&year==this.todaysYear&&day==this.todaysDay){
this.currentMonthHasTodaysDate=true;
_a51+=_9f4.cssClassTodaysDate;
}else{
if(_a4e==this.displayMonth&&year==this.displayYear){
_a51+=_9f4.cssClassDisplayMonthDate;
}else{
_a51+=_9f4.cssClassOtherMonthDate;
}
}
return _a51;
}};
$.namespace("dr",{datePicker:function(){
return this.each(function(_a52){
if(this.type=="text"){
var _a53=$(this);
if(!_a53.hasClass("datePicker_inited")){
_a53.addClass("datePicker");
var _a54=_a53.attr("data-format");
var id="datePicker_count_"+_a52+"_rndNbr_"+new Date().getTime();
_a53.addClass(id);
var jRef="'input."+id+"'";
_a53.attr("datePickerId",id);
var _a57="jQuery("+jRef+").data('datePicker')";
var _a58=$.dr.utils.getLabel(this);
if(_a58==this.name){
_a58=null;
}
_a53.data("datePicker",new _9fb(_a57,this,_a58,_a54));
_a53.addClass("datePicker_inited");
}
}
});
}});
var _a59=function(_a5a){
_a5a.filter("input[type=text].datePicker").dr.datePicker();
};
$.dr.addPlugin("form",_a59);
$.dr.datePicker={setDefaults:function(_a5b){
if(_a5b){
_a5b=$.dr.utils.legacyMap(_a5b,_9f5);
$.extend(_9f4,_a5b);
}
}};
})(jQuery);
(function($){
var _a5d={validateHiddenFields:false,validationEnabled:true,showInlineErrors:true,showInlineErrorsOnBlur:false,inlineErrorPosition:"above",inlineErrorClass:"error",inputErrorClass:"inputError",groupBoxClass:"errorMessage",groupBoxPosition:"above",groupBoxEnabled:true,groupBoxPositionAboveForm:false,focusFirstError:true,numberLocale:$.dr.USER_LOCALE,currency:$.dr.CURRENCY,truncateOnPaste:false};
var _a5e={VALIDATION_ENABLED:"validationEnabled",VALIDATE_HIDDEN_FIELDS:"validateHiddenFields",SHOW_INLINE_ERRORS:"showInlineErrors",SHOW_INLINE_ERRORS_ONBLUR:"showInlineErrorsOnBlur",INLINE_ERROR_POSITION:"inlineErrorPosition",INLINE_ERROR_CLASS:"inlineErrorClass",INPUT_ERROR_CLASS:"inputErrorClass",GROUP_BOX_CLASS:"groupBoxClass",GROUP_BOX_POSITION:"groupBoxPosition",GROUP_BOX_ENABLED:"groupBoxEnabled",GROUP_BOX_POSITION_ABOVE_FORM:"groupBoxPositionAboveForm",FOCUS_FIRST_ERROR:"focusFirstError",NUMBER_LOCALE:"numberLocale",CURRENCY:"currency",TRUNCATE_ONPASTE:"truncateOnPaste"};
var _a5f=["data-required","data-maxlength","data-custom-validator","data-type"];
var _a60=[":visible"];
var _a61={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 _a62=function(val,_a64,msg,_a66,_a67){
_a66=(_a66)?_a66:"";
val=val||"";
_a67=(_a67)?_a67:"";
return msg.replace(/\{LABEL\}/g,_a64).replace(/\{VALUE\}/g,val).replace(/\{FORMAT\}/g,_a66).replace(/\{EXAMPLE\}/g,_a67);
};
var _a68=function(){
return $.dr.form.getValidationSelectors().join(", ");
};
var _a69={email:[_a61.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:[_a61.URL,"http://website.com",function(val,_a6c){
if(_a6c=="website"){
return /^(http:|https:)(\/){2}?[^\/]\S+\.\S+/.test(val);
}else{
return /^[a-zA-Z0-9\-.+]*:(\/){2}[\S]?/.test(val);
}
}],phonenumber:[_a61.PHONE_NUMBER,"###-###-####",function(val,_a6e){
if(!_a6e){
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(_a6e=="strict"){
return /^[1-9]\d{2}-\d{3}-\d{4}$/.test(val);
}else{
if(_a6e=="integer"){
return /^\d{10}$/.test(val);
}
}
}
}],alpha:[_a61.ALPHA,"",function(val){
return /^[a-zA-Z]+$/.test(val);
}],alphanumeric:[_a61.ALPHA_NUMERIC,"",function(val){
return /^[0-9A-Za-z-_ @#]+$/.test(val);
}],currency:[_a61.CURRENCY,"#,###.##",function(val,_a72,obj){
if(val===null||val===undefined){
return false;
}
if(!_a72){
_a72=_a5d.currency;
}
var num=val.replace(_a72,"");
if(_a72==" 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:[_a61.DECIMAL,"###,###.##",function(val,_a76,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:[_a61.INTEGER,"",function(val){
return /^[+-]?[0-9]+$/.test(val);
}],numeric:[_a61.NUMERIC,"",function(val,_a7b,obj){
if(val===null||val===undefined){
return false;
}
return !isNaN(Number($.dr.utils.normalizeNumber(val,$.dr.utils.getNumberFormat(obj))));
}]};
var _a7d={dataType:function(obj,val,_a80,_a81){
var _a82=true;
var _a83=obj.getAttribute("data-type");
var _a84=obj.getAttribute("data-example");
var _a85=obj.getAttribute("data-format");
var msg="";
var jObj=$(obj);
if(_a83!==null){
_a83=_a83.toLowerCase();
var _a88=_a69[_a83];
if(_a88===undefined){
if(window.console){
console.log("The validator for data-type=\""+_a83+"\" for field with name \""+obj.name+"\" does not exist.");
}
return true;
}
if(val.isBlank()){
$(obj.form).dr.form.removeError(obj,_a83);
}else{
var _a89=_a88[0];
var _a8a=(_a84!==null)?_a84:_a88[1];
if(!$.dr.form.isDataValidForType(_a83,val,_a85,obj)){
msg=_a89;
}else{
var min=obj.getAttribute("data-min");
var max=obj.getAttribute("data-max");
var _a8d=$.dr.form.isDataValidForType(_a83,min,_a85,obj);
var _a8e=$.dr.form.isDataValidForType(_a83,max,_a85,obj);
if(min!==null||max!==null){
if((min!==null&&!_a8d)||(max!==null&&!_a8e)){
_a82=false;
msg="The value is correct for {LABEL}, but the specified range options are not of the correct data type.";
}else{
var _a8f,upperBound,value;
if(_a83=="date"&&typeof $.dr.date=="function"){
value=new $.dr.date(val,_a85).getTime();
_a8f=(min!==null)?new $.dr.date(min,_a85).getTime():null;
upperBound=(max!==null)?new $.dr.date(max,_a85).getTime():null;
}else{
if(_a83=="time12hr"||_a83=="time24hr"){
value=$.dr.date.getDateFromTime(val).getTime();
_a8f=(min!==null)?$.dr.date.getDateFromTime(min).getTime():null;
upperBound=(max!==null)?$.dr.date.getDateFromTime(max).getTime():null;
}else{
var _a90=$.dr.utils.getNumberFormat(obj);
value=$.dr.utils.convertCurrencyToNumber(obj,val,_a85,_a90);
_a8f=$.dr.utils.convertCurrencyToNumber(obj,min,_a85,_a90);
upperBound=$.dr.utils.convertCurrencyToNumber(obj,max,_a85,_a90);
}
}
if(!isNaN(value)){
if(min!==null&&max!==null){
if(!isNaN(_a8f)&&!isNaN(upperBound)){
if(!(value>=_a8f&&value<=upperBound)){
msg=_a61.RANGE.replace(/\{MAX\}/g,max).replace(/\{MIN\}/g,min);
}
}
}else{
if(max!==null&&!isNaN(upperBound)){
if(value>upperBound){
msg=_a61.RANGE_MAX.replace(/\{MAX\}/g,max);
}
}else{
if(min!==null&&!isNaN(_a8f)){
if(value<_a8f){
msg=_a61.RANGE_MIN.replace(/\{MIN\}/g,min);
}
}
}
}
}
}
}
}
if(msg!==""&&_a81){
_a82=false;
var _a91=_a62(val,jObj.data("label"),msg,_a85,_a8a);
$(obj.form).dr.form.throwError(obj,_a83,_a91,_a80);
}else{
$(obj.form).dr.form.removeError(obj,_a83);
}
}
}
return _a82;
},required:function(obj,val,_a94,_a95){
var _a96=true;
var _a97=(obj.getAttribute("data-required")=="true")?true:false;
if(_a97){
switch(obj.type){
case "select-one":
case "text":
case "password":
case "textarea":
_a96=(val!==null)?!(val+"").isBlank():false;
break;
case "checkbox":
case "radio":
var _a98=$(obj.form[obj.name]);
_a96=(_a98.filter(":checked").length>0)?true:false;
obj=_a98[0];
if(!_a96){
var _a99=$(obj).parents("dl:first").find("dt:first label").text();
$(obj).data("label",(_a99.length>0)?_a99.replace(":",""):"A selection");
}
break;
case "select-multiple":
_a96=(val!==null)?!(val+"").isBlank():false;
break;
}
if(!_a96&&_a95){
var _a9a=_a62(val,$(obj).data("label"),_a61.REQUIRED);
$(obj.form).dr.form.throwError(obj,"required",_a9a,_a94);
}else{
$(obj.form).dr.form.removeError(obj,"required");
}
}
return _a96;
},customValidator:function(obj,val,_a9d,_a9e){
var _a9f=true;
var _aa0=obj.getAttribute("data-custom-validator");
if(_aa0){
if(_a9e){
var _aa1=(function(){
return eval(_aa0);
}).call(obj);
if(_aa1===false){
_a9f=false;
var _aa2=obj.getAttribute("data-custom-validator-message");
if(_aa2){
$(obj.form).dr.form.throwError(obj,"custom",_aa2,_a9d);
}
}
}
if(_a9f){
$(obj.form).dr.form.removeError(obj,"custom");
}
}
return _a9f;
},maxLength:function(obj,val,_aa5,_aa6){
var _aa7=true;
var jObj=$(obj);
var _aa9=jObj.attr("data-maxlength");
if(_aa9!==undefined){
if(!isNaN(_aa9)&&_aa6){
if(obj.type=="textarea"){
var _aaa=(jObj.attr("data-force-truncate")=="true")?true:false;
_aa7=$.dr.utils.validateTextAreaLength(obj,_aa9,_aaa);
}else{
var _aab=DR.Utils.FormUtils.getUTF8Bytes(val).byteCount;
_aa7=(_aab<=_aa9)?true:false;
}
}
if(!_aa7){
var _aac=_a61.CHAR_LENGTH.replace(/\{LABEL\}/g,$(obj).data("label")).replace(/\{MAX_CHARS\}/g,_aa9);
$(obj.form).dr.form.throwError(obj,"maxlength",_aac,_aa5);
}else{
$(obj.form).dr.form.removeError(obj,"maxlength");
}
}
return _aa7;
}};
$.dr.form.isDataValidForType=function(_aad,val,_aaf,obj){
var _ab1=_a69[_aad.toLowerCase()];
if(_aad===undefined){
return undefined;
}else{
return _ab1[2].call(this,val,_aaf,obj);
}
};
$.dr.form.addValidators=function(_ab2,_ab3){
if(typeof _ab2=="object"){
_a5f.push(_ab3);
$.extend(_a7d,_ab2);
}
};
$.dr.form.addValidationSelector=function(c){
_a60.push(c);
};
$.dr.form.getValidationSelectors=function(){
return _a60;
};
$.dr.form.addDataTypeValidator=function(_ab5){
if(typeof _ab5=="object"){
$.extend(_a69,_ab5);
}
};
$.dr.form.validateField=function(obj,_ab7){
try{
var jObj=$(obj);
var _ab9=($(obj.form).dr.form.isValidationEnabled())&&(jObj.data("validationEnabled")!==false);
var val=jObj.val();
var _abb=jObj.data("label");
if(!_abb){
_abb=$.dr.utils.getLabel(obj);
jObj.data("label",_abb);
}
var _abc=true;
var _abd=true;
var _abe=jObj.attr("data-conditional-validation");
if(_abe){
var _abf=(function(){
return eval(_abe);
}).call(obj);
if(_abf===false){
_abd=false;
$(obj.form).dr.form.removeErrors(obj);
}
}
if(_abd){
for(var _ac0 in _a7d){
var _ac1=_a7d[_ac0].call(this,obj,val,_ab7,_ab9);
if(!_ac1){
_abc=false;
}
}
}
$(document).trigger("dr-afterValidateField");
return _abc;
}
catch(e){
$.dr.utils.logError("Javascript exception when validating field (id="+obj.id+")",e);
}
};
var _ac2=($.browser.msie)?"paste":"input";
var _ac3=/button/i;
var _ac4=function(_ac5){
for(var i in _a5f){
if(_ac5.getAttribute(_a5f[i])){
return true;
}
}
return false;
};
var _ac7=function(_ac8){
return (_ac8==="focusout")||(_ac8==="change");
};
var _ac9=function(_aca){
if(_aca.length>0){
var _acb=$(this.formObj).data("formValidator");
if(_acb){
$(this.formObj).bind("click focusout change keyup "+_ac2,function(e){
var _acd=false;
var _ace=e.type;
var _acf=e.target;
var _ad0=$(_acf);
if(_ad0.is(":input:not(:button)")&&_ac4(_acf)){
if(_ace==="click"){
if(_ad0.is("input:radio,input:checkbox")){
_acd=true;
}
}else{
if($.browser.mozilla&&_ad0.is("input:file")&&_ac7(_ace)){
_acd=true;
}else{
if(_ad0.is("input:text,input:password,select,textarea")&&(_ac7(_ace)||_acf.getAttribute("data-maxlength"))){
_acd=true;
}
}
}
}
if(_acd){
$.dr.form.validateField(_acf,true);
}
});
var _ad1=(new Date()).getTime();
var _ad2=_aca.filter(function(_ad3){
if(_ac3.test(this.type)||_ac3.test(this.nodeName)||!_ac4(this)){
return false;
}else{
if(!this.getAttribute("id")){
this.setAttribute("id","rndID_"+_ad1+"_"+_ad3);
}
return true;
}
});
if(_ad2.length>0){
_acb.fieldsWithValidation=_ad2;
}
}
}
};
$.dr.addPlugin("form",_ac9);
var _ad4=function(_ad5,_ad6){
_ad6=$.dr.utils.legacyMap(_ad6,_a5e);
this.formObj=_ad5;
this.options=_ad6;
this.init();
};
_ad4.prototype={init:function(){
this.validationErrors=[];
this.fieldsWithValidation=null;
this.errorGroupBoxOpen=false;
this.validationErrors=[];
},validate:function(){
try{
var _ad7=this.fieldsWithValidation;
if(_ad7===null){
return true;
}
var _ad8=this;
if(!this.options.validationEnabled&&this.validationErrors.length>0){
_ad7.each(function(){
_ad8.removeErrors(this);
});
return true;
}
if(!this.options.validateHiddenFields){
if(this.validationErrors.length>0){
_ad7.filter(":hidden").each(function(){
_ad8.removeErrors(this);
});
}
_ad7=_ad7.filter(_a68());
}
_ad7.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 _ada;
if(this.options.groupBoxPositionAboveForm){
_ada=document.getElementById(this.formObj._formName+"_groupErrorBox");
}else{
_ada=document.getElementById("contentArea_groupErrorBox");
}
if(!_ada){
this.options.groupBoxPositionAboveForm=true;
var _adb=this.formObj.parentNode;
var d=document.createElement("div");
d.className=this.options.groupBoxClass;
d.id=this.formObj._formName+"_groupErrorBox";
if(this.options.groupBoxPosition=="above"){
var f=this.formObj;
_adb.insertBefore(d,f);
}else{
d.style.marginTop="15px";
_adb.appendChild(d,this);
}
_ada=d;
}
var s="<div style=\"margin-bottom:10px;\"><strong>"+_a61.GROUP_ERROR_BOX_TITLE+"</strong></div><ul>";
s+=h;
s+="</ul>";
_ada.innerHTML=s;
_ada.style.display="block";
this.errorGroupBoxOpen=true;
},hideErrorGroupBox:function(){
var _adf=document.getElementById("contentArea_groupErrorBox");
if(!_adf||this.options.groupBoxPositionAboveForm){
_adf=document.getElementById(this.formObj._formName+"_groupErrorBox");
}
if(_adf){
_adf.style.display="none";
this.errorGroupBoxOpen=false;
}
},hideError:function(fObj,_ae1){
var _ae2=document.getElementById(fObj.id+"_"+_ae1+"_error");
var _ae3=document.getElementById(fObj.id+"_"+_ae1+"_group_error");
var _ae4;
if(_ae2){
_ae4=_ae2.parentNode;
_ae4.removeChild(_ae2);
_ae2=null;
_ae4=null;
}
if(_ae3){
_ae4=_ae3.parentNode;
_ae4.removeChild(_ae3);
_ae3=null;
_ae4=null;
}
if(this.validationErrors.length===0){
this.hideErrorGroupBox();
}else{
if(this.errorGroupBoxOpen){
this.showValidationErrors(false);
}
}
if(this.checkErrorExists(fObj)==-1){
var _ae5=$(fObj);
_ae5.removeClass(this.options.inputErrorClass);
}
},displayInlineError:function(fObj,_ae7,_ae8,_ae9){
if((_ae9&&this.options.showInlineErrorsOnBlur)||(!_ae9)){
var _aea=document.getElementById(fObj.id+"_"+_ae7+"_error");
if(!_aea){
var _aeb=fObj.parentNode;
var a=_aeb.childNodes;
var _aed=false;
for(var i=0;i<a.length;i++){
if(a[i].className=="error"){
_aed=true;
a[i].style.display="none";
}
}
var e=document.createElement("div");
e.className=this.options.inlineErrorClass;
e.innerHTML=_ae8;
e.id=fObj.id+"_"+_ae7+"_error";
if(this.options.inlineErrorPosition=="above"){
var o=document.getElementById(fObj.id);
_aeb.insertBefore(e,o);
}else{
_aeb.appendChild(e,fObj);
}
}
}
if(!($.browser.safari&&fObj.type=="file")&&fObj.type!="radio"&&fObj.type!="checkbox"){
var _af1=$(fObj);
_af1.addClass(this.options.inputErrorClass);
}
},showValidationErrors:function(_af2){
var h="";
var a=this.validationErrors;
var _af5=false;
for(var i=0;i<a.length;i++){
var _af7=false;
var _af8=a[i].errMsg;
var fObj=a[i].obj;
var type=fObj.type;
var _afb=a[i].errType;
if(this.options.showInlineErrors){
this.displayInlineError(fObj,_afb,_af8,false);
}
if(this.options.focusFirstError){
if(DR.Utils.FormUtils.checkAllowFocus(fObj)){
if(!_af5&&_af2){
var e=document.getElementById(fObj.id+"_"+_afb+"_error");
if(e){
e.scrollIntoView();
}
fObj.focus();
_af5=true;
}
_af7=true;
}
}
var _afd=_af8;
if(_af7){
_afd="<a href=\"#\" title=\""+_a61.GROUP_ERROR_BOX_ITEM_TITLE+"\" onclick=\"document.getElementById('"+fObj.id+"_"+_afb+"_error').scrollIntoView();document.getElementById('"+fObj.id+"').focus();return false;\" >"+_af8+"</a>";
}
if(this.options.groupBoxEnabled){
h+="<li id=\""+fObj.id+"_"+_afb+"_group_error\" >"+_afd+"</li>";
}
fObj=null;
}
if(this.options.groupBoxEnabled){
this.showErrorGroupBox(h);
}
},checkErrorExists:function(fObj,_aff){
var _b00=-1;
var a=this.validationErrors;
for(var i=0;i<a.length;i++){
if(a[i].obj.id==fObj.id&&(a[i].errType==_aff||_aff===undefined)){
_b00=i;
break;
}
}
return _b00;
},throwError:function(fObj,_b04,_b05,_b06){
var _b07=this.checkErrorExists(fObj,_b04);
if(_b07==-1){
var e={};
e.errMsg=_b05;
e.errType=_b04;
e.obj=fObj;
this.validationErrors.push(e);
if(_b06){
this.displayInlineError(fObj,_b04,_b05,_b06);
}
e=null;
$(fObj).trigger("dr-field-throwError",[_b04,_b05]);
}
return _b07;
},removeError:function(fObj,_b0a){
var _b0b=this.checkErrorExists(fObj,_b0a);
if(_b0b!=-1){
this.validationErrors.splice(_b0b,1);
this.hideError(fObj,_b0a);
$(fObj).trigger("dr-field-removeError",[_b0a]);
}
},removeErrors:function(fObj){
var a=this.validationErrors;
for(var i=0;i<a.length;i++){
if(a[i].obj.id==fObj.id){
var _b0f=a[i].errType;
this.validationErrors.splice(i,1);
this.hideError(fObj,_b0f);
$(fObj).trigger("dr-field-removeError",[_b0f]);
}
}
}};
var _b10=function(evt){
var opts=$.extend(true,{},_a5d);
var _b13=$(this).data("dataOptions");
if(_b13){
$.extend(true,opts,_b13);
}
$(this).data("formValidator",new _ad4(this,opts));
};
$("form").live("dr-beforeindexfields",_b10);
function getValidatorObj(_b14){
if(_b14.length>0){
return $(_b14[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,_b18,_b19,_b1a){
getValidatorObj(this).throwError(obj,_b18,_b19,_b1a);
},removeError:function(obj,_b1c){
getValidatorObj(this).removeError(obj,_b1c);
},removeErrors:function(obj){
getValidatorObj(this).removeErrors(obj);
}});
$.namespace("dr.form.field",{enableValidation:function(flag){
flag=flag!==false;
return this.each(function(){
$(this).data("validationEnabled",flag);
$.dr.form.validateField(this,flag);
});
}});
var _b1f=function(_b20,_b21,_b22){
var _b23=(_b20.hasClass("largeHeight"))?"large":(_b20.hasClass("mediumHeight"))?"medium":"small";
var _b24=_b23;
var _b25=_b20.data("originalHeight");
if(!_b25){
var _b26=_b20.attr("data-default-height");
if(_b26!==undefined){
_b25=_b26.replace("Height","");
}else{
_b25=_b23;
}
_b20.data("originalHeight",_b25);
}
if(_b22){
_b24=(_b23=="large")?(_b25==="large")?"small":_b25:"large";
_b20.addClass(_b24+"Height").removeClass(_b23+"Height");
}
var _b27=_a61.COLLAPSE_BUTTON_TOOL_TIP,text=$.dr.strings.COLLAPSE,linkClass="collapse";
if(_b24!="large"){
_b27=_a61.EXPAND_BUTTON_TOOL_TIP;
text=$.dr.strings.EXPAND;
linkClass="expand";
}
_b21.text(text).attr({"title":_b27,"class":linkClass});
if(_b20.attr("data-persist-state")=="true"&&$.dr.userdata!==null){
var _b28=_b20.attr("data-persist-page-name");
if(_b28===undefined&&pageInfo){
_b28=pageInfo.pageName;
}
$.dr.userdata.save(_b28,_b20.id+"Height",_b24,"String");
}
};
$.dr.utils.validateTextAreaLength=function(obj,_b2a,_b2b){
if(obj){
var _b2c=(_b2b===true)?true:_a5d.truncateOnPaste;
var _b2d=(obj.getAttribute("alertOpen")=="true")?true:false;
var c=document.getElementById(obj.id+"_counter");
if(!c){
return;
}
var v=obj.value;
var _b30=v.length;
if(_b2c){
if(v.length>_b2a){
v=v.substr(0,_b2a);
}
}
var _b31=DR.Utils.FormUtils.getUTF8Bytes(v).byteCount;
var _b32;
if(_b31===0){
_b32=_a61.X_CHARACTERS_REMAINING.replace("{0}",_b2a);
}else{
var _b33=_b2a-_b31;
if(_b2c){
_b33=Math.max(_b33,0);
}
if(_b31>_b2a&&!_b2c){
_b33=_b33*(-1);
_b32=_a61.X_OVER_THE_LIMIT.replace("{0}",_b33);
_b32=_b32.replace("{1}",_b2a);
}else{
_b32=_a61.X_OF_Y_CHARACTERS_REMAINING.replace("{0}",_b33);
_b32=_b32.replace("{1}",_b2a);
}
}
c.innerHTML=_b32;
var _b34=true;
if(_b31>_b2a){
_b34=false;
}
if(_b31>=_b2a){
if(_b2c){
_b34=true;
var _b35=v.makeUT8CharsFitLength(_b31,_b2a);
if(obj.value!=_b35){
obj.value=_b35;
}
if((_b30>_b2a||_b31>_b2a)&&!_b2d){
obj.setAttribute("alertOpen","true");
var _b36=_a61.MAX_CHARS.replace(/\{LIMIT\}/g,_b2a);
alert(_b36);
}else{
obj.setAttribute("alertOpen","false");
}
}
$(obj).addClass(_a5d.inputErrorClass);
$(c.parentNode).addClass("limit");
}else{
$(obj).removeClass(_a5d.inputErrorClass);
$(c.parentNode).removeClass("limit");
obj.setAttribute("alertOpen","false");
}
return _b34;
}
};
var _b37=function(_b38){
_b38.filter("textarea:not(.wysiwyg, .basic_wysiwyg)").each(function(){
var obj=this;
var _b3a=$(this);
if(_b3a.data("textarea_inited")){
return;
}
var _b3b=false;
var _b3c=_b3a.attr("data-maxlength");
var _b3d=(_b3a.attr("data-expand-collapse")=="false")?false:true;
if($.browser.safari){
_b3d=false;
var _b3e=parseInt(document.defaultView.getComputedStyle(obj,"").getPropertyValue("width"),10);
if(_b3e>0){
obj.style.maxWidth=_b3e+"px";
}
}
if((_b3c!=="undefined"&&parseInt(_b3c,10)>0)||_b3d){
_b3b=true;
}
if(_b3b){
var _b3f=obj.className;
var gs=_b3f.match(/(gridSpan[\d]+(\s|$))/);
var _b41=(gs)?gs[0]:"gridSpan11";
var _b42=document.createElement("div");
_b42.className=_b41;
var _b43=document.createElement("div");
_b43.className="textareaInfo";
var _b44="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"width:100%;\" ><tr>";
if(_b3c!==undefined){
_b44+="<td class=\"remaining\"><span id=\""+obj.id+"_counter\" >&nbsp;</span></td>";
}
if(_b3d){
if($.browser.safari){
obj.style.maxWidth=_b3a.width()+"px";
}else{
_b44+="<td class=\"expandCollapseButton\"><a></a></td>";
}
}
_b44+="</tr></table>";
_b43.innerHTML=_b44;
$("a",_b43).click(function(){
_b1f(_b3a,$(this),true);
}).each(function(){
_b1f(_b3a,$(this),false);
});
_b42.appendChild(_b43);
var _b45=obj.parentNode;
_b45.insertBefore(_b42,obj.nextSibling);
if(_b3c!==undefined){
var _b46=(_b3a.attr("data-force-truncate")=="true")?true:false;
$.dr.utils.validateTextAreaLength(obj,_b3c,_b46);
}
_b3a.data("textarea_inited","true");
}
});
};
$.dr.addPlugin("form",_b37);
var _b47=function(){
$.extend(_a61,$.dr.form.getMessages());
};
var _b48=function(){
$.extend(_a5d,$.dr.form.getDefaults());
};
$(document).bind("dr-afterformsetmessages",_b47);
$(document).bind("dr-afterformsetdefaults",_b48);
$.dr.addDomReadyEvent(_b47,"early");
$.dr.addDomReadyEvent(_b48,"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;


