+Rico.Version="3.0b2";
+Rico.theme={};
+Rico.onLoadCallbacks=[];
+Rico.windowIsLoaded=false;
+Rico.inputtypes={search:0,number:0,range:0,color:0,tel:0,url:0,email:0,date:0,month:0,week:0,time:0,datetime:0,"datetime-local":0};
+Rico.windowLoaded=function(){this.windowIsLoaded=true;
+if(typeof Rico_CONFIG=="object"){var b=document.createElement("style");
+document.getElementsByTagName("head")[0].appendChild(b);
+if(!window.createPopup){b.appendChild(document.createTextNode(""))
+}var a=document.styleSheets[document.styleSheets.length-1];
+this.addCssBackgroundRule(a,".rico-icon",Rico_CONFIG.imgIcons,"no-repeat");
+this.addCssBackgroundRule(a,".ricoLG_Resize",Rico_CONFIG.imgResize,"repeat");
+if(Rico_CONFIG.imgHeading){var c="repeat-x";
+var e="left center";
+this.addCssBackgroundRule(a,"tr.ricoLG_hdg th",Rico_CONFIG.imgHeading,c,e);
+this.addCssBackgroundRule(a,"tr.ricoLG_hdg td",Rico_CONFIG.imgHeading,c,e);
+this.addCssBackgroundRule(a,"table.ricoLiveGrid thead td",Rico_CONFIG.imgHeading,c,e);
+this.addCssBackgroundRule(a,"table.ricoLiveGrid thead th",Rico_CONFIG.imgHeading,c,e);
+this.addCssBackgroundRule(a,".ricoTitle",Rico_CONFIG.imgHeading,c,e);
+this.addCssBackgroundRule(a,".Rico_accTitle",Rico_CONFIG.imgHeading,c,e)
+}if(Rico_CONFIG.enableLogging){this.enableLogging()
+}if(Rico_CONFIG.enableHTML5){this._CheckInputTypes()
+}}Rico.writeDebugMsg=Rico.log;
+Rico.log("Processing callbacks");
+while(this.onLoadCallbacks.length>0){var d=this.onLoadCallbacks.shift();
+if(d){d()
+}}};
+Rico.addCssBackgroundRule=function(d,b,c,e,a){if(!c){return
+}this.addCssRule(d,b,"background-image:url('"+c+"')");
+this.addCssRule(d,b,"background-repeat:"+e);
+if(a){this.addCssRule(d,b,"background-position:"+a)
+}};
+Rico.addCssRule=function(b,a,c){if(b.addRule){b.addRule(a,c)
+}else{if(b.insertRule){b.insertRule(a+" { "+c+" }",0)
+}else{alert("unable to add rule: "+c)
+}}};
+Rico._CheckInputTypes=function(){var a=document.createElement("input");
+for(var b in this.inputtypes){a.setAttribute("type","text");
+a.setAttribute("type",b);
+this.inputtypes[b]=(a.type!=="text")
+}};
+Rico.onLoad=function(b,a){if(this.windowIsLoaded){b()
+}else{if(a){this.onLoadCallbacks.unshift(b)
+}else{this.onLoadCallbacks.push(b)
+}}};
+Rico.isKonqueror=navigator.userAgent.toLowerCase().indexOf("konqueror")>-1;
+Rico.isIE=!!(window.attachEvent&&navigator.userAgent.indexOf("Opera")===-1);
+Rico.isOpera=navigator.userAgent.indexOf("Opera")>-1;
+Rico.isWebKit=navigator.userAgent.indexOf("AppleWebKit/")>-1;
+Rico.isGecko=navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")===-1;
+Rico.ieVersion=/MSIE (\d+\.\d+);/.test(navigator.userAgent)?new Number(RegExp.$1):null;
+Rico.startTime=new Date();
+Rico.timeStamp=function(){var a=new Date();
+return(a.getTime()-this.startTime.getTime())+": "
+};
+Rico.setDebugArea=function(c,a){if(!this.debugArea||a){var b=document.getElementById(c);
+if(!b){return
+}this.debugArea=b;
+b.value=""
+}};
+Rico.log=function(){};
+Rico.enableLogging=function(){if(this.debugArea){this.log=function(b,a){if(a){this.debugArea.value=""
+}this.debugArea.value+=this.timeStamp()+b+"\n"
+}
+}else{if(window.console){if(window.console.firebug){this.log=function(a){window.console.log(this.timeStamp(),a)
+}
+}else{this.log=function(a){window.console.log(this.timeStamp()+a)
+}
+}}else{if(window.opera){this.log=function(a){window.opera.postError(this.timeStamp()+a)
+}
+}}}};
+Rico.$=function(a){return typeof a=="string"?document.getElementById(a):a
+};
+Rico.runLater=function(){var b=Array.prototype.slice.call(arguments);
+var c=b.shift();
+var a=b.shift();
+var d=b.shift();
+return setTimeout(function(){a[d].apply(a,b)
+},c)
+};
+Rico.visible=function(a){return Rico.getStyle(a,"display")!="none"
+};
+Rico.show=function(a){a.style.display=""
+};
+Rico.hide=function(a){a.style.display="none"
+};
+Rico.toggle=function(a){a.style.display=a.style.display=="none"?"":"none"
+};
+Rico.direction=function(a){return(Rico.getStyle(a,"direction")||"ltr").toLowerCase()
+};
+Rico.viewportOffset=function(a){var b=Rico.cumulativeOffset(a);
+b.left-=this.docScrollLeft();
+b.top-=this.docScrollTop();
+return b
+};
+Rico.getInnerText=function(f,b,g,e){switch(typeof f){case"string":return f;
+case"undefined":return f;
+case"number":return f.toString()
+}var d=f.childNodes;
+var a=d.length;
+var h="";
+for(var c=0;
+c<a;
+c++){switch(d[c].nodeType){case 1:if(this.getStyle(d[c],"display")=="none"){continue
+}if(e&&this.hasClass(d[c],e)){continue
+}switch(d[c].tagName.toLowerCase()){case"img":if(!b){h+=d[c].alt||d[c].title||d[c].src
+}break;
+case"input":if(!g&&!d[c].disabled&&d[c].type.toLowerCase()=="text"){h+=d[c].value
+}break;
+case"select":if(!g&&d[c].selectedIndex>=0){h+=d[c].options[d[c].selectedIndex].text
+}break;
+case"textarea":if(!g&&!d[c].disabled){h+=d[c].value
+}break;
+default:h+=this.getInnerText(d[c],b,g,e);
+break
+}break;
+case 3:h+=d[c].nodeValue;
+break
+}}return h
+};
+Rico.getContentAsString=function(a,b){if(b){return this._getEncodedContent(a)
+}if(typeof a.xml!="undefined"){return this._getContentAsStringIE(a)
+}return this._getContentAsStringMozilla(a)
+};
+Rico._getEncodedContent=function(a){if(a.innerHTML){return a.innerHTML
+}switch(a.childNodes.length){case 0:return"";
+case 1:return a.firstChild.nodeValue;
+default:return a.childNodes[1].nodeValue
+}};
+Rico._getContentAsStringIE=function(a){var c="";
+for(var b=0;
+b<a.childNodes.length;
+b++){var d=a.childNodes[b];
+c+=(d.nodeType==4)?d.nodeValue:d.xml
+}return c
+};
+Rico._getContentAsStringMozilla=function(b){var a=new XMLSerializer();
+var d="";
+for(var c=0;
+c<b.childNodes.length;
+c++){var e=b.childNodes[c];
+if(e.nodeType==4){d+=e.nodeValue
+}else{d+=a.serializeToString(e)
+}}return d
+};
+Rico.nan2zero=function(a){if(typeof(a)=="string"){a=parseInt(a,10)
+}return isNaN(a)||typeof(a)=="undefined"?0:a
+};
+Rico.stripTags=function(a){return a.replace(/<\/?[^>]+>/gi,"")
+};
+Rico.truncate=function(a,b){return a.length>b?a.substr(0,b-3)+"...":a
+};
+Rico.zFill=function(d,c,b){var a=d.toString(b||10);
+while(a.length<c){a="0"+a
+}return a
+};
+Rico.keys=function(c){var b=[];
+for(var a in c){b.push[a]
+}return b
+};
+Rico.eventKey=function(a){if(typeof(a.keyCode)=="number"){return a.keyCode
+}else{if(typeof(a.which)=="number"){return a.which
+}else{if(typeof(a.charCode)=="number"){return a.charCode
+}}}return -1
+};
+Rico.eventLeftClick=function(a){return(((a.which)&&(a.which==1))||((a.button)&&(a.button==1)))
+};
+Rico.eventRelatedTarget=function(a){return a.relatedTarget
+};
+Rico.getPreviosSiblingByTagName=function(c,b){var a=c.previousSibling;
+while(a){if((a.tagName==b)&&(a.style.display!="none")){return a
+}a=a.previousSibling
+}return null
+};
+Rico.getParentByTagName=function(d,a,c){var b=d;
+a=a.toLowerCase();
+while(b){if(b.tagName&&b.tagName.toLowerCase()==a){if(!c||b.className.indexOf(c)>=0){return b
+}}b=b.parentNode
+}return null
+};
+Rico.wrapChildren=function(b,a,e,c){var d=document.createElement(c||"div");
+if(e){d.id=e
+}if(a){d.className=a
+}while(b.firstChild){d.appendChild(b.firstChild)
+}b.appendChild(d);
+return d
+};
+Rico.positionCtlOverIcon=function(g,k){k=this.$(k);
+var c=this.cumulativeOffset(k);
+var j=this.docScrollTop();
+var a=this.windowHeight();
+if(g.style.display=="none"){g.style.display="block"
+}var h=2;
+var b=this.nan2zero(this.getStyle(k,"paddingLeft"));
+g.style.left=(c.left+b+h)+"px";
+var i=c.top+h;
+var f=g.offsetHeight;
+var e=k.offsetHeight;
+var d=10;
+if(i+e+f+d<a+j){i+=e
+}else{i=Math.max(i-f,j)
+}g.style.top=i+"px"
+};
+Rico.createFormField=function(d,b,f,g,a){var e;
+if(typeof a!="string"){a=g
+}if(this.isIE&&this.ieVersion<8){var c=b+' id="'+g+'"';
+if(f){c+=' type="'+f+'"'
+}if(b.match(/^(form|input|select|textarea|object|button|img)$/)){c+=' name="'+a+'"'
+}e=document.createElement("<"+c+" />")
+}else{e=document.createElement(b);
+if(f){e.type=f
+}e.id=g;
+if(typeof e.name=="string"){e.name=a
+}}d.appendChild(e);
+return e
+};
+Rico.addSelectOption=function(b,c,d){var a=document.createElement("option");
+if(typeof c=="string"){a.value=c
+}a.text=d;
+if(this.isIE){b.add(a)
+}else{b.add(a,null)
+}return a
+};
+Rico.getCookie=function(g){var b=g+"=";
+var f=b.length;
+var a=document.cookie.length;
+var d=0;
+while(d<a){var c=d+f;
+if(document.cookie.substring(d,c)==b){var e=document.cookie.indexOf(";",c);
+if(e==-1){e=document.cookie.length
+}return unescape(document.cookie.substring(c,e))
+}d=document.cookie.indexOf(" ",d)+1;
+if(d==0){break
+}}return null
+};
+Rico.getTBody=function(a){return a.tBodies.length==0?a.appendChild(document.createElement("tbody")):a.tBodies[0]
+};
+Rico.setCookie=function(e,g,f,d,a){var h=e+"="+escape(g);
+if(typeof(f)=="number"){var b=new Date();
+b.setTime(b.getTime()+(f*24*60*60*1000));
+h+="; expires="+b.toGMTString()
+}if(typeof(d)=="string"){h+="; path="+d
+}if(typeof(a)=="string"){h+="; domain="+a
+}document.cookie=h
+};
+Rico.phrasesById={};
+Rico.thouSep=",";
+Rico.decPoint=".";
+Rico.langCode="en";
+Rico.dateFmt="mm/dd/yyyy";
+Rico.timeFmt="hh:nn:ss a/pm";
+Rico.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"];
+Rico.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
+Rico.monthAbbr=function(a){return this.monthNamesShort?this.monthNamesShort[a]:this.monthNames[a].substr(0,3)
+};
+Rico.dayAbbr=function(a){return this.dayNamesShort?this.dayNamesShort[a]:this.dayNames[a].substr(0,3)
+};
+Rico.addPhraseId=function(b,a){this.phrasesById[b]=a
+};
+Rico.getPhraseById=function(d){var b=this.phrasesById[d];
+if(!b){alert("Error: missing phrase for "+d);
+return""
+}if(arguments.length<=1){return b
+}var c=arguments;
+return b.replace(/(\$\d)/g,function(e){var a=parseInt(e.charAt(1),10);
+return(a<c.length)?c[a]:""
+})
+};
+Rico.formatPosNumber=function(e,f,c){var b=e.toFixed(f).split(/\./);
+if(c){var d=/(\d+)(\d{3})/;
+while(d.test(b[0])){b[0]=b[0].replace(d,"$1"+Rico.thouSep+"$2")
+}}return b.join(Rico.decPoint)
+};
+Rico.formatNumber=function(b,c){if(typeof b=="string"){b=parseFloat(b.replace(/,/,"."),10)
+}if(isNaN(b)){return"NaN"
+}if(typeof c.multiplier=="number"){b*=c.multiplier
+}var h=typeof c.decPlaces=="number"?c.decPlaces:0;
+var e=typeof c.thouSep=="undefined"?true:this.thouSep;
+var d=c.prefix||"";
+var f=c.suffix||"";
+var a=typeof c.negSign=="string"?c.negSign:"L";
+a=a.toUpperCase();
+var i,g;
+if(b<0){i=this.formatPosNumber(-b,h,e);
+if(a=="P"){i="("+i+")"
+}i=d+i;
+if(a=="L"){i="-"+i
+}if(a=="T"){i+="-"
+}g="negNumber"
+}else{g=b==0?"zeroNumber":"posNumber";
+i=d+this.formatPosNumber(b,h,e)
+}return"<span class='"+g+"'>"+i+f+"</span>"
+};
+Rico.formatDate=function(c,a){var b=(typeof a=="string")?a:"translateDate";
+switch(b){case"locale":case"localeDateTime":return c.toLocaleString();
+case"localeDate":return c.toLocaleDateString();
+case"translate":case"translateDateTime":b=this.dateFmt+" "+this.timeFmt;
+break;
+case"translateDate":b=this.dateFmt;
+break
+}return b.replace(/(yyyy|yy|mmmm|mmm|mm|dddd|ddd|dd|d|hh|nn|ss|a\/p)/gi,function(d){var e;
+switch(d){case"yyyy":return c.getFullYear();
+case"yy":return c.getFullYear().toString().substr(2);
+case"mmmm":return Rico.monthNames[c.getMonth()];
+case"mmm":return Rico.monthAbbr(c.getMonth());
+case"mm":return Rico.zFill(c.getMonth()+1,2);
+case"m":return(c.getMonth()+1);
+case"dddd":return Rico.dayNames[c.getDay()];
+case"ddd":return Rico.dayAbbr(c.getDay());
+case"dd":return Rico.zFill(c.getDate(),2);
+case"d":return c.getDate();
+case"hh":return Rico.zFill((e=c.getHours()%12)?e:12,2);
+case"h":return((e=c.getHours()%12)?e:12);
+case"HH":return Rico.zFill(c.getHours(),2);
+case"H":return c.getHours();
+case"nn":return Rico.zFill(c.getMinutes(),2);
+case"ss":return Rico.zFill(c.getSeconds(),2);
+case"a/p":return c.getHours()<12?"a":"p"
+}})
+};
+Rico.setISO8601=function(b,f){if(!b){return false
+}var e=b.match(/(\d\d\d\d)(?:-?(\d\d)(?:-?(\d\d)(?:[T ](\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|(?:([-+])(\d\d)(?::?(\d\d))?)?)?)?)?)?/);
+if(!e){return false
+}if(!f){f=0
+}var a=new Date(e[1],0,1);
+if(e[2]){a.setMonth(e[2]-1)
+}if(e[3]){a.setDate(e[3])
+}if(e[4]){a.setHours(e[4])
+}if(e[5]){a.setMinutes(e[5])
+}if(e[6]){a.setSeconds(e[6])
+}if(e[7]){a.setMilliseconds(Number("0."+e[7])*1000)
+}if(e[8]){if(e[10]&&e[11]){f=(Number(e[10])*60)+Number(e[11])
+}f*=((e[9]=="-")?1:-1);
+f-=a.getTimezoneOffset()
+}var c=(Number(a)+(f*60*1000));
+a.setTime(Number(c));
+return a
+};
+Rico.toISO8601String=function(a,e,h){if(!e){e=6
+}if(!h){h="Z"
+}else{var g=h.match(/([-+])([0-9]{2}):([0-9]{2})/);
+var c=(Number(g[2])*60)+Number(g[3]);
+c*=((g[1]=="-")?-1:1);
+a=new Date(Number(Number(a)+(c*60000)))
+}var i=function(d){return((d<10)?"0":"")+d
+};
+var f=a.getUTCFullYear();
+if(e>1){f+="-"+i(a.getUTCMonth()+1)
+}if(e>2){f+="-"+i(a.getUTCDate())
+}if(e>3){f+="T"+i(a.getUTCHours())+":"+i(a.getUTCMinutes())
+}if(e>5){var b=Number(a.getUTCSeconds()+"."+((a.getUTCMilliseconds()<100)?"0":"")+i(a.getUTCMilliseconds()));
+f+=":"+i(b)
+}else{if(e>4){f+=":"+i(a.getUTCSeconds())
+}}if(e>3){f+=h
+}return f
+};
+Rico.createXmlDocument=function(){if(document.implementation&&document.implementation.createDocument){var a=document.implementation.createDocument("","",null);
+if(a.readyState==null){a.readyState=1;
+a.addEventListener("load",function(){a.readyState=4;
+if(typeof a.onreadystatechange=="function"){a.onreadystatechange()
+}},false)
+}return a
+}if(window.ActiveXObject){return Rico.tryFunctions(function(){return new ActiveXObject("MSXML2.DomDocument")
+},function(){return new ActiveXObject("Microsoft.DomDocument")
+},function(){return new ActiveXObject("MSXML.DomDocument")
+},function(){return new ActiveXObject("MSXML3.DomDocument")
+})||false
+}return null
+};
+Rico.ajaxUpdater=function(c,b,a){this.updateSend(c,b,a)
+};
+Rico.ajaxUpdater.prototype={updateSend:function(d,c,b){this.element=d;
+this.onComplete=b.onComplete;
+var a=this;
+b.onComplete=function(e){a.updateComplete(e)
+};
+new Rico.ajaxRequest(c,b)
+},updateComplete:function(a){this.element.innerHTML=a.responseText;
+if(this.onComplete){this.onComplete(a)
+}}};
+try{document.execCommand("BackgroundImageCache",false,true)
+}catch(err){}Rico.eventBind(window,"load",Rico.eventHandle(Rico,"windowLoaded"));
Rico.applyShadow=function(b,a){if(typeof a=="undefined"){a=true
}if(a){Rico.addClass(b,"ricoShadow")
}return b
while(this.container.firstChild){this.content.appendChild(this.container.firstChild)
}this.container.appendChild(this.content);
this.content.className="RicoPopupContent";
-this.content.style.position="relative";
if(this.position!="absolute"){return
}if(this.options.closeFunc){this.closeFunc=this.options.closeFunc
}else{var a=this;
this.container.style.left="0px";
this.container.style.display="none";
if(this.options.zIndex>=0){this.container.style.zIndex=this.options.zIndex
-}this.content.style.zIndex=2;
-if(Rico.isIE&&Rico.ieVersion<7){this.ifr=document.createElement("iframe");
+}if(Rico.isIE&&Rico.ieVersion<7&&this.options.shim!==false){this.content.style.position="relative";
+this.content.style.zIndex=2;
+this.ifr=document.createElement("iframe");
this.ifr.className="RicoShim";
this.ifr.frameBorder=0;
this.ifr.src="javascript:'';";
},_endDrag:function(){this.container.style.cursor="";
Rico.eventUnbind(document,"mousemove",this.dragHandler);
Rico.eventUnbind(document,"mouseup",this.dropHandler)
-},openPopup:function(b,a){if(typeof b=="number"){this.container.style.left=b+"px"
-}if(typeof a=="number"){this.container.style.top=a+"px"
-}this.container.style.display="";
+},openPopup:function(b,a){this.move(b,a);
+this.container.style.display="";
if(this.container.id){Rico.log("openPopup "+this.container.id+" at "+b+","+a)
}Rico._AddOpenPopup(this)
},centerPopup:function(){this.openPopup();
if(Rico.theme.closeAnchor){Rico.addClass(b,Rico.theme.closeAnchor)
}var c=b.appendChild(document.createElement("span"));
c.title=Rico.getPhraseById("close");
-new Rico.HoverSet([b]);
+new Rico.HoverSet([b],{hoverClass:Rico.theme.hover||"ricoCloseHover"});
Rico.addClass(c,Rico.theme.close||"rico-icon RicoClose");
Rico.eventBind(b,"click",d);
return b
}if(a.width){this.contentDiv.style.width=a.width
}if(a.overflow){this.contentDiv.style.overflow=a.overflow
}Rico.addClass(this.content,"ricoWindow");
-if(Rico.theme.dialog){Rico.addClass(this.content,Rico.theme.dialog)
+if(Rico.theme.dialog){Rico.addClass(this.container,Rico.theme.dialog)
}this.content=this.contentDiv
},setTitle:function(a){this.titleContent.innerHTML=a
}};
}this.createContainer(c);
this.content.className=Rico.isWebKit?"ricoMenuSafari":"ricoMenu";
this.content.style.width=this.options.width;
-this.direction=Rico.getStyle(this.container,"direction")||"ltr";
-this.direction=this.direction.toLowerCase();
+this.direction=Rico.direction(this.container);
this.hidemenu();
this.itemCount=0
},showmenu:function(b,c){Rico.eventStop(b);
}},remove:function(){Rico.eventUnbind(element,"mousemove",this.movehandle);
Rico.eventUnbind(element,"mouseout",this.outhandle)
}};
-Rico.Effect={};
-Rico.Effect.easeIn=function(a){return Math.sqrt(a)
-};
-Rico.Effect.easeOut=function(a){return a*a
-};
Rico.ContentTransitionBase=function(){};
-Rico.ContentTransitionBase.prototype={initBase:function(e,d,b){Rico.log("ContentTransitionBase#initBase");
-if(typeof e=="string"){e=Rico.select(e)
-}if(typeof d=="string"){d=Rico.select(d)
-}this.options=b||{};
+Rico.ContentTransitionBase.prototype={initBase:function(e,d,b){this.options=b||{};
this.titles=e;
this.contents=d;
this.hoverSet=new Rico.HoverSet(e,b);
this.hoverSet.add(b);
this.selectionSet.add(b);
Rico.hide(a)
-},removeBase:function(a){},removeAll:function(){this.hoverSet.removeAll();
+},removeAll:function(){this.hoverSet.removeAll();
this.selectionSet.removeAll()
}};
Rico.Accordion=function(b,a){this.initialize(b,a)
}});
Rico.TabbedPanel=function(b,a){this.initialize(b,a)
};
-Rico.TabbedPanel.prototype=Rico.extend(new Rico.ContentTransitionBase(),{initialize:function(d,k){d=Rico.$(d);
-k=k||{};
-if(typeof k.panelWidth=="number"){k.panelWidth+="px"
-}if(typeof k.panelHeight=="number"){k.panelHeight+="px"
-}d.className=k.tabClass||Rico.theme.tabPanel||"Rico_tabPanel";
-if(k.panelWidth){d.style.width=k.panelWidth
+Rico.TabbedPanel.prototype=Rico.extend(new Rico.ContentTransitionBase(),{initialize:function(d,l){d=Rico.$(d);
+l=l||{};
+if(typeof l.panelWidth=="number"){l.panelWidth+="px"
+}if(typeof l.panelHeight=="number"){l.panelHeight+="px"
+}d.className=l.tabClass||Rico.theme.tabPanel||"Rico_tabPanel";
+if(l.panelWidth){d.style.width=l.panelWidth
}var g=[];
-var j=d.childNodes;
+var k=d.childNodes;
for(var e=0;
-e<j.length;
-e++){if(j[e]&&j[e].tagName&&j[e].tagName.match(/^div|ul$/i)){g.push(j[e])
+e<k.length;
+e++){if(k[e]&&k[e].tagName&&k[e].tagName.match(/^div|ul$/i)){g.push(k[e])
}}if(g.length<2){return
}var c=g[0].tagName.toLowerCase()=="ul"?"li":"div";
-g[0].className=k.navContainerClass||Rico.theme.tabNavContainer||"Rico_tabNavContainer";
+g[0].className=l.navContainerClass||Rico.theme.tabNavContainer||"Rico_tabNavContainer";
g[0].style.listStyle="none";
-g[1].className=k.contentContainerClass||Rico.theme.tabContentContainer||"Rico_tabContentContainer";
+g[1].className=l.contentContainerClass||Rico.theme.tabContentContainer||"Rico_tabContentContainer";
var f=Rico.getDirectChildrenByTag(g[0],c);
var b=Rico.getDirectChildrenByTag(g[1],"div");
-if(!k.corners){k.corners="top"
+var j=Rico.direction(d);
+if(!l.corners){l.corners="top"
}for(var e=0;
e<f.length;
-e++){f[e].className=k.titleClass||Rico.theme.tabTitle||"Rico_tabTitle";
+e++){if(j=="rtl"){Rico.setStyle(f[e],{"float":"right"})
+}f[e].className=l.titleClass||Rico.theme.tabTitle||"Rico_tabTitle";
var h=Rico.wrapChildren(f[e],"","","a");
h.href="javascript:void(0)";
-b[e].className=k.contentClass||Rico.theme.tabContent||"Rico_tabContent";
-if(k.panelHeight){b[e].style.overflow="auto"
-}if(k.corners!="none"){if(k.panelHdrWidth){f[e].style.width=k.panelHdrWidth
-}Rico.Corner.round(f[e],Rico.theme.tabCornerOptions||k)
-}}k.selectedClass=Rico.theme.tabSelected||"selected";
-this.initBase(f,b,k);
+b[e].className=l.contentClass||Rico.theme.tabContent||"Rico_tabContent";
+if(l.panelHeight){b[e].style.overflow="auto"
+}if(l.corners!="none"){if(l.panelHdrWidth){f[e].style.width=l.panelHdrWidth
+}Rico.Corner.round(f[e],Rico.theme.tabCornerOptions||l)
+}}l.selectedClass=Rico.theme.tabSelected||"selected";
+this.initBase(f,b,l);
if(this.selected){this.transition(this.selected)
}},transition:function(a){Rico.log("TabbedPanel#transition "+typeof(a));
if(this.selected){Rico.hide(this.selected)
this.bPageLoaded=false;
this.img=[];
this.Holidays={};
-this.weekString=Rico.getPhraseById("calWeekHdg");
this.re=/^\s*(\w+)(\W)(\w+)(\W)(\w+)/i;
this.setDateFmt(this.options.dateFmt)
},setDateFmt:function(a){this.dateFmt=(a=="rico")?Rico.dateFmt:a;
}},addHoliday:function(f,a,g,e,c,b){this.Holidays[this.holidayKey(g,a-1,f)]={desc:e,txtColor:b,bgColor:c||"#DDF"}
},holidayKey:function(c,a,b){return"h"+Rico.zFill(c,4)+Rico.zFill(a,2)+Rico.zFill(b,2)
},atLoad:function(){Rico.log("Calendar#atLoad: "+this.id);
-var e=Rico.$(this.id);
-if(e){this.setDiv(e)
+var d=Rico.$(this.id);
+if(d){this.setDiv(d)
}else{this.createContainer();
this.container.id=this.id
}Rico.addClass(this.content,Rico.theme.calendar||"ricoCalContainer");
-this.content.style.display="block";
+this.direction=Rico.direction(this.container);
+var b,k,g,f,h,p,m,q,e;
+this.colStart=this.options.showWeekNumber?1:0;
+var l=7+this.colStart;
this.maintab=document.createElement("table");
this.maintab.cellSpacing=2;
this.maintab.cellPadding=0;
this.maintab.border=0;
this.maintab.style.borderCollapse="separate";
-this.maintab.className="ricoCalTab";
-if(Rico.theme.calendarTable){Rico.addClass(this.maintab,Rico.theme.calendarTable)
-}this.tbody=Rico.getTBody(this.maintab);
-var d,l,h,g,k,n,m,o,f;
-this.colStart=this.options.showWeekNumber?1:0;
-for(h=0;
-h<7;
-h++){d=this.tbody.insertRow(-1);
-d.className="row"+h;
-for(l=0;
-l<7+this.colStart;
-l++){d.insertCell(-1)
-}}d=this.tbody.rows[0];
-d.className="ricoCalDayNames";
-if(this.options.showWeekNumber){d.cells[0].innerHTML=this.weekString;
-for(h=0;
-h<7;
-h++){this.tbody.rows[h].cells[0].className="ricoCalWeekNum"
-}}this.styles=[];
-for(h=0;
-h<7;
-h++){n=(h+this.options.startAt)%7;
-d.cells[h+this.colStart].innerHTML=Rico.dayAbbr(n);
-this.styles[h]="ricoCal"+n
-}this.heading=this.content.appendChild(document.createElement("div"));
-this.heading.className="RicoCalHeading";
+this.maintab.className=Rico.theme.calendarTable||"ricoCalTab";
+this.tbody=Rico.getTBody(this.maintab);
+this.tbody.className="ricoCalBody";
+this.thead=this.maintab.createTHead();
+b=this.thead.insertRow(-1);
+this.heading=b.insertCell(-1);
+this.heading.colSpan=l;
+this.content.style.display="block";
+if(this.position=="absolute"){this.content.style.width="auto";
+this.maintab.style.width="auto"
+}else{this.container.style.position="relative";
+this.heading.style.position="static";
+this.content.style.padding="0px";
+this.content.style.width="15em";
+this.maintab.style.width="100%"
+}this.heading.className="RicoCalHeading";
if(Rico.theme.calendarHeading){Rico.addClass(this.heading,Rico.theme.calendarHeading)
-}var b=this.heading.appendChild(document.createElement("div"));
-b.className="RicoCalHeadingInner";
-b.appendChild(this._createTitleSection("Month"));
-b.appendChild(this._createTitleSection("Year"));
+}this.navtab=this.heading.appendChild(document.createElement("table"));
+this.navrow=this.navtab.insertRow(-1);
+this._createTitleSection("Month");
+this.navrow.insertCell(-1).innerHTML=" ";
+this._createTitleSection("Year");
new Rico.HoverSet(this.heading.getElementsByTagName("a"));
-new Rico.HoverSet(this.tbody.getElementsByTagName("td"),{hoverNodes:function(a){return a.innerHTML.match(/^\d+$/)?[a]:[]
-}});
if(this.position=="absolute"){this.heading.appendChild(Rico.closeButton(Rico.eventHandle(this,"close")))
-}if(this.options.showToday){this.tfoot=this.maintab.createTFoot();
-d=this.tfoot.insertRow(-1);
-this.todayCell=d.insertCell(-1);
-this.todayCell.colSpan=7+this.colStart;
-if(Rico.theme.calendarFooter){Rico.addClass(this.todayCell,Rico.theme.calendarFooter)
-}Rico.eventBind(this.todayCell,"click",Rico.eventHandle(this,"selectNow"),false)
+}this.styles=[];
+for(g=0;
+g<7;
+g++){b=this.tbody.insertRow(-1);
+b.className=g==0?"ricoCalDayNames":"row"+g;
+if(this.options.showWeekNumber){k=b.insertCell(-1);
+k.className="ricoCalWeekNum";
+if(g==0){k.innerHTML=Rico.getPhraseById("calWeekHdg")
+}}for(f=0;
+f<7;
+f++){k=b.insertCell(-1);
+if(g==0){p=(f+this.options.startAt)%7;
+k.innerHTML=Rico.dayAbbr(p);
+this.styles[f]="ricoCal"+p
+}else{k.className=this.styles[f];
+if(Rico.theme.calendarDay){Rico.addClass(k,Rico.theme.calendarDay)
+}}}}if(this.options.showToday){this.tfoot=this.maintab.createTFoot();
+this.tfoot.className="ricoCalFoot";
+b=this.tfoot.insertRow(-1);
+this.todayCell=b.insertCell(-1);
+this.todayCell.colSpan=l;
+this.todayCell.className=Rico.theme.calendarFooter||"ricoCalFoot";
+Rico.eventBind(this.todayCell,"click",Rico.eventHandle(this,"selectNow"),false)
}this.content.appendChild(this.maintab);
-this.monthPopup=new Rico.Popup(document.createElement("div"));
-this.monthPopup.closePopup();
-f=document.createElement("table");
-f.className="ricoCalMenu";
-if(Rico.theme.calendarPopdown){Rico.addClass(f,Rico.theme.calendarPopdown)
-}f.cellPadding=2;
-f.cellSpacing=0;
-f.border=0;
-f.style.borderCollapse="separate";
-f.style.margin="0px";
-for(h=0;
-h<4;
-h++){d=f.insertRow(-1);
+new Rico.HoverSet(this.tbody.getElementsByTagName("td"),{hoverNodes:function(a){return a.innerHTML.match(/^\d+$/)?[a]:[]
+}});
+this.monthPopup=new Rico.Popup(document.createElement("div"),{shim:false,zIndex:10});
+this.monthPopup.content.className="ricoCalMonthPrompt";
+e=document.createElement("table");
+e.className="ricoCalMenu";
+if(Rico.theme.calendarPopdown){Rico.addClass(e,Rico.theme.calendarPopdown)
+}e.cellPadding=2;
+e.cellSpacing=0;
+e.border=0;
+e.style.borderCollapse="separate";
+e.style.margin="0px";
for(g=0;
-g<3;
-g++){l=d.insertCell(-1);
+g<4;
+g++){b=e.insertRow(-1);
+for(f=0;
+f<3;
+f++){k=b.insertCell(-1);
m=document.createElement("a");
-m.innerHTML=Rico.monthAbbr(h*3+g);
-m.name=h*3+g;
+m.innerHTML=Rico.monthAbbr(g*3+f);
+m.name=g*3+f;
if(Rico.theme.calendarDay){Rico.addClass(m,Rico.theme.calendarDay)
-}l.appendChild(m);
+}k.appendChild(m);
Rico.eventBind(m,"click",Rico.eventHandle(this,"selectMonth"),false)
-}}new Rico.HoverSet(f.getElementsByTagName("a"));
-this.monthPopup.content.appendChild(f);
+}}new Rico.HoverSet(e.getElementsByTagName("a"));
+this.monthPopup.content.appendChild(e);
this.container.appendChild(this.monthPopup.container);
-this.yearPopup=new Rico.Popup(document.createElement("div"));
-this.yearPopup.closePopup();
+this.monthPopup.closePopup();
+this.yearPopup=new Rico.Popup(document.createElement("div"),{shim:false,zIndex:10});
this.yearPopup.content.className="ricoCalYearPrompt";
if(Rico.theme.calendarPopdown){Rico.addClass(this.yearPopup.content,Rico.theme.calendarPopdown)
-}var f=document.createElement("table");
-f.cellPadding=2;
-f.cellSpacing=0;
-f.border=0;
-f.style.borderCollapse="separate";
-f.style.margin="0px";
-d=f.insertRow(-1);
-this.yearLabel=d.insertCell(-1);
-this.yearLabel.colSpan=3;
-this.yearLabel.innerHTML=Rico.getPhraseById("calYearRange",this.options.minDate.getFullYear(),this.options.maxDate.getFullYear());
-d=f.insertRow(-1);
-l=d.insertCell(-1);
-this.yearInput=l.appendChild(document.createElement("input"));
+}var o=document.createElement("p");
+o.innerHTML=Rico.getPhraseById("calYearRange",this.options.minDate.getFullYear(),this.options.maxDate.getFullYear());
+var n=document.createElement("p");
+this.yearInput=n.appendChild(document.createElement("input"));
this.yearInput.maxlength=4;
this.yearInput.size=4;
Rico.eventBind(this.yearInput,"keyup",Rico.eventHandle(this,"yearKey"),false);
-l=d.insertCell(-1);
-var m=Rico.floatButton("Checkmark",Rico.eventHandle(this,"processPopUpYear"));
-Rico.setStyle(m.firstChild,{margin:"0px",padding:"0px",border:"none"});
-l.appendChild(m);
-l=d.insertCell(-1);
+m=Rico.floatButton("Checkmark",Rico.eventHandle(this,"processPopUpYear"));
+n.appendChild(m);
m=Rico.floatButton("Cancel",Rico.eventHandle(this,"popDownYear"));
-Rico.setStyle(m.firstChild,{margin:"0px",padding:"0px",border:"none"});
-l.appendChild(m);
-this.yearPopup.content.appendChild(f);
+n.appendChild(m);
+this.yearPopup.content.appendChild(o);
+this.yearPopup.content.appendChild(n);
this.container.appendChild(this.yearPopup.container);
-this.yearPopup.container.style.left="";
-this.yearPopup.container.style.right="5px";
-this.yearPopup.container.style.zIndex=10;
+this.yearPopup.closePopup();
m=this.content.getElementsByTagName("a");
-for(h=0;
-h<m.length;
-h++){m[h].href="javascript:void(0)"
+for(g=0;
+g<m.length;
+g++){m[g].href="javascript:void(0)"
}Rico.eventBind(this.tbody,"click",Rico.eventHandle(this,"saveAndClose"));
this.close();
this.bPageLoaded=true
-},_createTitleSection:function(d){var c=document.createElement("span");
-c.className="RicoCal"+d+"Heading";
-if(Rico.theme.calendarSubheading){Rico.addClass(c,Rico.theme.calendarSubheading)
-}var b=c.appendChild(document.createElement("a"));
-b.className="Rico_leftArrow";
-if(Rico.theme.leftArrowAnchor){Rico.addClass(b,Rico.theme.leftArrowAnchor)
-}b.appendChild(this.createNavArrow("dec"+d,"left"));
-b=c.appendChild(document.createElement("a"));
-b.style.display="inline";
-Rico.eventBind(b,"click",Rico.eventHandle(this,"popUp"+d),false);
-this["title"+d]=b;
-b=c.appendChild(document.createElement("a"));
-b.className="Rico_rightArrow";
-if(Rico.theme.rightArrowAnchor){Rico.addClass(b,Rico.theme.rightArrowAnchor)
-}b.appendChild(this.createNavArrow("inc"+d,"right"));
-return c
+},_createTitleSection:function(e){var d=["left","right"];
+if(this.direction=="rtl"){d.reverse()
+}var f=this.navrow.insertCell(-1);
+var b=f.appendChild(document.createElement("a"));
+b.className="Rico_"+d[0]+"Arrow";
+b.appendChild(this.createNavArrow("dec"+e,d[0]));
+f=this.navrow.insertCell(-1);
+b=f.appendChild(document.createElement("a"));
+Rico.eventBind(b,"click",Rico.eventHandle(this,"popUp"+e),false);
+this["title"+e]=b;
+f=this.navrow.insertCell(-1);
+b=f.appendChild(document.createElement("a"));
+b.className="Rico_"+d[1]+"Arrow";
+b.appendChild(this.createNavArrow("inc"+e,d[1]))
},selectNow:function(){var a=new Date();
this.dateNow=a.getDate();
this.monthNow=a.getMonth();
this.constructCalendar()
},createNavArrow:function(a,c){var b=document.createElement("span");
b.className=Rico.theme[c+"Arrow"]||"rico-icon Rico_"+c+"Arrow";
+b.style.display="inline-block";
Rico.eventBind(b,"click",Rico.eventHandle(this,a),false);
return b
},isValidMonth:function(a,b){if(a<this.options.minDate.getFullYear()){return false
this.monthSelected=parseInt(a.name,10);
this.constructCalendar();
Rico.eventStop(b)
+},openYrMo:function(b,a){if(this.direction=="rtl"){a=1-a
+}b.openPopup();
+var c=a?this.content.offsetWidth-b.container.offsetWidth-5:3;
+b.move(c,this.heading.offsetHeight+2)
},popUpMonth:function(a){Rico.eventStop(a);
if(this.monthPopup.visible()){this.popDownMonth();
-return
+return false
}this.popDownYear();
-if(Rico.isIE&&Rico.ieVersion<7){this.monthPopup.openPopup(null,this.heading.offsetHeight+2);
-this.monthPopup.container.style.left=""
-}else{this.monthPopup.openPopup(3,this.heading.offsetHeight+2)
-}return false
+this.openYrMo(this.monthPopup,0);
+return false
},popDownMonth:function(){this.monthPopup.closePopup()
},popDownYear:function(){this.yearPopup.closePopup();
this.yearInput.disabled=true
-},popUpYear:function(a){Rico.eventStop(a);
+},popUpYear:function(b){Rico.eventStop(b);
if(this.yearPopup.visible()){this.popDownYear();
-return
+return false
}this.popDownMonth();
-this.yearPopup.openPopup(null,this.heading.offsetHeight+2);
this.yearInput.disabled=false;
this.yearInput.value="";
-this.yearInput.focus();
+this.openYrMo(this.yearPopup,1);
+var a=this;
+setTimeout(function(){a.yearInput.focus()
+},10);
return false
},yearKey:function(a){switch(Rico.eventKey(a)){case 27:this.popDownYear();
Rico.eventStop(a);
}m.style.color=g?g.txtColor:"";
m.style.backgroundColor=g?g.bgColor:"";
m.title=g?g.desc:"";
+m.style.visibility="visible";
if(b==6){a++
}}while(n<42){b=n%7;
this.resetCell(this.tbody.rows[a].cells[b+this.colStart]);
this.titleYear.innerHTML=this.yearSelected;
if(this.todayCell){this.todayCell.innerHTML=Rico.getPhraseById("calToday",this.dateNow,Rico.monthAbbr(this.monthNow),this.yearNow,this.monthNow+1)
}},resetCell:function(a){a.innerHTML=" ";
-a.className="ricoCalEmpty";
-a.style.color="";
-a.style.backgroundColor="";
-a.title=""
+a.title="";
+a.style.visibility="hidden"
},saveAndClose:function(g){Rico.eventStop(g);
var f=Rico.eventElement(g);
var c=f.innerHTML.replace(/ /g,"");
this.loadXMLDoc(g.name)
}}};
if(typeof Rico=="undefined"){throw ("GridCommon requires the Rico JavaScript framework")
-}Rico.GridCommon={baseInit:function(){this.options={saveColumnInfo:{width:true,filter:false,sort:false},cookiePrefix:"RicoGrid.",allowColResize:true,windowResize:true,click:null,dblclick:null,contextmenu:null,menuEvent:"dblclick",defaultWidth:-1,scrollBarWidth:19,minScrollWidth:100,frozenColumns:0,exportWindow:"height=400,width=500,scrollbars=1,menubar=1,resizable=1,location=0,toolbar=0,status=0",exportStyleList:["background-color","color","text-align","font-weight","font-size","font-family"],exportImgTags:false,exportFormFields:true,FilterLocation:null,FilterAllToken:"___ALL___",columnSpecs:[]};
+}Rico.GridCommon={baseInit:function(){this.options={saveColumnInfo:{width:true,filter:false,sort:false},cookiePrefix:"RicoGrid.",allowColResize:true,windowResize:true,click:null,dblclick:null,contextmenu:null,menuEvent:null,defaultWidth:-1,scrollBarWidth:19,minScrollWidth:100,frozenColumns:0,exportWindow:"height=400,width=500,scrollbars=1,menubar=1,resizable=1,location=0,toolbar=0,status=0",exportStyleList:["background-color","color","text-align","font-weight","font-size","font-family"],exportImgTags:false,exportFormFields:true,FilterLocation:null,FilterAllToken:"___ALL___",columnSpecs:[]};
this.hdrCells=[];
this.headerColCnt=0;
this.headerRowIdx=0;
d.innerHTML=b.displayName;
Rico.eventBind(b.ChooserBox,"click",Rico.eventHandle(b,"chooseColumn"),false)
}}Rico.log("opening columnChooser");
-this.columnChooser.openPopup(1,this.hdrHt);
+this.columnChooser.openPopup(3,this.hdrHt+3);
for(a=0;
a<this.columns.length;
a++){this.columns[a].ChooserBox.checked=this.columns[a].visible;
}};
Rico.ColumnConst={UNFILTERED:0,SYSTEMFILTER:1,USERFILTER:2,UNSORTED:0,SORT_ASC:"ASC",SORT_DESC:"DESC",MINWIDTH:10};
Rico.TableColumnBase=function(){};
-Rico.TableColumnBase.prototype={baseInit:function(h,g,e,d){Rico.log("TableColumnBase.init index="+g+" tabIdx="+d);
+Rico.TableColumnBase.prototype={baseInit:function(h,g,e,d){Rico.log("TableColumnBase.baseInit index="+g+" tabIdx="+d);
this.liveGrid=h;
this.index=g;
this.hideWidth=Rico.isKonqueror||Rico.isWebKit||h.headerRowCnt>1?5:2;
this.mouseMoveHandler=Rico.eventHandle(this,"handleMouseMove");
this.mouseUpHandler=Rico.eventHandle(this,"handleMouseUp");
this.mouseOutHandler=Rico.eventHandle(this,"handleMouseOut");
-this.fieldName="col"+this.index;
this.format={type:"text"};
var b=h.options.columnSpecs[g];
if(typeof b=="object"){Rico.extend(this.format,b)
}Rico.addClass(this.dataColDiv,this.colClassName());
this.visible=true;
if(typeof this.format.visible=="boolean"){this.visible=this.format.visible
-}Rico.log("TableColumn.init index="+g+" fieldName="+this.fieldName);
-this.sortable=typeof this.format.canSort=="boolean"?this.format.canSort:h.options.canSortDefault;
+}this.sortable=typeof this.format.canSort=="boolean"?this.format.canSort:h.options.canSortDefault;
this.currentSort=Rico.ColumnConst.UNSORTED;
this.filterable=typeof this.format.canFilter=="boolean"?this.format.canFilter:h.options.canFilterDefault;
this.filterType=Rico.ColumnConst.UNFILTERED;
},handleMouseDown:function(b){this.resizeStart=Rico.eventClient(b).x;
this.origWidth=parseInt(this.colWidth,10);
var a=Rico.positionedOffset(this.hdrCell);
-if(this.liveGrid.direction=="rtl"){this.edge=a.left+this.liveGrid.options.scrollBarWidth;
+if(this.liveGrid.direction=="rtl"){this.edge=a.left;
switch(this.tabIdx){case 0:this.edge+=this.liveGrid.innerDiv.offsetWidth;
break;
case 1:this.edge-=this.liveGrid.scrollDiv.scrollLeft;
for(a=0;
a<2;
a++){Rico.log("simpleGridInit "+a);
-this.tabs[a]=document.getElementById(this.tableId+"_tab"+a);
+this.tabs[a]=Rico.$(this.tableId+"_tab"+a);
if(!this.tabs[a]){return
-}this.hdrTabs[a]=document.getElementById(this.tableId+"_tab"+a+"h");
+}this.hdrTabs[a]=Rico.$(this.tableId+"_tab"+a+"h");
if(!this.hdrTabs[a]){return
}this.thead[a]=this.hdrTabs[a];
this.tbody[a]=this.tabs[a];
},getWindowCell:function(c,b){var a=this.bufferRow(c);
return this.isVisible(a)&&b<this.rows[a].length?this.rows[a][b]:null
},getWindowStyle:function(c,b){var a=this.bufferRow(c);
-return this.attr&&this.isVisible(a)&&b<this.attr[a].length?this.attr[a][b]:""
+return this.attr&&this.isVisible(a)&&this.attr[a]&&b<this.attr[a].length?this.attr[a][b]:""
},getWindowValue:function(b,a){return this.getWindowCell(b,a)
},setWindowValue:function(d,b,c){var a=this.bufferRow(d);
if(a>=this.windowEnd){return false
if(this.options.headingSort=="hover"){this.createHoverSet()
}this.bookmark=document.getElementById(this.tableId+"_bookmark");
this.sizeDivs();
-var a=this.buffer.options.canFilter?this.options.FilterLocation:false;
-if(typeof(a)=="number"&&a<0){a=this.addHeadingRow("ricoLG_FilterRow")
+var a=-1;
+if(this.buffer.options.canFilter&&this.options.AutoFilter){a=this.addHeadingRow("ricoLG_FilterRow")
}this.createDataCells(this.options.visibleRows);
if(this.pageSize==0){return
}this.buffer.registerGrid(this);
}if(this.options.canFilterDefault&&this.options.getQueryParms){this.checkForFilterParms()
}this.scrollToRow(this.options.offset);
this.buffer.fetch(this.options.offset)
-}if(typeof(a)=="number"){this.createFilters(a)
+}if(a>=0){this.createFilters(a)
}this.scrollEventFunc=Rico.eventHandle(this,"handleScroll");
this.wheelEventFunc=Rico.eventHandle(this,"handleWheel");
this.wheelEvent=(Rico.isIE||Rico.isOpera||Rico.isWebKit)?"mousewheel":"DOMMouseScroll";
this.setHorizontalScroll();
Rico.log("setHorizontalScroll done");
if(this.options.windowResize){Rico.runLater(100,this,"pluginWindowResize")
-}Rico.log("initialize complete for "+this.tableId)
-}};
+}Rico.log("initialize complete for "+this.tableId);
+if(this.direction=="rtl"&&(!Rico.isWebKit||this.scrollDiv.clientLeft>0)){this.scrollTab.style.right="0px"
+}else{this.scrollTab.style.left="0px";
+Rico.setStyle(this.tabs[1],{"float":"left"})
+}}};
Rico.LiveGridMethods={createHoverSet:function(){var a=[];
for(var b=0;
b<this.headerColCnt;
if(!e){return false
}if(e.tagName.toLowerCase()=="table"){var a=e.getElementsByTagName("thead");
if(a.length==1){Rico.log("createTables: using thead section, id="+this.tableId);
-if(this.options.PanelNamesOnTabHdr&&this.options.panels){var d=a[0].insertRow(0);
+if(this.options.ColGroupsOnTabHdr&&this.options.ColGroups){var d=a[0].insertRow(0);
this.insertPanelNames(d,0,this.options.frozenColumns,"ricoFrozen");
this.insertPanelNames(d,this.options.frozenColumns,this.options.columnSpecs.length)
}g=a[0].rows
this.loadHdrSrc(g)
}else{this.createHdr(0,0,this.options.frozenColumns);
this.createHdr(1,this.options.frozenColumns,this.options.columnSpecs.length);
-if(this.options.PanelNamesOnTabHdr&&this.options.panels){this.insertPanelNames(this.thead[0].insertRow(0),0,this.options.frozenColumns);
+if(this.options.ColGroupsOnTabHdr&&this.options.ColGroups){this.insertPanelNames(this.thead[0].insertRow(0),0,this.options.frozenColumns);
this.insertPanelNames(this.thead[1].insertRow(0),this.options.frozenColumns,this.options.columnSpecs.length)
}for(b=0;
b<2;
var i=-1,j,e=null,g=0;
for(var h=b;
h<d;
-h++){if(i==this.options.columnSpecs[h].panelIdx){j++
+h++){if(i==this.options.columnSpecs[h].ColGroupIdx){j++
}else{if(e){e.colSpan=j
}e=a.insertCell(-1);
if(f){e.className=f
}j=1;
-i=this.options.columnSpecs[h].panelIdx;
-e.innerHTML=this.options.panels[i]
+i=this.options.columnSpecs[h].ColGroupIdx;
+e.innerHTML=this.options.ColGroups[i]
}}if(e){e.colSpan=j
}},createHdr:function(d,g,b){Rico.log("createHdr: i="+d+" start="+g+" limit="+b);
var a=this.thead[d].insertRow(-1);
b.className="ricoLG_cell "+a;
b.id=this.tableId+"_"+this.pageSize+"_"+d;
this.columns[d].dataColDiv.appendChild(b);
-if(this.columns[d].format.canDrag&&Rico.registerDraggable){Rico.registerDraggable(new Rico.LiveGridDraggable(this,this.pageSize,d),this.options.dndMgrIdx)
-}b.innerHTML=" ";
if(this.columns[d]._create){this.columns[d]._create(b,this.pageSize)
+}else{b.innerHTML=" "
+}if(this.columns[d].format.canDrag&&Rico.registerDraggable){Rico.registerDraggable(new Rico.LiveGridDraggable(this,this.pageSize,d),this.options.dndMgrIdx)
}}this.pageSize++
},defaultRowClass:function(b){var a;
if(b%2==0){a="ricoLG_evenRow"
a<this.columns.length;
a++){if(this.columns[a].isSorted()){return a
}}return -1
-},findColumnName:function(a){for(var b=0;
-b<this.columns.length;
-b++){if(this.columns[b].fieldName==a){return b
-}}return -1
},findColumnsBySpec:function(b,c){var a=[];
for(var d=0;
d<this.options.columnSpecs.length;
d++){if(this.options.columnSpecs[d][b]==c){a.push(d)
}}return a
-},setSortUI:function(b,c){Rico.log("setSortUI: "+b+" "+c);
+},setSortUI:function(c,b){Rico.log("setSortUI: "+c+" "+b);
var a=this.findSortedColumn();
-if(a>=0){c=this.columns[a].getSortDirection()
-}else{if(typeof c!="string"){c=Rico.ColumnConst.SORT_ASC
-}else{c=c.toUpperCase();
-if(c!=Rico.ColumnConst.SORT_DESC){c=Rico.ColumnConst.SORT_ASC
-}}switch(typeof b){case"string":a=this.findColumnName(b);
+if(a>=0){b=this.columns[a].getSortDirection()
+}else{if(typeof b!="string"){b=Rico.ColumnConst.SORT_ASC
+}else{b=b.toUpperCase();
+if(b!=Rico.ColumnConst.SORT_DESC){b=Rico.ColumnConst.SORT_ASC
+}}switch(typeof c){case"string":a=this.findColumnsBySpec("id",c);
break;
-case"number":a=b;
+case"number":a=c;
break
}}if(typeof(a)!="number"||a<0){return
}this.clearSort();
-this.columns[a].setSorted(c);
+this.columns[a].setSorted(b);
this.buffer.sortBuffer(a)
},clearSort:function(){for(var a=0;
a<this.columns.length;
});
this.exportmenu.addMenuItemId("gridmenuExportAll2SS",function(){f.printAllSQL("xl")
},f.totalRows<=n)
-}else{this.addSubMenuItem(Rico.getPhraseById("gridmenuExport"),this.exportmenu,false);
-this.exportmenu.addMenuItemId("gridmenuExportVis2Web",function(){f.printVisible()
+}else{this.exportmenu.addMenuItemId("gridmenuExportVis2Web",function(){f.printVisible()
});
this.exportmenu.addMenuItemId("gridmenuExportAll2Web",function(){f.printAll()
},f.totalRows<=n)
if(this.processingRequest){Rico.log("AjaxSQL fetch: queue request");
this.pendingRequest=e;
return
-}if(e<0){this.clear();
+}if((typeof e=="undefined")||(e<0)){this.clear();
this.setTotalRows(0);
this.foundRowCount=false;
e=0
this.rows=this.rows.slice(this.rows.length-this.maxBufferSize,this.rows.length);
if(this.attr){this.attr=this.attr.slice(this.attr.length-this.maxBufferSize,this.attr.length)
}this.startPos=this.startPos+(c-this.rows.length)
-}}}else{if(d+a.length<this.startPos){this.rows=a
+}}}else{if(d+a.length<this.startPos){this.rows=a;
+this.attr=b
}else{this.rows=a.slice(0,this.startPos).concat(this.rows);
-if(this.maxBufferSize&&this.rows.length>this.maxBufferSize){this.rows=this.rows.slice(0,this.maxBufferSize)
-}}this.startPos=d
+if(b){this.attr=b.slice(0,this.startPos).concat(this.attr)
+}if(this.maxBufferSize&&this.rows.length>this.maxBufferSize){this.rows=this.rows.slice(0,this.maxBufferSize);
+if(this.attr){this.attr=this.attr.slice(0,this.maxBufferSize)
+}}}this.startPos=d
}}this.size=this.rows.length
},sortBuffer:function(b){this.sortParm={};
var a=this.liveGrid.columns[b];
this.saveMsg=Rico.$(b.tableId+"_savemsg");
Rico.eventBind(document,"click",Rico.eventHandle(this,"clearSaveMsg"));
this.extraMenuItems=[];
-this.responseHandler=function(){a.processResponse()
+this.responseHandler=function(c){a.processResponse(c)
};
Rico.log("Rico.TableEdit.initialize complete")
},createKeyArray:function(){this.keys=[];
Rico.runLater(50,this,"initPanelGroup")
}},createWindow:function(){var a=this;
return new Rico.Window("",{closeFunc:function(){a.makeFormInvisible()
-},overflow:this.options.panels?"hidden":"auto"})
+},overflow:this.options.ColGroups?"hidden":"auto"})
},initPanelGroup:function(){this.requestCount--;
Rico.log("initPanelGroup: "+this.requestCount);
if(this.requestCount>0){return
}if(!a.EntryType){continue
}if(a.EntryType=="H"){continue
}if(a.FormView&&a.FormView=="hidden"){continue
-}var d=a.panelIdx||0;
+}var d=a.ColGroupIdx||0;
if(d==c){e=true;
break
}}if(!e){return null
}this.panelHdr[c]=document.createElement("li");
-this.panelHdr[c].innerHTML=this.options.panels[c];
+this.panelHdr[c].innerHTML=this.options.ColGroups[c];
this.panelHdrs.appendChild(this.panelHdr[c]);
this.panelContent[c]=document.createElement("div");
this.panelContents.appendChild(this.panelContent[c]);
this.panelCnt=0;
this.panelHdr=[];
this.panelContent=[];
-if(this.options.panels){this.panelGroup=document.createElement("div");
+if(this.options.ColGroups){this.panelGroup=document.createElement("div");
this.panelGroup.className="tabPanelGroup";
this.panelHdrs=document.createElement("ul");
this.panelGroup.appendChild(this.panelHdrs);
this.panelGroup.appendChild(this.panelContents);
this.panelActualIdx=[];
e.appendChild(this.panelGroup);
-if(this.grid.direction=="rtl"){for(c=this.options.panels.length-1;
+if(this.grid.direction=="rtl"){for(c=this.options.ColGroups.length-1;
c>=0;
c--){b[c]=this.createPanel(c)
}}else{for(c=0;
-c<this.options.panels.length;
+c<this.options.ColGroups.length;
c++){b[c]=this.createPanel(c)
}}e.appendChild(this.panelGroup)
}else{f=document.createElement("div");
c<this.grid.columns.length;
c++){a=this.grid.columns[c].format;
if(!a){continue
-}d=a.panelIdx||0;
+}d=a.ColGroupIdx||0;
if(b[d]){this.appendFormField(this.grid.columns[c],b[d])
}if(typeof a.pattern=="string"){switch(a.pattern){case"email":a.regexp=/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$/;
break;
this.responseDialog.style.left=a.left+"px";
this.responseDialog.style.display=""
},processResponse:function(g){var d,f=true;
-Rico.log("Processing response from form submittal");
+Rico.log("Processing response from form submittal: "+typeof(g));
this.responseDiv.innerHTML=g.responseText;
var e=Rico.select(".ricoFormResponse",this.responseDiv);
-if(e){var c=Rico.trim(e[0].className).split(/\s+/)[1];
+if(e){Rico.log("Found ricoFormResponse");
+var c=Rico.trim(e[0].className).split(/\s+/)[1];
d=Rico.getPhraseById(c,this.options.RecordName)
-}else{var b=this.responseDiv.childNodes;
+}else{Rico.log("Processing response text");
+var b=this.responseDiv.childNodes;
for(var a=b.length-1;
a>=0;
a--){if(b[a].nodeType==1&&b[a].nodeName!="P"&&b[a].nodeName!="DIV"&&b[a].nodeName!="BR"){this.responseDiv.removeChild(b[a])
}new Rico.ajaxRequest(this.options.updateURL,{parameters:d,method:"post",onComplete:this.responseHandler})
}this.menu.cancelmenu()
},validationMsg:function(d,c,e){var b=this.grid.columns[c];
-if(this.formPanels){this.formPanels.select(this.panelActualIdx[b.format.panelIdx])
+if(this.formPanels){this.formPanels.select(this.panelActualIdx[b.format.ColGroupIdx])
}var a=Rico.stripTags(b.formLabel.innerHTML).replace(/ /g," ");
var f=Rico.getPhraseById(e,' "'+a+'"');
Rico.log(" Validation error: "+f);