/* jqxbuttons,jqxcalendar,jqxcombobox,jqxdatetimeinput,jqxlistbox,jqxnumberinput,jqxscrollbar jQWidgets v2.8.0 (2013-Mar-22) Copyright (c) 2011-2013 jQWidgets. License: http://jqwidgets.com/license/ */ (function(a){a.jqx=a.jqx||{};a.jqx.define=function(b,c,d){b[c]=function(){if(this.baseType){this.base=new b[this.baseType]();this.base.defineInstance()}this.defineInstance()};b[c].prototype.defineInstance=function(){};b[c].prototype.base=null;b[c].prototype.baseType=undefined;if(d&&b[d]){b[c].prototype.baseType=d}};a.jqx.invoke=function(e,d){if(d.length==0){return}var f=typeof(d)==Array||d.length>0?d[0]:d;var c=typeof(d)==Array||d.length>1?Array.prototype.slice.call(d,1):a({}).toArray();while(e[f]==undefined&&e.base!=null){e=e.base}if(e[f]!=undefined&&a.isFunction(e[f])){return e[f].apply(e,c)}if(typeof f=="string"){var b=f.toLowerCase();return e[b].apply(e,c)}return};a.jqx.hasProperty=function(c,b){if(typeof(b)=="object"){for(var e in b){var d=c;while(d){if(d.hasOwnProperty(e)){return true}d=d.base}return false}}else{while(c){if(c.hasOwnProperty(b)){return true}c=c.base}}return false};a.jqx.hasFunction=function(e,d){if(d.length==0){return false}if(e==undefined){return false}var f=typeof(d)==Array||d.length>0?d[0]:d;var c=typeof(d)==Array||d.length>1?Array.prototype.slice.call(d,1):{};while(e[f]==undefined&&e.base!=null){e=e.base}if(e[f]&&a.isFunction(e[f])){return true}if(typeof f=="string"){var b=f.toLowerCase();if(e[b]&&a.isFunction(e[b])){return true}}return false};a.jqx.isPropertySetter=function(c,b){if(b.length==1&&typeof(b[0])=="object"){return true}if(b.length==2&&typeof(b[0])=="string"&&!a.jqx.hasFunction(c,b)){return true}return false};a.jqx.validatePropertySetter=function(e,c,b){if(!a.jqx.propertySetterValidation){return true}if(c.length==1&&typeof(c[0])=="object"){for(var d in c[0]){var f=e;while(!f.hasOwnProperty(d)&&f.base){f=f.base}if(!f||!f.hasOwnProperty(d)){if(!b){throw"Invalid property: "+d}return false}}return true}if(c.length!=2){if(!b){throw"Invalid property: "+c.length>=0?c[0]:""}return false}while(!e.hasOwnProperty(c[0])&&e.base){e=e.base}if(!e||!e.hasOwnProperty(c[0])){if(!b){throw"Invalid property: "+c[0]}return false}return true};a.jqx.set=function(c,b){if(b.length==1&&typeof(b[0])=="object"){a.each(b[0],function(d,e){var f=c;while(!f.hasOwnProperty(d)&&f.base!=null){f=f.base}if(f.hasOwnProperty(d)){a.jqx.setvalueraiseevent(f,d,e)}else{if(a.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+d+"'"}}})}else{if(b.length==2){while(!c.hasOwnProperty(b[0])&&c.base){c=c.base}if(c.hasOwnProperty(b[0])){a.jqx.setvalueraiseevent(c,b[0],b[1])}else{if(a.jqx.propertySetterValidation){throw"jqxCore: invalid property '"+b[0]+"'"}}}}};a.jqx.setvalueraiseevent=function(c,d,e){var b=c[d];c[d]=e;if(!c.isInitialized){return}if(c.propertyChangedHandler!=undefined){c.propertyChangedHandler(c,d,b,e)}if(c.propertyChangeMap!=undefined&&c.propertyChangeMap[d]!=undefined){c.propertyChangeMap[d](c,d,b,e)}};a.jqx.get=function(e,d){if(d==undefined||d==null){return undefined}if(e.propertyMap){var c=e.propertyMap(d);if(c!=null){return c}}if(e.hasOwnProperty(d)){return e[d]}var b=undefined;if(typeof(d)==Array){if(d.length!=1){return undefined}b=d[0]}else{if(typeof(d)=="string"){b=d}}while(!e.hasOwnProperty(b)&&e.base){e=e.base}if(e){return e[b]}return undefined};a.jqx.serialize=function(e){var b="";if(a.isArray(e)){b="[";for(var d=0;d0){b+=", "}b+=a.jqx.serialize(e[d])}b+="]"}else{if(typeof(e)=="object"){b="{";var c=0;for(var d in e){if(c++>0){b+=", "}b+=d+": "+a.jqx.serialize(e[d])}b+="}"}else{b=e.toString()}}return b};a.jqx.propertySetterValidation=true;a.jqx.jqxWidgetProxy=function(g,c,b){var d=a(c);var f=a.data(c,g);if(f==undefined){return undefined}var e=f.instance;if(a.jqx.hasFunction(e,b)){return a.jqx.invoke(e,b)}if(a.jqx.isPropertySetter(e,b)){if(a.jqx.validatePropertySetter(e,b)){a.jqx.set(e,b);return undefined}}else{if(typeof(b)=="object"&&b.length==0){return}else{if(typeof(b)=="object"&&b.length==1&&a.jqx.hasProperty(e,b[0])){return a.jqx.get(e,b[0])}else{if(typeof(b)=="string"&&a.jqx.hasProperty(e,b[0])){return a.jqx.get(e,b)}}}}throw"jqxCore: Invalid parameter '"+a.jqx.serialize(b)+"' does not exist.";return undefined};a.jqx.jqxWidget=function(b,d,k){var c=false;try{jqxArgs=Array.prototype.slice.call(k,0)}catch(h){jqxArgs=""}try{c=window.MSApp!=undefined}catch(h){}var g=b;var f="";if(d){f="_"+d}a.jqx.define(a.jqx,"_"+g,f);a.fn[g]=function(){var e=Array.prototype.slice.call(arguments,0);var l=null;if(e.length==0||(e.length==1&&typeof(e[0])=="object")){return this.each(function(){var p=a(this);var o=this;var r=a.data(o,g);if(r==null){r={};r.element=o;r.host=p;r.instance=new a.jqx["_"+g]();if(o.id==""){o.id=a.jqx.utilities.createId()}r.instance.get=r.instance.set=r.instance.call=function(){var s=Array.prototype.slice.call(arguments,0);return a.jqx.jqxWidgetProxy(g,o,s)};a.data(o,g,r);a.data(o,"jqxWidget",r.instance);var q=new Array();var m=r.instance;while(m){m.isInitialized=false;q.push(m);m=m.base}q.reverse();q[0].theme="";a.jqx.jqxWidgetProxy(g,this,e);for(var n in q){m=q[n];if(n==0){m.host=p;m.element=o;m.WinJS=c}if(m!=undefined){if(m.createInstance!=null){if(c){MSApp.execUnsafeLocalFunction(function(){m.createInstance(e)})}else{m.createInstance(e)}}}}for(var n in q){if(q[n]!=undefined){q[n].isInitialized=true}}if(c){MSApp.execUnsafeLocalFunction(function(){r.instance.refresh(true)})}else{r.instance.refresh(true)}l=this}else{a.jqx.jqxWidgetProxy(g,this,e)}})}else{this.each(function(){var m=a.jqx.jqxWidgetProxy(g,this,e);if(l==null){l=m}})}return l};try{a.extend(a.jqx["_"+g].prototype,Array.prototype.slice.call(k,0)[0])}catch(h){}a.extend(a.jqx["_"+g].prototype,{toThemeProperty:function(e,l){if(this.theme==""){return e}if(l!=null&&l){return e+"-"+this.theme}return e+" "+e+"-"+this.theme}});a.jqx["_"+g].prototype.refresh=function(){if(this.base){this.base.refresh()}};a.jqx["_"+g].prototype.createInstance=function(){};a.jqx["_"+g].prototype.propertyChangeMap={};a.jqx["_"+g].prototype.addHandler=function(n,l,e,m){switch(l){case"mousewheel":if(window.addEventListener){if(a.jqx.browser.mozilla){n[0].addEventListener("DOMMouseScroll",e,false)}else{n[0].addEventListener("mousewheel",e,false)}return false}break;case"mousemove":if(window.addEventListener&&!m){n[0].addEventListener("mousemove",e,false);return false}break}if(m==undefined||m==null){if(n.on){n.on(l,e)}else{n.bind(l,e)}}else{if(n.on){n.on(l,m,e)}else{n.bind(l,m,e)}}};a.jqx["_"+g].prototype.removeHandler=function(m,l,e){switch(l){case"mousewheel":if(window.removeEventListener){if(a.jqx.browser.mozilla){m[0].removeEventListener("DOMMouseScroll",e,false)}else{m[0].removeEventListener("mousewheel",e,false)}return false}break;case"mousemove":if(a.jqx.browser.msie&&a.jqx.browser.version>=9){if(window.removeEventListener){m[0].removeEventListener("mousemove",e,false)}}break}if(l==undefined){if(m.off){m.off()}else{m.unbind()}return}if(e==undefined){if(m.off){m.off(l)}else{m.unbind(l)}}else{if(m.off){m.off(l,e)}else{m.unbind(l,e)}}}};a.jqx.utilities=a.jqx.utilities||{};a.extend(a.jqx.utilities,{createId:function(){var b=function(){return(((1+Math.random())*65536)|0).toString(16).substring(1)};return"jqxWidget"+b()+b()+b()},setTheme:function(f,g,e){if(typeof e==="undefined"){return}var h=e[0].className.split(" "),b=[],k=[],d=e.children();for(var c=0;c=0){if(f.length>0){b.push(h[c]);k.push(h[c].replace(f,g))}else{k.push(h[c]+"-"+g)}}}this._removeOldClasses(b,e);this._addNewClasses(k,e);for(var c=0;c]*)\/>/gi,p=/<([\w:]+)/,f=/<(?:script|object|embed|option|style)/i,k=new RegExp("<(?:"+n+")[\\s/>]","i"),q=/^\s+/,t={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};if(typeof s==="string"&&!r.test(s)&&(jQuery.support.htmlSerialize||!k.test(s))&&(jQuery.support.leadingWhitespace||!q.test(s))&&!t[(p.exec(s)||["",""])[1].toLowerCase()]){s=s.replace(g,"<$1>");try{for(;m1){return true}var F=I[0].pageY;var G=I[0].pageX;if(A.simulatetouches){F=I[0]._pageY;G=I[0]._pageX}var D=F-h;var E=G-l;d=F;touchHorizontalEnd=G;k=D-s;m=E-t;g=true;s=D;t=E;f(-m*3,-k*3,E,D,H);H.preventDefault();H.stopPropagation();if(H.preventManipulation){H.preventManipulation()}return false};if(p.on){p.on(z,w)}else{p.bind(z,w)}if(this.simulatetouches){var n=a(window).on!=undefined||a(window).bind;var y=function(D){A.scrolling[C]=false};a(window).on!=undefined?a(window).on("mouseup.touchScroll",y):a(window).bind("mouseup.touchScroll",y);if(window.frameElement){if(window.top!=null){var q=function(D){A.scrolling[C]=false};if(window.top.document){a(window.top.document).on?a(window.top.document).on("mouseup",q):a(window.top.document).bind("mouseup",q)}}}var r=a(document).on!=undefined||a(document).bind;var v=function(D){if(!A.scrolling[C]){return true}A.scrolling[C]=false;var F=A.getTouches(D)[0],E=A.getRootNode(F.target);A.dispatchMouseEvent("mouseup",F,E);A.dispatchMouseEvent("click",F,E)};a(document).on!=undefined?a(document).on("touchend",v):a(document).bind("touchend",v)}var e=function(D){if(!A.enableScrolling[C]){return true}var F=A.getTouches(D)[0];if(!A.scrolling[C]){return true}A.scrolling[C]=false;if(g){A.dispatchMouseEvent("mouseup",F,E)}else{var F=A.getTouches(D)[0],E=A.getRootNode(F.target);A.dispatchMouseEvent("mouseup",F,E);A.dispatchMouseEvent("click",F,E);return true}};p.on?p.on(o+" touchcancel.touchScroll",e):p.bind(o+" touchcancel.touchScroll",e)}});a.jqx.cookie=a.jqx.cookie||{};a.extend(a.jqx.cookie,{cookie:function(e,f,c){if(arguments.length>1&&String(f)!=="[object Object]"){c=jQuery.extend({},c);if(f===null||f===undefined){c.expires=-1}if(typeof c.expires==="number"){var h=c.expires,d=c.expires=new Date();d.setDate(d.getDate()+h)}f=String(f);return(document.cookie=[encodeURIComponent(e),"=",c.raw?f:encodeURIComponent(f),c.expires?"; expires="+c.expires.toUTCString():"",c.path?"; path="+c.path:"",c.domain?"; domain="+c.domain:"",c.secure?"; secure":""].join(""))}c=f||{};var b,g=c.raw?function(k){return k}:decodeURIComponent;return(b=new RegExp("(?:^|; )"+encodeURIComponent(e)+"=([^;]*)").exec(document.cookie))?g(b[1]):null}});a.jqx.string=a.jqx.string||{};a.extend(a.jqx.string,{contains:function(b,c){if(b==null||c==null){return false}return b.indexOf(c)!=-1},containsIgnoreCase:function(b,c){if(b==null||c==null){return false}return b.toUpperCase().indexOf(c.toUpperCase())!=-1},equals:function(b,c){if(b==null||c==null){return false}b=this.normalize(b);if(c.length==b.length){return b.slice(0,c.length)==c}return false},equalsIgnoreCase:function(b,c){if(b==null||c==null){return false}b=this.normalize(b);if(c.length==b.length){return b.toUpperCase().slice(0,c.length)==c.toUpperCase()}return false},startsWith:function(b,c){if(b==null||c==null){return false}return b.slice(0,c.length)==c},startsWithIgnoreCase:function(b,c){if(b==null||c==null){return false}return b.toUpperCase().slice(0,c.length)==c.toUpperCase()},normalize:function(b){if(b.charCodeAt(b.length-1)==65279){b=b.substring(0,b.length-1)}return b},endsWith:function(b,c){if(b==null||c==null){return false}b=this.normalize(b);return b.slice(-c.length)==c},endsWithIgnoreCase:function(b,c){if(b==null||c==null){return false}b=this.normalize(b);return b.toUpperCase().slice(-c.length)==c.toUpperCase()}});a.extend(jQuery.easing,{easeOutBack:function(f,g,e,l,k,h){if(h==undefined){h=1.70158}return l*((g=g/k-1)*g*((h+1)*g+h)+1)+e},easeInQuad:function(f,g,e,k,h){return k*(g/=h)*g+e},easeInOutCirc:function(f,g,e,k,h){if((g/=h/2)<1){return -k/2*(Math.sqrt(1-g*g)-1)+e}return k/2*(Math.sqrt(1-(g-=2)*g)+1)+e},easeInOutSine:function(f,g,e,k,h){return -k/2*(Math.cos(Math.PI*g/h)-1)+e},easeInCubic:function(f,g,e,k,h){return k*(g/=h)*g*g+e},easeOutCubic:function(f,g,e,k,h){return k*((g=g/h-1)*g*g+1)+e},easeInOutCubic:function(f,g,e,k,h){if((g/=h/2)<1){return k/2*g*g*g+e}return k/2*((g-=2)*g*g+2)+e},easeInSine:function(f,g,e,k,h){return -k*Math.cos(g/h*(Math.PI/2))+k+e},easeOutSine:function(f,g,e,k,h){return k*Math.sin(g/h*(Math.PI/2))+e},easeInOutSine:function(f,g,e,k,h){return -k/2*(Math.cos(Math.PI*g/h)-1)+e}})})(jQuery);(function(b){b.fn.extend({ischildof:function(d){var c=b(this).parents().get();for(j=0;jg.length){f="remove"}if(c._oldlocaldata.length"}else{this.mapChar=f.mapChar?f.mapChar:">"}if(f.unboundmode||p.unboundmode){this.unboundmode=f.unboundmode||p.unboundmode}if(p.cache!=undefined){this.cache=p.cache}if(this.koSubscriptions){for(var u=0;u0){for(var r=0;r0){var D=E;for(var A=0;A0){var P=false;for(var G=0;G0){var K=this;for(var D=0;D0){var j=this;var B=c(j,v);z.records[z.records.length]=B}else{z.records[z.records.length]=this}})}else{if(v==0){this.records=p.localdata}else{a.each(p.localdata,function(B){var j=this;var C=c(j,v);var A=z.getid(p.id,C,B);if(typeof(A)==="object"){A=B}var j=a.extend({},C);j.uid=A;z.records[z.records.length]=j})}}}this.originaldata=p.localdata;this.cachedrecords=this.records;this.addForeignValues(p);if(f.uniqueDataFields){var o=this.getUniqueRecords(this.records,f.uniqueDataFields);this.records=o;this.cachedrecords=o}if(f.beforeLoadComplete){var w=f.beforeLoadComplete(z.records,this.originaldata);if(w!=undefined){z.records=w;z.cachedrecords=w}}if(f.autoSort&&f.autoSortField){var k=Object.prototype.toString;Object.prototype.toString=(typeof field=="function")?field:function(){return this[f.autoSortField]};z.records.sort();Object.prototype.toString=k}if(a.isFunction(f.loadComplete)){f.loadComplete(p.localdata)}break;case"json":case"jsonp":case"xml":case"xhtml":case"script":case"text":if(p.localdata!=null){if(a.isFunction(p.beforeprocessing)){p.beforeprocessing(p.localdata)}if(p.datatype==="xml"){z.loadxml(p.localdata,p.localdata,p)}else{if(m==="text"){z.loadtext(p.localdata,p)}else{z.loadjson(p.localdata,p.localdata,p)}}z.addForeignValues(p);if(f.uniqueDataFields){var o=z.getUniqueRecords(z.records,f.uniqueDataFields);z.records=o;z.cachedrecords=o}if(a.isFunction(f.loadComplete)){f.loadComplete(p.localdata)}return}var x=f.data!=undefined?f.data:{};if(p.processdata){p.processdata(x)}if(a.isFunction(f.processData)){f.processData(x)}if(a.isFunction(f.formatData)){var b=f.formatData(x);if(b!=undefined){x=b}}var t="application/x-www-form-urlencoded";if(f.contentType){t=f.contentType}var e="GET";if(p.type){e=p.type}if(f.type){e=f.type}if(p.url&&p.url.length>0){if(a.isFunction(f.loadServerData)){z._requestData(x,p,f)}else{this.xhr=a.ajax({dataType:m,cache:this.cache,type:e,url:p.url,async:h,contentType:t,data:x,success:function(B,i,E){if(a.isFunction(p.beforeprocessing)){var D=p.beforeprocessing(B,i,E);if(D!=undefined){B=D}}if(a.isFunction(f.downloadComplete)){var D=f.downloadComplete(B,i,E);if(D!=undefined){B=D}}if(B==null){z.records=new Array();z.cachedrecords=new Array();z.originaldata=new Array();z.callDownloadComplete();if(a.isFunction(f.loadComplete)){f.loadComplete(new Array())}return}var j=B;if(B.records){j=B.records}if(B.totalrecords!=undefined){p.totalrecords=B.totalrecords}if(p.datatype==="xml"){z.loadxml(null,j,p)}else{if(m==="text"){z.loadtext(j,p)}else{z.loadjson(null,j,p)}}z.addForeignValues(p);if(f.uniqueDataFields){var A=z.getUniqueRecords(z.records,f.uniqueDataFields);z.records=A;z.cachedrecords=A}if(f.beforeLoadComplete){var C=f.beforeLoadComplete(z.records,B);if(C!=undefined){z.records=C;z.cachedrecords=C}}z.callDownloadComplete();if(a.isFunction(f.loadComplete)){f.loadComplete(B)}},error:function(A,i,j){if(a.isFunction(p.loaderror)){p.loaderror(A,i,j)}if(a.isFunction(f.loadError)){f.loadError(A,i,j)}A=null;z.callDownloadComplete()},beforeSend:function(j,i){if(a.isFunction(f.beforeSend)){f.beforeSend(j,i)}if(a.isFunction(p.beforesend)){p.beforesend(j,i)}}})}}else{z.callDownloadComplete();if(a.isFunction(f.loadComplete)){f.loadComplete(data)}}break}this.callBindingUpdate(s)},addForeignValues:function(c){var n=this;var t=c.datafields?c.datafields.length:0;for(var k=0;kn.totalrecords){h=n.totalrecords}}else{f=0;h=n.records.length}for(var l=f;l0){return a(e,c).text()}if(e){if(e.toString().length>0){var b=a(c).attr(e);if(b!=null&&b.toString().length>0){return b}}}return d},loadjson:function(C,D,o){if(typeof(C)=="string"){C=a.parseJSON(C)}if(o.root==undefined){o.root=""}if(o.record==undefined){o.record=""}var C=C||D;if(!C){C=[]}var B=this;if(o.root!=""){if(C[o.root]!=undefined){C=C[o.root]}else{a.each(C,function(j){var d=this;if(this==o.root){C=this;return false}else{if(this[o.root]!=undefined){C=this[o.root]}}})}if(!C){var g=o.root.split(B.mapChar);if(g.length>0){var y=C;for(var n=0;n0){var x=e;for(var n=0;n=c.length){continue}var h=m.datafields[p];var n=c[p];if(h.type){n=this.getvaluebytype(n,h)}var v=h.map||h.name||p.toString();f[v]=n}r[k+q]=a.extend({},f);r[k+q].uid=t;this.originaldata[k+q]=a.extend({},r[q])}}this.records=r;this.cachedrecords=this.records},getvaluebytype:function(f,c){var d=f;if(f==null){return f}if(c.type=="date"){if(f=="NaN"){f=""}else{var e=new Date(f);if(typeof f=="string"){if(c.format){var b=a.jqx.dataFormat.parsedate(f,c.format);if(b!=null){e=b}}}if(e.toString()=="NaN"||e.toString()=="Invalid Date"){if(a.jqx.dataFormat){f=a.jqx.dataFormat.tryparsedate(f)}else{f=e}}else{f=e}if(f==null){f=d}}}else{if(c.type=="float"||c.type=="number"||c.type=="decimal"){if(f=="NaN"){f=""}else{var f=parseFloat(f);if(isNaN(f)){f=d}}}else{if(c.type=="int"||c.type=="integer"){var f=parseInt(f);if(isNaN(f)){f=d}}else{if(c.type=="bool"||c.type=="boolean"){if(f!=null){if(f.toLowerCase!=undefined){if(f.toLowerCase()=="false"){f=false}else{if(f.toLowerCase()=="true"){f=true}}}}if(f==1){f=true}else{if(f==0&&f!==""){f=false}else{f=""}}}}}}return f}};a.jqx.dataFormat={};a.extend(a.jqx.dataFormat,{regexTrim:/^\s+|\s+$/g,regexInfinity:/^[+-]?infinity$/i,regexHex:/^0x[a-f0-9]+$/i,regexParseFloat:/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/,toString:Object.prototype.toString,isBoolean:function(b){return typeof b==="boolean"},isObject:function(b){return(b&&(typeof b==="object"||a.isFunction(b)))||false},isDate:function(b){return b instanceof Date},arrayIndexOf:function(e,d){if(e.indexOf){return e.indexOf(d)}for(var b=0,c=e.length;b=g){return e}}return 0},toUpper:function(b){return b.split("\u00A0").join(" ").toUpperCase()},toUpperArray:function(b){var e=[];for(var d=0,c=b.length;d'+b+""}return''+b+""},formatemail:function(b){return''+b+""},formatnumber:function(p,o,k){if(k==undefined||k==null||k==""){k=this.defaultcalendar()}if(!this.isNumber(p)){p*=1}var l;if(o.length>1){l=parseInt(o.slice(1),10)}var r={};var m=o.charAt(0).toUpperCase();r.thousandsSeparator=k.thousandsseparator;r.decimalSeparator=k.decimalseparator;switch(m){case"D":case"d":case"F":case"f":r.decimalPlaces=l;break;case"N":case"n":r.decimalPlaces=0;break;case"C":case"c":r.decimalPlaces=l;if(k.currencysymbolposition=="before"){r.prefix=k.currencysymbol}else{r.suffix=k.currencysymbol}break;case"P":case"p":r.suffix=k.percentsymbol;r.decimalPlaces=l;break;default:throw"Bad number format specifier: "+m}if(this.isNumber(p)){var f=(p<0);var d=p+"";var n=(r.decimalSeparator)?r.decimalSeparator:".";var b;if(this.isNumber(r.decimalPlaces)){var g=r.decimalPlaces;var j=Math.pow(10,g);d=Math.round(p*j)/j+"";b=d.lastIndexOf(".");if(g>0){if(b<0){d+=n;b=d.length-1}else{if(n!=="."){d=d.replace(".",n)}}while((d.length-1-b)-1)?b:d.length;var e=d.substring(b);var c=-1;for(var h=b;h>0;h--){c++;if((c%3===0)&&(h!==b)&&(!f||(h>1))){e=q+e}e=d.charAt(h-1)+e}d=e}d=(r.prefix)?r.prefix+d:d;d=(r.suffix)?d+r.suffix:d;return d}else{return p}},tryparsedate:function(p,h){if(h==undefined||h==null){h=this.defaultcalendar()}var l=this;if(p==""){return null}if(p!=null&&!p.substring){p=p.toString()}if(p!=null&&p.substring(0,6)=="/Date("){var n=/^\/Date\((-?\d+)(\+|-)?(\d+)?\)\/$/;var e=new Date(+p.replace(/\/Date\((\d+)\)\//,"$1"));if(e=="Invalid Date"){var f=p.match(/^\/Date\((\d+)([-+]\d\d)(\d\d)\)\/$/);var e=null;if(f){e=new Date(1*f[1]+3600000*f[2]+60000*f[3])}}if(e==null||e=="Invalid Date"||isNaN(e)){var i=n.exec(p);if(i){var q=new Date(parseInt(i[1]));if(i[2]){var b=parseInt(i[3]);if(i[2]==="-"){b=-b}var k=q.getUTCMinutes();q.setUTCMinutes(k-b)}if(!isNaN(q.valueOf())){return q}}}return e}patterns=h.patterns;for(prop in patterns){e=l.parsedate(p,patterns[prop],h);if(e){return e}}if(p!=null){var d=null;var o=[":","/","-"];var j=true;for(var c=0;cc},expandYear:function(g,e){var c=new Date(),b=getEra(c);if(e<100){var d=g.twoDigitYearMax;d=typeof d==="string"?new Date().getFullYear()%100+parseInt(d,10):d;var f=this.getEraYear(c,g,b);e+=f-(f%100);if(e>d){e-=100}}return e},parsedate:function(z,G,u){if(u==undefined||u==null){u=this.defaultcalendar()}z=this.trim(z);var r=u,L=this.getparseregexp(r,G),k=new RegExp(L.regExp).exec(z);if(k===null){return null}var H=L.groups,x=null,p=null,K=null,J=null,q=null,g=0,C,B=0,I=0,b=0,d=null,s=false;for(var D=0,F=H.length;D1&&C.length0){if(arguments.length==0||typeof(value)=="object"){return b.val()}b.val(value);this.refresh();return b.val()}if(arguments.length==0||typeof(value)=="object"){return this.element.value}this.element.value=arguments[0];this.refresh()},_setSize:function(){if(this.width!=null&&(this.width.toString().indexOf("px")!=-1||this.width.toString().indexOf("%")!=-1)){this.host.css("width",this.width)}else{if(this.width!=undefined&&!isNaN(this.width)){this.host.css("width",this.width)}}if(this.height!=null&&(this.height.toString().indexOf("px")!=-1||this.height.toString().indexOf("%")!=-1)){this.host.css("height",this.height)}else{if(this.height!=undefined&&!isNaN(this.height)){this.host.css("height",this.height)}}},_removeHandlers:function(){this.removeHandler(this.host,"selectstart");this.removeHandler(this.host,"click");this.removeHandler(this.host,"focus");this.removeHandler(this.host,"blur");this.removeHandler(this.host,"mouseenter");this.removeHandler(this.host,"mouseleave");this.removeHandler(this.host,"mousedown");this.removeHandler(a(document),"mouseup.button"+this.element.id,this.mouseupfunc);this.mouseupfunc=null},focus:function(){this.host.focus()},destroy:function(){this._removeHandlers();this.host.removeClass();this.host.removeData();this.host.remove()},refresh:function(){if(this.overrideTheme){return}var d=this.toThemeProperty("jqx-fill-state-focus");var h=this.toThemeProperty("jqx-fill-state-disabled");var b=this.toThemeProperty("jqx-fill-state-normal");var g=this.toThemeProperty("jqx-fill-state-hover");var e=this.toThemeProperty("jqx-fill-state-pressed");var f=this.toThemeProperty("jqx-fill-state-pressed");var c="";this.host[0].disabled=this.disabled;if(this.disabled){c=h}else{if(this.isMouseOver&&!this.isTouchDevice){if(this.isPressed){c=f}else{c=g}}else{if(this.isPressed){c=e}else{c=b}}}if(this.isFocused){c+=" "+d}if(c!=this._oldCSSCurrent){if(this._oldCSSCurrent){this.host.removeClass(this._oldCSSCurrent)}this.host.addClass(c);this._oldCSSCurrent=c}if(this.rtl){this.host.addClass(this.toThemeProperty("jqx-rtl"));this.host.css("direction","rtl")}}});a.jqx.jqxWidget("jqxLinkButton","",{});a.extend(a.jqx._jqxLinkButton.prototype,{defineInstance:function(){this.disabled=false;this.height=null;this.width=null;this.rtl=false;this.href=null},createInstance:function(d){var c=this;this.host.onselectstart=function(){return false};var b=this.height||this.host.height();var e=this.width||this.host.width();this.href=this.host.attr("href");this.target=this.host.attr("target");this.content=this.host.text();this.element.innerHTML="";this.host.append("");var f=this.host.find("input");f.addClass(this.toThemeProperty("jqx-reset"));f.width(e);f.height(b);f.val(this.content);this.host.find("tr").addClass(this.toThemeProperty("jqx-reset"));this.host.find("td").addClass(this.toThemeProperty("jqx-reset"));this.host.find("tbody").addClass(this.toThemeProperty("jqx-reset"));this.host.css("color","inherit");this.host.addClass(this.toThemeProperty("jqx-link"));f.css({width:e});f.css({height:b});var g=d==undefined?{}:d[0]||{};f.jqxButton(g);if(this.disabled){this.host[0].disabled=true}this.propertyChangeMap.disabled=function(h,j,i,k){c.host[0].disabled=k};this.addHandler(f,"click",function(h){if(!this.disabled){c.onclick(h)}return false})},onclick:function(b){if(this.target!=null){window.open(this.href,this.target)}else{window.location=this.href}}});a.jqx.jqxWidget("jqxRepeatButton","jqxButton",{});a.extend(a.jqx._jqxRepeatButton.prototype,{defineInstance:function(){this.delay=50},createInstance:function(d){var b=this;var c=a.jqx.mobile.isTouchDevice();this.addHandler(a(document),"mouseup."+this.base.element.id,function(e){if(!c){if(b.timeout!=null){clearTimeout(b.timeout);b.timeout=null;b.refresh()}if(b.timer!=undefined){clearInterval(b.timer);b.timer=null;b.refresh()}}});this.addHandler(this.base.host,"mousedown",function(e){if(!c){if(b.timer!=null){clearInterval(b.timer)}b.timeout=setTimeout(function(){clearInterval(b.timer);b.timer=setInterval(function(f){b.ontimer(f)},b.delay)},150)}});this.addHandler(this.base.host,"mousemove",function(e){if(!c){if(e.which==0){if(b.timer!=null){clearInterval(b.timer);b.timer=null}}}})},destroy:function(){this.removeHandler(this.base.host,"mousemove");this.removeHandler(this.base.host,"mousedown");this.removeHandler(a(document),"mouseup."+this.base.element.id);this.timer=null;this.base.destroy()},stop:function(){clearInterval(this.timer);this.timer=null},ontimer:function(b){var b=new jQuery.Event("click");if(this.base!=null&&this.base.host!=null){this.base.host.trigger(b)}}});a.jqx.jqxWidget("jqxToggleButton","jqxButton",{});a.extend(a.jqx._jqxToggleButton.prototype,{defineInstance:function(){this.toggled=false},createInstance:function(c){var b=this;this.base.overrideTheme=true;this.isTouchDevice=a.jqx.mobile.isTouchDevice();this.addHandler(this.base.host,"click",function(d){b.toggle()});if(!this.isTouchDevice){this.addHandler(this.base.host,"mouseenter",function(d){if(!b.base.disabled){b.refresh()}});this.addHandler(this.base.host,"mouseleave",function(d){if(!b.base.disabled){b.refresh()}})}this.addHandler(this.base.host,"mousedown",function(d){if(!b.base.disabled){b.refresh()}});this.addHandler(a(document),"mouseup",function(d){if(!b.base.disabled){b.refresh()}})},_removeHandlers:function(){this.removeHandler(this.base.host,"click");this.removeHandler(this.base.host,"mouseenter");this.removeHandler(this.base.host,"mouseleave");this.removeHandler(this.base.host,"mousedown");this.removeHandler(a(document),"mouseup")},toggle:function(){this.toggled=!this.toggled;this.refresh()},unCheck:function(){this.toggled=false;this.refresh()},check:function(){this.toggled=true;this.refresh()},refresh:function(){var g=this.base.toThemeProperty("jqx-fill-state-disabled");var b=this.base.toThemeProperty("jqx-fill-state-normal");var f=this.base.toThemeProperty("jqx-fill-state-hover");var d=this.base.toThemeProperty("jqx-fill-state-pressed");var e=this.base.toThemeProperty("jqx-fill-state-pressed");var c="";this.base.host[0].disabled=this.base.disabled;if(this.base.disabled){c=g}else{if(this.base.isMouseOver&&!this.isTouchDevice){if(this.base.isPressed||this.toggled){c=e}else{c=f}}else{if(this.base.isPressed||this.toggled){c=d}else{c=b}}}if(this.base.host.hasClass(g)&&g!=c){this.base.host.removeClass(g)}if(this.base.host.hasClass(b)&&b!=c){this.base.host.removeClass(b)}if(this.base.host.hasClass(f)&&f!=c){this.base.host.removeClass(f)}if(this.base.host.hasClass(d)&&d!=c){this.base.host.removeClass(d)}if(this.base.host.hasClass(e)&&e!=c){this.base.host.removeClass(e)}if(!this.base.host.hasClass(c)){this.base.host.addClass(c)}}})})(jQuery); /* jQWidgets v2.8.0 (2013-Mar-22) Copyright (c) 2011-2013 jQWidgets. License: http://jqwidgets.com/license/ */ (function(a){a.jqx.jqxWidget("jqxCalendar","",{});a.extend(a.jqx._jqxCalendar.prototype,{defineInstance:function(){this.disabled=false;this.multipleMonthRows=1;this.multipleMonthColumns=1;if(this.minDate==undefined){this.minDate=a.jqx._jqxDateTimeInput.getDateTime(new Date());this.minDate._setYear(1900);this.minDate._setMonth(1);this.minDate._setDay(1);this.minDate._setHours(0);this.minDate._setMinutes(0);this.minDate._setSeconds(0);this.minDate._setMilliseconds(0)}if(this.maxDate==undefined){this.maxDate=a.jqx._jqxDateTimeInput.getDateTime(new Date());this.maxDate._setYear(2100);this.maxDate._setMonth(1);this.maxDate._setDay(1);this.maxDate._setHours(0);this.maxDate._setMinutes(0);this.maxDate._setSeconds(0);this.maxDate._setMilliseconds(0)}this.navigationDelay=400;if(this.stepMonths===undefined){this.stepMonths=1}this.width=null;this.height=null;if(this.value===undefined){this.value=a.jqx._jqxDateTimeInput.getDateTime(new Date());this.value._setHours(0);this.value._setMinutes(0);this.value._setSeconds(0);this.value._setMilliseconds(0)}this.firstDayOfWeek=0;this.showWeekNumbers=false;this.showDayNames=true;this.enableWeekend=false;this.enableOtherMonthDays=true;this.showOtherMonthDays=true;this.rowHeaderWidth=25;this.columnHeaderHeight=20;this.titleHeight=25;this.dayNameFormat="firstTwoLetters";this.monthNameFormat="default";this.titleFormat=["MMMM yyyy","yyyy","yyyy","yyyy"];this.enableViews=true;if(this.readOnly===undefined){this.readOnly=false}if(this.culture==undefined){this.culture="default"}if(this.enableFastNavigation==undefined){this.enableFastNavigation=true}if(this.enableHover==undefined){this.enableHover=true}if(this.enableAutoNavigation==undefined){this.enableAutoNavigation=true}if(this.enableTooltips===undefined){this.enableTooltips=false}this.backText="Back";this.forwardText="Forward";if(this.specialDates===undefined){this.specialDates=new Array()}this.keyboardNavigation=true;this.selectionMode="default";this.todayString="Today";this.clearString="Clear";this.showFooter=false;this.selection={from:null,to:null};this.canRender=true;this._checkForHiddenParent=true;this.height=null;this.rtl=false;this.view="month";this.localization={backString:"Back",forwardString:"Forward",todayString:"Today",clearString:"Clear",calendar:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss"}}};this.events=["backButtonClick","nextButtonClick","valuechanged","cellMouseDown","cellMouseUp","cellSelected","cellUnselected","change","viewChange"]},createInstance:function(e){this.setCalendarSize();if(this.element.id===""){this.element.id=a.jqx.utilities.createId()}this.host.attr("data-role","calendar");var i=this.element.id;var h=this;this.propertyChangeMap.width=function(j,l,k,m){h.setCalendarSize()};this.propertyChangeMap.height=function(j,l,k,m){h.setCalendarSize()};if(a.global){a.global.preferCulture(this.culture)}if(this.culture!="default"){if(a.global){a.global.preferCulture(this.culture);this.localization.calendar=a.global.culture.calendar}else{if(Globalize){var c=Globalize.culture(this.culture);this.localization.calendar=c.calendar}}this.firstDayOfWeek=this.localization.calendar.firstDay}if(this.localization.backString){this.backText=this.localization.backString}if(this.localization.forwardString){this.forwardText=this.localization.forwardString}if(this.localization.todayString){this.todayString=this.localization.todayString}if(this.localization.clearString){this.clearString=this.localization.clearString}if(!this.host.attr("tabIndex")){this.host.attr("tabIndex",0)}this.host.css("outline","none");this.host.addClass(this.toThemeProperty("jqx-calendar"));this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this.host.addClass(this.toThemeProperty("jqx-rc-all"));this._addInput();this.addHandler(this.host,"keydown",function(k){var j=true;if(h.keyboardNavigation){if(h._handleKey!=undefined){j=h._handleKey(k);if(!j){if(k.stopPropagation){k.stopPropagation()}if(k.preventDefault){k.preventDefault()}}}}return j});var d=false;var g=this;var b=false;if(h.width!=null&&h.width.toString().indexOf("%")!=-1){b=true}if(h.height!=null&&h.height.toString().indexOf("%")!=-1){b=true}this.addHandler(a(window),"resize.calendar"+this.element.id,function(){var j=g.host.find("#View"+h.element.id);if(!d){d=true;g.render()}else{g.refreshTitle(j)}if(b){if(h.refreshTimer){clearTimeout(h.refreshTimer)}h.refreshTimer=setTimeout(function(){h.refreshControl()},1)}});var f="View";this.propertyChangeMap.disabled=function(j,l,k,m){if(m){j.host.addClass(h.toThemeProperty("jqx-fill-state-disabled"))}else{j.host.removeClass(h.toThemeProperty("jqx-fill-state-disabled"))}h.refreshControl()}},_addInput:function(){var b=this.host.attr("name");if(!b){b=this.element.id}this.input=a("");this.host.append(this.input);this.input.attr("name",b);this.input.val(this.getDate().toString())},setCalendarSize:function(){if(this.width!=null&&this.width.toString().indexOf("px")!=-1){this.host.width(this.width)}else{if(this.width!=undefined&&!isNaN(this.width)){this.host.width(this.width)}}if(this.width!=null&&this.width.toString().indexOf("%")!=-1){this.host.css("width",this.width)}if(this.height!=null&&this.height.toString().indexOf("px")!=-1){this.host.height(this.height)}else{if(this.height!=undefined&&!isNaN(this.height)){this.host.height(this.height)}}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){this.host.css("height",this.height)}},_getYearAndMonthPart:function(c){var b=new Date(c.getFullYear(),c.getMonth(),1);return b},_handleKey:function(p){if(this.readOnly){return true}var z=p.keyCode;var x=this;var b=this._getSelectedDate();if(b==undefined){return true}if(p.altKey){return true}if(this._animating){return false}if(this.view!="month"&&z==13){var d=this._getSelectedCell();this._setDateAndSwitchViews(d)}if(this.view=="year"){var v=b.getMonth();var j=this._getYearAndMonthPart(this.getMinDate());var m=this._getYearAndMonthPart(this.getMaxDate());switch(z){case 37:if(v==0){var h=new Date(b.getFullYear()-1,11,1);if(h>=j){this.selectedDate=h;this.navigateBackward()}else{if(this.selectedDate!=j){this.selectedDate=j;this.navigateBackward()}}}else{var h=new Date(b.getFullYear(),v-1,1);if(h>=j){this._selectDate(h,"key")}}return false;case 38:var h=new Date(b.getFullYear(),v-4,1);if(hm){h=m}if(v+4>11){this.selectedDate=h;this.navigateForward()}else{this._selectDate(h,"key")}return false;case 39:if(v==11){var h=new Date(b.getFullYear()+1,0,1);if(h<=m){this.selectedDate=h;this.navigateForward()}else{if(this.selectedDate!=m){this.selectedDate=m;this.navigateForward()}}}else{var h=new Date(b.getFullYear(),v+1,1);if(h<=m){this._selectDate(h,"key")}}return false}return true}if(this.view=="decade"){var o=this._renderStartDate.getFullYear();var k=this._renderEndDate.getFullYear();var n=b.getFullYear();var u=this.getMinDate().getFullYear();var c=this.getMaxDate().getFullYear();switch(z){case 37:if(n-1>=u){if(n<=o){this.selectedDate=new Date(n-1,b.getMonth(),1);this.navigateBackward()}else{this._selectDate(new Date(n-1,b.getMonth(),1),"key")}}return false;case 38:var w=n-4;if(n-4c){w=c}if(w>k){this.selectedDate=new Date(w,b.getMonth(),1);this.navigateForward()}else{this._selectDate(new Date(w,b.getMonth(),1),"key")}return false;case 39:if(n+1<=c){if(n==k){this.selectedDate=new Date(n+1,b.getMonth(),1);this.navigateForward()}else{this._selectDate(new Date(n+1,b.getMonth(),1),"key")}}return false}return true}var t=new a.jqx._jqxDateTimeInput.getDateTime(b);var f=this.getViewStart();var e=this.getViewEnd();var s=a.data(this.element,"View"+this.element.id);if(s==undefined||s==null){return true}if(z==36){t._setDay(1);this._selectDate(t.dateTime,"key");return false}if(z==35){var r=this.value._daysInMonth(this.value.year,this.value.month);t._setDay(r);this._selectDate(t.dateTime,"key");return false}var g=1;if(p.ctrlKey){g=12}if(z==34){var y=this.navigateForward(g);if(y){t._addMonths(g);this._selectDate(t.dateTime,"key")}return false}if(z==33){var y=this.navigateBackward(g);if(y){t._addMonths(-g);this._selectDate(t.dateTime,"key")}return false}if(z==38){t._addDays(-7);if(t.dateTimethis.getMaxDate()){return false}if(t.dateTime>e){var y=this.navigateForward();if(!y){return false}}this._selectDate(t.dateTime,"key");for(var q=0;q=t.dateTime){this.value.day=l.getDate();this.navigateForward();this._selectDate(t.dateTime,"key");break}}return false}}if(z==37){t._addDays(-1);if(t.dateTimethis.getMaxDate()){return false}this.navigateBackward();this._selectDate(t.dateTime,"key");break}}return false}else{if(z==39){t._addDays(1);if(t.dateTime>this.getMaxDate()){return false}if(t.dateTime>e){var y=this.navigateForward();if(!y){return false}}this._selectDate(t.dateTime,"key");for(var q=0;q=t.dateTime){if(t.dateTimethis.getMaxDate()){return false}this.navigateForward();this._selectDate(t.dateTime,"key");break}}return false}}return true},render:function(){if(!this.canRender){return}this.host.children().remove();var c=this._renderSingleCalendar("View"+this.element.id);var b=this;if(this._checkForHiddenParent){if(!this._hiddenParentTimer){if(a.jqx.isHidden(this.host)){this._hiddenParentTimer=setInterval(function(){if(!a.jqx.isHidden(b.host)){try{clearInterval(b._hiddenParentTimer);b.updateSize();b._hiddenParentTimer=0}catch(d){}}},10)}}}this.host.append(c)},addSpecialDate:function(b,c,d){if(this.multipleMonthRows==1&&this.multipleMonthColumns==1){var e=this.specialDates.length;this.specialDates[e]={Date:b,Class:c,Tooltip:d};this.refreshControl()}},refresh:function(b){this.render()},invalidate:function(){this.refreshControl()},refreshControl:function(){if(this.multipleMonthRows==1&&this.multipleMonthColumns==1){this.refreshSingleCalendar("View"+this.element.id,null)}},getViewStart:function(){var c=this.getVisibleDate();var b=this.getFirstDayOfWeek(c);return b.dateTime},getViewEnd:function(){var c=this.getViewStart();var b=new a.jqx._jqxDateTimeInput.getDateTime(c);b._addDays(41);return b.dateTime},refreshSingleCalendar:function(f,e){if(!this.canRender){return}var h=this.host.find("#"+f);var d=this.getVisibleDate();var b=this.getFirstDayOfWeek(d);this.refreshCalendarCells(h,b,f);this.refreshTitle(h);this.refreshRowHeader(h,f);if(this.selectedDate!=undefined){this._selectDate(this.selectedDate)}var g=this.host.height()-this.titleHeight-this.columnHeaderHeight;if(!this.showDayNames){g=this.host.height()-this.titleHeight}if(this.showFooter){g-=20}var c=h.find("#cellsTable"+f);var i=h.find("#calendarRowHeader"+f);c.height(g);i.height(g)},refreshRowHeader:function(l,g){if(!this.showWeekNumbers){return}var h=this.getVisibleDate();var c=this.getFirstDayOfWeek(h);var f=c.dayOfWeek;var r=this.getWeekOfYear(c);var m=l.find("#rowHeader");m.width(this.rowHeaderWidth);var d=c;var q=new Array();for(var j=0;j<6;j++){var e=r.toString();var p=new a.jqx._jqxCalendar.cell(d.dateTime);var k=j+1;var o=m.find("#headerCell"+k);p.element=o;p.row=j;p.column=0;var b=o.find("#headerCellContent"+k);b.addClass(this.toThemeProperty("jqx-calendar-row-cell"));b[0].innerHTML=r;q[j]=p;d=new a.jqx._jqxDateTimeInput.getDateTime(new Date(d._addWeeks(1)));r=this.getWeekOfYear(d)}var n=a.data(this.element,l[0].id);n.rowCells=q;this._refreshOtherMonthRows(n,g)},_refreshOtherMonthRows:function(f,e){if(this.showOtherMonthDays){return}this._displayLastRow(true,e);this._displayFirstRow(true,e);var d=false;var g=false;for(var c=0;c=f.cells.length-7){g=true}}}if(!d){this._displayFirstRow(false,e)}if(!g){this._displayLastRow(false,e)}},_displayLastRow:function(b,c){var g=this.host.find("#"+c);var f=g.find("#calendarRowHeader"+g[0].id);var d=f.find("#headerCellContent6");var e=g.find("#cellsTable"+g[0].id).find("#row6");if(b){d.css("display","block");e.css("display","table-row")}else{d.css("display","none");e.css("display","none")}},_displayFirstRow:function(b,c){var e=this.host.find("#"+c);var d=e.find("#calendarRowHeader"+e[0].id);var f=d.find("#headerCellContent1");var g=e.find("#cellsTable"+e[0].id).find("#row1");if(b){f.css("display","block");g.css("display","table-row")}else{f.css("display","none");g.css("display","none")}},_renderSingleCalendar:function(o,j){if(!this.canRender){return}var l=this.host.find("#"+o.toString());if(l!=null){l.remove()}var r=a("
");var b=this.getVisibleDate();var k=this.getFirstDayOfWeek(b);var e=new a.jqx._jqxDateTimeInput.getDateTime(k.dateTime);e._addMonths(1);var q=a.jqx._jqxCalendar.monthView(k,e,null,null,null,r);if(j==undefined||j==null){this.host.append(r);if(this.height!=undefined&&!isNaN(this.height)){r.height(this.height)}else{if(this.height!=null&&this.height.toString().indexOf("px")!=-1){r.height(this.height)}}if(this.width!=undefined&&!isNaN(this.width)){r.width(this.width)}else{if(this.width!=null&&this.width.toString().indexOf("px")!=-1){r.width(this.width)}}if(this.width!=null&&this.width.toString().indexOf("%")!=-1){r.width("100%")}if(this.height!=null&&this.height.toString().indexOf("%")!=-1){r.height("100%")}}else{j.append(r)}a.data(this.element,o,q);var p=this.host.height()-this.titleHeight-this.columnHeaderHeight;if(!this.showDayNames){p=this.host.height()-this.titleHeight}if(this.showFooter){p-=20}if(this.rowHeaderWidth<0){this.rowHeaderWidth=0}if(this.columnHeaderHeight<0){this.columnHeaderHeight=0}if(this.titleHeight<0){this.titleHeight=0}var f=this.rowHeaderWidth;var i=this.columnHeaderHeight;if(!this.showWeekNumbers){f=0}if(!this.showDayNames){i=0}var t=a("
");t.addClass(this.toThemeProperty("jqx-calendar-title-container"));r.append(t);var c=a("
");var d=20;var n=a("
");if(this.showFooter){n.css("display","block")}r.append(c);r.append(n);c.addClass(this.toThemeProperty("jqx-calendar-month"));this._footer=n;this.header=r.find("#calendarHeader");this.header[0].id="calendarHeader"+o;this.columnHeader=r.find("#calendarColumnHeader");this.columnHeader[0].id="calendarColumnHeader"+o;this.table=r.find("#cellsTable");this.table[0].id="cellsTable"+o;this.rowHeader=r.find("#calendarRowHeader");this.rowHeader[0].id="calendarRowHeader"+o;this.selectCell=r.find("#selectCell");this.selectCell[0].id="selectCell"+o;this.title=r.find("#calendarTitle");this.title[0].id="calendarTitle"+o;this.leftButton=r.find("#leftNavigationArrow");this.leftButton[0].id="leftNavigationArrow"+o;this.titleHeader=r.find("#calendarTitleHeader");this.titleHeader[0].id="calendarTitleHeader"+o;this.rightButton=r.find("#rightNavigationArrow");this.rightButton[0].id="rightNavigationArrow"+o;this.footer=r.find("#calendarFooter");this.footer[0].id="calendarFooter"+o;this.todayButton=r.find("#todayButton");this.todayButton[0].id="todayButton"+o;this.doneButton=r.find("#doneButton");this.doneButton[0].id="doneButton"+o;r.find("tr").addClass(this.toThemeProperty("jqx-reset"));r.addClass(this.toThemeProperty("jqx-widget-content"));r.addClass(this.toThemeProperty("jqx-calendar-month-container"));this.month=r;this.selectCell.addClass(this.toThemeProperty("jqx-reset"));this.selectCell.addClass(this.toThemeProperty("jqx-calendar-top-left-header"));if(this.showWeekNumbers){this._renderRowHeader(r)}else{this.table[0].colSpan=3;this.columnHeader[0].colSpan=3;this.rowHeader.css("display","none");this.selectCell.css("display","none")}if(this.showFooter){this.footer.height(20);var h=a(""+this.todayString+"");h.appendTo(this.todayButton);var g=a(""+this.clearString+"");g.appendTo(this.doneButton);g.addClass(this.toThemeProperty("jqx-calendar-footer"));h.addClass(this.toThemeProperty("jqx-calendar-footer"));var m=this;this.addHandler(h,"click",function(){m.setDate(new Date(),"mouse");if(m.today){m.today()}});this.addHandler(g,"click",function(){m.setDate(null,"mouse");if(m.clear){m.clear()}})}if(this.view!="month"){this.header.hide()}if(this.showDayNames&&this.view=="month"){this.renderColumnHeader(r)}this.renderCalendarCells(r,k,o);if(j==undefined||j==null){this.renderTitle(r)}this._refreshOtherMonthRows(q,o);r.find("tbody").css({border:"none",background:"transparent"});if(this.selectedDate!=undefined){this._selectDate(this.selectedDate)}var s=this;this.addHandler(this.host,"focus",function(){s.focus()});return r},_getTitleFormat:function(){switch(this.view){case"month":return this.titleFormat[0];case"year":return this.titleFormat[1];case"decade":return this.titleFormat[2];case"centuries":return this.titleFormat[3]}},renderTitle:function(t){var k=a("
");var l=a("
");var o=this.title;o.addClass(this.toThemeProperty("jqx-reset"));o.addClass(this.toThemeProperty("jqx-widget-header"));o.addClass(this.toThemeProperty("jqx-calendar-title-header"));var e=o.find("td");if(a.jqx.browser.msie&&a.jqx.browser.version<8){if(e.css("background-color")!="transparent"){var g=o.css("background-color");e.css("background-color",g)}if(e.css("background-image")!="transparent"){var d=o.css("background-image");var p=o.css("background-repeat");var c=o.css("background-position");e.css("background-image",d);e.css("background-repeat",p);e.css("background-position","left center scroll")}}else{e.css("background-color","transparent")}if(this.disabled){o.addClass(this.toThemeProperty("jqx-calendar-title-header-disabled"))}k.addClass(this.toThemeProperty("jqx-calendar-title-navigation"));k.addClass(this.toThemeProperty("jqx-icon-arrow-left"));k.appendTo(this.leftButton);var m=this.leftButton;l.addClass(this.toThemeProperty("jqx-calendar-title-navigation"));l.addClass(this.toThemeProperty("jqx-icon-arrow-right"));l.appendTo(this.rightButton);var b=this.rightButton;if(this.enableTooltips){if(a(m).jqxTooltip){a(m).jqxTooltip({name:this.element.id,position:"mouse",theme:this.theme,content:this.backText});a(b).jqxTooltip({name:this.element.id,position:"mouse",theme:this.theme,content:this.forwardText})}}var n=this.titleHeader;var v=this._format(this.value.dateTime,this._getTitleFormat(),this.culture);if(this.view=="decade"){var q=this._format(this._renderStartDate,this._getTitleFormat(),this.culture);var j=this._format(this._renderEndDate,this._getTitleFormat(),this.culture);v=q+" - "+j}else{if(this.view=="centuries"){var q=this._format(this._renderCenturyStartDate,this._getTitleFormat(),this.culture);var j=this._format(this._renderCenturyEndDate,this._getTitleFormat(),this.culture);v=q+" - "+j}}var f=a("
"+v+"
");n.append(f);f.addClass(this.toThemeProperty("jqx-calendar-title-content"));var s=parseInt(k.width());var i=t.width()-2*s;var r=n.find("#titleContent").width(i);a.data(k,"navigateLeft",this);a.data(l,"navigateRight",this);var h=a.jqx.mobile.isTouchDevice();if(!this.disabled){var u=this;this.addHandler(n,"mousedown",function(A){if(u.enableViews){if(!u._viewAnimating&&!u._animating){var x=u.view;switch(u.view){case"month":u.view="year";break;case"year":u.view="decade";break}if(x!=u.view){var z="View"+u.element.id;var B=u.host.find("#"+z);var y=u.getVisibleDate();var w=u.getFirstDayOfWeek(y);u.renderCalendarCells(B,w,z,true);u.refreshTitle(B)}}return false}});this.addHandler(k,"mousedown",function(x){if(!u._animating){a.data(k,"navigateLeftRepeat",true);var w=a.data(k,"navigateLeft");if(w.enableFastNavigation&&!h){w.startRepeat(w,k,true,500)}w.navigateBackward();return w._raiseEvent(0,x)}else{return false}});this.addHandler(k,"mouseup",function(w){a.data(k,"navigateLeftRepeat",false)});this.addHandler(k,"mouseleave",function(w){a.data(k,"navigateLeftRepeat",false)});this.addHandler(l,"mousedown",function(x){if(!u._animating){a.data(l,"navigateRightRepeat",true);var w=a.data(l,"navigateRight");if(w.enableFastNavigation&&!h){w.startRepeat(w,l,false,500)}w.navigateForward();return w._raiseEvent(1,x)}else{return false}});this.addHandler(l,"mouseup",function(w){a.data(l,"navigateRightRepeat",false)});this.addHandler(l,"mouseleave",function(w){a.data(l,"navigateRightRepeat",false)})}},refreshTitle:function(f){var g=this._format(this.value.dateTime,this._getTitleFormat(),this.culture);if(this.view=="decade"){var d=this._format(this._renderStartDate,this._getTitleFormat(),this.culture);var b=this._format(this._renderEndDate,this._getTitleFormat(),this.culture);g=d+" - "+b}else{if(this.view=="centuries"){var d=this._format(this._renderCenturyStartDate,this._getTitleFormat(),this.culture);var b=this._format(this._renderCenturyEndDate,this._getTitleFormat(),this.culture);g=d+" - "+b}}var e=this.titleHeader;if(this.titleHeader){var c=e.find("#titleContent");var h=a("
"+g+"
");e.append(h);h.addClass(this.toThemeProperty("jqx-calendar-title-content"));if(c!=null){c.remove()}}},startRepeat:function(d,b,f,e){var c=window.setTimeout(function(){var g=a.data(b,"navigateLeftRepeat");if(!f){g=a.data(b,"navigateRightRepeat")}if(g){if(e<25){e=25}if(f){d.navigateBackward();d.startRepeat(d,b,true,e)}else{d.navigateForward();c=d.startRepeat(d,b,false,e)}}else{window.clearTimeout(c);return}},e)},navigateForward:function(g){if(g==undefined||g==null){g=this.stepMonths}var f=this.value.year;if(this.view=="decade"){f=this._renderStartDate.getFullYear()+12;if(this._renderEndDate.getFullYear()>=this.getMaxDate().getFullYear()){return}}else{if(this.view=="year"){f=this.value.year+1}else{if(this.view=="centuries"){f=this.value.year+100}}}if(this.view!="month"){var b=this.getMaxDate().getFullYear();if(bb){f=b}if(this.value.year==f){return}this.value.year=f;this.value.month=1;this.value.day=1}var c=this.value.day;var h=this.value.month;if(h+g<=12){var e=this.value._daysInMonth(this.value.year,this.value.month+g);if(c>e){c=e}}if(this.view=="month"){var d=new Date(this.value.year,this.value.month-1+g,c)}else{var d=new Date(this.value.year,this.value.month-1,c)}return this.navigateTo(d)},navigateBackward:function(f){if(f==undefined||f==null){f=this.stepMonths}var e=this.value.year;if(this.view=="decade"){e=this._renderStartDate.getFullYear()-12}else{if(this.view=="year"){e=this.value.year-1}else{if(this.view=="centuries"){e=this.value.year-100}}}if(this.view!="month"){var h=this.getMinDate().getFullYear();if(e=1){var d=this.value._daysInMonth(this.value.year,this.value.month-f);if(b>d){b=d}}if(this.view=="month"){var c=new Date(this.value.year,this.value.month-1-f,b)}else{var c=new Date(this.value.year,this.value.month-1,b)}return this.navigateTo(c)},refreshCalendarCells:function(x,f,m){if(this.view=="year"||this.view=="decade"||this.view=="centuries"){this.refreshViews(x,f,m);return}var s=this.table;var q=s.find("#cellTable"+m.toString());var e=f;var c=new Array();var n=0;var u=new a.jqx._jqxDateTimeInput.getDateTime(new Date());for(var p=0;p<6;p++){for(var o=0;o<7;o++){var d=p+1;var h=o;if(this.rtl){h=6-h}var t=h+1;var l="#cell"+d+t;var w=new Date(e.dateTime.getFullYear(),e.dateTime.getMonth(),e.dateTime.getDate());var b=new a.jqx._jqxCalendar.cell(w);var g=q.find(l);b.element=g;b.row=p;b.column=o;b.isVisible=true;b.isOtherMonth=false;b.isToday=false;b.isWeekend=false;b.isHighlighted=false;b.isSelected=false;if(e.month!=this.value.month){b.isOtherMonth=true;b.isVisible=this.showOtherMonthDays}if(wthis.getMaxDate()){b.isDisabled=true}if(e.month==u.month&&e.day==u.day&&e.year==u.year){b.isToday=true}if(e.isWeekend()){b.isWeekend=true}a.data(this.element,"cellContent"+l.substring(1),b);a.data(this.element,l.substring(1),b);c[n]=b;n++;a.jqx.utilities.html(g,e.day);this._applyCellStyle(b,g,g);e=new a.jqx._jqxDateTimeInput.getDateTime(new Date(e._addDays(1)))}}var v=a.data(this.element,x[0].id);if(v!=undefined&&v!=null){v.cells=c}this.renderedCells=c;this._refreshOtherMonthRows(v,m)},_getDecadeAndCenturiesData:function(){var k=new Array();var p=new Array();var c=this.getMaxDate().getFullYear()-this.getMinDate().getFullYear();if(c<12){c=12}var f=this.getMinDate();var b=this.getMaxDate();var l=this.value.dateTime.getFullYear();if(this.view=="decade"){if(l+12>b.getFullYear()){l=b.getFullYear()-11}if(l=f.getFullYear()&&n.getFullYear()<=b.getFullYear()){k.push("-"+n.getFullYear()+"-"+(n.getFullYear()+9));p.push(n);if(e==0){this._renderCenturyStartDate=n}this._renderCenturyEndDate=new Date(n.getFullYear()+9,0,1)}}break}}}}return{years:k,dates:p}},refreshViews:function(A,m,s){var B=this;var c=new Array();var w=A.find("#cellTable"+s.toString());var D=this._getDecadeAndCenturiesData();var l=D.years;var C=D.dates;var t=0;var f=this.getMinDate();var n=this.getMaxDate();for(var v=0;v<3;v++){for(var u=0;u<4;u++){var d=v+1;var q=u;if(this.rtl){q=3-q}var x=q+1;var z=new Date(this.value.dateTime);z.setMonth(v*4+q);var b=new a.jqx._jqxCalendar.cell(z);var e=w[0].rows["row"+(1+v)+this.element.id];var o=a(e.cells[u]);b.isVisible=true;b.element=o;b.row=v;b.column=u;b.index=c.length;var p="";if(this.view=="year"){var h=this.localization.calendar.months.names;var g=h[v*4+q];switch(this.monthNameFormat){case"default":g=this.localization.calendar.months.namesAbbr[v*4+q];break;case"shortest":g=this.localization.calendar.months.namesShort[v*4+q];break;case"firstTwoLetters":g=g.substring(0,2);break;case"firstLetter":g=g.substring(0,1);break}p=g}else{if(this.view=="decade"||this.view=="centuries"){p=l[v*4+q];if(undefined==p){p="2013"}b.setDate(C[v*4+q])}}var z=b.getDate();if(this.view=="year"){if(this._getYearAndMonthPart(z)this._getYearAndMonthPart(n)){b.isDisabled=true}}else{if(z.getFullYear()n.getFullYear()){b.isDisabled=true}}a.jqx.utilities.html(o,p);c[t]=b;t++}}var y=a.data(this.element,A[0].id);if(y!=undefined&&y!=null){y.cells=c}this.renderedCells=c;this._applyCellStyles()},_createViewClone:function(){var b=this.host.find(".jqx-calendar-month");var c=b.clone();c.css("position","absolute");c.css("top",b.position().top);return c},_addCellsTable:function(h,g){var e=this;var c=this.showFooter?20:0;if(this.view!="month"){g.height(this.host.height()-this.titleHeight)}else{g.height(this.host.height()-this.titleHeight-this.columnHeaderHeight-c)}this._viewAnimating=true;var b=this.host.find(".jqx-calendar-month-container");b.css("position","relative");var d=this.host.find(".jqx-calendar-month");var f=this._createViewClone();b.append(f);if(this.view!="month"){this.header.fadeOut(0);if(this.showWeekNumbers){this.rowHeader.fadeOut(0)}if(this.showFooter){this._footer.fadeOut(0)}}else{this.header.fadeIn(this.navigationDelay+200);if(this.showWeekNumbers){this.rowHeader.fadeIn(this.navigationDelay+200)}if(this.showFooter){this._footer.fadeIn(this.navigationDelay+200)}}h.children().remove();h.append(g);this._animateViews(f,g,function(){if(!e.selectedDate){e.selectedDate=e.renderedCells[0].getDate()}try{e.renderedCells[0].element.focus();setTimeout(function(){e.renderedCells[0].element.focus()},10)}catch(i){}e._viewAnimating=false});g.addClass(this.toThemeProperty("jqx-calendar-view"))},_animateViews:function(c,b,e){var d=this;d._viewAnimating=true;c.fadeOut(this.navigationDelay+100,function(){c.remove()});b.fadeOut(0);b.fadeIn(this.navigationDelay+200,function(){e()})},focus:function(){try{if(this.renderedCells&&this.renderedCells.length>0){var d=this;var c=false;if(!d.selectedDate&&d.selectionMode!="range"){this.setDate(new Date(),"mouse")}this.element.focus()}}catch(b){}},renderViews:function(C,m,t){var D=this;var c=new Array();var x=a("
");var p=this.host.find(".jqx-calendar-month-container");p.css("position","relative");var y=C.find("#cellsTable"+C[0].id);var F=this._getDecadeAndCenturiesData();var l=F.years;var E=F.dates;var u=0;var f=this.getMinDate();var n=this.getMaxDate();for(var w=0;w<3;w++){for(var v=0;v<4;v++){var d=w+1;var s=v;if(this.rtl){s=3-s}var z=s+1;var e=x[0].rows["row"+(1+w)+this.element.id];var B=new Date(this.value.dateTime);B.setMonth(w*4+s);var b=new a.jqx._jqxCalendar.cell(B);var o=a(e.cells[v]);b.isVisible=true;b.element=o;b.row=w;b.column=v;b.index=c.length;var q="";if(this.view=="year"){if(B.getMonth()==this.getDate().getMonth()){b.isSelected=true}var h=this.localization.calendar.months.names;var g=h[w*4+s];switch(this.monthNameFormat){case"default":g=this.localization.calendar.months.namesAbbr[w*4+s];break;case"shortest":g=this.localization.calendar.months.namesShort[w*4+s];break;case"firstTwoLetters":g=g.substring(0,2);break;case"firstLetter":g=g.substring(0,1);break}q=g}else{if(this.view=="decade"||this.view=="centuries"){q=l[w*4+s];b.setDate(E[w*4+s]);if(b.getDate().getFullYear()==this.getDate().getFullYear()){b.isSelected=true}if(undefined==q){q="2013"}}}var B=b.getDate();if(this.view=="year"){if(this._getYearAndMonthPart(B)this._getYearAndMonthPart(n)){b.isDisabled=true}}else{if(B.getFullYear()n.getFullYear()){b.isDisabled=true}}a.jqx.utilities.html(o,q);c[u]=b;u++}}a.each(c,function(){var j=this.element;var i=this;if(!D.disabled){D.addHandler(j,"mousedown",function(k){D._setDateAndSwitchViews(i)});D.addHandler(j,"mouseover",function(r){var k=D.renderedCells[i.index];if(D.view!="centuries"&&k.element.html().toLowerCase().indexOf("span")!=-1){return}k.isHighlighted=true;D._applyCellStyle(k,k.element,k.element)});D.addHandler(j,"mouseout",function(r){var k=D.renderedCells[i.index];if(D.view!="centuries"&&k.element.html().toLowerCase().indexOf("span")!=-1){return}k.isHighlighted=false;D._applyCellStyle(k,k.element,k.element)})}});var A=a.data(this.element,C[0].id);if(A!=undefined&&A!=null){A.cells=c}this.renderedCells=c;this._addCellsTable(y,x);this._applyCellStyles()},_setDateAndSwitchViews:function(b){if(!this._viewAnimating&&!this._animating){var d=this.renderedCells[b.index].getDate();var g=this.getMinDate();var h=this.getMaxDate();if(this.view=="year"){if(this._getYearAndMonthPart(d)this._getYearAndMonthPart(h)){return}}else{if(d.getFullYear()h.getFullYear()){return}}this._selectDate(d);switch(this.view){case"year":this.view="month";break;case"decade":this.view="year";break}if(this.view=="year"){if(this._getYearAndMonthPart(d)this._getYearAndMonthPart(h)){d=h}}else{if(d.getFullYear()h.getFullYear()){d=h}}this.value._setYear(d.getFullYear());this.value._setDay(d.getDate());this.value._setMonth(d.getMonth()+1);var f=this.getVisibleDate();var c=this.getFirstDayOfWeek(f);var e="View"+this.element.id;this.renderCalendarCells(this.month,c,e,true);this.refreshTitle(this.month);this._selectDate(d,"view")}},renderCalendarCells:function(D,m,s,q){if(this.view=="year"||this.view=="decade"||this.view=="centuries"){this.renderViews(D,m,s);return}var x=a("
");var y=this.table;if(q==undefined){var g=y.find("#cellTable"+s.toString());if(g!=null){g.remove()}y.append(x)}var l=m;var b=this.showDayNames?1:0;var f=this.showWeekNumbers?1:0;var d=new Array();var t=0;var v=(D.width()-this.rowHeaderWidth-2)/7;if(!this.showWeekNumbers){v=(D.width()-2)/7}v=parseInt(v);var A=new a.jqx._jqxDateTimeInput.getDateTime(new Date());for(var w=0;w<6;w++){for(var u=0;u<7;u++){var e=w+1;var o=u;if(this.rtl){o=6-o}var z=o+1;var p="#cell"+e+z;var C=new Date(l.dateTime.getFullYear(),l.dateTime.getMonth(),l.dateTime.getDate());var c=new a.jqx._jqxCalendar.cell(C);var n=x.find(p);c.isVisible=true;c.isDisabled=false;if(l.month!=this.value.month){c.isOtherMonth=true;c.isVisible=this.showOtherMonthDays}if(Cthis.getMaxDate()){c.isDisabled=true}if(l.month==A.month&&l.day==A.day&&l.year==A.year){c.isToday=true}if(l.isWeekend()){c.isWeekend=true}c.element=n;c.row=b;c.column=f;a.jqx.utilities.html(n,l.day);l=new a.jqx._jqxDateTimeInput.getDateTime(new Date(l._addDays(1)));a.data(this.element,"cellContent"+p.substring(1),c);a.data(this.element,""+p.substring(1),c);var E=this;this.addHandler(n,"mousedown",function(G){if(!E.readOnly&&!E.disabled){var F=a(G.target);var j=a.data(E.element,F[0].id);var i=E._raiseEvent(3,G);if(j!=null&&j!=undefined){var k=j.getDate();if(E.getMinDate()<=k&&k<=E.getMaxDate()){if(!j.isDisabled){if(j.isOtherMonth&&E.enableAutoNavigation){if(j.row<2){E.navigateBackward()}else{E.navigateForward()}E._selectDate(j.getDate(),"mouse",G.shiftKey)}else{E._selectDate(j.getDate(),"mouse",G.shiftKey);E.value._setYear(k.getFullYear());E.value._setDay(k.getDate());E.value._setMonth(k.getMonth()+1);var r=E.host.find(".jqx-calendar-month");r.stop();r.css("margin-left","0px");E._raiseEvent("5",{selectionType:"mouse"});E._raiseEvent("6",{selectionType:"mouse"});E._raiseEvent("2")}}}}return i}});if(!E.disabled){var h=function(F,j){if(!E.readOnly){var r=a(F.target);var i=a.data(E.element,r[0].id);if(i!=null&&i!=undefined){var k=i.getDate();if(E.getMinDate()<=k&&k<=E.getMaxDate()){i.isHighlighted=j;E._applyCellStyle(i,i.element,r)}}}};this.addHandler(n,"mouseenter",function(i){h(i,true);return false});this.addHandler(n,"mouseleave",function(i){h(i,false);return false})}f++;d[t]=c;t++}f=0;b++}var B=a.data(this.element,D[0].id);if(B!=undefined&&B!=null){B.cells=d}this.renderedCells=d;if(q!=undefined){this._addCellsTable(y,x)}this._applyCellStyles();this._refreshOtherMonthRows(B,s)},setMaxDate:function(b){this.maxDate=a.jqx._jqxDateTimeInput.getDateTime(b);this.render()},getMaxDate:function(){if(this.maxDate!=null&&this.maxDate!=undefined){return this.maxDate.dateTime}return null},setMinDate:function(b){this.minDate=a.jqx._jqxDateTimeInput.getDateTime(b);this.render()},getMinDate:function(){if(this.minDate!=null&&this.minDate!=undefined){return this.minDate.dateTime}return null},navigateTo:function(f,h){if(this.view=="month"){var g=this.getMinDate();var c=new Date(this.getMaxDate().getFullYear(),this.getMaxDate().getMonth()+1,this.getMaxDate().getDate());if((fthis._getYearAndMonthPart(c))){return false}}else{if(f.getFullYear()this.getMaxDate().getFullYear()){return false}}if(f==null){return false}if(h==undefined){var i=this;if(this._animating){return}this._animating=true;var d=this.host.find(".jqx-calendar-month-container");if(this._viewClone){this._viewClone.stop();this._viewClone.remove()}if(this._newViewClone){this._newViewClone.stop();this._newViewClone.remove()}var k=this.host.find(".jqx-calendar-month");k.stop();k.css("margin-left","0px");var b=k.clone();this._viewClone=b;var j=new Date(this.value.dateTime);this.value._setYear(f.getFullYear());this.value._setDay(f.getDate());this.value._setMonth(f.getMonth()+1);i.refreshControl();d.css("position","relative");b.css("position","absolute");b.css("top",k.position().top);d.append(b);if(a.jqx.browser.msie&&a.jqx.browser.version<8){this.month.css("position","relative");this.month.css("overflow","hidden");this.table.css("position","relative");this.table.css("overflow","hidden")}var e=-this.host.width();if(fm){u.isDisabled=true}d._applyCellStyle(u,t,j);return true}if(p==0){if(h!="none"){if(d._clicks==undefined){d._clicks=0}d._clicks++;if(b){d._clicks++}if(d._clicks==1){d.selection={from:e,to:e}}else{var s=d.selection.from;var o=s<=e?s:e;var r=s<=e?e:s;var k=new Date(o.getFullYear(),o.getMonth(),o.getDate());var l=new Date(r.getFullYear(),r.getMonth(),r.getDate(),23,59,59);d.selection={from:k,to:l};d._clicks=0}}else{if(d.selection==null||d.selection.from==null){d.selection={from:e,to:e};if(d._clicks==undefined){d._clicks=0}d._clicks++;if(d._clicks==2){d._clicks=0}}}}var n=function(w){if(w==null){return new Date()}var v=new Date();v.setHours(0,0,0,0);v.setFullYear(w.getFullYear(),w.getMonth(),w.getDate());return v};if(!u.isOtherMonth&&n(m).toString()==n(e).toString()){d.value._setMonth(e.getMonth()+1);d.value._setDay(e.getDate());d.value._setYear(e.getFullYear());d._raiseEvent("2");d._raiseEvent("5",{selectionType:h})}u.isSelected=false;u.isDisabled=false;if(n(m)m){u.isDisabled=true}if(n(m)>=n(d.selection.from)&&n(m)<=n(d.selection.to)){u.isSelected=true}}}}d._applyCellStyle(u,t,j)});if(g!=e){d._raiseEvent(7)}},_getSelectedDate:function(){var d=a.data(this.element,"View"+this.element.id);if(d==undefined||d==null){return}if(this.view!="month"){return this.selectedDate}for(var c=0;c0&&e.html().toLowerCase().indexOf("span")!=-1){e.css("cursor","default")}}}e.removeAttr("aria-selected");if(b.isSelected&&b.isVisible){e.addClass(this.toThemeProperty("jqx-calendar-cell-selected"));e.addClass(this.toThemeProperty("jqx-fill-state-pressed"));e.attr("aria-selected",true);this.host.removeAttr("aria-activedescendant").attr("aria-activedescendant",e[0].id)}if(b.isHighlighted&&b.isVisible&&this.enableHover){if(!b.isDisabled){e.addClass(this.toThemeProperty("jqx-calendar-cell-hover"));e.addClass(this.toThemeProperty("jqx-fill-state-hover"))}}e.addClass(this.toThemeProperty("jqx-calendar-cell-"+this.view));if(b.isToday&&b.isVisible){e.addClass(this.toThemeProperty("jqx-calendar-cell-today"))}if(this.specialDates.length>0){var f=this;a.each(this.specialDates,function(){if(this.Class!=undefined&&this.Class!=null&&this.Class!=""){e.removeClass(this.Class)}else{e.removeClass(d.toThemeProperty("jqx-calendar-cell-specialDate"))}var g=b.getDate();if(g.getFullYear()==this.Date.getFullYear()&&g.getMonth()==this.Date.getMonth()&&g.getDate()==this.Date.getDate()){if(b.tooltip==null&&this.Tooltip!=null){b.tooltip=this.Tooltip;if(a(e).jqxTooltip){a(e).jqxTooltip({name:f.element.id,content:this.Tooltip,position:"mouse",theme:f.theme})}}e.removeClass(d.toThemeProperty("jqx-calendar-cell-othermonth"));e.removeClass(d.toThemeProperty("jqx-calendar-cell-weekend"));if(this.Class==undefined||this.Class==""){e.addClass(d.toThemeProperty("jqx-calendar-cell-specialDate"));return false}else{e.addClass(this.Class);return false}}})}},_applyCellStyles:function(){var f=a.data(this.element,"View"+this.element.id);if(f==undefined||f==null){return}for(var e=0;e");t.find("table").addClass(this.toThemeProperty("jqx-reset"));t.find("tr").addClass(this.toThemeProperty("jqx-reset"));t.find("td").css({background:"transparent",padding:1,margin:0,border:"none"});t.addClass(this.toThemeProperty("jqx-reset"));t.addClass(this.toThemeProperty("jqx-calendar-column-header"));this.columnHeader.append(t);var d=this.getVisibleDate();var h=this.getFirstDayOfWeek(d);var m=h.dayOfWeek;var x=this.getWeekOfYear(h);var q=this.firstDayOfWeek;var v=this.localization.calendar.days.names;var n=new Array();var g=h;var o=(w.width()-this.rowHeaderWidth-2)/7;if(!this.showWeekNumbers){o=(w.width()-2)/7}for(var s=0;s<7;s++){var f=v[q];if(this.rtl){f=v[6-q]}switch(this.dayNameFormat){case"default":f=this.localization.calendar.days.namesAbbr[q];break;case"shortest":f=this.localization.calendar.days.namesShort[q];break;case"firstTwoLetters":f=f.substring(0,2);break;case"firstLetter":f=f.substring(0,1);break}var b=new a.jqx._jqxCalendar.cell(g.dateTime);var k=s+1;var l=k;var j=t.find("#columnCell"+l);var p=s;if(this.enableTooltips){if(a(j).jqxTooltip){a(j).jqxTooltip({name:this.element.id,content:v[q],theme:this.theme,position:"mouse"})}}if(q>=6){q=0}else{q++}s=p;b.element=j;b.row=0;b.column=s+1;var e=this._textwidth(f);var c="
"+f+"
";j.append(c);j.find("#columnCell"+l).addClass(this.toThemeProperty("jqx-calendar-column-cell"));j.width(o);if(this.disabled){j.find("#columnCell"+l).addClass(this.toThemeProperty("jqx-calendar-column-cell-disabled"))}if(e>0&&o>0){while(e>j.width()){if(f.length==0){break}f=f.substring(0,f.length-1);a.jqx.utilities.html(j.find("#columnCell"+l),f);e=this._textwidth(f)}}n[s]=b;g=new a.jqx._jqxDateTimeInput.getDateTime(new Date(g._addDays(1)))}if(parseInt(this.columnHeader.width())>parseInt(this.host.width())){this.columnHeader.width(this.host.width())}var u=a.data(this.element,w[0].id);u.columnCells=n},_format:function(d,e,b){var f=false;try{if(Globalize!=undefined){f=true}}catch(c){}if(a.global){a.global.culture.calendar=this.localization.calendar;return a.global.format(d,e,this.culture)}else{if(f){Globalize.cultures[this.culture].calendar=this.localization.calendar;return Globalize.format(d,e,this.culture)}else{if(a.jqx.dataFormat){return a.jqx.dataFormat.formatdate(d,e,this.localization.calendar)}}}},_textwidth:function(d){var c=a(""+d+"");c.addClass(this.toThemeProperty("jqx-calendar-column-cell"));a(this.host).append(c);var b=c.width();c.remove();return b},_textheight:function(d){var c=a(""+d+"");a(this.host).append(c);var b=c.height();c.remove();return b},_renderRowHeader:function(k){var g=this.getVisibleDate();var c=this.getFirstDayOfWeek(g);var f=c.dayOfWeek;var q=this.getWeekOfYear(c);var l=a("
");l.find("table").addClass(this.toThemeProperty("jqx-reset"));l.find("td").addClass(this.toThemeProperty("jqx-reset"));l.find("tr").addClass(this.toThemeProperty("jqx-reset"));l.addClass(this.toThemeProperty("jqx-calendar-row-header"));l.width(this.rowHeaderWidth);this.rowHeader.append(l);var d=c;var p=new Array();for(var h=0;h<6;h++){var e=q.toString();var o=new a.jqx._jqxCalendar.cell(d.dateTime);var j=h+1;var n=l.find("#headerCell"+j);o.element=n;o.row=h;o.column=0;var b="
"+e+"
";n.append(b);n.find("#headerCellContent"+j).addClass(this.toThemeProperty("jqx-calendar-row-cell"));p[h]=o;d=new a.jqx._jqxDateTimeInput.getDateTime(new Date(d._addWeeks(1)));q=this.getWeekOfYear(d)}var m=a.data(this.element,k[0].id);m.rowCells=p},getFirstDayOfWeek:function(e){var d=e;if(this.firstDayOfWeek<0||this.firstDayOfWeek>6){this.firstDayOfWeek=6}var c=d.dayOfWeek-this.firstDayOfWeek;if(c<=0){c+=7}var b=a.jqx._jqxDateTimeInput.getDateTime(d._addDays(-c));return b},getVisibleDate:function(){var c=new a.jqx._jqxDateTimeInput.getDateTime(new Date(this.value.dateTime));if(cthis.maxDate){this.visibleDate=this.maxDate}var d=c.day;var b=a.jqx._jqxDateTimeInput.getDateTime(c._addDays(-d+1));c=b;return c},destroy:function(b){this.host.removeClass();if(b!=false){this.host.remove()}},_raiseEvent:function(i,c){if(c==undefined){c={owner:null}}var e=this.events[i];var f=c?c:{};f.owner=this;var g=new jQuery.Event(e);g.owner=this;g.args=f;if(i==0||i==1||i==2||i==3||i==4||i==5||i==6||i==7||i==8){g.args.date=g.args.selectedDate=this.getDate();g.args.range=this.getRange();var h=this.getViewStart();var d=this.getViewEnd();g.args.view={from:h,to:d}}var b=this.host.trigger(g);if(i==0||i==1){b=false}return b},propertyMap:function(b){if(b=="value"){if(this.selectionMode!="range"){return this.getDate()}else{return this.getRange()}}return null},updateSize:function(){var d=this.host.find("#View"+this.element.id);if(d.length>0){this.setCalendarSize();if(this.height!=undefined&&!isNaN(this.height)){d.height(this.height)}else{if(this.height!=null&&this.height.toString().indexOf("px")!=-1){d.height(this.height)}}if(this.width!=undefined&&!isNaN(this.width)){d.width(this.width)}else{if(this.width!=null&&this.width.toString().indexOf("px")!=-1){d.width(this.width)}}var c=this.host.height()-this.titleHeight-this.columnHeaderHeight;var b="View"+this.element.id;d.find("#cellsTable"+b).height(c);d.find("#calendarRowHeader"+b).height(c);this.refreshControl()}},propertyChangedHandler:function(d,e,g,f){if(this.isInitialized==undefined||this.isInitialized==false){return}if(e=="enableHover"){return}if(e=="keyboardNavigation"){return}if(e=="localization"){if(this.localization){if(this.localization.backString){this.backText=this.localization.backString}if(this.localization.forwardString){this.forwardText=this.localization.forwardString}if(this.localization.todayString){this.todayString=this.localization.todayString}if(this.localization.clearString){this.clearString=this.localization.clearString}this.firstDayOfWeek=this.localization.calendar.firstDay}}if(e=="culture"){try{if(a.global){a.global.preferCulture(d.culture);d.localization.calendar=a.global.culture.calendar}else{if(Globalize){var b=Globalize.culture(d.culture);d.localization.calendar=b.calendar}}}catch(c){}}if(e=="width"||e=="height"){d.updateSize();return}else{if(e=="theme"){a.jqx.utilities.setTheme(g,f,this.host)}else{this.view="month";this.render()}}}})})(jQuery);(function(a){a.jqx._jqxCalendar.cell=function(c){var b={dateTime:new a.jqx._jqxDateTimeInput.getDateTime(c),_date:c,getDate:function(){return this._date},setDate:function(d){this.dateTime=new a.jqx._jqxDateTimeInput.getDateTime(d);this._date=d},isToday:false,isWeekend:false,isOtherMonth:false,isVisible:true,isSelected:false,isHighlighted:false,element:null,row:-1,column:-1,tooltip:null};return b};a.jqx._jqxCalendar.monthView=function(c,h,d,b,f,e){var g={start:c,end:h,cells:d,rowCells:b,columnCells:f,element:e};return g}})(jQuery); /* jQWidgets v2.8.0 (2013-Mar-22) Copyright (c) 2011-2013 jQWidgets. License: http://jqwidgets.com/license/ */ (function(a){a.jqx.jqxWidget("jqxComboBox","",{});a.extend(a.jqx._jqxComboBox.prototype,{defineInstance:function(){this.disabled=false;this.width=null;this.height=null;this.items=new Array();this.selectedIndex=-1;this.source=null;this.scrollBarSize=15;this.arrowSize=18;this.enableHover=true;this.enableSelection=true;this.visualItems=new Array();this.groups=new Array();this.equalItemsWidth=true;this.itemHeight=-1;this.visibleItems=new Array();this.emptyGroupText="Group";this.emptyString="";if(this.openDelay==undefined){this.openDelay=350}if(this.closeDelay==undefined){this.closeDelay=400}this.animationType="default";this.dropDownWidth="auto";this.dropDownHeight="200px";this.autoDropDownHeight=false;this.enableBrowserBoundsDetection=false;this.dropDownHorizontalAlignment="left";this.searchMode="startswithignorecase";this.autoComplete=false;this.remoteAutoComplete=false;this.remoteAutoCompleteDelay=500;this.minLength=2;this.displayMember="";this.valueMember="";this.keyboardSelection=true;this.renderer=null;this.autoOpen=false;this.checkboxes=false;this.promptText="";this.placeHolder="";this.rtl=false;this.listBox=null;this.renderSelectedItem=null;this.search=null;this.popupZIndex=100000;this.searchString=null;this.events=["open","close","select","unselect","change","checkChange","bindingComplete"]},createInstance:function(b){var c=this;if(a.jqx._jqxListBox==null||a.jqx._jqxListBox==undefined){throw new Error("jqxComboBox: Missing reference to jqxlistbox.js.")}if(this.promptText!=""){this.placeHolder=this.promptText}if(this.hiddenParent()){this._hiddenParentTimer=setInterval(function(){try{if(!c.hiddenParent()){c._setSize();clearInterval(c._hiddenParentTimer)}}catch(d){}},10)}this.render()},render:function(){this.removeHandlers();this.isanimating=false;this.id=a.jqx.utilities.createId();this.element.innerHTML="";var d=a("