/*
 * Ricola 2.3.12 Build 547 (2009-09-04) 
 * Components: [wickola,log,jbus,ricola,columns,history,clientservices,seamlessui,apptemplate,modal,groupbox,tab,twistie,accordion,floatpane,tablegrid,table,grid,feedback,tooltip,smartselect,balloon,wizard,curtain,button,addressbook,calendar,citystate,icon,pleasewait,forms,inputhint,textarealimit,appmenu,smartmenu,command,lookup,popupwin,combobox,addremove,portal,validate]
 * http://wiki.www.uprr.com/confluence/display/rico
 *
 * jQuery 1.2.6 [xpath,custom,bgiframe,positionby,hoverintent,jquery.ui.core-1.5.3,jquery.ui.draggable-1.5.3]
 * http://jquery.com
 *
 * YUI 2.5.2 [history] BSD Licensed
 *
 * Copyright (c) 2005-2009 Union Pacific - All rights reserved
 * http://www.up.com
 */
if(!window._RIC_LOAD_TS){window._RIC_LOAD_TS=new Date()}var $={};(function(){var _jQuery=window.jQuery,_$=window.$;var jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context)};var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/,isSimple=/^.[^:#\[\.]*$/,undefined;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this}if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]){selector=jQuery.clean([match[1]],context)}else{var elem=document.getElementById(match[3]);if(elem){if(elem.id!=match[3]){return jQuery().find(selector)}return jQuery(elem)}selector=[]}}else{return jQuery(context).find(selector)}}else{if(jQuery.isFunction(selector)){return jQuery(document)[jQuery.fn.ready?"ready":"load"](selector)}}return this.setArray(jQuery.makeArray(selector))},jquery:"1.2.6",size:function(){return this.length},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num]
},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this},each:function(callback,args){return jQuery.each(this,callback,args)},index:function(elem){var ret=-1;return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this)},attr:function(name,value,type){var options=name;if(name.constructor==String){if(value===undefined){return this[0]&&jQuery[type||"attr"](this[0],name)}else{options={};options[name]=value}}return this.each(function(i){for(name in options){jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name))}})},css:function(key,value){if((key=="width"||key=="height")&&parseFloat(value)<0){value=undefined}return this.attr(key,value,"curCSS")},text:function(text){if(typeof text!="object"&&text!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text))}var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8){ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this])
}})});return ret},wrapAll:function(html){if(this[0]){jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild){elem=elem.firstChild}return elem}).append(this)}return this},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html)})},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html)})},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1){this.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1){this.insertBefore(elem,this.firstChild)}})},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling)})},end:function(){return this.prevObject||jQuery([])},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem)
});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems)},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0]}else{return this.cloneNode(true)}});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined){this[expando]=null}});if(events===true){this.find("*").andSelf().each(function(i){if(this.nodeType==3){return }var events=jQuery.data(this,"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data)}}})}return ret},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i)})||jQuery.multiFilter(selector,this))},not:function(selector){if(selector.constructor==String){if(isSimple.test(selector)){return this.pushStack(jQuery.multiFilter(selector,this,true))
}else{selector=jQuery.multiFilter(selector,this)}}var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector})},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector=="string"?jQuery(selector):jQuery.makeArray(selector))))},is:function(selector){return !!selector&&jQuery.multiFilter(selector,this).length>0},hasClass:function(selector){return this.is("."+selector)},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0){return null}for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one){return value}values.push(value)}}return values
}else{return(this[0].value||"").replace(/\r/g,"")}}return undefined}if(value.constructor==Number){value+=""}return this.each(function(){if(this.nodeType!=1){return }if(value.constructor==Array&&/radio|checkbox/.test(this.type)){this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0)}else{if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0)});if(!values.length){this.selectedIndex=-1}}else{this.value=value}}})},html:function(value){return value==undefined?(this[0]?this[0].innerHTML:null):this.empty().append(value)},replaceWith:function(value){return this.after(value).remove()},eq:function(i){return this.slice(i,i+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments))},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},andSelf:function(){return this.add(this.prevObject)
},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length){data=jQuery.data(this[0],key)}return data===undefined&&parts[1]?this.data(parts[0]):data}else{return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value)})}},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse){elems.reverse()}}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr")){obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"))}var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script")){scripts=scripts.add(elem)
}else{if(elem.nodeType==1){scripts=scripts.add(jQuery("script",elem).remove())}callback.call(obj,elem)}});scripts.each(evalScript)})}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src){jQuery.ajax({url:elem.src,async:false,dataType:"script"})}else{jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"")}if(elem.parentNode){elem.parentNode.removeChild(elem)}}function now(){return +new Date}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2}if(typeof target!="object"&&typeof target!="function"){target={}}if(length==i){target=this;--i}for(;i<length;i++){if((options=arguments[i])!=null){for(var name in options){var src=target[name],copy=options[name];if(target===copy){continue}if(deep&&copy&&typeof copy=="object"&&!copy.nodeType){target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy)}else{if(copy!==undefined){target[name]=copy
}}}}}return target};var expando="jQuery"+now(),uuid=0,windowData={},exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{};jQuery.extend({noConflict:function(deep){window.$=_$;if(deep){window.jQuery=_jQuery}return jQuery},isFunction:function(fn){return !!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/^[\s[]?function/.test(fn+"")},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie){script.text=data}else{script.appendChild(document.createTextNode(data))}head.insertBefore(script,head.firstChild);head.removeChild(script)}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase()},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;
var id=elem[expando];if(!id){id=elem[expando]=++uuid}if(name&&!jQuery.cache[id]){jQuery.cache[id]={}}if(data!==undefined){jQuery.cache[id][name]=data}return name?jQuery.cache[id][name]:id},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id]){break}if(!name){jQuery.removeData(elem)}}}else{try{delete elem[expando]}catch(e){if(elem.removeAttribute){elem.removeAttribute(expando)}}delete jQuery.cache[id]}},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length==undefined){for(name in object){if(callback.apply(object[name],args)===false){break}}}else{for(;i<length;){if(callback.apply(object[i++],args)===false){break}}}}else{if(length==undefined){for(name in object){if(callback.call(object[name],name,object[name])===false){break}}}else{for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}}return object
},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value)){value=value.call(elem,i)}return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className)){elem.className+=(elem.className?" ":"")+className}})},remove:function(elem,classNames){if(elem.nodeType==1){elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return !jQuery.className.has(classNames,className)}).join(" "):""}},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name]}callback.call(elem);for(var name in options){elem.style[name]=old[name]}},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];
function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0});val-=Math.round(padding+border)}if(jQuery(elem).is(":visible")){getWH()}else{jQuery.swap(elem,props,getWH)}return Math.max(0,val)}return jQuery.curCSS(elem,name,force)},curCSS:function(elem,name,force){var ret,style=elem.style;function color(elem){if(!jQuery.browser.safari){return false}var ret=defaultView.getComputedStyle(elem,null);return !ret||ret.getPropertyValue("color")==""}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret}if(jQuery.browser.opera&&name=="display"){var save=style.outline;style.outline="0 solid black";style.outline=save}if(name.match(/float/i)){name=styleFloat}if(!force&&style&&style[name]){ret=style[name]}else{if(defaultView.getComputedStyle){if(name.match(/float/i)){name="float"
}name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle&&!color(elem)){ret=computedStyle.getPropertyValue(name)}else{var swap=[],stack=[],a=elem,i=0;for(;a&&color(a);a=a.parentNode){stack.unshift(a)}for(;i<stack.length;i++){if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block"}}ret=name=="display"&&swap[stack.length-1]!=null?"none":(computedStyle&&computedStyle.getPropertyValue(name))||"";for(i=0;i<swap.length;i++){if(swap[i]!=null){stack[i].style.display=swap[i]}}}if(name=="opacity"&&ret==""){ret="1"}}else{if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase()});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft
}}}}return ret},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=="undefined"){context=context.ownerDocument||context[0]&&context[0].ownerDocument||document}jQuery.each(elems,function(i,elem){if(!elem){return }if(elem.constructor==Number){elem+=""}if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">"});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];
div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--){div=div.lastChild}if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j){if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length){tbody[j].parentNode.removeChild(tbody[j])}}if(/^\s/.test(elem)){div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild)}}elem=jQuery.makeArray(div.childNodes)}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select"))){return }if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options){ret.push(elem)}else{ret=jQuery.merge(ret,elem)}});return ret},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8){return undefined}var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined,msie=jQuery.browser.msie;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);
if(name=="selected"&&jQuery.browser.safari){elem.parentNode.selectedIndex}if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode){throw"type property can't be changed"}elem[name]=value}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name)){return elem.getAttributeNode(name).nodeValue}if(jQuery.nodeName(elem,"table")&&name.indexOf(":")>-1&&elem.attributes[name]===undefined){return undefined}return elem[name]}if(msie&&notxml&&name=="style"){return jQuery.attr(elem.style,"cssText",value)}if(set){elem.setAttribute(name,""+value)}var attr=msie&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr}if(msie&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+""=="NaN"?"":"alpha(opacity="+value*100+")")}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase()
});if(set){elem[name]=value}return elem[name]},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"")},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||array.split||array.setInterval||array.call){ret[0]=array}else{while(i){ret[--i]=array[i]}}}return ret},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i}}return -1},merge:function(first,second){var i=0,elem,pos=first.length;if(jQuery.browser.msie){while(elem=second[i++]){if(elem.nodeType!=8){first[pos++]=elem}}}else{while(elem=second[i++]){first[pos++]=elem}}return first},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i])}}}catch(e){ret=array}return ret},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++){if(!inv!=!callback(elems[i],i)){ret.push(elems[i])}}return ret},map:function(elems,callback){var ret=[];
for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null){ret[ret.length]=value}}return ret.concat.apply([],ret)}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan"}});jQuery.each({parent:function(elem){return elem.parentNode},parents:function(elem){return jQuery.dir(elem,"parentNode")},next:function(elem){return jQuery.nth(elem,2,"nextSibling")},prev:function(elem){return jQuery.nth(elem,2,"previousSibling")
},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string"){ret=jQuery.multiFilter(selector,ret)}return this.pushStack(jQuery.unique(ret))}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++){jQuery(args[i])[original](this)}})}});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1){this.removeAttribute(name)
}},addClass:function(classNames){jQuery.className.add(this,classNames)},removeClass:function(classNames){jQuery.className.remove(this,classNames)},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames)},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){jQuery(">*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments)}});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px")
}});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0}var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2])},"#":function(a,i,m){return a.getAttribute("id")==m[2]},":":{lt:function(a,i,m){return i<m[3]-0},gt:function(a,i,m){return i>m[3]-0},nth:function(a,i,m){return m[3]-0==i},eq:function(a,i,m){return m[3]-0==i},first:function(a,i){return i==0},last:function(a,i,m,r){return i==r.length-1},even:function(a,i){return i%2==0},odd:function(a,i){return i%2},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a},"only-child":function(a){return !jQuery.nth(a.parentNode.lastChild,2,"previousSibling")
},parent:function(a){return a.firstChild},empty:function(a){return !a.firstChild},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"},enabled:function(a){return !a.disabled},disabled:function(a){return a.disabled},checked:function(a){return a.checked},selected:function(a){return a.selected||jQuery.attr(a,"selected")},text:function(a){return"text"==a.type},radio:function(a){return"radio"==a.type},checkbox:function(a){return"checkbox"==a.type},file:function(a){return"file"==a.type},password:function(a){return"password"==a.type},submit:function(a){return"submit"==a.type},image:function(a){return"image"==a.type},reset:function(a){return"reset"==a.type},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button")
},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},has:function(a,i,m){return jQuery.find(m[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem}).length}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r)}return cur},find:function(t,context){if(typeof t!="string"){return[t]}if(context&&context.nodeType!=1&&context.nodeType!=9){return[]}context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false,re=quickChild,m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++){for(var c=ret[i].firstChild;c;c=c.nextSibling){if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName)){r.push(c)
}}}ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0){continue}foundToken=true}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling){if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id]){break}if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~"){merge[id]=true}r.push(n)}if(m=="+"){break}}}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0]){ret.shift()}done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length)}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]]}else{re2=quickClass;m=re2.exec(t)}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2]){oid=jQuery('[@id="'+m[2]+'"]',elem)[0]
}ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[]}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object"){tag="param"}r=jQuery.merge(r,ret[i].getElementsByTagName(tag))}if(m[1]=="."){r=jQuery.classFilter(r,m[2])}if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++){if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break}}r=tmp}ret=r}t=t.replace(re2,"")}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t)}}if(t){ret=[]}if(ret&&context==ret[0]){ret.shift()}done=jQuery.merge(done,ret);return done},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass){tmp.push(r[i])}}return tmp},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break}}if(!m){break}if(m[1]==":"&&m[2]=="not"){r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3])
}else{if(m[1]=="."){r=jQuery.classFilter(r,m[2],not)}else{if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2])){z=jQuery.attr(a,m[2])||""}if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not){tmp.push(a)}}r=tmp}else{if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling){if(n.nodeType==1){n.nodeIndex=c++}}merge[id]=true}var add=false;if(first==0){if(node.nodeIndex==last){add=true}}else{if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0){add=true
}}if(add^not){tmp.push(node)}}r=tmp}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object"){fn=fn[m[2]]}if(typeof fn=="string"){fn=eval("false||function(a,i){return "+fn+";}")}r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r)},not)}}}}}return{r:r,t:t}},dir:function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1){matched.push(cur)}cur=cur[dir]}return matched},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir]){if(cur.nodeType==1&&++num==result){break}}return cur},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem){r.push(n)}}return r}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8){return }if(jQuery.browser.msie&&elem.setInterval){elem=window}if(!handler.guid){handler.guid=this.guid++}if(data!=undefined){var fn=handler;handler=this.proxy(fn,function(){return fn.apply(this,arguments)});handler.data=data}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){if(typeof jQuery!="undefined"&&!jQuery.event.triggered){return jQuery.event.handle.apply(arguments.callee.elem,arguments)
}});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener){elem.addEventListener(type,handle,false)}else{if(elem.attachEvent){elem.attachEvent("on"+type,handle)}}}}handlers[handler.guid]=handler;jQuery.event.global[type]=true});elem=null},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8){return }var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)==".")){for(var type in events){this.remove(elem,type+(types||""))}}else{if(types.type){handler=types.handler;types=types.type}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler){delete events[type][handler.guid]}else{for(handler in events[type]){if(!parts[1]||events[type][handler].type==parts[1]){delete events[type][handler]
}}}for(ret in events[type]){break}if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener){elem.removeEventListener(type,jQuery.data(elem,"handle"),false)}else{if(elem.detachEvent){elem.detachEvent("on"+type,jQuery.data(elem,"handle"))}}}ret=null;delete events[type]}}})}for(ret in events){break}if(!ret){var handle=jQuery.data(elem,"handle");if(handle){handle.elem=null}jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle")}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true}if(!elem){if(this.global[type]){jQuery("*").add([window,document]).trigger(type,data)}}else{if(elem.nodeType==3||elem.nodeType==8){return undefined}var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event){data.unshift({type:type,target:elem,preventDefault:function(){},stopPropagation:function(){},timeStamp:now()});
data[0][expando]=true}data[0].type=type;if(exclusive){data[0].exclusive=true}var handle=jQuery.data(elem,"handle");if(handle){val=handle.apply(elem,data)}if((!fn||(jQuery.nodeName(elem,"a")&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false){val=false}if(event){data.shift()}if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined){val=ret}}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,"a")&&type=="click")){this.triggered=true;try{elem[type]()}catch(e){}}this.triggered=false}return val},handle:function(event){var val,ret,namespace,all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);namespace=event.type.split(".");event.type=namespace[0];namespace=namespace[1];all=!namespace&&!event.exclusive;handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||handler.type==namespace){event.handler=handler;event.data=handler.data;ret=handler.apply(this,arguments);
if(val!==false){val=ret}if(ret===false){event.preventDefault();event.stopPropagation()}}}return val},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target timeStamp toElement type view wheelDelta which".split(" "),fix:function(event){if(event[expando]==true){return event}var originalEvent=event;event={originalEvent:originalEvent};for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop]}event[expando]=true;event.preventDefault=function(){if(originalEvent.preventDefault){originalEvent.preventDefault()}originalEvent.returnValue=false};event.stopPropagation=function(){if(originalEvent.stopPropagation){originalEvent.stopPropagation()}originalEvent.cancelBubble=true};event.timeStamp=event.timeStamp||now();if(!event.target){event.target=event.srcElement||document
}if(event.target.nodeType==3){event.target=event.target.parentNode}if(!event.relatedTarget&&event.fromElement){event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement}if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0)}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode)){event.which=event.charCode||event.keyCode}if(!event.metaKey&&event.ctrlKey){event.metaKey=event.ctrlKey}if(!event.which&&event.button){event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)))}return event},proxy:function(fn,proxy){proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy},special:{ready:{setup:function(){bindReady();return },teardown:function(){return }},mouseenter:{setup:function(){if(jQuery.browser.msie){return false
}jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true},teardown:function(){if(jQuery.browser.msie){return false}jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true},handler:function(event){if(withinElement(event,this)){return true}event.type="mouseenter";return jQuery.event.handle.apply(this,arguments)}},mouseleave:{setup:function(){if(jQuery.browser.msie){return false}jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true},teardown:function(){if(jQuery.browser.msie){return false}jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true},handler:function(event){if(withinElement(event,this)){return true}event.type="mouseleave";return jQuery.event.handle.apply(this,arguments)}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data)})},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);
return(fn||data).apply(this,arguments)});return this.each(function(){jQuery.event.add(this,type,one,fn&&data)})},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn)})},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn)})},triggerHandler:function(type,data,fn){return this[0]&&jQuery.event.trigger(type,data,this[0],false,fn)},toggle:function(fn){var args=arguments,i=1;while(i<args.length){jQuery.event.proxy(fn,args[i++])}return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false}))},hover:function(fnOver,fnOut){return this.bind("mouseenter",fnOver).bind("mouseleave",fnOut)},ready:function(fn){bindReady();if(jQuery.isReady){fn.call(document,jQuery)}else{jQuery.readyList.push(function(){return fn.call(this,jQuery)})}return this}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;
if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document)});jQuery.readyList=null}jQuery(document).triggerHandler("ready")}}});var readyBound=false;function bindReady(){if(readyBound){return }readyBound=true;if(document.addEventListener&&!jQuery.browser.opera){document.addEventListener("DOMContentLoaded",jQuery.ready,false)}if(jQuery.browser.msie){(function(){if(jQuery.isReady){return }if(window==top){try{document.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return }jQuery.ready()}else{document.write("<script id=__ie_init defer=true src=//:><\/script>");var script=document.getElementById("__ie_init");if(script){script.onreadystatechange=function(){if(this.readyState!="complete"){return }jQuery.ready()}}script=null}})()}if(jQuery.browser.opera){document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady){return }for(var i=0;i<document.styleSheets.length;i++){if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);
return }}jQuery.ready()},false)}if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady){return }if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return }if(numStyles===undefined){numStyles=jQuery("style, link[rel=stylesheet]").length}if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return }jQuery.ready()})()}jQuery.event.add(window,"load",jQuery.ready)}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,change,select,submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name)}});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem){try{parent=parent.parentNode}catch(error){parent=elem}}return parent==elem};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind()});jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!="string"){return this._load(url)
}var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off)}callback=callback||function(){};var type="GET";if(params){if(jQuery.isFunction(params)){callback=params;params=null}else{if(typeof params=="object"){params=jQuery.param(params);type="POST"}}}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified"){self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText)}self.each(callback,[res.responseText,status,res])}});return this},serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(i,elem){var val=jQuery(this).val();
return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val}}):{name:elem.name,value:val}}).get()}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f)}});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type})},getScript:function(url,callback){return jQuery.get(url,null,callback,"script")},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={}}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type})},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings)},ajaxSettings:{url:location.href,global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));
var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!="string"){s.data=jQuery.param(s.data)}if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre)){s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?"}}else{if(!s.data||!s.data.match(jsre)){s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?"}}s.dataType="json"}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data){s.data=(s.data+"").replace(jsre,"="+jsonp+"$1")}s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp]}catch(e){}if(head){head.removeChild(script)}}}if(s.dataType=="script"&&s.cache==null){s.cache=false}if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"")}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;
s.data=null}if(s.global&&!jQuery.active++){jQuery.event.trigger("ajaxStart")}var remote=/^(?:\w+:)?\/\/([^\/?#]+)/;if(s.dataType=="script"&&type=="GET"&&remote.test(s.url)&&remote.exec(s.url)[1]!=location.host){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset){script.charset=s.scriptCharset}if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script)}}}head.appendChild(script);return undefined}var requestDone=false;var xhr=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();if(s.username){xhr.open(type,s.url,s.async,s.username,s.password)}else{xhr.open(type,s.url,s.async)}try{if(s.data){xhr.setRequestHeader("Content-Type",s.contentType)}if(s.ifModified){xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT")
}xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default)}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&jQuery.active--;xhr.abort();return false}if(s.global){jQuery.event.trigger("ajaxSend",[xhr,s])}var onreadystatechange=function(isTimeout){if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null}status=isTimeout=="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s.dataFilter)}catch(e){status="parsererror"}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified")}catch(e){}if(s.ifModified&&modRes){jQuery.lastModified[s.url]=modRes}if(!jsonp){success()}}else{jQuery.handleError(s,xhr,status)}complete();if(s.async){xhr=null}}};if(s.async){var ival=setInterval(onreadystatechange,13);
if(s.timeout>0){setTimeout(function(){if(xhr){xhr.abort();if(!requestDone){onreadystatechange("timeout")}}},s.timeout)}}try{xhr.send(s.data)}catch(e){jQuery.handleError(s,xhr,null,e)}if(!s.async){onreadystatechange()}function success(){if(s.success){s.success(data,status)}if(s.global){jQuery.event.trigger("ajaxSuccess",[xhr,s])}}function complete(){if(s.complete){s.complete(xhr,status)}if(s.global){jQuery.event.trigger("ajaxComplete",[xhr,s])}if(s.global&&!--jQuery.active){jQuery.event.trigger("ajaxStop")}}return xhr},handleError:function(s,xhr,status,e){if(s.error){s.error(xhr,status,e)}if(s.global){jQuery.event.trigger("ajaxError",[xhr,s,e])}},active:0,httpSuccess:function(xhr){try{return !xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223||jQuery.browser.safari&&xhr.status==undefined}catch(e){}return false},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url]||jQuery.browser.safari&&xhr.status==undefined
}catch(e){}return false},httpData:function(xhr,type,filter){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror"){throw"parsererror"}if(filter){data=filter(data,type)}if(type=="script"){jQuery.globalEval(data)}if(type=="json"){data=eval("("+data+")")}return data},param:function(a){var s=[];function add(key,value){s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)}if(a.constructor==Array||a.jquery){jQuery.each(a,function(){add(this.name,this.value)})}else{for(var j in a){if(a[j]&&a[j].constructor==Array){jQuery.each(a[j],function(){add(j,this)})}else{add(j,jQuery.isFunction(a[j])?a[j]():a[j])}}}return s.join("&").replace(/%20/g,"+")}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";
if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none"){this.style.display="block"}elem.remove()}}).end()},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none"}).end()},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]()})},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback)},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback)},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback)
},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback)},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback)},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback)},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1){return false}var opt=jQuery.extend({},optall),p,hidden=jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden){return opt.complete.call(this)}if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow}}if(opt.overflow!=null){this.style.overflow="hidden"}opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val)){e[val=="toggle"?hidden?"show":"hide":val](prop)}else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;
if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit}if(parts[1]){end=((parts[1]=="-="?-1:1)*end)+start}e.custom(start,end,unit)}else{e.custom(start,val,"")}}});return true})},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx"}if(!type||(typeof type=="string"&&!fn)){return queue(this[0],type)}return this.each(function(){if(fn.constructor==Array){queue(this,type,fn)}else{queue(this,type).push(fn);if(queue(this,type).length==1){fn.call(this)}}})},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue){this.queue([])}this.each(function(){for(var i=timers.length-1;i>=0;i--){if(timers[i].elem==this){if(gotoEnd){timers[i](true)}timers.splice(i,1)}}});if(!gotoEnd){this.dequeue()}return this}});var queue=function(elem,type,array){if(elem){type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array){q=jQuery.data(elem,type+"queue",jQuery.makeArray(array))
}}return q};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length){q[0].call(this)}})};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:jQuery.fx.speeds[opt.duration])||jQuery.fx.speeds.def;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false){jQuery(this).dequeue()}if(jQuery.isFunction(opt.old)){opt.old.call(this)}};return opt},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig){options.orig={}}}});jQuery.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)
}(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width"){this.elem.style.display="block"}},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null){return this.elem[this.prop]}var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd)}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++){if(!timers[i]()){timers.splice(i--,1)}}if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null}},13)}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());
if(this.prop=="width"||this.prop=="height"){this.elem.style[this.prop]="1px"}jQuery(this.elem).show()},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(gotoEnd){var t=now();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim){if(this.options.curAnim[i]!==true){done=false}}if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){this.elem.style.display="none"}if(this.options.hide||this.options.show){for(var p in this.options.curAnim){jQuery.attr(this.elem.style,p,this.options.orig[p])}}}if(done){this.options.complete.call(this.elem)}return false}else{var n=t-this.startTime;this.state=n/this.options.duration;
this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,def:400},step:{scrollLeft:function(fx){fx.elem.scrollLeft=fx.now},scrollTop:function(fx){fx.elem.scrollTop=fx.now},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now)},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit}}});jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem){with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),css=jQuery.curCSS,fixed=css(elem,"position")=="fixed";if(!(mozilla&&elem==document.body)&&elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));
add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop)}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2){border(offsetParent)}if(!fixed&&css(offsetParent,"position")=="fixed"){fixed=true}offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(css(parent,"display"))){add(-parent.scrollLeft,-parent.scrollTop)}if(mozilla&&css(parent,"overflow")!="visible"){border(parent)}parent=parent.parentNode}if((safari2&&(fixed||css(offsetChild,"position")=="absolute"))||(mozilla&&css(offsetChild,"position")!="absolute")){add(-doc.body.offsetLeft,-doc.body.offsetTop)}if(fixed){add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop))}}results={top:top,left:left}
}}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true))}function add(l,t){left+=parseInt(l,10)||0;top+=parseInt(t,10)||0}return results};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,"marginTop");offset.left-=num(this,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}}return results},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,"position")=="static")){offsetParent=offsetParent.offsetParent}return jQuery(offsetParent)}});jQuery.each(["Left","Top"],function(i,name){var method="scroll"+name;
jQuery.fn[method]=function(val){if(!this[0]){return }return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val}):this[0]==window||this[0]==document?self[i?"pageYOffset":"pageXOffset"]||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method]}});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom";jQuery.fn["inner"+name]=function(){return this[name.toLowerCase()]()+num(this,"padding"+tl)+num(this,"padding"+br)};jQuery.fn["outer"+name]=function(margin){return this["inner"+name]()+num(this,"border"+tl+"Width")+num(this,"border"+br+"Width")+(margin?num(this,"margin"+tl)+num(this,"margin"+br):0)}})})();(function(A){var B=A.find;A.find=function(C,E){C=C.replace(/^\/\//g,"");if(!C.indexOf("/")){E=E.documentElement;C=C.replace(/^\/\w*/,"");if(!C){return[E]}}C=C.replace(/\/\//g," ");C=C.replace(/\//g,">");C=C.replace(/\[([^@].*?)\]/g,function(I,H){return":has("+H+")"
});if(C.indexOf(">..")>=0){var F=C.split(/>\.\.>?/g);var G=A(F[0],E);for(var D=1;D<F.length;D++){G=G.parent(F[D])}return G.get()}return B(C,E)}})(jQuery);$.fn.getAttr=function(B,A,D,C){var E=this.attr(B)||A;if(D!==undefined){E=E.replace(D,C!==undefined?C:"")}return E};$.fn.clickLink=function(){return this.filter("a").each(function(){if(this.onclick){if(this.onclick()===false){return }}window.open(this.href,this.target||"_self")}).end()};$.fn.childText=function(){return $.makeArray(this.contents().map(function(){return this.nodeType!=1&&this.nodeType!=8?this.nodeValue:null})).join("")};$.fn.hasClass=function(A){return(this.length>0?!((["",this[0].className,""].join(" ")).indexOf(["",A,""].join(" "))==-1):false)};$.fn.zIndexRange=function(){var C=0,B=0,A,D;this.each(function(){var F=$(this).css("zIndex");var E=parseInt(F,10);if(!isNaN(E)){if(E<C){C=E;D=this}if(E>B){B=E;A=this}}});return{min:C,minEl:D,max:B,maxEl:A}};$.fn.zTop=function(B){var A=this.zIndexRange();if(B!=A.maxEl){$(B).css("z-index",A.max+1)
}};$.fn.maxZIndexParents=function(){var A=0;this.parents().each(function(){var B=parseInt($(this).css("z-index"));if(!isNaN(B)){A=Math.max(B,A)}});return A};$.fn.setZIndexTransient=function(A){return this.setZIndex(A,5)};$.fn.setZIndex=function(B,A){return this.each(function(){var D=$(B).maxZIndexParents(),C=(D||0)+50+(A||0);$(this).css("z-index",C)})};$.fn.disableTextSelection=function(){return this.each(function(){$(this).bind("mousedown",function(){document.body.focus();document.onselectstart=function(){return false};return false}).bind("mouseup",function(){document.onselectstart=function(){return true}})})};$.fn.consoleDump=function(A){if(console&&console.log){console.log("Console Dump: "+(A?"("+A+") ":""),this)}return this};$.arrayUnique=function(A){var C={},B=[];for(var E=0,D=A.length;E<D;E++){if(typeof C[A[E]]=="undefined"){C[A[E]]=true;B.push(A[E])}}return B};$.canUseSameContext=function(A,B){return window.self==A||$.canUseContext(A,B)};$.canUseContext=function(C,D){if(window.self==C){return false
}else{var F=(D||"location.href").split(".");try{for(var B=0,A=F.length;B<A;B++){if(!C[F[B]]){return false}C=C[F[B]]}return true}catch(E){return false}}};$.lowerCaseKeys=function(C){var A={};for(var B in C){if(C.hasOwnProperty(B)){A[B.toLowerCase()]=C[B]}}return A};$.getById=function(B){var A=document.getElementById(B);return $(B&&A?A:[])};$.c=function(A){return $(document.createElement(A))};$.ucword=function(A){return A.substr(0,1).toUpperCase()+A.substr(1)};$.objectsEqual=function(C,B){var A;if(!C||!B){return false}for(A in C){if(!B.hasOwnProperty(A)||!B[A]||C[A]!=B[A]){return false}}for(A in B){if(!C.hasOwnProperty(A)||!C[A]||C[A]!=B[A]){return false}}return true};$.fn.andParents=function(A){return this.add(this.parents(A))};$.fn.andSelfFind=function(A){return this.find(A).andSelf().filter(A)};$.fn.isVisibleParents=function(A){var B=true;$(this).andParents().not(A||"").each(function(){if($(this).css("visibility")=="hidden"||$(this).css("display")=="none"){B=false;return false}});return B
};$.fn.timeoutFocus=function(D,C){var E=$(this),A=0,D=D||100,C=C||500;var B=window.setInterval(function(){if(E.isVisibleParents()){E.focus(function(){E.addClass("hasFocus")});E.trigger("focus")}if(E.is(".hasFocus")||A>C){window.clearInterval(B);return }A+=D},D);return this};$.fn.cursorSelection=function(F,B){if(arguments.length==0){var E=$(this)[0];if($.browser.msie){if($.isFunction(E.createTextRange)){var C=document.selection.createRange();var D=C.duplicate();D.moveEnd("textedit",1);var A=C.duplicate();A.moveStart("textedit",-1);F=$(E).val().length-D.text.length;B=A.text.length}}else{F=E.selectionStart;B=E.selectionEnd}return{start:F,end:B,length:B-F}}else{return this.each(function(){this.focus();var G=$(this).val().length;if(F<0){F=(G+F);if(F<0){F=0}}else{if(F>G){F=G}}if(B===undefined){B=F}else{if(B<0){B=(G+B);if(B<0){B=0}}else{B+=F}}if(G>0){if($.browser.msie){if($.isFunction(this.createTextRange)){var H=this.createTextRange();H.moveStart("character",F);H.moveEnd("character",(B-G));H.select()
}}else{this.setSelectionRange(F,B)}}})}};$.fn.closest=function(A){return this.parents().andSelf().filter(A).eq(0)};(function(A){if(!(A.browser.msie&&A.browser.version=="6.0")){A.fn.bgIframe=jQuery.fn.bgiframe=function(B){return this}}else{A.fn.bgIframe=jQuery.fn.bgiframe=function(C){if(!(A.browser.msie&&A.browser.version=="6.0")){return this}C=A.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},C||{});var D=function(E){return E&&E.constructor==Number?E+"px":E},B='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+C.src+'"style="display:block;position:absolute;z-index:-1;'+(C.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(C.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":D(C.top))+";left:"+(C.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":D(C.left))+";width:"+(C.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":D(C.width))+";height:"+(C.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":D(C.height))+';"/>';
return this.each(function(){if(!A("iframe.bgiframe",this)[0]){this.insertBefore(document.createElement(B),this.firstChild)}})}}})(jQuery);(function(A){A.fn.positionByClean=function(D,C){return this.each(function(){var E=A(this).data("positionByTarget");if(E&&E.parent().length===0||(D&&D.call(E)===false)){if(C){C.call(this)}else{A(this).remove()}}})};A.fn.positionCenter=function(G,F){var G=G||1;var F=F||1;var H=A(window).width();var D=A(window).height();var C=A(window).scrollLeft();var E=A(window).scrollTop();return this.each(function(){var K=A(this);var J=Math.round((H-K.outerWidth())/2);if(J<0){J=0}else{J*=G}J+=C;var I=Math.round((D-K.outerHeight())/2);if(I<0){I=0}else{I*=F}I+=E;A(this).parents().each(function(){var L=A(this);if(L.css("position")!="static"){var M=L.offset();J+=-M.left;I+=-M.top;return false}});K.css({left:J,top:I})})};var B=function(D,F,C,E){this.x1=D;this.x2=C;this.y1=F;this.y2=E};B.prototype.contains=function(C){return(this.x1<=C.x1&&C.x2<=this.x2)&&(this.y1<=C.y1&&C.y2<=this.y2)
};B.prototype.transform=function(C,D){return new B(this.x1+C,this.y1+D,this.x2+C,this.y2+D)};A.fn.positionBy=function(I){if(this.length==0){return this}if(I.positionTo){I.positions={outsideRight:[0,1,7,6],insideLeft:[15,14,12,13],outsideBottom:[4,3]}[I.positionTo]}var I=A.extend({target:null,targetPos:null,elementPos:null,x:null,y:null,positions:null,positionTo:null,addClass:false,force:false,container:window,debug:false},I);if(I.x!=null){var F=I.x;var G=I.y;var E=0;var J=0}else{var C=A(A(I.target)[0]);var E=C.outerWidth();var J=C.outerHeight();var H=C.offset();var F=H.left;var G=H.top}var D=F+E;var K=G+J;return this.each(function(){var Y=A(this);if(C){Y.data("positionByTarget",C)}if(I.positionTo){Y.data("positionByPositionTo",I.positionTo)}if(Y.css("display")=="none"){Y.css({left:-3000,top:-3000,bottom:"",right:""});Y.show()}var Z=Y.outerWidth();var X=Y.outerHeight();var Q=[];var P=[];Q[0]=new B(D,G,D+Z,G+X);P[0]=[1,7,4];Q[1]=new B(D,K-X,D+Z,K);P[1]=[0,6,4];Q[2]=new B(D,K,D+Z,K+X);P[2]=[1,3,10];
Q[3]=new B(D-Z,K,D,K+X);P[3]=[1,6,10];Q[4]=new B(F,K,F+Z,K+X);P[4]=[1,6,9];Q[5]=new B(F-Z,K,F,K+X);P[5]=[6,4,9];Q[6]=new B(F-Z,K-X,F,K);P[6]=[7,1,4];Q[7]=new B(F-Z,G,F,G+X);P[7]=[6,0,4];Q[8]=new B(F-Z,G-X,F,G);P[8]=[7,9,4];Q[9]=new B(F,G-X,F+Z,G);P[9]=[0,7,4];Q[10]=new B(D-Z,G-X,D,G);P[10]=[0,7,3];Q[11]=new B(D,G-X,D+Z,G);P[11]=[0,10,3];Q[12]=new B(D-Z,G,D,G+X);P[12]=[13,7,10];Q[13]=new B(D-Z,K-X,D,K);P[13]=[12,6,3];Q[14]=new B(F,K-X,F+Z,K);P[14]=[15,1,4];Q[15]=new B(F,G,F+Z,G+X);P[15]=[14,0,9];if(I.positions!==null){var V=I.positions[0]}else{if(I.targetPos!=null&&I.elementPos!=null){var V=[];V[0]=[];V[0][0]=15;V[0][1]=7;V[0][2]=8;V[0][3]=9;V[1]=[];V[1][0]=0;V[1][1]=12;V[1][2]=10;V[1][3]=11;V[2]=[];V[2][0]=2;V[2][1]=3;V[2][2]=13;V[2][3]=1;V[3]=[];V[3][0]=4;V[3][1]=5;V[3][2]=6;V[3][3]=14;var V=V[I.targetPos][I.elementPos]}}var O=Q[V];var N=V;if(!I.force){$window=A(window);var W=$window.scrollLeft();var U=$window.scrollTop();var L=new B(W,U,W+$window.width(),U+$window.height());var T;if(I.positions){T=I.positions
}else{T=[V]}var S=[];while(T.length>0){var M=T.shift();if(S[M]){continue}S[M]=true;if(!L.contains(Q[M])){if(I.positions===null){T=jQuery.merge(T,P[M])}}else{O=Q[M];break}}}Y.parents().each(function(){var b=A(this);if(b.css("position")!="static"){var a=b.offset();O=O.transform(-a.left,-a.top);return false}});var R={top:O.y1,left:O.x1,right:""};if(R.left<0){R.right=E;R.left=""}Y.css(R);if(I.addClass){Y.removeClass("positionBy0 positionBy1 positionBy2 positionBy3 positionBy4 positionBy5 positionBy6 positionBy7 positionBy8 positionBy9 positionBy10 positionBy11 positionBy12 positionBy13 positionBy14 positionBy15").addClass("positionBy"+M)}})}})(jQuery);(function(A){A.fn.hoverIntent=function(I,H){var J={sensitivity:7,interval:100,timeout:0};J=A.extend(J,H?{over:I,out:H}:I);var L,K,F,D;var E=function(M){L=M.pageX;K=M.pageY};var C=function(N,M){M.hoverIntent_t=clearTimeout(M.hoverIntent_t);if((Math.abs(F-L)+Math.abs(D-K))<J.sensitivity){A(M).unbind("mousemove",E);M.hoverIntent_s=1;return J.over.apply(M,[N])
}else{F=L;D=K;M.hoverIntent_t=setTimeout(function(){C(N,M)},J.interval)}};var G=function(N,M){M.hoverIntent_t=clearTimeout(M.hoverIntent_t);M.hoverIntent_s=0;return J.out.apply(M,[N])};var B=function(P){var O=(P.type=="mouseover"?P.fromElement:P.toElement)||P.relatedTarget;while(O&&O!=this){try{O=O.parentNode}catch(P){O=this}}if(O==this){return false}var N=jQuery.extend({},P);var M=this;if(M.hoverIntent_t){M.hoverIntent_t=clearTimeout(M.hoverIntent_t)}if(P.type=="mouseover"){F=N.pageX;D=N.pageY;A(M).bind("mousemove",E);if(M.hoverIntent_s!=1){M.hoverIntent_t=setTimeout(function(){C(N,M)},J.interval)}}else{A(M).unbind("mousemove",E);if(M.hoverIntent_s==1){M.hoverIntent_t=setTimeout(function(){G(N,M)},J.timeout)}}};return this.mouseover(B).mouseout(B)}})(jQuery);(function(C){C.ui={plugin:{add:function(E,F,H){var G=C.ui[E].prototype;for(var D in H){G.plugins[D]=G.plugins[D]||[];G.plugins[D].push([F,H[D]])}},call:function(D,F,E){var H=D.plugins[F];if(!H){return }for(var G=0;G<H.length;G++){if(D.options[H[G][0]]){H[G][1].apply(D.element,E)
}}}},cssCache:{},css:function(D){if(C.ui.cssCache[D]){return C.ui.cssCache[D]}var E=C('<div class="ui-gen">').addClass(D).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");C.ui.cssCache[D]=!!((!(/auto|default/).test(E.css("cursor"))||(/^[1-9]/).test(E.css("height"))||(/^[1-9]/).test(E.css("width"))||!(/none/).test(E.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(E.css("backgroundColor"))));try{C("body").get(0).removeChild(E.get(0))}catch(F){}return C.ui.cssCache[D]},disableSelection:function(D){C(D).attr("unselectable","on").css("MozUserSelect","none")},enableSelection:function(D){C(D).attr("unselectable","off").css("MozUserSelect","")},hasScroll:function(G,E){var D=/top/.test(E||"top")?"scrollTop":"scrollLeft",F=false;if(G[D]>0){return true}G[D]=1;F=G[D]>0?true:false;G[D]=0;return F}};var B=C.fn.remove;C.fn.remove=function(){C("*",this).add(this).triggerHandler("remove");return B.apply(this,arguments)};function A(E,F,G){var D=C[E][F].getter||[];
D=(typeof D=="string"?D.split(/,?\s+/):D);return(C.inArray(G,D)!=-1)}C.widget=function(E,D){var F=E.split(".")[0];E=E.split(".")[1];C.fn[E]=function(J){var H=(typeof J=="string"),I=Array.prototype.slice.call(arguments,1);if(H&&A(F,E,J)){var G=C.data(this[0],E);return(G?G[J].apply(G,I):undefined)}return this.each(function(){var K=C.data(this,E);if(H&&K&&C.isFunction(K[J])){K[J].apply(K,I)}else{if(!H){C.data(this,E,new C[F][E](this,J))}}})};C[F][E]=function(I,H){var G=this;this.widgetName=E;this.widgetBaseClass=F+"-"+E;this.options=C.extend({},C.widget.defaults,C[F][E].defaults,H);this.element=C(I).bind("setData."+E,function(L,J,K){return G.setData(J,K)}).bind("getData."+E,function(K,J){return G.getData(J)}).bind("remove",function(){return G.destroy()});this.init()};C[F][E].prototype=C.extend({},C.widget.prototype,D)};C.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName)},getData:function(D){return this.options[D]},setData:function(D,E){this.options[D]=E;
if(D=="disabled"){this.element[E?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")}},enable:function(){this.setData("disabled",false)},disable:function(){this.setData("disabled",true)}};C.widget.defaults={disabled:false};C.ui.mouse={mouseInit:function(){var D=this;this.element.bind("mousedown."+this.widgetName,function(E){return D.mouseDown(E)});if(C.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},mouseDestroy:function(){this.element.unbind("."+this.widgetName);(C.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},mouseDown:function(F){(this._mouseStarted&&this.mouseUp(F));this._mouseDownEvent=F;var E=this,G=(F.which==1),D=(typeof this.options.cancel=="string"?C(F.target).parents().add(F.target).filter(this.options.cancel).length:false);if(!G||D||!this.mouseCapture(F)){return true}this._mouseDelayMet=!this.options.delay;if(!this._mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){E._mouseDelayMet=true
},this.options.delay)}if(this.mouseDistanceMet(F)&&this.mouseDelayMet(F)){this._mouseStarted=(this.mouseStart(F)!==false);if(!this._mouseStarted){F.preventDefault();return true}}this._mouseMoveDelegate=function(H){return E.mouseMove(H)};this._mouseUpDelegate=function(H){return E.mouseUp(H)};C(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);return false},mouseMove:function(D){if(C.browser.msie&&!D.button){return this.mouseUp(D)}if(this._mouseStarted){this.mouseDrag(D);return false}if(this.mouseDistanceMet(D)&&this.mouseDelayMet(D)){this._mouseStarted=(this.mouseStart(this._mouseDownEvent,D)!==false);(this._mouseStarted?this.mouseDrag(D):this.mouseUp(D))}return !this._mouseStarted},mouseUp:function(D){C(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this.mouseStop(D)}return false},mouseDistanceMet:function(D){return(Math.max(Math.abs(this._mouseDownEvent.pageX-D.pageX),Math.abs(this._mouseDownEvent.pageY-D.pageY))>=this.options.distance)
},mouseDelayMet:function(D){return this._mouseDelayMet},mouseStart:function(D){},mouseDrag:function(D){},mouseStop:function(D){},mouseCapture:function(D){return true}};C.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function(A){A.widget("ui.draggable",A.extend({},A.ui.mouse,{init:function(){var B=this.options;if(B.helper=="original"&&!(/(relative|absolute|fixed)/).test(this.element.css("position"))){this.element.css("position","absolute")}this.element.addClass("ui-draggable");(B.disabled&&this.element.addClass("ui-draggable-disabled"));this.mouseInit()},mouseStart:function(F){var H=this.options;if(this.helper||H.disabled||A(F.target).is(".ui-resizable-handle")){return false}var C=!this.options.handle||!A(this.options.handle,this.element).length?true:false;A(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==F.target){C=true}});if(!C){return false}if(A.ui.ddmanager){A.ui.ddmanager.current=this}this.helper=A.isFunction(H.helper)?A(H.helper.apply(this.element[0],[F])):(H.helper=="clone"?this.element.clone():this.element);
if(!this.helper.parents("body").length){this.helper.appendTo((H.appendTo=="parent"?this.element[0].parentNode:H.appendTo))}if(this.helper[0]!=this.element[0]&&!(/(fixed|absolute)/).test(this.helper.css("position"))){this.helper.css("position","absolute")}this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)};this.cssPosition=this.helper.css("position");this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:F.pageX-this.offset.left,top:F.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if(this.offsetParent[0]==document.body&&A.browser.mozilla){B={top:0,left:0}}this.offset.parent={top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};var E=this.element.position();this.offset.relative=this.cssPosition=="relative"?{top:E.top-(parseInt(this.helper.css("top"),10)||0)+this.offsetParent[0].scrollTop,left:E.left-(parseInt(this.helper.css("left"),10)||0)+this.offsetParent[0].scrollLeft}:{top:0,left:0};
this.originalPosition=this.generatePosition(F);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(H.cursorAt){if(H.cursorAt.left!=undefined){this.offset.click.left=H.cursorAt.left+this.margins.left}if(H.cursorAt.right!=undefined){this.offset.click.left=this.helperProportions.width-H.cursorAt.right+this.margins.left}if(H.cursorAt.top!=undefined){this.offset.click.top=H.cursorAt.top+this.margins.top}if(H.cursorAt.bottom!=undefined){this.offset.click.top=this.helperProportions.height-H.cursorAt.bottom+this.margins.top}}if(H.containment){if(H.containment=="parent"){H.containment=this.helper[0].parentNode}if(H.containment=="document"||H.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(H.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(A(H.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]
}if(!(/^(document|window|parent)$/).test(H.containment)){var D=A(H.containment)[0];var G=A(H.containment).offset();this.containment=[G.left+(parseInt(A(D).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,G.top+(parseInt(A(D).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,G.left+Math.max(D.scrollWidth,D.offsetWidth)-(parseInt(A(D).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),G.top+Math.max(D.scrollHeight,D.offsetHeight)-(parseInt(A(D).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}}this.propagate("start",F);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(A.ui.ddmanager&&!H.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,F)
}this.helper.addClass("ui-draggable-dragging");this.mouseDrag(F);return true},convertPositionTo:function(C,D){if(!D){D=this.position}var B=C=="absolute"?1:-1;return{top:(D.top+this.offset.relative.top*B+this.offset.parent.top*B-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)*B+(this.cssPosition=="fixed"?A(document).scrollTop():0)*B+this.margins.top*B),left:(D.left+this.offset.relative.left*B+this.offset.parent.left*B-(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)*B+(this.cssPosition=="fixed"?A(document).scrollLeft():0)*B+this.margins.left*B)}},generatePosition:function(E){var F=this.options;var B={top:(E.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollTop)-(this.cssPosition=="fixed"?A(document).scrollTop():0)),left:(E.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"||(this.cssPosition=="absolute"&&this.offsetParent[0]==document.body)?0:this.offsetParent[0].scrollLeft)-(this.cssPosition=="fixed"?A(document).scrollLeft():0))};
if(!this.originalPosition){return B}if(this.containment){if(B.left<this.containment[0]){B.left=this.containment[0]}if(B.top<this.containment[1]){B.top=this.containment[1]}if(B.left>this.containment[2]){B.left=this.containment[2]}if(B.top>this.containment[3]){B.top=this.containment[3]}}if(F.grid){var D=this.originalPosition.top+Math.round((B.top-this.originalPosition.top)/F.grid[1])*F.grid[1];B.top=this.containment?(!(D<this.containment[1]||D>this.containment[3])?D:(!(D<this.containment[1])?D-F.grid[1]:D+F.grid[1])):D;var C=this.originalPosition.left+Math.round((B.left-this.originalPosition.left)/F.grid[0])*F.grid[0];B.left=this.containment?(!(C<this.containment[0]||C>this.containment[2])?C:(!(C<this.containment[0])?C-F.grid[0]:C+F.grid[0])):C}return B},mouseDrag:function(B){this.position=this.generatePosition(B);this.positionAbs=this.convertPositionTo("absolute");this.position=this.propagate("drag",B)||this.position;if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"
}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(A.ui.ddmanager){A.ui.ddmanager.drag(this,B)}return false},mouseStop:function(C){var D=false;if(A.ui.ddmanager&&!this.options.dropBehaviour){var D=A.ui.ddmanager.drop(this,C)}if((this.options.revert=="invalid"&&!D)||(this.options.revert=="valid"&&D)||this.options.revert===true){var B=this;A(this.helper).animate(this.originalPosition,parseInt(this.options.revert,10)||500,function(){B.propagate("stop",C);B.clear()})}else{this.propagate("stop",C);this.clear()}return false},clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.options.helper!="original"&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},plugins:{},uiHash:function(B){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options}},propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.uiHash()]);if(C=="drag"){this.positionAbs=this.convertPositionTo("absolute")
}return this.element.triggerHandler(C=="drag"?C:"drag"+C,[B,this.uiHash()],this.options[C])},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable");this.mouseDestroy()}}));A.extend(A.ui.draggable,{defaults:{appendTo:"parent",axis:false,cancel:":input",delay:0,distance:1,helper:"original"}});A.ui.plugin.add("draggable","cursor",{start:function(D,C){var B=A("body");if(B.css("cursor")){C.options._cursor=B.css("cursor")}B.css("cursor",C.options.cursor)},stop:function(C,B){if(B.options._cursor){A("body").css("cursor",B.options._cursor)}}});A.ui.plugin.add("draggable","zIndex",{start:function(D,C){var B=A(C.helper);if(B.css("zIndex")){C.options._zIndex=B.css("zIndex")}B.css("zIndex",C.options.zIndex)},stop:function(C,B){if(B.options._zIndex){A(B.helper).css("zIndex",B.options._zIndex)}}});A.ui.plugin.add("draggable","opacity",{start:function(D,C){var B=A(C.helper);if(B.css("opacity")){C.options._opacity=B.css("opacity")
}B.css("opacity",C.options.opacity)},stop:function(C,B){if(B.options._opacity){A(B.helper).css("opacity",B.options._opacity)}}});A.ui.plugin.add("draggable","iframeFix",{start:function(C,B){A(B.options.iframeFix===true?"iframe":B.options.iframeFix).each(function(){A('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(A(this).offset()).appendTo("body")})},stop:function(C,B){A("div.DragDropIframeFix").each(function(){this.parentNode.removeChild(this)})}});A.ui.plugin.add("draggable","scroll",{start:function(D,C){var E=C.options;var B=A(this).data("draggable");E.scrollSensitivity=E.scrollSensitivity||20;E.scrollSpeed=E.scrollSpeed||20;B.overflowY=function(F){do{if(/auto|scroll/.test(F.css("overflow"))||(/auto|scroll/).test(F.css("overflow-y"))){return F}F=F.parent()}while(F[0].parentNode);return A(document)}(this);B.overflowX=function(F){do{if(/auto|scroll/.test(F.css("overflow"))||(/auto|scroll/).test(F.css("overflow-x"))){return F
}F=F.parent()}while(F[0].parentNode);return A(document)}(this);if(B.overflowY[0]!=document&&B.overflowY[0].tagName!="HTML"){B.overflowYOffset=B.overflowY.offset()}if(B.overflowX[0]!=document&&B.overflowX[0].tagName!="HTML"){B.overflowXOffset=B.overflowX.offset()}},drag:function(D,C){var E=C.options;var B=A(this).data("draggable");if(B.overflowY[0]!=document&&B.overflowY[0].tagName!="HTML"){if((B.overflowYOffset.top+B.overflowY[0].offsetHeight)-D.pageY<E.scrollSensitivity){B.overflowY[0].scrollTop=B.overflowY[0].scrollTop+E.scrollSpeed}if(D.pageY-B.overflowYOffset.top<E.scrollSensitivity){B.overflowY[0].scrollTop=B.overflowY[0].scrollTop-E.scrollSpeed}}else{if(D.pageY-A(document).scrollTop()<E.scrollSensitivity){A(document).scrollTop(A(document).scrollTop()-E.scrollSpeed)}if(A(window).height()-(D.pageY-A(document).scrollTop())<E.scrollSensitivity){A(document).scrollTop(A(document).scrollTop()+E.scrollSpeed)}}if(B.overflowX[0]!=document&&B.overflowX[0].tagName!="HTML"){if((B.overflowXOffset.left+B.overflowX[0].offsetWidth)-D.pageX<E.scrollSensitivity){B.overflowX[0].scrollLeft=B.overflowX[0].scrollLeft+E.scrollSpeed
}if(D.pageX-B.overflowXOffset.left<E.scrollSensitivity){B.overflowX[0].scrollLeft=B.overflowX[0].scrollLeft-E.scrollSpeed}}else{if(D.pageX-A(document).scrollLeft()<E.scrollSensitivity){A(document).scrollLeft(A(document).scrollLeft()-E.scrollSpeed)}if(A(window).width()-(D.pageX-A(document).scrollLeft())<E.scrollSensitivity){A(document).scrollLeft(A(document).scrollLeft()+E.scrollSpeed)}}}});A.ui.plugin.add("draggable","snap",{start:function(D,C){var B=A(this).data("draggable");B.snapElements=[];A(C.options.snap===true?".ui-draggable":C.options.snap).each(function(){var F=A(this);var E=F.offset();if(this!=B.element[0]){B.snapElements.push({item:this,width:F.outerWidth(),height:F.outerHeight(),top:E.top,left:E.left})}})},drag:function(J,N){var I=A(this).data("draggable");var L=N.options.snapTolerance||20;var D=N.absolutePosition.left,C=D+I.helperProportions.width,P=N.absolutePosition.top,O=P+I.helperProportions.height;for(var H=I.snapElements.length-1;H>=0;H--){var E=I.snapElements[H].left,B=E+I.snapElements[H].width,R=I.snapElements[H].top,M=R+I.snapElements[H].height;
if(!((E-L<D&&D<B+L&&R-L<P&&P<M+L)||(E-L<D&&D<B+L&&R-L<O&&O<M+L)||(E-L<C&&C<B+L&&R-L<P&&P<M+L)||(E-L<C&&C<B+L&&R-L<O&&O<M+L))){continue}if(N.options.snapMode!="inner"){var K=Math.abs(R-O)<=20;var Q=Math.abs(M-P)<=20;var G=Math.abs(E-C)<=20;var F=Math.abs(B-D)<=20;if(K){N.position.top=I.convertPositionTo("relative",{top:R-I.helperProportions.height,left:0}).top}if(Q){N.position.top=I.convertPositionTo("relative",{top:M,left:0}).top}if(G){N.position.left=I.convertPositionTo("relative",{top:0,left:E-I.helperProportions.width}).left}if(F){N.position.left=I.convertPositionTo("relative",{top:0,left:B}).left}}if(N.options.snapMode!="outer"){var K=Math.abs(R-P)<=20;var Q=Math.abs(M-O)<=20;var G=Math.abs(E-D)<=20;var F=Math.abs(B-C)<=20;if(K){N.position.top=I.convertPositionTo("relative",{top:R,left:0}).top}if(Q){N.position.top=I.convertPositionTo("relative",{top:M-I.helperProportions.height,left:0}).top}if(G){N.position.left=I.convertPositionTo("relative",{top:0,left:E}).left}if(F){N.position.left=I.convertPositionTo("relative",{top:0,left:B-I.helperProportions.width}).left
}}}}});A.ui.plugin.add("draggable","connectToSortable",{start:function(D,C){var B=A(this).data("draggable");B.sortables=[];A(C.options.connectToSortable).each(function(){if(A.data(this,"sortable")){var E=A.data(this,"sortable");B.sortables.push({instance:E,shouldRevert:E.options.revert});E.refreshItems();E.propagate("activate",D,B)}})},stop:function(D,C){var B=A(this).data("draggable");A.each(B.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;B.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance.mouseStop(D);this.instance.element.triggerHandler("sortreceive",[D,A.extend(this.instance.ui(),{sender:B.element})],this.instance.options.receive);this.instance.options.helper=this.instance.options._helper}else{this.instance.propagate("deactivate",D,B)}})},drag:function(F,E){var D=A(this).data("draggable"),B=this;var C=function(K){var H=K.left,J=H+K.width,I=K.top,G=I+K.height;return(H<(this.positionAbs.left+this.offset.click.left)&&(this.positionAbs.left+this.offset.click.left)<J&&I<(this.positionAbs.top+this.offset.click.top)&&(this.positionAbs.top+this.offset.click.top)<G)
};A.each(D.sortables,function(G){if(C.call(D,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=A(B).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return E.helper[0]};F.target=this.instance.currentItem[0];this.instance.mouseCapture(F,true);this.instance.mouseStart(F,true,true);this.instance.offset.click.top=D.offset.click.top;this.instance.offset.click.left=D.offset.click.left;this.instance.offset.parent.left-=D.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=D.offset.parent.top-this.instance.offset.parent.top;D.propagate("toSortable",F)}if(this.instance.currentItem){this.instance.mouseDrag(F)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance.mouseStop(F,true);this.instance.options.helper=this.instance.options._helper;
this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}D.propagate("fromSortable",F)}}})}});A.ui.plugin.add("draggable","stack",{start:function(D,B){var C=A.makeArray(A(B.options.stack.group)).sort(function(F,E){return(parseInt(A(F).css("zIndex"),10)||B.options.stack.min)-(parseInt(A(E).css("zIndex"),10)||B.options.stack.min)});A(C).each(function(E){this.style.zIndex=B.options.stack.min+E});this[0].style.zIndex=B.options.stack.min+C.length}})})(jQuery);if(!("console" in window)||!("firebug" in console)){var names=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];window.console={};for(var i=0;i<names.length;++i){window.console[names[i]]=function(){}}}if(typeof window.RICOLA2=="undefined"){window.RICOLA2=true;var RICOLA_STAGES={BEFORE_DOMCONTENTLOADED:0,DOMCONTENTLOADED_FIRED:1,AFTER_DOMCONTENTLOADED:2,LAST:2};var Ricola={info:{version:"2.3.12",build:"547",date:"2009-09-04",jQuery:"1.2.6",path:"/uit/ricola/2.3/",url:"/uit/ricola/2.3",environment:window._RIC_ENVIRONMENT||"",debug:window._RIC_DEBUG||false,timer:[],stage:RICOLA_STAGES.BEFORE_DOMCONTENTLOADED,isInitActive:false,hasInitError:false,twoPhaseInit:false,recordTime:function(D,C,A){var B=A||new Date();
Ricola.log.info(D+": "+((B-C)/1000))},dumpTimer:function(){for(var A=0;A<this.timer.length;A++){console.log(this.timer[A])}},addToTimer:function(A,C,B){if(!this.timer[A]){this.timer[A]=0}this.timer[A]+=((B-C)/1000)}}};(function(Ag){var U=typeof window.WICKOLA!=="undefined"?true:false;var E={TYPE_POPUP:"popup",TYPE_CONSOLE:"console",getAppender:function(A0,j){var e,A1=!("console" in window)||!("firebug" in console);if(!A0||A0==Ricola.log.TYPE_POPUP||(A0==Ricola.log.TYPE_CONSOLE&&A1)){e=new log4javascript.PopUpAppender();e.setReopenWhenClosed(true);e.setScrollToLatestMessage(true)}else{if(!A1){e=new log4javascript.BrowserConsoleAppender();e.setLayout(new log4javascript.SimpleLayout())}}return e},switchAppender:function(A0){var j=log4javascript.getLogger();j.debug("Log Disabled"+(A0?", New Type: ("+A0+")":""));j.removeAllAppenders();var e=E.getAppender(A0);e.setThreshold(log4javascript.Level.ALL);j.addAppender(e);j.debug("Logger Initialized")}};Ricola.log=(function(){var e=[];function A0(A3,A2,A1){e.push({level:A3,message:A2,error:A1})
}function j(A3){for(var A2=0,A1=e.length;A2<A1;A2++){A3[e[A2].level]("[SAVED] "+e[A2].message,e[A2].error)}}return{TYPE_POPUP:E.TYPE_POPUP,TYPE_CONSOLE:E.TYPE_CONSOLE,init:function(A1){A1=A1||"popup";Ag.getScript(Ricola.core.libUrl("log","log4javascript.js"),function(){var A2=log4javascript.getLogger();A2.setLevel(log4javascript.Level.ALL);E.switchAppender(A1);j(A2);Ricola.log=A2;Ricola.log.switchAppender=E.switchAppender;Ricola.log.init=E.switchAppender;Ricola.log.TYPE_POPUP=E.TYPE_POPUP;Ricola.log.TYPE_CONSOLE=E.TYPE_CONSOLE})},trace:function(A2,A1){A0("trace",A2,A1)},debug:function(A2,A1){A0("debug",A2,A1)},info:function(A2,A1){A0("info",A2,A1)},warn:function(A2,A1){A0("warn",A2,A1)},error:function(A2,A1){A0("error",A2,A1)},fatal:function(A2,A1){A0("fatal",A2,A1)}}})();Ag(window).load(function(){if(Ricola.core.isLocal()){Ag("head > script").each(function(){var j=Ag(this).attr("src");if(j&&j.indexOf("ricola.js")>-1){var e=Ag(this).attr("ric:log");if(e){Ricola.log.init(e)}}})}});Ricola.jbus=(function(){var e={};
return Ag.canUseContext(top,"Ricola")?top.Ricola.jbus:{getEvents:function(){return e},subscribe:function(A0,A2,j){Ricola.log.trace("jbus: subscribe "+A0+(j?" to key:"+j:""));if(e[A0]===undefined){e[A0]=[]}var A1=e[A0].length;e[A0].push([A2,j]);return A1},trigger:function(){var A3=arguments[0];var A1=[];for(var A2=1;A2<arguments.length;A2++){A1[A2-1]=arguments[A2]}if(e[A3]){for(var A2=e[A3].length-1;A2>=0;A2--){var j=e[A3][A2];if(j){var A0;try{A0=j[0].apply({id:A2,event:A3,key:j[1]},A1)}catch(A4){Ricola.log.error("jbus: trigger ERROR.  A destroyed i-frame may not have fired its unload event.",A4);A0=null}if(false===A0){return false}}}}},unsubscribe:function(A2,j){if(e[A2]){var A0=Ag.isFunction(j)?0:1;for(var A1=0;A1<e[A2].length;A1++){if(e[A2][A1]&&e[A2][A1][A0]==j){delete e[A2][A1]}}}},unsubscribeAll:function(j){Ag.each(e,function(A0,A1){Ricola.jbus.unsubscribe(A0,j)})},each:function(j){(Ag.canUseContext(top,"Ricola")?Ag(window.top).add("iframe",window.top.document):Ag(window).add("iframe")).each(function(A0){j.call(Ag(this).is("iframe")?this.contentWindow:this,A0)
})}}})();Ag(function(){Ag(window).unload(function(){Ricola.jbus.unsubscribeAll(window)})});var AH=(Ag.browser.version||"").split("."),w=/msie 7\.0/i.test(navigator.userAgent.toLowerCase());Ricola.browser={ie:Ag.browser.msie,ie6:Ag.browser.msie&&Ag.browser.version<7&&!w,ie7:Ag.browser.msie&&(Math.floor(Ag.browser.version)==7||w),ie8:Ag.browser.msie&&Ag.browser.version>=8,ff:Ag.browser.mozilla,saf:Ag.browser.safari};if(AH[0]){var Al=parseFloat(AH[0]+"."+(AH[1]||""));Ag.extend(Ricola.browser,{ff3:Ag.browser.mozilla&&Al>=1.9,ff2:Ag.browser.mozilla&&Al>=1.8&&Al<1.9})}var Ap=[];for(var q in Ricola.browser){if(Ricola.browser[q]){Ap.push("browser"+q.toUpperCase())}}if(Ricola.browser.saf||Ag.browser.opera){Ap.push("browserFF browserFF3")}if(Ricola.browser.ie6){try{document.execCommand("BackgroundImageCache",false,true)}catch(v){}}function AG(e,j){Ag(document).bind("ricolaComponentInit."+e,j)}function AI(){var j=arguments[arguments.length-1],e=arguments[arguments.length-2]||"unknown";Ag(document).bind("ricolaComponentReady."+e,j)
}Ag.fn.ricolaComponentReady=function(){var j=arguments[arguments.length-1],e=arguments[arguments.length-2]||"unknown";return this.each(function(){var A0=this;if(Ricola.info.isInitActive){Ag(document).one("ricolaComponentReady."+e,function(A2,A1,A3){j(A2,A0,A3)})}else{j(null,A0,false)}})};function AD(){var j=arguments[arguments.length-1];var e=arguments[arguments.length-2]||"unknown";Ag(document).bind("ricolaComponentEvents."+e,j)}function Au(e){Ag(window).bind("unload",e)}Ricola.pre=function(j,e){Ag(document).bind("preRicola",j)};Ricola.before=function(j,e){Ag(document).bind("beforeRicola",j)};Ricola.initialized=function(j,e){Ag(document).bind("ricolaInitialized",j)};Ricola.ready=function(e){Ag(document).bind("ricolaReady",e)};var Ax=0;Ricola.getNewId=function(){return"ricolaId_"+(Ax++)};Ag.fn.ricolaGetId=function(){var e=Ag(this).attr("id");if(!e){e=Ricola.getNewId();Ag(this).attr("id",e)}return e};function An(e,A0){Ricola.info.twoPhaseInit=true;var j=Ag.c("div").append(e);Ricola.page.showPleaseWait();
Ag(document).bind("ricolaComponentTwoPhase",function(){window.setTimeout(function(){Ricola.info.isInitActive=true;Ag(document).trigger("ricolaComponentInit",[j,false,A0]);Ag(A0).append(j);Ag(document).trigger("ricolaComponentReady",[j,false]);Ag(document).trigger("ricolaReady",[j]);Ricola.info.isInitActive=false;Ricola.page.hidePleaseWait()},10)})}Ricola.init=function(e){Ricola.log.trace("Ricola.init called on ("+e+")");return Ac(e,false)};function Ac(A3,A6){Ricola.info.isInitActive=true;var A0=null,A2=Ag(A3).eq(0).parent();try{if(A6){Ag(document).trigger("preRicola",[A3,A6]);Ag(document).unbind("preRicola")}}catch(A5){Ricola.info.hasInitError=true;Ricola.log.fatal("Ricola preRicola Error",A5)}if(!U){var A4=Ag.c("div").attr("id","__ricolaTmpWrapper__");if(typeof A3=="string"&&(A3.substring(0,1)!="#"&&A3!=="body")){A4.html(A3);A3=null}else{Ag(A3).eq(0).find("script").remove();if(Ag(A3).is("body")){A4.append(Ag(A3)[0].childNodes)}else{var A1=Ag(A3);if(!A1.length){Ricola.log.error("Ricola.init() called on an element that doesn't exist.");
return false}else{A3=A1[0]}var j=Ag.c("div").attr("id","__ricolaTmpHolder__")[0];Ag(j).insertAfter(A3);A4.append(A3);A3=j}}A4=A4[0];A0=A4}else{A4=Ag(A3)[0];A0=A4}try{if(A6){Ag(document).trigger("beforeRicola",[A4,true]);Ag(document).unbind("beforeRicola")}}catch(A5){Ricola.info.hasInitError=true;Ricola.log.fatal("Ricola beforeRicola Error",A5)}try{Ag(document).trigger("ricolaComponentInit",[A4,A6,A2.get(0)])}catch(A5){Ricola.info.hasInitError=true;Ricola.log.fatal("Ricola ricolaComponentInit Error",A5)}try{if(A6){Ag(document).trigger("ricolaInitialized",[A4,true]);Ag(document).unbind("ricolaInitialized")}}catch(A5){Ricola.info.hasInitError=true;Ricola.log.fatal("Ricola ricolaInitialized Error",A5)}if(!U){if(A3){var A1=Ag(A3);if(A1.is("body")){A1.append(A4.childNodes);A0=A3;A1.addClass("ricolaInit")}else{A0=A4.childNodes[0];Ag(A4.childNodes).insertAfter(A3);A1.add(A4).remove()}}}else{if(Ag(A3).is("body")){Ag(A3).addClass("ricolaInit")}}try{if(A6){Ag(document).trigger("ricolaComponentEvents",[A0])
}Ag(document).trigger("ricolaComponentReady",[A0,A6]);Ag(document).trigger("ricolaComponentTwoPhase",[A0,A6])}catch(A5){Ricola.info.hasInitError=true;Ricola.log.error("Ricola ricolaComponentReady Error",A5)}Ricola.info.isInitActive=false;return A4}var AM=Ricola.begin=function(A3){var A0=A3&&A3.type?A3.type:(typeof A3=="function"?"DOMContentLoaded":"(Manual call)");if(Ricola.stage>RICOLA_STAGES.BEFORE_DOMCONTENTLOADED){Ricola.log.info("Ricola.begin already initialized, cancelling. Event: "+A0);return }Ricola.log.info("Ricola.begin start: "+A0+".");Ricola.stage=RICOLA_STAGES.DOMCONTENTLOADED_FIRED;Ricola.log.info("Time waiting for non-Ricola JS/CSS: "+((new Date-window._RIC_LOAD_TS)/1000));var j="Ricola.begin:DOMContentLoaded";Ricola.util.bench.start(j);var A2=Ag("body").addClass(Ap.join(" "));var A1=Ac(A2.get(0),true);Ricola.util.bench.mark("Ricola.init finished.",j);if(!Ricola.info.twoPhaseInit){Ag(document).trigger("ricolaReady",[A1]);Ricola.util.bench.mark("Ricola.ready finished.",j)}Ricola.util.bench.end("Ricola Initialization Time.",j);
Ricola.log.info("Ricola Load Time: "+((new Date-window._RIC_LOAD_TS)/1000));Ricola.stage=RICOLA_STAGES.AFTER_DOMCONTENTLOADED;if(Ricola.info.hasInitError){Ricola.info.isInitActive=false;throw new Error("Ricola had one or more errors on initialization.  Use Ricola.log.init()")}};Ag(AM);Ag(window).bind("load",AM);var At={focus:[],mouseover:[]};function AO(A3,A0,A4){var A1=A0.indexOf(".");var A2=A0.substr(0,(A1>-1?A1:100)).toUpperCase();var j=A1>-1?A0.substr(A1+1):"";var e=(j!=""?" "+j+"Loaded ":"");var j=(j!=""?" "+j+" ":"");At[A3][At[A3].length]=[[A2,j,e],A4]}function n(e,j){AO("focus",e,j)}function Ae(e,j){AO("mouseover",e,j)}function I(A3){var A2=At[(A3.type=="beforeactivate"?"focus":A3.type)];var A4=A3.target.tagName||"";var A1=" "+(A3.target.className||"")+" ";for(var A0=0,j=A2.length;A0<j;A0++){var e=A2[A0][0];if((e[0]==""||(e[0]!=""&&A4==e[0]))&&(e[1]==""||((e[1]!=""&&A1.indexOf(e[1])>-1)&&(A1.indexOf(e[2])==-1)))){A2[A0][1].apply(A3.target,[A1,A3])}}}Ricola.core=(function(){var A1,A0=location.href,A4={localhost:"local",development:"xdev",test:"xtest",production:"prod"};
if(Ricola.info.url.match(/\/uit\/ricola\//)!==null){A1=(A0.match(/^file|localhost|(?:(?:\d{1,3}\.){3}\d{1,3})/)?A4.localhost:(A0.match(/xdev\./)?A4.development:(A0.match(/xtest\./)?A4.test:A4.production)))}else{A1=A4.localhost}function A3(){switch(A1){case A4.production:case A4.test:case A4.development:return false;default:return true}}function A8(BA){return !!BA.match(/\/secure\//)&&(BA.indexOf("https:")>-1||BA.indexOf("http:")===-1)}if(A3()){Ag("script",document).each(function(){var BA=this.src||"";if(BA.match(/\/ricola(\.src)?\.js/)!==null){if(BA.indexOf("../")>-1){Ricola.log.warn("Please include Ricola relatively from the root directory, like /uit/ricola/")}Ricola.info.url=BA;Ricola.info.path=Ricola.info.url.replace(/(ricola(\.src)?.js(.*)?)/,"");return false}})}var j=Ricola.info.path,A7=j.replace(/^https?:\/\/([^\/]+)/,""),A9=j.match(/\/\/([^\/]+)/),A6=A9?A9[1]:null,A2=null,e=(location.protocol.indexOf("file")>-1?"http:":"")+"//xdev.home.www.uprr.com";function A5(){return A6!==null&&location.host!==A6
}return{isLocal:A3,isLoadedCrossDomain:A5,getImgSpacerURL:function(){return Ricola.core.url("img/spacer.png")},url:function(BA){if(!A3()){return A7+(BA||"")}else{return(A5()?j:A7)+(BA||"")}},getHostedUrlByFullPath:function(BA){if(!A3()){return(BA||"/")}else{return e+(BA||"/")}},getHostedUrl:function(BA){if(!A3()){return Ricola.core.url(BA||"")}else{return e+A7+(BA||"")}},serviceURL:function(BA){return Ricola.core.getHostedUrl("service/"+(BA||""))},secureServiceURL:function(BA){return Ricola.core.getHostedUrl("service/secure/"+(BA||""))},libUrl:function(BA,BB){return Ricola.core.getHostedUrl("lib/"+(BB||""))},appURL:function(BB,BA){return Ricola.core.url("app/"+(BA||""))},secureAppURL:function(BB,BA){return Ricola.core.url("app/secure/"+(BA||""))},imgURL:function(BA,BB){return Ricola.core.url("img/"+BA+"-"+BB)},img:function(BA,BB){return Ricola.core.imgURL(BA,BB)},env:A4,environment:function(){return A1},isEnvironment:function(BA){return A1==BA},setEnvironment:function(BA){A1=BA},isLoginPage:function(BB,BA){if(typeof BB=="string"){return BB.indexOf("UPRR Employee Site -- Log On")>-1
}else{return BB.document.location.href.indexOf("login.fcc")>-1}},isUrlSecure:A8,isAppSecure:function(){return this.appIsSecure()},appIsSecure:function(){if(A2===null){if(A8(window.location.href)){A2=true}else{var BC=document.cookie.split(";");for(var BB=0,BA=BC.length;BB<BA;BB++){if(BC[BB].match(/^\s*SMSESSION=/)!==null){A2=true;break}}}}return A2},isInternalHost:function(BA){var BB=(BA==undefined?window.location.hostname:BA).replace(/^(xdev|xtest)\./,"");return !(BB=="www.uprr.com"||BB=="www.up.com"||BB=="c01.my.uprr.com"||BB=="c02.my.uprr.com"||BB=="suppliers.www.uprr.com")},isFooterLinkExemptHost:function(BA){return(BA||window.location.hostname||"").indexOf("upds.com")>-1}}})();Ricola.regex={number:/[^\d]/g,pixelPercent:/([^\d](?=.)|[^\d%]$)/g};Ag.fn.ricolaAppendToParentFromAnchor=function(e){var j=this[0];Ag(e).ricolaFindParent().eq(0).each(function(){Ag(this).append(j);return false});return this};Ag.fn.ricolaFindParent=function(e){var j=[".ricModalInline",".wicket-modal",".ricTabContentTab",".ricGroupboxContentWrapper",".ricRelativeWrapper","body"].join(",");
return this.parents().filter(function(){if(Ag(this).is(j)&&(!e||!Ag(this).is(e))){return true}})};Ag.fn.ricolaShow=function(){return this.parents().each(function(){var e=Ag(this);if(e.is("div.ricTwistie")){e.ricolaTwistieToggle(true)}else{if(e.is(".ricTabContentInner")){e.ricolaTabFocus()}else{if(e.is(".ricAccordionContent")){Ag(this).parent().prev("dt").ricolaAccordionTab()}else{if(e.is("div.ricFloatPane")){e.ricolaFloatPaneToggle(true)}else{if(e.is("tr.ricGridTwistie")){e.ricolaGridTwistieToggle(true)}else{if(e.is("div.ricGroupbox")){e.ricolaGroupboxToggle(true)}}}}}}}).end()};Ag.fn.ricolaIsVisible=function(){return this.isVisibleParents("div.ricAppTemplate")};Ricola.util={keys:{ENTER:13,ESC:27,TAB:9,BACKSPACE:8,DELETE:46,ARROW_LEFT:37,ARROW_UP:38,ARROW_END:39,ARROW_HOME:40,INSERT:45,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123},cleanKey:function(j){var e=j.which;if(Ricola.util.isNumpadKey(j)){e-=48}return e
},isDeleteKey:function(A0){var e=A0.which,j=Ricola.util.keys;return e==j.BACKSPACE||e==j.DELETE},isNumpadKey:function(e){return e.which>=96&&e.which<=105},isMetaKey:function(A2){var A0=A2.which;if(A2.ctrlKey||A2.altKey){return true}var A1=Ricola.util.keys;for(var e in A1){if(A0===Ricola.util.keys[e]){return true}}return false},pad:function(A4,A3){var A1=new String(A4),e=[];for(var A2=0,A0=A3-A1.length;A2<A0;A2++){e.push("0")}return e.join("")+A1},normalizeNewLine:function(e){return e.replace(/(\r\n|\n|\r)/g,"\n")},parsePixel:function(e){e=e.replace(Ricola.regex.number,"");return e+(e.length==0?"":"px")},parsePixelOrPercent:function(e){e=e.replace(Ricola.regex.pixelPercent,"");return e+(e.indexOf("%")>0||e.length==0?"":"px")},stripHTML:function(e){return e.replace(/</,"&lt;").replace(/>/,"&gt;")},convertToFullYear:function(j){if(j>99){return j}var e=(new Date).getFullYear();return((Math.floor(e/100)-((e%100)+30<j?1:0))*100)+j},noCacheUrl:function(j){var A0=+new Date;var e=j.replace(/(\?|&)_=.*?(&|$)/,"$1_="+A0+"$2");
return e+((e==j)?(j.match(/\?/)?"&":"?")+"_="+A0:"")},isReadyToSize:function(e){if(!Ag(e).ricolaIsVisible()){Ag(e).addClass("ricWaitToSize");return false}return true},bench:(function(){function A2(A7){var A4=[];for(var A6=0,A5=A7;A6<A5;A6++){A4.push("+ ")}return A4.join("")}var A3={},A0="_default",e=0,j=0.1,A1=0.5;return{start:function(A4){A4=A4||A0;var A5=new Date;A3[A4]={first:A5,last:A5,indent:e};Ricola.log.trace("[bench] "+A2(e++)+"("+A4+") start")},mark:function(A7,A5){A5=A5||A0;var A4=A3[A5];if(!A4||!A4.last){Ricola.log.error("[bench] "+A2(A4.indent)+"ricola.util.bench.mark, Call start() before mark()")}var A8=new Date,A6=(A8-A4.last)/1000;Ricola.log[A6>j?"warn":"debug"]("[bench] "+A2(A4.indent)+"("+A5+") mark: "+A6+(A7?"; "+A7:""));A4.last=A8},end:function(A7,A5){if(arguments.length==1){A5=A7;A7=null}A5=A5||A0;var A4=A3[A5];if(!A4||!A4.first){Ricola.log.error("[bench] "+A2(e)+"ricola.util.bench.mark, Call start() before end()")}var A6=(new Date-A4.first)/1000;Ricola.log[A6>A1?"warn":"info"]("[bench] "+A2(--e)+"("+A5+") end: "+A6+" total"+(A7?"; "+A7:""));
delete A4}}})()};Ag.fn.ricolaSetZIndex=function(){return this.each(function(){Ag(this).addClass("ricFullPageZIndex").css("z-index",Ricola.page.getFullPageZIndex()+1000)})};Ricola.page={getFullPageZIndex:function(){var e=Ag.makeArray(Ag(".ricFullPageZIndex, .wicket-modal").map(function(){return parseInt(Ag(this).css("z-index"),10)||0}));return e.length>0?Math.max.apply(null,e):0},body:function(e){return Ag("div.ricApplicationContent",(typeof e!=undefined?e:document))},setDocumentTitle:function(j,e){if(j||e){document.title="UP"+(j?": "+j:"")+(e?": "+e:"")}},appTitle:function(j){var e=Ag("h1.ricAppHeaderApplication");if(j!==undefined){e.html(Ricola.util.stripHTML(j));Ricola.page.setDocumentTitle(j,Ricola.page.title())}return e.html()},title:function(j){var e=Ag("h2.ricAppHeaderPage");if(j!==undefined){e.html(Ricola.util.stripHTML(j));Ricola.page.setDocumentTitle(Ricola.page.appTitle(),j);Ricola.jbus.trigger("ricolaPageTitleChange",j,window)}return e.html()},setShieldUrl:function(e){Ag("#ricHeaderShield").attr("href",e)
},setFooterHTML:function(e){Ag("#ricAppFooter .ricAppFooterCommon").html(e)},inheritParentSettings:function(e){Ricola.page.inheritPageFontSize(e);Ricola.page.inheritSkin(e)},inheritSkin:function(e){if(Ag.canUseContext(e.parent)&&e.parent!=e.self){Ag("link",e.parent.document).each(function(){var j=Ag(this).attr("href").match(/ricola-skin-[\w-]+\.css/i);if(j){Ag("head",e.document).append('<link href="'+Ricola.core.url(j[0])+'" rel="stylesheet" type="text/css" />');return false}})}},inheritPageFontSize:function(e){if(Ag.canUseContext(e.parent)&&e.parent!=e.self&&Ag("body",e.parent.document).is(".ricTextLarger")){Ag("body",e.document).addClass("ricTextLarger")}},showPleaseWait:function(j){var e=s(j);Ricola.component.curtain.create("ricolaPleaseWaitCurtain");Ag("#ricolaPleaseWait").ricolaSetZIndex().show();if(!e){Ricola.page.setPleaseWaitMessage(j)}},setPleaseWaitMessage:function(e){Ag("#ricolaPleaseWaitMessage").html(e||"Loading...")},hidePleaseWait:function(){Ag("#ricolaPleaseWait").hide();
Ricola.component.curtain.remove("ricolaPleaseWaitCurtain")}};Ricola.component={};Ricola.ready(function(){if(Ricola.browser.ie){Ag("body").bind("beforeactivate",I)}else{Ag("body")[0].addEventListener("focus",I,true)}Ag("body").bind("mouseover",I);if(Ricola.browser.ie){var e;Ag(window).bind("resize",function(){if(e){clearTimeout(e)}e=setTimeout(function(){Ag(window).trigger("ricolaResize")},100)})}else{Ag(window).bind("resize",function(){Ag(window).trigger("ricolaResize")})}if(document.compatMode!="CSS1Compat"&&!Ricola.browser.saf){Ricola.log.error("Quirks mode rendering!  Do you have HTML comments above your DOCTYPE?")}});Ag.fn.ricolaResizeContent=function(){return this.each(function(){Ag(this).find(".ricWaitToSize").trigger("ricolaWaitToSize")})};Ricola.session=Ag.canUseContext(top,"Ricola")?top.Ricola.session:(function(){var j=null;function e(){return !Ricola.core.isEnvironment("local")}return{performUserIdCheck:e,getUserId:function(A0){var A1=Ag.isFunction(A0);var A2=false;if(j===null){if(e()){A2=true;
Ag.ajax({async:A1,cache:false,dataType:"json",url:Ricola.core.serviceURL("env.inc"),global:false,success:function(A4){var A3=A4.userId.toUpperCase();A3=(A3&&A3!="(NONE)"?A3:"");if(j!=A3){j=A3;Ricola.jbus.trigger("ricolaSessionUserId",j)}if(A1){A0(j)}},error:function(){j=""},timeout:3000})}}if(A1&&!A2){A0(j)}return j}}})();var L=(function(){var e=null;return function(j){if(e===null){e=Ag.c("div").append(Ag.c("div").addClass("ricColumnL")).append(Ag.c("div").addClass("ricColumnLWrapper").append(Ag.c("div").addClass("ricColumnLContent").append(Ag.c("div").addClass("ricColumnRWrapper").append(Ag.c("div").addClass("ricColumnRContent"))).append(Ag.c("div").addClass("ricColumnR"))))}var A0=e.clone();if(j){A0.find(".ricColumnRContent").append(j)}return A0}})();var G=(function(){var j=null,e=null;return{right:function(A0){if(j===null){j=Ag.c("div").append(Ag.c("div").addClass("ricColumnRWrapper").append(Ag.c("div").addClass("ricColumnRContent"))).append(Ag.c("div").addClass("ricColumnR"))}var A1=j.clone();
if(A0){A1.find(".ricColumnLContent").append(A0)}return A1},left:function(A0){if(e==null){e=Ag.c("div").append(Ag.c("div").addClass("ricColumnL")).append(Ag.c("div").addClass("ricColumnLWrapper").append(Ag.c("div").addClass("ricColumnLContent")))}var A1=e.clone();if(A0){A1.find(".ricColumnLContent").append(A0)}return A1}}})();Ricola.history=(function(){var A8,A2,A4="",A7=50,A1="",A9=false;function e(){var BA=Ag("#ricolaHistory").get(0);return BA?BA.contentWindow.document:null}function A0(){var BA=A3();return BA.substr(BA.indexOf("#")+1)}function A3(){if(Ag.browser.safari){return top.location.hash}var BB=e();if(!BB){Ricola.log.debug("History: Could not find iframe document object.");return""}if(Ag.browser.msie){var BA=BB.getElementById("state");return BA?BA.innerText||BA.textContent:""}else{return BB.location.hash}}function A6(BC){if(!A8){throw new Error("You must call Ricola.history.init prior to using the set method.")}Ricola.log.trace('History: Attempt hash set to "'+BC+'", current: "'+A0()+'", default: "'+A1+'"');
if(BC!=A0()&&BC!=A1){Ricola.log.trace('History: Setting hash to "'+BC+'"');if(Ag.browser.safari){top.location.hash="#"+BC}else{if(Ag.browser.msie){try{var BB=e();BB.open();BB.write('<html><body><div id="state">'+BC+"</div></body></html>");BB.close()}catch(BA){Ricola.log.error("History: Error with writing iframe content.",BA);return false}}else{Ag("#ricolaHistory").attr("src",A2+"#"+BC)}}return true}else{return false}}function A5(){var BA=A0();if(BA!=A4){Ricola.log.trace('History: Hash change event, new value: "'+BA+'", old value: "'+A4+'"');A4=BA;(A8||(function(){}))(BA,A1)}}function j(){if(!A9){A9=true;window.setInterval(A5,A7)}}return{get:A0,set:A6,init:function(BB,BA){A8=BB;A1=BA||"";if(Ricola.info.stage>=2){j()}Ag(function(){if(Ag("#ricolaHistory").length===0){A2=Ricola.core.appURL("history","history.html");window.setTimeout(function(){if(!Ag.browser.safari){Ag("body").append(Ag.c("iframe").attr({id:"ricolaHistory",src:A2}))}j()},50)}})}}})();Ricola.ajax={LOGIN_ERROR:"Authentication Expired.",isSessionExpired:function(e){return e.responseText.match(/\<form id=\"L(OGIN)?FORM\"/)
}};Ricola.clientServices={cache:{circ7:{}},filterResults:function(A6,e,A5){if(A5.result==1){return A5}var A2={};for(var A0 in A5.data){var A4=A5.data[A0];var A3=false;keyloop:for(var j in e){var A8=A4[e[j]]||"****";var A7=A6[j]||"@@@@";var A1=A7.length;if(A8.substr(0,A1).toLowerCase()==A7.toLowerCase()){A2[A0]=A4;break keyloop}}}return{result:0,data:A2}},serviceRequest:function(j,A0,A1,e){Ag.ajax({cache:!!e,url:j,data:A0,dataType:"json",success:function(A2){A1(A2)},error:function(A2,A4,A3){if(Ricola.ajax.isSessionExpired(A2)){A4=Ricola.ajax.LOGIN_ERROR}A1({result:1,error:A4+(A3||"")})}})},circ7:function(BC,A0){var BF="";if(typeof (BC)=="string"||BC.search!=undefined){var A3=BC.search||BC,A7=A3.replace(/\s/g,"").toLowerCase(),A1=Ricola.validate.getValidator("circ7").validateProgressive(A7),A9=true,j=(A7.match(/^[a-z]{2}$/i)!==null),BG=(BC.occ!==undefined?BC.occ:true);if(!(A1||A9||j)){A0({result:1,error:"Bad format",data:[]});return }BC={occ:BG};if(A1){BC.circ7=A3}if(A9){BC.city=A3}if(j){BC.state=A3
}BF=A7}else{BF=BC.circ7?BC.circ7:BC.city?BC.city:BC.state}query={occ:BC.occ};var BB=0;var A4="circ7 city state".split(" ");for(var BA=0,A2=A4.length;BA<A2;BA++){if(BC[A4[BA]]!==undefined){if(BC[A4[BA]].length>=2){query[A4[BA]]=BC[A4[BA]];BB++}}}if(BB==0){A0({result:1,error:"Query parameters must be at least 2 characters in length"});return }query=Ag.extend({occ:true},query);var e=Ricola.clientServices.filterResults;var BE={circ7:"circ7",city:"city",state:"state"};var A5=this.cache.circ7;for(var A8 in A5){var BD=false;for(var A6 in BE){if(query[A6]&&A8==query[A6].replace(/\s/g,"").toLowerCase().substr(0,A8.length)){BF=A8;BD=true;break}}if(BD){break}}if(!A5[BF]){this.serviceRequest(Ricola.core.getHostedUrlByFullPath("/uit/ricola/jas/services/circ7"),query,function(BH){A5[BF]=BH;A0(e(query,BE,BH))})}else{A0(e(query,BE,A5[BF]))}},seamlessUI:{getMenu:function(A2,A9,A6){var A4={},A7=["equipmentId","chassisId","circ7","containerVanId","eotId","locomotiveId","piggybackFlatCarId","trainId","userId","yardTrack","areaType","areaInput","trainSymbol","trainDay","suiFunctionCommand"],A8;
for(var A5=0,A3=A7.length;A5<A3;A5++){var e=A7[A5],A1=e.toLowerCase();if(A2[A1]){A8=e;A4[e]=A2[A1];if(A6){delete A2[A1]}}}if(A6){for(var A3 in A2){if(A2.hasOwnProperty(A3)){A4[A3]=A2[A3]}}}var A0=Ag.param(A4);Ricola.clientServices.serviceRequest(Ricola.core.getHostedUrlByFullPath("/uit/seamlessui/secure/jas/app/loadMenu"),A0+(A2.params?(A0?"&":"")+A2.params+(A8?"&suiSmartMenu="+A8:""):""),function(j){if(j.result==0){A9(j)}else{A9(Ag.extend(j,{data:[]}))}},true)}}};AG("ricSeamlessUI",function(A0,j){if(Ag.canUseContext(parent,"Ricola")){if(Ag(window.frameElement).hasClass("ricSeamlessUI")){var A1=Ag.c("div").addClass("ricSeamlessUI");var e=Ag("div.ricAppTemplate",j);Ag("ul.ricAppMenu",j).remove();if(e.length==1){A1.append(e[0].childNodes||[]).insertBefore(e).attr("ric:title",e.attr("ric:title")).attr("ric:app",e.attr("ric:app"));e.remove()}}}Ag("iframe.ricSeamlessUI",j).each(function(){Ag(this).attr("frameBorder","0");this.frameBorder=0})});AG("appTemplate",function(A0,j,A1){if(A1){if(!U){var e=Ag("div.ricAppTemplate:eq(0)",j);
if(e.length>0){e.each(p);Ag("body").addClass("ricAppTemplate")}}var A2=750;if(Ag.browser.msie&&Ag.browser.version<7){Ag(window).bind("ricolaResize",function(){var A3=Ag(window).width(),A4=Ag("div.ricAppHeader").innerWidth();if((A3-A4<=0)&&A4<=A2){Ag("body").addClass("ricAppMinWidth")}else{if(A3-A4>0){Ag("body").removeClass("ricAppMinWidth")}}})}}});Ricola.jbus.subscribe("ricolaSessionUserId",function(e){if(Ag("#ricAppHeaderCredentials").length>0){if(e){Ag("#ricolaCurrentUser").html(e)}else{Ag("#ricolaCurrentUserLabel,#ricolaCurrentUser,#ricolaLogoutLink").remove()}}},window);if(!U){AI("appTemplate",function(j,e,A0){if(A0===true&&Ag("#ricAppHeaderCredentials").length>0){Ricola.session.getUserId()}})}function p(){var A5=Ricola.util.stripHTML(Ag(this).attr("ric:app")),A3=Ricola.util.stripHTML(Ag(this).getAttr("ric:title","")),BG=Ricola.util.stripHTML(Ag(this).getAttr("ric:shieldurl","/")),A2=Ricola.util.stripHTML(Ag(this).getAttr("ric:url","")),A9=Ag(this).getAttr("ric:pleasewait","no")=="yes";
function BL(BO,BN){return(BN?'<a href="'+BN+'">':"")+BO+(BN?"</a>":"")}Ricola.page.setDocumentTitle(A5,A3);var BE=Ricola.core.environment(),j='<span id="ricolaEnvironment">('+BE.toUpperCase()+")</span>",BJ=[];if(Ricola.core.appIsSecure()&&BE!="local"){BJ.push('<span id="ricolaCurrentUserLabel">Current User:</span> ');BJ.push('<span id="ricolaCurrentUser">...</span><br/>');if(BE!="prod"){BJ.push(j)}BJ.push('<a id="ricolaLogoutLink" href="'+Ag(this).getAttr("ric:logout","/admin/logout.cfm")+'">Logout &#187;</a>')}else{if(BE!="prod"){BJ.push(j)}}var A1=Ag(this).attr("ric:datetime"),BF=Ricola.util.pad;if(A1===undefined||!A1.match(/^[0-9]{2}\/[0-9]{2}\/[0-9]{2,4} ([0-1][0-9]|2[0-3]):?[0-5][0-9](\s[a-z]{3})?$/i)){var BH=new Date(),BA=BF(BH.getMonth()+1,2),BM=BF(BH.getDate(),2),BC=BF(BH.getHours(),2),BD=BF(BH.getMinutes(),2);A1=BA+"/"+BM+"/"+(""+BH.getFullYear())+"&nbsp;"+BC+":"+BD}var BB=[],e=Ag("> div.ricAppLogo",this),A6=e.html()||"";BB.push('<div class="ricAppHeader'+(A6?" ricAppTemplateCustomLogo":"")+'">');
BB.push('<a href="'+BG+'" id="ricHeaderShield">'+A6+"</a>");BB.push('<div id="ricAppHeaderTitle" class="ricAppHeaderTitle" title="'+A5+" - "+A3+'">');BB.push('<div id="ricAppHeaderTitleDiv">');BB.push('<div id="ricAppHeaderContainer"><div><h1 class="ricAppHeaderApplication">'+BL(A5,A2)+'</h1><h2 class="ricAppHeaderPage"> '+A3+"</h2></div></div>");BB.push('<div id="ricAppHeaderCredentials">'+BJ.join("")+"</div>");BB.push('<div id="ricolaDateTimeTop">Page Generated: '+A1+"</div>");BB.push("</div>");BB.push("</div>");BB.push('<div class="ricAppHeaderMenu"></div>');BB.push("</div>");var A4=Ag.c("div").addClass("ricApplicationContent"),A0=Ag(this.childNodes),BK=Ag.c("div").addClass("ricAppWrapperMinWidth").html(BB.join("")),BI=A0.filter("ul.ricAppMenu").remove();if(!BI.length){BI=A0.find("ul.ricAppMenu").remove()}if(A9){An(A0,A4)}else{A4.append(A0)}Ag(".ricAppHeaderMenu",BK).slice(0,1).append(BI);e.remove();BK.append(A4);Ag(this).attr("id","ricApplicationWrapper").append(BK);var A7=Ag.c("div").attr("id","ricAppFooter").addClass("ricAppFooter");
var A8=[];A8.push('<div class="ricAppFooterTop"><div class="ricAppFooterTopLink"><a href="#">Top of Page</a></div></div>');A8.push('<div class="ricAppFooterStatus"><div id="ricolaDateTime">'+A1+'</div><div id="ricAppFooterRicola">Ricola '+Ricola.info.version+"</div></div>");A8.push('<div class="ricAppFooterCommon">');A8.push(AN());A8.push("</div>");A7.html(A8.join(""));Ag(this).after(A7)}function AN(){if(Ricola.core.isFooterLinkExemptHost()){return""}else{if(Ricola.core.isInternalHost()){return['<a href="/emp/">Home</a>','<a href="/emp/search/">Search</a>','<a href="/emp/newstuff">New Stuff</a>','<a href="/emp/hr/phonebook/">UP Phonebook</a>','<a href="/emp/news/uponline/">UP Online</a>','<a href="/helpinfo.shtml">Help/Info</a>','<a href="/feedback.shtml">Feedback</a>'].join(" | ")}else{return['<a href="/uprr/index.shtml">Home</a>','<a href="/uprr/info/whats_new/">What\'s New</a>','<a href="/uprr/search/">Search</a>','<a href="/uprr/aboutup/info/">Site Info</a>','<a href="/uprr/aboutup/info/copyrght.shtml">Copyright</a>','<a href="/uprr/aboutup/info/privacy.shtml">Privacy</a>','<a href="/uprr/aboutup/info/contact/">Contact UP</a>','<a href="/uprr/info/feedback.shtml">Feedback</a>'].join(" | ")
}}return""}AI("ricModal",function(j,e){Ag(e).andSelfFind("div.ricModalTemplate").each(function(){var A0=Ag(this).attr("ric:autoload");if(!A0||A0=="yes"){Ag(window).ricolaModalLoaded()}})});AD("ricModal",function(){Ag(window).bind("ricolaResize",function(){Ag("div.ricModalFrame:visible").each(function(){Ag(this).trigger("ricolaModalPosition")})});if(Ricola.browser.ie){Ag(window).bind("beforeprint.ricModal",function(){Ag("iframe.ricModalWindow").ricolaIframeSetHeight()});Ag(window).bind("afterprint.ricModal",function(){Ag("iframe.ricModalWindow").ricolaIframeResetHeight()})}});Ag.fn.ricolaIframeSetHeight=function(){return this.filter("iframe").each(function(){var A0=Ag(this).ricolaGetId(),j=Ag(this);if(Ag.canUseContext(this.contentWindow)&&!j.attr("ric:iframeheight")){var e=Ag("body",this.contentWindow.document).outerHeight(true)+20;if(j.is(".ricModalWindow")){j=j.closest(".ricModalContent")}j.attr("ric:iframeheight",j.outerHeight(true)).addClass("ricIframeSized").height(e)}})};Ag.fn.ricolaIframeResetHeight=function(){return this.filter("iframe").each(function(){var j=Ag(this).ricolaGetId();
if(Ag.canUseContext(this.contentWindow)){var e=Ag(this);if(e.is(".ricModalWindow")){e=e.closest(".ricModalContent")}e.removeClass("ricIframeSized").height(parseInt(e.attr("ric:iframeheight"),10)).removeAttr("ric:iframeheight")}})};function AU(e){var A0=Ag.c("div").addClass("ricModalFrame").attr("id",e.id||Ricola.getNewId()).addClass("ricolaSetZIndex");var j=Ag.c("div").addClass("ricModalTitle").append(Ag.c("span").addClass("ricModalTitle").html(e.title!=""?e.title:"Modal Window"));if(e.close=="yes"||e.close=="hide"){Ag.c("div").addClass("ricModalWindowClose").addClass(e.close=="hide"?"ricModalWindowHide":"").bind("click",function(){var A1="ricolaModal"+(Ag(this).hasClass("ricModalWindowHide")?"Hide":"Close");Ag(this).parents(".ricModalFrame:eq(0)").trigger(A1)}).prependTo(j)}A0.append(L(j).addClass("ricModalColumns")).append('<div class="ricModalContent"></div>');return A0[0]}function l(e){var j=Ag.c("iframe").addClass("ricModalWindow").attr("src","javascript:false;")[0];j.frameBorder=0;
j.scrolling=e.scrolling||"no";return j}Ricola.component.modal={create:function(A5){var A2=Ag.extend({id:"",type:"inline",content:null,width:"500px",height:"300px",url:"",ontimeout:function(){},timeout:15,scrolling:"no",title:"",strip:"yes",ricolaIsDisabled:"no",onload:function(){Ag(this).ricolaModalShow()},onclose:function(){},onreturn:function(A7){},onshow:function(){},onhide:function(){},close:"yes",blocking:"yes"},A5);A2.blocking="yes";if(!(A2.type=="inline"||A2.type=="iframe")){alert("Ricola Modal Window Error: Invalid type ["+A2.type+"]");return }if(A2.type=="inline"){if(Ag(A2.content).length==0){var A1=Ag.c("div").html("Error, unable to load modal content, ID "+A2.content+" not found.");Ag("body").after(A1);A2.title="Error"}else{var A1=Ag(A2.content)[0];A2.title=Ag(A1).attr("ric:title")||A2.title;A2.width=Ag(A1).attr("ric:width")||A2.width;A2.height=Ag(A1).attr("ric:height")||A2.height}}var e=Ag(AU(A2));if(A2.blocking=="yes"){e.addClass("ricModalBlocking")}if(A2.type=="inline"){e.addClass("ricModalInline");
Ag(A1).after(e)}else{if(A2.type=="iframe"){Ricola.page.showPleaseWait("Loading...");e.addClass("ricModalIframe").bind("ricolaModalLoad",function(){var A7=Ag("> div.ricModalContent > iframe",this)[0];clearTimeout(A7.$timeout);Ag(this).unbind("ricolaModalTimeout");Ricola.page.hidePleaseWait();if(A2.title==""&&A2.ricolaIsDisabled!="yes"){try{var A9=A7.contentWindow.document.title;if(A9!=""){Ag(this).ricolaModalSetTitle(A9)}}catch(A8){}}else{if(A2.ricolaIsDisabled=="yes"){Ag(this).trigger("ricolaModalPosition")}}}).bind("ricolaModalTimeout",function(){Ricola.page.hidePleaseWait();Ag(this).trigger("ricolaModalClose")}).bind("ricolaModalTimeout",A2.ontimeout);Ag("body").append(e)}}e.bind("ricolaModalLoad",A2.onload).bind("ricolaModalShow",A2.onshow).bind("ricolaModalHide",A2.onhide).bind("ricolaModalReturn",A2.onreturn).bind("ricolaModalClose",A2.onclose);e.bind("ricolaModalShow",function(){if(Ag(this).is(".ricModalBlocking")&&Ag("#"+Ag(this).attr("id")+"_curtain").length===0){var A7=Ricola.component.curtain.create(Ag(this).attr("id")+"_curtain"),A8=this;
Ag(window).unbind("scroll.modal");Ag(window).bind("scroll.modal",function(){if(Ag(A8).height()<Ag(window).height()&&Ag(A8).width()<Ag(window).width()){Ag(A8).trigger("ricolaModalPosition")}})}Ag(this).ricolaSetZIndex();Ag(this).filter(".ricModalInline").show().find(".ricModalContentInline").ricolaResizeContent();Ag(this).trigger("ricolaModalPosition");try{Ag("> div > iframe",this).contents().add(this).find(":text,select").eq(0).timeoutFocus()}catch(BA){}var A9=Ag(this).is(".ricModalIframe")?"Iframe":"Inline";Ag("body").addClass("ric"+A9+"ModalActive"+(Ag("#ricApplicationWrapper").length?" ricModalActiveApptemplate":""));Ag(this).parents().addClass("ricModalParent")}).bind("ricolaModalHide",function(){Ag(this).css("display","none");if(Ag(this).is(".ricModalBlocking")){Ricola.component.curtain.remove(Ag(this).attr("id")+"_curtain");Ag(window).unbind("scroll.modal")}Ag("body").removeClass("ricInlineModalActive ricIframeModalActive ricModalActiveApptemplate");Ag(this).parents().removeClass("ricModalParent")
}).bind("ricolaModalClose",function(){if(Ag(this).is(".ricModalIframe")){clearTimeout(this.iframeTimer)}Ag(this).remove();if(Ag(this).is(".ricModalBlocking")){Ricola.component.curtain.remove(Ag(this).attr("id")+"_curtain");Ag(window).unbind("scroll.modal")}Ag("body").removeClass("ricInlineModalActive ricIframeModalActive ricModalActiveApptemplate");Ag(this).parents().removeClass("ricModalParent")}).bind("ricolaModalSetSize",function(A8,A9,A7,BA){Ag(this).css("width",A9).find("> div.ricModalContent").css("height",A7).end();if(!BA){Ag(this).trigger("ricolaModalPosition")}}).bind("ricolaModalPosition",function(){Ag(this).positionCenter(1,0.5)});if(A2.type=="inline"){e.find("> div.ricModalContent").append(Ag.c("div").addClass("ricModalContentInline").append(A1)).end();Ag(A1).removeClass("ricModalInline");if(A2.height!="auto"){e.addClass("ricModalScrolling")}e.ricolaModalSetSize(A2.width,A2.height);e.trigger("ricolaModalLoad")}else{if(A2.type=="iframe"){var j=l(A2);j.id=Ricola.getNewId();j.src=A2.cache===false?Ricola.util.noCacheUrl(A2.url):A2.url;
if(A2.strip=="yes"){Ag(j).addClass("ricSeamlessUI")}e.find("> div.ricModalContent").append(j);e.ricolaModalSetSize(A2.width,A2.height,true);var A4=Ricola.core.isUrlSecure(location.href),A6=Ricola.core.isUrlSecure(A2.url);if(!A4&&A6){Ag(j).bind("load",function(){if(Ag.canUseContext(this.contentWindow)){if(Ricola.core.isLoginPage(this.contentWindow)){e.trigger("ricolaModalLoad")}}else{Ricola.page.setPleaseWaitMessage("Permission denied, could not load.")}})}if(A2.ricolaIsDisabled=="yes"){e.trigger("ricolaModalLoad")}else{j.$timeout=setTimeout(function(){e.trigger("ricolaModalTimeout")},A2.timeout*1000);var A3=j.contentWindow;function A0(){e[0].iframeTimer=setTimeout(function(){if(Ag.canUseContext(A3)){if(A3.ricolaModalEvent&&A3.ricolaModalEvent.length>0){while(A3.ricolaModalEvent!=undefined&&A3.ricolaModalEvent.length>0){var A7=A3.ricolaModalEvent.shift();e.trigger(A7[0],A7[1]||[])}}A0()}else{}},350)}A0()}}}return e}};Ag.fn.ricolaModalContent=function(){if(Ag(this).is(".ricModalInline")){var e=Ag("> div.ricModalContent > div.ricModalContentInline",this)[0]
}else{if(Ag(this).is(".ricModalIframe")){var e=Ag("> div.ricModalContent > iframe",this)[0]}}return this.pushStack(e)};function AC(A1,e,j){if(Ag(A1)[0]==window){if(window.ricolaModalEvent==undefined){window.ricolaModalEvent=[]}window.ricolaModalEvent.push([e,j])}else{var A0=A1;if(!Ag(A1).is(".ricModalFrame")){A0=Ag(A1).parents("div.ricModalFrame")[0]}Ag(A0).trigger(e,j||[])}return true}Ag.fn.ricolaModalSetTitle=function(e){Ag("div.ricModalTitle > span.ricModalTitle",this).html(e);return this};Ag.fn.ricolaModalSetSize=function(j,e,A0){AC(this,"ricolaModalSetSize",arguments);return this};Ag.fn.ricolaModalLoaded=function(){AC(this,"ricolaModalLoad",arguments);return this};Ag.fn.ricolaModalShow=function(){AC(this,"ricolaModalShow",arguments);return this};Ag.fn.ricolaModalHide=function(){AC(this,"ricolaModalHide",arguments);return this};Ag.fn.ricolaModalClose=function(){AC(this,"ricolaModalClose",arguments);return this};Ag.fn.ricolaModalReturn=function(){AC(this,"ricolaModalReturn",arguments);
return this};AG("ricGroupbox",function(A0,j){var e=Ag("div.ricGroupbox",j);if(!U){e.ricolaGroupbox()}else{e.ricolaGroupboxAddEvents()}});Ag.fn.ricolaGroupbox=function(){return this.not(".ricGroupboxLoaded").each(function(){var A6=Ag(this).attr("ric:title"),e=Ag.c("div").addClass("ricGroupbox"+(!A6?" ricGroupboxNoTitle":"")).attr({id:Ag(this).attr("id")||""}).css("width",Ag(this).attr("ric:width")||"");var A1=Ag.c("div").addClass("ricGroupboxHeadWrapper").html('<div class="ricGroupboxHeadR"><div class="ricGroupboxHeadC">'+(A6?'<span class="ricGroupboxTitleL"><span class="ricGroupboxTitle"><span class="ricGroupboxTitleText">'+A6+'</span></span><span class="ricGroupboxTitleR"></span></span>':"")+"</div></div>");var A2=A1.find("span.ricGroupboxTitle"),A5=Ag(this).attr("ric:collapsible");if(A5!=undefined){A2.addClass("ricGroupboxCollapsible");e.ricolaGroupboxAddEvents(A2)}else{e.addClass("ricGroupboxLoaded")}var A4=Ag(this).attr("ric:height"),A0=Ag.c("div").addClass("ricGroupboxContent"+(A4?" ricGroupboxContentScrollable":""));
if(A4){A0.css("height",A4)}A0.append(Ag(this)[0].childNodes||[]);var j=Ag.c("div").addClass("ricGroupboxContentWrapper").append(A0);var A3=Ag.c("div").addClass("ricGroupboxFootWrapper").html('<div class="ricGroupboxFootRight"><div class="ricGroupboxBottomC"></div></div>');e.append(A1).append(j).append(A3);Ag(this).after(e);Ag(this).remove();if(A5=="collapsed"){A2.trigger("click")}})};Ag.fn.ricolaGroupboxAddEvents=function(j){var e=!!j;return this.not(".ricGroupboxLoaded").addClass("ricGroupboxLoaded").each(function(){(e?j:Ag(this).find("span.ricGroupboxTitle:eq(0)").filter(".ricGroupboxCollapsible")).bind("click",function(){Ag(this).parents(".ricGroupbox:first").ricolaGroupboxToggle()}).bind("dblclick",function(){Ag(window).focus();return false}).disableTextSelection()})};Ag.fn.ricolaGroupboxToggle=function(j,e){return this.each(function(){var A2=Ag(".ricGroupboxContent:eq(0)",this),A4=Ag(".ricGroupboxTitleText:eq(0)",this);var A3=Ag(this).filter(".ricGroupbox"),A0=j===undefined?A3.is(".ricGroupboxCollapsed"):j,A1=e===undefined?true:e;
if(A0==true){A4.removeClass("ricGroupboxTitleTextPlus");Ag(this).removeClass("ricGroupboxCollapsed");if(A1==true){Ag(this).trigger("ricolaGroupboxShow",[this])}}else{if(A0==false){A4.addClass("ricGroupboxTitleTextPlus");Ag(this).addClass("ricGroupboxCollapsed");if(A1==true){Ag(this).trigger("ricolaGroupboxHide",[this])}}}A2.ricolaResizeContent()})};Ag.fn.ricolaGroupboxTitle=function(j){var e=Ag("> div.ricGroupboxHeadWrapper span.ricGroupboxTitleText",this);if(j==undefined){return e.html()}else{e.html(j)}return this};AG("ricTab",function(j,e){if(!U){Ag("div.ricTabSet",e).ricolaTab()}else{Ag("table.ricTab",e).ricolaTabAddEvents()}});if(!U){AI("ricTab",function(j,e){Ag(e).andSelfFind("table.ricTabInitialized").removeClass("ricTabInitialized").find("> tbody > tr > td > ul.ricTab > li.ricTabActiveTab").ricolaTabFocus()})}function Z(e){return Ag.c("div").attr("id",e).addClass("ricTabContentInner").append(this.childNodes||[])}Ag.fn.ricolaTab=function(){return this.not(".ricolaTabLoaded").each(function(){var A0=["<tbody><tr><td>",'<ul class="ricTab"></ul>','<div class="ricTabSubtitle"><div class="ricTabSubtitleBar"></div></div>','<div class="ricTabBody"><div class="ricTabContent"></div>','<div class="ricTabCommon"></div></div>','<div class="ricTabFoot"><div><div><div><div></div></div></div></div></div>',"</td></tr></tbody>"].join(""),e=Ag(this).getAttr("ric:width",""),A7=Ag(this).getAttr("ric:height",""),j=Ag.c("table").addClass("ricTab ricTabInitialized").attr("ric:height",A7).html(A0),A6=Ag("td",j),A5=Ag("> div.ricTabBody > div.ricTabContent",A6);
j.attr("id",Ag(this).getAttr("id",Ricola.getNewId()));if(e){j.css("width",Ricola.util.parsePixelOrPercent(e))}else{j.addClass("ricTabWidthAuto")}if(A7){j.addClass("ricTabHeight")}else{j.addClass("ricTabHeightAuto")}var A4=Ag(this).getAttr("ric:align","center");if(A4=="left"){j.addClass("ricTabLeft")}else{if(A4=="right"){j.addClass("ricTabRight")}}var A2=Ag("> ul.ricTab",A6);var A1=Ag("div.ricTabSubtitleBar",A6);Ag("> div.ricTab",this).each(function(BB){var BE=Ag(this).getAttr("id",Ricola.getNewId()),BC=Ag.c("li").html("<span><span><span>"+Ag(this).getAttr("ric:title","")+"</span></span></span>");BC.attr("id",BE+"_tab_title");A2.append(BC);var BD=Ag.c("div").addClass("ricTabContentTab"),A8=Ag("> div.ricTab",this),A9=Ag.c("div").attr("id",BE+"_tab_subtitle");if(A8.length){var BA=Ag.c("ul").addClass("ricTabSubtabs");A8.each(function(BG){var BH=Ag(this).getAttr("id",Ricola.getNewId());var BF=Ag.c("li").html(Ag(this).getAttr("ric:title","Sub Tab")+"</li>").attr("id",BH+"_tab_subtab");if(BG===0){BF.addClass("ricTabSubtabFirst")
}if(Ag(this).getAttr("ric:focus","no")=="yes"){BF.addClass("ricTabSubtabActive")}BA.append(BF);A5.append(Ag.c("div").addClass("ricTabContentTab").append(Z.call(this,BH)))});A9.append(BA)}else{A9.append(Ag(this).getAttr("ric:subtitle","&nbsp;"));BD.append(Z.call(this,BE))}A5.append(BD);A1.append(A9);if(Ag(this).getAttr("ric:focus","no")=="yes"){BC.addClass("ricTabActiveTab");A9.addClass("ricTabSubtitleActive")}});var A3=Ag("> div.ricTabCommon",this);if(A3.length>0){Ag("> div.ricTabBody > div.ricTabCommon",A6).append(A3[0].childNodes||[])}else{Ag("> div.ricTabBody > div.ricTabCommon",A6).hide()}j.ricolaTabAddEvents();Ag(this).after(j).remove()})};Ag.fn.ricolaTabAddEvents=function(){return this.not(".ricolaTabLoaded").addClass("ricolaTabLoaded").each(function(){Ag("> tbody > tr > td > ul.ricTab",this).bind("mouseover",function(j){Ag(j.target).parents("li:eq(0)").not(".ricTabActiveTab").addClass("ricTabTitleHover")}).bind("mouseout",function(j){Ag(j.target).parents("li:eq(0)").removeClass("ricTabTitleHover")
}).bind("click",function(j){Ag(j.target).parents("li:eq(0)").not(".ricTabActiveTab").ricolaTabFocus()});Ag("> tbody > tr > td > div.ricTabSubtitle ul.ricTabSubtabs",this).bind("mouseover",function(j){Ag(j.target).filter("li:not(.ricTabSubtabActive)").addClass("ricTabSubtabHover")}).bind("mouseout",function(j){Ag(j.target).filter("li").removeClass("ricTabSubtabHover")}).bind("click",function(j){Ag(j.target).parents().andSelf().filter("li:eq(0)").not(".ricTabSubtabActive").ricolaTabFocus()})})};Ag.fn.ricolaTabFocus=function(){return this.each(function(){var j=Ag(this).attr("id"),A5=Ag(this).parents("table.ricTab:eq(0)"),e=j.replace(/_tab_(title|subtab)$/,""),A0=e+"_tab_title",A2=e+"_tab_subtitle",A1=e+"_tab_subtab",A4=Ag("#"+A1).length==1;if(!A4){Ag("#"+A0).addClass("ricTabActiveTab").removeClass("ricTabTitleHover").siblings("li.ricTabActiveTab").removeClass("ricTabActiveTab");var A8=Ag("#"+A2).siblings(".ricTabSubtitleActive").removeClass("ricTabSubtitleActive").end().addClass("ricTabSubtitleActive"),A3=A8.find("> ul.ricTabSubtabs").length>0;
if(A3){A8.find("> ul.ricTabSubtabs > li.ricTabSubtabActive").ricolaTabFocus();return }else{A6("#"+e,A5)}}else{var A7=Ag("#"+A1);var A9=A7.parent().parent().attr("id").replace(/_subtitle$/,"_title");if(!Ag("#"+A9).is(".ricTabActiveTab")){if(!A7.is(".ricTabSubtabActive")){A7.addClass("ricTabSubtabActive").siblings(".ricTabSubtabActive").each(function(){Ag(this).removeClass("ricTabSubtabActive");var BB=Ag(this).attr("id").replace(/_tab_subtab/,"");var BA=Ag("#"+BB);BA.removeClass("ricTabContentActive").trigger("ricolaTabBlur").parents("table.ricTab:eq(0)").trigger("ricolaTabBlur",[BB,BA[0]])})}Ag("#"+A9).ricolaTabFocus()}else{Ag("#"+A1).addClass("ricTabSubtabActive").siblings().removeClass("ricTabSubtabActive");A6("#"+e,A5)}}function A6(BD,BB){var BC=Ag(BD).attr("id"),BA=Ag(BD).parent();BA.siblings("div.ricTabContentActive").each(function(){Ag(this).removeClass("ricTabContentActive").find("> div.ricTabContentInner").trigger("ricolaTabBlur").parents("table.ricTab:eq(0)").trigger("ricolaTabBlur",[Ag(this).attr("id"),Ag(this).find("> div.ricTabContentInner").get(0)])
}).end().addClass("ricTabContentActive").find("> div.ricTabContentInner").height(BB.getAttr("ric:height","")).trigger("ricolaTabFocus").parents("table.ricTab:eq(0)").trigger("ricolaTabFocus",[BC,Ag(BD).get(0)]);BA.ricolaResizeContent()}})};Ag.fn.ricolaTabTitle=function(j){var e="";this.filter(".ricTabContentInner").each(function(){var A2=Ag(this).attr("id");var A1=A2.replace(/_tab_(title|subtab)$/,"");var A0=A1+(Ag("#"+A1+"_tab_subtab").length==0?"_tab_title > span span span":"_tab_subtab");if(j===undefined){e=Ag("#"+A0).text();return false}else{Ag("#"+A0).html(j)}});return e};Ag.fn.ricolaTabSubtitle=function(j){var e="";this.filter(".ricTabContentInner").each(function(){var A3=Ag(this).attr("id");var A2=A3.replace(/_tab_(title|subtab)$/,"");var A1=A2+"_tab_title";var A0=A2+"_tab_subtitle";if(j===undefined){e=Ag("#"+A0).text();return false}else{Ag("#"+A0).html(j)}});return e};AG("ricTwistie",function(A0,j){var e=Ag("div.ricTwistie",j);if(U){e.ricolaTwistieAddEvents()}else{e.ricolaTwistie()
}});Ag.fn.ricolaTwistie=function(){return this.not(".ricTwistieLoaded").each(function(){var A4=Ag(this),e=A4.attr("ric:width"),A0=A4.attr("ric:height"),A2=Ag(this).attr("ric:collapsible")||"expanded";A4.ricolaGetId();if(e){A4.width(e)}if(A2=="collapsed"){A4.addClass("ricTwistieMinimized")}var A3=Ag.c("div").addClass("ricTwistieTitleWrapper").append(Ag.c("span").addClass("ricTwistieTitle"));A3.find("span.ricTwistieTitle").html(Ag(this).attr("ric:title"));var j=Ag.c("div").addClass("ricTwistieContent"+(A0?" ricTwistieContentScrollable":"")),A1=Ag.c("div").addClass("ricRelativeWrapper").append(j);if(A0){j.height(A0)}j.append(Ag(this)[0].childNodes||[]);A4.prepend(A3);A4.append(A1);A4.ricolaTwistieAddEvents()})};Ag.fn.ricolaTwistieAddEvents=function(){return this.not(".ricTwistieLoaded").addClass("ricTwistieLoaded").each(function(){Ag(this).bind("click",function(j){if(Ag(j.target).is(".ricTwistieTitleWrapper,.ricTwistieTitle")){Ag(j.target).closest("div.ricTwistie").ricolaTwistieToggle();j.stopPropagation()
}})})};Ag.fn.ricolaTwistieToggle=function(j,e){return this.each(function(){var A2=Ag(this).filter(".ricTwistie"),A0=j===undefined?A2.is(".ricTwistieMinimized"):j,A1=e===undefined?true:e;if(A0==true){A2.removeClass("ricTwistieMinimized");A2.find(".ricTwistieContent").ricolaResizeContent();if(A1==true){Ag(this).trigger("ricolaTwistieShow",[this])}}else{A2.addClass("ricTwistieMinimized");if(A1==true){Ag(this).trigger("ricolaTwistieHide",[this])}}})};Ag.fn.ricolaTwistieTitle=function(e){if(e){return this.each(function(){Ag(".ricTwistieTitle",this).text(e)})}else{return Ag(this).text()}};AG("accordion",function(j,e){Ag((U?"dl":"div")+".ricAccordion",e).ricolaAccordion()});AD("accordion",function(){Ag(document).bind("click.accordion",function(A0){var j=Ag(A0.target).closest("dt");if(j.length&&j.parent("dl.ricAccordion").length){j.ricolaAccordionTab()}})});Ag.fn.ricolaAccordionRefresh=function(){return this.each(function(){var A1=0,A0=Ag(this).attr("ric:height");if(!A0){if(!Ricola.util.isReadyToSize(this)){return 
}var e,j=Ag(this).find("dd");j.each(function(){var A2=Ag(this).height();if(A2>A1){A1=A2}if(Ag(this).is(".ricAccordionSelected")){e=this}});if(A1){Ag(this).attr("ric:height",A1+"px");if(e){Ag(e).find(".ricAccordionContent").height(A1)}}}})};Ag.fn.ricolaAccordionReady=function(){return this.filter("dl.ricAccordion").ricolaComponentReady("accordion",function(j,e){Ag(e).not(".ricAccordionHeightInited").ricolaAccordionRefresh().addClass("ricAccordionHeightInited").end();Ag(e).find("> dt.ricAccordionInitSelected").ricolaAccordionTab();Ag(e).bind("ricolaWaitToSize",function(){Ag(this).removeClass("ricWaitToSize").ricolaAccordionRefresh()})})};Ag.fn.ricolaAccordion=function(){return U?this.ricolaAccordionReady():this.filter("div.ricAccordion").each(function(){var A2=Ag(this),A1,A0,e,j=Ag.c("dl").addClass("ricAccordion");if(A1=A2.attr("id")){j.attr("id",A1)}if(A0=A2.attr("ric:width")){j.css("width",A0)}if(e=A2.attr("ric:height")){j.attr("ric:height",e);j.addClass("ricAccordionHeightInited");if(e!="fluid"){j.addClass("ricAccordionScrollable")
}}Ag("> div.ricAccordionTab",A2).each(function(){var A4=Ag(this),A6;var A5=Ag.c("dt");A5.html('<span class="ricAccordionTitle">'+(A4.attr("ric:title")||"")+"</span>");var A3=Ag.c("dd").addClass("ricRelativeWrapper");if(A6=A4.attr("id")){A3.attr("id",A6)}A3.append(Ag.c("div").addClass("ricAccordionContent").append(A4.contents()));if(A4.getAttr("ric:selected","no")=="yes"){A5.addClass("ricAccordionInitSelected");A3.addClass("ricAccordionInitSelected")}j.append([A5[0],A3[0]])});A2.after(j).remove();j.ricolaAccordionReady()})};Ag.fn.ricolaAccordionTab=function(){return this.each(function(){var A0,A2,j;var A3=Ag(this),A1=A3.parents("dl:eq(0)");if(A3.hasClass("ricAccordionSelected")){A2=A3}else{A2=Ag("> dt.ricAccordionSelected",A1);A0=A3}j=A1.attr("ric:height");if(A2){Ag([A2[0],A2.next()[0]]).removeClass("ricAccordionSelected");A1.trigger("ricolaAccordionTabHide",[A2[0]])}if(A0){A1.trigger("ricolaAccordionTabShow",[A0[0]]);if(j&&j!="fluid"){A0.next().filter("dd").find(".ricAccordionContent").height(j)
}var e=A0.next().filter("dd");Ag([A0[0],e[0]]).addClass("ricAccordionSelected");e.ricolaResizeContent()}})};AG("ricFloatPane",function(A0,j){var e=Ag("div.ricFloatPane",j);if(!U){e.ricolaFloatPane()}else{e.ricolaFloatPaneAddEvents()}});Ag.fn.ricolaFloatPaneAddEvents=function(){return this.not(".ricFloatPaneLoaded").addClass("ricFloatPaneLoaded").each(function(){var j=Ag(this).attr("ric:container"),e=Ag("h1.ricFloatPaneHead",this);Ag(this).bgiframe().draggable({containment:j||Ag(this).ricolaFindParent("body").get(0)||"document",handle:e,refreshPositions:true,scroll:true,iframeFix:true}).setZIndex(this).bind("click",function(){Ag("div.ricFloatPane").zTop(this)});Ag(this).bind("click",function(A0){if(Ag(A0.target).is("div.ricFloatPaneIcoClose")){Ag(A0.target).closest("div.ricFloatPane").ricolaFloatPaneToggle(false)}}).bind("mousedown",function(A1){var A0=Ag(A1.target).closest("div.ricFloatPane").get(0);Ag("div.ricFloatPane").zTop(A0)}).bind("dblclick",function(A0){if(Ag(A0.target).closest("h1.ricFloatPaneHead").length){Ag(A0.target).closest("div.ricFloatPane").ricolaFloatPaneCollapse()
}})})};Ag.fn.ricolaFloatPane=function(){return this.not(".ricFloatPaneLoaded").each(function(){var j=Ag(this),A2=Ag.c("div").addClass("ricFloatPaneHead"),A1=Ag.c("h1").addClass("ricFloatPaneHead").html('<span class="ricFloatPaneTitle">'+Ag(this).attr("ric:title")+"</span>"),A5=Ag.c("div").addClass("ricFloatPaneIcoClose"),A4=j.attr("ric:height"),A6=Ag.c("div").addClass("ricFloatPaneContent"+(A4?" ricFloatPaneContentScrollable":""));if(A4){A6.css("height",A4)}A6.append(Ag(this)[0].childNodes||[]);var A0=Ag.c("div").addClass("ricRelativeWrapper").append(A6),A3=Ag.c("div").addClass("ricFloatPaneFooter").html('<div class="ricFloatPaneFooterR"><div class="ricFloatPaneFooterC"></div></div>');var e=Ag(this).css({width:j.attr("ric:width")||250,top:j.attr("ric:top")||200,left:j.attr("ric:left")||25}).append(A2.append(Ag.c("div").addClass("ricFloatPaneHeadR").append(A5).append(A1))).append(A0).append(A3).attr("id",j.attr("id")||Ricola.getNewId());if(j.attr("ric:collapsible")=="collapsed"){Ag(A1).trigger("dblclick")
}if(j.attr("ric:visible")=="no"){e.hide()}}).ricolaFloatPaneAddEvents()};Ag.fn.ricolaFloatPaneTitle=function(e){this.find("span.ricFloatPaneTitle");if(e==undefined){if(this.length==1){var e=this.html();this.end();return e}else{return this.end()}}this.html(e);return this.end()};Ag.fn.ricolaFloatPaneCollapse=function(e){return this.each(function(){var A0=this;if(!Ag(this).is(".ricFloatPane")){A0=Ag(this).parents(".ricFloatPane")[0]}var j=Ag("img.ricFloatPaneIcoMinus",A0);if(e==undefined){e=!Ag(A0).is(".ricFloatPaneCollapsed")}if(e){Ag(A0).addClass("ricFloatPaneCollapsed").trigger("ricolaFloatPaneCollapse");j.addClass("ricFloatPaneIcoPlus")}else{Ag(A0).removeClass("ricFloatPaneCollapsed").trigger("ricolaFloatPaneExpand");j.removeClass("ricFloatPaneIcoPlus")}})};Ag.fn.ricolaFloatPaneToggle=function(e){return this.each(function(){if(e==undefined){e=!Ag(this).is(":visible")}var j=this;if(!Ag(this).is(".ricFloatPane")){j=Ag(this).parents(".ricFloatPane")[0]}if(e){Ag(j).trigger("ricolaFloatPaneShow").show()
}else{Ag(j).trigger("ricolaFloatPaneHide").hide()}})};AD("tablegrid",function(){Ag(document).bind("ricolaFormAfterReset",function(A1,A0){Ag(A0).find("table.ricGrid, table.ricTable").ricolaGridTableReset()});function j(A7){var A1=Ag(A7.target).parents(".ricTable,.ricGrid").slice(0,1);if(!A1.length){return }var A6=A1.is(".ricTable"),A4=A1.is(".ricGrid"),A0=A6&&A1.getAttr("ric:hover","yes")=="yes"||A4&&A1.getAttr("ric:input","yes")=="yes",A2=A6?"tr.row0,tr.row1":"tr.ricGridRow0,tr.ricGridRow1",A3=A6?"ricRowHover":"ricGridRowHover";if(A0){var A5=Ag(A7.target).closest(A2).not(".ricGridTwistie").ricolaGridSiblingRows();if(A4&&A5.find("> td:eq(0) :checkbox, > td:eq(0) :radio").length===0){return }A5[A7.type=="mouseover"?"addClass":"removeClass"](A3)}}function e(A3){var A1=Ag(A3.target),A2=(A3.target.tagName=="TR"?Ag(A3.target):A1.parents().filter("tr:eq(0)")),A6=A3.target.tagName,A7=A1.closest("table.ricGrid,table.ricTable"),A0=A2.is(".ricGridTwistie");if(!A7.length){return }if(A0&&!A1.is("a,:input")&&Ag(A3.target).parents("a").length===0){A2.ricolaGridTwistieToggle()
}if(A7.getAttr("ric:input","yes")=="yes"){var A8=A2.ricolaGridSiblingRows(),A4=A8.find("> td:eq(0) :checkbox, > td:eq(0) :radio");if(A4.length>0&&!A1.not(":radio,:checkbox").is("a,:input")){switch(A4[0].type){case"checkbox":if(A6!="INPUT"&&!A0){Ag(A4).trigger("click")}break;case"radio":if(A6!="INPUT"&&!A0){Ag(A4[0]).trigger("click")}A7.find("input").filter(function(){return Ag(this).attr("name")==A4[0].name}).parents("tr.ricGridRowSelected").ricolaGridSiblingRows().removeClass("ricGridRowSelected")}var A5="";if(A4[0].checked){A8.addClass("ricGridRowSelected");A5="ricolaGridRowSelected"}else{A8.removeClass("ricGridRowSelected");A5="ricolaGridRowUnselected"}Ag(A2).closest("table.ricGrid,table.ricTable").trigger(A5,[A2[0]])}}}Ag(document).bind("mouseover",j).bind("mouseout",j).bind("click",e)});Ag.fn.ricolaGridTableReset=function(){return this.filter(function(){return Ag(this).getAttr("ric:input","yes")=="yes"}).find("> tbody > tr > td:nth-child(1) input").each(function(){Ag(this).parents("tr:eq(0)")[(Ag(this).is(":checked")?"add":"remove")+"Class"]("ricGridRowSelected")
})};function t(e){return parseInt(Ag(e).attr("ric:level")||1,10)}function AY(e,j){return t(j)>t(e)}function Ah(A3,A4){var A2=t(A3),A1=t(A4[A4.length-1]);for(var A0=A2,e=A1;A0<=e;A0++){A4.pop()}return A4}Ag.fn.ricolaGridTwistieToggle=function(e){return this.filter("tr.ricGridTwistie").each(function(){var A6=Ag(this),A3=!A6.is(".ricGridTwistieCollapsed"),A2=e==true||e===undefined&&!A3,j="ricolaGridTwistie"+(A2?"Expand":"Collapse"),A5=A6.attr("ric:level"),A1=[];if(A2!=A3){A6.toggleClass("ricGridTwistieCollapsed")}var A4=[this];A6.nextAll().each(function(){if(Ag(this).is(".ricGridTwistie")){if(!A5||!AY(A4[0],this)){return false}if(Ag(A4).slice(1).filter(".ricGridTwistieCollapsed").length===0){A1.push(this)}A4.push(this)}else{if(Ag(A4).slice(1).filter(".ricGridTwistieCollapsed").length===0){A1.push(this)}if(Ag(this).is(".ricGridTwistieEnd")){A4=Ah(this,A4);if(!A5||parseInt(A5,10)>=t(this)){return false}}}});if(A2!=A3){Ag(A1)[(A2?"remove":"add")+"Class"]("ricGridTwistieHidden");if(A2&&(Ricola.browser.ie6||Ricola.browser.ie7)){Ag(A1).find("td:visible").filter(function(){var A7=Ag(this).attr("rowspan");
return A7&&A7>1}).hide().show()}}if(A2){A6.ricolaResizeContent()}var A0=A6.parents("table:eq(0)");A0.trigger(j,[A6[0],A1]);if(A0.is(".ricGrid")&&A0.data("ricolaGridOptions").useScrolling){A0.ricolaGridSizeHeaderFooter()}})};Ag.fn.ricolaGridTwistieExpand=function(e){return this.each(function(){var j=e===true?"tr.ricGridTwistieCollapsed":"tr.ricGridTwistie:not(.ricGridTwistieCollapsed)";var A1=Ag(this);var A0;if(A1.is("table")){A0=A1.find("> tbody > "+j)}else{if(A1.is("tr")){A0=A1.filter(j)}}A0.ricolaGridTwistieToggle(e)})};Ag.fn.ricolaGridTwistieExpandAll=Ag.fn.ricolaGridTwistieExpand;Ag.fn.ricolaGridSiblingRows=function(){var e=[];this.each(function(){var j=Ag(this);if(j.hasClass("ricGridInherit")){while(j.prev().hasClass("ricGridInherit")){j=j.prev()}j=j.prev()}do{e.push(j[0]);j=j.next()}while(j.hasClass("ricGridInherit"))});return this.pushStack(e)};if(!U){AG("table",function(j,e){Ag("table.ricTable",e).ricolaTable()})}Ag.fn.ricolaTable=function(){if(U){return this}return this.not(".ricTableLoaded").addClass("ricTableLoaded").each(function(){Ag(this).attr("cellSpacing","0px").ricolaTableRefresh()
})};Ag.fn.ricolaTableRefresh=function(){return this.each(function(){Ag(this).css("width",Ag(this).getAttr("ric:width",""));Ag("> thead > tr:gt(0)",this).addClass("ricTableSubHead");if(Ag(this).getAttr("ric:input","yes")=="yes"){Ag("> tbody > tr > td:first-child input:checked",this).parents("tr:eq(0)").addClass("ricGridRowSelected")}if(Ag(this).getAttr("ric:rowstripe","yes")=="yes"){var e=0;var j=/ricGrid(Twistie(?:End)?\b|Alert|Comment|Summary|Spacer|Inherit)+/;Ag("> tbody > tr",this).each(function(){var A1=j.exec(this.className),A2=Ag(this),A0=A1&&A1[1];A2.removeClass("row0 row1");switch(A0){case"Twistie":e=0;break;case"Inherit":e--;A2.prev().addClass("ricGridPreInherit");default:A2.addClass("row"+(e++%2))}})}Ag("td.ricGridAlert",this).parent().addClass("ricGridAlert")})};AG("grid",function(j,e,A0){Ag("table.ricGrid",e).ricolaGrid().ricolaGridSizeViewport()});Ag.fn.ricolaGridReady=function(){return this.filter(".ricGrid").addClass("ricGridLoaded").ricolaComponentReady("grid",function(j,e,A0){Ag(e).ricolaGridSizeHeaderFooter();
Ag(e).ricolaGridScrollToRow()})};Ricola.browser.scrollbarWidth=17;Ricola.browser.getScrollbarWidth=(function(){var e;return function(){if(!e){var A0=Ag.c("div").addClass("ricScrollbarCalc").append(Ag.c("div")),j=Ag("body:visible");if(j.length>0){j.append(A0);e=40-Ag("div",A0).innerWidth();Ag(A0).remove();Ricola.browser.scrollbarWidth=e}else{return Ricola.browser.scrollbarWidth}}return e}})();Ag.fn.wickolaGrid=function(){return this.each(function(){var A2=Ag(this),A1=A2.data("ricolaGridOptions"),A0=A2.data("ricolaGridPointers"),e=A2.parents("div.ricGridWrapper").get(0);A0.ruler=Ag("div.ricGridRuler",e).get(0);A0.divwrapper=e;A0.wrapper=Ag("> table",e).get(0);A0.widthwrap=Ag("div.ricGridWidthWrapper",e).get(0);if(A1.collapseall){A0.collapse=Ag("div.ricGridCollapseAll",e).get(0)}var j=Ag("div.ricGridCaption",e);if(j.length){A0.caption=j[0]}if(A1.paging){A0.controls=Ag("div.ricGridControls",e).get(0)}A0.viewport=Ag("div.ricGridViewport",e).get(0);if(A1.useScrolling){A0.headers=Ag("div.ricGridHeaders",e).get(0);
A0.headersRow=Ag("div.ricGridHeadersRow",A0.headers).get(0);A0.footers=Ag("div.ricGridFooters",e).get(0);A0.footersRow=Ag("div.ricGridFootersRow",A0.footers).get(0)}})};Ag.fn.ricolaGrid=function(){if(U){return this.not(".ricGridLoaded").ricolaGridInitialize().wickolaGrid().ricolaGridAddEvents().ricolaGridRefresh(true).ricolaGridReady()}return this.not(".ricGridLoaded").ricolaGridInitialize().each(function(){var BF=Ag(this),BA=BF.data("ricolaGridPointers"),A0=BF.data("ricolaGridOptions");var A5=Ag.c("td"),A2=Ag.c("div").addClass("ricGridWrapper"),A3=Ag.c("table").attr({cellSpacing:0,cellPadding:0}).append(Ag.c("tbody").append(Ag.c("tr").append(A5)));if(Ricola.browser.ie){A2.attr("align","left")}var A7=[];if(A0.align){A7.push("ricGrid"+{center:"Center",left:"Left",right:"Right"}[A0.align])}if(A0.useScrolling){A7.push("ricGridScrolling")}if(A0.useScrollingX){A7.push("ricGridScrollingX")}if(A0.useScrollingY){A7.push("ricGridScrollingY")}if(A0.useScrollingX&&A0.useScrollingY){A7.push("ricGridScrollingXY")
}A3.addClass(A7.join(" "));if(A0.percentageWidth&&Ricola.browser.ie6){var A9=Ag.c("div").addClass("ricGridRuler");if(A0.width){A9.css("width",A0.width)}BA.ruler=A9[0];A2.append(A9)}A2.append(A3);BA.divwrapper=A2[0];BA.wrapper=A3[0];var A8=Ag.c("div").addClass("ricGridWidthWrapper");BA.widthwrap=A8[0];if(A0.collapseall){BA.collapse=Ag.c("div").addClass("ricGridCollapseAll")[0];A8.append(BA.collapse)}var BH=Ag("> caption",this);if(BH.length==1){BA.caption=Ag.c("div").addClass("ricGridCaption")[0];A8.append(BA.caption);Ag(this).ricolaGridCaption(BH.html())}var A4,BK,j;if(A0.paging){A4=Ag.c("div").addClass("ricGridNavStatus")[0];BK=Ag.c("div").addClass("ricGridNavPaging")[0];BA.controls=Ag.c("div").addClass("ricGridControls").append(A4).append(BK)[0];A8.append(BA.controls)}var BI=Ag.c("div").addClass("ricGridViewport");BA.viewport=BI[0];if(A0.useScrolling){BA.headersRow=Ag.c("div").addClass("ricGridHeadersRow")[0];BA.headers=Ag.c("div").addClass("ricGridHeaders").append(BA.headersRow)[0];A8.append(BA.headers);
A8.append(BA.viewport);if(Ag("> tfoot td",this).length>0){BA.footersRow=Ag.c("div").addClass("ricGridFootersRow")[0];BA.footers=Ag.c("div").addClass("ricGridFooters").append(BA.footersRow)[0];A8.append(BA.footers)}}else{Ag("> thead > tr:gt(0)",this).addClass("ricTableSubHead");A8.append(BA.viewport)}A5.append(A8);BF.data("ricolaGridPointers",BA);BF.data("ricolaGridOptions",A0);this.cellSpacing=0;this.cellPadding=0;if(A0.collapseall){BF.ricolaGridInitCollapseAll()}if(A0.selectall){Ak.call(this)}if(!A0.paging){Ag(this).before(A2);BI.append(this)}else{var A6=Ag(this).parent().find("> ol.ricGridNav");if(A6.length==1){var e=Ag(A6).getAttr("ric:recordstart",0);var A1=Ag(A6).getAttr("ric:recordend",0);var BG=Ag(A6).getAttr("ric:recordtotal",0);var BL=Ag.c("ul").addClass("ricGridNav");Ag("> li",A6).each(function(BN){var BO=Ag.c("li");var BM=Ag("> a",this);if(BM.length==1){BO.append(BM)}else{BO.addClass("ricGridNavPageCurrent").append(Ag.trim(Ag(this).text()))}BL.append(BO)});var BE=Ag("> li",BL).index(Ag("> li.ricGridNavPageCurrent",BL)[0]),BC=Ag.c("li").addClass("ricGridNavPrevious").attr("title","Previous Page").html("&laquo; Prev"),BJ=Ag("> li",BL).length;
if(BE===0){BC.addClass("ricGridNavPageDisabled")}var BD=Ag.c("li").addClass("ricGridNavNext").attr("title","Next Page").html("Next &raquo;");if(BE==(BJ-1)){BD.addClass("ricGridNavPageDisabled")}BL.prepend(BC).append(BD);Ag(A4).attr("title","Displaying records "+e+" to "+A1+" of "+BG).html(e+"-"+A1+" of "+BG);Ag(BK).append(BL)}else{Ag(BA.controls).remove()}var BB=Ag(this).parent();BB.before(A2);BI.append(this);Ag(BB).remove()}Ag(this).ricolaGridAddEvents();Ag(this).ricolaGridRefresh(true);Ag(this).ricolaGridReady()})};Ag.fn.ricolaGridInitialize=function(){return this.each(function(){var A0=Ag(this),e={wrapper:null,viewport:null},j={useScrolling:false,useScrollingX:false,useScrollingY:false,height:A0.attr("ric:height"),width:A0.attr("ric:width"),datawidth:A0.attr("ric:datawidth"),align:A0.getAttr("ric:align","center"),paging:A0.parent().is("div.ricGridContainer")||A0.getAttr("ric:paging","no")=="yes",collapseall:A0.getAttr("ric:allcollapsible","no")=="yes",selectall:A0.getAttr("ric:input","yes")!="no"&&A0.getAttr("ric:selectall","no")=="yes"};
j.percentageWidth=j.width&&j.width.indexOf("%")>-1;if(j.width&&j.datawidth){j.useScrollingX=true}if(j.height){j.useScrollingY=true}if(j.useScrollingX||j.useScrollingY){j.useScrolling=true}Ag(this).data("ricolaGridPointers",e);Ag(this).data("ricolaGridOptions",j)})};AD("grid",function(){Ag(window).bind("ricolaResize",function(){Ag("table.ricGrid").ricolaGridResize()});Ag(document).bind("click",function(A1){if(!Ag(A1.target).is("input.ricGridSelectAll")){return }var A0=Ag(A1.target).parents(),j=A0.filter("div.ricGridViewport");if(!j.length){j=A0.filter("div.ricGridHeaders").next()}j.children(":eq(0)").ricolaGridCheckAll(A1.target.checked)});function e(A1,A0){var j=Ag(A1.target).closest("li");if(!j.length||!j.parent("ul.ricGridNav").length){return false}if(A0&&!j.is(A0)){return false}return true}Ag(document).bind("mouseover",function(j){if(!e(j)){return }Ag(j.target).closest("li").not(".ricGridNavPageCurrent,.ricGridNavPageDisabled").addClass("ricGridNavPageHover")}).bind("mouseout",function(j){if(!e(j)){return 
}Ag(j.target).closest("li").removeClass("ricGridNavPageHover")});Ag(document).bind("click",function(A0){if(!e(A0,".ricGridNavPrevious,.ricGridNavNext")){return }var j=Ag(A0.target).closest("li");if(j.is(".ricGridNavPageDisabled")){return }Ag(A0.target).closest("ul.ricGridNav").find("> li.ricGridNavPageCurrent")[j.is(".ricGridNavPrevious")?"prev":"next"]().not(this).find("> a").clickLink()})});Ag.fn.ricolaGridAddEvents=function(){return this.not(".ricGridLoaded").addClass("ricGridLoaded").each(function(){var A1=Ag(this),j=Ag(this).data("ricolaGridOptions"),e=Ag(this).data("ricolaGridPointers");A1.bind("ricolaWaitToSize",function(){Ag(this).removeClass("ricWaitToSize").ricolaGridResize()}).bind("ricolaGridRowSelected ricolaGridRowUnselected",function(A8,A9){var A5=Ag(A8.target).closest("table.ricGrid");if(!A5.length){return }var A4=A5.data("ricolaGridPointers"),A2=Ag("input.ricGridSelectAll",A4.wrapper);if(!A2.length){return }var A3=Ag("> tbody > tr",A5).find("> td:eq(0) :checkbox").filter(":not(:disabled)"),A7=A3.length,A6=A3.filter(":checked").length;
if(A7==A6){A2.attr("checked","checked")}else{A2.removeAttr("checked")}});if(e.collapse){Ag("div.ricTwistie",e.collapse).bind("ricolaTwistieShow ricolaTwistieHide",function(A5){var A2=Ag(A5.target).closest("div.ricGridCollapseAll").siblings(".ricGridViewport").find(".ricGrid"),A4=Ag(A5.target).closest("div.ricTwistie"),A3=A4.ricolaTwistieTitle().indexOf("Expand")>-1;A2.ricolaGridTwistieExpand(A3);A4.ricolaTwistieTitle(A3?"Collapse All":"Expand All")})}if(j.useScrollingX){Ag(e.viewport).bind("scroll",function(){Ag([e.headersRow,e.footersRow]).css("left","-"+Ag(this).scrollLeft()+"px")})}if(j.collapseall){function A0(A2){var A5=Ag("tr.ricGridTwistie",A2),A4=A5.length,A6=A5.filter(".ricGridTwistieCollapsed").length,A3=A6>Math.floor(A4/2);return A3}if(A0(A1)){Ag("div.ricTwistie",e.collapse).ricolaTwistieToggle().ricolaTwistieTitle("Expand All")}}})};Ag.fn.ricolaGridRefresh=function(e){return this.filter(".ricGrid").each(function(){var A4=Ag(this),A3=A4.data("ricolaGridOptions"),A1=A4.data("ricolaGridPointers");
if(!U||!e){var A2=A4.getAttr("ric:rowstripe","yes")=="yes",A0=A4.getAttr("ric:twistie","yes")=="yes",j=[];if(A2||A0){j=Ag("> tbody > tr",this)}d.call(this,j);if(A2){b.call(this,j)}if(A0){AX.call(this,j)}}u.call(this,A3,A1);if(!e){A4.ricolaGridResize().ricolaGridScrollToRow()}}).end()};Ag.fn.ricolaGridScrollToRow=function(e){return this.each(function(){if(Ag(this).data("ricolaGridOptions").useScrollingY){var A1=this,A0=e===undefined?Ag("tbody tr.ricGridScrollToRow:eq(0)",this):Ag(e),j=Ag(A1).parent();j.scrollTop(0);A0.each(function(){var A2=Ag(this).parents("tbody:eq(0)").offset();j.scrollTop(Ag(this).offset().top-A2.top)})}})};Ag.fn.ricolaGridInitCollapseAll=function(){return this.each(function(){var A1=Ag(this),j=A1.data("ricolaGridOptions"),e=A1.data("ricolaGridPointers");if(j.collapseall){var A0=Ag(e.collapse).html('<div class="ricTwistie" ric:title="Expand All" ric:collapsible="collapsed"></div>');Ag(".ricTwistie",A0).ricolaTwistie()}})};function Ak(){var j=Ag(this).data("ricolaGridOptions"),e=Ag(this).data("ricolaGridPointers");
if(j.selectall){Ag("thead th:eq(0)",this).empty().append(Ag('<input type="checkbox" />').addClass("ricGridSelectAll").attr("title","Select All"))}}function u(A0,j){if(!A0.useScrolling){return }function A5(A9){var BC=[];var BA=0;var BB=0;var A6=Ag("> tr",A9);BA=A6.length;Ag("> th,> td",A6[0]).each(function(BD){BB+=parseInt(Ag(this).attr("colspan")||1,10)});if(BA===0){return[]}for(var A8=0;A8<BA;A8++){BC[A8]=[];for(var A7=0;A7<BB;A7++){BC[A8][A7]=null}}A6.each(function(BD){Ag("> th,> td",this).each(function(BH){var BJ=(Ag(this).attr("colspan")||1)-1;var BG=(Ag(this).attr("rowspan")||1)-1;for(;BH<BB;BH++){if(BC[BD][BH]===null){break}}var BI=true;for(var BF=BH;BF<=(BH+BJ);BF++){BC[BD][BF]={element:this,create:BI,calculate:BI,rowspan:BG,colspan:BJ,i:BD,j:BF};if(BG>0){for(var BE=BD+1;BE<=(BD+BG);BE++){BC[BE][BF]={element:this,create:false,calculate:BF==BH,rowspan:BG,colspan:BJ,i:BE,j:BF}}}BI=false}})});return BC}var A4=Ag("> thead",this);if(A4.length==1){var e=A5(A4[0]);Ag(j.headersRow).data("ricolaGridMap",e);
A1(e,j.headersRow,"Header")}var A3=Ag("> tfoot",this);if(A3.length==1&&A3.find("td").length){var A2=A5(A3[0]);Ag(j.footersRow).data("ricolaGridMap",A2);A1(A2,j.footersRow,"Footer")}Ag("*",A4).add(Ag("*",A3)).filter(function(){return !!(Ag(this).attr("id")||Ag(this).attr("name"))}).removeAttr("id").removeAttr("name");function A1(A7,BA,BD){var BE=Ag(BA);BE.empty();for(var BB=0;BB<A7.length;BB++){for(var A9=0;A9<A7[BB].length&&A9<100;A9++){if(A7[BB][A9].create===true){var A6=document.createElement("div"),A8=Ag(A7[BB][A9].element).clone(true);if(Ricola.browser.ie6||Ricola.browser.ie7){var BC=Ag("select",A7[BB][A9].element);Ag("select",A8).each(function(BF){Ag(this).val(BC.eq(BF).val())})}A6.id=BE.getAttr("id",Ricola.getNewId())+"_header";A6.className="ricGrid"+BD+(BB>0?" ricGrid"+BD+"2":"")+" "+A8[0].className;Ag(A6).append(A8.contents());Ag(A6).data("ricolaGridMap",{i:BB,j:A9,node:A7[BB][A9],map:A7});BE.append(A6)}}}}}function d(e){var j=this;Ag("col",this).each(function(A1){var A0;switch(Ag(this).attr("align")){case"center":A0="Center";
break;case"right":A0="Right";break}if(A0){if(Ricola.browser.ff){Ag("td:nth-child("+(A1+1)+")",e).addClass("ricGridAlign"+A0)}Ag("tfoot td:nth-child("+(A1+1)+")",j).addClass("ricGridAlign"+A0)}})}function b(A0){Ag("td.ricGridAlert",this).parent().addClass("ricGridAlert");var j=Ag(this).getAttr("ric:input","yes")=="yes",A1=0;var A1=0,A2=/ricGrid(Twistie(?:End)?\b|Alert|Comment|Summary|Spacer|Inherit)+/,e=/ricGridRow(0|1)/g;A0.each(function(){var A6=this.className,A4=A2.exec(A6),A7=Ag(this),A3=A4&&A4[1],A5=[],A6=A6.replace(e,"");switch(A3){case"Twistie":A1=0;break;case"Inherit":A1--;A7.prev().addClass("ricGridPreInherit");default:A5.push("ricGridRow"+(A1++%2))}this.className=A6+" "+A5.join(" ")});if(j){Ag("td:first-child :checked",this).parents("tr:eq(0)").ricolaGridSiblingRows().addClass("ricGridRowSelected")}}function AX(A0){var A1=[],j=Ag(this).getAttr("ric:nestedtwisties","no")=="yes";function e(A2){return Ag(A2).filter(function(){return Ag(this).attr("ric:collapsible")=="collapsed"}).length>0
}A0.each(function(A8){var A5=" "+this.className+" ",A3=A5.indexOf(" ricGridTwistie ")>-1,A6=A5.indexOf(" ricGridTwistieEnd ")>-1,A7=[],A2=[];if(A3){if(A1.length>0){var A9;if(j&&(A9=t(this))){if(!AY(A1[A1.length-1],this)){Ag(this).prev().addClass("ricGridTwistieEnd").attr("ric:level",A9);A1=Ah(this,A1)}if(AY(A1[0],this)){if(e(A1)){A7.push("ricGridTwistieHidden")}}}else{Ag(this).prev().addClass("ricGridTwistieEnd");A1.pop()}}A1.push(this);if(e(this)){A7.push("ricGridTwistieCollapsed")}A2.push("first")}else{if(A1.length>0&&e(A1)){A7.push("ricGridTwistieHidden")}}if(j){var A4=Ag(A1[A1.length-1]).attr("ric:level");if(A4){A2.push("ricGridLevel-"+A4)}}if(A2.length){Ag("td",this).eq(0).addClass(A2.join(" "))}if(A6){if(j&&A4){A1=Ah(this,A1)}else{A1.pop()}}if(A7.length){Ag(this).addClass(A7.join(" "))}})}Ag.fn.ricolaGridCheckAll=function(e){return this.each(function(){Ag("> tbody > tr",this).each(function(){Ag("> td:eq(0) :checkbox",this).each(function(){if(!this.disabled){if((e||this.checked)&&!(e&&this.checked)){Ag(this).trigger("click")
}}})})})};Ag.fn.ricolaGridResize=function(){return this.ricolaGridSizeViewport().ricolaGridSizeHeaderFooter()};Ag.fn.ricolaGridSizeViewport=function(){var e=Ricola.browser.getScrollbarWidth();return this.each(function(){var A6=Ag(this);var A4=A6.data("ricolaGridPointers"),A5=A6.data("ricolaGridOptions");var A3=A6.attr("ric:height"),j=A6.attr("ric:width"),A0=A6.attr("ric:datawidth");if(A3){if(A3.indexOf("%")>-1){A3=Ag(window).height()*(parseInt(A3,10)/100)}Ag(A4.viewport).css("height",A3)}if(j){Ag(A4.viewport).addClass("ricGridViewportHasWidth");if(Ricola.browser.ie6){if(A5.percentageWidth){var A1=Ag(A4.ruler).width(),A2=A5.useScrollingX?A4.viewport:A4.wrapper;if(A1===0){if(Ricola.stage<RICOLA_STAGES.LAST){Ag(document).bind("ricolaReady",function(){Ag(A2).css("width",Ag(A4.ruler).width())})}else{A6.addClass("ricWaitToSize")}}else{Ag(A2).css("width",A1)}}else{if(A0){Ag(A4.viewport).css("width",j)}else{Ag(A4.widthwrap).css("width",j)}}}else{if(A5.percentageWidth){Ag(A4.wrapper).addClass("ricGridPercentage").css("width",j)
}else{Ag(A4.widthwrap).css("width",j)}}if(A0){A6.css("width",A0)}}else{Ag(A4.divwrapper).addClass("ricGridAutoSize")}})};Ag.fn.ricolaGridSizeHeaderFooter=function(){function e(A0,A5,BC,BB){if(!A0){Ricola.log.warn("grid: The supplied markup to build the grid is incorrect, and the grid could not be resized properly.");return }var A9=0,BA=0;for(var A6=0;A6<A0.length;A6++){var A3=0;for(var A4=0;A4<A0[A6].length;A4++){var A2=A0[A6][A4],A7=A2.element.style.display,A1=A7!=="none";if(A1){A2.width=Ag(A2.element).outerWidth(true);A2.innerWidth=Ag(A2.element).width();A2.height=Ag(A2.element).outerHeight(true);A2.left=A3}if(A7){A2.display=A7}if(A6>0){var A8=A0[A6-1][A4];if(A8.element!==A2.element){A2.top=(A8.top||0)+A8.height}}else{A2.top=0}if(A1&&A2.calculate===true){A3+=A2.width}A0[A6][A4]=A2}if(!A6||A0[A6][0].create){BA+=A0[A6][0].height}}Ag(A5).css("height",BA+"px");Ag("> div",BC).each(function(){var BD=Ag(this).data("ricolaGridMap").node,j={width:BD.innerWidth+"px",height:BD.height+"px",top:BD.top+"px",left:BD.left+"px"};
if(BD.display){j.display=BD.display}Ag(this).css(j)});return BA}return this.each(function(){var A2=Ag(this),A1=A2.data("ricolaGridOptions");if(!A1.useScrolling||!Ricola.util.isReadyToSize(this)){return }var A0=A2.data("ricolaGridPointers"),A1=A2.data("ricolaGridOptions"),A4=Ricola.browser.getScrollbarWidth();var j=Ag(A0.headersRow).data("ricolaGridMap"),A6=e(j,A0.headers,A0.headersRow,this);if(A6){Ag(A0.viewport).css("margin-top","-"+(A6+1)+"px")}if(A0.footersRow){j=Ag(A0.footersRow).data("ricolaGridMap");var A3=Ag("> tfoot > td",this);e(j,A0.footers,A0.footersRow,this);var A5=Ag("> tfoot",this).height(),A7={};if(Ricola.browser.ie6||Ricola.browser.ie7){A7["margin-top"]="-"+(A1.useScrollingX?A5+18:A5+1)+"px"}else{A7.top="-"+(A1.useScrollingX?A4+A5+1:A5+1)+"px"}Ag(A0.footers).css(A7)}})};Ag.fn.ricolaGridCaption=function(j){if(j===undefined){if(Ag(":eq(0)",this).hasClass("ricGrid")){var e=Ag(":eq(0)",this).data("ricolaGridPointers");return Ag(e.caption).html()}return""}return this.filter("table.ricGrid").each(function(){var A0=Ag(this).data("ricolaGridPointers");
if(A0.caption){Ag(A0.caption).html(j)}}).end()};AG("ricFeedback",function(A0,j){var e=Ag("div.ricFeedback",j);if(!U){e.ricolaFeedback()}else{e.ricolaFeedbackAddEvents()}});Ag.fn.ricolaFeedback=function(){return this.not(".ricFeedbackLoaded").each(function(){var e=Ag.c("div").addClass("ricFeedback");var A3=Ag(this).attr("ric:type")||"success";if(A3=="error"||A3=="alert"){e.addClass("ricFeedbackError")}else{if(A3=="warning"){e.addClass("ricFeedbackWarning")}else{if(A3=="info"){e.addClass("ricFeedbackInfo")}else{e.addClass("ricFeedbackSuccess")}}}var A5=Ag(this).attr("ric:title")||"";var A6="";if(A3=="error"){A6="Error"}else{if(A3=="alert"){A6="Alert"}else{if(A3=="warning"){A6="Warning"}else{if(A3=="info"){A6="Information"}else{A6="Success"}}}}A5=A6+(A5==""?"":": "+A5);var A7=L().addClass("ricFeedbackFooter"),A0=L().addClass("ricFeedbackHeader"),A4;e.append(A0);var A1=Ag.c("div").addClass("ricFeedbackWrapper"),A2=Ag.c("div").addClass("ricFeedbackContent");A1.append(G.left(Ag.c("h2").html(A5)).addClass("ricFeedbackTitle"));
A2.append(this.childNodes||[]);var j=Ag(this).getAttr("ric:osstla","");if(j!=""){A2.append("<div>Contact OSS at 544-5555 Option 1,1 and reference '"+j+"'</div>")}A1.append(A2);e.append(A1);if(Ag(this).attr("ric:showbutton")=="yes"){A4=Ag('<button type="button" class="ricButtonSmall">OK</button>');A2.append(Ag.c("div").addClass("ricFeedbackBottomButton").append(A4))}e.append(A7);e.ricolaFeedbackAddEvents(A4);Ag(this).after(e).remove()})};Ag.fn.ricolaFeedbackAddEvents=function(e){var j=!!e;return this.not(".ricFeedbackLoaded").addClass("ricFeedbackLoaded").each(function(){(j?e:Ag(this).find(".ricFeedbackBottomButton button").slice(0,1)).bind("click",function(){Ag(this).hide().parents("div.ricFeedback").fadeTo("normal",0,function(){Ag(this).trigger("ricolaFeedbackDismissed").slideUp("fast",function(){Ag(this).remove()})})})})};Ag.fn.ricolaFeedbackChangeType=function(e){return this.filter(".ricFeedback").each(function(){this.className=this.className.replace(/ricFeedback(Success|Info|Warning|Error)/g,"ricFeedback"+e);
return this}).end()};Ag.fn.ricolaFeedbackSetTitle=function(e){return this.filter(".ricFeedback").find(".ricFeedbackTitle h2").html(e).end()};Ag.fn.ricolaFeedbackSetContent=function(e){return this.filter(".ricFeedback").find(".ricFeedbackContent").html("").append(e).end()};AG("ricTooltip",function(A0,j){var e=Ag("dfn.ricTooltip, div.ricTooltip",j);if(!U){e.ricolaTooltip()}else{e.ricolaTooltipAddEvents()}});function Av(e){var j=Ag("#"+Ag(e).attr("ric:balloonId"));window.setTimeout(function(){if(!j.is(".ricBalloonHover")){Ag(e).removeClass("ricTooltipActive");Ricola.component.balloon.toggle(j[0],false)}else{Av(e)}},200)}Ag.fn.ricolaTooltip=function(){return this.not(".ricTooltipLoaded").each(function(){var A0=Ag.c("div").addClass("ricTooltipContent").append(this.childNodes||[]),j=Ag(this).attr("ric:width"),e=Ag(this).attr("ric:height");if(j){A0.data("width",j)}if(e){A0.data("height",e)}var A1=Ag(this).append(Ag.c("span").addClass("ricTooltipLabel").html(Ag(this).attr("ric:label"))).append(A0).ricolaTooltipAddEvents()
})};Ag.fn.ricolaTooltipAddEvents=function(){return this.not(".ricTooltipLoaded").addClass("ricTooltipLoaded").each(function(){var e=Ag(this).attr("id");if(!e){e=Ricola.getNewId();Ag(this).attr("id",e)}Ag(this).hoverIntent({interval:150,timeout:350,over:function(){Ag(this).addClass("ricTooltipActive");var A0=Ag(this).getAttr("ric:balloonId","");if(A0===""){var A3=Ag(".ricTooltipContent",this),A1={typeClass:"ricTooltipBalloon"},A2=A3.data("width")||A3.attr("ric:width"),j=A3.data("height")||A3.attr("ric:height");A1.content=A3[0].childNodes||[];if(A2){A1.width=A2}if(j){A1.height=j}var A4=Ricola.component.balloon.create(A1);Ag(A4).attr("ric:tooltipId",e);Ag(this).attr("ric:balloonId",Ag(A4).attr("id"));Ag(A4).bind("ricolaBalloonShow",function(A6,A5){Ag("#"+Ag(this).attr("ric:tooltipId")).trigger("ricolaTooltipShow",[A5])}).bind("ricolaBalloonHide",function(A6,A5){Ag("#"+Ag(this).attr("ric:tooltipId")).trigger("ricolaTooltipHide",[A5])}).bind("mouseenter.ricTooltip",function(A5){if(Ag("#"+Ag(this).attr("ric:tooltipId")).length===0){Ricola.component.balloon.toggle(this,false)
}}).appendTo(document.body).setZIndexTransient(this);A3.remove()}else{var A4=Ag("#"+A0)[0]}Ricola.component.balloon.toggle(A4,true,this)},out:function(){Av(this)}})})};n("select",function(e){if(e.indexOf(" ricSmartSelectLoaded ")>-1||e.indexOf(" ricSmartSelectIgnore ")>-1||e.indexOf(" ricCombobox ")>-1){return false}Ag(this).addClass("ricSmartSelectLoaded").each(Ai)});function Ab(j,A2,A4,A1){if(A2.length==0){return -1}var e=A2.toLowerCase();var A0=A2.length;for(var A3=A4||0;0<=A3&&A3<j.options.length;A3+=A1){if(j.options[A3].text.substr(0,A0).toLowerCase()==e){return A3}}return -1}function Ai(){this.$smartSelect="";Ag(this).addClass("ricSmartSelectLoaded").bind("mousewheel",function(){return false}).bind("keydown",function(A4){this.$selectedIndex=this.selectedIndex;var A2=A4.which,A7=Ricola.util.keys;if(Ricola.util.isMetaKey(A4)&&!Ricola.util.isDeleteKey(A4)){return true}A2=Ricola.util.cleanKey(A4);if(106<=A2&&A2<=111){A2-=64}else{if(190<=A2&&A2<=191){A2-=144}}var j=[];j[220]=92;if(typeof j[A2]!="undefined"){A2=j[A2]
}if(8==A2||(32<=A2&&A2<=126)){var A3=this.$smartSelect;if(38==A2||40==A2||9==A2){this.$smartSelect="";Ag("#ricolaSmartSelectStatus").hide();return true}else{var A1=0;var A0=1;if(8==A2){this.$smartSelect=A3=A3.substring(0,A3.length-1)}else{if(37==A2||39==A2){if(37==A2){A1=this.selectedIndex-1;A0=-1}else{A1=this.selectedIndex+1}if(A1<0){A1=this.selectedIndex}}else{if(A2==56&&A4.shiftKey){A3+="*"}else{var A5=String.fromCharCode(A2).toUpperCase();A3+=A5}}}var A8=Ab(this,A3,A1,A0);if(A8>=0){this.$smartSelect=A3;if(A8!=this.selectedIndex){this.$selectedIndex=this.selectedIndex=A8;if(Ag.browser.mozilla){var A6=this;setTimeout(function(){A6.selectedIndex=A6.$selectedIndex},0)}Ag(this).trigger("change")}}}if(this.$smartSelect.length>0){Ag("#ricolaSmartSelectStatus").show();Ag("#ricolaSmartSelectMatch").html(this.$smartSelect)}else{Ag("#ricolaSmartSelectStatus").hide()}}else{if(13==A2){Ag(this).trigger("blur");Ag("body").trigger("focus");if(Ricola.browser.ff){this.selectedIndex=this.$selectedIndex
}return true}else{if(0==A2){return true}}}return false}).bind("keyup",function(j){if(j.which!=9&&j.which!=116){j.stopPropagation();j.preventDefault();return false}}).bind("keypress",function(A0){var j=A0.keyCode;if(this.$smartSelect.length>0&&Ab(this,this.$smartSelect,this.selectedIndex,1)!=this.selectedIndex){this.$smartSelect="";Ag("#ricolaSmartSelectStatus").hide()}if(9!=j&&j!=116){A0.stopPropagation();A0.preventDefault();return false}}).bind("focus",function(A1,A0){this.$smartSelect="";var j=Ag.c("div").attr("id","ricolaSmartSelectStatus").addClass("ricSmartSelectStatus").html('<span id="ricolaSmartSelectMatch">X</span>').setZIndexTransient(this);Ag("body").append(j);j.bgiframe().positionBy({target:this,targetPos:0,elementPos:3}).hide()}).bind("blur",function(A3,A2){Ag("#ricolaSmartSelectStatus").remove();this.$smartSelect="";var j=Ricola.browser.ie6,A4=false;for(var A0=0;A0<this.options.length;A0++){var A1=this.options[A0].selected;this.options[A0].text=this.options[A0].text.replace(/^ /,"");
if(j&&A1){this.options[A0].selected=A1;A4=A1}}if(A4){Ag(this).trigger("change")}})}Ag(window).bind("ricolaResize",function(){Ag("div.ricBalloon:visible").each(function(){Ricola.component.balloon.position(this,Ag(this).data("positionByTarget"))})});Ricola.component.balloon={create:function(e){var A0=Ag.extend({id:null,typeClass:"",width:"200px",height:null,content:"test",type:"default",position:"above",clickToHide:true,addHideText:false},e);var j=Ricola.core.getImgSpacerURL();var A4=Ag.c("div").attr("id",A0.id||Ricola.getNewId()).addClass((A0.typeClass?A0.typeClass+" ":"")+"ricBalloonLoaded ricBalloon ricBalloon"+({above:"Above",top:"Above",below:"Below",bottom:"Below",left:"Left",right:"Right"})[A0.position]).css("width",A0.width).bgiframe();switch(A0.type||"default"){case"alert":A4.addClass("ricBalloonAlert");break;case"info":A4.addClass("ricBalloonInfo");break}var A2='<img src="'+j+'" class="ricBalloonPointer" /><img src="'+j+'" class="ricBalloonTopLeft" /><img src="'+j+'" class="ricBalloonTopRight" /><div class="ricBalloonTopCenter"></div>';
var A3=Ag.c("div").addClass("ricBalloonContent").append(A0.content||"").css("height",A0.height||"");if(A0.clickToHide){A4.addClass("ricBalloonClickToHide");A4.bind("click",function(){Ricola.component.balloon.toggle(this,false)})}if(A0.addHideText){A3.append(Ag.c("div").addClass("ricBalloonHideText").text("Click to hide"))}A4.bind("mouseenter.balloon mouseleave.balloon",function(){Ag(this).toggleClass("ricBalloonHover")});var A1='<img src="'+j+'" class="ricBalloonBottomLeft" /><img src="'+j+'" class="ricBalloonBottomRight" /><div class="ricBalloonBottomCenter"></div>';A4.append(A2).append(A3).append(A1);return A4[0]},content:function(A0,j){var e=Ag("> div.ricBalloonContent:eq(0)",A0);if(j){e.html(j)}return e[0]},toggle:function(A1,j,A2,e){var j=j!==undefined?j:!Ag(A1).is(":visible");var A0=Ag("> div.ricBalloonContent",A1)[0];if(j){Ag(A1).trigger("ricolaBalloonShow",[A0]);if(A2){Ricola.component.balloon.position(A1,A2,e)}Ag(A1).show()}else{Ag(A1).hide().trigger("ricolaBalloonHide",[A0])}},position:function(j,A0,e){if(e){Ag(j).removeClass("ricBalloonAbove ricBalloonBelow ricBalloonLeft ricBalloonRight");
switch(e){case"below":case"left":case"right":Ag(j).addClass("ricBalloon"+Ag.ucword(e));break;default:Ag(j).addClass("ricBalloonAbove");break}}var A1=[];if(Ag(j).is(".ricBalloonAbove")){A1=[9,10,4,3,7,6,0,1]}else{if(Ag(j).is(".ricBalloonLeft")){A1=[7,6,4,3,0,1,9,10]}else{if(Ag(j).is(".ricBalloonRight")){A1=[0,1,7,6,9,10,4,3]}else{A1=[4,3,9,10,0,1,7,6]}}}Ag(j).positionBy({target:A0,positions:A1,addClass:true}).setZIndex(A0)},destroy:function(){}};AG("ricWizard",function(j,e){Ag("ol.ricWizard",e).ricolaWizard()});Ag.fn.ricolaWizard=function(){return this.each(function(){var A2=Ag.c("div").addClass("ricWizard").attr("id",Ag(this).getAttr("id",Ricola.getNewId()));var A1=Ag.c("h2").html(Ag(this).attr("ric:title")||"Wizard");A2.append(A1);var e=Ag.c("table").addClass("ricWizard");A2.append(e);var j=Ag.c("tr");e.append(j);A2.attr("ric:disablelinks",Ag(this).getAttr("ric:disablelinks","yes"));var A0=0;Ag("> li",this).each(function(A3){if(Ag(this).is(".ricWizardActive")){A0=A3+1}var A6=Ag.c("td");
j.append(A6);var A5=Ag.c("div");A6.append(A5);var A4=Ag.c("div").append(Ag.c("h2").html("Step "+(A3+1))).append(this.childNodes||[]);A5.append(A4)});Ag(j).find("td:first-child div").addClass("ricWizardFirst").end().find("td:last-child").addClass("ricWizardLast").after('<td class="ricWizardImgEnd"/>').end();Ag(this).after(A2).remove();Ag(A2).ricolaWizardStep(A0)})};function AA(j){j.stopPropagation();j.preventDefault();return false}Ag.fn.ricolaWizardStep=function(A0){if(Ag(this).is(".ricWizard")){if(A0!=undefined){if(A0>Ag(this).ricolaWizardSteps()){return false}A0-=1;var A1=Ag("tr",this),j=A1.find("td"),e=j.length;j.removeClass("ricWizardCompleted ricWizardActive ricWizardNext").find("a").show().end().find("span").hide().end().end();A1.find("td:lt("+A0+")").addClass("ricWizardCompleted").end().find("td:eq("+A0+")").addClass("ricWizardActive").next().addClass("ricWizardNext").end().end();if(A0+1==e-1){A1.find("td:last").addClass("ricWizardEndActive").end()}if(Ag(this).attr("ric:disablelinks")=="yes"){A1.find("td:eq("+A0+"),td:gt("+A0+")").each(function(){var A2=Ag(this).find("> div > div > a");
var A3=Ag(this).find("> div > div > span.ricWizardStepLabel");if(A2.size()==1&&A3.size()==0){A2.hide();Ag("> div > div",this).append('<span class="ricWizardLabel">'+A2.html()+"</span>")}else{if(A3.size()==1){A2.hide();A3.show()}}})}return true}else{return(Ag("td",this).index(Ag("td.ricWizardActive",this)[0])+1)}}return -1};Ag.fn.ricolaWizardSteps=function(){if(Ag(this).is(".ricWizard")){return Ag("table.ricWizard td",this).size()}return -1};Ricola.component.curtain={create:function(A0,e){A0=A0||Ricola.getNewId();e=Ag.extend({hide:false},e);if(Ag("#"+A0).length==1){return A0}var j=Ag.c("div").attr("id",A0).addClass("ricCurtain").ricolaSetZIndex();if(e.hide){j.html("<div>Double Click to Hide</div>").bind("dblclick",function(){Ricola.component.curtain.remove(A0)})}if(Ricola.browser.ie6){Ag(j).append(Ag.c("iframe").attr("src","javascript:false;"))}Ag("body").append(j);if(Ricola.browser.ie6){Ag(window).bind("scroll.curtain ricolaResize.curtain",function(){Ag("#"+A0).css({left:Ag(window).scrollLeft(),top:Ag(window).scrollTop(),height:Ag(window).height(),width:Ag(window).width()})
})}return A0},remove:function(j){if(j){Ag("#"+j).remove()}else{var e=Ag("body > div.ricCurtain");Ag(e[e.length-1]).remove()}if(Ricola.browser.ie6){Ag(window).unbind("scroll.curtain ricolaResize.curtain")}},destroy:function(){Ricola.component.curtain.remove()}};Ag.fn.ricolaCurtainCreate=function(e){return this.each(function(){Ag(this).after(Ag.c("div").addClass("ricCurtain ricCurtainInline").positionBy({target:this,positionTo:"insideLeft",addClass:true})).next().width(Ag(this).outerWidth()).height(Ag(this).outerHeight())})};Ag.fn.ricolaCurtainRemove=function(e){return this.each(function(){Ag(this).nextAll(".ricCurtainInline:eq(0)").remove()})};AG("button",function(A0,j,A1,e){if(U){Ag("button",j).ricolaButton()}else{Ag("input, button",j).filter(":submit,:reset,:button").each(function(){Ag(this).ricolaButton(e)})}});Ag.fn.ricolaButtonReady=function(){this.filter("button").addClass("ricButtonLoaded").each(function(){Ag(this).bind("mousedown",function(){Ag(this).parent().parent().addClass("ricButton2Down")
}).bind("mouseup mouseout",function(){Ag(this).parent().parent().removeClass("ricButton2Down")}).bind("mouseenter",function(){Ag(this).parent().parent().addClass("ricButton2Hover")}).bind("mouseleave",function(){Ag(this).parent().parent().removeClass("ricButton2Hover")}).bind("focus blur",function(j){Ag(this).parent().parent()[(j.type=="focus"?"add":"remove")+"Class"]("ricButton2Hover")});if(Ricola.browser.ie6||Ricola.browser.ie7){this.$ricName=Ag(this).attr("name");Ag(this).removeAttr("name");Ag(this).bind("click",function(){if(this.$ricName){Ag(this).attr("name",this.$ricName)}})}});return !Ricola.browser.ie6&&!Ricola.browser.ie7?this:this.ricolaComponentReady("button",function(j,e){Ag(e).filter("button.ricButtonAuto").each(function(){if(Ag(this).outerWidth()>=182){Ag(this).addClass("ricButtonMax")}})})};if(Ricola.browser.ie7){var AZ=0;Ag(window).bind("scroll",function(){clearTimeout(AZ);AZ=setTimeout(function(){Ag("button").each(function(){var e=this.style.visibility;this.style.visibility="hidden";
this.style.visibility=e})},35)})}function Y(j){var e=Ag(this);j[(e.is(".ricButton2Convert")?"add":"remove")+"Class"]("ricButton2Convert");j[(e[0].disabled?"add":"remove")+"Class"]("ricButton2Disabled")}Ag.fn.ricolaButton=function(e){if(U){return this.ricolaButtonReady()}return this.not(".ricButtonLoaded").each(function(){var A0,j=Ag(e).is(".ricButton2");if(Ag(this).is("input")){A0=AV.call(this)}else{A0=Ag(this)}if(!A0[0].className.match(/ricButton(Tiny|Small|Medium|Large|XLarge|Auto)/)){A0.addClass("ricButtonMedium")}if(!j){A0.wrap('<span class="ricButton2Top ricButton2"><span class="ricButton2"></span></span>');Y.call(A0.get(0),A0.parent().parent())}else{Y.call(A0.get(0),Ag(e).parent())}A0.ricolaButtonReady()})};function AV(){var e=Ag('<button type="'+this.type+'" class="'+(this.className+" "||"")+'ricButton2Convert">'+this.value+"</button>"),j=Ag(this);e.attr({id:j.attr("id"),name:j.attr("name"),title:j.attr("title"),accesskey:j.attr("accesskey"),tabindex:j.attr("tabindex"),value:j.val(),disabled:j.attr("disabled")});
if(jQuery.isFunction(this.onclick)){e.bind("click",this.onclick)}j.after(e).remove();return e}Ag.fn.ricolaButtonLabel=function(e){if(e===undefined){return Ag(this).text()}if(Ag(this).is("button")){Ag(this).html(e)}return this};Ag.fn.ricolaButtonDisabled=Ag.fn.ricolaButtonDisable=function(e){return this.each(function(){if((e===undefined&&this.disabled==false)||e){Ag(this).attr("disabled","disabled").parents(".ricButton2Top").addClass("ricButton2Disabled")}else{Ag(this).removeAttr("disabled").parents(".ricButton2Top").removeClass("ricButton2Disabled")}})};Ag.fn.ricolaButtonSize=function(e){var j={tiny:"ricButtonTiny",small:"ricButtonSmall",medium:"ricButtonMedium",large:"ricButtonLarge",xlarge:"ricButtonXLarge",auto:"ricButtonAuto",ricButtonTiny:"ricButtonTiny",ricButtonSmall:"ricButtonSmall",ricButtonMedium:"ricButtonMedium",ricButtonLarge:"ricButtonLarge",ricButtonXLarge:"ricButtonXLarge",ricButtonAuto:"ricButtonAuto"};return this.each(function(){Ag(this).removeClass("ricButtonTiny ricButtonSmall ricButtonMedium ricButtonLarge ricButtonXLarge ricButtonAuto").addClass((j[e]!==undefined?j[e]:"ricButtonMedium"))
})};Ricola.component.button={setEnabled:function(e,j){if(j!==undefined){j=!j}Ag(e).ricolaButtonDisabled(j)},setSize:function(e,j){Ag(e).ricolaButtonSize(j)}};AG("addressBook",function(A0,j,A1){var e=Ag("input.ricAddressBook",j);if(U){e.ricolaAddressBookAddEvents()}else{e.ricolaAddressBook()}});Ag.fn.ricolaAddressBook=function(){return this.not(".ricAddressBookLoaded").each(function(){if(!Ag(this).parent(".ricAddressBookWrapper").length){Ag(this).wrap(Ag.c("div").addClass("ricAddressBookWrapper ricInlineWrapper"))}}).ricolaAddressBookAddEvents()};Ag.fn.ricolaAddressBookAddEvents=function(){return this.not(".ricAddressBookLoaded").addClass("ricAddressBookLoaded").each(function(){var e=this;Ag(this).parents(".ricAddressBookWrapper:eq(0)").bind("click",function(j){if(Ag(j.target).is(".ricAddressBookWrapper")){Ricola.addressBook.lookup(function(A3){var A1=Ag(e).getAttr("ric:addressbookdata","fullname");var A4="";for(var A0=0,A2=A3.length;A0<A2;A0++){if(A3[A0][A1]&&A3[A0][A1]!=""){A4+=A3[A0][A1]+((A0+1)<A2?", ":"")
}}Ag(e).val(A4).trigger("focus");Ag(e).trigger("ricolaAddressBookData",[A3])});return false}})})};Ricola.addressBook={lookup:function(e){Ricola.component.modal.create({type:"iframe",url:Ricola.core.secureAppURL("addressbook","addressbook.html"),width:"500px",height:"376px",onreturn:function(A0,j){Ag(this).ricolaModalClose();e(j)}})}};AG("ricCalendar2",function(A0,j,A1){var e=Ag("input.ricCalendar",j);if(U){e.ricolaCalendarAddEvents()}else{e.ricolaCalendar()}});Ag(window).bind("ricolaResize",function(){Ag("table.ricCalendarWrapper").each(function(){Ag(this).positionBy({target:Ag(this).data("positionByTarget"),targetPos:3,elementPos:0})})});Ag.fn.ricolaCalendar=function(){return this.not(".ricCalendarLoaded").each(function(){if(!Ag(this).parent(".ricCalendarInputWrapper").length){Ag(this).wrap(Ag.c("div").addClass("ricCalendarInputWrapper ricInlineWrapper").attr("title","Show Calendar"))}}).ricolaCalendarAddEvents()};Ag.fn.ricolaCalendarAddEvents=function(){return this.not(".ricCalendarLoaded").addClass("ricCalendarLoaded").each(function(){Ag(this).parents(".ricCalendarInputWrapper:eq(0)").bind("click",function(A0){var e=Ag(A0.target).find("input");
if(!Ag(A0.target).is(".ricCalendarInputWrapper")||e.is(".ricCalendarActive")){return }var A5=Ag(this);if(e[0].disabled){return false}var A4=e.ricolaGetFieldValue(),A1=e.getAttr("ric:select","single"),j=[];if(A4==""){var A3=new Date();A4=(A3.getMonth()+1)+"/"+A3.getDate()+"/"+A3.getFullYear()}else{j=Ricola.calendar.util.getDatesFromString(A4);A4=j[0]}e.addClass("ricCalendarActive");var A2=Ricola.calendar.create({select:A1,holiday:e.getAttr("ric:holiday","disabled"),weekend:e.getAttr("ric:weekend","disabled"),after:e.getAttr("ric:after","01/01/1975"),before:e.getAttr("ric:before","12/31/2031"),focusdate:A4,target:e[0],selected:j},function(A6){e.removeClass("ricCalendarActive").val(A6.join(",")).trigger("ricolaCalendarSelected",[A6]).blur().focus()})}).data("ricolaCalendarElement",this)})};Ricola.calendar={monthName:["January","February","March","April","May","June","July","August","September","October","November","December"],holidayName:{newYears:"New Years",presidentsDay:"President's Day",goodFriday:"Good Friday",memorialDay:"Memorial Day",independenceDay:"Independence Day",laborDay:"Labor Day",thanksgivingDay:"Thanksgiving Day",thanksgivingFriday:"Day After Thanksgiving",christmasEve:"Christmas Eve",christmasDay:"Christmas Day",newYearsEve:"New Year's Eve"},create:function(e,A2){var A1=new Date();
var e=Ag.extend({holiday:"enable",select:"single",weekend:"disable",after:"01/01/1975",before:"12/31/2031",focusdate:((A1.getMonth()+1)+"/"+A1.getDate()+"/"+A1.getFullYear()),target:null,range:[],selected:[],dates:{}},e);if(e.select=="range"){if(e.selected.length==0){var A1=new Date();A1.setHours(0);A1.setMinutes(0);A1.setSeconds(0);A1.setMilliseconds(0);e.range=[A1.getTime(),A1.getTime()]}else{e.range=[Ricola.calendar.util.toTimestamp(e.selected[0]),Ricola.calendar.util.toTimestamp(e.selected[e.selected.length-1])]}}else{for(var j=0;j<e.selected.length;j++){var A1=this.util.parseDate(e.selected[j]);if(A1){e.dates[A1.getTime()]=A1.getTime()}}}var A0=A(e);Ag(A0).trigger("ricolaCalendarRender").bind("ricolaCalendarSelected",function(A3,A7){var A6=[];var A5=Ag(this).data("ricolaCalendarData");if(A5.select=="range"){if(!isNaN(A5.range[0])&&!isNaN(A5.range[1])){var A8=new Date();A8.setHours(0);A8.setMinutes(0);A8.setSeconds(0);A8.setMilliseconds(0);A8.setTime(A5.range[0]);A6.push(Ricola.calendar.util.dateToString(A8));
A8.setTime(A5.range[1]);A6.push(Ricola.calendar.util.dateToString(A8))}}else{for(var A4 in A7){if(!isNaN(A4)){var A8=new Date();A8.setTime(A4);A6.push(Ricola.calendar.util.dateToString(A8))}}}A2(A6)});Ag(A0).ricolaAppendToParentFromAnchor(e.target);if(e.target!=null){Ag(A0).positionBy({target:Ag(e.target)[0],targetPos:3,elementPos:0})}return A0},util:{getDatesFromString:function(A6){var A1=Ricola.validate.getValidator("date"),A5=Ricola.validate.getValidator("dateWithYear"),A3=[];for(var A0=0,A2=A6.split(","),e=A2.length,A4;A0<e;A0++){if(A1.validate(A2[A0])||A5.validate(A2[A0])){A3.push(A5.format(A2[A0],true))}}return A3},formatDate:function(e){if(e.substr(1,1)=="/"){e="0"+e}if(e.substr(4,1)=="/"){e=e.substr(0,3)+"0"+e.substr(3)}if(e.length==8){e=e.substr(0,6)+"20"+e.substr(-2)}return e},parseDate:function(A0){if(A0.indexOf("+")>-1||A0.indexOf("-")>-1){var A2=new Date();A2.setHours(0);A2.setMinutes(0);A2.setSeconds(0);A2.setMilliseconds(0);A2.setTime(A2.getTime()+(parseInt(A0,10)*86400000))
}else{var j=A0;A0=this.formatDate(A0);var A1=parseInt(A0.substr(0,2),10)-1;var e=A0.substr(3,2);var A3=A0.substr(A0.length-4);var A2=new Date();A2.setFullYear(A3,A1,e);A2.setHours(0);A2.setMinutes(0);A2.setSeconds(0);A2.setMilliseconds(0)}return A2},toTimestamp:function(e){var j=this.parseDate(e);return(j?j.getTime():0)},dateToString:function(e){return this.formatDate((e.getMonth()+1)+"/"+e.getDate()+"/"+e.getFullYear())},getDaysInMonth:function(A6){var e=new Date();e.setHours(0);e.setMinutes(0);e.setSeconds(0);e.setMilliseconds(0);var A5=[];var A3=new Date();A3.setTime(A6.getTime());A3.setHours(0);A3.setMinutes(0);A3.setSeconds(0);A3.setMilliseconds(0);var j=A6.getMonth();var A2=0;for(var A1=1;A1<32;A1++){A3.setDate(A1);var A0=A3.getMonth();if(A0>j){break}var A4=A3.getDay();if(A4==0&&A1!=1){A2++}A5.push({day:A4,date:A3.getDate(),month:A3.getMonth(),year:A3.getFullYear(),timestamp:A3.getTime(),weekend:(A4==0||A4==6),weekInMonth:A2,isToday:A3.getTime()==e.getTime()})}return A5}}};Ricola.calendar.UPHoliday={"1206075600000":Ricola.calendar.holidayName.goodFriday,"1239339600000":Ricola.calendar.holidayName.goodFriday,"1270184400000":Ricola.calendar.holidayName.goodFriday,"1303448400000":Ricola.calendar.holidayName.goodFriday,"1333688400000":Ricola.calendar.holidayName.goodFriday,"1364533200000":Ricola.calendar.holidayName.goodFriday,"1397797200000":Ricola.calendar.holidayName.goodFriday,"1428037200000":Ricola.calendar.holidayName.goodFriday};
(function(){var A2=Ricola.calendar;for(var A1=2000;A1<2030;A1++){var A3=new Date();A3.setHours(0);A3.setMinutes(0);A3.setSeconds(0);A3.setMilliseconds(0);A3.setFullYear(A1,0,1);A2.UPHoliday[A3.getTime()]=A2.holidayName.newYears;for(var A0=1;A0<29;A0++){A3.setFullYear(A1,1,A0);if(A3.getDay()==1){A3.setFullYear(A1,1,A0+14);A2.UPHoliday[A3.getTime()]=A2.holidayName.presidentsDay;break}}for(var A0=1;A0<31;A0++){A3.setFullYear(A1,4,A0);if(A3.getDay()==1){for(var e=1;((e*7)+A0)<=31;e++){}e--;A3.setFullYear(A1,4,A0+(e*7));A2.UPHoliday[A3.getTime()]=A2.holidayName.memorialDay;break}}A3.setFullYear(A1,6,4);A2.UPHoliday[A3.getTime()]=A2.holidayName.independenceDay;for(var A0=1;A0<30;A0++){A3.setFullYear(A1,8,A0);if(A3.getDay()==1){A2.UPHoliday[A3.getTime()]=A2.holidayName.laborDay;break}}for(var A0=1;A0<31;A0++){A3.setFullYear(A1,10,A0);if(A3.getDay()==4){for(var e=1;((e*7)+A0)<31;e++){}e--;A3.setFullYear(A1,10,A0+(e*7));A2.UPHoliday[A3.getTime()]=A2.holidayName.thanksgivingDay;A3.setFullYear(A1,10,A0+(e*7)+1);
A2.UPHoliday[A3.getTime()]=A2.holidayName.thanksgivingFriday;break}}A3.setFullYear(A1,11,24);A2.UPHoliday[A3.getTime()]=A2.holidayName.christmasEve;A3.setFullYear(A1,11,25);A2.UPHoliday[A3.getTime()]=A2.holidayName.christmasDay;A3.setFullYear(A1,11,31);A2.UPHoliday[A3.getTime()]=A2.holidayName.newYearsEve}})();function A(e){var j='<table class="ricCalendarWrapper" cellspacing="0" cellpadding="0"><thead><tr class="ricCalendarYear"><th class="ricCalendarYearPrev">&laquo;</th><th class="ricCalendarYear">2008</th><th class="ricCalendarYearNext">&raquo;</th></tr><tr class="ricCalendarMonth"><th class="ricCalendarMonthPrev">&laquo;</th><th class="ricCalendarMonth">June</th><th class="ricCalendarMonthNext">&raquo;</th></tr></thead><tfoot><tr><td colspan="3"><span class="ricCalendarFinished">Close</span><span class="ricCalendarToday">Find Today</span><div class="ricCalendarRange"></div></td></tr></tfoot><tbody><tr><td colspan="7"><table class="ricCalendar2" cellspacing="2" cellpadding="0"><thead><tr><th>S</th><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th></tr></thead><tbody class="ricCalendarDays"><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table></td></tr></tbody></table>';
var A0=Ag(j);A0.setZIndex(e.target);A0.data("ricolaCalendarData",e).bind("ricolaCalendarRender",AB).find("th.ricCalendarYearPrev,th.ricCalendarYearNext,th.ricCalendarMonthPrev,th.ricCalendarMonthNext").bind("click",function(){var A4=Ag(this).parent().parent().parent();var A2=A4.data("ricolaCalendarData");var A3=Ricola.calendar.util.parseDate(A2.focusdate);var A6=A3.getFullYear();var A1=A3.getDate();var A5=A3.getMonth();if(Ag(this).hasClass("ricCalendarYearPrev")){A6-=1}else{if(Ag(this).hasClass("ricCalendarYearNext")){A6+=1}else{if(Ag(this).hasClass("ricCalendarMonthPrev")){A5-=1}else{if(Ag(this).hasClass("ricCalendarMonthNext")){A5+=1}}}}A3.setFullYear(A6,A5,A1);A6=A3.getFullYear();A1=A3.getDate();A5=(A3.getMonth()+1);A2.focusdate=A5+"/"+A1+"/"+A6;A4.trigger("ricolaCalendarRender")}).end().find("span.ricCalendarToday").bind("click",function(){var A2=Ag(this).parents("table.ricCalendarWrapper");var A1=A2.data("ricolaCalendarData");var A3=new Date();A3.setHours(0);A3.setMinutes(0);A3.setSeconds(0);
A3.setMilliseconds(0);A1.focusdate=(A3.getMonth()+1)+"/"+A3.getDate()+"/"+A3.getFullYear();A2.trigger("ricolaCalendarRender")}).end().find("span.ricCalendarFinished").bind("click",function(){Ag(this).parents("table.ricCalendarWrapper").trigger("ricolaCalendarFinished")}).end().find("tbody.ricCalendarDays > tr > td").bind("mouseover",function(){if(!Ag(this).hasClass("ricCalendarDisabled")){Ag(this).addClass("ricCalendarHover")}}).bind("mouseout",function(){Ag(this).removeClass("ricCalendarHover")}).bind("click",function(){if(!Ag(this).hasClass("ricCalendarDisabled")){var A5=Ag(this).parents("table.ricCalendarWrapper");var A2=A5.data("ricolaCalendarData");var A1=Ag(this).data("ricolaCalendarData");if(A2.select=="single"){Ag(this).parent().parent().find("td").removeClass("ricCalendarSelected");A2.dates={};A2.dates[A1.timestamp]=A1.timestamp;A5.trigger("ricolaCalendarFinished");return false}else{if(A2.select=="multiple"){if(A2.dates[A1.timestamp]){delete A2.dates[A1.timestamp]}else{A2.dates[A1.timestamp]=A1.timestamp
}}else{if(A2.select=="range"){var A6=A2.range.length;if(A6==0){A2.range=[A1.timestamp,A1.timestamp]}else{if(A2.range[0]==A2.range[1]){A2.range[A1.timestamp<A2.range[0]?0:1]=A1.timestamp}else{var A4=Math.abs(A2.range[0]-A1.timestamp);var A3=Math.abs(A2.range[1]-A1.timestamp);if(A4==0){A2.range[1]=A1.timestamp}else{if(A3==0){A2.range[0]=A1.timestamp}else{A2.range[A4<A3?0:1]=A1.timestamp}}}}}}}h.apply(A5[0])}}).end().bind("ricolaCalendarFinished",function(){var A1=Ag(this).data("ricolaCalendarData");Ag(this).trigger("ricolaCalendarSelected",[A1.dates]).remove()});if(e.select=="range"){Ag("div.ricCalendarRange",A0).bind("click",function(A3){if(Ag(A3.target).hasClass("ricCalendarRange0")||Ag(A3.target).hasClass("ricCalendarRange1")){var A2=Ag(this).parents("table.ricCalendarWrapper");var A1=A2.data("ricolaCalendarData");A1.focusdate=Ag(A3.target).html();A2.trigger("ricolaCalendarRender")}})}return A0[0]}function AB(){var A0=Ag(this).data("ricolaCalendarData");var A1=Ricola.calendar.util.parseDate(A0.focusdate);
var A3=Ricola.calendar.util.getDaysInMonth(A1);var j=Ag("table.ricCalendar2 > tbody",this);Ag("td",j).html("&nbsp;").attr("title","").data("ricolaCalendarData",null).each(function(){this.className=""});Ag("th.ricCalendarYear",this).html(A3[0].year);Ag("th.ricCalendarMonth",this).html(Ricola.calendar.monthName[A3[0].month]);Ag("> tr:eq(0) > td:lt("+A3[0].day+")",j).addClass("ricCalendarDisabled ricCalendarNotADay");var A5=A3[A3.length-1];Ag("> tr:eq("+A5.weekInMonth+") > td:gt("+A5.day+")",j).addClass("ricCalendarDisabled ricCalendarNotADay");Ag("> tr:gt("+A5.weekInMonth+") > td",j).addClass("ricCalendarDisabled ricCalendarNotADay");var A4=Ricola.calendar.util.toTimestamp(A0.after);var A2=Ricola.calendar.util.toTimestamp(A0.before);var e=Ricola.calendar.UPHoliday;Ag.each(A3,function(A7,A6){var A8=Ag("> tr:eq("+A6.weekInMonth+") > td:eq("+A6.day+")",j);if(A0.weekend=="disable"&&A6.weekend){A8.addClass("ricCalendarDisabled")}if(A0.holiday!="hidden"&&e[A6.timestamp]!==undefined){A8.attr("title","UP Holiday: "+e[A6.timestamp]);
A8.addClass("ricCalendarHoliday");if(A0.holiday=="disable"){A8.addClass("ricCalendarDisabled")}}if(A6.isToday){A8.addClass("ricCalendarToday")}if(A6.timestamp<=A4||A6.timestamp>=A2){A8.addClass("ricCalendarDisabled")}A8.html(A6.date);A8.data("ricolaCalendarData",A6)});h.apply(this)}function h(){var A0=Ag(this).data("ricolaCalendarData");var j=Ricola.calendar.UPHoliday;var e=A0.select=="range";if(A0.select=="range"){A0.dates={};for(var A1=A0.range[0];A1<=A0.range[1];){A0.dates[A1]=A1;A1+=86400000}}Ag("table.ricCalendar2 > tbody td",this).removeClass("ricCalendarSelected ricCalendarRange").each(function(){var A5=Ag(this);var A4=A5.data("ricolaCalendarData");if(A4==undefined){return }if(A0.dates[A4.timestamp]!==undefined){if(e&&(A4.timestamp>(A0.range[0]+86399999))&&A4.timestamp<A0.range[1]){A5.addClass("ricCalendarRange")}else{A5.addClass("ricCalendarSelected")}}});if(e&&A0.range.length==2){var A3=new Date();A3.setTime(A0.range[0]);var A2=new Date();A2.setTime(A0.range[1]);Ag("div.ricCalendarRange",this).css("display","block").html('<span class="ricCalendarRangeLabel">Selected:</span> <span class="ricCalendarRange0">'+Ricola.calendar.util.dateToString(A3)+'</span> to <span class="ricCalendarRange1">'+Ricola.calendar.util.dateToString(A2)+"</span>")
}}AG("ricCityState",function(A0,j,A1){var e=Ag("input.ricCityState",j);if(U){e.ricolaCityStateAddEvents()}else{e.ricolaCityState()}});Ag.fn.ricolaCityState=function(){return this.not(".ricCityStateLoaded").each(function(){if(!Ag(this).parent(".ricCityStateWrapper").length){Ag(this).wrap(Ag.c("div").addClass("ricCityStateWrapper ricInlineWrapper").attr("title","Select a City/State"))}}).ricolaCityStateAddEvents()};Ag.fn.ricolaCityStateAddEvents=function(){return this.not(".ricCityStateLoaded").addClass("ricCityStateLoaded").each(function(){var e=this;Ag(this).parents(".ricCityStateWrapper:eq(0)").click(function(j){if(Ag(j.target).is(".ricCityStateWrapper")){Ricola.component.modal.create({type:"iframe",url:Ricola.core.appURL("citystate","citystate.html"),width:"500px",height:"400px",onreturn:function(A1,A0){Ag(e).val(A0.city+", "+A0.state.code).trigger("focus");Ag(this).ricolaModalClose();Ag(e).trigger("ricolaCityStateData",[A0])}})}})})};if(!U){AG("ricIcon",function(j,e){Ag("img,input",e).filter(".ricIcon").filter("img,:image").ricolaIcon()
})}function J(e){return e.substr(0,1).toUpperCase()+e.substr(1).toLowerCase()}function V(j,e){e=(e||"").toUpperCase();return"ricIcon ricIconLoaded"+(j?" ricIcon"+J(j||"")+(e&&e!="S"?"_"+e:""):"")}Ag.fn.ricolaIconFixDomain=function(){var e=Ricola.core.isEnvironment("local")&&Ricola.core.isLoadedCrossDomain();return !e?this:this.not(".ricIconLoaded").attr("src",Ricola.core.getImgSpacerURL()).addClass("ricIconLoaded")};Ag.fn.ricolaIcon=function(){if(U){return this.ricolaIconFixDomain()}return this.not(".ricIconLoaded").each(function(){if(!Ag(this).attr("src")){Ag(this).addClass(V(Ag(this).attr("ric:icon"),Ag(this).attr("ric:size"))).attr("src",Ricola.core.getImgSpacerURL())}}).ricolaIconFixDomain()};Ag.fn.ricolaIconSet=function(j,e){return this.filter(".ricIcon").attr("ric:icon",j).attr("ric:size",e||"").attr("src",Ricola.core.getImgSpacerURL()).each(function(){this.className=V(j,e)})};function s(e){if(Ag("#ricolaPleaseWait").size()==0){Ag("body").append(Ag.c("div").attr("id","ricolaPleaseWait").addClass("ricPleaseWait ricFullPageZIndex").append(Ag.c("div").attr("id","ricolaPleaseWaitMessage").addClass("ricPleaseWaitMessage").html(e||"Loading...")));
return true}return false}Ag.fn.ricolaPleaseWaitShow=function(e){return this.each(function(){var j=Ag.c("img").attr("src",Ricola.core.imgURL("pleasewait","loading-inline.gif")).addClass("ricPleaseWaitInline").setZIndexTransient(this);j.ricolaAppendToParentFromAnchor(this);Ag(j).positionBy({target:this,positionTo:e||"outsideRight"})})};Ag(window).bind("ricolaResize",function(){Ag("img.ricPleaseWaitInline").each(function(){Ag(this).positionBy({target:Ag(this).data("positionByTarget"),positionTo:Ag(this).data("positionByPositionTo")})})});Ag.fn.ricolaPleaseWaitHide=function(){return this.each(function(){var e=this;Ag("img.ricPleaseWaitInline").each(function(){if(Ag(this).data("positionByTarget")[0]==e){Ag(this).remove()}})})};if(!U){AG("forms",function(j,e){Ag("input",e).filter(":text,:password,:file").addClass("ricInputText").add(Ag("select,textarea",e)).each(function(){if(Ag(this).parent(".ricInputWrapper").length===0){var A0=(Ag(this).is("textarea")?" textarea":"")+(Ag(this).is("select")?(Ag(this).attr("multiple")?" ricInputWrapperSelectMultiple":" ricInputWrapperSelect"):"")+(Ag(this).attr("ric:required")=="yes"?" ricInputWrapperRequired":"");
if(A0){Ag(this).wrap(Ag.c("div").addClass("ricInputWrapper"+A0))}}})})}AI("forms",function(j,e){Ag(e).andSelfFind("form").ricolaForm()});Ag.fn.ricolaForm=function(){return this.filter("form").not(".ricolaFormLoaded").addClass("ricolaFormLoaded").bind("submit",function(e){Ag(document).trigger("ricolaFormSubmit",[this])}).bind("reset",function(e){var j=this;window.setTimeout(function(){Ag(document).trigger("ricolaFormAfterReset",[j])},10)})};AD("forms",function(){Ag(document).bind("ricolaValidateInvalid ricolaValidateValid",function(A1,j){var A0=Ag(j).parent(".ricInputWrapper");if(!A0.length&&A1.type=="ricolaValidateInvalid"){A0=Ag.c("div").addClass("ricInputWrapper"+(A1.type=="ricolaValidateInvalid"?" ricInputWrapperError":""));Ag(j).wrap(A0)}else{if(A0.length){A0[A1.type=="ricolaValidateValid"?"removeClass":"addClass"]("ricInputWrapperError")}}})});Ag.fn.ricolaGetFieldValue=function(e){return this.ricolaInputHintValue(e);return this.val(e)};Ag.fn.ricolaFieldDisabled=function(e){var j=Ag(this).attr("id");
Ag(this).ricolaValidateDisabled(e);Ag(this).attr("disabled",e);if(Ag(this).parent().is("label")){Ag(this).parent().filter("label").end()[(e?"remove":"add")+"Class"]("ricRequired")}else{Ag(this).parents().find("label").each(function(){if(e){if(Ag(this).attr("for")===j){Ag(this).removeClass("ricRequired");return false}else{return true}}else{return Ag(this).attr("for")===j?Ag(this).addClass("ricRequired"):""}})}};AG("ricInputHint",function(A0,j){var e=Ag("input.ricInputHint,textarea.ricInputHint,select.ricInputHint",j);if(!U){e.ricolaInputHint()}else{e.ricolaInputHintAddEvents()}});AD("ricInputHint",function(){Ag(document).bind("ricolaFormAfterReset",function(j,e){Ag(e).ricolaInputHintReset()}).bind("ricolaFormSubmit",function(j,e){if(!Ag(e).is(".ricFormInvalid")&&!Ag(e).is(".ricFormKeepInputHints")){Ag(e).ricolaInputHintClear()}})});Ag.fn.ricolaInputHint=function(e){return this.not(".ricInputHintLoaded").each(function(){var j=Ag(this);if(e){j.addClass("ricInputHint");if(e.text){j.attr("ric:inputhint",e.text)
}}if(j.is("select")){K.apply(this)}else{x.apply(this)}}).ricolaInputHintAddEvents()};Ag.fn.ricolaInputHintAddEvents=function(){return this.not(".ricInputHintLoaded").addClass("ricInputHintLoaded").each(function(){var e=Ag(this);e.addClass("ricInputHintLoaded").bind("focus",X).bind("blur",x);if(e.is("select")){e.bind("mouseover.ricolaInputHint",C)}else{e.bind("ricolaValueUpdated",x)}})};var Am={SELECTOR:".ricInputHint",DEFAULT_OPTION_VAL:"",HINTED_CLASS:"ricInputHintClass",HINT_ATTR:"ric:inputhint"};Ag.fn.ricolaInputHintClear=function(){return this.find(Am.SELECTOR).andSelf().filter(Am.SELECTOR).each(X).each(AJ).end()};Ag.fn.ricolaInputHintReset=function(){return this.find(Am.SELECTOR).andSelf().filter(Am.SELECTOR).each(x).each(K).end()};Ag.fn.ricolaInputHintValue=function(A0){var A1=Ag(this),e=A1.is(Am.SELECTOR);if(A0!==undefined){A1.val(A0);if(e){A1.each(x)}}else{var j=A1.val();if(e){return y(j,A1.attr(Am.HINT_ATTR))?Am.DEFAULT_OPTION_VAL:j}else{return j}}};Ag.fn.ricolaInputHintChange=function(e){var j=Ag(this);
if(j.is(Am.SELECTOR)){j.attr(Am.HINT_ATTR,e);j.val("");j.ricolaInputHintReset()}};function y(j,A1){var e=Ricola.util.normalizeNewLine(A1),A0=Ricola.util.normalizeNewLine(j);return A0===e}function K(){var A0=Ag(this),j=A0.attr(Am.HINT_ATTR);if(A0.is("select")){if(Ag("option.ricInputHintClass",A0).length===0){var e=new Option(j,Am.DEFAULT_OPTION_VAL);this.options[this.options.length]=e;this.selectedIndex=this.options.length-1;Ag(e).addClass(Am.HINTED_CLASS);if(Ricola.browser.ff){A0.addClass(Am.HINTED_CLASS)}}}}function C(){Ag(this).unbind("mouseover.ricolaInputHint");var e=Ag(this).outerWidth();if(e>0){Ag(this).css("width",e+"px")}}function AJ(){if(Ag(this).is("select")){Ag(this).addClass(Am.HINTED_CLASS)}}function X(){if(Ag(this).is("select")){Ag(this).removeClass(Am.HINTED_CLASS);Ag(this).trigger("mouseover")}else{if(y(Ag(this).val(),Ag(this).attr(Am.HINT_ATTR))){Ag(this).removeClass(Am.HINTED_CLASS);Ag(this).val("")}}}function x(){if(Ag(this).is("select")){Ag("option."+Am.HINTED_CLASS+":last:not(:selected)",this).remove()
}else{var j=Ag(this).attr(Am.HINT_ATTR),e=Ag(this).val();if(e===""||y(e,j)){Ag(this).addClass(Am.HINTED_CLASS);Ag(this).val(j)}else{Ag(this).removeClass(Am.HINTED_CLASS)}}}AG("ricTextareaLimit",function(j,e){Ag("textarea",e).not(".ricTextareaLimitLoaded").ricolaTextareaLimit()});Ag.fn.ricolaTextareaLimit=function(){return this.addClass("ricTextareaLimitLoaded").each(function(){if(Ag(this).attr("ric:maxchars")){Ag(this).bind("focus",function(){this.$maxchars=parseInt(Ag(this).attr("ric:maxchars")||0,10);var e=Ag.c("div").attr("id","ricolaTextareaLimitStatus").addClass("ricTextareaLimitStatus").setZIndexTransient(this);Ag("body").append(e);e.html(this.value.length+" of "+this.$maxchars).positionBy({target:this,targetPos:2,elementPos:1});function A1(){Ag("#ricolaTextareaLimitStatus").remove();Ag(this).unbind("blur",A1).unbind("keydown",j).unbind("keyup",A0)}function j(A4){this.$lastlength=this.value.length;if((this.value.length>=this.$maxchars)&&!Ricola.util.isMetaKey(A4)){if(!this.$blink){var A2=this,A3=Ag(A2).add("#ricolaTextareaLimitStatus").addClass("ricTextareaLimitBlink");
this.$blink=setTimeout(function(){A3.removeClass("ricTextareaLimitBlink");A2.$blink=false},500)}return false}}function A0(){var A2=this.value.length;Ag("#ricolaTextareaLimitStatus").html(A2+" of "+this.$maxchars);var A3=Math.abs(A2-this.$lastlength);if(A3>1||A2==0||A2==9||A2==10||A2==99||A2==100||A2==999||A2==1000){Ag("#ricolaTextareaLimitStatus").positionBy({target:this,targetPos:2,elementPos:1})}if(A2>this.$maxchars){Ag(this).val(this.value.substring(0,this.$maxchars))}}Ag(this).bind("blur",A1).bind("keydown",j).bind("keyup",A0).trigger("keyup")})}})};AG("ricAppMenu",function(A0,j){var e=Ag("ul.ricAppMenu",j);if(!U){e.ricolaAppMenu()}else{e.ricolaAppMenuAddEvents()}});AD("ricAppMenu",function(){Ag(window).bind("click.ricAppMenu",function(){Ag("ul.ricAppMenu ul:visible").ricolaAppMenuHide()})});var m={DELAY_SHOW:150,DELAY_HIDE:450};Ag.fn.ricolaAppMenu=function(){return this.not(".ricAppMenuLoaded").ricolaAppMenuAddEvents().each(function(){Ag("> li > ul",this).each(function(){var e=Ag(this).parent(),j=e.wrapInner('<div class="arrow"/>').find("> .arrow > ul");
e.append(j)})})};Ag.fn.ricolaAppMenuAddEvents=function(){return this.not(".ricAppMenuLoaded").addClass("ricAppMenuLoaded").each(function(){Ag("> li",this).bind("mouseenter.ricAppMenu mouseleave.ricAppMenu",function(e){var j=e.type=="mouseenter",A0=Ag("> ul",this);Ag(this).toggleClass("ricAppMenuHover");Ag("> a,> div.ricAppMenuPad",this).toggleClass("ricAppMenuChild");if(A0.length==1){clearTimeout(this.$ricAppMenuTimer);var A1=(j?O:AQ);this.$ricAppMenuTimer=setTimeout(function(){A1(A0[0])},j?m.DELAY_SHOW:m.DELAY_HIDE)}}).bind("click.ricAppMenu",function(e){var j=Ag("> ul",this);if(j.length==1){O(j);return false}Ag(this).parent().ricolaAppMenuHide();e.stopPropagation()})})};Ag.fn.ricolaAppMenuUnbind=function(){Ag("ul.ricAppMenuInit",this).unbind(".ricAppMenu").find("> a").unbind(".ricAppMenu")};Ag.fn.ricolaAppMenuHide=function(){return this.filter("ul").each(function(){AQ(this)})};function O(j){var j=Ag(j);if(j.is(":visible")){return }var e=j.parent();j.trigger("ricolaAppMenuShow").positionBy({target:e[0],targetPos:(!e.parent().hasClass("ricAppMenu")?1:3),elementPos:0,hideAfterPosition:true});
if(!j.hasClass("ricAppMenuInit")){j.addClass("ricAppMenuInit");Ag(j).ricolaAppMenuAddEvents();j.bgiframe();Ag("> li",j).each(function(){var A1=Ag("> ul",this),A2=Ag("> a",this),A0=A2.length>0?A2:Ag(this);if(A1.length>0){A0.prepend('<img src="'+Ricola.core.getImgSpacerURL()+'" class="arrow" />')}else{if(Ricola.browser.ie6){A0.prepend('<img src="'+Ricola.core.getImgSpacerURL()+'" class="ricAppMenuFixIE6" />')}}if(A2.length===0){Ag(this).wrapInner('<div class="ricAppMenuPad"/>');Ag(this).append(A1)}})}e.siblings("li").find("> ul:eq(0):visible").each(function(){AQ(this)});j.show()}function AQ(e){var e=Ag(e);e.filter(":not(.ricAppMenu)").find("> li > ul:eq(0):visible").each(function(){AQ(this)}).end().hide().trigger("ricolaAppMenuHide")}AG("ricSmartMenu",function(j,e,A0){if(A0){Ricola.jbus.subscribe("ricolaSmartMenuSelected",function(A1,A2,A3){switch(A2){case"_modal":Ricola.component.modal.create({type:"iframe",url:Ag(A1).attr("href"),ricolaIsDisabled:"yes",scrolling:"auto",title:Ag(A1).text()});
return false;default:if(Ag.isFunction(A3)){A3();return false}else{return true}}},window)}});Ag.fn.ricolaSmartMenuFilterType=function(e){return this.filter(".ricSmartMenu").map(function(){return !Ag(this).attr("ric:"+e)?null:this})};Ae("span.ricSmartMenu",function(e,j){Ag(this).addClass("ricSmartMenuLoaded").bind("mouseover",function(A0){return false}).bind("click",function(A0){if(!Ag(this).is(".ricSmartMenuActive")){Ag(this).addClass("ricSmartMenuActive");Aw();Aq(this)}return false})});function Aw(j){var A1=Ag("#ricolaSmartMenu"),A0=Ag(A1).attr("ric:target"),e=Ag("#"+A0);if(j&&A0!==Ag(j).attr("id")){return }e.unbind("mouseenter.smartmenu").unbind("mouseleave.smartmenu").unbind("mouseover.smartmenu").unbind("mouseout.smartmenu").removeClass("ricSmartMenuActive");Ar.apply(Ag("> ul",A1)[0]);A1.ricolaPleaseWaitHide().remove()}function c(A8,e,A5){var A6=Ricola.util.str;var A3=Ricola.util.stripHTML;for(var A2=0,A1=e.length;A2<A1;A2++){var A0=e[A2];var A9=Ag.c("li").appendTo(A8);if(A0.submenu&&A0.submenu.length>0){A9.append(Ag.c("div").addClass("ricSmartMenuArrow").append(A3(A0.label)));
var A4=Ag.c("ul").appendTo(A9);c(A4,A0.submenu,A5)}else{var A7=Ag.c("a").attr("href",A0.url?A0.url:"#").html(A3(A0.label)).bind("click",function(){return Ricola.jbus.trigger("ricolaSmartMenuSelected",this,A5,A0.click)});if(A0.target||(A5&&A5!="_modal")){A7.attr("target",A0.target||A5)}A9.append(A7)}Ag(A8).append(A9)}}function Aq(BD){var A4={},A3,BE;if(BD.attributes){for(var A9=0,A7=BD.attributes.length;A9<A7;A9++){var A5=BD.attributes[A9].nodeName;if(A5.indexOf("ric:")>-1){A3=(BD.attributes[A9].nodeValue||"").split(",");A4[A5.substr(4).toLowerCase()]=A3.length==1?A3[0]:A3}}}var A6=Ricola,A8=A6.util,A2=A6.core,BB=A8.str,BC=Ag.c("div").addClass("ricSmartMenu").attr("id","ricolaSmartMenu").html('<table id="ricolaSmartMenuKeyValues"></table><ul></ul>');$span=Ag(BD),newId=$span.ricolaGetId();Ag("body").append(BC.attr("ric:target",newId));BC.setZIndexTransient(BD).add(BD).bind("mouseenter.smartmenu",function(){clearTimeout(Ag("#ricolaSmartMenu").data("ricolaDestroyTimeout"))}).bind("mouseleave.smartmenu",function(j){var BG=setTimeout(function(){Aw(BD)
},550);Ag("#ricolaSmartMenu").data("ricolaDestroyTimeout",BG)}).bind("mouseover.smartmenu mouseout.smartmenu",function(){return false});var A1=function(){};A1.addKeyValue=function(BG,j){Ag("#ricolaSmartMenu > table").append('<tr><td class="ricSmartMenuLabel">'+BG+":</td><td>"+j+"</td></tr>")};A1.addMenuItem=function(j){c(Ag("#ricolaSmartMenu > ul")[0],[j],newId)};$span.find("dt").each(function(){A1.addKeyValue(Ag(this).html(),Ag(this).next("dd").html())});function A0(BG){var j=[];Ag(BG).find("> li").each(function(){var BH={label:Ag(this).childText()};Ag(this).find("> a").each(function(){BH.label=Ag(this).text();BH.url=Ag(this).attr("href");BH.click=Ag(this).attr("onclick");BH.target=Ag(this).attr("target")}).end();Ag(this).find("> ul").eq(0).each(function(){BH.submenu=A0(this)});j.push(BH)});return j}var e=$span.find("> ul").get(0);if(e){var BA=A0(e);for(var A7=0,A5=BA.length;A7<A5;A7++){A1.addMenuItem(BA[A7])}}Ag(document).trigger("ricolaSmartMenuShow",[A1,A4,BD]);BF();if($span.getAttr("ric:seamlessui","yes")!="no"){BC.ricolaPleaseWaitShow("outsideBottom").data("ricSmartMenuParams",A4);
Ricola.clientServices.seamlessUI.getMenu(A4,function(BH){var BG=Ag("#ricolaSmartMenu"),j=BG.find("> ul");if(!j.is(".ricSmartMenuSeamlessLoaded")&&Ag.objectsEqual(A4,BG.data("ricSmartMenuParams"))){j.addClass("ricSmartMenuSeamlessLoaded");j.find("> li:last").addClass("ricSmartMenuCustomItem");var BI={};if(BH.result==1){BI=[{label:"Error: "+BH.error}]}else{if(BH.data.length==0){BI=[{label:"No menu items found"}]}else{BI=BH.data}}c(j[0],BI,newId);AL.apply(j[0]);BG.ricolaPleaseWaitHide()}})}function BF(){AL.apply(Ag("#ricolaSmartMenu > ul")[0]);Ag("#ricolaSmartMenu").positionBy({target:BD,targetPos:3,elementPos:0})}}function AL(){Ag("> li",this).bind("mouseenter.smartmenu",function(){Ag(this).siblings("li").find("> ul").hide();Ag("> a",this).add(this).addClass("ricSmartMenuHover");if(Ag("> ul",this).length>0){var e=Ag("> ul",this);e.each(Ar).each(AL).show().positionBy({target:this,targetPos:1,elementPos:0});if(Ricola.browser.ie6){e.find("a").not(".ricSmartMenuFix").width(e.width()).addClass("ricSmartMenuFix")
}}}).bind("mouseleave.smartmenu",function(){Ag("> a",this).add(this).removeClass("ricSmartMenuHover");var e=this;setTimeout(function(){if(!Ag(e).hasClass("ricSmartMenuHover")){Ag("> ul",e).hide().each(Ar)}},550)})}function Ar(){Ag("> *",this).andSelf().unbind(".smartmenu")}Ricola.command=function(A0,j,e){var A1="_self";j=Ag.extend(j,{suiFunctionCommand:A0});j=Ag.lowerCaseKeys(j);e=Ag.extend({target:A1,success:function(A2){if(A2[0]){window.open(A2[0].url,e.target||A1)}},error:function(A2){throw new Error(A2)}},e);Ricola.clientServices.seamlessUI.getMenu(j,function(A2){if(A2.result==0){e.success(A2.data)}else{e.error(A2.error)}},true)};if(!U){AG("ricolaLookup",function(j,e){Ag("input.ricLookup",e).ricolaLookup()})}else{AI("ricolaLookup",function(j,e){Ag(e).andSelfFind("input.ricLookup").ricolaLookupAddEvents()})}Ag.fn.ricolaLookup=function(){return this.not(".ricLookupLoaded").each(function(){Ag(this).attr("autocomplete","off").ricolaLookupAddEvents()})};function r(){return parseInt(Ag(this).attr("ric:lookup_minlength"),10)||2
}Ag.fn.ricolaLookupAddEvents=function(){return this.not(".ricLookupLoaded").addClass("ricLookupLoaded").each(function(){this.$ricLookupData=Ag(this).attr("ric:lookupdata")||null;Ag(this).bind("keydown",function(e){var j=e.charCode||e.keyCode;if(j==27){F.apply(this);e.preventDefault();e.stopPropagation();return false}else{if(j==38){Ad.apply(this);return false}else{if(j==40){var A0=Ag(this).val();if(this.$ricLookupListActive){D.call(this)}else{if(A0.length>=r.call(this)){B.call(this,A0)}}return false}else{if(j==13||j==9){if(this.$ricLookupListActive){Aj.call(this,e);if(j==13){e.preventDefault();e.stopPropagation();return false}}}}}}}).bind("keyup",function(e){var j=e.charCode||e.keyCode;if(j==13||j==27){e.preventDefault();e.stopPropagation();return false}var A0=Ag(this).val();if(this.$ricLookupPrevious!=A0){if(A0.length>=r.call(this)){AR.call(this)}else{F.apply(this)}this.$ricLookupPrevious=A0}}).bind("blur",function(e){Ag(this).addClass("ricLookupBlur");var j=Ag.getById(Ag(this).attr("ric:lookup_id"));
if(!this.$ricLookupListActive||!j.is(".ricLookupListHover")){F.apply(this);e.stopPropagation();e.preventDefault();return false}}).bind("focus",function(e){Ag(this).removeClass("ricLookupBlur")})})};var AS={};Ricola.lookup={registerDataSource:function(j,e){if(!AS[j]){AS[j]=e}},getDataSource:function(e){if(AS[e]){return AS[e]}return null}};Ricola.lookup.registerDataSource("circ7",{lookup:function(A0,j,A1,e,A3){var A2={search:A0,occ:Ag(j).getAttr("ric:filterocc","yes")=="yes"};Ricola.clientServices.circ7(A2,function(A7){function A5(BB,BC){var BA=BC.substr(0,BB.length);if(BA.toLowerCase()==BB.toLowerCase()){return'<span class="ricLookupHighlight">'+BA+"</span>"+BC.substr(BB.length)}return BC}if(A7.result===0){Ag(A1).empty();var A9=[],A6=0,A8;for(var A4 in A7.data){A6++;var A8=A7.data[A4];A9.push('<li ric:lookupvalue="'+A8.circ7+'"><span class="ricLookupCirc7">'+A5(A0,A8.circ7)+'</span><span class="ricLookupCirc7City" title="'+A8.city+'">'+A5(A0,A8.city)+',</span><span class="ricLookupCirc7State">'+A5(A0,A8.state)+"</span></li>")
}if(A9.length===0){A9=['<li class="ricLookupNotFound">No results found...</li>']}Ag(A1).append(A9.join(""));Ag(e).html("Found "+A6+" records")}else{Ag(A1).append("ERROR: "+A7.error)}A3()})},getRecord:function(e,j){Ricola.clientServices.circ7(e,function(A0){j(A0)})}});Ricola.lookup.registerDataSource("generic",{lookup:function(A9,A3,A4,e,A8){var j=Ag(A3).attr("ric:genericurl");var A7=Ag(A3).attr("ric:select");function A1(BB,BC){var BA=BC.substr(0,BB.length);if(BA.toLowerCase()==BB.toLowerCase()){return'<span class="ricLookupHighlight">'+BA+"</span>"+BC.substr(BB.length)}return BC}function A6(BC){Ag(A4).empty();if(BC.result==0){var BE="";var BB=0;for(var BA in BC.data){BB++;var BD=BC.data[BA];BE+='<li ric:lookupvalue="'+BD.value+'"><span class="ricLookupGeneric">'+A1(A9,BD.label)+'</span>&nbsp;<span class="ricLookupGenericValue">('+A1(A9,BD.value)+")</span></li>"}Ag(e).html("Found "+BB+" records");if(BE==""){BE='<li class="ricLookupNotFound">No results found...</li>'}Ag(A4).append(BE)}else{Ag(A4).append("<li>Error: "+(BC.error||"Unknown error.</li>"))
}}if(j){var A2={search:A9};Ricola.clientServices.serviceRequest(j,A2,function(BA){A6(BA);A8()})}else{if(A7){var A5={result:0,data:[]},A0=Ag(A7);if(A0.length>0){Ag("option",A0).each(function(){var BB=Ag(this).text(),BA=Ag(this).attr("value");if(BB.toLowerCase().indexOf(A9.toLowerCase())===0||BA.toLowerCase().indexOf(A9.toLowerCase())===0){A5.data.push({label:BB,value:BA})}})}else{Ricola.log.error("lookup: Select element not found for generic lookup.")}A6(A5);A8()}else{Ricola.log.error("Must specify a url or select element for generic lookup component.")}}}});function Aj(A0){var A1=Ag("#"+Ag(this).attr("ric:lookup_id")).find("> div > ul"),e=Ag(this).val().toUpperCase(),j=Ag("> li.ricLookupSelected",A1),A2=j.attr("ric:lookupvalue");if(A2){Ag(this).val(A2);Ag(this).trigger("ricolaLookupSelected",[{circ7:Ag.trim(j.find(".ricLookupCirc7").text()),city:j.find(".ricLookupCirc7City").attr("title"),state:j.find(".ricLookupCirc7State").text()}]);Ag(this).trigger("ricolaValueUpdated");F.apply(this)
}}function F(){var e=this;this.$ricLookupListActive=false;setTimeout(function(){Ag("#"+Ag(e).attr("ric:lookup_id")).remove()},30)}function AR(){var j=this,e=Ag(this).val();this.$ricLookupListActive=false;clearTimeout(this.$ricLookupTimer);this.$ricLookupTimer=setTimeout(function(){if(!Ag(j).is(".ricLookupBlur")){B.call(j,e)}},350)}function B(A1){this.$ricLookupListActive=false;var A2=Ag("#"+Ag(this).attr("ric:lookup_id")+"> div > ul");if(!A2.length){A2=Ag.c("ul").addClass("ricLookupData");A2.bind("mousedown",function(A7){var A6=Ag(A7.target).parents().andSelf().filter("li:eq(0)");Aj.call(Ag.getById(A6.parents("div.ricLookupList").attr("ric:target"))[0],A7)}).bind("mouseover",function(A7){var A6=Ag(A7.target).parents().andSelf().filter("li:eq(0)");A6.addClass("ricLookupSelected").siblings().removeClass("ricLookupSelected")});var A5=Ag(this).ricolaGetId(),j=Ag.c("div").addClass("ricLookupList").attr("ric:target",A5).setZIndexTransient(this).append(Ag.c("div").addClass("ricLookupResults").append(A2)).append(Ag.c("div").addClass("ricLookupDetails"));
var e=j.ricolaGetId();Ag(this).attr("ric:lookup_id",e);j.bind("mouseenter",function(){var A7=Ag(this),A6=Ag.getById(A7.attr("ric:target"));A7.addClass("ricLookupListHover");A6.ricolaValidateDisabled(true)}).bind("mouseleave",function(){var A7=Ag(this),A6=Ag.getById(A7.attr("ric:target")).ricolaValidateDisabled(false);A7.removeClass("ricLookupListHover");A6.ricolaValidateDisabled(false)}).bind("click",function(){return false});Ag("body").append(j);j.positionBy({target:this,targetPos:3,elementPos:0});var A0=j.attr("ric:target");Ag(document).one("click.ricLookup",function(){F.apply(Ag.getById(A0)[0])})}A2.parent().next().html('<span class="ricLookupSearching">Searching...</span>');var A3=Ricola.lookup.getDataSource(this.$ricLookupData);if(A3){var A4=this;A3.lookup(A1,this,A2[0],A2.parent().next()[0],function(){A4.$ricLookupListActive=true;Ag("> li:not(.ricLookupNotFound):eq(0)",A2).addClass("ricLookupSelected");$listParent=A2.parent();if(A2.height()>175){if(Ricola.browser.ie6){$listParent.css("width",$listParent.width());
A2.css("height",$listParent.height())}$listParent.addClass("ricLookupOverflow")}else{if(Ricola.browser.ie6){$listParent.css("width","auto");A2.css("height","auto")}$listParent.removeClass("ricLookupOverflow")}A2.parent().parent().positionBy({target:A4,targetPos:3,elementPos:0})})}else{Ricola.log.error("No data source! "+this.$ricLookupData+" "+Ag(this).attr("ric:lookupdata"))}}function Ad(){var j=Ag("#"+Ag(this).attr("ric:lookup_id")).find("> div > ul"),e=Ag("> li.ricLookupSelected",j);if(e.prev().length==1){e.removeClass("ricLookupSelected").prev().addClass("ricLookupSelected");As.apply(j[0]);Ag(this).trigger("ricolaLookupSelect",[this,j.parent().parent()])}}function D(){var j=Ag("#"+Ag(this).attr("ric:lookup_id")).find("> div > ul"),e=Ag("> li.ricLookupSelected",j);if(e.next().length==1){e.removeClass("ricLookupSelected").next().addClass("ricLookupSelected");As.apply(j[0]);Ag(this).trigger("ricolaLookupSelect",[this,j.parent().parent()])}}function As(){var A2=Ag(this);if(A2.parent().hasClass("ricLookupOverflow")){var A0=A2.parent().scrollTop();
var e=A2.parent().height();var j=Ag("> li.ricLookupSelected",this);var A1=j.outerHeight();if(j[0].offsetTop<A0){A2.parent().scrollTop(j[0].offsetTop)}else{if((j[0].offsetTop+A1)>=(e+A0)){A2.parent().scrollTop(j[0].offsetTop-e+A1)}}}}Ae("a.ricPopUpWin",function(j,e){Ag(this).addClass("ricPopUpWinLoaded").bind("click",function(A1){var A2=Ag(this).getAttr("ric:type","medium");if(!this.target){this.target=A2+"_"+(new Date()).getTime()}if(Ag.isFunction(Ricola.popUpWin[A2])){var A0=Ricola.popUpWin[A2](this.href,this);if(A0!==null){A1.stopPropagation();A1.preventDefault;return false}}})});Ricola.popUpWin={blockedCallback:function(){alert("The new window was blocked. Do you have a pop-up blocker enabled?")},isBlocked:null,open:function(A0,A6,A1){if(this.isBlocked===null){var A3=window.open(null,"","width=100,height=100,top=10000,left=10000");try{A3.close();this.isBlocked=false}catch(A5){this.isBlocked=true;(A1||Ricola.popUpWin.blockedCallback)()}}if(this.isBlocked===false){var j="";var A8=Ag.extend({resizable:"yes",scrollbars:"yes",status:"no",toolbar:"no",location:"no",menubar:"no",left:"300",top:"100",directories:"no"},A6);
for(var A2 in A8){var A7=A8[A2];j+=(j==""?"":",")+A2+"="+A7}var A4=window.open(A0,"",j);return A4}return null},help:function(j,e){return this.open(j,{width:750,height:500,left:20,top:20},e)},small:function(j,e){return this.open(j,{width:125,height:125,scrollbars:"no"},e)},medium:function(j,e){return this.open(j,{width:400,height:400,scrollbars:"no"},e)},large:function(j,e){return this.open(j,{width:575,height:575,scrollbars:"no"},e)},custom:function(A1,A4,e){var A0=Ag(A4).getAttr("ric:options","").split(",");var A3={};for(var A2=0,j=A0.length;A2<j;A2++){var A5=A0[A2].split("=");A3[A5[0]]=A5[1]}return this.open(A1,A3,e)}};n("select.ricCombobox",function(A0,A4){var A2=Ag(this).width();var A1=Ag(this).attr("id");var A5="txt_"+A1;var A6=Ag(this);var j=35;var A3="ricComboboxLoaded";A6.bind("keydown",function(e){var A8=g(e);switch(A8){case 8:case 9:case 13:case 16:case 17:case 18:case 27:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 45:case 46:break;default:A6.children(":selected").removeAttr("selected");
A6.hide();if(document.getElementById(A5)==null){var A9=document.createElement("input");Ag(A9).width(A2).attr("type","text").attr("id",A5).attr("autocomplete","off").attr("maxlength",j).addClass("ricCombobox ricInputText");A6.after(A9);Ag(A9).focus();if(Ag.browser.msie){if(f()<7){var A7=document.selection.createRange();A7.move("character",1);Ag(A9).val(String.fromCharCode(A8))}}AT(A5,A6)}break}Ag("#"+A5).bind("blur",function(BA){var BB=true;A6.children().each(function(){if(!Ag(this).hasClass(A3)){if(Ag(this).text().toLowerCase()==Ag("#"+A5).val().toLowerCase()){Ag(this).attr("selected","selected");BB=false}}});if(!A6.children().hasClass(A3)&&BB){A6.prepend('<option class="'+A3+'" selected></option>')}if(BB){if(Ag(this).val()!=""){A6.children("option."+A3).text(Ag(this).val()).val(Ag(this).val()).attr("selected","selected")}else{A6.children("option."+A3).remove()}}else{A6.children("option."+A3).remove()}A6.show();Ag("#"+A5).remove()})})});function AT(e,j){Ag("#"+e).bind("keyup",function(A2){var A1=Ag("#"+e).val().toLowerCase();
var A0=g(A2);switch(A0){case 8:case 9:case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 45:case 46:case 16:break;case 27:Ag("#"+e).val("").trigger("blur");j.focus().focus().next().focus();break;case 13:Ag("#"+e).trigger("blur");j.focus().focus().next().focus();break;default:j.children().each(function(){var A3=Ag(this).text();var A4=A3.toLowerCase().indexOf(A1);if(A4==0){var A6=A1.length;var A5=A3.length;Ag("#"+e).val(A3).cursorSelection(A6,A5);return false}});break}})}function g(A0){var j=0;if(!A0){var A0=window.event}if(A0.keyCode){j=A0.keyCode}else{if(A0.which){j=A0.which}}return j}function f(){var j=navigator.userAgent;var e=j.indexOf("MSIE ");if(e==-1){return 0}else{return parseFloat(j.substring(e+5,j.indexOf(";",e)))}}AG("ricAddRemove",function(j,e){Ag("div.ricAddRemove",e).not(".ricAddRemoveLoaded").addClass("ricAddRemoveLoaded").ricolaAddRemove()});Ag.fn.ricolaAddRemove=function(){return this.each(function(){var A7="copy",BB="move",A2="yes";var A8=Ag(this).attr("ric:mode")==A7,e=A8?"yes":"no",A3=A8?"yes":"no",A9=A8&&Ag(this).attr("ric:allowduplicates")!=A2?"yes":"no";
var A4=k(Ag(this),"ric:maxitems","no","integer");var A6=k(Ag(this),"ric:buttonmove","no");var A5=k(Ag(this),"ric:buttonall","no");var BA=k(Ag(this),"ric:sort","yes");var A0=Ag("select:lt(2)",this).parent().wrap('<div class="ricAddRemovePane"></div>').end(),A1=Ag(A0[0]),j=Ag(A0[1]);Q(Ag(this),j,A5,A6);Ag(".ricAddRemoveButtons button",this).ricolaButton();if(BA=="yes"){Af(A1);Af(j)}A1.bind("dblclick",function(){T(A1,j,A4,e,A9,BA,true)});j.bind("dblclick",function(){P(A1,j,true,A3,BA)});Ag(".idAdd",Ag(this)).bind("click",function(){T(A1,j,A4,e,A9,BA,true)});Ag(".idRemove",Ag(this)).bind("click",function(){P(A1,j,true,A3,BA)});if(A5=="yes"){Ag(".idAddAll",Ag(this)).bind("click",function(){T(A1,j,A4,e,A9,BA,false)});Ag(".idRemoveAll",Ag(this)).bind("click",function(){P(A1,j,false,A3,BA)})}if(A6=="yes"){Ag(".ricAddRemoveMoveButtons button",this).ricolaButton();Ag(".idUp",Ag(this)).bind("click",function(){j.up()});Ag(".idDown",Ag(this)).bind("click",function(){j.down()})}if(Ag(this).getAttr("ric:selectvalues","yes")=="yes"){Ag(this).parents("form:eq(0)").bind("submit",function(){j.val(j.find("option").map(function(){return Ag(this).attr("value")
}));A1.val(A1.find("option").map(function(){return Ag(this).attr("value")}))})}})};function k(A3,j,A0,A1){if(arguments.length==3){A1="string"}try{if(A1.toLowerCase()=="integer"){return parseInt(A3.attr(j),10)||0}else{return(A3.attr(j)||A0).toLowerCase()}}catch(A2){if(A1.toLowerCase()=="integer"){return parseInt(A0,10)||0}else{return A0.toLowerCase()}}}function T(A6,A3,j,A5,A1,A0,A8){var A4=Ag("option",A3).size();var e=Ag("option",A6).size();var A2=Ag("option:selected",A6).size();var A7=0;A7=A4;if(A8){if(A4<j||j==0){if(A5=="yes"){A3.children(":selected").removeAttr("selected");Ag("option:selected",A6).each(function(){if(A1=="yes"){if(Aa(A3,Ag(this).text())){Ag(this).clone().appendTo(A3).attr("selected","selected");++A7}}else{if(A1=="no"){Ag(this).clone().appendTo(A3);++A7}}return j==0?true:(A7>=j?false:true)})}else{if(A5=="no"){A3.children(":selected").removeAttr("selected");Ag("option:selected",A6).each(function(){Ag(this).appendTo(A3);return j==0?true:(++A7>=j?false:true)})}}}}else{if((A4<j||j==0)){if(A5=="yes"){A3.children(":selected").removeAttr("selected");
Ag("option",A6).each(function(){if(A1=="yes"){if(Aa(A3,Ag(this).text())){Ag(this).clone().appendTo(A3);++A7}}else{if(A1=="no"){Ag(this).clone().appendTo(A3);++A7}}return j==0?true:(A7>=j?false:true)})}else{if(A5=="no"){A3.children(":selected").removeAttr("selected");Ag("option",A6).each(function(){Ag(this).appendTo(A3);return j==0?true:(++A7>=j?false:true)})}}}}if(A0=="yes"){Af(A3)}}function P(e,A2,A0,A1,j){if(A0){if(A1=="no"){e.children(":selected").removeAttr("selected");Ag("option:selected",A2).each(function(){if(Aa(e,Ag(this).text())){Ag(this).appendTo(e)}})}else{if(A1=="yes"){Ag("option:selected",A2).remove()}}}else{if(A1=="no"){e.children(":selected").removeAttr("selected");Ag("option",A2).appendTo(e)}else{if(A1=="yes"){Ag("option",A2).remove()}}}if(j=="yes"){Af(e)}}function Af(A3){var A0=[];var j=[];Ag("option:selected",A3).each(function(){j[Ag(this).text()]=""});var e=0;A3.children().each(function(){A0[e]={key:Ag(this).text(),val:Ag(this).val()};e++});A0.sort(function(A7,A6){var A5=A7.key.toLowerCase();
var A4=A6.key.toLowerCase();if(A5>A4){return(1)}if(A5<A4){return(-1)}return(0)});A3.html("");for(var A1=0;A1<=A0.length-1;A1++){if(j[A0[A1].key]!=undefined){var A2=" selected"}else{A2=""}A3.append('<option value="'+A0[A1].val+'" '+A2+">"+A0[A1].key+"</option>")}}function AW(e){if(Ag.browser.msie){e.children().each(function(){this.setAttribute("selected","selected")})}else{e.children().each(function(){Ag(this).attr("selected","selected")})}}function Q(j,A2,A0,A1){var e=['<div class="ricAddRemovePane ricAddRemoveButtons">'];e.push('<div><button type="button" class="idAdd">Add &gt;&gt;</button></div>');if(A0=="yes"){e.push('<div><button type="button" class="idAddAll">Add All &gt;&gt;</button></div>')}e.push('<div><button type="button" class="idRemove">&lt;&lt; Remove</button></div>');if(A0=="yes"){e.push('<div><button type="button" class="idRemoveAll">&lt;&lt; Remove All</button></div>')}e.push("</div>");Ag(".ricAddRemovePane:eq(0)",j).after(e.join(""));if(A1=="yes"){Ag(".ricAddRemovePane:last",j).after('<div class="ricAddRemoveMoveButtons"><div><button type="button" class="ricButtonSmall idUp">Up</button></div><div><button type="button" class="ricButtonSmall idDown">Down</button></div></div>')
}}function Aa(j,A0){var e=true;j.children().each(function(){if(Ag(this).text()==A0){e=false;return false}});return e}var W={};W.hasOptions=function(e){return(e!=null&&typeof (e.options)!="undefined"&&e.options!=null)};W.swap=function(A4,A3,A1){if(!this.hasOptions(A4)){return false}var A6=A4.options;if(A3<0||A3>=A6.length||A1<0||A1>=A6.length){return false}var A0=A6[A3].selected;var A2=A6[A1].selected;var e=new Option(A6[A3].text,A6[A3].value,A6[A3].defaultSelected,A6[A3].selected);var A5=new Option(A6[A1].text,A6[A1].value,A6[A1].defaultSelected,A6[A1].selected);A6[A3]=A5;A6[A1]=e;A6[A3].selected=A2;A6[A1].selected=A0;return true};W.up=function(e){if(!this.hasOptions(e)){return false}for(i=0;i<e.options.length;i++){if(e.options[i].selected){if(i>0&&!e.options[i-1].selected){this.swap(e,i,i-1);e.options[i-1].selected=true}}}return true};W.down=function(e){if(!this.hasOptions(e)){return false}for(i=e.options.length-1;i>=0;i--){if(e.options[i].selected){if(i!=(e.options.length-1)&&!e.options[i+1].selected){this.swap(e,i,i+1);
e.options[i+1].selected=true}}}return true};var Ao;Ag.fn.SB=function(e){return function(){var j=Array.prototype.slice.apply(arguments);return this.each(function(){W[e].apply(W,([this]).concat(j))})}};for(Ao in W){Ag.fn[(Ao=="sort")?"sortOptions":Ao]=Ag.fn.SB(Ao)}Ricola.portal=function(){function e(){try{var j=Ag.canUseContext(top,"ptlPageGroup")||window==top;if(j){return typeof top.ptlPageGroup!=="undefined"}else{return false}}catch(A0){Ricola.log.error("isInPortal()",A0)}}if(e()){if(window==top){return{createTab:function(){if(window.JSON&&JSON.stringify){try{Ricola.log.debug("Ricola.portal.createTab(): arguments = "+JSON.stringify(arguments))}catch(A0){Ricola.log.warn("Ricola.portal.createTab(): Error trying to stringify arguments for logging",A0)}}var j=uit.portal.tabs.Tab.prototype.constructor.apply(this,arguments);Ricola.log.debug("Ricola.portal.createTab(): setting history point: tab id = "+j.getId());Ricola.history.set(j.getId());return j}}}else{if(Ag.canUseContext(top,"Ricola")&&top.Ricola.portal){jQuery(document).ready(function(){if(window.uit&&uit.portal&&uit.portal.keys&&uit.portal.keys.bind){var j;
if(window.contentDocument&&window.contentDocument.documentElement){j=window.contentDocument.documentElement}else{j=window.document}uit.portal.keys.bind(j)}});return jQuery.extend({},top.Ricola.portal,{tab:top.uit.portal.tabs.getTab(window)})}}}return null}();AG("ricValidate",function(j,e){Ag("input.ricValidate,textarea.ricValidate,select.ricValidate",e).ricolaValidate();Ag("form.ricValidateForm",e).not(".ricFormLoaded").addClass("ricFormLoaded").submit(function(A0){return Ag(this).ricolaValidateForm()}).bind("reset",function(A0){return Ag(this).ricolaResetForm()})});function N(BC){if(this.$ricValidateDisabled===true){return }var A2=Ricola.validate.getValidator(Ag(this).attr("ric:format")),A5=Ag(this).attr("ric:required")==="yes",BB=H(this),j,BA=Ricola.validate.getValidator("required"),BD=Ag(this).parents("form:eq(0)"),A3=Ag.isFunction(A2.validate);if(Ag.isFunction(A2.format)){j=A2.format(BB,true,this);if(BB!==j&&j!==""){BB=j}}var A9=BA.validate(BB,this,BC)!==true,e=BD.is(".ricFormLoaded"),A6=BD.is(".ricFormSubmitted"),BE=!A3||A3&&A2.validate(BB,this,BC)===true;
var A4=!BE&&!A9,A1=A5&&A9,A8=BC.type=="submit";if((A4||A1)&&!(!A4&&A1&&e&&!A6)){if(A8){Ag(this).ricolaValidateError()}else{var A0=A4?A2:BA,BF=A0.error,A7=typeof A0.errorMessage=="string"?A0.errorMessage:A0.errorMessage(BB);Ricola.log.debug('Validate: value "'+BB+'" failed with '+BF+": "+A7+".");Ag(this).ricolaValidateError(BF,A7)}return false}else{if(j){Ag(this).ricolaGetFieldValue(j)}Ag(this).ricolaValidateClearError();return true}}Ag.fn.ricolaValidateForm=function(){var e=true,j=null;this.filter("form:eq(0)").each(function(){Ag(this).addClass("ricFormSubmitted");Ag(":input.ricValidate",this).each(function(){if(Ag(this).ricolaValidateIsDisabled()){return }if(!N.call(this,{type:"submit"})){e=false;if(!j){j=this}}})});if(!e){Ag(this).addClass("ricFormInvalid");Ag(j).ricolaShow().focus();return false}else{Ag(this).removeClass("ricFormInvalid")}return e};Ag.fn.ricolaResetForm=function(){Ag(this).removeClass("ricFormSubmitted ricFormInvalid");Ag(".ricValidateInvalid",this).removeClass("ricValidateInvalid").each(function(){Ag(this).ricolaValidateClearError()
})};var R={};Ricola.validate={registerFormat:function(j,e){j=(j||"").toLowerCase();if(R[j]===undefined){R[j]=e}},getValidator:function(e){e=(e||"").toLowerCase();if(R[e]!==undefined){return R[e]}return false}};function H(e){var j=Ag(e).val();if(Ag(e).is(".ricInputHint")){j=(j==(Ag(e).attr("ric:inputhint")||"")?"":j)}return j}Ag.fn.ricolaValidate=function(){return this.filter(".ricValidate").not(".ricValidateLoaded").each(function(){this.$ricValidateDisabled=false;var e=Ricola.validate.getValidator(Ag(this).attr("ric:format"));if(e!==false){if(e.maxLength){Ag(this).attr("maxlength",e.maxLength)}if(e.inputHint){Ag(this).ricolaInputHint({text:e.inputHint})}if(Ag.isFunction(e.keyFilter)){Ag(this).bind("keydown",function(A0){if(!this.$ricValidateDisabled){var A1=Ag(this).cursorSelection();var j=A0.which;return e.keyFilter(j,A1.start,this,A0)}})}}Ag(this).addClass("ricValidateLoaded").bind("ricolaValueUpdated",function(A0){this.$ricValidateDisabled=false;var j=Ricola.validate.getValidator(Ag(this).attr("ric:format"));
if(j!==false){if(Ag.isFunction(j.format)){var A2=H(this);var A1=j.format(A2,false,this);if(A1!==A2){Ag(this).val(A1)}}if(Ag.isFunction(j.validate)){if(j.validate(A2,this,A0)===true){Ag(this).ricolaValidateClearError()}}}}).bind("keyup",function(A0){if(A0.which==9||this.$ricValidateDisabled===true){return }var A6=Ag(this).attr("ric:required")==="yes",A1=Ricola.validate.getValidator(Ag(this).attr("ric:format")),j=Ag.isFunction(A1.validate),A2=Ricola.validate.getValidator("required"),A8=H(this),A9=null,A7=Ag(this).is(".ricValidateInvalid"),A3=j&&A1.validate(A8,this,A0)===true,A4=A2.validate(A8,this,A0)!==true;if(A0.which!=8){if(Ag.isFunction(A1.typeAssist)){var A5=A1.typeAssist(A8,0);if(A5[0]!==A8){A8=A5[0];Ag(this).val(A8)}}}if(A7==true){if(A6&&j){if(!A4&&A3){Ag(this).ricolaValidateClearError()}}else{if(A6&&!A4||j&&A3){Ag(this).ricolaValidateClearError()}}}}).bind("focus",function(j){if(Ag(this).is(".ricValidateInvalid")){N.call(this,j)}}).bind("blur",function(j){N.call(this,j)}).bind("ricolaValidate",function(j){N.call(this,j)
})})};function a(A3,A4,A1){var A2=Ag("#ricolaValidateBalloon"),e=Ag(A3).attr("ric:position")||"right",j,A0;if(A2.length===0){var j='<div class="ricolaValidateBalloonContent"></div>';A2=Ricola.component.balloon.create({id:"ricolaValidateBalloon",type:"alert",content:j,position:e,addHideText:true});Ag(A2).bind("ricolaBalloonHide",function(A6,A5){Ag(A3).removeClass("ricValidateBalloon")})}Ag(A2).ricolaAppendToParentFromAnchor(A3);A0='<div style="font-weight: bold; padding-bottom: 5px;">'+A4+"</div>";if(A1){A0+=A1}Ag(A3).addClass("ricValidateBalloon");Ag("div.ricolaValidateBalloonContent",A2).html(A0);Ricola.component.balloon.toggle(A2,true,A3,e);Ag(document).data("activeBalloonForElement",A3)}Ag.fn.ricolaValidateDisabled=function(e){return this.filter(".ricValidate").each(function(){this.$ricValidateDisabled=(e===true?true:false);if(this.$ricValidateDisabled===true){Ag(this).ricolaValidateClearError()}})};Ag.fn.ricolaValidateIsDisabled=function(){var e=true;this.filter(".ricValidate:eq(0)").each(function(){e=this.$ricValidateDisabled===true
});return e};Ag.fn.ricolaValidateRequired=function(e){return this.filter(".ricValidate").attr("ric:required",e===true?"yes":"no").end()};Ag.fn.ricolaValidateError=function(e,j){return this.each(function(){Ag(this).addClass("ricValidateInvalid");Ag(document).trigger("ricolaValidateInvalid",[this]);if(e){a(this,e,j)}})};Ag.fn.ricolaValidateClearError=function(e){return this.each(function(){if(Ag(document).data("activeBalloonForElement")==this){var j=Ag("#ricolaValidateBalloon");if(j.size()==1){Ricola.component.balloon.toggle(j,false)}Ag(this).removeClass("ricValidateBalloon")}if(!e){Ag(this).removeClass("ricValidateInvalid");Ag(document).trigger("ricolaValidateValid",[this])}})};function o(e,A0,j){var A1=new Date(j||(new Date).getFullYear(),A0-1,e);return A1.getMonth()==A0-1}function AF(e,j){return Ag.trim(j.split(e).join("").replace(/\s{2,}/g," "))}function z(j,e){j.errorMessage=function(A0){return"Please fix the following entries: <ul><li>"+j.notFindAll(A0)+"</li></ul>"};j.validate=function(A1,A0){return !j.notFindAll(A1)
};j.getList=function(A3,A2,A0){var A1=Ag.map(j.findAll(A3),function(A4){return j.formatOne(A4)});if(A2){A1=Ag.arrayUnique(A1)}return A0?A1.join(A0):A1};j.format=function(A0){return A0.replace(/[^A-Z0-9\s]/gi,"").toUpperCase()};j.formatOne=e.format}function AE(A3,A4,A2){var A1=false;for(var A0=0,e=A3.length;A0<e;A0++){A1=A1||Ricola.validate.getValidator(A3[A0])[A4].apply(null,A2)}return A1}Ricola.validate.registerFormat("required",{error:"Required Field",errorMessage:"This field is required.",validate:function(A0,e,j){return !A0||typeof A0==="string"?Ag.trim(A0)!=="":A0.length>0&&A0[0]!==""}});Ricola.validate.registerFormat("alpha",{error:"Alphabetic Only",errorMessage:"Please provide only alphabetic<br/>characters in this field.",keyFilter:function(j,A1,e,A0){return Ricola.util.isMetaKey(A0)||(j>=65&&j<=90)},validate:function(A0,e,j){return(A0.match(/^([a-z]*)$/i)!==null)},format:function(A0,j,e){var A1=Ag(e).getAttr("ric:alphacase","");if(A1=="upper"){A0=A0.toUpperCase()}else{if(A1=="lower"){A0=A0.toLowerCase()
}}return A0.replace(/[^A-Za-z]/g,"")}});Ricola.validate.registerFormat("alphanumeric",{error:"Incorrect AlphaNumeric Format",errorMessage:"Please provide only valid<br/>alphabetic or numeric  input.",keyFilter:function(j,A1,e,A0){return AE(["alpha","integer"],"keyFilter",arguments)},validate:function(A0,e,j){return(A0.match(/^([A-Za-z0-9]*)$/)!==null)},format:function(A0,j,e){return A0.replace(/[^A-Za-z0-9]/g,"")}});Ricola.validate.registerFormat("integer",{error:"Integers Only",errorMessage:"Please provide only<br/>integer values in this field.",keyFilter:function(j,A1,e,A0){return Ricola.util.isMetaKey(A0)||Ricola.util.isNumpadKey(A0)||(j>=48&&j<=59&&!A0.shiftKey)||((j==189||j==109)&&A1==0&&Ag(e).val().indexOf("-")==-1)},validate:function(A0,e,j){return(A0.match(/^([0-9]*)$|^-([0-9]*)$/)!==null)},format:function(j,e){return((j.charAt(0)=="-")?"-":"")+j.replace(/[^0-9]/g,"")}});Ricola.validate.registerFormat("numeric",{error:"Numeric Only",errorMessage:"Please provide valid<br/>numeric values in this field.",keyFilter:function(j,A1,e,A0){return Ricola.util.isMetaKey(A0)||Ricola.util.isNumpadKey(A0)||(j>=48&&j<=59&&!A0.shiftKey)||((j==190||j==110)&&Ag(e).val().indexOf(".")==-1)||((j==189||j==109)&&A1==0&&Ag(e).val().indexOf("-")==-1)
},validate:function(A0,e,j){return(A0.match(/^-([0-9]*)\.?([0-9]*)$|^([0-9]*)\.?([0-9]*)$/)!==null)},format:function(j,e){return((j.charAt(0)=="-")?"-":"")+j.replace(/[^0-9\.]/g,"")}});Ricola.validate.registerFormat("date",{error:"Incorrect Date Format",errorMessage:"Correct Date Format:<ul><li>MM/DD</li></ul>Example:<ul><li>07/28 (July 28th)</li></ul>",keyFilter:function(j,A1,e,A0){return(j==111||j==191)?(e.value.substr(A1-1,1)!="/"):true},validate:function(A1,e,A0){var j=A1.match(/^(0[1-9]|1[012])\/?(0[1-9]|[12][0-9]|3[01])$/);return j!==null&&j.length==3&&o(parseInt(j[2],10),parseInt(j[1],10))},format:function(A0,j){var e=A0.match(/^(0?[1-9]|1[012])\/?(0?[1-9]|[12][0-9]|3[01])$/)||A0.match(/^(0?[1-9]|1[012])\/(0?[1-9]|[12][0-9]|3[01])(?:\/([0-9]{1,4}))?$/),A1=Ricola.util.pad;if(e&&e.length>=3){A0=(j?A1(e[1],2):e[1])+"/"+(j?A1(e[2],2):e[2])}return A0},typeAssist:function(e,j){e=e.replace(/^\s?/g,"");e=e.replace(/(^|\/)(\d\/)$/g,"$10$2");if(e.length==2&&e.substr(1,2)!="/"){e+="/"}return[e,j]
}});Ricola.validate.registerFormat("dateWithYear",{error:"Incorrect Date Format",errorMessage:"Correct Date Format:<ul><li>MM/DD/YYYY</li></ul>Example:<ul><li>07/28/2007 (July 28, 2007)<li></ul>",keyFilter:function(j,A1,e,A0){return(j==111||j==191)?(e.value.substr(A1-1,1)!="/"):true},validate:function(A0,e){var j=A0.match(/^(0[1-9]|1[012])\/?(0[1-9]|[12][0-9]|3[01])\/?([0-9]{4})$/);return A0.match(/^99\/?99\/?9999$/)!==null||(j!==null&&j.length==4&&o(parseInt(j[2],10),parseInt(j[1],10),parseInt(j[3],10)))},format:function(A0,j){var e=A0.match(/^(0?[1-9]|1[012])\/?(0?[1-9]|[12][0-9]|3[01])\/?([0-9]{1,4})?$/),A1=Ricola.util.pad;if(e&&e.length>=2){A0=(j?A1(e[1],2):e[1])+"/"+(j?A1(e[2],2):e[2])+"/"+(j?(e[3]?Ricola.util.convertToFullYear(parseInt(e[3],10)):(new Date).getFullYear()):e[3])}return A0},typeAssist:function(j,A0){j=j.replace(/^\s?/g,"");j=j.replace(/(^|\/)(\d\/)$/g,"$10$2");var e=j.length;if((e==2||e==5)&&j.substr(e-2,e-1)!="/"){j+="/"}return[j,A0]}});Ricola.validate.registerFormat("time",{error:"Incorrect Time Format",errorMessage:"Correct Date Format:<ul><li>HH:MM (24 hr)</li></ul>Example:<ul><li>13:37 (01:37 PM)<li></ul>",validate:function(j,e){return(j.match(/^([01]\d|2[0-3]):?[0-5]\d$/)!==null)
},keyFilter:function(j,A1,e,A0){return(j==59?(e.value.substr(A1-1,1)!=":"):true)},format:function(A0,j){var e=A0.match(/^(0?\d|1\d|2[0-3])(:)?(0\d|[1-5]\d)?$/),A1=Ricola.util.pad;if(e&&e.length>=1){A0=(j?A1(e[1],2):e[1])+(e[2]||(j?":":""))+(j?A1(e[3]||0,2):e[3]||"")}return A0},typeAssist:function(e,j){if(e.length==2&&e.substr(e.length-1)==":"){e="0"+e}else{if(e.length==2){e+=":"}}return[e,j]}});Ricola.validate.registerFormat("hourMinute",{error:"Incorrect Hour Minute Format",errorMessage:"Correct Format:<ul><li>H:MM</li></ul>Example:<ul><li>130:10 (130 hours 10 minutes)</li></ul>",validate:function(j,e){return(j.match(/^([0-9]+):[0-5]\d$/)!==null)},format:function(A0,j){var e=A0.match(/^([0-9]+)(?::(0?\d|[1-5]\d))?$/),A1=Ricola.util.pad;if(e&&e.length>1){A0=e[1]+":"+(j?A1(e[2]||0,2):e[2]||0)}return A0},keyFilter:function(j,A1,e,A0){return !(j==59&&e.value.indexOf(":")>-1)}});Ricola.validate.registerFormat("dateTime",{error:"Incorrect Date/Time Format",errorMessage:"Correct Date Format:<ul><li>MM/DD HH:MM</li></ul>Example:<ul><li>07/28 13:15 (July 28th 1:15PM)</li></ul>",validate:function(A0,e){var j=A0.match(/^(0[1-9]|1[012])\/?(0[1-9]|[12][0-9]|3[01])\s?([0-1]\d|2[0-3]):?[0-5]\d$/);
return j!==null&&o(parseInt(j[2],10),parseInt(j[1],10),(new Date).getFullYear())},format:function(A1,A0){var j=A1.split(" "),e=Ricola.validate.getValidator;return j.length>1?e("date").format(j[0],A0)+" "+e("time").format(j[1],A0):A1},typeAssist:function(e,j){e=e.replace(/^\s?/g,"");if(e.length==2){if(e.substring(1,2)=="/"){e="0"+e}else{e+="/"}}if(e.length==5){if(e.substring(4,5)==" "){e=e.substring(0,3)+"0"+e.substring(3)}else{e+=" "}}if(e.substr(7,1)==":"&&e.substr(5,1)==" "){e=e.substr(0,6)+"0"+e.substr(6)}return[e,j]}});Ricola.validate.registerFormat("trainSymbol",{error:"Incorrect Train Symbol Format",errorMessage:"Example:<ul><li>ABCDE</li></ul>",validate:function(j,e){return(j.match(/^([2-9]?[A-Z]{1}[A-Z0-9]{1,6})\s?$/i)!==null)},format:function(e){return e.replace(/[^A-Z0-9]/gi,"").toUpperCase()}});var S={error:"Incorrect Train ID Format",errorMessage:"Example:<ul><li>ABCDE 12</li></ul>",validate:function(j,e){return j.match(/^([2-9]?[A-Z]{1}[A-Z0-9]{1,6})\s(0?[1-9]|[12][0-9]|3[01])$/i)!==null
},format:function(e){return e.replace(/[^A-Z0-9\s]/gi,"").toUpperCase()}};var AK={error:"Invalid Train ID(s)",notFindAll:function(e){return AF(/\b(?:[2-9]?[A-Z]{1}[A-Z0-9]{1,6})\s(?:0?[1-9]|[12][0-9]|3[01])\b/g,e)},findAll:function(e){return e.match(/\b([2-9]?[A-Z]{1}[A-Z0-9]{1,6})\s(0?[1-9]|[12][0-9]|3[01])\b/g)||[]}};z(AK,S);Ricola.validate.registerFormat("trainIDList",AK);Ricola.validate.registerFormat("trainID",S);var M={error:"Incorrect Equipment ID Format",errorMessage:"Example:<ul><li>AB 1234</li></ul>",validate:function(j,e){return(j.match(/^([A-Z]{2,4})\s?([0-9]{1,6})$/i)!==null)},format:function(j){j=j.replace(/[^A-Z0-9]/gi,"");var e=/^([A-Z]{2,4})\s?([0-9]{1,6})$/i;if(j.match(e)){j=j.replace(e,"$1 $2")}return j.toUpperCase()}};var Az={error:"Invalid Equipment ID(s)",notFindAll:function(e){return AF(/\b(?:[A-Z]{2,4})\s?(?:[0-9]{1,6})\b/g,e)},findAll:function(e){return e.match(/\b([A-Z]{2,4})\s?([0-9]{1,6})\b/g)||[]}};z(Az,M);Ricola.validate.registerFormat("equipmentIDList",Az);
Ricola.validate.registerFormat("equipmentID",M);Ricola.validate.registerFormat("userID",{error:"Incorrect User ID Format",errorMessage:"Example:<ul><li>ABCD001</li></ul>",validate:function(j,e){return(j.match(/^([A-Z]{4})([0-9]{3})$/i)!==null)},format:function(e){e=e.replace(/[^A-Z0-9]/gi,"");return e.toUpperCase()}});var Ay={error:"Incorrect CIRC7 Format",errorMessage:"Example:<ul><li>AB123</li></ul>",validate:function(j,e){return j.match(/^[A-Z]{1}[A-Z ]?[0-9]{3}[A-Z]?$/i)!==null},validateProgressive:function(j,e){return j.match(/^[A-Z]{1}[A-Z ]?[0-9]{0,3}[A-Z]?$/i)!==null},format:function(e){e=e.replace(/[^A-Z0-9]/gi,"");if(e.match(/^[A-Z]{1}[0-9]+/i)!==null){e=e.substr(0,1)+" "+e.substr(1)}return e.toUpperCase()},typeAssist:function(e,j){e=e.replace(/^\s?/g,"");if(e.length==2){if(e.substring(1,2).match(/^[0-9]$/i)!==null){e=e.substring(0,1)+" "+e.substr(1)}}return[e,j]}};var AP={error:"Invalid Circ7(s)",notFindAll:function(e){return AF(/\b[A-Z]{1}[A-Z ]?[0-9]{3}[A-Z]?\b/g,e)},findAll:function(e){return e.match(/\b[A-Z]{1}[A-Z ]?[0-9]{3}[A-Z]?\b/g)||[]
}};z(AP,Ay);Ricola.validate.registerFormat("circ7List",AP);Ricola.validate.registerFormat("circ7",Ay);Ricola.validate.registerFormat("email",{error:"Incorrect E-mail Format",errorMessage:"Example:<ul><li>example@up.com</li></ul>",validate:function(j,e){return(j.match(/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i)!==null)},format:function(j,e){if(e&&j.match(/^[A-Z0-9._%+-]+$/i)){j+="@up.com"}return j}});Ricola.validate.registerFormat("phone",{error:"Incorrect Phone Format",errorMessage:"Correct Phone Format:<ul><li>###-###-#### x###</li></ul><p>Area code may not be '000'</p>Example:<ul><li>402-544-5000</li><li>402-544-0365 x123</li></ul>",validate:function(j,e){if(j.indexOf("000-")>-1){return false}return(j.match(/^((\d-?)?(\d{3}-?)?)?(\d{3}-?\d{4})(\sx\d+)?$/)!==null)},format:function(A3,A2,j){var A0="";var e=A3.match(/^((\d-?)?(\d{3}-?)?)?(\d{3}-?\d{4})\s?x(\d+)$/i);if(e){A0=e[5];A3=A3.replace(/(\s?x\d+)$/,"")}A3=A3.replace(/[^0-9]/g,"");if(A3.length==7){var A1=Ag(j).attr("ric:areacode")||"000";
A3=(A1==="ignore"?"":A1)+A3}var A4="";if(A3.length==11){A4=A3.substr(0,1);if(A4=="1"){A4=""}A3=A3.substr(1)}if(A3.length>3){A3=A3.substr(0,3)+"-"+A3.substr(3);if(A3.length>8){A3=A3.substr(0,7)+"-"+A3.substr(7)}}if(A4!=""){A3=A4+"-"+A3}if(A0!=""){A3+=" x"+A0}return A3}});Ricola.validate.registerFormat("currency",{error:"Incorrect Currency Format",errorMessage:"",validate:function(A3,A2){var A4=(A3.match(/^-?\$?([0-9]{1,3}(,[0-9]{3})*|[0-9]+)(\.[0-9]{2})?$/)!==null);var A0=Ag(A2).attr("ric:dollar");A0=A0===undefined?true:(A0=="yes");var A1=(A3.match(/^-?\$/)!==null);A4=A4&&(A0?A1:!A1);var j=Ag(A2).attr("ric:decimal");j=j==undefined?true:(j=="yes");A1=(A3.match(/\.[0-9]{2}$/)!==null);A4=A4&&(j?A1:!A1);var e=Ag(A2).attr("ric:comma");e=e==undefined?true:(e=="yes");if(e){A1=(A3.match(/^-?\$?([0-9]{1,3}(,[0-9]{3})*)(\.[0-9]{2})?$/)!==null);A4=A4&&A1}this.errorMessage=(A0&&j&&e?"Correct Currency Format: $#,###.##<br/>Example: $1,234.95 or -$1,234.95":!A0&&j&&e?"Correct Currency Format: #,###.##<br/>Example: 1,234.95 or -1,234.95":A0&&!j&&e?"Correct Currency Format: $#,###<br/>Example: $1,234 or -$1,234":A0&&j&&!e?"Correct Currency Format: $####.##<br/>Example: $1234.95 or -$1234.95":!A0&&!j&&e?"Correct Currency Format: #,###<br/>Example: 1,234 or -1,234":!A0&&j&&!e?"Correct Currency Format: ####.##<br/>Example: 1234.95 or -1234.95":A0&&!j&&!e?"Correct Currency Format: $####<br/>Example: $1234 or -$1234":!A0&&!j&&!e?"Correct Currency Format: ####<br/>Example: 1234 or -1234":"Unknown");
return A4},format:function(A4,e,A1){if(A4.length>0){var A3=Ag(A1).attr("ric:dollar");A3=A3===undefined?true:(A3=="yes");var A2=Ag(A1).attr("ric:decimal");A2=A2==undefined?true:(A2=="yes");var A6=Ag(A1).attr("ric:comma");A6=A6==undefined?true:(A6=="yes");var A0=A4.substr(0,1)=="-";var j="";if(A4.substr(A4.length-3,1)=="."){j=A4.substr(A4.length-2,2);A4=A4.substr(0,A4.length-3)}else{if(A2){j="00"}}A4=A4.replace(/[^0-9]/g,"");if(A4==""){A4="0"}if(A6){var A5=A4;A4="";while(A5.length>3){A4=A5.substr(A5.length-3,3)+(A4.length>0?",":"")+A4;A5=A5.substr(0,A5.length-3)}if(A5.length>0){A4=A5+(A4.length>0?",":"")+A4}}A4=(A0?"-":"")+(A3?"$":"")+A4+(A2?"."+j:"")}return A4}});Ricola.validate.registerFormat("ssn",{error:"Incorrect Social Security Number Format",errorMessage:"Correct Format:<ul><li>###-##-####</li></ul>Example:<ul><li>123-45-6789</li></ul>",validate:function(j,e){return(j.match(/^[0-9]{3}-[0-9]{2}-[0-9]{4}$/)!==null)},format:function(A0,j,e){if(A0.length>0){A0=A0.replace(/[^0-9]/g,"");
A0=A0.substr(0,3)+"-"+A0.substr(3,2)+"-"+A0.substr(5)}return A0},typeAssist:function(j,A1){j=j.replace(/^\s?/g,"");var A0=[,,,"-",,,"-"];var e=j.length;if(A0[e]!=undefined&&j.substr(e-2,e-1)!=A0[e]){j+=A0[j.length]}return[j,A1]}});Ricola.validate.registerFormat("zts",{inputHint:"ZZ TTT SS",maxLength:9,error:"Incorrect Zone Track Spot Format",errorMessage:"Correct Format:<ul><li>## ### ##</li></ul><p>Zone and Track must not be 0.</p>Example:<ul><li>01 001 00</li></ul>",validate:function(A0,e){var j=A0.match(/^([0-9]{2})\s([0-9]{3})\s[0-9]{2}$/);return j&&parseInt(j[1],10)>0&&parseInt(j[2],10)>0},format:function(A0,j,e){if(A0.length>0){A0=A0.replace(/[^0-9]/g,"");A0=Ag.trim(A0.substr(0,2)+" "+A0.substr(2,3)+" "+A0.substr(5))}return A0},typeAssist:function(j,A1){j=j.replace(/^\s?/g,"");var A0=[,," ",,,," "];var e=j.length;if(A0[e]!=undefined&&j.substr(e-2,e-1)!==A0[e]){j+=A0[j.length]}return[j,A1]}});Ricola.validate.registerFormat("track",Ag.extend({},Ricola.validate.getValidator("integer"),{error:"Incorrect Track Format",errorMessage:"Please provide an integer<br/>track value for this field.",maxLength:3,format:function(j,e){return j===""?j:Ricola.util.pad(Ricola.validate.getValidator("integer").format(j,e),3)
}}));Ricola.validate.registerFormat("yard",Ag.extend({},Ricola.validate.getValidator("integer"),{error:"Incorrect Yard Number Format",errorMessage:"Please provide an integer<br/>yard number for this field.",maxLength:2,format:function(j,e){return j===""?j:Ricola.util.pad(Ricola.validate.getValidator("integer").format(j,e),2)}}));Ricola.validate.registerFormat("seq",Ag.extend({},Ricola.validate.getValidator("track"),{error:"Incorrect Sequence Number Format",errorMessage:"Please provide an integer<br/>sequence number for this field."}));Ricola.validate.registerFormat("employeeid",Ag.extend({},Ricola.validate.getValidator("integer"),{error:"Incorrect Employee ID Format",errorMessage:"Please provide a valid<br/>Employee ID for this field.",maxLength:7,format:function(j,e){return j===""?j:Ricola.util.pad(Ricola.validate.getValidator("integer").format(j,e),7)}}))})(jQuery)};
