+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
};
+Rico._OpenPopupList=[];
+Rico._RemoveOpenPopup=function(a){if(a.openIndex>=0&&a.openIndex<Rico._OpenPopupList.length){Rico._OpenPopupList.splice(a.openIndex,1)
+}a.openIndex=-1
+};
+Rico._AddOpenPopup=function(a){a.openIndex=Rico._OpenPopupList.push(a)-1
+};
+Rico._checkEscKey=function(b){if(Rico.eventKey(b)!=27){return true
+}while(Rico._OpenPopupList.length>0){var a=Rico._OpenPopupList.pop();
+if(a&&a.visible()){a.openIndex=-1;
+Rico.eventStop(b);
+a.closeFunc();
+return false
+}}return true
+};
+Rico.eventBind(document,"keyup",Rico.eventHandle(Rico,"_checkEscKey"));
Rico.Popup=function(b,a){this.initialize(b,a)
};
-Rico.Popup.prototype={initialize:function(b,a){this.options={hideOnEscape:true,hideOnClick:true,ignoreClicks:false,position:"absolute",shadow:true,zIndex:2,canDrag:false,dragElement:false,closeFunc:false};
+Rico.Popup.prototype={initialize:function(b,a){this.options={hideOnClick:false,ignoreClicks:false,position:"absolute",shadow:true,zIndex:2,canDrag:false,dragElement:false,closeFunc:false};
+this.openIndex=-1;
if(b){this.setDiv(b,a)
}},createContainer:function(a){this.setDiv(document.createElement("div"),a);
if(a&&a.parent){a.parent.appendChild(this.container)
this.container=Rico.$(c);
if(this.options.position=="auto"){this.position=Rico.getStyle(this.container,"position").toLowerCase()
}else{this.position=this.container.style.position=this.options.position
-}if(this.position!="absolute"){this.content=this.container;
-return
-}if(this.options.zIndex>=0){this.container.style.zIndex=this.options.zIndex
+}this.content=document.createElement("div");
+while(this.container.firstChild){this.content.appendChild(this.container.firstChild)
+}this.container.appendChild(this.content);
+this.content.className="RicoPopupContent";
+if(this.position!="absolute"){return
}if(this.options.closeFunc){this.closeFunc=this.options.closeFunc
}else{var a=this;
this.closeFunc=function(){a.closePopup()
}this.container.style.top="0px";
this.container.style.left="0px";
this.container.style.display="none";
-this.content=document.createElement("div");
-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(Rico.isIE&&Rico.ieVersion<7){this.ifr=document.createElement("iframe");
-this.ifr.style.position="absolute";
-this.ifr.style.top="0px";
-this.ifr.style.left="0px";
-this.ifr.style.width="2000px";
-this.ifr.style.height="2000px";
-this.ifr.style.zIndex=-1;
+if(this.options.zIndex>=0){this.container.style.zIndex=this.options.zIndex
+}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:false;";
-this.content.appendChild(this.ifr)
+this.ifr.src="javascript:'';";
+this.container.appendChild(this.ifr)
}Rico.applyShadow(this.container,this.options.shadow);
if(this.options.hideOnClick){Rico.eventBind(document,"click",Rico.eventHandle(this,"_docClick"))
-}if(this.options.hideOnEscape){Rico.eventBind(document,"keyup",Rico.eventHandle(this,"_checkKey"))
}this.dragEnabled=false;
this.mousedownHandler=Rico.eventHandle(this,"_startDrag");
this.dragHandler=Rico.eventHandle(this,"_drag");
},_ignoreClick:function(a){if(a.stopPropagation){a.stopPropagation()
}else{a.cancelBubble=true
}return true
-},_checkKey:function(a){if(Rico.eventKey(a)!=27||!this.visible()){return true
-}Rico.eventStop(a);
-this.closeFunc();
-return false
},_docClick:function(a){this.closeFunc();
return true
},move:function(b,a){if(typeof b=="number"){this.container.style.left=b+"px"
},_endDrag:function(){this.container.style.cursor="";
Rico.eventUnbind(document,"mousemove",this.dragHandler);
Rico.eventUnbind(document,"mouseup",this.dropHandler)
-},openPopup:function(b,a){this.container.style.display=this.position=="absolute"?"block":Rico.isIE&&Rico.ieVersion<8?"inline":"inline-block";
-if(typeof b=="number"){this.container.style.left=b+"px"
-}if(typeof a=="number"){this.container.style.top=a+"px"
-}if(this.container.id){Rico.log("openPopup "+this.container.id+" at "+b+","+a)
-}},centerPopup:function(){this.openPopup();
+},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();
var d=this.container.offsetWidth;
var c=this.container.offsetHeight;
var a=this.container.parentNode.offsetWidth;
var b=this.container.parentNode.offsetHeight;
this.move(parseInt(Math.max((a-d)/2,0),10),parseInt(Math.max((b-c)/2,0),10))
},visible:function(){return Rico.visible(this.container)
-},closePopup:function(){if(!Rico.visible(this.container)){return
+},closePopup:function(){Rico._RemoveOpenPopup(this);
+if(!Rico.visible(this.container)){return
}if(this.container.id){Rico.log("closePopup "+this.container.id)
}if(this.dragEnabled){this._endDrag()
}this.container.style.display="none";
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]);
-Rico.addClass(c,Rico.theme.close||"RicoClose");
+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
};
Rico.addClass(c,Rico.theme.buttonAnchor||"RicoButtonAnchorNative");
var d=c.appendChild(document.createElement("span"));
if(f){d.title=f
-}d.className=Rico.theme[b.toLowerCase()]||"Rico"+b;
+}d.className=Rico.theme[b.toLowerCase()]||"rico-icon Rico"+b;
Rico.eventBind(c,"click",e,false);
new Rico.HoverSet([c]);
return c
Rico.clearButton=function(b){var a=document.createElement("span");
a.title=Rico.getPhraseById("clear");
a.className="ricoClear";
-Rico.addClass(a,Rico.theme.clear||"ricoClearNative");
-a.style.display="inline-block";
-a.style.cursor="pointer";
+Rico.addClass(a,Rico.theme.clear||"rico-icon ricoClearNative");
Rico.eventBind(a,"click",b);
return a
};
this.titleDiv=document.createElement("div");
this.options.canDrag=true;
this.options.dragElement=this.titleDiv;
-this.options.hideOnClick=false;
this.createContainer(a);
this.content.appendChild(this.titleDiv);
b=Rico.$(b);
this.titleContent=document.createElement("span");
this.titleContent.className="ricoTitleSpan";
this.titleDiv.appendChild(this.titleContent);
-this.titleDiv.appendChild(Rico.closeButton(Rico.eventHandle(this,"closePopup")));
+this.titleDiv.appendChild(Rico.closeButton(Rico.eventHandle(this,"closeFunc")));
if(!c&&b){c=b.title;
b.title=""
}this.setTitle(c||" ");
}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.isIE){this.titleDiv.style.zoom=1;
-this.contentDiv.style.zoom=1
+if(Rico.theme.dialog){Rico.addClass(this.container,Rico.theme.dialog)
}this.content=this.contentDiv
},setTitle:function(a){this.titleContent.innerHTML=a
}};
Rico.Menu=function(a){this.initialize(a)
};
Rico.Menu.prototype={initialize:function(a){Rico.extend(this,new Rico.Popup());
-Rico.extend(this.options,{width:"15em",showDisabled:false});
+Rico.extend(this.options,{width:"15em",arrowColor:"b",showDisabled:false,hideOnClick:true});
if(typeof a=="string"){this.options.width=a
}else{Rico.extend(this.options,a||{})
}this.hideFunc=null;
-this.highlightElem=null;
-new Image().src=Rico.imgDir+"left_b.gif";
-new Image().src=Rico.imgDir+"right_b.gif"
+this.highlightElem=null
},createDiv:function(a){if(this.container){return
}var b=this;
var c={closeFunc:function(){b.cancelmenu()
}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);
},addMenuBreak:function(){var a=document.createElement("div");
a.className="ricoMenuBreak";
this.content.appendChild(a)
-},addSubMenuItem:function(b,e,f){var d=this.direction=="rtl"?"left":"right";
-var c=this.addMenuItem(b,null,true,null,f);
+},addSubMenuItem:function(b,e,g){var d=this.direction=="rtl"?"left":"right";
+var c=this.addMenuItem(b,null,true,null,g);
c.className="ricoSubMenu";
-c.style.backgroundImage="url("+Rico.imgDir+d+"_b.gif)";
-c.style.backgroundRepeat="no-repeat";
-c.style.backgroundPosition=d;
+var f=c.appendChild(document.createElement("div"));
+f.className="rico-icon rico-"+d+"-"+this.options.arrowColor;
+Rico.setStyle(f,{position:"absolute",top:"2px"});
+f.style[d]="0px";
c.RicoSubmenu=e;
-Rico.eventBind(c,"mouseover",Rico.eventHandle(this,"showSubMenu"));
-Rico.eventBind(c,"mouseout",Rico.eventHandle(this,"subMenuOut"))
+Rico.eventBind(c,"mouseover",Rico.eventHandle(this,"showSubMenu"))
},showSubMenu:function(c){if(this.openSubMenu){this.hideSubMenu()
}var b=Rico.eventElement(c);
-this.openSubMenu=b.RicoSubmenu;
+if(!b.RicoSubmenu){b=b.parentNode
+}if(!b.RicoSubmenu){return
+}this.openSubMenu=b.RicoSubmenu;
this.openMenuAnchor=b;
-if(b.className=="ricoSubMenu"){b.className="ricoSubMenuOpen"
+if(Rico.hasClass(b,"ricoSubMenu")){Rico.removeClass(b,"ricoSubMenu");
+Rico.addClass(b,"ricoSubMenuOpen")
}b.RicoSubmenu.openmenu(parseInt(this.container.style.left)+b.offsetWidth,parseInt(this.container.style.top)+b.offsetTop,b.offsetWidth-2,b.offsetHeight+2,true)
-},subMenuOut:function(d){if(!this.openSubMenu){return
-}Rico.eventStop(d);
-var c=Rico.eventElement(d);
-var a=Rico.eventRelatedTarget(d)||d.toElement;
-try{while(a!=null&&a!=this.openSubMenu.div){a=a.parentNode
-}}catch(b){}if(a==this.openSubMenu.div){return
-}this.hideSubMenu()
-},hideSubMenu:function(){if(this.openMenuAnchor){this.openMenuAnchor.className="ricoSubMenu";
+},hideSubMenu:function(){if(this.openMenuAnchor){Rico.removeClass(this.openMenuAnchor,"ricoSubMenuOpen");
+Rico.addClass(this.openMenuAnchor,"ricoSubMenu");
this.openMenuAnchor=null
}if(this.openSubMenu){this.openSubMenu.hidemenu();
this.openSubMenu=null
},mouseOver:function(b){if(this.highlightElem&&this.highlightElem.className=="enabled-hover"){this.highlightElem.className="enabled";
this.highlightElem=null
}var a=Rico.eventElement(b);
-if(this.openMenuAnchor&&this.openMenuAnchor!=a){this.hideSubMenu()
+if(a.parentNode==this.openMenuAnchor){a=a.parentNode
+}if(this.openMenuAnchor&&this.openMenuAnchor!=a){this.hideSubMenu()
}if(a.className=="enabled"){a.className="enabled-hover";
this.highlightElem=a
}},mouseOut:function(b){var a=Rico.eventElement(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);
-this.createContainer();
-this.container.id=this.id;
-Rico.addClass(this.container,Rico.theme.calendar||"ricoCalContainer");
+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.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 b,n,m,k,h,l,p,o,q,f;
-this.colStart=this.options.showWeekNumber?1:0;
-for(k=0;
-k<7;
-k++){b=this.tbody.insertRow(-1);
-b.className="row"+k;
-for(n=0;
-n<7+this.colStart;
-n++){b.insertCell(-1)
-}}b=this.tbody.rows[0];
-b.className="ricoCalDayNames";
-if(this.options.showWeekNumber){b.cells[0].innerHTML=this.weekString;
-for(k=0;
-k<7;
-k++){this.tbody.rows[k].cells[0].className="ricoCalWeekNum"
-}}this.styles=[];
-for(k=0;
-k<7;
-k++){p=(k+this.options.startAt)%7;
-b.cells[k+this.colStart].innerHTML=Rico.dayAbbr(p);
-this.styles[k]="ricoCal"+p
-}this.thead=this.maintab.createTHead();
+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);
-n=b.appendChild(document.createElement("th"));
-n.colSpan=7+this.colStart;
-m=n.appendChild(document.createElement("div"));
-m.className=Rico.theme.calendarHeading||"RicoCalHeading";
-m.appendChild(this._createTitleSection("Month"));
-m.appendChild(this._createTitleSection("Year"));
-new Rico.HoverSet(m.getElementsByTagName("a"));
-new Rico.HoverSet(this.tbody.getElementsByTagName("td"),{hoverNodes:function(a){return a.innerHTML.match(/^\d+$/)?[a]:[]
-}});
-m.appendChild(Rico.closeButton(Rico.eventHandle(this,"close")));
-if(this.options.showToday){this.tfoot=this.maintab.createTFoot();
+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)
+}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"));
+if(this.position=="absolute"){this.heading.appendChild(Rico.closeButton(Rico.eventHandle(this,"close")))
+}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=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.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);
-var g=Rico.isIE&&Rico.ieVersion<7;
-var e={shadow:!g};
-this.monthPopup=new Rico.Popup(document.createElement("div"),e);
+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<4;
+g++){b=e.insertRow(-1);
+for(f=0;
+f<3;
+f++){k=b.insertCell(-1);
+m=document.createElement("a");
+m.innerHTML=Rico.monthAbbr(g*3+f);
+m.name=g*3+f;
+if(Rico.theme.calendarDay){Rico.addClass(m,Rico.theme.calendarDay)
+}k.appendChild(m);
+Rico.eventBind(m,"click",Rico.eventHandle(this,"selectMonth"),false)
+}}new Rico.HoverSet(e.getElementsByTagName("a"));
+this.monthPopup.content.appendChild(e);
+this.container.appendChild(this.monthPopup.container);
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(k=0;
-k<4;
-k++){b=f.insertRow(-1);
-for(h=0;
-h<3;
-h++){n=b.insertCell(-1);
-o=document.createElement("a");
-o.innerHTML=Rico.monthAbbr(k*3+h);
-o.name=k*3+h;
-if(Rico.theme.calendarDay){Rico.addClass(o,Rico.theme.calendarDay)
-}n.appendChild(o);
-Rico.eventBind(o,"click",Rico.eventHandle(this,"selectMonth"),false)
-}}new Rico.HoverSet(f.getElementsByTagName("a"));
-this.monthPopup.content.appendChild(f);
-this.content.appendChild(this.monthPopup.container);
-this.yearPopup=new Rico.Popup(document.createElement("div"),e);
-this.yearPopup.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";
-b=f.insertRow(-1);
-this.yearLabel=b.insertCell(-1);
-this.yearLabel.colSpan=3;
-b=f.insertRow(-1);
-n=b.insertCell(-1);
+}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,"keypress",Rico.eventHandle(this,"yearKey"),false);
-n=b.insertCell(-1);
-var o=Rico.floatButton("Checkmark",Rico.eventHandle(this,"processPopUpYear"));
-Rico.setStyle(o.firstChild,{margin:"0px",padding:"0px",border:"none"});
-n.appendChild(o);
-n=b.insertCell(-1);
-o=Rico.floatButton("Cancel",Rico.eventHandle(this,"popDownYear"));
-Rico.setStyle(o.firstChild,{margin:"0px",padding:"0px",border:"none"});
-n.appendChild(o);
-this.yearPopup.content.appendChild(f);
-this.content.appendChild(this.yearPopup.container);
-o=this.content.getElementsByTagName("a");
-for(k=0;
-k<o.length;
-k++){o[k].href="javascript:void(0)"
+Rico.eventBind(this.yearInput,"keyup",Rico.eventHandle(this,"yearKey"),false);
+m=Rico.floatButton("Checkmark",Rico.eventHandle(this,"processPopUpYear"));
+n.appendChild(m);
+m=Rico.floatButton("Cancel",Rico.eventHandle(this,"popDownYear"));
+n.appendChild(m);
+this.yearPopup.content.appendChild(o);
+this.yearPopup.content.appendChild(n);
+this.container.appendChild(this.yearPopup.container);
+this.yearPopup.closePopup();
+m=this.content.getElementsByTagName("a");
+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";
-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.monthSelected=this.monthNow;
this.yearSelected=this.yearNow;
this.constructCalendar()
-},createNavArrow:function(a,b){var c;
-c=document.createElement("span");
-c.className=Rico.theme[b+"Arrow"]||"Rico_"+b+"Arrow";
-Rico.eventBind(c,"click",Rico.eventHandle(this,a),false);
-return c
+},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
}if(a==this.options.minDate.getFullYear()&&b<this.options.minDate.getMonth()){return false
}if(a>this.options.maxDate.getFullYear()){return false
this.monthSelected=parseInt(a.name,10);
this.constructCalendar();
Rico.eventStop(b)
-},popUpMonth:function(a){if(this.monthPopup.visible()){this.popDownMonth();
-return
+},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 false
}this.popDownYear();
-this.monthPopup.openPopup(this.titleMonth.parentNode.offsetLeft,this.thead.offsetHeight+2);
-Rico.eventStop(a);
+this.openYrMo(this.monthPopup,0);
return false
},popDownMonth:function(){this.monthPopup.closePopup()
},popDownYear:function(){this.yearPopup.closePopup();
this.yearInput.disabled=true
-},popUpYear:function(a){if(this.yearPopup.visible()){this.popDownYear();
-return
+},popUpYear:function(b){Rico.eventStop(b);
+if(this.yearPopup.visible()){this.popDownYear();
+return false
}this.popDownMonth();
-this.yearPopup.openPopup(90,this.thead.offsetHeight+2);
-this.yearLabel.innerHTML=Rico.getPhraseById("calYearRange",this.options.minDate.getFullYear(),this.options.maxDate.getFullYear());
this.yearInput.disabled=false;
this.yearInput.value="";
-this.yearInput.focus();
-Rico.eventStop(a);
+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,"");
Rico.TreeControl=function(c,b,a){this.initialize(c,b,a)
};
Rico.TreeControl.prototype={initialize:function(c,b,a){Rico.extend(this,new Rico.Popup());
-Rico.extend(this.options,{ignoreClicks:true,nodeIdDisplay:"none",showCheckBox:false,showFolders:false,showPlusMinus:true,showLines:true,defaultAction:Rico.eventHandle(this,"nodeClick"),height:"300px",width:"300px",leafIcon:Rico.imgDir+"doc.gif"});
+Rico.extend(this.options,{ignoreClicks:true,nodeIdDisplay:"none",showCheckBox:false,showFolders:false,showPlusMinus:true,showLines:true,defaultAction:Rico.eventHandle(this,"nodeClick"),height:"300px",width:"300px",leafIcon:"rico-icon rico-doc"});
Rico.extend(this.options,a||{});
this.id=c;
this.dataSource=b;
this.close=this.closePopup;
this.hoverSet=new Rico.HoverSet([])
-},atLoad:function(){var d=["node.gif","nodelast.gif","folderopen.gif","folderclosed.gif"];
-for(var b=0;
-b<d.length;
-b++){var a=new Image();
-a.src=Rico.imgDir+d[b]
-}this.treeDiv=document.createElement("div");
+},atLoad:function(){this.treeDiv=document.createElement("div");
this.treeDiv.id=this.id;
this.treeDiv.className="ricoTree";
if(Rico.theme.treeContent){Rico.addClass(this.treeDiv,Rico.theme.treeContent)
if(this.options.showCheckBox){this.buttonDiv=document.createElement("div");
this.buttonDiv.style.width=this.options.width;
this.buttonDiv.className="ricoTreeButtons";
-if(Rico.getStyle(this.container,"position")=="absolute"){var c=document.createElement("span");
-c.innerHTML=RicoTranslate.getPhraseById("treeSave");
-Rico.setStyle(c,{"float":"left",cursor:"pointer"});
-this.buttonDiv.appendChild(c);
-Rico.eventBind(c,"click",Rico.eventHandle(this,"saveSelection"))
-}var c=document.createElement("span");
-c.innerHTML=RicoTranslate.getPhraseById("treeClear");
-Rico.setStyle(c,{"float":"right",cursor:"pointer"});
-this.buttonDiv.appendChild(c);
+if(Rico.getStyle(this.container,"position")=="absolute"){var a=document.createElement("span");
+a.innerHTML=RicoTranslate.getPhraseById("treeSave");
+Rico.setStyle(a,{"float":"left",cursor:"pointer"});
+this.buttonDiv.appendChild(a);
+Rico.eventBind(a,"click",Rico.eventHandle(this,"saveSelection"))
+}var a=document.createElement("span");
+a.innerHTML=RicoTranslate.getPhraseById("treeClear");
+Rico.setStyle(a,{"float":"right",cursor:"pointer"});
+this.buttonDiv.appendChild(a);
this.content.appendChild(this.buttonDiv);
-Rico.eventBind(c,"click",Rico.eventHandle(this,"clrCheckBoxEvent"))
+Rico.eventBind(a,"click",Rico.eventHandle(this,"clrCheckBoxEvent"))
}this.close()
},setTreeDiv:function(a){this.treeDiv=Rico.$(a);
this.openPopup=function(){}
e<k.length;
e++){var a=(e<k.length-1)&&(k[e][0]==k[e+1][0]);
this.addNode(k[e][0],k[e][1],k[e][2],k[e][3],k[e][4],k[e][5],!a)
-}},DisplayImages:function(d,a){var c,b,e;
-for(c=0;
-c<a.length;
-c++){b=document.createElement("img");
-b.src=Rico.imgDir+a[c]+".gif";
-e=d.insertCell(-1);
-e.appendChild(b)
}},addNode:function(q,l,t,f,u,s,k){var h=Rico.$(this.domID(q,"Parent"));
var v=Rico.$(this.domID(q,"Children"));
var a=h?h.TreeLevel+1:0;
for(var r=0;
r<a-2;
r++){g[r].innerHTML=e[r].innerHTML
-}var w=document.createElement("img");
-w.src=Rico.imgDir+(v.nextSibling&&this.options.showLines?"nodeline":"nodeblank")+".gif";
+}var w=document.createElement("div");
+w.className="rico-icon rico-tree-"+(v.nextSibling&&this.options.showLines?"nodeline":"nodeblank");
g[a-2].appendChild(w)
}if(a>0){var c=k&&this.options.showLines?"last":"";
var o=this.options.showLines?"node":"";
-if(this.options.showPlusMinus&&f){var w=document.createElement("img");
+if(this.options.showPlusMinus&&f){var w=document.createElement("div");
w.name=l;
w.style.cursor="pointer";
Rico.eventBind(w,"click",Rico.eventHandle(this,"clickBranch"));
-w.src=Rico.imgDir+o+"p"+c+".gif";
+w.className="rico-icon rico-tree-"+o+"p"+c;
d.insertCell(-1).appendChild(w)
-}else{if(this.options.showLines){var w=document.createElement("img");
-w.src=Rico.imgDir+"node"+c+".gif";
+}else{if(this.options.showLines){var w=document.createElement("div");
+w.className="rico-icon rico-tree-node"+c;
d.insertCell(-1).appendChild(w)
-}}if(this.options.showFolders&&(f||(s&&s!="none"))){var w=document.createElement("img");
-if(!f){w.src=s
+}}if(this.options.showFolders&&(f||(s&&s!="none"))){var w=document.createElement("div");
+if(!f){w.className=s
}else{w.name=l;
w.style.cursor="pointer";
Rico.eventBind(w,"click",Rico.eventHandle(this,"clickBranch"));
-w.src=Rico.imgDir+"folderclosed.gif"
+w.className="rico-icon rico-folderclosed"
}d.insertCell(-1).appendChild(w)
}}if(u&&this.options.showCheckBox){var n=document.createElement("input");
n.type="checkbox";
c[1]="Children";
var b=Rico.$(c.join("_"));
Rico.toggle(b);
-if(g.tagName=="IMG"){var d=Rico.visible(b);
-if(g.src.match(/node(p|m)(last)?\.gif$/)){g.src=g.src.replace(/nodep|nodem/,"node"+(d?"m":"p"))
-}else{if(g.src.match(/folder(open|closed)\.gif$/)){g.src=g.src.replace(/folder(open|closed)/,"folder"+(d?"open":"closed"))
-}else{if(g.src.match(/\b(m|p)\.gif$/)){g.src=g.src.replace(/(p|m)\.gif/,d?"m.gif":"p.gif")
+if(g.tagName=="DIV"){var d=Rico.visible(b);
+if(g.className.match(/node(p|m)(last)?$/)){g.className=g.className.replace(/nodep|nodem/,"node"+(d?"m":"p"))
+}else{if(g.className.match(/folder(open|closed)$/)){g.className=g.className.replace(/folder(open|closed)/,"folder"+(d?"open":"closed"))
+}else{if(g.className.match(/\b(m|p)$/)){g.className=g.className.replace(/(p|m)$/,d?"m":"p")
}}}}if(!f.TreeFetchedChildren){f.TreeFetchedChildren=1;
this.loadXMLDoc(g.name)
}}};
if(typeof Rico=="undefined"){throw ("GridCommon requires the Rico JavaScript framework")
-}Rico.GridCommon={baseInit:function(){this.options={resizeBackground:"resize.gif",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",exportStyleList:["background-color","color","text-align","font-weight","font-size","font-family"],exportImgTags:false,exportFormFields:true,FilterLocation:null,FilterAllToken:"___ALL___",columnSpecs:[]};
-this.colWidths=[];
+}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;
a++){this.columns[a].insertResizer()
}},createDivs:function(){Rico.log("createDivs start");
this.outerDiv=this.createDiv("outer");
-if(Rico.theme.widget){Rico.addClass(this.outerDiv,Rico.theme.widget)
+if(Rico.theme.gridContainer){Rico.addClass(this.outerDiv,Rico.theme.gridContainer)
}if(this.outerDiv.firstChild&&this.outerDiv.firstChild.tagName&&this.outerDiv.firstChild.tagName.toUpperCase()=="TABLE"){this.structTab=this.outerDiv.firstChild;
this.structTabLeft=this.structTab.rows[0].cells[0];
this.structTabUR=this.structTab.rows[0].cells[1];
b.vAlign="top";
this.structTabLeft=b.insertCell(-1);
this.structTabLeft.rowSpan=2;
+this.structTabLeft.style.padding="0px";
+this.structTabLeft.style.border="none";
var d=this.structTab.insertRow(-1);
d.vAlign="top";
this.structTabUR=b.insertCell(-1);
+this.structTabUR.style.padding="0px";
+this.structTabUR.style.border="none";
this.structTabLR=d.insertCell(-1);
+this.structTabLR.style.padding="0px";
+this.structTabLR.style.border="none";
this.outerDiv.appendChild(this.structTab)
-}this.frozenTabs=this.createDiv("frozenTabs",this.structTabLeft);
+}Rico.addClass(this.structTab,"ricoLG_StructTab");
+this.frozenTabs=this.createDiv("frozenTabs",this.structTabLeft);
this.innerDiv=this.createDiv("inner",this.structTabUR);
this.scrollDiv=this.createDiv("scroll",this.structTabLR);
this.resizeDiv=this.createDiv("resize",this.outerDiv,true);
-this.exportDiv=this.createDiv("export",this.outerDiv,true);
this.messagePopup=new Rico.Popup();
this.messagePopup.createContainer({hideOnEscape:false,hideOnClick:false,parent:this.outerDiv});
this.messagePopup.content.className="ricoLG_messageDiv";
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;
},exportStart:function(){var a,h,f,d,b,e,k,l;
var g=this.getExportStyles(this.thead[0]);
this.exportRows=[];
-this.exportText="<table border='1' cellspacing='0'>";
+this.exportText="<html><head></head><body><table border='1' cellspacing='0'>";
for(h=0;
h<this.columns.length;
h++){if(this.columns[h].visible){this.exportText+="<col width='"+parseInt(this.columns[h].colWidth,10)+"'>"
}this.exportText+=">"+Rico.getInnerText(l,!this.options.exportImgTags,!this.options.exportFormFields,"NoExport")+"</td>"
}}this.exportText+="</tr>"
}this.exportText+="</thead><tbody>"
-},exportFinish:function(b){if(this.hideMsg){this.hideMsg()
+},exportFinish:function(){if(this.hideMsg){this.hideMsg()
}window.status=Rico.getPhraseById("exportComplete");
if(this.exportRows.length>0){this.exportText+="<tr>"+this.exportRows.join("</tr><tr>")+"</tr>"
}if(this.exportFooter){this.exportText+=this.exportFooter
-}this.exportText+="</tbody></table>";
-this.exportDiv.innerHTML=this.exportText;
-this.exportText=undefined;
-this.exportRows=undefined;
+}this.exportText+="</tbody></table></body></html>";
if(this.cancelMenu){this.cancelMenu()
-}var a=window.open(Rico.htmDir+"export_"+(b||"plain")+".html?"+this.exportDiv.id,"",this.options.exportWindow);
+}var a=window.open("","_blank",this.options.exportWindow);
if(a==null){alert(Rico.getPhraseById("disableBlocker"))
-}},exportStyle:function(d,g){for(var b=0,c="";
+}else{a.document.open();
+a.document.write(this.exportText);
+a.document.close()
+}this.exportText=undefined;
+this.exportRows=undefined
+},exportStyle:function(d,g){for(var b=0,c="";
b<g.length;
b++){try{var a=Rico.getStyle(d,g[b]);
if(a){c+=g[b]+":"+a+";"
}d.push("f"+e+":"+b.join("~"))
}}Rico.setCookie(this.options.cookiePrefix+this.tableId,d.join(","),this.options.cookieDays,this.options.cookiePath,this.options.cookieDomain)
}};
-Rico.ColumnConst={UNFILTERED:0,SYSTEMFILTER:1,USERFILTER:2,UNSORTED:0,SORT_ASC:"ASC",SORT_DESC:"DESC",MINWIDTH:10,DOLLAR:{type:"number",prefix:"$",decPlaces:2,ClassName:"alignright"},EURO:{type:"number",prefix:"€",decPlaces:2,ClassName:"alignright"},PERCENT:{type:"number",suffix:"%",decPlaces:2,multiplier:100,ClassName:"alignright"},QTY:{type:"number",decPlaces:0,ClassName:"alignright"},DEFAULT:{type:"showTags"}};
+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];
-this.format=Rico.extend({},Rico.ColumnConst.DEFAULT);
-switch(typeof b){case"object":if(typeof b.format=="string"){Rico.extend(this.format,Rico.ColumnConst[b.format.toUpperCase()])
-}Rico.extend(this.format,b);
-break;
-case"string":if(b.slice(0,4)=="spec"){b=b.slice(4).toUpperCase()
-}if(typeof Rico.ColumnConst[b]=="object"){Rico.extend(this.format,Rico.ColumnConst[b])
-}break
+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;
this.hideable=typeof this.format.canHide=="boolean"?this.format.canHide:h.options.canHideDefault;
-var a=(typeof(this.format.width)=="number")?this.format.width:e.initWidth;
-a=(typeof(a)=="number")?Math.max(a,Rico.ColumnConst.MINWIDTH):h.options.defaultWidth;
+var a;
+switch(typeof this.format.width){case"number":a=this.format.width;
+break;
+case"string":a=parseInt(this.format.width,10);
+break;
+default:a=e.initWidth;
+break
+}a=(typeof(a)=="number")?Math.max(a,Rico.ColumnConst.MINWIDTH):h.options.defaultWidth;
this.setColWidth(a);
if(!this.visible){this.setDisplay("none")
}},colClassName:function(){return this.format.ClassName?this.format.ClassName:this.liveGrid.tableId+"_col"+this.index
},insertResizer:function(){if(this.format.noResize){return
-}var b=document.createElement("div");
-b.className="ricoLG_Resize";
-b.style[this.liveGrid.align[1]]="0px";
-if(this.options.resizeBackground){var a=Rico.imgDir+this.liveGrid.options.resizeBackground;
-if(Rico.isIE&&Rico.ieVersion<8){a=location.protocol+a
-}b.style.backgroundImage="url("+a+")"
-}this.hdrCellDiv.appendChild(b);
-Rico.eventBind(b,"mousedown",this.mouseDownHandler,false)
+}var a=document.createElement("div");
+a.className="ricoLG_Resize";
+a.style[this.liveGrid.align[1]]="0px";
+this.hdrCellDiv.appendChild(a);
+Rico.eventBind(a,"mousedown",this.mouseDownHandler,false)
},getDisplayName:function(a){var b=a.getElementsByTagName("A");
if(b.length>0){return b[0].innerHTML
}else{return Rico.stripTags(a.innerHTML)
}},_clear:function(a){a.innerHTML=" "
-},clearCell:function(d){var c=this.cell(d);
-this._clear(c,d);
-if(!this.liveGrid.buffer){return
-}var b=this.liveGrid.buffer.options.acceptAttr;
-for(var a=0;
-a<b.length;
-a++){switch(b[a]){case"style":c.style.cssText="";
-break;
-case"class":c.className="";
-break;
-default:c["_"+b[a]]="";
-break
-}}},dataTable:function(){return this.liveGrid.tabs[this.tabIdx]
+},clearCell:function(b){var a=this.cell(b);
+this._clear(a,b);
+if(this.liveGrid.buffer&&this.liveGrid.buffer.options.acceptStyle){a.style.cssText=""
+}},dataTable:function(){return this.liveGrid.tabs[this.tabIdx]
},numRows:function(){return this.dataColDiv.childNodes.length
},clearColumn:function(){var b=this.numRows();
for(var a=0;
},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;
},chooseColumn:function(b){var a=Rico.eventElement(b);
this.hideshow(a.checked,false)
},setImage:function(){if(this.currentSort==Rico.ColumnConst.SORT_ASC){this.imgSort.style.display="inline-block";
-this.imgSort.className=Rico.theme.sortAsc||"ricoLG_sortAsc"
+this.imgSort.className=Rico.theme.sortAsc||"rico-icon ricoLG_sortAsc"
}else{if(this.currentSort==Rico.ColumnConst.SORT_DESC){this.imgSort.style.display="inline-block";
-this.imgSort.className=Rico.theme.sortDesc||"ricoLG_sortDesc"
+this.imgSort.className=Rico.theme.sortDesc||"rico-icon ricoLG_sortDesc"
}else{this.imgSort.style.display="none"
-}}if(this.filterType==Rico.ColumnConst.USERFILTER){this.imgFilter.style.display="";
+}}if(this.filterType==Rico.ColumnConst.USERFILTER){this.imgFilter.style.display="inline-block";
this.imgFilter.title=this.getFilterText()
}else{this.imgFilter.style.display="none"
}},canHideShow:function(){return this.hideable
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];
b+=a;
this.resizeDiv.style.height=b+"px";
this.handleScroll()
-},printVisible:function(a){this.showMsg(Rico.getPhraseById("exportInProgress"));
-Rico.runLater(10,this,"_printVisible",a)
-},_printVisible:function(a){this.exportStart();
-var g=this.getExportStyles(this.tbody[0]);
-for(var f=0;
-f<this.pageSize;
-f++){if(this.columns[0].cell(f).style.display=="none"){continue
-}var e="";
-for(var h=0;
-h<this.columns.length;
-h++){var d=this.columns[h];
-if(d.visible){var b=d.getFormattedValue(f,!this.options.exportImgTags,!this.options.exportFormFields,"NoExport");
-if(d.format.exportPrefix){b=d.format.exportPrefix+b
-}if(b==""){b=" "
-}e+="<td style='"+this.exportStyle(d.cell(f),g)+"'>"+b+"</td>"
-}}this.exportRows.push(e)
-}this.exportFinish(a)
+},printVisible:function(){this.showMsg(Rico.getPhraseById("exportInProgress"));
+Rico.runLater(10,this,"_printVisible")
+},_printVisible:function(){this.exportStart();
+var f=this.getExportStyles(this.tbody[0]);
+for(var e=0;
+e<this.pageSize;
+e++){if(this.columns[0].cell(e).style.display=="none"){continue
+}var d="";
+for(var g=0;
+g<this.columns.length;
+g++){var b=this.columns[g];
+if(b.visible){var a=b.getFormattedValue(e,!this.options.exportImgTags,!this.options.exportFormFields,"NoExport");
+if(b.format.exportPrefix){a=b.format.exportPrefix+a
+}if(a==""){a=" "
+}d+="<td style='"+this.exportStyle(b.cell(e),f)+"'>"+a+"</td>"
+}}this.exportRows.push(d)
+}this.exportFinish()
},hideRow:function(a){if(this.columns[0].cell(a).style.display=="none"){return
}for(var b=0;
b<this.columns.length;
this.totalRows=0;
this.rowcntContent="";
this.rcvdOffset=-1;
-this.options={fixedHdrRows:0,canFilter:true,isEncoded:true,acceptAttr:[]};
+this.options={fixedHdrRows:0,canFilter:true,isEncoded:true,acceptStyle:false};
Rico.extend(this.options,a||{});
-if(b){this.loadRowsFromTable(b,this.options.fixedHdrRows)
+if(b){this.loadRowsFromTable(b,this.options.fixedHdrRows);
+b.parentNode.removeChild(b)
}else{this.clear()
}},registerGrid:function(a){this.liveGrid=a
},setTotalRows:function(a){if(typeof(a)!="number"){a=this.size
break;
default:this.liveGrid.updateHeightDiv();
break
-}},loadRowsFromTable:function(h,g){var e=new Array();
+}},loadRowsFromTable:function(h,g){var e=[];
var a=h.getElementsByTagName("tr");
for(var d=g||0;
d<a.length;
-d++){var f=new Array();
+d++){var f=[];
var c=a[d].getElementsByTagName("td");
for(var b=0;
b<c.length;
this.startPos=0;
this.size=this.baseRows.length
},dom2jstable:function(f){Rico.log("dom2jstable: encoded="+this.options.isEncoded);
-var e=new Array();
+var e=[];
var a=f.getElementsByTagName("tr");
for(var d=0;
d<a.length;
-d++){var g=new Array();
+d++){var g=[];
var c=a[d].getElementsByTagName("td");
for(var b=0;
b<c.length;
b++){g[b]=Rico.getContentAsString(c[b],this.options.isEncoded)
}e.push(g)
}return e
-},dom2jstableAttr:function(e,b){var h=this.options.acceptAttr;
-Rico.log("dom2jstableAttr start, # attr="+h.length);
-var f=new Array();
-var g=e.getElementsByTagName("tr");
-for(var d=b||0;
-d<g.length;
-d++){var m=new Array();
-var l=g[d].getElementsByTagName("td");
-for(var c=0;
-c<l.length;
-c++){m[c]={};
-for(var a=0;
-a<h.length;
-a++){m[c]["_"+h[a]]=l[c].getAttribute(h[a])
-}if(Rico.isIE){m[c]._class=l[c].getAttribute("className")
-}}f.push(m)
-}Rico.log("dom2jstableAttr end");
-return f
},_blankRow:function(){var a=[];
for(var b=0;
b<this.liveGrid.columns.length;
},bufferRow:function(a){return this.windowStart+a
},getWindowCell:function(c,b){var a=this.bufferRow(c);
return this.isVisible(a)&&b<this.rows[a].length?this.rows[a][b]:null
-},getWindowAttr:function(c,b){var a=this.bufferRow(c);
-return this.attr&&this.isVisible(a)&&b<this.attr[a].length?this.attr[a][b]:null
+},getWindowStyle:function(c,b){var a=this.bufferRow(c);
+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
return true
},getRows:function(f,d){var e=f-this.startPos;
var a=Math.min(e+d,this.size);
-var c=new Array();
+var c=[];
for(var b=e;
b<a;
b++){c.push(this.rows[b])
}}if(f){g.push(this.baseRows[a])
}}this.rows=g
}this.rowcntContent=this.size=this.rows.length
-},printAll:function(a){this.liveGrid.showMsg(Rico.getPhraseById("exportInProgress"));
-Rico.runLater(10,this,"_printAll",a)
-},_printAll:function(a){this.liveGrid.exportStart();
+},printAll:function(){this.liveGrid.showMsg(Rico.getPhraseById("exportInProgress"));
+Rico.runLater(10,this,"_printAll")
+},_printAll:function(){this.liveGrid.exportStart();
this.exportBuffer(this.getRows(0,this.totalRows));
-this.liveGrid.exportFinish(a)
-},printVisible:function(a){this.liveGrid.showMsg(Rico.getPhraseById("exportInProgress"));
-Rico.runLater(10,this,"_printVisible",a)
-},_printVisible:function(a){this.liveGrid.exportStart();
+this.liveGrid.exportFinish()
+},printVisible:function(){this.liveGrid.showMsg(Rico.getPhraseById("exportInProgress"));
+Rico.runLater(10,this,"_printVisible")
+},_printVisible:function(){this.liveGrid.exportStart();
this.exportBuffer(this.visibleRows());
-this.liveGrid.exportFinish(a)
+this.liveGrid.exportFinish()
},exportBuffer:function(l,f){var a,g,k,b,j;
Rico.log("exportBuffer: "+l.length+" rows");
var e=this.liveGrid.getExportStyles(this.liveGrid.tbody[0]);
this.buffer=b;
this.actionId="_action_"+e;
Rico.setDebugArea(e+"_debugmsgs");
-Rico.extend(this.options,{visibleRows:-3,frozenColumns:0,offset:0,prefetchBuffer:true,minPageRows:2,maxPageRows:50,canSortDefault:true,canFilterDefault:b.options.canFilter,canHideDefault:true,highlightElem:"none",highlightSection:3,highlightMethod:"class",highlightClass:Rico.theme.gridHighlightClass||"ricoLG_selection",maxPrint:5000,headingSort:"link",hdrIconsFirst:true,filterImg:"filtercol.gif"});
+Rico.extend(this.options,{visibleRows:-3,frozenColumns:0,offset:0,prefetchBuffer:true,minPageRows:2,maxPageRows:50,canSortDefault:true,canFilterDefault:b.options.canFilter,canHideDefault:true,highlightElem:"none",highlightSection:3,highlightMethod:"class",highlightClass:Rico.theme.gridHighlightClass||"ricoLG_selection",maxPrint:5000,headingSort:"link",hdrIconsFirst:true});
var c=this;
this.options.sortHandler=function(){c.sortHandler()
};
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);
}this.scrollTimeout=null;
this.lastScrollPos=0;
this.attachMenuEvents();
-new Image().src=Rico.imgDir+this.options.filterImg;
-Rico.log("images preloaded");
this.setSortUI(this.options.sortCol,this.options.sortDir);
this.setImages();
if(this.listInvisible().length==this.columns.length){this.columns[0].showColumn()
}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
}}for(b=0;
b<3;
b++){this.tabs[b]=document.createElement("table");
-this.tabs[b].className="ricoLG_table";
+this.tabs[b].className=(b<2)?"ricoLG_table":"ricoLG_scrollTab";
this.tabs[b].border=0;
this.tabs[b].cellPadding=0;
this.tabs[b].cellSpacing=0;
}for(b=0;
b<2;
b++){this.thead[b]=this.tabs[b].createTHead();
-Rico.addClass(this.tabs[b],"ricoLG_top");
+this.thead[b].className="ricoLG_top";
if(Rico.theme.gridheader){Rico.addClass(this.thead[b],Rico.theme.gridheader)
}}for(b=0;
b<2;
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=l.getElementsByTagName("div");
var g=Rico.getStyle(this.cell(0,h),"textAlign");
i[1].style.textAlign=g;
-switch(f.filterUI.charAt(0)){case"t":j=Rico.createFormField(i[1],"input","text",d,d);
+switch(f.filterUI.charAt(0)){case"t":j=Rico.createFormField(i[1],"input",Rico.inputtypes.search?"search":"text",d,d);
var n=f.filterUI.match(/\d+/);
j.maxLength=f.Length||50;
j.size=n?parseInt(n,10):10;
-i[1].appendChild(Rico.clearButton(Rico.eventHandle(e,"filterClear")));
-if(e.filterType==Rico.ColumnConst.USERFILTER&&e.filterOp=="LIKE"){var k=e.filterValues[0];
+if(j.type!="search"){i[1].appendChild(Rico.clearButton(Rico.eventHandle(e,"filterClear")))
+}if(e.filterType==Rico.ColumnConst.USERFILTER&&e.filterOp=="LIKE"){var k=e.filterValues[0];
if(k.charAt(0)=="*"){k=k.substr(1)
}if(k.slice(-1)=="*"){k=k.slice(0,-1)
}j.value=k;
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);
e++){a=g[e].cells;
for(j=0,d=0;
a.length>0;
-j++){if(a[0].className=="ricoFrozen"){if(e==this.headerRowIdx){this.options.frozenColumns=j+1
+j++){if(Rico.hasClass(a[0],"ricoFrozen")){if(e==this.headerRowIdx){this.options.frozenColumns=j+1
}}else{d=1
}this.thead[d].rows[e].appendChild(a[0])
}}}Rico.log("loadHdrSrc end")
},setHorizontalScroll:function(){var a=(-this.scrollDiv.scrollLeft)+"px";
this.tabs[1].style.marginLeft=a;
this.tabs[2].style.marginLeft=a
-},remainingHt:function(){var f;
+},remainingHt:function(){var f=this.outerDiv.offsetHeight;
var g=Rico.windowHeight();
var e=Rico.isIE?15:10;
if(!Rico.isIE&&window.frameElement&&window.frameElement.scrolling=="yes"&&this.sizeTo!="parent"){e+=this.options.scrollBarWidth
}switch(this.sizeTo){case"window":var d=Rico.cumulativeOffset(this.outerDiv).top;
-f=Math.max(this.tabs[0].offsetHeight,this.tabs[1].offsetHeight);
-Rico.log("remainingHt, winHt="+g+" tabHt="+f+" gridY="+d);
-return g-d-f-this.options.scrollBarWidth-e;
+Rico.log("remainingHt/window, winHt="+g+" tabHt="+f+" gridY="+d);
+return g-d-f-e;
case"parent":var h=this.offsetFromParent(this.outerDiv);
-f=Math.max(this.tabs[0].offsetHeight,this.tabs[1].offsetHeight);
if(Rico.isIE){Rico.hide(this.outerDiv)
-}var b=this.outerDiv.parentNode.offsetHeight;
+}var b=this.outerDiv.parentNode.clientHeight;
if(Rico.isIE){Rico.show(this.outerDiv)
-}Rico.log("remainingHt, parentHt="+b+" gridY="+h+" winHt="+g+" tabHt="+f);
-return b-f-h-this.options.scrollBarWidth;
+}Rico.log("remainingHt/parent, parentHt="+b+" offset="+h+" tabHt="+f);
+return b-f-h-e;
case"data":case"body":var a=Rico.isIE?document.body.scrollHeight:document.body.offsetHeight;
var c=g-a-e;
if(!Rico.isWebKit){c-=this.options.scrollBarWidth
}Rico.log("remainingHt, winHt="+g+" pageHt="+a+" remHt="+c);
return c;
-default:f=Math.max(this.tabs[0].offsetHeight,this.tabs[1].offsetHeight);
-Rico.log("remainingHt, winHt="+g+" tabHt="+f);
+default:Rico.log("remainingHt, winHt="+g+" tabHt="+f);
if(this.sizeTo.slice(-1)=="%"){g*=parseFloat(this.sizeTo)/100
}else{if(this.sizeTo.slice(-2)=="px"){g=parseInt(this.sizeTo,10)
-}}return g-f-this.options.scrollBarWidth-e
+}}return g-f-e
}},offsetFromParent:function(b){var a=0;
var c=b.parentNode;
do{a+=b.offsetTop||0;
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"
}}if(this.options.highlightElem=="selection"&&!this.isSelected(b.cell)){this.selectCell(b.cell)
}var c=this;
this.menu.showmenu(f,function(){c.closeMenu()
-})
+});
+return false
},closeMenu:function(){if(!this.menuIdx){return
}if(this.hideScroll){this.scrollDiv.style.overflow=""
}this.highlightEnabled=true;
var f=this.datasetIndex(a);
return(c<=f.row&&f.row<=b&&e<=f.column&&f.column<=d)
},highlightCell:function(a){Rico.addClass(a,this.options.highlightClass)
-},unhighlightCell:function(a){if(a==null){return
-}Rico.removeClass(a,this.options.highlightClass)
-},selectRow:function(a){for(var b=0;
+},unhighlightCell:function(a){if(a){Rico.removeClass(a,this.options.highlightClass)
+}},selectRow:function(a){for(var b=0;
b<this.columns.length;
b++){this.highlightCell(this.columns[b].cell(a))
}},unselectRow:function(a){for(var b=0;
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;
Rico.LiveGridColumn.prototype={initialize:function(liveGrid,colIdx,hdrInfo,tabIdx){Rico.extend(this,new Rico.TableColumnBase());
this.baseInit(liveGrid,colIdx,hdrInfo,tabIdx);
this.buffer=liveGrid.buffer;
-if(typeof(this.format.type)!="string"||this.format.EntryType=="tinyMCE"){this.format.type="raw"
+if(typeof(this.format.type)!="string"||this.format.EntryType=="tinyMCE"){this.format.type="html"
}if(typeof this.isNullable!="boolean"){this.isNullable=/number|date/.test(this.format.type)
-}this.isText=/raw|text|showTags/.test(this.format.type);
+}this.isText=/html|text/.test(this.format.type);
Rico.log(" sortable="+this.sortable+" filterable="+this.filterable+" hideable="+this.hideable+" isNullable="+this.isNullable+" isText="+this.isText);
this.fixHeaders(this.liveGrid.tableId,this.options.hdrIconsFirst);
if(this["format_"+this.format.type]){this._format=this["format_"+this.format.type]
},mFilterOtherClick:function(a){this.mFilterInputs[0].checked=false;
this.mFilterChange=true
},format_text:function(a){if(typeof a!="string"){return" "
-}else{return Rico.stripTags(a)
-}},format_showTags:function(a){if(typeof a!="string"){return" "
}else{return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")
}},format_number:function(a){if(typeof a=="undefined"||a==""||a==null){return" "
}else{return Rico.formatNumber(a,this.format)
}else{var b=Rico.setISO8601(a);
if(!b){return a
}return(this.format.prefix||"")+Rico.formatDate(b,this.format.dateFmt||"translateDateTime")+(this.format.suffix||"")
-}},format_UTCasLocalTime:function(a){if(typeof a=="undefined"||a==""||a==null){return" "
+}},format_utcaslocaltime:function(a){if(typeof a=="undefined"||a==""||a==null){return" "
}else{var c=new Date();
var b=Rico.setISO8601(a,-c.getTimezoneOffset());
if(!b){return a
break;
case"hover":Rico.eventBind(this.hdrCellDiv,"click",c);
break
-}}this.imgFilter=document.createElement("img");
+}}this.imgFilter=document.createElement("span");
this.imgFilter.style.display="none";
-this.imgFilter.src=Rico.imgDir+this.options.filterImg;
-this.imgFilter.className="ricoLG_HdrIcon";
+this.imgFilter.className="rico-icon ricoLG_filterCol";
this.imgSort=document.createElement("span");
this.imgSort.style.display="none";
+this.imgSort.style.verticalAlign="top";
if(e){this.hdrCellDiv.insertBefore(this.imgSort,this.hdrCellDiv.firstChild);
this.hdrCellDiv.insertBefore(this.imgFilter,this.hdrCellDiv.firstChild)
}else{this.hdrCellDiv.appendChild(this.imgFilter);
}if(!this.format.filterUI){Rico.eventBind(this.imgFilter,"click",Rico.eventHandle(this,"filterClick"),false)
}},filterClick:function(a){if(this.filterType==Rico.ColumnConst.USERFILTER&&this.filterOp=="LIKE"){this.liveGrid.openKeyword(this.index)
}},getValue:function(a){return this.buffer.getWindowCell(a,this.index)
-},getBufferAttr:function(a){return this.buffer.getWindowAttr(a,this.index)
+},getBufferStyle:function(a){return this.buffer.getWindowStyle(a,this.index)
},setValue:function(b,a){this.buffer.setWindowValue(b,this.index,a)
},_format:function(a){return a
},_display:function(a,b){b.innerHTML=this._format(a)
},_export:function(a){return this._format(a)
},exportBuffer:function(a){return this._export(this.buffer.getValue(a,this.index))
-},displayValue:function(f){var a=this.getValue(f);
-if(a==null){this.clearCell(f);
+},displayValue:function(c){var a=this.getValue(c);
+if(a==null){this.clearCell(c);
return
-}var e=this.cell(f);
-this._display(a,e,f);
-var d=this.buffer.options.acceptAttr;
-if(d.length==0){return
-}var c=this.getBufferAttr(f);
-if(c==null){return
-}for(var b=0;
-b<d.length;
-b++){c=c["_"+d[b]]||"";
-switch(d[b]){case"style":e.style.cssText=c;
-break;
-case"class":e.className=c;
-break;
-default:e["_"+d[b]]=c;
-break
-}}}};
+}var b=this.cell(c);
+this._display(a,b,c);
+if(this.buffer.options.acceptStyle){b.style.cssText=this.getBufferStyle(c)
+}}};
Rico.TableColumn={};
Rico.TableColumn.checkboxKey=function(a){this.initialize(a)
};
this.sortmenu.addMenuItemId("gridmenuSortDesc",function(){d.sortDesc()
},true)
}this.filtermenu.clearMenu();
-if(d.canFilter()&&!d.format.filterUI&&(!b||d.filterType==Rico.ColumnConst.USERFILTER)){this.addSubMenuItem(Rico.getPhraseById("gridmenuFilterBy",d.displayName),this.filtermenu,false);
-d.userFilter=d.getValue(a);
+if(d.canFilter()){this.addSubMenuItem(Rico.getPhraseById("gridmenuFilterBy",d.displayName),this.filtermenu,false);
+if(!d.format.filterUI&&(!b||d.filterType==Rico.ColumnConst.USERFILTER)){d.userFilter=d.getValue(a);
if(d.filterType==Rico.ColumnConst.USERFILTER){this.filtermenu.addMenuItemId("gridmenuRemoveFilter",function(){d.setUnfiltered(false)
},true);
if(d.filterOp=="LIKE"){this.filtermenu.addMenuItemId("gridmenuChgKeyword",function(){o.openKeyword(i)
},true)
}this.filtermenu.addMenuItemId("gridmenuExclude",function(){d.setFilterNE()
},true)
-}}if(o.filterCount()>0){this.filtermenu.addMenuItemId("gridmenuRefresh",function(){o.filterHandler()
-},true);
-this.filtermenu.addMenuItemId("gridmenuRemoveAll",function(){o.clearFilters()
+}}}if(o.filterCount()>0){this.filtermenu.addMenuItemId("gridmenuRemoveAll",function(){o.clearFilters()
},true)
-}}else{if(o.filterCount()>0){this.addSubMenuItem(Rico.getPhraseById("gridmenuFilterBy",d.displayName),this.filtermenu,false);
-this.filtermenu.addMenuItemId("gridmenuRemoveAll",function(){o.clearFilters()
+}this.filtermenu.addMenuItemId("gridmenuRefresh",function(){o.filterHandler()
},true)
-}}this.exportmenu.clearMenu();
-if(f.printVisibleSQL&&typeof(f.dataSource)=="string"){this.addSubMenuItem(Rico.getPhraseById("gridmenuExport"),this.exportmenu,false);
-this.exportmenu.addMenuItemId("gridmenuExportVis2Web",function(){f.printVisibleSQL("html")
+}this.exportmenu.clearMenu();
+if(n>0){this.addSubMenuItem(Rico.getPhraseById("gridmenuExport"),this.exportmenu,false);
+if(f.printVisibleSQL&&typeof(f.dataSource)=="string"){this.exportmenu.addMenuItemId("gridmenuExportVis2Web",function(){f.printVisibleSQL("html")
});
this.exportmenu.addMenuItemId("gridmenuExportAll2Web",function(){f.printAllSQL("html")
},f.totalRows<=n);
});
this.exportmenu.addMenuItemId("gridmenuExportAll2SS",function(){f.printAllSQL("xl")
},f.totalRows<=n)
-}else{if(n>0&&m>0){this.addSubMenuItem(Rico.getPhraseById("gridmenuExport"),this.exportmenu,false);
-this.exportmenu.addMenuItemId("gridmenuExportVis2Web",function(){f.printVisible("plain")
+}else{this.exportmenu.addMenuItemId("gridmenuExportVis2Web",function(){f.printVisible()
});
-this.exportmenu.addMenuItemId("gridmenuExportAll2Web",function(){f.printAll("plain")
-},f.totalRows<=n);
-if(Rico.isIE){this.exportmenu.addMenuBreak();
-this.exportmenu.addMenuItemId("gridmenuExportVis2SS",function(){f.printVisible("owc")
-});
-this.exportmenu.addMenuItemId("gridmenuExportAll2SS",function(){f.printAll("owc")
+this.exportmenu.addMenuItemId("gridmenuExportAll2Web",function(){f.printAll()
},f.totalRows<=n)
-}}}var k=o.listInvisible();
+}}var k=o.listInvisible();
for(var e=0,j=0;
j<k.length;
j++){if(k[j].canHideShow()){e++
},clearTimer:function(){if(typeof this.timeoutHandler!="number"){return
}window.clearTimeout(this.timeoutHandler);
delete this.timeoutHandler
-},jsUpdate:function(a,c,f,b,d){this.clearTimer();
+},jsUpdate:function(a,c,e,b,d){this.clearTimer();
this.processingRequest=false;
Rico.log("jsUpdate: "+arguments.length);
if(d){Rico.log("jsUpdate: received error="+d);
this.rcvdRowCount=true;
this.foundRowCount=true;
Rico.log("jsUpdate: found RowCount="+this.rowcntContent)
-}this.updateBuffer(a,c,f);
+}this.updateBuffer(a,c,e);
if(this.options.onAjaxUpdate){this.options.onAjaxUpdate()
}this.updateGrid(a);
if(this.options.TimeOut&&this.timerMsg){this.restartSessionTimer()
-}if(this.pendingRequest>=-1){var e=this.pendingRequest;
-Rico.log("jsUpdate: found pending request for offset="+e);
+}if(this.pendingRequest>=-1){var f=this.pendingRequest;
+Rico.log("jsUpdate: found pending request for offset="+f);
this.pendingRequest=-2;
-this.fetch(e)
+this.fetch(f)
}},ajaxUpdate:function(a,c){this.clearTimer();
this.processingRequest=false;
if(c.status!=200){Rico.log("ajaxUpdate: received http error="+c.status);
}if(!o){alert("Data provider returned an invalid XML response");
Rico.log("Data provider returned an invalid XML response");
return false
-}var e=o.getElementsByTagName("ajax-response");
-if(e==null||e.length!=1){return false
-}this.rcvdRows=0;
+}var d=o.getElementsByTagName("ajax-response");
+if(d==null||d.length!=1){alert("Received invalid response from server");
+return false
+}Rico.log("Processing ajax-response");
+this.rcvdRows=0;
this.rcvdRowCount=false;
-var c=e[0];
-var a=c.getElementsByTagName("debug");
+var b=d[0];
+var a=b.getElementsByTagName("debug");
for(var g=0;
g<a.length;
g++){Rico.log("ajaxUpdate: debug msg "+g+": "+Rico.getContentAsString(a[g],this.options.isEncoded))
-}var l=c.getElementsByTagName("error");
-if(l.length>0){var d=Rico.getContentAsString(l[0],this.options.isEncoded);
-alert("Data provider returned an error:\n"+d);
-Rico.log("Data provider returned an error:\n"+d);
+}var l=b.getElementsByTagName("error");
+if(l.length>0){var c=Rico.getContentAsString(l[0],this.options.isEncoded);
+alert("Data provider returned an error:\n"+c);
+Rico.log("Data provider returned an error:\n"+c);
return false
-}var j=c.getElementsByTagName("rows")[0];
+}var j=b.getElementsByTagName("rows")[0];
if(!j){Rico.log("ajaxUpdate: invalid response");
this.liveGrid.showMsg(Rico.getPhraseById("invalidResponse"));
return false
-}var n=c.getElementsByTagName("rowcount");
+}var n=b.getElementsByTagName("rowcount");
if(n&&n.length==1){this.rowcntContent=Rico.getContentAsString(n[0],this.options.isEncoded);
this.rcvdRowCount=true;
this.foundRowCount=true;
this.rcvdOffset=j.getAttribute("offset");
Rico.log("ajaxUpdate: rcvdOffset="+this.rcvdOffset);
var h=this.dom2jstable(j);
-var b=(this.options.acceptAttr.length>0)?this.dom2jstableAttr(j):false;
+var e=(this.options.acceptStyle)?this.dom2jstableStyle(j):false;
this.rcvdRows=h.length;
-this.updateBuffer(k,h,b);
+this.updateBuffer(k,h,e);
return true
+},dom2jstableStyle:function(e,b){var a=this.options.acceptStyle;
+Rico.log("dom2jstableStyle start");
+var f=[];
+var g=e.getElementsByTagName("tr");
+for(var d=b||0;
+d<g.length;
+d++){var k=[];
+var h=g[d].getElementsByTagName("td");
+for(var c=0;
+c<h.length;
+c++){k[c]=h[c].getAttribute("style")||""
+}f.push(k)
+}Rico.log("dom2jstableStyle end");
+return f
},processResponseJSON:function(a,d){var c=Rico.getJSON(d);
if(!c||c==null){alert("Data provider returned an invalid JSON response");
Rico.log("Data provider returned an invalid JSON response");
this.foundRowCount=true;
Rico.writeDebugMsg("loadRows, found RowCount="+c.rowcount)
}this.rcvdRows=c.rows.length;
-this.updateBuffer(a,c.rows);
+this.updateBuffer(a,c.rows,c.styles);
return true
},updateBuffer:function(c,a,b){this.baseRows=a;
this.attr=b;
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];
c.hidden=this.liveGrid.listInvisible("index").join(",");
var b=this.dataSource+"?"+Rico.toQueryString(c);
window.open(b,"",this.liveGrid.options.exportWindow)
-},_printAll:function(a){this.liveGrid.exportStart();
+},_printAll:function(){this.liveGrid.exportStart();
this.ajaxOptions.parameters=this.formQueryHashSQL(0,this.liveGrid.options.maxPrint);
-var b=this;
-this.ajaxOptions.onComplete=function(){b._jsExport(a)
+var a=this;
+this.ajaxOptions.onComplete=function(){a._jsExport()
};
this.dataSource(this.ajaxOptions)
-},_jsExport:function(a,c,e,b,d){Rico.log("_jsExport: "+arguments.length);
-if(d){Rico.log("_jsExport: received error="+d);
-this.liveGrid.showMsg(Rico.getPhraseById("requestError",d));
+},_jsExport:function(b,d,a,c){Rico.log("_jsExport: "+arguments.length);
+if(c){Rico.log("_jsExport: received error="+c);
+this.liveGrid.showMsg(Rico.getPhraseById("requestError",c));
return
-}this.exportBuffer(c,0);
-this.liveGrid.exportFinish(a)
+}this.exportBuffer(b,0);
+this.liveGrid.exportFinish()
}};
if(typeof Rico=="undefined"){throw ("LiveGridForms requires the Rico JavaScript framework")
}Rico.TableEdit=function(a){this.initialize(a)
this.options={maxDisplayLen:20,panelHeight:200,panelWidth:500,compact:false,RecordName:Rico.getPhraseById("record"),updateURL:window.location.href,showSaveMsg:"errors"};
Rico.extend(this.options,b.options);
var a=this;
-this.hasWF2=(document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("WebForms","2.0"));
this.menu=b.menu;
this.menu.options.dataMenuHandler=function(d,f,g,e){return a.editMenu(d,f,g,e)
};
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, hasWF2="+this.hasWF2)
+Rico.log("Rico.TableEdit.initialize complete")
},createKeyArray:function(){this.keys=[];
for(var a=0;
a<this.grid.columns.length;
a++){if(this.grid.columns[a].format&&this.grid.columns[a].format.isKey){this.keys.push({colidx:a})
}}},createEditDiv:function(){this.requestCount=1;
-this.formPopup=new Rico.Window("",{overflow:this.options.panels?"hidden":"auto"});
-Rico.addClass(this.formPopup.content,"ricoLG_editDiv");
+this.formPopup=this.createWindow();
+Rico.addClass(this.formPopup.content.parentNode,"ricoLG_editDiv");
if(this.options.canEdit||this.options.canAdd){this.startForm();
this.createForm(this.form)
}else{var a=this.createButton(Rico.getPhraseById("close"));
this.responseDiv=this.grid.createDiv("editResponseText",this.responseDialog);
if(this.panelGroup){Rico.log("createEditDiv complete, requestCount="+this.requestCount);
Rico.runLater(50,this,"initPanelGroup")
-}},initPanelGroup:function(){this.requestCount--;
+}},createWindow:function(){var a=this;
+return new Rico.Window("",{closeFunc:function(){a.makeFormInvisible()
+},overflow:this.options.ColGroups?"hidden":"auto"})
+},initPanelGroup:function(){this.requestCount--;
Rico.log("initPanelGroup: "+this.requestCount);
if(this.requestCount>0){return
}var a=parseInt(this.options.panelWidth,10);
}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;
}if(!b.Help){b.Help=b.dateFmt
}if(typeof b.min=="string"){b.min=Rico.setISO8601(b.min)||new Date(b.min)
}if(typeof b.max=="string"){b.max=Rico.setISO8601(b.max)||new Date(b.max)
-}if(this.hasWF2){e=Rico.createFormField(f,"input","date",a,a);
+}if(Rico.inputtypes.date){e=Rico.createFormField(f,"input","date",a,a);
e.required=b.required;
if(b.min){e.min=Rico.toISO8601String(b.min,3)
}if(b.max){e.max=Rico.toISO8601String(b.max,3)
break;
case"I":if(!b.isNullable){b.required=true
}if(!b.pattern){b.pattern="int-signed"
-}if(this.hasWF2){e=Rico.createFormField(f,"input","number",a,a);
+}if(Rico.inputtypes.number){e=Rico.createFormField(f,"input","number",a,a);
e.required=b.required;
e.min=b.min;
e.max=b.max;
if(!b.isNullable&&b.EntryType!="T"){b.required=true
}this.initField(e,b);
break
-}if(e){if(b.SelectCtl){Rico.EditControls.applyTo(c,e)
-}}var g="";
+}if(e&&b.SelectCtl){Rico.EditControls.applyTo(c,e)
+}var g="";
h.className="ricoEditLabel";
if(b.Help){h.title=b.Help;
-g=" <img src='"+Rico.imgDir+"info_icon.gif'>";
-Rico.addClass(h,"ricoHelp")
+g=" <span class='rico-icon rico-info'></span>"
}var d=b.EntryType.length>1&&b.EntryType.charAt(1)=="L"?c.next.displayName:c.displayName;
h.innerHTML=d+g
},addSelectNone:function(a){this.addSelectOption(a,this.options.TableSelectNone,Rico.getPhraseById("selectNone"))
},canAdd:function(a){return(typeof this.options.canAdd=="function")?this.options.canAdd(a):this.options.canAdd
},canEdit:function(a){return(typeof this.options.canEdit=="function")?this.options.canEdit(a):this.options.canEdit
},canDelete:function(a){return(typeof this.options.canDelete=="function")?this.options.canDelete(a):this.options.canDelete
-},cancelEdit:function(b){Rico.eventStop(b);
-for(var a=0;
-a<this.grid.columns.length;
-a++){if(this.grid.columns[a].format&&this.grid.columns[a].format.SelectCtl){Rico.EditControls.close(this.grid.columns[a].format.SelectCtl)
-}}this.makeFormInvisible();
+},cancelEdit:function(a){Rico.eventStop(a);
+this.makeFormInvisible();
this.grid.highlightEnabled=true;
this.menu.cancelmenu();
return false
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])
}switch(j.EntryType){case"tinyMCE":if(typeof tinyMCE!="undefined"){tinyMCE.execCommand("mceAddControl",true,j.FieldName)
}break
}}this.initialized=true
-},makeFormInvisible:function(){this.formPopup.container.style.visibility="hidden";
+},makeFormInvisible:function(){for(var a=0;
+a<this.grid.columns.length;
+a++){if(this.grid.columns[a].format&&this.grid.columns[a].format.SelectCtl){Rico.EditControls.close(this.grid.columns[a].format.SelectCtl)
+}}this.formPopup.container.style.visibility="hidden";
this.formPopup.closePopup();
this.processCallback(this.options.formClose)
},getConfirmDesc:function(a){return Rico.stripTags(this.grid.cell(a,this.options.ConfirmDeleteCol).innerHTML).replace(" "," ")
}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);
}}},applyTo:function(e,f){var c=this.widgetList[e.format.SelectCtl];
if(!c){return
}Rico.log("Rico.EditControls.applyTo: "+e.displayName+" : "+e.format.SelectCtl);
-var d=document.createElement("span");
-var a=document.createElement("img");
-a.style.paddingLeft="4px";
+var a,d=document.createElement("span");
+if(c.imgsrc.indexOf(".")==-1&&c.imgsrc.indexOf("/")==-1){a=document.createElement("span");
+a.className=c.imgsrc
+}else{a=document.createElement("img");
+a.src=c.imgsrc
+}a.style.verticalAlign="top";
+a.style.marginLeft="4px";
a.style.cursor="pointer";
-a.align="top";
-a.src=c.imgsrc;
a.id=this.imgId(e.format.FieldName);
Rico.eventBind(a,"click",Rico.eventHandle(this,"processClick"));
f.parentNode.appendChild(d);