/*!!!!!!!!!!!!!!!!
* jQuery JavaScript Library v1.3.2
*
* Copyright (c) 2009 John Resig, http://jquery.com/
* 
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
* 
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
* 
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
* Revision: 6246
*/
(function(){var P=this,F,Y=P.jQuery,S=P.$,Z=P.jQuery=P.$=function(a,b){return new Z.fn.init(a,b)},N=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,X=/^.[^:#\[\.,]*$/;Z.fn=Z.prototype={init:function(b,a){b=b||document;if(b.nodeType){this[0]=b;this.length=1;this.context=b;return this}if(typeof b==="string"){var e=N.exec(b);if(e&&(e[1]||!a)){if(e[1]){b=Z.clean([e[1]],a)}else{var c=document.getElementById(e[3]);if(c&&c.id!=e[3]){return Z().find(b)}var d=Z(c||[]);d.context=document;d.selector=b;return d}}else{return Z(a).find(b)}}else{if(Z.isFunction(b)){return Z(document).ready(b)}}if(b.selector&&b.context){this.selector=b.selector;this.context=b.context}return this.setArray(Z.isArray(b)?b:Z.makeArray(b))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(a){return a===F?Array.prototype.slice.call(this):this[a]},pushStack:function(c,a,b){var d=Z(c);d.prevObject=this;d.context=this.context;if(a==="find"){d.selector=this.selector+(this.selector?" ":"")+b}else{if(a){d.selector=this.selector+"."+a+"("+b+")"}}return d},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this},each:function(a,b){return Z.each(this,a,b)},index:function(a){return Z.inArray(a&&a.jquery?a[0]:a,this)},attr:function(c,d,a){var b=c;if(typeof c==="string"){if(d===F){return this[0]&&Z[a||"attr"](this[0],c)}else{b={};b[c]=d}}return this.each(function(e){for(c in b){Z.attr(a?this.style:this,c,Z.prop(this,b[c],a,e,c))}})},css:function(a,b){if((a=="width"||a=="height")&&parseFloat(b)<0){b=F}return this.attr(a,b,"curCSS")},text:function(a){if(typeof a!=="object"&&a!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(a))}var b="";Z.each(a||this,function(){Z.each(this.childNodes,function(){if(this.nodeType!=8){b+=this.nodeType!=1?this.nodeValue:Z.fn.text([this])}})});return b},wrapAll:function(a){if(this[0]){var b=Z(a,this[0].ownerDocument).clone();if(this[0].parentNode){b.insertBefore(this[0])}b.map(function(){var c=this;while(c.firstChild){c=c.firstChild}return c}).append(this)}return this},wrapInner:function(a){return this.each(function(){Z(this).contents().wrapAll(a)})},wrap:function(a){return this.each(function(){Z(this).wrapAll(a)})},append:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1){this.appendChild(a)}})},prepend:function(){return this.domManip(arguments,true,function(a){if(this.nodeType==1){this.insertBefore(a,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,false,function(a){this.parentNode.insertBefore(a,this.nextSibling)})},end:function(){return this.prevObject||Z([])},push:[].push,sort:[].sort,splice:[].splice,find:function(a){if(this.length===1){var b=this.pushStack([],"find",a);b.length=0;Z.find(a,this[0],b);return b}else{return this.pushStack(Z.unique(Z.map(this,function(c){return Z.find(a,c)})),"find",a)}},clone:function(d){var b=this.map(function(){if(!Z.support.noCloneEvent&&!Z.isXMLDoc(this)){var f=this.outerHTML;if(!f){var e=this.ownerDocument.createElement("div");e.appendChild(this.cloneNode(true));f=e.innerHTML}return Z.clean([f.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(d===true){var c=this.find("*").andSelf(),a=0;b.find("*").andSelf().each(function(){if(this.nodeName!==c[a].nodeName){return}var f=Z.data(c[a],"events");for(var e in f){for(var g in f[e]){Z.event.add(this,e,f[e][g],f[e][g].data)}}a++})}return b},filter:function(a){return this.pushStack(Z.isFunction(a)&&Z.grep(this,function(c,b){return a.call(c,b)})||Z.multiFilter(a,Z.grep(this,function(b){return b.nodeType===1})),"filter",a)},closest:function(a){var b=Z.expr.match.POS.test(a)?Z(a):null,c=0;return this.map(function(){var d=this;while(d&&d.ownerDocument){if(b?b.index(d)>-1:Z(d).is(a)){Z.data(d,"closest",c);return d}d=d.parentNode;c++}})},not:function(a){if(typeof a==="string"){if(X.test(a)){return this.pushStack(Z.multiFilter(a,this,true),"not",a)}else{a=Z.multiFilter(a,this)}}var b=a.length&&a[a.length-1]!==F&&!a.nodeType;return this.filter(function(){return b?Z.inArray(this,a)<0:this!=a})},add:function(a){return this.pushStack(Z.unique(Z.merge(this.get(),typeof a==="string"?Z(a):Z.makeArray(a))))},is:function(a){return !!a&&Z.multiFilter(a,this).length>0},hasClass:function(a){return !!a&&this.is("."+a)},val:function(h){if(h===F){var e=this[0];if(e){if(Z.nodeName(e,"option")){return(e.attributes.value||{}).specified?e.value:e.text}if(Z.nodeName(e,"select")){var f=e.selectedIndex,j=[],c=e.options,d=e.type=="select-one";if(f<0){return null}for(var g=d?f:0,b=d?f+1:c.length;g<b;g++){var a=c[g];if(a.selected){h=Z(a).val();if(d){return h}j.push(h)}}return j}return(e.value||"").replace(/\r/g,"")}return F}if(typeof h==="number"){h+=""}return this.each(function(){if(this.nodeType!=1){return}if(Z.isArray(h)&&/radio|checkbox/.test(this.type)){this.checked=(Z.inArray(this.value,h)>=0||Z.inArray(this.name,h)>=0)}else{if(Z.nodeName(this,"select")){var k=Z.makeArray(h);Z("option",this).each(function(){this.selected=(Z.inArray(this.value,k)>=0||Z.inArray(this.text,k)>=0)});if(!k.length){this.selectedIndex=-1}}else{this.value=h}}})},html:function(a){return a===F?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(a)},replaceWith:function(a){return this.after(a).remove()},eq:function(a){return this.slice(a,+a+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(a){return this.pushStack(Z.map(this,function(c,b){return a.call(c,b,c)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(f,c,j){if(this[0]){var a=(this[0].ownerDocument||this[0]).createDocumentFragment(),e=Z.clean(f,(this[0].ownerDocument||this[0]),a),d=a.firstChild;if(d){for(var g=0,b=this.length;g<b;g++){j.call(h(this[g],d),this.length>1||g>0?a.cloneNode(true):a)}}if(e){Z.each(e,K)}}return this;function h(l,k){return c&&Z.nodeName(l,"table")&&Z.nodeName(k,"tr")?(l.getElementsByTagName("tbody")[0]||l.appendChild(l.ownerDocument.createElement("tbody"))):l}}};Z.fn.init.prototype=Z.fn;function K(a,b){if(b.src){Z.ajax({url:b.src,async:false,dataType:"script"})}else{Z.globalEval(b.text||b.textContent||b.innerHTML||"")}if(b.parentNode){b.parentNode.removeChild(b)}}function I(){return +new Date}Z.extend=Z.fn.extend=function(){var a=arguments[0]||{},e=1,g=arguments.length,b=false,h;if(typeof a==="boolean"){b=a;a=arguments[1]||{};e=2}if(typeof a!=="object"&&!Z.isFunction(a)){a={}}if(g==e){a=this;--e}for(;e<g;e++){if((h=arguments[e])!=null){for(var c in h){var d=a[c],f=h[c];if(a===f){continue}if(b&&f&&typeof f==="object"&&!f.nodeType){a[c]=Z.extend(b,d||(f.length!=null?[]:{}),f)}else{if(f!==F){a[c]=f}}}}}return a};var ag=/z-?index|font-?weight|opacity|zoom|line-?height/i,M=document.defaultView||{},V=Object.prototype.toString;Z.extend({noConflict:function(a){P.$=S;if(a){P.jQuery=Y}return Z},isFunction:function(a){return V.call(a)==="[object Function]"},isArray:function(a){return V.call(a)==="[object Array]"},isXMLDoc:function(a){return a.nodeType===9&&a.documentElement.nodeName!=="HTML"||!!a.ownerDocument&&Z.isXMLDoc(a.ownerDocument)},globalEval:function(b){if(b&&/\S/.test(b)){var c=document.getElementsByTagName("head")[0]||document.documentElement,a=document.createElement("script");a.type="text/javascript";if(Z.support.scriptEval){a.appendChild(document.createTextNode(b))}else{a.text=b}c.insertBefore(a,c.firstChild);c.removeChild(a)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()==b.toUpperCase()},each:function(c,g,d){var a,e=0,b=c.length;if(d){if(b===F){for(a in c){if(g.apply(c[a],d)===false){break}}}else{for(;e<b;){if(g.apply(c[e++],d)===false){break}}}}else{if(b===F){for(a in c){if(g.call(c[a],a,c[a])===false){break}}}else{for(var f=c[0];e<b&&g.call(f,e,f)!==false;f=c[++e]){}}}return c},prop:function(c,e,b,d,a){if(Z.isFunction(e)){e=e.call(c,d)}return typeof e==="number"&&b=="curCSS"&&!ag.test(a)?e+"px":e},className:{add:function(a,b){Z.each((b||"").split(/\s+/),function(d,c){if(a.nodeType==1&&!Z.className.has(a.className,c)){a.className+=(a.className?" ":"")+c}})},remove:function(a,b){if(a.nodeType==1){a.className=b!==F?Z.grep(a.className.split(/\s+/),function(c){return !Z.className.has(b,c)}).join(" "):""}},has:function(a,b){return a&&Z.inArray(b,(a.className||a).toString().split(/\s+/))>-1}},swap:function(c,d,e){var b={};for(var a in d){b[a]=c.style[a];c.style[a]=d[a]}e.call(c);for(var a in d){c.style[a]=b[a]}},css:function(b,c,f,h){if(c=="width"||c=="height"){var d,g={position:"absolute",visibility:"hidden",display:"block"},a=c=="width"?["Left","Right"]:["Top","Bottom"];function e(){d=c=="width"?b.offsetWidth:b.offsetHeight;if(h==="border"){return}Z.each(a,function(){if(!h){d-=parseFloat(Z.curCSS(b,"padding"+this,true))||0}if(h==="margin"){d+=parseFloat(Z.curCSS(b,"margin"+this,true))||0}else{d-=parseFloat(Z.curCSS(b,"border"+this+"Width",true))||0}})}if(b.offsetWidth!==0){e()}else{Z.swap(b,g,e)}return Math.max(0,Math.round(d))}return Z.curCSS(b,c,f)},curCSS:function(h,g,b){var a,j=h.style;if(g=="opacity"&&!Z.support.opacity){a=Z.attr(j,"opacity");return a==""?"1":a}if(g.match(/float/i)){g=ae}if(!b&&j&&j[g]){a=j[g]}else{if(M.getComputedStyle){if(g.match(/float/i)){g="float"}g=g.replace(/([A-Z])/g,"-$1").toLowerCase();var f=M.getComputedStyle(h,null);if(f){a=f.getPropertyValue(g)}if(g=="opacity"&&a==""){a="1"}}else{if(h.currentStyle){var c=g.replace(/\-(\w)/g,function(k,l){return l.toUpperCase()});a=h.currentStyle[g]||h.currentStyle[c];if(!/^\d+(px)?$/i.test(a)&&/^\d/.test(a)){var e=j.left,d=h.runtimeStyle.left;h.runtimeStyle.left=h.currentStyle.left;j.left=a||0;a=j.pixelLeft+"px";j.left=e;h.runtimeStyle.left=d}}}}return a},clean:function(h,g,a){g=g||document;if(typeof g.createElement==="undefined"){g=g.ownerDocument||g[0]&&g[0].ownerDocument||document}if(!a&&h.length===1&&typeof h[0]==="string"){var d=/^<(\w+)\s*\/?>$/.exec(h[0]);if(d){return[g.createElement(d[1])]}}var e=[],b=[],c=g.createElement("div");Z.each(h,function(l,r){if(typeof r==="number"){r+=""}if(!r){return}if(typeof r==="string"){r=r.replace(/(<(\w+)[^>]*?)\/>/g,function(s,u,v){return v.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?s:u+"></"+v+">"});var q=r.replace(/^\s+/,"").substring(0,10).toLowerCase();var k=!q.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!q.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||q.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!q.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!q.indexOf("<td")||!q.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!q.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!Z.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];c.innerHTML=k[1]+r+k[2];while(k[0]--){c=c.lastChild}if(!Z.support.tbody){var o=/<tbody/i.test(r),j=!q.indexOf("<table")&&!o?c.firstChild&&c.firstChild.childNodes:k[1]=="<table>"&&!o?c.childNodes:[];for(var m=j.length-1;m>=0;--m){if(Z.nodeName(j[m],"tbody")&&!j[m].childNodes.length){j[m].parentNode.removeChild(j[m])}}}if(!Z.support.leadingWhitespace&&/^\s/.test(r)){c.insertBefore(g.createTextNode(r.match(/^\s*/)[0]),c.firstChild)}r=Z.makeArray(c.childNodes)}if(r.nodeType){e.push(r)}else{e=Z.merge(e,r)}});if(a){for(var f=0;e[f];f++){if(Z.nodeName(e[f],"script")&&(!e[f].type||e[f].type.toLowerCase()==="text/javascript")){b.push(e[f].parentNode?e[f].parentNode.removeChild(e[f]):e[f])}else{if(e[f].nodeType===1){e.splice.apply(e,[f+1,0].concat(Z.makeArray(e[f].getElementsByTagName("script"))))}a.appendChild(e[f])}}return b}return e},attr:function(b,c,e){if(!b||b.nodeType==3||b.nodeType==8){return F}var d=!Z.isXMLDoc(b),a=e!==F;c=d&&Z.props[c]||c;if(b.tagName){var g=/href|src|style/.test(c);if(c=="selected"&&b.parentNode){b.parentNode.selectedIndex}if(c in b&&d&&!g){if(a){if(c=="type"&&Z.nodeName(b,"input")&&b.parentNode){throw"type property can't be changed"}b[c]=e}if(Z.nodeName(b,"form")&&b.getAttributeNode(c)){return b.getAttributeNode(c).nodeValue}if(c=="tabIndex"){var h=b.getAttributeNode("tabIndex");return h&&h.specified?h.value:b.nodeName.match(/(button|input|object|select|textarea)/i)?0:b.nodeName.match(/^(a|area)$/i)&&b.href?0:F}return b[c]}if(!Z.support.style&&d&&c=="style"){return Z.attr(b.style,"cssText",e)}if(a){b.setAttribute(c,""+e)}var f=!Z.support.hrefNormalized&&d&&g?b.getAttribute(c,2):b.getAttribute(c);return f===null?F:f}if(!Z.support.opacity&&c=="opacity"){if(a){b.zoom=1;b.filter=(b.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(e)+""=="NaN"?"":"alpha(opacity="+e*100+")")}return b.filter&&b.filter.indexOf("opacity=")>=0?(parseFloat(b.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}c=c.replace(/-([a-z])/ig,function(k,j){return j.toUpperCase()});if(a){b[c]=e}return b[c]},trim:function(a){return(a||"").replace(/^\s+|\s+$/g,"")},makeArray:function(c){var b=[];if(c!=null){var a=c.length;if(a==null||typeof c==="string"||Z.isFunction(c)||c.setInterval){b[0]=c}else{while(a){b[--a]=c[a]}}}return b},inArray:function(c,b){for(var a=0,d=b.length;a<d;a++){if(b[a]===c){return a}}return -1},merge:function(c,a){var d=0,e,b=c.length;if(!Z.support.getAll){while((e=a[d++])!=null){if(e.nodeType!=8){c[b++]=e}}}else{while((e=a[d++])!=null){c[b++]=e}}return c},unique:function(f){var d=[],a={};try{for(var e=0,b=f.length;e<b;e++){var c=Z.data(f[e]);if(!a[c]){a[c]=true;d.push(f[e])}}}catch(g){d=f}return d},grep:function(e,a,d){var f=[];for(var b=0,c=e.length;b<c;b++){if(!d!=!a(e[b],b)){f.push(e[b])}}return f},map:function(d,b){var e=[];for(var f=0,c=d.length;f<c;f++){var a=b(d[f],f);if(a!=null){e[e.length]=a}}return e.concat.apply([],e)}});var Q=navigator.userAgent.toLowerCase();Z.browser={version:(Q.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(Q),opera:/opera/.test(Q),msie:/msie/.test(Q)&&!/opera/.test(Q),mozilla:/mozilla/.test(Q)&&!/(compatible|webkit)/.test(Q)};Z.each({parent:function(a){return a.parentNode},parents:function(a){return Z.dir(a,"parentNode")},next:function(a){return Z.nth(a,2,"nextSibling")},prev:function(a){return Z.nth(a,2,"previousSibling")},nextAll:function(a){return Z.dir(a,"nextSibling")},prevAll:function(a){return Z.dir(a,"previousSibling")},siblings:function(a){return Z.sibling(a.parentNode.firstChild,a)},children:function(a){return Z.sibling(a.firstChild)},contents:function(a){return Z.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:Z.makeArray(a.childNodes)}},function(a,b){Z.fn[a]=function(d){var c=Z.map(this,b);if(d&&typeof d=="string"){c=Z.multiFilter(d,c)}return this.pushStack(Z.unique(c),a,d)}});Z.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){Z.fn[a]=function(g){var h=[],d=Z(g);for(var e=0,c=d.length;e<c;e++){var f=(e>0?this.clone(true):this).get();Z.fn[b].apply(Z(d[e]),f);h=h.concat(f)}return this.pushStack(h,a,g)}});Z.each({removeAttr:function(a){Z.attr(this,a,"");if(this.nodeType==1){this.removeAttribute(a)}},addClass:function(a){Z.className.add(this,a)},removeClass:function(a){Z.className.remove(this,a)},toggleClass:function(a,b){if(typeof b!=="boolean"){b=!Z.className.has(this,a)}Z.className[b?"add":"remove"](this,a)},remove:function(a){if(!a||Z.filter(a,[this]).length){Z("*",this).add([this]).each(function(){Z.event.remove(this);Z.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){Z(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(a,b){Z.fn[a]=function(){return this.each(b,arguments)}});function ah(a,b){return a[0]&&parseInt(Z.curCSS(a[0],b,true),10)||0}var T="jQuery"+I(),G=0,O={};Z.extend({cache:{},data:function(c,a,d){c=c==P?O:c;var b=c[T];if(!b){b=c[T]=++G}if(a&&!Z.cache[b]){Z.cache[b]={}}if(d!==F){Z.cache[b][a]=d}return a?Z.cache[b][a]:b},removeData:function(a,b){a=a==P?O:a;var d=a[T];if(b){if(Z.cache[d]){delete Z.cache[d][b];b="";for(b in Z.cache[d]){break}if(!b){Z.removeData(a)}}}else{try{delete a[T]}catch(c){if(a.removeAttribute){a.removeAttribute(T)}}delete Z.cache[d]}},queue:function(c,b,d){if(c){b=(b||"fx")+"queue";var a=Z.data(c,b);if(!a||Z.isArray(d)){a=Z.data(c,b,Z.makeArray(d))}else{if(d){a.push(d)}}}return a},dequeue:function(c,a){var d=Z.queue(c,a),b=d.shift();if(!a||a==="fx"){b=d[0]}if(b!==F){b.call(c)}}});Z.fn.extend({data:function(b,d){var a=b.split(".");a[1]=a[1]?"."+a[1]:"";if(d===F){var c=this.triggerHandler("getData"+a[1]+"!",[a[0]]);if(c===F&&this.length){c=Z.data(this[0],b)}return c===F&&a[1]?this.data(a[0]):c}else{return this.trigger("setData"+a[1]+"!",[a[0],d]).each(function(){Z.data(this,b,d)})}},removeData:function(a){return this.each(function(){Z.removeData(this,a)})},queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===F){return Z.queue(this[0],a)}return this.each(function(){var c=Z.queue(this,a,b);if(a=="fx"&&c.length==1){c[0].call(this)}})},dequeue:function(a){return this.each(function(){Z.dequeue(this,a)})}});(function(){var j=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,o=0,k=Object.prototype.toString;var q=function(aj,C,u,am){u=u||[];C=C||document;if(C.nodeType!==1&&C.nodeType!==9){return[]}if(!aj||typeof aj!=="string"){return u}var z=[],v,x,ai,A,B,w,al=true;j.lastIndex=0;while((v=j.exec(aj))!==null){z.push(v[1]);if(v[2]){w=RegExp.rightContext;break}}if(z.length>1&&a.exec(aj)){if(z.length===2&&d.relative[z[0]]){x=e(z[0]+z[1],C)}else{x=d.relative[z[0]]?[C]:q(z.shift(),C);while(z.length){aj=z.shift();if(d.relative[aj]){aj+=z.shift()}x=e(aj,x)}}}else{var D=am?{expr:z.pop(),set:r(am)}:q.find(z.pop(),z.length===1&&C.parentNode?C.parentNode:C,f(C));x=q.filter(D.expr,D.set);if(z.length>0){ai=r(x)}else{al=false}while(z.length){var y=z.pop(),ak=y;if(!d.relative[y]){y=""}else{ak=z.pop()}if(ak==null){ak=C}d.relative[y](ai,ak,f(C))}}if(!ai){ai=x}if(!ai){throw"Syntax error, unrecognized expression: "+(y||aj)}if(k.call(ai)==="[object Array]"){if(!al){u.push.apply(u,ai)}else{if(C.nodeType===1){for(var s=0;ai[s]!=null;s++){if(ai[s]&&(ai[s]===true||ai[s].nodeType===1&&c(C,ai[s]))){u.push(x[s])}}}else{for(var s=0;ai[s]!=null;s++){if(ai[s]&&ai[s].nodeType===1){u.push(x[s])}}}}}else{r(ai,u)}if(w){q(w,C,u,am);if(h){hasDuplicate=false;u.sort(h);if(hasDuplicate){for(var s=1;s<u.length;s++){if(u[s]===u[s-1]){u.splice(s--,1)}}}}}return u};q.matches=function(s,u){return q(s,null,null,u)};q.find=function(y,w,z){var u,x;if(!y){return[]}for(var B=0,s=d.order.length;B<s;B++){var A=d.order[B],x;if((x=d.match[A].exec(y))){var v=RegExp.leftContext;if(v.substr(v.length-1)!=="\\"){x[1]=(x[1]||"").replace(/\\/g,"");u=d.find[A](x,w,z);if(u!=null){y=y.replace(d.match[A],"");break}}}}if(!u){u=w.getElementsByTagName("*")}return{set:u,expr:y}};q.filter=function(ak,al,B,aj){var s=ak,C=[],ai=al,u,x,A=al&&al[0]&&f(al[0]);while(ak&&al.length){for(var w in d.filter){if((u=d.match[w].exec(ak))!=null){var z=d.filter[w],v,y;x=false;if(ai==C){C=[]}if(d.preFilter[w]){u=d.preFilter[w](u,ai,B,C,aj,A);if(!u){x=v=true}else{if(u===true){continue}}}if(u){for(var D=0;(y=ai[D])!=null;D++){if(y){v=z(y,u,D,ai);var am=aj^!!v;if(B&&v!=null){if(am){x=true}else{ai[D]=false}}else{if(am){C.push(y);x=true}}}}}if(v!==F){if(!B){ai=C}ak=ak.replace(d.match[w],"");if(!x){return[]}break}}}if(ak==s){if(x==null){throw"Syntax error, unrecognized expression: "+ak}else{break}}s=ak}return ai};var d=q.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(s){return s.getAttribute("href")}},relative:{"+":function(x,w,z){var s=typeof w==="string",y=s&&!/\W/.test(w),A=s&&!y;if(y&&!z){w=w.toUpperCase()}for(var B=0,u=x.length,v;B<u;B++){if((v=x[B])){while((v=v.previousSibling)&&v.nodeType!==1){}x[B]=A||v&&v.nodeName===w?v||false:v===w}}if(A){q.filter(w,x,true)}},">":function(w,u,A){var s=typeof u==="string";if(s&&!/\W/.test(u)){u=A?u:u.toUpperCase();for(var z=0,y=w.length;z<y;z++){var x=w[z];if(x){var v=x.parentNode;w[z]=v.nodeName===u?v:false}}}else{for(var z=0,y=w.length;z<y;z++){var x=w[z];if(x){w[z]=s?x.parentNode:x.parentNode===u}}if(s){q.filter(u,w,true)}}},"":function(y,w,x){var v=o++,s=l;if(!w.match(/\W/)){var u=w=x?w:w.toUpperCase();s=g}s("parentNode",w,v,y,u,x)},"~":function(y,w,x){var v=o++,s=l;if(typeof w==="string"&&!w.match(/\W/)){var u=w=x?w:w.toUpperCase();s=g}s("previousSibling",w,v,y,u,x)}},find:{ID:function(w,v,s){if(typeof v.getElementById!=="undefined"&&!s){var u=v.getElementById(w[1]);return u?[u]:[]}},NAME:function(v,s,z){if(typeof s.getElementsByName!=="undefined"){var u=[],w=s.getElementsByName(v[1]);for(var y=0,x=w.length;y<x;y++){if(w[y].getAttribute("name")===v[1]){u.push(w[y])}}return u.length===0?null:u}},TAG:function(u,s){return s.getElementsByTagName(u[1])}},preFilter:{CLASS:function(w,v,y,s,z,x){w=" "+w[1].replace(/\\/g,"")+" ";if(x){return w}for(var A=0,u;(u=v[A])!=null;A++){if(u){if(z^(u.className&&(" "+u.className+" ").indexOf(w)>=0)){if(!y){s.push(u)}}else{if(y){v[A]=false}}}}return false},ID:function(s){return s[1].replace(/\\/g,"")},TAG:function(u,v){for(var s=0;v[s]===false;s++){}return v[s]&&f(v[s])?u[1]:u[1].toUpperCase()},CHILD:function(u){if(u[1]=="nth"){var s=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(u[2]=="even"&&"2n"||u[2]=="odd"&&"2n+1"||!/\D/.test(u[2])&&"0n+"+u[2]||u[2]);u[2]=(s[1]+(s[2]||1))-0;u[3]=s[3]-0}u[0]=o++;return u},ATTR:function(v,u,z,x,y,w){var s=v[1].replace(/\\/g,"");if(!w&&d.attrMap[s]){v[1]=d.attrMap[s]}if(v[2]==="~="){v[4]=" "+v[4]+" "}return v},PSEUDO:function(v,s,x,y,u){if(v[1]==="not"){if(v[3].match(j).length>1||/^\w/.test(v[3])){v[3]=q(v[3],null,null,s)}else{var w=q.filter(v[3],s,x,true^u);if(!x){y.push.apply(y,w)}return false}}else{if(d.match.POS.test(v[0])||d.match.CHILD.test(v[0])){return true}}return v},POS:function(s){s.unshift(true);return s}},filters:{enabled:function(s){return s.disabled===false&&s.type!=="hidden"},disabled:function(s){return s.disabled===true},checked:function(s){return s.checked===true},selected:function(s){s.parentNode.selectedIndex;return s.selected===true},parent:function(s){return !!s.firstChild},empty:function(s){return !s.firstChild},has:function(s,u,v){return !!q(v[3],s).length},header:function(s){return/h\d/i.test(s.nodeName)},text:function(s){return"text"===s.type},radio:function(s){return"radio"===s.type},checkbox:function(s){return"checkbox"===s.type},file:function(s){return"file"===s.type},password:function(s){return"password"===s.type},submit:function(s){return"submit"===s.type},image:function(s){return"image"===s.type},reset:function(s){return"reset"===s.type},button:function(s){return"button"===s.type||s.nodeName.toUpperCase()==="BUTTON"},input:function(s){return/input|select|textarea|button/i.test(s.nodeName)}},setFilters:{first:function(s,u){return u===0},last:function(u,w,s,v){return w===v.length-1},even:function(s,u){return u%2===0},odd:function(s,u){return u%2===1},lt:function(s,u,v){return u<v[3]-0},gt:function(s,u,v){return u>v[3]-0},nth:function(s,u,v){return v[3]-0==u},eq:function(s,u,v){return v[3]-0==u}},filter:{PSEUDO:function(u,x,y,z){var v=x[1],w=d.filters[v];if(w){return w(u,y,x,z)}else{if(v==="contains"){return(u.textContent||u.innerText||"").indexOf(x[3])>=0}else{if(v==="not"){var A=x[3];for(var y=0,s=A.length;y<s;y++){if(A[y]===u){return false}}return true}}}},CHILD:function(B,z){var s=z[1],y=B;switch(s){case"only":case"first":while(y=y.previousSibling){if(y.nodeType===1){return false}}if(s=="first"){return true}y=B;case"last":while(y=y.nextSibling){if(y.nodeType===1){return false}}return true;case"nth":var A=z[2],v=z[3];if(A==1&&v==0){return true}var u=z[0],x=B.parentNode;if(x&&(x.sizcache!==u||!B.nodeIndex)){var C=0;for(y=x.firstChild;y;y=y.nextSibling){if(y.nodeType===1){y.nodeIndex=++C}}x.sizcache=u}var w=B.nodeIndex-v;if(A==0){return w==0}else{return(w%A==0&&w/A>=0)}}},ID:function(s,u){return s.nodeType===1&&s.getAttribute("id")===u},TAG:function(s,u){return(u==="*"&&s.nodeType===1)||s.nodeName===u},CLASS:function(s,u){return(" "+(s.className||s.getAttribute("class"))+" ").indexOf(u)>-1},ATTR:function(s,v){var u=v[1],x=d.attrHandle[u]?d.attrHandle[u](s):s[u]!=null?s[u]:s.getAttribute(u),y=x+"",z=v[2],w=v[4];return x==null?z==="!=":z==="="?y===w:z==="*="?y.indexOf(w)>=0:z==="~="?(" "+y+" ").indexOf(w)>=0:!w?y&&x!==false:z==="!="?y!=w:z==="^="?y.indexOf(w)===0:z==="$="?y.substr(y.length-w.length)===w:z==="|="?y===w||y.substr(0,w.length+1)===w+"-":false},POS:function(s,w,y,x){var u=w[2],v=d.setFilters[u];if(v){return v(s,y,w,x)}}}};var a=d.match.POS;for(var b in d.match){d.match[b]=RegExp(d.match[b].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var r=function(s,u){s=Array.prototype.slice.call(s);if(u){u.push.apply(u,s);return u}return s};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(m){r=function(u,x){var s=x||[];if(k.call(u)==="[object Array]"){Array.prototype.push.apply(s,u)}else{if(typeof u.length==="number"){for(var w=0,v=u.length;w<v;w++){s.push(u[w])}}else{for(var w=0;u[w];w++){s.push(u[w])}}}return s}}var h;if(document.documentElement.compareDocumentPosition){h=function(v,u){var s=v.compareDocumentPosition(u)&4?-1:v===u?0:1;if(s===0){hasDuplicate=true}return s}}else{if("sourceIndex" in document.documentElement){h=function(v,u){var s=v.sourceIndex-u.sourceIndex;if(s===0){hasDuplicate=true}return s}}else{if(document.createRange){h=function(s,v){var x=s.ownerDocument.createRange(),w=v.ownerDocument.createRange();x.selectNode(s);x.collapse(true);w.selectNode(v);w.collapse(true);var u=x.compareBoundaryPoints(Range.START_TO_END,w);if(u===0){hasDuplicate=true}return u}}}}(function(){var v=document.createElement("form"),u="script"+(new Date).getTime();v.innerHTML="<input name='"+u+"'/>";var s=document.documentElement;s.insertBefore(v,s.firstChild);if(!!document.getElementById(u)){d.find.ID=function(z,y,x){if(typeof y.getElementById!=="undefined"&&!x){var w=y.getElementById(z[1]);return w?w.id===z[1]||typeof w.getAttributeNode!=="undefined"&&w.getAttributeNode("id").nodeValue===z[1]?[w]:F:[]}};d.filter.ID=function(x,y){var w=typeof x.getAttributeNode!=="undefined"&&x.getAttributeNode("id");return x.nodeType===1&&w&&w.nodeValue===y}}s.removeChild(v)})();(function(){var s=document.createElement("div");s.appendChild(document.createComment(""));if(s.getElementsByTagName("*").length>0){d.find.TAG=function(w,u){var y=u.getElementsByTagName(w[1]);if(w[1]==="*"){var v=[];for(var x=0;y[x];x++){if(y[x].nodeType===1){v.push(y[x])}}y=v}return y}}s.innerHTML="<a href='#'></a>";if(s.firstChild&&typeof s.firstChild.getAttribute!=="undefined"&&s.firstChild.getAttribute("href")!=="#"){d.attrHandle.href=function(u){return u.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var u=q,s=document.createElement("div");s.innerHTML="<p class='TEST'></p>";if(s.querySelectorAll&&s.querySelectorAll(".TEST").length===0){return}q=function(w,x,y,z){x=x||document;if(!z&&x.nodeType===9&&!f(x)){try{return r(x.querySelectorAll(w),y)}catch(v){}}return u(w,x,y,z)};q.find=u.find;q.filter=u.filter;q.selectors=u.selectors;q.matches=u.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var s=document.createElement("div");s.innerHTML="<div class='test e'></div><div class='test'></div>";if(s.getElementsByClassName("e").length===0){return}s.lastChild.className="e";if(s.getElementsByClassName("e").length===1){return}d.order.splice(1,0,"CLASS");d.find.CLASS=function(w,v,u){if(typeof v.getElementsByClassName!=="undefined"&&!u){return v.getElementsByClassName(w[1])}}})()}function g(C,y,A,s,B,x){var z=C=="previousSibling"&&!x;for(var v=0,u=s.length;v<u;v++){var w=s[v];if(w){if(z&&w.nodeType===1){w.sizcache=A;w.sizset=v}w=w[C];var D=false;while(w){if(w.sizcache===A){D=s[w.sizset];break}if(w.nodeType===1&&!x){w.sizcache=A;w.sizset=v}if(w.nodeName===y){D=w;break}w=w[C]}s[v]=D}}}function l(C,y,A,s,B,x){var z=C=="previousSibling"&&!x;for(var v=0,u=s.length;v<u;v++){var w=s[v];if(w){if(z&&w.nodeType===1){w.sizcache=A;w.sizset=v}w=w[C];var D=false;while(w){if(w.sizcache===A){D=s[w.sizset];break}if(w.nodeType===1){if(!x){w.sizcache=A;w.sizset=v}if(typeof y!=="string"){if(w===y){D=true;break}}else{if(q.filter(y,[w]).length>0){D=w;break}}}w=w[C]}s[v]=D}}}var c=document.compareDocumentPosition?function(s,u){return s.compareDocumentPosition(u)&16}:function(s,u){return s!==u&&(s.contains?s.contains(u):true)};var f=function(s){return s.nodeType===9&&s.documentElement.nodeName!=="HTML"||!!s.ownerDocument&&f(s.ownerDocument)};var e=function(z,v){var w=[],y="",x,u=v.nodeType?[v]:v;while((x=d.match.PSEUDO.exec(z))){y+=x[0];z=z.replace(d.match.PSEUDO,"")}z=d.relative[z]?z+"*":z;for(var A=0,s=u.length;A<s;A++){q(z,u[A],w)}return q.filter(y,w)};Z.find=q;Z.filter=q.filter;Z.expr=q.selectors;Z.expr[":"]=Z.expr.filters;q.selectors.filters.hidden=function(s){return s.offsetWidth===0||s.offsetHeight===0};q.selectors.filters.visible=function(s){return s.offsetWidth>0||s.offsetHeight>0};q.selectors.filters.animated=function(s){return Z.grep(Z.timers,function(u){return s===u.elem}).length};Z.multiFilter=function(u,s,v){if(v){u=":not("+u+")"}return q.matches(u,s)};Z.dir=function(u,v){var s=[],w=u[v];while(w&&w!=document){if(w.nodeType==1){s.push(w)}w=w[v]}return s};Z.nth=function(s,x,v,u){x=x||1;var w=0;for(;s;s=s[v]){if(s.nodeType==1&&++w==x){break}}return s};Z.sibling=function(u,s){var v=[];for(;u;u=u.nextSibling){if(u.nodeType==1&&u!=s){v.push(u)}}return v};return;P.Sizzle=q})();Z.event={add:function(a,f,d,b){if(a.nodeType==3||a.nodeType==8){return}if(a.setInterval&&a!=P){a=P}if(!d.guid){d.guid=this.guid++}if(b!==F){var g=d;d=this.proxy(g);d.data=b}var e=Z.data(a,"events")||Z.data(a,"events",{}),c=Z.data(a,"handle")||Z.data(a,"handle",function(){return typeof Z!=="undefined"&&!Z.event.triggered?Z.event.handle.apply(arguments.callee.elem,arguments):F});c.elem=a;Z.each(f.split(/\s+/),function(l,h){var k=h.split(".");h=k.shift();d.type=k.slice().sort().join(".");var j=e[h];if(Z.event.specialAll[h]){Z.event.specialAll[h].setup.call(a,b,k)}if(!j){j=e[h]={};if(!Z.event.special[h]||Z.event.special[h].setup.call(a,b,k)===false){if(a.addEventListener){a.addEventListener(h,c,false)}else{if(a.attachEvent){a.attachEvent("on"+h,c)}}}}j[d.guid]=d;Z.event.global[h]=true});a=null},guid:1,global:{},remove:function(b,g,a){if(b.nodeType==3||b.nodeType==8){return}var h=Z.data(b,"events"),f,c;if(h){if(g===F||(typeof g==="string"&&g.charAt(0)==".")){for(var e in h){this.remove(b,e+(g||""))}}else{if(g.type){a=g.handler;g=g.type}Z.each(g.split(/\s+/),function(j,m){var l=m.split(".");m=l.shift();var k=RegExp("(^|\\.)"+l.slice().sort().join(".*\\.")+"(\\.|$)");if(h[m]){if(a){delete h[m][a.guid]}else{for(var o in h[m]){if(k.test(h[m][o].type)){delete h[m][o]}}}if(Z.event.specialAll[m]){Z.event.specialAll[m].teardown.call(b,l)}for(f in h[m]){break}if(!f){if(!Z.event.special[m]||Z.event.special[m].teardown.call(b,l)===false){if(b.removeEventListener){b.removeEventListener(m,Z.data(b,"handle"),false)}else{if(b.detachEvent){b.detachEvent("on"+m,Z.data(b,"handle"))}}}f=null;delete h[m]}}})}for(f in h){break}if(!f){var d=Z.data(b,"handle");if(d){d.elem=null}Z.removeData(b,"events");Z.removeData(b,"handle")}}},trigger:function(d,g,c,a){var f=d.type||d;if(!a){d=typeof d==="object"?d[T]?d:Z.extend(Z.Event(f),d):Z.Event(f);if(f.indexOf("!")>=0){d.type=f=f.slice(0,-1);d.exclusive=true}if(!c){d.stopPropagation();if(this.global[f]){Z.each(Z.cache,function(){if(this.events&&this.events[f]){Z.event.trigger(d,g,this.handle.elem)}})}}if(!c||c.nodeType==3||c.nodeType==8){return F}d.result=F;d.target=c;g=Z.makeArray(g);g.unshift(d)}d.currentTarget=c;var b=Z.data(c,"handle");if(b){b.apply(c,g)}if((!c[f]||(Z.nodeName(c,"a")&&f=="click"))&&c["on"+f]&&c["on"+f].apply(c,g)===false){d.result=false}if(!a&&c[f]&&!d.isDefaultPrevented()&&!(Z.nodeName(c,"a")&&f=="click")){this.triggered=true;try{c[f]()}catch(h){}}this.triggered=false;if(!d.isPropagationStopped()){var e=c.parentNode||c.ownerDocument;if(e){Z.event.trigger(d,g,e,true)}}},handle:function(d){var b,g;d=arguments[0]=Z.event.fix(d||P.event);d.currentTarget=this;var f=d.type.split(".");d.type=f.shift();b=!f.length&&!d.exclusive;var c=RegExp("(^|\\.)"+f.slice().sort().join(".*\\.")+"(\\.|$)");g=(Z.data(this,"events")||{})[d.type];for(var h in g){var a=g[h];if(b||c.test(a.type)){d.handler=a;d.data=a.data;var e=a.apply(this,arguments);if(e!==F){d.result=e;if(e===false){d.preventDefault();d.stopPropagation()}}if(d.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(c){if(c[T]){return c}var a=c;c=Z.Event(a);for(var e=this.props.length,d;e;){d=this.props[--e];c[d]=a[d]}if(!c.target){c.target=c.srcElement||document}if(c.target.nodeType==3){c.target=c.target.parentNode}if(!c.relatedTarget&&c.fromElement){c.relatedTarget=c.fromElement==c.target?c.toElement:c.fromElement}if(c.pageX==null&&c.clientX!=null){var f=document.documentElement,b=document.body;c.pageX=c.clientX+(f&&f.scrollLeft||b&&b.scrollLeft||0)-(f.clientLeft||0);c.pageY=c.clientY+(f&&f.scrollTop||b&&b.scrollTop||0)-(f.clientTop||0)}if(!c.which&&((c.charCode||c.charCode===0)?c.charCode:c.keyCode)){c.which=c.charCode||c.keyCode}if(!c.metaKey&&c.ctrlKey){c.metaKey=c.ctrlKey}if(!c.which&&c.button){c.which=(c.button&1?1:(c.button&2?3:(c.button&4?2:0)))}return c},proxy:function(a,b){b=b||function(){return a.apply(this,arguments)};b.guid=a.guid=a.guid||b.guid||this.guid++;return b},special:{ready:{setup:ab,teardown:function(){}}},specialAll:{live:{setup:function(a,b){Z.event.add(this,b[0],aa)},teardown:function(c){if(c.length){var a=0,b=RegExp("(^|\\.)"+c[0]+"(\\.|$)");Z.each((Z.data(this,"events").live||{}),function(){if(b.test(this.type)){a++}});if(a<1){Z.event.remove(this,c[0],aa)}}}}}};Z.Event=function(a){if(!this.preventDefault){return new Z.Event(a)}if(a&&a.type){this.originalEvent=a;this.type=a.type}else{this.type=a}this.timeStamp=I();this[T]=true};function H(){return false}function J(){return true}Z.Event.prototype={preventDefault:function(){this.isDefaultPrevented=J;var a=this.originalEvent;if(!a){return}if(a.preventDefault){a.preventDefault()}a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=J;var a=this.originalEvent;if(!a){return}if(a.stopPropagation){a.stopPropagation()}a.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=J;this.stopPropagation()},isDefaultPrevented:H,isPropagationStopped:H,isImmediatePropagationStopped:H};var L=function(a){var b=a.relatedTarget;while(b&&b!=this){try{b=b.parentNode}catch(c){b=this}}if(b!=this){a.type=a.data;Z.event.handle.apply(this,arguments)}};Z.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(a,b){Z.event.special[b]={setup:function(){Z.event.add(this,a,L,b)},teardown:function(){Z.event.remove(this,a,L)}}});Z.fn.extend({bind:function(a,b,c){return a=="unload"?this.one(a,b,c):this.each(function(){Z.event.add(this,a,c||b,c&&b)})},one:function(b,d,c){var a=Z.event.proxy(c||d,function(e){Z(this).unbind(e,a);return(c||d).apply(this,arguments)});return this.each(function(){Z.event.add(this,b,a,c&&d)})},unbind:function(a,b){return this.each(function(){Z.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){Z.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var c=Z.Event(a);c.preventDefault();c.stopPropagation();Z.event.trigger(c,b,this[0]);return c.result}},toggle:function(c){var b=arguments,a=1;while(a<b.length){Z.event.proxy(c,b[a++])}return this.click(Z.event.proxy(c,function(d){this.lastToggle=(this.lastToggle||0)%a;d.preventDefault();return b[this.lastToggle++].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b)},ready:function(a){ab();if(Z.isReady){a.call(document,Z)}else{Z.readyList.push(a)}return this},live:function(b,c){var a=Z.event.proxy(c);a.guid+=this.selector+b;Z(document).bind(ad(b,this.selector),this.selector,a);return this},die:function(a,b){Z(document).unbind(ad(a,this.selector),b?{guid:b.guid+this.selector+a}:null);return this}});function aa(a){var c=RegExp("(^|\\.)"+a.type+"(\\.|$)"),b=true,d=[];Z.each(Z.data(this,"events").live||[],function(e,g){if(c.test(g.type)){var f=Z(a.target).closest(g.data)[0];if(f){d.push({elem:f,fn:g})}}});d.sort(function(f,e){return Z.data(f.elem,"closest")-Z.data(e.elem,"closest")});Z.each(d,function(){if(this.fn.call(this.elem,a,this.fn.data)===false){return(b=false)}});return b}function ad(a,b){return["live",a,b.replace(/\./g,"`").replace(/ /g,"|")].join(".")}Z.extend({isReady:false,readyList:[],ready:function(){if(!Z.isReady){Z.isReady=true;if(Z.readyList){Z.each(Z.readyList,function(){this.call(document,Z)});Z.readyList=null}Z(document).triggerHandler("ready")}}});var E=false;function ab(){if(E){return}E=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);Z.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);Z.ready()}});if(document.documentElement.doScroll&&P==P.top){(function(){if(Z.isReady){return}try{document.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}Z.ready()})()}}}Z.event.add(P,"load",Z.ready)}Z.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(a,b){Z.fn[b]=function(c){return c?this.bind(b,c):this.trigger(b)}});Z(P).bind("unload",function(){for(var a in Z.cache){if(a!=1&&Z.cache[a].handle){Z.event.remove(Z.cache[a].handle.elem)}}});(function(){Z.support={};var f=document.documentElement,g=document.createElement("script"),a=document.createElement("div"),c="script"+(new Date).getTime();a.style.display="none";a.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var d=a.getElementsByTagName("*"),b=a.getElementsByTagName("a")[0];if(!d||!d.length||!b){return}Z.support={leadingWhitespace:a.firstChild.nodeType==3,tbody:!a.getElementsByTagName("tbody").length,objectAll:!!a.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/red/.test(b.getAttribute("style")),hrefNormalized:b.getAttribute("href")==="/a",opacity:b.style.opacity==="0.5",cssFloat:!!b.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};g.type="text/javascript";try{g.appendChild(document.createTextNode("window."+c+"=1;"))}catch(e){}f.insertBefore(g,f.firstChild);if(P[c]){Z.support.scriptEval=true;delete P[c]}f.removeChild(g);if(a.attachEvent&&a.fireEvent){a.attachEvent("onclick",function(){Z.support.noCloneEvent=false;a.detachEvent("onclick",arguments.callee)});a.cloneNode(true).fireEvent("onclick")}Z(function(){var h=document.createElement("div");h.style.width=h.style.paddingLeft="1px";document.body.appendChild(h);Z.boxModel=Z.support.boxModel=h.offsetWidth===2;document.body.removeChild(h).style.display="none"})})();var ae=Z.support.cssFloat?"cssFloat":"styleFloat";Z.props={"for":"htmlFor","class":"className","float":ae,cssFloat:ae,styleFloat:ae,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};Z.fn.extend({_load:Z.fn.load,load:function(a,g,e){if(typeof a!=="string"){return this._load(a)}var b=a.indexOf(" ");if(b>=0){var d=a.slice(b,a.length);a=a.slice(0,b)}var f="GET";if(g){if(Z.isFunction(g)){e=g;g=null}else{if(typeof g==="object"){g=Z.param(g);f="POST"}}}var c=this;Z.ajax({url:a,type:f,dataType:"html",data:g,complete:function(h,j){if(j=="success"||j=="notmodified"){c.html(d?Z("<div/>").append(h.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(d):h.responseText)}if(e){c.each(e,[h.responseText,j,h])}}});return this},serialize:function(){return Z.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?Z.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(a,c){var b=Z(this).val();return b==null?null:Z.isArray(b)?Z.map(b,function(e,d){return{name:c.name,value:e}}):{name:c.name,value:b}}).get()}});Z.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(a,b){Z.fn[b]=function(c){return this.bind(b,c)}});var ac=I();Z.extend({get:function(b,d,c,a){if(Z.isFunction(d)){c=d;d=null}return Z.ajax({type:"GET",url:b,data:d,success:c,dataType:a})},getScript:function(a,b){return Z.get(a,null,b,"script")},getJSON:function(a,b,c){return Z.get(a,b,c,"json")},post:function(b,d,c,a){if(Z.isFunction(d)){c=d;d={}}return Z.ajax({type:"POST",url:b,data:d,success:c,dataType:a})},ajaxSetup:function(a){Z.extend(Z.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return P.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(k){k=Z.extend(true,k,Z.extend(true,{},Z.ajaxSettings,k));var u,h=/=\?(&|$)/g,m,s,c=k.type.toUpperCase();if(k.data&&k.processData&&typeof k.data!=="string"){k.data=Z.param(k.data)}if(k.dataType=="jsonp"){if(c=="GET"){if(!k.url.match(h)){k.url+=(k.url.match(/\?/)?"&":"?")+(k.jsonp||"callback")+"=?"}}else{if(!k.data||!k.data.match(h)){k.data=(k.data?k.data+"&":"")+(k.jsonp||"callback")+"=?"}}k.dataType="json"}if(k.dataType=="json"&&(k.data&&k.data.match(h)||k.url.match(h))){u="jsonp"+ac++;if(k.data){k.data=(k.data+"").replace(h,"="+u+"$1")}k.url=k.url.replace(h,"="+u+"$1");k.dataType="script";P[u]=function(y){s=y;j();l();P[u]=F;try{delete P[u]}catch(x){}if(a){a.removeChild(v)}}}if(k.dataType=="script"&&k.cache==null){k.cache=false}if(k.cache===false&&c=="GET"){var g=I();var f=k.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+g+"$2");k.url=f+((f==k.url)?(k.url.match(/\?/)?"&":"?")+"_="+g:"")}if(k.data&&c=="GET"){k.url+=(k.url.match(/\?/)?"&":"?")+k.data;k.data=null}if(k.global&&!Z.active++){Z.event.trigger("ajaxStart")}var o=/^(\w+:)?\/\/([^\/?#]+)/.exec(k.url);if(k.dataType=="script"&&c=="GET"&&o&&(o[1]&&o[1]!=location.protocol||o[2]!=location.host)){var a=document.getElementsByTagName("head")[0];var v=document.createElement("script");v.src=k.url;if(k.scriptCharset){v.charset=k.scriptCharset}if(!u){var w=false;v.onload=v.onreadystatechange=function(){if(!w&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){w=true;j();l();v.onload=v.onreadystatechange=null;a.removeChild(v)}}}a.appendChild(v);return F}var d=false;var b=k.xhr();if(k.username){b.open(c,k.url,k.async,k.username,k.password)}else{b.open(c,k.url,k.async)}try{if(k.data){b.setRequestHeader("Content-Type",k.contentType)}if(k.ifModified){b.setRequestHeader("If-Modified-Since",Z.lastModified[k.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}b.setRequestHeader("X-Requested-With","XMLHttpRequest");b.setRequestHeader("Accept",k.dataType&&k.accepts[k.dataType]?k.accepts[k.dataType]+", */*":k.accepts._default)}catch(e){}if(k.beforeSend&&k.beforeSend(b,k)===false){if(k.global&&!--Z.active){Z.event.trigger("ajaxStop")}b.abort();return false}if(k.global){Z.event.trigger("ajaxSend",[b,k])}var r=function(x){if(b.readyState==0){if(q){clearInterval(q);q=null;if(k.global&&!--Z.active){Z.event.trigger("ajaxStop")}}}else{if(!d&&b&&(b.readyState==4||x=="timeout")){d=true;if(q){clearInterval(q);q=null}m=x=="timeout"?"timeout":!Z.httpSuccess(b)?"error":k.ifModified&&Z.httpNotModified(b,k.url)?"notmodified":"success";if(m=="success"){try{s=Z.httpData(b,k.dataType,k)}catch(y){m="parsererror"}}if(m=="success"){var z;try{z=b.getResponseHeader("Last-Modified")}catch(y){}if(k.ifModified&&z){Z.lastModified[k.url]=z}if(!u){j()}}else{Z.handleError(k,b,m)}l();if(x){b.abort()}if(k.async){b=null}}}};if(k.async){var q=setInterval(r,13);if(k.timeout>0){setTimeout(function(){if(b&&!d){r("timeout")}},k.timeout)}}try{b.send(k.data)}catch(e){Z.handleError(k,b,null,e)}if(!k.async){r()}function j(){if(k.success){k.success(s,m)}if(k.global){Z.event.trigger("ajaxSuccess",[b,k])}}function l(){if(k.complete){k.complete(b,m)}if(k.global){Z.event.trigger("ajaxComplete",[b,k])}if(k.global&&!--Z.active){Z.event.trigger("ajaxStop")}}return b},handleError:function(c,d,b,a){if(c.error){c.error(d,b,a)}if(c.global){Z.event.trigger("ajaxError",[d,c,a])}},active:0,httpSuccess:function(a){try{return !a.status&&location.protocol=="file:"||(a.status>=200&&a.status<300)||a.status==304||a.status==1223}catch(b){}return false},httpNotModified:function(d,b){try{var a=d.getResponseHeader("Last-Modified");return d.status==304||a==Z.lastModified[b]}catch(c){}return false},httpData:function(c,f,a){var d=c.getResponseHeader("content-type"),b=f=="xml"||!f&&d&&d.indexOf("xml")>=0,e=b?c.responseXML:c.responseText;if(b&&e.documentElement.tagName=="parsererror"){throw"parsererror"}if(a&&a.dataFilter){e=a.dataFilter(e,f)}if(typeof e==="string"){if(f=="script"){Z.globalEval(e)}if(f=="json"){e=P["eval"]("("+e+")")}}return e},param:function(b){var c=[];function a(f,e){c[c.length]=encodeURIComponent(f)+"="+encodeURIComponent(e)}if(Z.isArray(b)||b.jquery){Z.each(b,function(){a(this.name,this.value)})}else{for(var d in b){if(Z.isArray(b[d])){Z.each(b[d],function(){a(d,this)})}else{a(d,Z.isFunction(b[d])?b[d]():b[d])}}}return c.join("&").replace(/%20/g,"+")}});var U={},af,R=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function W(c,b){var a={};Z.each(R.concat.apply([],R.slice(0,b)),function(){a[this]=c});return a}Z.fn.extend({show:function(h,e){if(h){return this.animate(W("show",3),h,e)}else{for(var f=0,a=this.length;f<a;f++){var b=Z.data(this[f],"olddisplay");this[f].style.display=b||"";if(Z.css(this[f],"display")==="none"){var c=this[f].tagName,d;if(U[c]){d=U[c]}else{var g=Z("<"+c+" />").appendTo("body");d=g.css("display");if(d==="none"){d="block"}g.remove();U[c]=d}Z.data(this[f],"olddisplay",d)}}for(var f=0,a=this.length;f<a;f++){this[f].style.display=Z.data(this[f],"olddisplay")||""}return this}},hide:function(a,e){if(a){return this.animate(W("hide",3),a,e)}else{for(var b=0,d=this.length;b<d;b++){var c=Z.data(this[b],"olddisplay");if(!c&&c!=="none"){Z.data(this[b],"olddisplay",Z.css(this[b],"display"))}}for(var b=0,d=this.length;b<d;b++){this[b].style.display="none"}return this}},_toggle:Z.fn.toggle,toggle:function(c,a){var b=typeof c==="boolean";return Z.isFunction(c)&&Z.isFunction(a)?this._toggle.apply(this,arguments):c==null||b?this.each(function(){var d=b?c:Z(this).is(":hidden");Z(this)[d?"show":"hide"]()}):this.animate(W("toggle",3),c,a)},fadeTo:function(c,a,b){return this.animate({opacity:a},c,b)},animate:function(b,c,d,e){var a=Z.speed(c,d,e);return this[a.queue===false?"each":"queue"](function(){var g=Z.extend({},a),j,h=this.nodeType==1&&Z(this).is(":hidden"),f=this;for(j in b){if(b[j]=="hide"&&h||b[j]=="show"&&!h){return g.complete.call(this)}if((j=="height"||j=="width")&&this.style){g.display=Z.css(this,"display");g.overflow=this.style.overflow}}if(g.overflow!=null){this.style.overflow="hidden"}g.curAnim=Z.extend({},b);Z.each(b,function(m,s){var o=new Z.fx(f,g,m);if(/toggle|show|hide/.test(s)){o[s=="toggle"?h?"show":"hide":s](b)}else{var q=s.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),k=o.cur(true)||0;if(q){var l=parseFloat(q[2]),r=q[3]||"px";if(r!="px"){f.style[m]=(l||1)+r;k=((l||1)/o.cur(true))*k;f.style[m]=k+r}if(q[1]){l=((q[1]=="-="?-1:1)*l)+k}o.custom(k,l,r)}else{o.custom(k,s,"")}}});return true})},stop:function(c,a){var b=Z.timers;if(c){this.queue([])}this.each(function(){for(var d=b.length-1;d>=0;d--){if(b[d].elem==this){if(a){b[d](true)}b.splice(d,1)}}});if(!a){this.dequeue()}return this}});Z.each({slideDown:W("show",1),slideUp:W("hide",1),slideToggle:W("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){Z.fn[a]=function(d,c){return this.animate(b,d,c)}});Z.extend({speed:function(c,b,d){var a=typeof c==="object"?c:{complete:d||!d&&b||Z.isFunction(c)&&c,duration:c,easing:d&&b||b&&!Z.isFunction(b)&&b};a.duration=Z.fx.off?0:typeof a.duration==="number"?a.duration:Z.fx.speeds[a.duration]||Z.fx.speeds._default;a.old=a.complete;a.complete=function(){if(a.queue!==false){Z(this).dequeue()}if(Z.isFunction(a.old)){a.old.call(this)}};return a},easing:{linear:function(c,a,b,d){return b+d*c},swing:function(c,a,b,d){return((-Math.cos(c*Math.PI)/2)+0.5)*d+b}},timers:[],fx:function(c,b,a){this.options=b;this.elem=c;this.prop=a;if(!b.orig){b.orig={}}}});Z.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(Z.fx.step[this.prop]||Z.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var b=parseFloat(Z.css(this.elem,this.prop,a));return b&&b>-10000?b:parseFloat(Z.curCSS(this.elem,this.prop))||0},custom:function(c,a,b){this.startTime=I();this.start=c;this.end=a;this.unit=b||this.unit||"px";this.now=this.start;this.pos=this.state=0;var d=this;function e(f){return d.step(f)}e.elem=this.elem;if(e()&&Z.timers.push(e)&&!af){af=setInterval(function(){var g=Z.timers;for(var f=0;f<g.length;f++){if(!g[f]()){g.splice(f--,1)}}if(!g.length){clearInterval(af);af=F}},13)}},show:function(){this.options.orig[this.prop]=Z.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());Z(this.elem).show()},hide:function(){this.options.orig[this.prop]=Z.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var e=I();if(a||e>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var b=true;for(var f in this.options.curAnim){if(this.options.curAnim[f]!==true){b=false}}if(b){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(Z.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){Z(this.elem).hide()}if(this.options.hide||this.options.show){for(var c in this.options.curAnim){Z.attr(this.elem.style,c,this.options.orig[c])}}this.options.complete.call(this.elem)}return false}else{var d=e-this.startTime;this.state=d/this.options.duration;this.pos=Z.easing[this.options.easing||(Z.easing.swing?"swing":"linear")](this.state,d,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};Z.extend(Z.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){Z.attr(a.elem.style,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null){a.elem.style[a.prop]=a.now+a.unit}else{a.elem[a.prop]=a.now}}}});if(document.documentElement.getBoundingClientRect){Z.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return Z.offset.bodyOffset(this[0])}var b=this[0].getBoundingClientRect(),e=this[0].ownerDocument,g=e.body,f=e.documentElement,h=f.clientTop||g.clientTop||0,a=f.clientLeft||g.clientLeft||0,c=b.top+(self.pageYOffset||Z.boxModel&&f.scrollTop||g.scrollTop)-h,d=b.left+(self.pageXOffset||Z.boxModel&&f.scrollLeft||g.scrollLeft)-a;return{top:c,left:d}}}else{Z.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return Z.offset.bodyOffset(this[0])}Z.offset.initialized||Z.offset.initialize();var d=this[0],h=d.offsetParent,a=d,b=d.ownerDocument,j,k=b.documentElement,g=b.body,c=b.defaultView,l=c.getComputedStyle(d,null),f=d.offsetTop,e=d.offsetLeft;while((d=d.parentNode)&&d!==g&&d!==k){j=c.getComputedStyle(d,null);f-=d.scrollTop,e-=d.scrollLeft;if(d===h){f+=d.offsetTop,e+=d.offsetLeft;if(Z.offset.doesNotAddBorder&&!(Z.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(d.tagName))){f+=parseInt(j.borderTopWidth,10)||0,e+=parseInt(j.borderLeftWidth,10)||0}a=h,h=d.offsetParent}if(Z.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){f+=parseInt(j.borderTopWidth,10)||0,e+=parseInt(j.borderLeftWidth,10)||0}l=j}if(l.position==="relative"||l.position==="static"){f+=g.offsetTop,e+=g.offsetLeft}if(l.position==="fixed"){f+=Math.max(k.scrollTop,g.scrollTop),e+=Math.max(k.scrollLeft,g.scrollLeft)}return{top:f,left:e}}}Z.offset={initialize:function(){if(this.initialized){return}var g=document.body,k=document.createElement("div"),d,c,h,f,a,b,e=g.style.marginTop,j='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';a={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(b in a){k.style[b]=a[b]}k.innerHTML=j;g.insertBefore(k,g.firstChild);d=k.firstChild,c=d.firstChild,f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(c.offsetTop!==5);this.doesAddBorderForTableAndCells=(f.offsetTop===5);d.style.overflow="hidden",d.style.position="relative";this.subtractsBorderForOverflowNotVisible=(c.offsetTop===-5);g.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(g.offsetTop===0);g.style.marginTop=e;g.removeChild(k);this.initialized=true},bodyOffset:function(b){Z.offset.initialized||Z.offset.initialize();var a=b.offsetTop,c=b.offsetLeft;if(Z.offset.doesNotIncludeMarginInBodyOffset){a+=parseInt(Z.curCSS(b,"marginTop",true),10)||0,c+=parseInt(Z.curCSS(b,"marginLeft",true),10)||0}return{top:a,left:c}}};Z.fn.extend({position:function(){var c=0,f=0,e;if(this[0]){var b=this.offsetParent(),a=this.offset(),d=/^body|html$/i.test(b[0].tagName)?{top:0,left:0}:b.offset();a.top-=ah(this,"marginTop");a.left-=ah(this,"marginLeft");d.top+=ah(b,"borderTopWidth");d.left+=ah(b,"borderLeftWidth");e={top:a.top-d.top,left:a.left-d.left}}return e},offsetParent:function(){var a=this[0].offsetParent||document.body;while(a&&(!/^body|html$/i.test(a.tagName)&&Z.css(a,"position")=="static")){a=a.offsetParent}return Z(a)}});Z.each(["Left","Top"],function(b,a){var c="scroll"+a;Z.fn[c]=function(d){if(!this[0]){return null}return d!==F?this.each(function(){this==P||this==document?P.scrollTo(!b?d:Z(P).scrollLeft(),b?d:Z(P).scrollTop()):this[c]=d}):this[0]==P||this[0]==document?self[b?"pageYOffset":"pageXOffset"]||Z.boxModel&&document.documentElement[c]||document.body[c]:this[0][c]}});Z.each(["Height","Width"],function(f,a){var c=f?"Left":"Top",d=f?"Right":"Bottom",b=a.toLowerCase();Z.fn["inner"+a]=function(){return this[0]?Z.css(this[0],b,false,"padding"):null};Z.fn["outer"+a]=function(g){return this[0]?Z.css(this[0],b,false,g?"margin":"border"):null};var e=a.toLowerCase();Z.fn[e]=function(g){return this[0]==P?document.compatMode=="CSS1Compat"&&document.documentElement["client"+a]||document.body["client"+a]:this[0]==document?Math.max(document.documentElement["client"+a],document.body["scroll"+a],document.documentElement["scroll"+a],document.body["offset"+a],document.documentElement["offset"+a]):g===F?(this.length?Z.css(this[0],e):null):this.css(e,typeof g==="string"?g:g+"px")}})})();jQuery.fn.delay=function(d,c){this.each(function(){setTimeout(c,d)});return this};
/*!!!!!!!!!!!!!!!
* jQuery Cycle Plugin (with Transition Definitions)
* Examples and documentation at: http://jquery.malsup.com/cycle/
* Copyright (c) 2007-2009 M. Alsup
* Version: 2.71 (11-AUG-2009)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
* Requires: jQuery v1.2.6 or later
*/
(function(w){var z="2.71";if(w.support==undefined){w.support={opacity:!(w.browser.msie)}}function s(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "))}}w.fn.cycle=function(a,c){var b={s:this.selector,c:this.context};if(this.length===0&&a!="stop"){if(!w.isReady&&b.s){s("DOM not ready, queuing slideshow");w(function(){w(b.s,b.c).cycle(a,c)});return this}s("terminating; zero elements found by selector"+(w.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var h=r(this,a,c);if(h===false){return}if(this.cycleTimeout){clearTimeout(this.cycleTimeout)}this.cycleTimeout=this.cyclePause=0;var g=w(this);var e=h.slideExpr?w(h.slideExpr,this):g.children();var d=e.get();if(d.length<2){s("terminating; too few slides: "+d.length);return}var f=v(g,e,d,h,b);if(f===false){return}if(f.timeout||f.continuous){this.cycleTimeout=setTimeout(function(){D(d,f,0,!f.rev)},f.continuous?10:f.timeout+(f.delay||0))}})};function r(e,a,b){if(e.cycleStop==undefined){e.cycleStop=0}if(a===undefined||a===null){a={}}if(a.constructor==String){switch(a){case"stop":e.cycleStop++;if(e.cycleTimeout){clearTimeout(e.cycleTimeout)}e.cycleTimeout=0;w(e).removeData("cycle.opts");return false;case"pause":e.cyclePause=1;return false;case"resume":e.cyclePause=0;if(b===true){a=w(e).data("cycle.opts");if(!a){s("options not found, can not resume");return false}if(e.cycleTimeout){clearTimeout(e.cycleTimeout);e.cycleTimeout=0}D(a.elements,a,1,1)}return false;case"prev":case"next":var d=w(e).data("cycle.opts");if(!d){s('options not found, "prev/next" ignored');return false}w.fn.cycle[a](d);return false;default:a={fx:a}}return a}else{if(a.constructor==Number){var c=a;a=w(e).data("cycle.opts");if(!a){s("options not found, can not advance slide");return false}if(c<0||c>=a.elements.length){s("invalid slide index: "+c);return false}a.nextSlide=c;if(e.cycleTimeout){clearTimeout(e.cycleTimeout);e.cycleTimeout=0}if(typeof b=="string"){a.oneTimeFx=b}D(a.elements,a,1,c>=a.currSlide);return false}}return a}function C(a,c){if(!w.support.opacity&&c.cleartype&&a.style.filter){try{a.style.removeAttribute("filter")}catch(b){}}}function v(Q,a,L,N,P){var M=w.extend({},w.fn.cycle.defaults,N||{},w.metadata?Q.metadata():w.meta?Q.data():{});if(M.autostop){M.countdown=M.autostopCount||L.length}var h=Q[0];Q.data("cycle.opts",M);M.$cont=Q;M.stopCount=h.cycleStop;M.elements=L;M.before=M.before?[M.before]:[];M.after=M.after?[M.after]:[];M.after.unshift(function(){M.busy=0});if(!w.support.opacity&&M.cleartype){M.after.push(function(){C(this,M)})}if(M.continuous){M.after.push(function(){D(L,M,0,!M.rev)})}o(M);if(!w.support.opacity&&M.cleartype&&!M.cleartypeNoBg){x(a)}if(Q.css("position")=="static"){Q.css("position","relative")}if(M.width){Q.width(M.width)}if(M.height&&M.height!="auto"){Q.height(M.height)}if(M.startingSlide){M.startingSlide=parseInt(M.startingSlide)}if(M.random){M.randomMap=[];for(var S=0;S<L.length;S++){M.randomMap.push(S)}M.randomMap.sort(function(E,F){return Math.random()-0.5});M.randomIndex=0;M.startingSlide=M.randomMap[0]}else{if(M.startingSlide>=L.length){M.startingSlide=0}}M.currSlide=M.startingSlide=M.startingSlide||0;var O=M.startingSlide;a.css({position:"absolute",top:0,left:0}).hide().each(function(F){var E=O?F>=O?L.length-(F-O):O-F:L.length-F;w(this).css("z-index",E)});w(L[O]).css("opacity",1).show();C(L[O],M);if(M.fit&&M.width){a.width(M.width)}if(M.fit&&M.height&&M.height!="auto"){a.height(M.height)}var l=M.containerResize&&!Q.innerHeight();if(l){var g=0,d=0;for(var c=0;c<L.length;c++){var e=w(L[c]),m=e[0],f=e.outerWidth(),R=e.outerHeight();if(!f){f=m.offsetWidth}if(!R){R=m.offsetHeight}g=f>g?f:g;d=R>d?R:d}if(g>0&&d>0){Q.css({width:g+"px",height:d+"px"})}}if(M.pause){Q.hover(function(){this.cyclePause++},function(){this.cyclePause--})}if(y(M)===false){return false}if(!M.multiFx){var j=w.fn.cycle.transitions[M.fx];if(w.isFunction(j)){j(Q,a,M)}else{if(M.fx!="custom"&&!M.multiFx){s("unknown transition: "+M.fx,"; slideshow terminating");return false}}}var k=false;N.requeueAttempts=N.requeueAttempts||0;a.each(function(){var H=w(this);this.cycleH=(M.fit&&M.height)?M.height:H.height();this.cycleW=(M.fit&&M.width)?M.width:H.width();if(H.is("img")){var F=(w.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var I=(w.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete);var E=(w.browser.opera&&((this.cycleW==42&&this.cycleH==19)||(this.cycleW==37&&this.cycleH==17))&&!this.complete);var G=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(F||I||E||G){if(P.s&&M.requeueOnImageNotLoaded&&++N.requeueAttempts<100){s(N.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){w(P.s,P.c).cycle(N)},M.requeueTimeout);k=true;return false}else{s("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}}return true});if(k){return false}M.cssBefore=M.cssBefore||{};M.animIn=M.animIn||{};M.animOut=M.animOut||{};a.not(":eq("+O+")").css(M.cssBefore);if(M.cssFirst){w(a[O]).css(M.cssFirst)}if(M.timeout){M.timeout=parseInt(M.timeout);if(M.speed.constructor==String){M.speed=w.fx.speeds[M.speed]||parseInt(M.speed)}if(!M.sync){M.speed=M.speed/2}while((M.timeout-M.speed)<250){M.timeout+=M.speed}}if(M.easing){M.easeIn=M.easeOut=M.easing}if(!M.speedIn){M.speedIn=M.speed}if(!M.speedOut){M.speedOut=M.speed}M.slideCount=L.length;M.currSlide=M.lastSlide=O;if(M.random){M.nextSlide=M.currSlide;if(++M.randomIndex==L.length){M.randomIndex=0}M.nextSlide=M.randomMap[M.randomIndex]}else{M.nextSlide=M.startingSlide>=(L.length-1)?0:M.startingSlide+1}var b=a[O];if(M.before.length){M.before[0].apply(b,[b,b,M,true])}if(M.after.length>1){M.after[1].apply(b,[b,b,M,true])}if(M.next){w(M.next).bind(M.prevNextEvent,function(){return q(M,M.rev?-1:1)})}if(M.prev){w(M.prev).bind(M.prevNextEvent,function(){return q(M,M.rev?1:-1)})}if(M.pager){u(L,M)}B(M,L);return M}function o(a){a.original={before:[],after:[]};a.original.cssBefore=w.extend({},a.cssBefore);a.original.cssAfter=w.extend({},a.cssAfter);a.original.animIn=w.extend({},a.animIn);a.original.animOut=w.extend({},a.animOut);w.each(a.before,function(){a.original.before.push(this)});w.each(a.after,function(){a.original.after.push(this)})}function y(g){var f,d,e=w.fn.cycle.transitions;if(g.fx.indexOf(",")>0){g.multiFx=true;g.fxs=g.fx.replace(/\s*/g,"").split(",");for(f=0;f<g.fxs.length;f++){var a=g.fxs[f];d=e[a];if(!d||!e.hasOwnProperty(a)||!w.isFunction(d)){s("discarding unknown transition: ",a);g.fxs.splice(f,1);f--}}if(!g.fxs.length){s("No valid transitions named; slideshow terminating.");return false}}else{if(g.fx=="all"){g.multiFx=true;g.fxs=[];for(p in e){d=e[p];if(e.hasOwnProperty(p)&&w.isFunction(d)){g.fxs.push(p)}}}}if(g.multiFx&&g.randomizeEffects){var b=Math.floor(Math.random()*20)+30;for(f=0;f<b;f++){var c=Math.floor(Math.random()*g.fxs.length);g.fxs.push(g.fxs.splice(c,1)[0])}s("randomized fx sequence: ",g.fxs)}return true}function B(b,a){b.addSlide=function(e,f){var c=w(e),d=c[0];if(!b.autostopCount){b.countdown++}a[f?"unshift":"push"](d);if(b.els){b.els[f?"unshift":"push"](d)}b.slideCount=a.length;c.css("position","absolute");c[f?"prependTo":"appendTo"](b.$cont);if(f){b.currSlide++;b.nextSlide++}if(!w.support.opacity&&b.cleartype&&!b.cleartypeNoBg){x(c)}if(b.fit&&b.width){c.width(b.width)}if(b.fit&&b.height&&b.height!="auto"){$slides.height(b.height)}d.cycleH=(b.fit&&b.height)?b.height:c.height();d.cycleW=(b.fit&&b.width)?b.width:c.width();c.css(b.cssBefore);if(b.pager){w.fn.cycle.createPagerAnchor(a.length-1,d,w(b.pager),a,b)}if(w.isFunction(b.onAddSlide)){b.onAddSlide(c)}else{c.hide()}}}w.fn.cycle.resetState=function(a,c){c=c||a.fx;a.before=[];a.after=[];a.cssBefore=w.extend({},a.original.cssBefore);a.cssAfter=w.extend({},a.original.cssAfter);a.animIn=w.extend({},a.original.animIn);a.animOut=w.extend({},a.original.animOut);a.fxFn=null;w.each(a.original.before,function(){a.before.push(this)});w.each(a.original.after,function(){a.after.push(this)});var b=w.fn.cycle.transitions[c];if(w.isFunction(b)){b(a.$cont,w(a.elements),a)}};function D(c,l,k,b){if(k&&l.busy&&l.manualTrump){w(c).stop(true,true);l.busy=false}if(l.busy){return}var a=l.$cont[0],h=c[l.currSlide],d=c[l.nextSlide];if(a.cycleStop!=l.stopCount||a.cycleTimeout===0&&!k){return}if(!k&&!a.cyclePause&&((l.autostop&&(--l.countdown<=0))||(l.nowrap&&!l.random&&l.nextSlide<l.currSlide))){if(l.end){l.end(l)}return}if(k||!a.cyclePause){var j=l.fx;h.cycleH=h.cycleH||w(h).height();h.cycleW=h.cycleW||w(h).width();d.cycleH=d.cycleH||w(d).height();d.cycleW=d.cycleW||w(d).width();if(l.multiFx){if(l.lastFx==undefined||++l.lastFx>=l.fxs.length){l.lastFx=0}j=l.fxs[l.lastFx];l.currFx=j}if(l.oneTimeFx){j=l.oneTimeFx;l.oneTimeFx=null}w.fn.cycle.resetState(l,j);if(l.before.length){w.each(l.before,function(m,E){if(a.cycleStop!=l.stopCount){return}E.apply(d,[h,d,l,b])})}var e=function(){w.each(l.after,function(m,E){if(a.cycleStop!=l.stopCount){return}E.apply(d,[h,d,l,b])})};if(l.nextSlide!=l.currSlide){l.busy=1;if(l.fxFn){l.fxFn(h,d,l,e,b)}else{if(w.isFunction(w.fn.cycle[l.fx])){w.fn.cycle[l.fx](h,d,l,e)}else{w.fn.cycle.custom(h,d,l,e,k&&l.fastOnEvent)}}}l.lastSlide=l.currSlide;if(l.random){l.currSlide=l.nextSlide;if(++l.randomIndex==c.length){l.randomIndex=0}l.nextSlide=l.randomMap[l.randomIndex]}else{var f=(l.nextSlide+1)==c.length;l.nextSlide=f?0:l.nextSlide+1;l.currSlide=f?c.length-1:l.nextSlide-1}if(l.pager){w.fn.cycle.updateActivePagerLink(l.pager,l.currSlide)}}var g=0;if(l.timeout&&!l.continuous){g=A(h,d,l,b)}else{if(l.continuous&&a.cyclePause){g=10}}if(g>0){a.cycleTimeout=setTimeout(function(){D(c,l,0,!l.rev)},g)}}w.fn.cycle.updateActivePagerLink=function(b,a){w(b).find("a").removeClass("activeSlide").filter("a:eq("+a+")").addClass("activeSlide")};function A(d,a,e,c){if(e.timeoutFn){var b=e.timeoutFn(d,a,e,c);if(b!==false){return b}}return e.timeout}w.fn.cycle.next=function(a){q(a,a.rev?-1:1)};w.fn.cycle.prev=function(a){q(a,a.rev?1:-1)};function q(e,d){var a=e.elements;var c=e.$cont[0],b=c.cycleTimeout;if(b){clearTimeout(b);c.cycleTimeout=0}if(e.random&&d<0){e.randomIndex--;if(--e.randomIndex==-2){e.randomIndex=a.length-2}else{if(e.randomIndex==-1){e.randomIndex=a.length-1}}e.nextSlide=e.randomMap[e.randomIndex]}else{if(e.random){if(++e.randomIndex==a.length){e.randomIndex=0}e.nextSlide=e.randomMap[e.randomIndex]}else{e.nextSlide=e.currSlide+d;if(e.nextSlide<0){if(e.nowrap){return false}e.nextSlide=a.length-1}else{if(e.nextSlide>=a.length){if(e.nowrap){return false}e.nextSlide=0}}}}if(w.isFunction(e.prevNextClick)){e.prevNextClick(d>0,e.nextSlide,a[e.nextSlide])}D(a,e,1,d>=0);return false}function u(c,a){var b=w(a.pager);w.each(c,function(e,d){w.fn.cycle.createPagerAnchor(e,d,b,c,a)});w.fn.cycle.updateActivePagerLink(a.pager,a.startingSlide)}w.fn.cycle.createPagerAnchor=function(d,b,g,c,h){var a;if(w.isFunction(h.pagerAnchorBuilder)){a=h.pagerAnchorBuilder(d,b)}else{a='<a href="#">'+(d+1)+"</a>"}if(!a){return}var f=w(a);if(f.parents("body").length===0){var e=[];if(g.length>1){g.each(function(){var j=f.clone(true);w(this).append(j);e.push(j)});f=w(e)}else{f.appendTo(g)}}f.bind(h.pagerEvent,function(j){j.preventDefault();h.nextSlide=d;var k=h.$cont[0],l=k.cycleTimeout;if(l){clearTimeout(l);k.cycleTimeout=0}if(w.isFunction(h.pagerClick)){h.pagerClick(h.nextSlide,c[h.nextSlide])}D(c,h,1,h.currSlide<d);return false});if(h.pagerEvent!="click"){f.click(function(){return false})}if(h.pauseOnPagerHover){f.hover(function(){h.$cont[0].cyclePause++},function(){h.$cont[0].cyclePause--})}};w.fn.cycle.hopsFromLast=function(a,d){var e,c=a.lastSlide,b=a.currSlide;if(d){e=b>c?b-c:a.slideCount-c}else{e=b<c?c-b:c+a.slideCount-b}return e};function x(a){function b(d){d=parseInt(d).toString(16);return d.length<2?"0"+d:d}function c(d){for(;d&&d.nodeName.toLowerCase()!="html";d=d.parentNode){var e=w.css(d,"background-color");if(e.indexOf("rgb")>=0){var f=e.match(/\d+/g);return"#"+b(f[0])+b(f[1])+b(f[2])}if(e&&e!="transparent"){return e}}return"#ffffff"}a.each(function(){w(this).css("background-color",c(this))})}w.fn.cycle.commonReset=function(e,a,f,c,b,d){w(f.elements).not(e).hide();f.cssBefore.opacity=1;f.cssBefore.display="block";if(c!==false&&a.cycleW>0){f.cssBefore.width=a.cycleW}if(b!==false&&a.cycleH>0){f.cssBefore.height=a.cycleH}f.cssAfter=f.cssAfter||{};f.cssAfter.display="none";w(e).css("zIndex",f.slideCount+(d===true?1:0));w(a).css("zIndex",f.slideCount+(d===true?0:1))};w.fn.cycle.custom=function(c,g,m,j,d){var f=w(c),e=w(g);var a=m.speedIn,b=m.speedOut,h=m.easeIn,k=m.easeOut;e.css(m.cssBefore);if(d){if(typeof d=="number"){a=b=d}else{a=b=1}h=k=null}var l=function(){e.animate(m.animIn,a,h,j)};f.animate(m.animOut,b,k,function(){if(m.cssAfter){f.css(m.cssAfter)}if(!m.sync){l()}});if(m.sync){l()}};w.fn.cycle.transitions={fade:function(a,c,b){c.not(":eq("+b.currSlide+")").css("opacity",0);b.before.push(function(d,f,e){w.fn.cycle.commonReset(d,f,e);e.cssBefore.opacity=0});b.animIn={opacity:1};b.animOut={opacity:0};b.cssBefore={top:0,left:0}}};w.fn.cycle.ver=function(){return z};w.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,prevNextEvent:"click",pager:null,pagerClick:null,pagerEvent:"click",pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!w.support.opacity,cleartypeNoBg:false,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250}})(jQuery);
/*!!!!!!!!!!!!!!!
* jQuery Cycle Plugin Transition Definitions
* This script is a plugin for the jQuery Cycle Plugin
* Copyright (c) 2007-2008 M. Alsup
* Version:	 2.52
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
(function(b){b.fn.cycle.transitions.scrollUp=function(a,f,g){a.css("overflow","hidden");g.before.push(b.fn.cycle.commonReset);var h=a.height();g.cssBefore={top:h,left:0};g.cssFirst={top:0};g.animIn={top:0};g.animOut={top:-h}};b.fn.cycle.transitions.scrollDown=function(a,f,g){a.css("overflow","hidden");g.before.push(b.fn.cycle.commonReset);var h=a.height();g.cssFirst={top:0};g.cssBefore={top:-h,left:0};g.animIn={top:0};g.animOut={top:h}};b.fn.cycle.transitions.scrollLeft=function(a,f,g){a.css("overflow","hidden");g.before.push(b.fn.cycle.commonReset);var h=a.width();g.cssFirst={left:0};g.cssBefore={left:h,top:0};g.animIn={left:0};g.animOut={left:0-h}};b.fn.cycle.transitions.scrollRight=function(a,f,g){a.css("overflow","hidden");g.before.push(b.fn.cycle.commonReset);var h=a.width();g.cssFirst={left:0};g.cssBefore={left:-h,top:0};g.animIn={left:0};g.animOut={left:h}};b.fn.cycle.transitions.scrollHorz=function(f,a,e){f.css("overflow","hidden").width();e.before.push(function(c,k,j,d){b.fn.cycle.commonReset(c,k,j);j.cssBefore.left=d?(k.cycleW-1):(1-k.cycleW);j.animOut.left=d?-c.cycleW:c.cycleW});e.cssFirst={left:0};e.cssBefore={top:0};e.animIn={left:0};e.animOut={top:0}};b.fn.cycle.transitions.scrollVert=function(f,a,e){f.css("overflow","hidden");e.before.push(function(c,k,j,d){b.fn.cycle.commonReset(c,k,j);j.cssBefore.top=d?(1-k.cycleH):(k.cycleH-1);j.animOut.top=d?c.cycleH:-c.cycleH});e.cssFirst={top:0};e.cssBefore={left:0};e.animIn={top:0};e.animOut={left:0}};b.fn.cycle.transitions.slideX=function(f,a,e){e.before.push(function(c,h,d){b(d.elements).not(c).hide();b.fn.cycle.commonReset(c,h,d,false,true);d.animIn.width=h.cycleW});e.cssBefore={left:0,top:0,width:0};e.animIn={width:"show"};e.animOut={width:0}};b.fn.cycle.transitions.slideY=function(f,a,e){e.before.push(function(c,h,d){b(d.elements).not(c).hide();b.fn.cycle.commonReset(c,h,d,true,false);d.animIn.height=h.cycleH});e.cssBefore={left:0,top:0,height:0};e.animIn={height:"show"};e.animOut={height:0}};b.fn.cycle.transitions.shuffle=function(g,j,a){var h,k=g.css("overflow","visible").width();j.css({left:0,top:0});a.before.push(function(e,d,c){b.fn.cycle.commonReset(e,d,c,true,true,true)});a.speed=a.speed/2;a.random=0;a.shuffle=a.shuffle||{left:-k,top:15};a.els=[];for(h=0;h<j.length;h++){a.els.push(j[h])}for(h=0;h<a.currSlide;h++){a.els.push(a.els.shift())}a.fxFn=function(r,d,c,q,o){var e=o?b(r):b(d);b(d).css(c.cssBefore);var f=c.slideCount;e.animate(c.shuffle,c.speedIn,c.easeIn,function(){var v=b.fn.cycle.hopsFromLast(c,o);for(var u=0;u<v;u++){o?c.els.push(c.els.shift()):c.els.unshift(c.els.pop())}if(o){for(var m=0,w=c.els.length;m<w;m++){b(c.els[m]).css("z-index",w-m+f)}}else{var l=b(r).css("z-index");e.css("z-index",parseInt(l)+1+f)}e.animate({left:0,top:0},c.speedOut,c.easeOut,function(){b(o?this:r).hide();if(q){q()}})})};a.cssBefore={display:"block",opacity:1,top:0,left:0}};b.fn.cycle.transitions.turnUp=function(f,a,e){e.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,true,false);d.cssBefore.top=h.cycleH;d.animIn.height=h.cycleH});e.cssFirst={top:0};e.cssBefore={left:0,height:0};e.animIn={top:0};e.animOut={height:0}};b.fn.cycle.transitions.turnDown=function(f,a,e){e.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,true,false);d.animIn.height=h.cycleH;d.animOut.top=c.cycleH});e.cssFirst={top:0};e.cssBefore={left:0,top:0,height:0};e.animOut={height:0}};b.fn.cycle.transitions.turnLeft=function(f,a,e){e.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,false,true);d.cssBefore.left=h.cycleW;d.animIn.width=h.cycleW});e.cssBefore={top:0,width:0};e.animIn={left:0};e.animOut={width:0}};b.fn.cycle.transitions.turnRight=function(f,a,e){e.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,false,true);d.animIn.width=h.cycleW;d.animOut.left=c.cycleW});e.cssBefore={top:0,left:0,width:0};e.animIn={left:0};e.animOut={width:0}};b.fn.cycle.transitions.zoom=function(f,a,e){e.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,false,false,true);d.cssBefore.top=h.cycleH/2;d.cssBefore.left=h.cycleW/2;d.animIn={top:0,left:0,width:h.cycleW,height:h.cycleH};d.animOut={width:0,height:0,top:c.cycleH/2,left:c.cycleW/2}});e.cssFirst={top:0,left:0};e.cssBefore={width:0,height:0}};b.fn.cycle.transitions.fadeZoom=function(f,a,e){e.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,false,false);d.cssBefore.left=h.cycleW/2;d.cssBefore.top=h.cycleH/2;d.animIn={top:0,left:0,width:h.cycleW,height:h.cycleH}});e.cssBefore={width:0,height:0};e.animOut={opacity:0}};b.fn.cycle.transitions.blindX=function(a,f,g){var h=a.css("overflow","hidden").width();g.before.push(function(d,c,e){b.fn.cycle.commonReset(d,c,e);e.animIn.width=c.cycleW;e.animOut.left=d.cycleW});g.cssBefore={left:h,top:0};g.animIn={left:0};g.animOut={left:h}};b.fn.cycle.transitions.blindY=function(a,f,g){var h=a.css("overflow","hidden").height();g.before.push(function(d,c,e){b.fn.cycle.commonReset(d,c,e);e.animIn.height=c.cycleH;e.animOut.top=d.cycleH});g.cssBefore={top:h,left:0};g.animIn={top:0};g.animOut={top:h}};b.fn.cycle.transitions.blindZ=function(a,g,h){var k=a.css("overflow","hidden").height();var j=a.width();h.before.push(function(e,d,c){b.fn.cycle.commonReset(e,d,c);c.animIn.height=d.cycleH;c.animOut.top=e.cycleH});h.cssBefore={top:k,left:j};h.animIn={top:0,left:0};h.animOut={top:k,left:j}};b.fn.cycle.transitions.growX=function(f,a,e){e.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,false,true);d.cssBefore.left=this.cycleW/2;d.animIn={left:0,width:this.cycleW};d.animOut={left:0}});e.cssBefore={width:0,top:0}};b.fn.cycle.transitions.growY=function(f,a,e){e.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,true,false);d.cssBefore.top=this.cycleH/2;d.animIn={top:0,height:this.cycleH};d.animOut={top:0}});e.cssBefore={height:0,left:0}};b.fn.cycle.transitions.curtainX=function(f,a,e){e.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,false,true,true);d.cssBefore.left=h.cycleW/2;d.animIn={left:0,width:this.cycleW};d.animOut={left:c.cycleW/2,width:0}});e.cssBefore={top:0,width:0}};b.fn.cycle.transitions.curtainY=function(f,a,e){e.before.push(function(c,h,d){b.fn.cycle.commonReset(c,h,d,true,false,true);d.cssBefore.top=h.cycleH/2;d.animIn={top:0,height:h.cycleH};d.animOut={top:c.cycleH/2,height:0}});e.cssBefore={left:0,height:0}};b.fn.cycle.transitions.cover=function(l,d,a){var h=a.direction||"left";var k=l.css("overflow","hidden").width();var j=l.height();a.before.push(function(c,f,e){b.fn.cycle.commonReset(c,f,e);if(h=="right"){e.cssBefore.left=-k}else{if(h=="up"){e.cssBefore.top=j}else{if(h=="down"){e.cssBefore.top=-j}else{e.cssBefore.left=k}}}});a.animIn={left:0,top:0};a.animOut={opacity:1};a.cssBefore={top:0,left:0}};b.fn.cycle.transitions.uncover=function(l,d,a){var h=a.direction||"left";var k=l.css("overflow","hidden").width();var j=l.height();a.before.push(function(c,f,e){b.fn.cycle.commonReset(c,f,e,true,true,true);if(h=="right"){e.animOut.left=k}else{if(h=="up"){e.animOut.top=-j}else{if(h=="down"){e.animOut.top=j}else{e.animOut.left=-k}}}});a.animIn={left:0,top:0};a.animOut={opacity:1};a.cssBefore={top:0,left:0}};b.fn.cycle.transitions.toss=function(a,g,h){var k=a.css("overflow","visible").width();var j=a.height();h.before.push(function(e,d,c){b.fn.cycle.commonReset(e,d,c,true,true,true);if(!c.animOut.left&&!c.animOut.top){c.animOut={left:k*2,top:-j/2,opacity:0}}else{c.animOut.opacity=0}});h.cssBefore={left:0,top:0};h.animIn={left:0}};b.fn.cycle.transitions.wipe=function(v,y,z){var C=v.css("overflow","hidden").width();var B=v.height();z.cssBefore=z.cssBefore||{};var a;if(z.clip){if(/l2r/.test(z.clip)){a="rect(0px 0px "+B+"px 0px)"}else{if(/r2l/.test(z.clip)){a="rect(0px "+C+"px "+B+"px "+C+"px)"}else{if(/t2b/.test(z.clip)){a="rect(0px "+C+"px 0px 0px)"}else{if(/b2t/.test(z.clip)){a="rect("+B+"px "+C+"px "+B+"px 0px)"}else{if(/zoom/.test(z.clip)){var l=parseInt(B/2);var h=parseInt(C/2);a="rect("+l+"px "+h+"px "+l+"px "+h+"px)"}}}}}}z.cssBefore.clip=z.cssBefore.clip||a||"rect(0px 0px 0px 0px)";var d=z.cssBefore.clip.match(/(\d+)/g);var A=parseInt(d[0]),x=parseInt(d[1]),w=parseInt(d[2]),r=parseInt(d[3]);z.before.push(function(g,j,c){if(g==j){return}var f=b(g),k=b(j);b.fn.cycle.commonReset(g,j,c,true,true,false);c.cssAfter.display="block";var e=1,m=parseInt((c.speedIn/13))-1;(function o(){var D=A?A-parseInt(e*(A/m)):0;var q=r?r-parseInt(e*(r/m)):0;var u=w<B?w+parseInt(e*((B-w)/m||1)):B;var s=x<C?x+parseInt(e*((C-x)/m||1)):C;k.css({clip:"rect("+D+"px "+s+"px "+u+"px "+q+"px)"});(e++<=m)?setTimeout(o,13):f.css("display","none")})()});z.cssBefore={display:"block",opacity:1,top:0,left:0};z.animIn={left:0};z.animOut={left:0}}})(jQuery);
/*!!!!!!!!!!!!!!!!
* jQuery corner plugin: simple corner rounding
* Examples and documentation at: http://jquery.malsup.com/corner/
* version 2.01 (08-SEP-2009)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
(function(l){var s=l.browser.mozilla&&/gecko/i.test(navigator.userAgent);var o=l.browser.safari&&l.browser.version>=3;var k=l.browser.msie&&(function(){var a=document.createElement("div");try{a.style.setExpression("width","0+0")}catch(b){return false}return true})();function j(a,b){return parseInt(l.css(a,b))||0}function r(a){var a=parseInt(a).toString(16);return(a.length<2)?"0"+a:a}function q(c){for(;c&&c.nodeName.toLowerCase()!="html";c=c.parentNode){var a=l.css(c,"backgroundColor");if(a=="rgba(0, 0, 0, 0)"){continue}if(a.indexOf("rgb")>=0){var b=a.match(/\d+/g);return"#"+r(b[0])+r(b[1])+r(b[2])}if(a&&a!="transparent"){return a}}return"#ffffff"}function m(c,b,a){switch(c){case"round":return Math.round(a*(1-Math.cos(Math.asin(b/a))));case"cool":return Math.round(a*(1+Math.cos(Math.asin(b/a))));case"sharp":return Math.round(a*(1-Math.cos(Math.acos(b/a))));case"bite":return Math.round(a*(Math.cos(Math.asin((a-b-1)/a))));case"slide":return Math.round(a*(Math.atan2(b,a/b)));case"jut":return Math.round(a*(Math.atan2(a,(a-b-1))));case"curl":return Math.round(a*(Math.atan(b)));case"tear":return Math.round(a*(Math.cos(b)));case"wicked":return Math.round(a*(Math.tan(b)));case"long":return Math.round(a*(Math.sqrt(b)));case"sculpt":return Math.round(a*(Math.log((a-b-1),a)));case"dog":return(b&1)?(b+1):a;case"dog2":return(b&2)?(b+1):a;case"dog3":return(b&3)?(b+1):a;case"fray":return(b%2)*a;case"notch":return a;case"bevel":return b+1}}l.fn.corner=function(b){if(this.length==0){if(!l.isReady&&this.selector){var c=this.selector,a=this.context;l(function(){l(c,a).corner(b)})}return this}return this.each(function(M){var L=l(this);var d=(b||L.attr(l.fn.corner.defaults.metaAttr)||"").toLowerCase();var R=/keep/.test(d);var O=((d.match(/cc:(#[0-9a-f]+)/)||[])[1]);var V=((d.match(/sc:(#[0-9a-f]+)/)||[])[1]);var X=parseInt((d.match(/(\d+)px/)||[])[1])||10;var g=/round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;var S=((d.match(g)||["round"])[0]);var U={T:0,B:1};var P={TL:/top|tl|left/.test(d),TR:/top|tr|right/.test(d),BL:/bottom|bl|left/.test(d),BR:/bottom|br|right/.test(d)};if(!P.TL&&!P.TR&&!P.BL&&!P.BR){P={TL:1,TR:1,BL:1,BR:1}}if(l.fn.corner.defaults.useNative&&S=="round"&&(s||o)&&!O&&!V){if(P.TL){L.css(s?"-moz-border-radius-topleft":"-webkit-border-top-left-radius",X+"px")}if(P.TR){L.css(s?"-moz-border-radius-topright":"-webkit-border-top-right-radius",X+"px")}if(P.BL){L.css(s?"-moz-border-radius-bottomleft":"-webkit-border-bottom-left-radius",X+"px")}if(P.BR){L.css(s?"-moz-border-radius-bottomright":"-webkit-border-bottom-right-radius",X+"px")}return}var h=document.createElement("div");h.style.overflow="hidden";h.style.height="1px";h.style.backgroundColor=V||"transparent";h.style.borderStyle="solid";var J={T:parseInt(l.css(this,"paddingTop"))||0,R:parseInt(l.css(this,"paddingRight"))||0,B:parseInt(l.css(this,"paddingBottom"))||0,L:parseInt(l.css(this,"paddingLeft"))||0};if(typeof this.style.zoom!=undefined){this.style.zoom=1}if(!R){this.style.border="none"}h.style.borderColor=O||q(this.parentNode);var W=l.curCSS(this,"height");for(var e in U){var w=U[e];if((w&&(P.BL||P.BR))||(!w&&(P.TL||P.TR))){h.style.borderStyle="none "+(P[e+"R"]?"solid":"none")+" none "+(P[e+"L"]?"solid":"none");var T=document.createElement("div");l(T).addClass("jquery-corner");var K=T.style;w?this.appendChild(T):this.insertBefore(T,this.firstChild);if(w&&W!="auto"){if(l.css(this,"position")=="static"){this.style.position="relative"}K.position="absolute";K.bottom=K.left=K.padding=K.margin="0";if(k){K.setExpression("width","this.parentNode.offsetWidth")}else{K.width="100%"}}else{if(!w&&l.browser.msie){if(l.css(this,"position")=="static"){this.style.position="relative"}K.position="absolute";K.top=K.left=K.right=K.padding=K.margin="0";if(k){var f=j(this,"borderLeftWidth")+j(this,"borderRightWidth");K.setExpression("width","this.parentNode.offsetWidth - "+f+'+ "px"')}else{K.width="100%"}}else{K.position="relative";K.margin=!w?"-"+J.T+"px -"+J.R+"px "+(J.T-X)+"px -"+J.L+"px":(J.B-X)+"px -"+J.R+"px -"+J.B+"px -"+J.L+"px"}}for(var N=0;N<X;N++){var Q=Math.max(0,m(S,N,X));var Y=h.cloneNode(false);Y.style.borderWidth="0 "+(P[e+"R"]?Q:0)+"px 0 "+(P[e+"L"]?Q:0)+"px";w?T.appendChild(Y):T.insertBefore(Y,T.firstChild)}}}})};l.fn.uncorner=function(){if(s||o){this.css(s?"-moz-border-radius":"-webkit-border-radius",0)}l("div.jquery-corner",this).remove();return this};l.fn.corner.defaults={useNative:true,metaAttr:"data-corner"}})(jQuery);(function(b){b.fn.mask=function(a,d){b(this).each(function(){if(d!==undefined&&d>0){var c=b(this);c.data("_mask_timeout",setTimeout(function(){b.maskElement(c,a)},d))}else{b.maskElement(b(this),a)}})};b.fn.unmask=function(){b(this).each(function(){b.unmaskElement(b(this))})};b.fn.isMasked=function(){return this.hasClass("masked")};b.maskElement=function(a,g){if(a.data("_mask_timeout")!==undefined){clearTimeout(a.data("_mask_timeout"));a.removeData("_mask_timeout")}if(a.isMasked()){b.unmaskElement(a)}if(a.css("position")=="static"){a.addClass("masked-relative")}a.addClass("masked");var f=b('<div class="loadmask"></div>');if(navigator.userAgent.toLowerCase().indexOf("msie")>-1){f.height(a.height()+parseInt(a.css("padding-top"))+parseInt(a.css("padding-bottom")));f.width(a.width()+parseInt(a.css("padding-left"))+parseInt(a.css("padding-right")))}if(navigator.userAgent.toLowerCase().indexOf("msie 6")>-1){a.find("select").addClass("masked-hidden")}a.append(f);if(g!==undefined){var h=b('<div class="loadmask-msg" style="display:none;"></div>');h.append("<div>"+g+"</div>");a.append(h);h.css("top",Math.round(a.height()/2-(h.height()-parseInt(h.css("padding-top"))-parseInt(h.css("padding-bottom")))/2)+"px");h.css("left",Math.round(a.width()/2-(h.width()-parseInt(h.css("padding-left"))-parseInt(h.css("padding-right")))/2)+"px");h.show()}};b.unmaskElement=function(a){if(a.data("_mask_timeout")!==undefined){clearTimeout(a.data("_mask_timeout"));a.removeData("_mask_timeout")}a.find(".loadmask-msg,.loadmask").remove();a.removeClass("masked");a.removeClass("masked-relative");a.find("select").removeClass("masked-hidden")}})(jQuery);$(document).ready(function(){$("#ss-sel").bind("mouseenter",function(a){var b=820;widthDiff=document.body.clientWidth-1041;if(widthDiff>0){newLeft=b+widthDiff/2}else{newLeft=b}$("#ss-menu").stop(true,true).slideDown(300);var c=$("#ss").offset();$("#coverselect").css({left:newLeft+"px",top:(c.top+18)+"px"});$("#coverselect").show()});$("#ss").bind("mouseleave",function(a){$("#ss").delay(0,function(){$("#ss-menu").stop(true,true).slideUp(300)});$("#coverselect").hide()});$("#main #left-nav li li").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")});$("#left-nav-warrants2 li li").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")});if(!document.all){$("#bannerrotator").cycle({fx:"fade",timeout:4000})}});
/*!!!!!!!!!!!!!!!!!!!!!
 * jqModal - Minimalist Modaling with jQuery
 *   (http://dev.iceburg.net/jquery/jqModal/)
 *
 * Copyright (c) 2007,2008 Brice Burgess <bhb@iceburg.net>
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 * 
 * $Version: 03/01/2009 +r14
 */
(function(c){c.fn.jqm=function(f){var e={overlay:50,overlayClass:"jqmOverlay",closeClass:"jqmClose",trigger:".jqModal",ajax:j,ajaxText:"",target:j,modal:j,toTop:j,onShow:j,onHide:j,onLoad:j};return this.each(function(){if(this._jqm){return o[this._jqm].c=c.extend({},o[this._jqm].c,f)}d++;this._jqm=d;o[d]={c:c.extend(e,c.jqm.params,f),a:j,w:c(this).addClass("jqmID"+d),s:d};if(e.trigger){c(this).jqmAddTrigger(e.trigger)}})};c.fn.jqmAddClose=function(f){return q(this,f,"jqmHide")};c.fn.jqmAddTrigger=function(f){return q(this,f,"jqmShow")};c.fn.jqmShow=function(e){return this.each(function(){e=e||window.event;c.jqm.open(this._jqm,e)})};c.fn.jqmHide=function(e){return this.each(function(){e=e||window.event;c.jqm.close(this._jqm,e)})};c.jqm={hash:{},open:function(m,w){var B=o[m],e=B.c,f="."+e.closeClass,A=(parseInt(B.w.css("z-index"))),A=(A>0)?A:3000,D=c("<div></div>").css({height:"100%",width:"100%",position:"fixed",left:0,top:0,"z-index":A-1,opacity:e.overlay/100});if(B.a){return j}B.t=w;B.a=true;B.w.css("z-index",A);if(e.modal){if(!h[0]){a("bind")}h.push(m)}else{if(e.overlay>0){B.w.jqmAddClose(D)}else{D=j}}B.o=(D)?D.addClass(e.overlayClass).prependTo("body"):j;if(b){c("html,body").css({height:"100%",width:"100%"});if(D){D=D.css({position:"absolute"})[0];for(var C in {Top:1,Left:1}){D.style.setExpression(C.toLowerCase(),"(_=(document.documentElement.scroll"+C+" || document.body.scroll"+C+"))+'px'")}}}if(e.ajax){var v=e.target||B.w,x=e.ajax,v=(typeof v=="string")?c(v,B.w):c(v),x=(x.substr(0,1)=="@")?c(w).attr(x.substring(1)):x;v.html(e.ajaxText).load(x,function(){if(e.onLoad){e.onLoad.call(this,B)}if(f){B.w.jqmAddClose(c(f,B.w))}k(B)})}else{if(f){B.w.jqmAddClose(c(f,B.w))}}if(e.toTop&&B.o){B.w.before('<span id="jqmP'+B.w[0]._jqm+'"></span>').insertAfter(B.o)}(e.onShow)?e.onShow(B):B.w.show();k(B);return j},close:function(f){var e=o[f];if(!e.a){return j}e.a=j;if(h[0]){h.pop();if(!h[0]){a("unbind")}}if(e.c.toTop&&e.o){c("#jqmP"+e.w[0]._jqm).after(e.w).remove()}if(e.c.onHide){e.c.onHide(e)}else{e.w.hide();if(e.o){e.o.remove()}}return j},params:{}};var d=0,o=c.jqm.hash,h=[],b=c.browser.msie&&(c.browser.version=="6.0"),j=false,l=c('<iframe src="javascript:false;document.write(\'\');" class="jqm"></iframe>').css({opacity:0}),k=function(e){if(b){if(e.o){e.o.html('<p style="width:100%;height:100%"/>').prepend(l)}else{if(!c("iframe.jqm",e.w)[0]){e.w.prepend(l)}}}g(e)},g=function(f){try{c(":input:visible",f.w)[0].focus()}catch(e){}},a=function(e){c()[e]("keypress",r)[e]("keydown",r)[e]("mousedown",r)},r=function(f){var m=o[h[h.length-1]],s=(!c(f.target).parents(".jqmID"+m.s)[0]);if(s){g(m)}return !s},q=function(f,m,e){return f.each(function(){var u=this._jqm;c(m).each(function(){if(!this[e]){this[e]=[];c(this).click(function(){for(var v in {jqmShow:1,jqmHide:1}){for(var w in this[v]){if(o[this[v][w]]){o[this[v][w]].w[v](this)}}}return j})}this[e].push(u)})})}})(jQuery);
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 * jqDnR - Minimalistic Drag'n'Resize for jQuery.
 *
 * Copyright (c) 2007 Brice Burgess <bhb@iceburg.net>, http://www.iceburg.net
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 * 
 * $Version: 2007.08.19 +r2
 */
(function(b){b.fn.jqDrag=function(f){return g(this,f,"d")};b.fn.jqResize=function(f){return g(this,f,"r")};b.jqDnR={dnr:{},e:0,drag:function(f){if(a.k=="d"){d.css({left:a.X+f.pageX-a.pX,top:a.Y+f.pageY-a.pY})}else{d.css({width:Math.max(f.pageX-a.pX+a.W,0),height:Math.max(f.pageY-a.pY+a.H,0)})}return false},stop:function(){d.css("opacity",a.o);b().unbind("mousemove",e.drag).unbind("mouseup",e.stop)}};var e=b.jqDnR,a=e.dnr,d=e.e,g=function(f,j,l){return f.each(function(){j=(j)?b(j,f):f;j.bind("mousedown",{e:f,k:l},function(m){var h=m.data,k={};d=h.e;if(d.css("position")!="relative"){try{d.position(k)}catch(o){}}a={X:k.left||c("left")||0,Y:k.top||c("top")||0,W:c("width")||d[0].scrollWidth||0,H:c("height")||d[0].scrollHeight||0,pX:m.pageX,pY:m.pageY,k:h.k,o:d.css("opacity")};d.css({opacity:0.8});b().mousemove(b.jqDnR.drag).mouseup(b.jqDnR.stop);return false})})},c=function(f){return parseInt(d.css(f))||false}})(jQuery);jQuery.ui||(function(b){var f=b.fn.remove,g=b.browser.mozilla&&(parseFloat(b.browser.version)<1.9);b.ui={version:"1.7.2",plugin:{add:function(l,k,m){var o=b.ui[l].prototype;for(var q in m){o.plugins[q]=o.plugins[q]||[];o.plugins[q].push([k,m[q]])}},call:function(k,m,q){var l=k.plugins[m];if(!l||!k.element[0].parentNode){return}for(var o=0;o<l.length;o++){if(k.options[l[o][0]]){l[o][1].apply(k.element,q)}}}},contains:function(l,k){return document.compareDocumentPosition?l.compareDocumentPosition(k)&16:l!==k&&l.contains(k)},hasScroll:function(l,o){if(b(l).css("overflow")=="hidden"){return false}var m=(o&&o=="left")?"scrollLeft":"scrollTop",k=false;if(l[m]>0){return true}l[m]=1;k=(l[m]>0);l[m]=0;return k},isOverAxis:function(k,l,m){return(k>l)&&(k<(l+m))},isOver:function(q,r,o,k,l,m){return b.ui.isOverAxis(q,o,l)&&b.ui.isOverAxis(r,k,m)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(g){var e=b.attr,c=b.fn.removeAttr,a="http://www.w3.org/2005/07/aaa",j=/^aria-/,d=/^wairole:/;b.attr=function(k,l,o){var m=o!==undefined;return(l=="role"?(m?e.call(this,k,l,"wairole:"+o):(e.apply(this,arguments)||"").replace(d,"")):(j.test(l)?(m?k.setAttributeNS(a,l.replace(j,"aaa:"),o):e.call(this,k,l.replace(j,"aaa:"))):e.apply(this,arguments)))};b.fn.removeAttr=function(k){return(j.test(k)?this.each(function(){this.removeAttributeNS(a,k.replace(j,""))}):c.call(this,k))}}b.fn.extend({remove:function(){b("*",this).add(this).each(function(){b(this).triggerHandler("remove")});return f.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var k;if((b.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){k=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(b.curCSS(this,"position",1))&&(/(auto|scroll)/).test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0)}else{k=this.parents().filter(function(){return(/(auto|scroll)/).test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!k.length?b(document):k}});b.extend(b.expr[":"],{data:function(k,l,m){return !!b.data(k,m[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),m=b.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(m):!isNaN(m))&&!b(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(l){var k=b.attr(l,"tabindex");return(isNaN(k)||k>=0)&&b(l).is(":focusable")}});function h(m,k,q,o){function r(s){var u=b[m][k][s]||[];return(typeof u=="string"?u.split(/,?\s+/):u)}var l=r("getter");if(o.length==1&&typeof o[0]=="string"){l=l.concat(r("getterSetter"))}return(b.inArray(q,l)!=-1)}b.widget=function(k,l){var m=k.split(".")[0];k=k.split(".")[1];b.fn[k]=function(r){var s=(typeof r=="string"),q=Array.prototype.slice.call(arguments,1);if(s&&r.substring(0,1)=="_"){return this}if(s&&h(m,k,r,q)){var o=b.data(this[0],k);return(o?o[r].apply(o,q):undefined)}return this.each(function(){var u=b.data(this,k);(!u&&!s&&b.data(this,k,new b[m][k](this,r))._init());(u&&s&&b.isFunction(u[r])&&u[r].apply(u,q))})};b[m]=b[m]||{};b[m][k]=function(o,r){var q=this;this.namespace=m;this.widgetName=k;this.widgetEventPrefix=b[m][k].eventPrefix||k;this.widgetBaseClass=m+"-"+k;this.options=b.extend({},b.widget.defaults,b[m][k].defaults,b.metadata&&b.metadata.get(o)[k],r);this.element=b(o).bind("setData."+k,function(s,u,v){if(s.target==o){return q._setData(u,v)}}).bind("getData."+k,function(u,s){if(u.target==o){return q._getData(s)}}).bind("remove",function(){return q.destroy()})};b[m][k].prototype=b.extend({},b.widget.prototype,l);b[m][k].getterSetter="option"};b.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(m,o){var k=m,l=this;if(typeof m=="string"){if(o===undefined){return this._getData(m)}k={};k[m]=o}b.each(k,function(r,q){l._setData(r,q)})},_getData:function(k){return this.options[k]},_setData:function(l,k){this.options[l]=k;if(l=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(q,k,m){var o=this.options[q],s=(q==this.widgetEventPrefix?q:this.widgetEventPrefix+q);k=b.Event(k);k.type=s;if(k.originalEvent){for(var r=b.event.props.length,l;r;){l=b.event.props[--r];k[l]=k.originalEvent[l]}}this.element.trigger(k,m);return !(b.isFunction(o)&&o.call(this.element[0],k,m)===false||k.isDefaultPrevented())}};b.widget.defaults={disabled:false};b.ui.mouse={_mouseInit:function(){var k=this;this.element.bind("mousedown."+this.widgetName,function(l){return k._mouseDown(l)}).bind("click."+this.widgetName,function(l){if(k._preventClickEvent){k._preventClickEvent=false;l.stopImmediatePropagation();return false}});if(b.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(b.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var m=this,o=(l.which==1),k=(typeof this.options.cancel=="string"?b(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!o||k||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){m.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(q){return m._mouseMove(q)};this._mouseUpDelegate=function(q){return m._mouseUp(q)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(b.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(k){if(b.browser.msie&&!k.button){return this._mouseUp(k)}if(this._mouseStarted){this._mouseDrag(k);return k.preventDefault()}if(this._mouseDistanceMet(k)&&this._mouseDelayMet(k)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,k)!==false);(this._mouseStarted?this._mouseDrag(k):this._mouseUp(k))}return !this._mouseStarted},_mouseUp:function(k){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(k.target==this._mouseDownEvent.target);this._mouseStop(k)}return false},_mouseDistanceMet:function(k){return(Math.max(Math.abs(this._mouseDownEvent.pageX-k.pageX),Math.abs(this._mouseDownEvent.pageY-k.pageY))>=this.options.distance)},_mouseDelayMet:function(k){return this.mouseDelayMet},_mouseStart:function(k){},_mouseDrag:function(k){},_mouseStop:function(k){},_mouseCapture:function(k){return true}};b.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger("start",b);this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(b){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,b)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var c=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",b);c._clear()})}else{this._trigger("stop",b);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var d=a(e.containment)[0];if(!d){return}var b=a(e.containment).offset();var c=(a(d).css("overflow")!="hidden");this.containment=[b.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0)-this.margins.left,b.top+(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0)-this.margins.top,b.left+(c?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,b.top+(c?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(e,h){if(!h){h=this.position}var c=e=="absolute"?1:-1;var g=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(f?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:b.scrollLeft())*c))}},_generatePosition:function(b){var j=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(c[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var e=b.pageX;var d=b.pageY;if(this.originalPosition){if(this.containment){if(b.pageX-this.offset.click.left<this.containment[0]){e=this.containment[0]+this.offset.click.left}if(b.pageY-this.offset.click.top<this.containment[1]){d=this.containment[1]+this.offset.click.top}if(b.pageX-this.offset.click.left>this.containment[2]){e=this.containment[2]+this.offset.click.left}if(b.pageY-this.offset.click.top>this.containment[3]){d=this.containment[3]+this.offset.click.top}}if(j.grid){var h=this.originalPageY+Math.round((d-this.originalPageY)/j.grid[1])*j.grid[1];d=this.containment?(!(h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3])?h:(!(h-this.offset.click.top<this.containment[1])?h-j.grid[1]:h+j.grid[1])):h;var f=this.originalPageX+Math.round((e-this.originalPageX)/j.grid[0])*j.grid[0];e=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-j.grid[0]:f+j.grid[0])):f}}return{top:(d-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:c.scrollTop())))),left:(e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:c.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(c,b,d){d=d||this._uiHash();a.ui.plugin.call(this,c,[b,d]);if(c=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.widget.prototype._trigger.call(this,c,b,d)},plugins:{},_uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));a.extend(a.ui.draggable,{version:"1.7.2",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,d){var b=a(this).data("draggable"),e=b.options,f=a.extend({},d,{item:b.element});b.sortables=[];a(e.connectToSortable).each(function(){var g=a.data(this,"sortable");if(g&&!g.options.disabled){b.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",c,f)}})},stop:function(c,d){var b=a(this).data("draggable"),e=a.extend({},d,{item:b.element});a.each(b.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;b.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;if(b.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,e)}})},drag:function(d,e){var c=a(this).data("draggable"),b=this;var f=function(r){var l=this.offset.click.top,j=this.offset.click.left;var m=this.positionAbs.top,h=this.positionAbs.left;var g=r.height,q=r.width;var s=r.top,k=r.left;return a.ui.isOver(m+l,h+j,s,k,g,q)};a.each(c.sortables,function(g){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(b).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return e.helper[0]};d.target=this.instance.currentItem[0];this.instance._mouseCapture(d,true);this.instance._mouseStart(d,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;c._trigger("toSortable",d);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}if(this.instance.currentItem){this.instance._mouseDrag(d)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",d,this.instance._uiHash(this.instance));this.instance._mouseStop(d,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}c._trigger("fromSortable",d);c.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(c,d){var e=a("body"),b=a(this).data("draggable").options;if(e.css("cursor")){b._cursor=e.css("cursor")}e.css("cursor",b.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._cursor){a("body").css("cursor",d._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(b,c){var d=a(this).data("draggable").options;a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(c,b){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var e=a(d.helper),b=a(this).data("draggable").options;if(e.css("opacity")){b._opacity=e.css("opacity")}e.css("opacity",b.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(c,d){var b=a(this).data("draggable"),e=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!e.axis||e.axis!="x"){if((b.overflowOffset.top+b.scrollParent[0].offsetHeight)-c.pageY<e.scrollSensitivity){b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+e.scrollSpeed}else{if(c.pageY-b.overflowOffset.top<e.scrollSensitivity){b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-e.scrollSpeed}}}if(!e.axis||e.axis!="y"){if((b.overflowOffset.left+b.scrollParent[0].offsetWidth)-c.pageX<e.scrollSensitivity){b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+e.scrollSpeed}else{if(c.pageX-b.overflowOffset.left<e.scrollSensitivity){b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-e.scrollSpeed}}}}else{if(!e.axis||e.axis!="x"){if(c.pageY-a(document).scrollTop()<e.scrollSensitivity){f=a(document).scrollTop(a(document).scrollTop()-e.scrollSpeed)}else{if(a(window).height()-(c.pageY-a(document).scrollTop())<e.scrollSensitivity){f=a(document).scrollTop(a(document).scrollTop()+e.scrollSpeed)}}}if(!e.axis||e.axis!="y"){if(c.pageX-a(document).scrollLeft()<e.scrollSensitivity){f=a(document).scrollLeft(a(document).scrollLeft()-e.scrollSpeed)}else{if(a(window).width()-(c.pageX-a(document).scrollLeft())<e.scrollSensitivity){f=a(document).scrollLeft(a(document).scrollLeft()+e.scrollSpeed)}}}}if(f!==false&&a.ui.ddmanager&&!e.dropBehaviour){a.ui.ddmanager.prepareOffsets(b,c)}}});a.ui.plugin.add("draggable","snap",{start:function(c,d){var b=a(this).data("draggable"),e=b.options;b.snapElements=[];a(e.snap.constructor!=String?(e.snap.items||":data(draggable)"):e.snap).each(function(){var g=a(this);var f=g.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left})}})},drag:function(e,c){var w=a(this).data("draggable"),A=w.options;var g=A.snapTolerance;var h=c.offset.left,q=h+w.helperProportions.width,j=c.offset.top,s=j+w.helperProportions.height;for(var z=w.snapElements.length-1;z>=0;z--){var B=w.snapElements[z].left,u=B+w.snapElements[z].width,x=w.snapElements[z].top,C=x+w.snapElements[z].height;if(!((B-g<h&&h<u+g&&x-g<j&&j<C+g)||(B-g<h&&h<u+g&&x-g<s&&s<C+g)||(B-g<q&&q<u+g&&x-g<j&&j<C+g)||(B-g<q&&q<u+g&&x-g<s&&s<C+g))){if(w.snapElements[z].snapping){(w.options.snap.release&&w.options.snap.release.call(w.element,e,a.extend(w._uiHash(),{snapItem:w.snapElements[z].item})))}w.snapElements[z].snapping=false;continue}if(A.snapMode!="inner"){var v=Math.abs(x-s)<=g;var m=Math.abs(C-j)<=g;var k=Math.abs(B-q)<=g;var f=Math.abs(u-h)<=g;if(v){c.position.top=w._convertPositionTo("relative",{top:x-w.helperProportions.height,left:0}).top-w.margins.top}if(m){c.position.top=w._convertPositionTo("relative",{top:C,left:0}).top-w.margins.top}if(k){c.position.left=w._convertPositionTo("relative",{top:0,left:B-w.helperProportions.width}).left-w.margins.left}if(f){c.position.left=w._convertPositionTo("relative",{top:0,left:u}).left-w.margins.left}}var y=(v||m||k||f);if(A.snapMode!="outer"){var v=Math.abs(x-j)<=g;var m=Math.abs(C-s)<=g;var k=Math.abs(B-h)<=g;var f=Math.abs(u-q)<=g;if(v){c.position.top=w._convertPositionTo("relative",{top:x,left:0}).top-w.margins.top}if(m){c.position.top=w._convertPositionTo("relative",{top:C-w.helperProportions.height,left:0}).top-w.margins.top}if(k){c.position.left=w._convertPositionTo("relative",{top:0,left:B}).left-w.margins.left}if(f){c.position.left=w._convertPositionTo("relative",{top:0,left:u-w.helperProportions.width}).left-w.margins.left}}if(!w.snapElements[z].snapping&&(v||m||k||f||y)){(w.options.snap.snap&&w.options.snap.snap.call(w.element,e,a.extend(w._uiHash(),{snapItem:w.snapElements[z].item})))}w.snapElements[z].snapping=(v||m||k||f||y)}}});a.ui.plugin.add("draggable","stack",{start:function(b,c){var e=a(this).data("draggable").options;var d=a.makeArray(a(e.stack.group)).sort(function(g,f){return(parseInt(a(g).css("zIndex"),10)||e.stack.min)-(parseInt(a(f).css("zIndex"),10)||e.stack.min)});a(d).each(function(f){this.style.zIndex=e.stack.min+f});this[0].style.zIndex=e.stack.min+d.length}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){var e=a(d.helper),b=a(this).data("draggable").options;if(e.css("zIndex")){b._zIndex=e.css("zIndex")}e.css("zIndex",b.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._zIndex){a(c.helper).css("zIndex",d._zIndex)}}})})(jQuery);(function(a){a.widget("ui.resizable",a.extend({},a.ui.mouse,{_init:function(){var d=this,j=this.options;this.element.addClass("ui-resizable");a.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&a.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!a(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var h=this.handles.split(",");this.handles={};for(var g=0;g<h.length;g++){var f=a.trim(h[g]),k="ui-resizable-"+f;var e=a('<div class="ui-resizable-handle '+k+'"></div>');if(/sw|se|ne|nw/.test(f)){e.css({zIndex:++j.zIndex})}if("se"==f){e.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[f]=".ui-resizable-"+f;this.element.append(e)}}this._renderAxis=function(m){m=m||this.element;for(var o in this.handles){if(this.handles[o].constructor==String){this.handles[o]=a(this.handles[o],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var r=a(this.handles[o],this.element),q=0;q=/sw|ne|nw|se|n|s/.test(o)?r.outerHeight():r.outerWidth();var l=["padding",/ne|nw|n/.test(o)?"Top":/se|sw|s/.test(o)?"Bottom":/^e$/.test(o)?"Right":"Left"].join("");m.css(l,q);this._proportionallyResize()}if(!a(this.handles[o]).length){continue}}};this._renderAxis(this.element);this._handles=a(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!d.resizing){if(this.className){var l=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}d.axis=l&&l[1]?l[1]:"se"}});if(j.autoHide){this._handles.hide();a(this.element).addClass("ui-resizable-autohide").hover(function(){a(this).removeClass("ui-resizable-autohide");d._handles.show()},function(){if(!d.resizing){a(this).addClass("ui-resizable-autohide");d._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(f){a(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var d=this.element;d.parent().append(this.originalElement.css({position:d.css("position"),width:d.outerWidth(),height:d.outerHeight(),top:d.css("top"),left:d.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement)},_mouseCapture:function(e){var d=false;for(var f in this.handles){if(a(this.handles[f])[0]==e.target){d=true}}return this.options.disabled||!!d},_mouseStart:function(d){var k=this.options,h=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:h.top,left:h.left})}if(a.browser.opera&&(/relative/).test(e.css("position"))){e.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=c(this.helper.css("left")),g=c(this.helper.css("top"));if(k.containment){j+=a(k.containment).scrollLeft()||0;g+=a(k.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:d.pageX,top:d.pageY};this.aspectRatio=(typeof k.aspectRatio=="number")?k.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var f=a(".ui-resizable-"+this.axis).css("cursor");a("body").css("cursor",f=="auto"?this.axis+"-resize":f);e.addClass("ui-resizable-resizing");this._propagate("start",d);return true},_mouseDrag:function(h){var q=this.helper,s=this.options,m={},g=this,r=this.originalMousePosition,e=this.axis;var l=(h.pageX-r.left)||0,u=(h.pageY-r.top)||0;var j=this._change[e];if(!j){return false}var k=j.apply(this,[h,l,u]),f=a.browser.msie&&a.browser.version<7,d=this.sizeDiff;if(this._aspectRatio||h.shiftKey){k=this._updateRatio(k,h)}k=this._respectSize(k,h);this._propagate("resize",h);q.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",h,this.ui());return false},_mouseStop:function(q){this.resizing=false;var m=this.options,e=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),l=d&&a.ui.hasScroll(f[0],"left")?0:e.sizeDiff.height,k=d?0:e.sizeDiff.width;var g={width:(e.size.width-k),height:(e.size.height-l)},h=(parseInt(e.element.css("left"),10)+(e.position.left-e.originalPosition.left))||null,j=(parseInt(e.element.css("top"),10)+(e.position.top-e.originalPosition.top))||null;if(!m.animate){this.element.css(a.extend(g,{top:j,left:h}))}e.helper.height(e.size.height);e.helper.width(e.size.width);if(this._helper&&!m.animate){this._proportionallyResize()}}a("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",q);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(b(d.left)){this.position.left=d.left}if(b(d.top)){this.position.top=d.top}if(b(d.height)){this.size.height=d.height}if(b(d.width)){this.size.width=d.width}},_updateRatio:function(f,d){var j=this.options,h=this.position,e=this.size,g=this.axis;if(f.height){f.width=(e.height*this.aspectRatio)}else{if(f.width){f.height=(e.width/this.aspectRatio)}}if(g=="sw"){f.left=h.left+(e.width-f.width);f.top=null}if(g=="nw"){f.top=h.top+(e.height-f.height);f.left=h.left+(e.width-f.width)}return f},_respectSize:function(g,e){var r=this.helper,u=this.options,q=this._aspectRatio||e.shiftKey,d=this.axis,k=b(g.width)&&u.maxWidth&&(u.maxWidth<g.width),w=b(g.height)&&u.maxHeight&&(u.maxHeight<g.height),m=b(g.width)&&u.minWidth&&(u.minWidth>g.width),j=b(g.height)&&u.minHeight&&(u.minHeight>g.height);if(m){g.width=u.minWidth}if(j){g.height=u.minHeight}if(k){g.width=u.maxWidth}if(w){g.height=u.maxHeight}var s=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height;var v=/sw|nw|w/.test(d),f=/nw|ne|n/.test(d);if(m&&v){g.left=s-u.minWidth}if(k&&v){g.left=s-u.maxWidth}if(j&&f){g.top=h-u.minHeight}if(w&&f){g.top=h-u.maxHeight}var l=!g.width&&!g.height;if(l&&!g.left&&g.top){g.top=null}else{if(l&&!g.top&&g.left){g.left=null}}return g},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var h=0;h<this._proportionallyResizeElements.length;h++){var e=this._proportionallyResizeElements[h];if(!this.borderDif){var d=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],f=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];this.borderDif=a.map(d,function(m,k){var l=parseInt(m,10)||0,o=parseInt(f[k],10)||0;return l+o})}if(a.browser.msie&&!(!(a(g).is(":hidden")||a(g).parents(":hidden").length))){continue}e.css({height:(g.height()-this.borderDif[0]-this.borderDif[2])||0,width:(g.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var f=this.element,g=this.options;this.elementOffset=f.offset();if(this._helper){this.helper=this.helper||a('<div style="overflow:hidden;"></div>');var h=a.browser.msie&&a.browser.version<7,e=(h?1:0),d=(h?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+d,height:this.element.outerHeight()+d,position:"absolute",left:this.elementOffset.left-e+"px",top:this.elementOffset.top-e+"px",zIndex:++g.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(e,d,f){return{width:this.originalSize.width+d}},w:function(d,g,e){var j=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+g,width:f.width-g}},n:function(d,g,e){var j=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+e,height:f.height-e}},s:function(e,d,f){return{height:this.originalSize.height+f}},se:function(e,d,f){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,d,f]))},sw:function(e,d,f){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,d,f]))},ne:function(e,d,f){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,d,f]))},nw:function(e,d,f){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,d,f]))}},_propagate:function(e,d){a.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));a.extend(a.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});a.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=a(this).data("resizable"),g=d.options;_store=function(h){a(h).each(function(){a(this).data("resizable-alsoresize",{width:parseInt(a(this).width(),10),height:parseInt(a(this).height(),10),left:parseInt(a(this).css("left"),10),top:parseInt(a(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{a.each(g.alsoResize,function(h,j){_store(h)})}}else{_store(g.alsoResize)}},resize:function(e,j){var g=a(this).data("resizable"),k=g.options,d=g.originalSize,f=g.originalPosition;var l={height:(g.size.height-d.height)||0,width:(g.size.width-d.width)||0,top:(g.position.top-f.top)||0,left:(g.position.left-f.left)||0},h=function(m,o){a(m).each(function(){var r=a(this),s=a(this).data("resizable-alsoresize"),q={},u=o&&o.length?o:["width","height","top","left"];a.each(u||["width","height","top","left"],function(v,w){var x=(s[w]||0)+(l[w]||0);if(x&&x>=0){q[w]=x||null}});if(/relative/.test(r.css("position"))&&a.browser.opera){g._revertToRelativePosition=true;r.css({position:"absolute",top:"auto",left:"auto"})}r.css(q)})};if(typeof(k.alsoResize)=="object"&&!k.alsoResize.nodeType){a.each(k.alsoResize,function(m,o){h(m,o)})}else{h(k.alsoResize)}},stop:function(e,f){var d=a(this).data("resizable");if(d._revertToRelativePosition&&a.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}a(this).removeData("resizable-alsoresize-start")}});a.ui.plugin.add("resizable","animate",{stop:function(e,k){var g=a(this).data("resizable"),q=g.options;var f=g._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),m=d&&a.ui.hasScroll(f[0],"left")?0:g.sizeDiff.height,l=d?0:g.sizeDiff.width;var r={width:(g.size.width-l),height:(g.size.height-m)},h=(parseInt(g.element.css("left"),10)+(g.position.left-g.originalPosition.left))||null,j=(parseInt(g.element.css("top"),10)+(g.position.top-g.originalPosition.top))||null;g.element.animate(a.extend(r,j&&h?{top:j,left:h}:{}),{duration:q.animateDuration,easing:q.animateEasing,step:function(){var o={width:parseInt(g.element.css("width"),10),height:parseInt(g.element.css("height"),10),top:parseInt(g.element.css("top"),10),left:parseInt(g.element.css("left"),10)};if(f&&f.length){a(f[0]).css({width:o.width,height:o.height})}g._updateCache(o);g._propagate("resize",e)}})}});a.ui.plugin.add("resizable","containment",{start:function(e,d){var k=a(this).data("resizable"),s=k.options,v=k.element;var h=s.containment,u=(h instanceof a)?h.get(0):(/parent/.test(h))?v.parent().get(0):h;if(!u){return}k.containerElement=a(u);if(/document/.test(h)||h==document){k.containerOffset={left:0,top:0};k.containerPosition={left:0,top:0};k.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}}else{var f=a(u),m=[];a(["Top","Right","Left","Bottom"]).each(function(o,w){m[o]=c(f.css("padding"+w))});k.containerOffset=f.offset();k.containerPosition=f.position();k.containerSize={height:(f.innerHeight()-m[3]),width:(f.innerWidth()-m[1])};var q=k.containerOffset,j=k.containerSize.height,r=k.containerSize.width,g=(a.ui.hasScroll(u,"left")?u.scrollWidth:r),l=(a.ui.hasScroll(u)?u.scrollHeight:j);k.parentData={element:u,left:q.left,top:q.top,width:g,height:l}}},resize:function(f,d){var q=a(this).data("resizable"),v=q.options,e=q.containerSize,g=q.containerOffset,j=q.size,s=q.position,l=q._aspectRatio||f.shiftKey,u={top:0,left:0},w=q.containerElement;if(w[0]!=document&&(/static/).test(w.css("position"))){u=g}if(s.left<(q._helper?g.left:0)){q.size.width=q.size.width+(q._helper?(q.position.left-g.left):(q.position.left-u.left));if(l){q.size.height=q.size.width/v.aspectRatio}q.position.left=v.helper?g.left:0}if(s.top<(q._helper?g.top:0)){q.size.height=q.size.height+(q._helper?(q.position.top-g.top):q.position.top);if(l){q.size.width=q.size.height*v.aspectRatio}q.position.top=q._helper?g.top:0}q.offset.left=q.parentData.left+q.position.left;q.offset.top=q.parentData.top+q.position.top;var m=Math.abs((q._helper?q.offset.left-u.left:(q.offset.left-u.left))+q.sizeDiff.width),h=Math.abs((q._helper?q.offset.top-u.top:(q.offset.top-g.top))+q.sizeDiff.height);var r=q.containerElement.get(0)==q.element.parent().get(0),k=/relative|absolute/.test(q.containerElement.css("position"));if(r&&k){m-=q.parentData.left}if(m+q.size.width>=q.parentData.width){q.size.width=q.parentData.width-m;if(l){q.size.height=q.size.width/q.aspectRatio}}if(h+q.size.height>=q.parentData.height){q.size.height=q.parentData.height-h;if(l){q.size.width=q.size.height*q.aspectRatio}}},stop:function(d,k){var f=a(this).data("resizable"),r=f.options,j=f.position,l=f.containerOffset,s=f.containerPosition,e=f.containerElement;var q=a(f.helper),u=q.offset(),g=q.outerWidth()-f.sizeDiff.width,m=q.outerHeight()-f.sizeDiff.height;if(f._helper&&!r.animate&&(/relative/).test(e.css("position"))){a(this).css({left:u.left-s.left-l.left,width:g,height:m})}if(f._helper&&!r.animate&&(/static/).test(e.css("position"))){a(this).css({left:u.left-s.left-l.left,width:g,height:m})}}});a.ui.plugin.add("resizable","ghost",{start:function(e,f){var d=a(this).data("resizable"),g=d.options,h=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:h.height,width:h.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof g.ghost=="string"?g.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=a(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=a(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});a.ui.plugin.add("resizable","grid",{resize:function(e,m){var j=a(this).data("resizable"),r=j.options,h=j.size,d=j.originalSize,k=j.originalPosition,g=j.axis,f=r._aspectRatio||e.shiftKey;r.grid=typeof r.grid=="number"?[r.grid,r.grid]:r.grid;var q=Math.round((h.width-d.width)/(r.grid[0]||1))*(r.grid[0]||1),l=Math.round((h.height-d.height)/(r.grid[1]||1))*(r.grid[1]||1);if(/^(se|s|e)$/.test(g)){j.size.width=d.width+q;j.size.height=d.height+l}else{if(/^(ne)$/.test(g)){j.size.width=d.width+q;j.size.height=d.height+l;j.position.top=k.top-l}else{if(/^(sw)$/.test(g)){j.size.width=d.width+q;j.size.height=d.height+l;j.position.left=k.left-q}else{j.size.width=d.width+q;j.size.height=d.height+l;j.position.top=k.top-l;j.position.left=k.left-q}}}}});var c=function(d){return parseInt(d,10)||0};var b=function(d){return !isNaN(parseInt(d,10))}})(jQuery);(function(a){var c={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},b="ui-dialog ui-widget ui-widget-content ui-corner-all ";a.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var j=this,l=this.options,o=l.title||this.originalTitle||"&nbsp;",h=a.ui.dialog.getTitleId(this.element),e=(this.uiDialog=a("<div/>")).appendTo(document.body).hide().addClass(b+l.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:l.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(q){(l.closeOnEscape&&q.keyCode&&q.keyCode==a.ui.keyCode.ESCAPE&&j.close(q))}).attr({role:"dialog","aria-labelledby":h}).mousedown(function(q){j.moveToTop(false,q)}),k=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(e),d=(this.uiDialogTitlebar=a("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(e),g=a('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){g.addClass("ui-state-hover")},function(){g.removeClass("ui-state-hover")}).focus(function(){g.addClass("ui-state-focus")}).blur(function(){g.removeClass("ui-state-focus")}).mousedown(function(q){q.stopPropagation()}).click(function(q){j.close(q);return false}).appendTo(d),m=(this.uiDialogTitlebarCloseText=a("<span/>")).addClass("ui-icon ui-icon-closethick").text(l.closeText).appendTo(g),f=a("<span/>").addClass("ui-dialog-title").attr("id",h).html(o).prependTo(d);d.find("*").add(d).disableSelection();(l.draggable&&a.fn.draggable&&this._makeDraggable());(l.resizable&&a.fn.resizable&&this._makeResizable());this._createButtons(l.buttons);this._isOpen=false;(l.bgiframe&&a.fn.bgiframe&&e.bgiframe());(l.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(d){var e=this;if(false===e._trigger("beforeclose",d)){return}(e.overlay&&e.overlay.destroy());e.uiDialog.unbind("keypress.ui-dialog");(e.options.hide?e.uiDialog.hide(e.options.hide,function(){e._trigger("close",d)}):e.uiDialog.hide()&&e._trigger("close",d));a.ui.dialog.overlay.resize();e._isOpen=false;if(e.options.modal){var f=0;a(".ui-dialog").each(function(){if(this!=e.uiDialog[0]){f=Math.max(f,a(this).css("z-index"))}});a.ui.dialog.maxZ=f}},isOpen:function(){return this._isOpen},moveToTop:function(f,d){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",d)}if(this.options.zIndex>a.ui.dialog.maxZ){a.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ=++a.ui.dialog.maxZ));var e={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++a.ui.dialog.maxZ);this.element.attr(e);this._trigger("focus",d)},open:function(){if(this._isOpen){return}var d=this.options,e=this.uiDialog;this.overlay=d.modal?new a.ui.dialog.overlay(this):null;(e.next().length&&e.appendTo("body"));this._size();this._position(d.position);e.show(d.show);this.moveToTop(true);(d.modal&&e.bind("keypress.ui-dialog",function(g){if(g.keyCode!=a.ui.keyCode.TAB){return}var h=a(":tabbable",this),f=h.filter(":first")[0],j=h.filter(":last")[0];if(g.target==j&&!g.shiftKey){setTimeout(function(){f.focus()},1)}else{if(g.target==f&&g.shiftKey){setTimeout(function(){j.focus()},1)}}}));a([]).add(e.find(".ui-dialog-content :tabbable:first")).add(e.find(".ui-dialog-buttonpane :tabbable:first")).add(e).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(d){var e=this,f=false,g=a("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof d=="object"&&d!==null&&a.each(d,function(){return !(f=true)}));if(f){a.each(d,function(j,h){a('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(j).click(function(){h.apply(e.element[0],arguments)}).hover(function(){a(this).addClass("ui-state-hover")},function(){a(this).removeClass("ui-state-hover")}).focus(function(){a(this).addClass("ui-state-focus")}).blur(function(){a(this).removeClass("ui-state-focus")}).appendTo(g)});g.appendTo(this.uiDialog)}},_makeDraggable:function(){var d=this,e=this.options,f;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){f=e.height;a(this).height(a(this).height()).addClass("ui-dialog-dragging");(e.dragStart&&e.dragStart.apply(d.element[0],arguments))},drag:function(){(e.drag&&e.drag.apply(d.element[0],arguments))},stop:function(){a(this).removeClass("ui-dialog-dragging").height(f);(e.dragStop&&e.dragStop.apply(d.element[0],arguments));a.ui.dialog.overlay.resize()}})},_makeResizable:function(e){e=(e===undefined?this.options.resizable:e);var f=this,g=this.options,d=typeof e=="string"?e:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:g.maxWidth,maxHeight:g.maxHeight,minWidth:g.minWidth,minHeight:g.minHeight,start:function(){a(this).addClass("ui-dialog-resizing");(g.resizeStart&&g.resizeStart.apply(f.element[0],arguments))},resize:function(){(g.resize&&g.resize.apply(f.element[0],arguments))},handles:d,stop:function(){a(this).removeClass("ui-dialog-resizing");g.height=a(this).height();g.width=a(this).width();(g.resizeStop&&g.resizeStop.apply(f.element[0],arguments));a.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(j){var d=a(window),h=a(document),f=h.scrollTop(),g=h.scrollLeft(),e=f;if(a.inArray(j,["center","top","right","bottom","left"])>=0){j=[j=="right"||j=="left"?j:"center",j=="top"||j=="bottom"?j:"middle"]}if(j.constructor!=Array){j=["center","middle"]}if(j[0].constructor==Number){g+=j[0]}else{switch(j[0]){case"left":g+=0;break;case"right":g+=d.width()-this.uiDialog.outerWidth();break;default:case"center":g+=(d.width()-this.uiDialog.outerWidth())/2}}if(j[1].constructor==Number){f+=j[1]}else{switch(j[1]){case"top":f+=0;break;case"bottom":f+=d.height()-this.uiDialog.outerHeight();break;default:case"middle":f+=(d.height()-this.uiDialog.outerHeight())/2}}f=Math.max(f,e);this.uiDialog.css({top:f,left:g})},_setData:function(f,g){(c[f]&&this.uiDialog.data(c[f],g));switch(f){case"buttons":this._createButtons(g);break;case"closeText":this.uiDialogTitlebarCloseText.text(g);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(b+g);break;case"draggable":(g?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(g);break;case"position":this._position(g);break;case"resizable":var e=this.uiDialog,d=this.uiDialog.is(":data(resizable)");(d&&!g&&e.resizable("destroy"));(d&&typeof g=="string"&&e.resizable("option","handles",g));(d||this._makeResizable(g));break;case"title":a(".ui-dialog-title",this.uiDialogTitlebar).html(g||"&nbsp;");break;case"width":this.uiDialog.width(g);break}a.widget.prototype._setData.apply(this,arguments)},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})}});a.extend(a.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)},overlay:function(d){this.$el=a.ui.dialog.overlay.create(d)}});a.extend(a.ui.dialog.overlay,{instances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(d){if(this.instances.length===0){setTimeout(function(){if(a.ui.dialog.overlay.instances.length){a(document).bind(a.ui.dialog.overlay.events,function(f){var g=a(f.target).parents(".ui-dialog").css("zIndex")||0;return(g>a.ui.dialog.overlay.maxZ)})}},1);a(document).bind("keydown.dialog-overlay",function(f){(d.options.closeOnEscape&&f.keyCode&&f.keyCode==a.ui.keyCode.ESCAPE&&d.close(f))});a(window).bind("resize.dialog-overlay",a.ui.dialog.overlay.resize)}var e=a("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(d.options.bgiframe&&a.fn.bgiframe&&e.bgiframe());this.instances.push(e);return e},destroy:function(e){this.instances.splice(a.inArray(this.instances,e),1);if(this.instances.length===0){a([document,window]).unbind(".dialog-overlay")}e.remove();var d=0;a.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){if(a.browser.msie&&a.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e<d){return a(window).height()+"px"}else{return e+"px"}}else{return a(document).height()+"px"}},width:function(){if(a.browser.msie&&a.browser.version<7){var e=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var d=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(e<d){return a(window).width()+"px"}else{return e+"px"}}else{return a(document).width()+"px"}},resize:function(){var d=a([]);a.each(a.ui.dialog.overlay.instances,function(){d=d.add(this)});d.css({width:0,height:0}).css({width:a.ui.dialog.overlay.width(),height:a.ui.dialog.overlay.height()})}});a.extend(a.ui.dialog.overlay.prototype,{destroy:function(){a.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(a){a.widget("ui.slider",a.extend({},a.ui.mouse,{_init:function(){var b=this,c=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=a([]);if(c.range){if(c.range===true){this.range=a("<div></div>");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!=2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range=="min"||c.range=="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}if(a(".ui-slider-handle",this.element).length==0){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(c.values&&c.values.length){while(a(".ui-slider-handle",this.element).length<c.values.length){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()}).hover(function(){if(!c.disabled){a(this).addClass("ui-state-hover")}},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(!c.disabled){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}else{a(this).blur()}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(d){a(this).data("index.ui-slider-handle",d)});this.handles.keydown(function(d){var j=true;var h=a(this).data("index.ui-slider-handle");if(b.options.disabled){return}switch(d.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:j=false;if(!b._keySliding){b._keySliding=true;a(this).addClass("ui-state-active");b._start(d,h)}break}var g,e,f=b._step();if(b.options.values&&b.options.values.length){g=e=b.values(h)}else{g=e=b.value()}switch(d.keyCode){case a.ui.keyCode.HOME:e=b._valueMin();break;case a.ui.keyCode.END:e=b._valueMax();break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g==b._valueMax()){return}e=g+f;break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g==b._valueMin()){return}e=g-f;break}b._slide(d,h,e);return j}).keyup(function(d){var e=a(this).data("index.ui-slider-handle");if(b._keySliding){b._stop(d,e);b._change(d,e);b._keySliding=false;a(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(b){var j=this.options;if(j.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var f={x:b.pageX,y:b.pageY};var g=this._normValueFromMouse(f);var k=this._valueMax()-this._valueMin()+1,l;var d=this,h;this.handles.each(function(m){var o=Math.abs(g-d.values(m));if(k>o){k=o;l=a(this);h=m}});if(j.range==true&&this.values(1)==j.min){l=a(this.handles[++h])}this._start(b,h);d._handleIndex=h;l.addClass("ui-state-active").focus();var c=l.offset();var e=!a(b.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=e?{left:0,top:0}:{left:b.pageX-c.left-(l.width()/2),top:b.pageY-c.top-(l.height()/2)-(parseInt(l.css("borderTopWidth"),10)||0)-(parseInt(l.css("borderBottomWidth"),10)||0)+(parseInt(l.css("marginTop"),10)||0)};g=this._normValueFromMouse(f);this._slide(b,h,g);return true},_mouseStart:function(b){return true},_mouseDrag:function(b){var d={x:b.pageX,y:b.pageY};var c=this._normValueFromMouse(d);this._slide(b,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(f){var e,c;if("horizontal"==this.orientation){e=this.elementSize.width;c=f.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{e=this.elementSize.height;c=f.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var d=(c/e);if(d>1){d=1}if(d<0){d=0}if("vertical"==this.orientation){d=1-d}var g=this._valueMax()-this._valueMin(),h=d*g,b=h%this.options.step,j=this._valueMin()+h-b;if(b>(this.options.step/2)){j+=this.options.step}return parseFloat(j.toFixed(5))},_start:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("start",d,b)},_slide:function(c,h,g){var e=this.handles[h];if(this.options.values&&this.options.values.length){var f=this.values(h?0:1);if((this.options.values.length==2&&this.options.range===true)&&((h==0&&g>f)||(h==1&&g<f))){g=f}if(g!=this.values(h)){var b=this.values();b[h]=g;var d=this._trigger("slide",c,{handle:this.handles[h],value:g,values:b});var f=this.values(h?0:1);if(d!==false){this.values(h,g,(c.type=="mousedown"&&this.options.animate),true)}}}else{if(g!=this.value()){var d=this._trigger("slide",c,{handle:this.handles[h],value:g});if(d!==false){this._setData("value",g,(c.type=="mousedown"&&this.options.animate))}}}},_stop:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("stop",d,b)},_change:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("change",d,b)},value:function(b){if(arguments.length){this._setData("value",b);this._change(null,0)}return this._value()},values:function(b,c,d,e){if(arguments.length>1){this.options.values[b]=c;this._refreshValue(d);if(!e){this._change(null,b)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(b)}else{return this.value()}}else{return this._values()}},_setData:function(c,d,b){a.widget.prototype._setData.apply(this,arguments);switch(c){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(b);break;case"value":this._refreshValue(b);break}},_step:function(){var b=this.options.step;return b},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_values:function(c){if(arguments.length){var b=this.options.values[c];if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b}else{return this.options.values}},_valueMin:function(){var b=this.options.min;return b},_valueMax:function(){var b=this.options.max;return b},_refreshValue:function(f){var m=this.options.range,k=this.options,b=this;if(this.options.values&&this.options.values.length){var l,h;this.handles.each(function(r,o){var q=(b.values(r)-b._valueMin())/(b._valueMax()-b._valueMin())*100;var s={};s[b.orientation=="horizontal"?"left":"bottom"]=q+"%";a(this).stop(1,1)[f?"animate":"css"](s,k.animate);if(b.options.range===true){if(b.orientation=="horizontal"){(r==0)&&b.range.stop(1,1)[f?"animate":"css"]({left:q+"%"},k.animate);(r==1)&&b.range[f?"animate":"css"]({width:(q-lastValPercent)+"%"},{queue:false,duration:k.animate})}else{(r==0)&&b.range.stop(1,1)[f?"animate":"css"]({bottom:(q)+"%"},k.animate);(r==1)&&b.range[f?"animate":"css"]({height:(q-lastValPercent)+"%"},{queue:false,duration:k.animate})}}lastValPercent=q})}else{var g=this.value(),c=this._valueMin(),j=this._valueMax(),d=j!=c?(g-c)/(j-c)*100:0;var e={};e[b.orientation=="horizontal"?"left":"bottom"]=d+"%";this.handle.stop(1,1)[f?"animate":"css"](e,k.animate);(m=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[f?"animate":"css"]({width:d+"%"},k.animate);(m=="max")&&(this.orientation=="horizontal")&&this.range[f?"animate":"css"]({width:(100-d)+"%"},{queue:false,duration:k.animate});(m=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[f?"animate":"css"]({height:d+"%"},k.animate);(m=="max")&&(this.orientation=="vertical")&&this.range[f?"animate":"css"]({height:(100-d)+"%"},{queue:false,duration:k.animate})}}}));a.extend(a.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);(function($){$.extend($.ui,{datepicker:{version:"1.7.2"}});var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker(null)}var date=this._getDateDatepicker(target);extendRemove(inst.settings,settings);this._setDateDatepicker(target,date);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"))}return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var origSize=(match=="@"?14:(match=="y"?4:(match=="o"?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst){var dateFormat=this._get(inst,"dateFormat");var dates=inst.input?inst.input.val():null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);date=defaultDate}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group ui-datepicker-group-';switch(col){case 0:calender+="first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+="last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+="middle";cornerClass="";break}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span> "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?"&#xa0;":"")}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery);(function($){$.fmatter={};$.fn.fmatter=function(formatType,cellval,opts,act){opts=$.extend({},$.jgrid.formatter,opts);return this.each(function(){$this=$(this);var o=$.meta?$.extend({},opts,$this.data()):opts;fireFormatter($this,formatType,cellval,opts,act)})};$.fmatter.util={NumberFormat:function(nData,opts){if(!isNumber(nData)){nData*=1}if(isNumber(nData)){var bNegative=(nData<0);var sOutput=nData+"";var sDecimalSeparator=(opts.decimalSeparator)?opts.decimalSeparator:".";var nDotIndex;if(isNumber(opts.decimalPlaces)){var nDecimalPlaces=opts.decimalPlaces;var nDecimal=Math.pow(10,nDecimalPlaces);sOutput=Math.round(nData*nDecimal)/nDecimal+"";nDotIndex=sOutput.lastIndexOf(".");if(nDecimalPlaces>0){if(nDotIndex<0){sOutput+=sDecimalSeparator;nDotIndex=sOutput.length-1}else{if(sDecimalSeparator!=="."){sOutput=sOutput.replace(".",sDecimalSeparator)}}while((sOutput.length-1-nDotIndex)<nDecimalPlaces){sOutput+="0"}}}if(opts.thousandsSeparator){var sThousandsSeparator=opts.thousandsSeparator;nDotIndex=sOutput.lastIndexOf(sDecimalSeparator);nDotIndex=(nDotIndex>-1)?nDotIndex:sOutput.length;var sNewOutput=sOutput.substring(nDotIndex);var nCount=-1;for(var i=nDotIndex;i>0;i--){nCount++;if((nCount%3===0)&&(i!==nDotIndex)&&(!bNegative||(i>1))){sNewOutput=sThousandsSeparator+sNewOutput}sNewOutput=sOutput.charAt(i-1)+sNewOutput}sOutput=sNewOutput}sOutput=(opts.prefix)?opts.prefix+sOutput:sOutput;sOutput=(opts.suffix)?sOutput+opts.suffix:sOutput;return sOutput}else{return nData}},DateFormat:function(format,date,newformat,opts){var token=/\\.|[dDjlNSwzWFmMntLoYyaABgGhHisueIOPTZcrU]/g,timezone=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,timezoneClip=timezoneClip=/[^-+\dA-Z]/g,pad=function(value,length){value=String(value);length=parseInt(length)||2;while(value.length<length){value="0"+value}return value},ts={m:1,d:1,y:1970,h:0,i:0,s:0},timestamp=0,dateFormat=["i18n"];dateFormat.i18n={dayNames:opts.dayNames,monthNames:opts.monthNames};format=format.toLowerCase();date=date.split(/[\\\/:_;.tT\s-]/);format=format.split(/[\\\/:_;.tT\s-]/);for(var i=0;i<format.length;i++){ts[format[i]]=parseInt(date[i],10)}ts.m=parseInt(ts.m)-1;var ty=ts.y;if(ty>=70&&ty<=99){ts.y=1900+ts.y}else{if(ty>=0&&ty<=69){ts.y=2000+ts.y}}timestamp=new Date(ts.y,ts.m,ts.d,ts.h,ts.i,ts.s,0);if(opts.masks.newformat){newformat=opts.masks.newformat}else{if(!newformat){newformat="Y-m-d"}}var G=timestamp.getHours(),i=timestamp.getMinutes(),j=timestamp.getDate(),n=timestamp.getMonth()+1,o=timestamp.getTimezoneOffset(),s=timestamp.getSeconds(),u=timestamp.getMilliseconds(),w=timestamp.getDay(),Y=timestamp.getFullYear(),N=(w+6)%7+1,z=(new Date(Y,n-1,j)-new Date(Y,0,1))/86400000,flags={d:pad(j),D:dateFormat.i18n.dayNames[w],j:j,l:dateFormat.i18n.dayNames[w+7],N:N,S:opts.S(j),w:w,z:z,W:N<5?Math.floor((z+N-1)/7)+1:Math.floor((z+N-1)/7)||((new Date(Y-1,0,1).getDay()+6)%7<4?53:52),F:dateFormat.i18n.monthNames[n-1+12],m:pad(n),M:dateFormat.i18n.monthNames[n-1],n:n,t:"?",L:"?",o:"?",Y:Y,y:String(Y).substring(2),a:G<12?opts.AmPm[0]:opts.AmPm[1],A:G<12?opts.AmPm[2]:opts.AmPm[3],B:"?",g:G%12||12,G:G,h:pad(G%12||12),H:pad(G),i:pad(i),s:pad(s),u:u,e:"?",I:"?",O:(o>0?"-":"+")+pad(Math.floor(Math.abs(o)/60)*100+Math.abs(o)%60,4),P:"?",T:(String(timestamp).match(timezone)||[""]).pop().replace(timezoneClip,""),Z:"?",c:"?",r:"?",U:Math.floor(timestamp/1000)};return newformat.replace(token,function($0){return $0 in flags?flags[$0]:$0.substring(1)})}};$.fn.fmatter.defaultFormat=function(el,cellval,opts){$(el).html((isValue(cellval)&&cellval!=="")?cellval:"&#160;")};$.fn.fmatter.email=function(el,cellval,opts){if(!isEmpty(cellval)){$(el).html('<a href="mailto:'+cellval+'">'+cellval+"</a>")}else{$.fn.fmatter.defaultFormat(el,cellval)}};$.fn.fmatter.checkbox=function(el,cval,opts){var op=$.extend({},opts.checkbox),ds;if(!isUndefined(opts.colModel.formatoptions)){op=$.extend({},op,opts.colModel.formatoptions)}if(op.disabled===true){ds="disabled"}else{ds=""}cval=cval+"";cval=cval.toLowerCase();var bchk=cval.search(/(false|0|no|off)/i)<0?' checked="checked"':"";$(el).html("<input type='checkbox'"+bchk+" value='"+cval+"' offval='no' "+ds+"/>")},$.fn.fmatter.link=function(el,cellval,opts){if(!isEmpty(cellval)){$(el).html('<a href="'+cellval+'">'+cellval+"</a>")}else{$(el).html(isValue(cellval)?cellval:"")}};$.fn.fmatter.showlink=function(el,cellval,opts){var op={baseLinkUrl:opts.baseLinkUrl,showAction:opts.showAction,addParam:opts.addParam};if(!isUndefined(opts.colModel.formatoptions)){op=$.extend({},op,opts.colModel.formatoptions)}idUrl=op.baseLinkUrl+op.showAction+"?id="+opts.rowId+op.addParam;if(isString(cellval)){$(el).html('<a href="'+idUrl+'">'+cellval+"</a>")}else{$.fn.fmatter.defaultFormat(el,cellval)}};$.fn.fmatter.integer=function(el,cellval,opts){var op=$.extend({},opts.integer);if(!isUndefined(opts.colModel.formatoptions)){op=$.extend({},op,opts.colModel.formatoptions)}if(isEmpty(cellval)){cellval=op.defaultValue||0}$(el).html($.fmatter.util.NumberFormat(cellval,op))};$.fn.fmatter.number=function(el,cellval,opts){var op=$.extend({},opts.number);if(!isUndefined(opts.colModel.formatoptions)){op=$.extend({},op,opts.colModel.formatoptions)}if(isEmpty(cellval)){cellval=op.defaultValue||0}$(el).html($.fmatter.util.NumberFormat(cellval,op))};$.fn.fmatter.currency=function(el,cellval,opts){var op=$.extend({},opts.currency);if(!isUndefined(opts.colModel.formatoptions)){op=$.extend({},op,opts.colModel.formatoptions)}if(isEmpty(cellval)){cellval=op.defaultValue||0}$(el).html($.fmatter.util.NumberFormat(cellval,op))};$.fn.fmatter.date=function(el,cellval,opts,act){var op=$.extend({},opts.date);if(!isUndefined(opts.colModel.formatoptions)){op=$.extend({},op,opts.colModel.formatoptions)}if(!op.reformatAfterEdit&&act=="edit"){$.fn.fmatter.defaultFormat(el,cellval)}else{if(!isEmpty(cellval)){var ndf=$.fmatter.util.DateFormat(op.srcformat,cellval,op.newformat,op);$(el).html(ndf)}else{$.fn.fmatter.defaultFormat(el,cellval)}}};$.fn.fmatter.select=function(el,cellval,opts,act){if(act=="edit"){$.fn.fmatter.defaultFormat(el,cellval)}else{if(!isEmpty(cellval)){var oSelect=false;if(!isUndefined(opts.colModel.editoptions)){oSelect=opts.colModel.editoptions.value}if(oSelect){var ret=[];var msl=opts.colModel.editoptions.multiple===true?true:false;var scell=[];if(msl){scell=cellval.split(",");scell=$.map(scell,function(n){return $.trim(n)})}if(isString(oSelect)){var so=oSelect.split(";"),j=0;for(var i=0;i<so.length;i++){sv=so[i].split(":");if(msl){if(jQuery.inArray(sv[0],scell)>-1){ret[j]=sv[1];j++}}else{if($.trim(sv[0])==$.trim(cellval)){ret[0]=sv[1];break}}}}else{if(isObject(oSelect)){if(msl){ret=jQuery.map(scel,function(n,i){return oSelect[n]})}ret[0]=oSelect[cellval]||""}}$(el).html(ret.join(", "))}else{$.fn.fmatter.defaultFormat(el,cellval)}}}};$.unformat=function(cellval,options,pos,cnt){var ret,formatType=options.colModel.formatter,op=options.colModel.formatoptions||{};if(formatType!=="undefined"&&isString(formatType)){var opts=$.jgrid.formatter||{},stripTag;switch(formatType){case"link":case"showlink":case"email":ret=$(cellval).text();break;case"integer":op=$.extend({},opts.integer,op);stripTag=eval("/"+op.thousandsSeparator+"/g");ret=$(cellval).text().replace(stripTag,"");break;case"number":op=$.extend({},opts.number,op);stripTag=eval("/"+op.thousandsSeparator+"/g");ret=$(cellval).text().replace(op.decimalSeparator,".").replace(stripTag,"");break;case"currency":op=$.extend({},opts.currency,op);stripTag=eval("/"+op.thousandsSeparator+"/g");ret=$(cellval).text().replace(op.decimalSeparator,".").replace(op.prefix,"").replace(op.suffix,"").replace(stripTag,"");break;case"checkbox":var cbv=(options.colModel.editoptions)?options.colModel.editoptions.value.split(":"):["Yes","No"];ret=$("input",cellval).attr("checked")?cbv[0]:cbv[1];break}}return ret?ret:cnt===true?$(cellval).text():$.htmlDecode($(cellval).html())};function fireFormatter(el,formatType,cellval,opts,act){formatType=formatType.toLowerCase();switch(formatType){case"link":$.fn.fmatter.link(el,cellval,opts);break;case"showlink":$.fn.fmatter.showlink(el,cellval,opts);break;case"email":$.fn.fmatter.email(el,cellval,opts);break;case"currency":$.fn.fmatter.currency(el,cellval,opts);break;case"date":$.fn.fmatter.date(el,cellval,opts,act);break;case"number":$.fn.fmatter.number(el,cellval,opts);break;case"integer":$.fn.fmatter.integer(el,cellval,opts);break;case"checkbox":$.fn.fmatter.checkbox(el,cellval,opts);break;case"select":$.fn.fmatter.select(el,cellval,opts,act);break}}function debug($obj){if(window.console&&window.console.log){window.console.log($obj)}}isValue=function(o){return(isObject(o)||isString(o)||isNumber(o)||isBoolean(o))};isBoolean=function(o){return typeof o==="boolean"};isNull=function(o){return o===null};isNumber=function(o){return typeof o==="number"&&isFinite(o)};isString=function(o){return typeof o==="string"};isEmpty=function(o){if(!isString(o)&&isValue(o)){return false}else{if(!isValue(o)){return true}}o=$.trim(o).replace(/\&nbsp\;/ig,"").replace(/\&#160\;/ig,"");return o===""};isUndefined=function(o){return typeof o==="undefined"};isObject=function(o){return(o&&(typeof o==="object"||isFunction(o)))||false};isFunction=function(o){return typeof o==="function"}})(jQuery);jQuery.tableDnD={currentTable:null,dragObject:null,mouseOffset:null,oldY:0,build:function(b){this.each(function(){this.tableDnDConfig=jQuery.extend({onDragStyle:null,onDropStyle:null,onDragClass:"tDnD_whileDrag",onDrop:null,onDragStart:null,scrollAmount:5,serializeRegexp:/[^\-]*$/,serializeParamName:null,dragHandle:null},b||{});jQuery.tableDnD.makeDraggable(this)});jQuery(document).bind("mousemove",jQuery.tableDnD.mousemove).bind("mouseup",jQuery.tableDnD.mouseup);return this},makeDraggable:function(g){var h=g.tableDnDConfig;if(g.tableDnDConfig.dragHandle){var e=jQuery("td."+g.tableDnDConfig.dragHandle,g);e.each(function(){jQuery(this).mousedown(function(a){jQuery.tableDnD.dragObject=this.parentNode;jQuery.tableDnD.currentTable=g;jQuery.tableDnD.mouseOffset=jQuery.tableDnD.getMouseOffset(this,a);if(h.onDragStart){h.onDragStart(g,this)}return false})})}else{var f=jQuery("tr",g);f.each(function(){var a=jQuery(this);if(!a.hasClass("nodrag")){a.mousedown(function(b){if(b.target.tagName=="TD"){jQuery.tableDnD.dragObject=this;jQuery.tableDnD.currentTable=g;jQuery.tableDnD.mouseOffset=jQuery.tableDnD.getMouseOffset(this,b);if(h.onDragStart){h.onDragStart(g,this)}return false}}).css("cursor","move")}})}},updateTables:function(){this.each(function(){if(this.tableDnDConfig){jQuery.tableDnD.makeDraggable(this)}})},mouseCoords:function(b){if(b.pageX||b.pageY){return{x:b.pageX,y:b.pageY}}return{x:b.clientX+document.body.scrollLeft-document.body.clientLeft,y:b.clientY+document.body.scrollTop-document.body.clientTop}},getMouseOffset:function(f,h){h=h||window.event;var g=this.getPosition(f);var e=this.mouseCoords(h);return{x:e.x-g.x,y:e.y-g.y}},getPosition:function(f){var e=0;var d=0;if(f.offsetHeight==0){f=f.firstChild}if(f&&f.offsetParent){while(f.offsetParent){e+=f.offsetLeft;d+=f.offsetTop;f=f.offsetParent}e+=f.offsetLeft;d+=f.offsetTop}return{x:e,y:d}},mousemove:function(v){if(jQuery.tableDnD.dragObject==null){return}var u=jQuery(jQuery.tableDnD.dragObject);var l=jQuery.tableDnD.currentTable.tableDnDConfig;var m=jQuery.tableDnD.mouseCoords(v);var q=m.y-jQuery.tableDnD.mouseOffset.y;var s=window.pageYOffset;if(document.all){if(typeof document.compatMode!="undefined"&&document.compatMode!="BackCompat"){s=document.documentElement.scrollTop}else{if(typeof document.body!="undefined"){s=document.body.scrollTop}}}if(m.y-s<l.scrollAmount){window.scrollBy(0,-l.scrollAmount)}else{var o=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight;if(o-(m.y-s)<l.scrollAmount){window.scrollBy(0,l.scrollAmount)}}if(q!=jQuery.tableDnD.oldY){var k=q>jQuery.tableDnD.oldY;jQuery.tableDnD.oldY=q;if(l.onDragClass){u.addClass(l.onDragClass)}else{u.css(l.onDragStyle)}var r=jQuery.tableDnD.findDropTargetRow(u,q);if(r){if(k&&jQuery.tableDnD.dragObject!=r){jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject,r.nextSibling)}else{if(!k&&jQuery.tableDnD.dragObject!=r){jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject,r)}}}}return false},findDropTargetRow:function(o,v){var s=jQuery.tableDnD.currentTable.rows;for(var q=0;q<s.length;q++){var u=s[q];var l=this.getPosition(u).y;var k=parseInt(u.offsetHeight)/2;if(u.offsetHeight==0){l=this.getPosition(u.firstChild).y;k=parseInt(u.firstChild.offsetHeight)/2}if((v>l-k)&&(v<(l+k))){if(u==o){return null}var r=jQuery.tableDnD.currentTable.tableDnDConfig;if(r.onAllowDrop){if(r.onAllowDrop(o,u)){return u}else{return null}}else{var m=jQuery(u).hasClass("nodrop");if(!m){return u}else{return null}}return u}}return null},mouseup:function(d){if(jQuery.tableDnD.currentTable&&jQuery.tableDnD.dragObject){var e=jQuery.tableDnD.dragObject;var f=jQuery.tableDnD.currentTable.tableDnDConfig;if(f.onDragClass){jQuery(e).removeClass(f.onDragClass)}else{jQuery(e).css(f.onDropStyle)}jQuery.tableDnD.dragObject=null;if(f.onDrop){f.onDrop(jQuery.tableDnD.currentTable,e)}jQuery.tableDnD.currentTable=null}},serialize:function(){if(jQuery.tableDnD.currentTable){return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable)}else{return"Error: No Table id set, you need to set an id on your table and every row"}},serializeTable:function(h){var k="";var l=h.id;var j=h.rows;for(var m=0;m<j.length;m++){if(k.length>0){k+="&"}var g=j[m].id;if(g&&g&&h.tableDnDConfig&&h.tableDnDConfig.serializeRegexp){g=g.match(h.tableDnDConfig.serializeRegexp)[0]}k+=l+"[]="+g}return k},serializeTables:function(){var b="";this.each(function(){b+=jQuery.tableDnD.serializeTable(this)});return b}};jQuery.fn.extend({tableDnD:jQuery.tableDnD.build,tableDnDUpdate:jQuery.tableDnD.updateTables,tableDnDSerialize:jQuery.tableDnD.serializeTables});var JSON={stringify:function stringify(m){var h,j,k,c="",l;switch(typeof m){case"object":if(m){if(m.constructor==Array){for(j=0;j<m.length;++j){l=stringify(m[j]);if(c){c+=","}c+=l}return"["+c+"]"}else{if(typeof m.toString!="undefined"){for(j in m){l=stringify(m[j]);if(typeof l!="function"){if(c){c+=","}c+=stringify(j)+":"+l}}return"{"+c+"}"}}}return"null";case"number":return isFinite(m)?String(m):"null";case"string":k=m.length;c='"';for(j=0;j<k;j+=1){h=m.charAt(j);if(h>=" "){if(h=="\\"||h=='"'){c+="\\"}c+=h}else{switch(h){case"\b":c+="\\b";break;case"\f":c+="\\f";break;case"\n":c+="\\n";break;case"\r":c+="\\r";break;case"\t":c+="\\t";break;default:h=h.charCodeAt();c+="\\u00"+Math.floor(h/16).toString(16)+(h%16).toString(16)}}}return c+'"';case"boolean":return String(m);case"function":return m.toString();default:return"null"}},parse:function(jsonString){var js=jsonString;if(js.substr(0,9)=="while(1);"){js=js.substr(9)}if(js.substr(0,2)=="/*"){js=js.substr(2,js.length-4)}return eval("("+js+")")}};var xmlJsonClass={xml2json:function(g,f){if(g.nodeType===9){g=g.documentElement}var j=this.removeWhite(g);var k=this.toObj(j);var h=this.toJson(k,g.nodeName,"\t");return"{\n"+f+(f?h.replace(/\t/g,f):h.replace(/\t|\n/g,""))+"\n}"},json2xml:function(f,j){var g=function(e,u,c){var r="";var s,a;if(e instanceof Array){if(e.length===0){r+=c+"<"+u+">__EMPTY_ARRAY_</"+u+">\n"}else{for(s=0,a=e.length;s<a;s+=1){var b=c+g(e[s],u,c+"\t")+"\n";r+=b}}}else{if(typeof(e)==="object"){var m=false;r+=c+"<"+u;var d;for(d in e){if(e.hasOwnProperty(d)){if(d.charAt(0)==="@"){r+=" "+d.substr(1)+'="'+e[d].toString()+'"'}else{m=true}}}r+=m?">":"/>";if(m){for(d in e){if(e.hasOwnProperty(d)){if(d==="#text"){r+=e[d]}else{if(d==="#cdata"){r+="<![CDATA["+e[d]+"]]>"}else{if(d.charAt(0)!=="@"){r+=g(e[d],d,c+"\t")}}}}}r+=(r.charAt(r.length-1)==="\n"?c:"")+"</"+u+">"}}else{if(typeof(e)==="function"){r+=c+"<"+u+"><![CDATA["+e+"]]></"+u+">"}else{if(e.toString()==='""'||e.toString().length===0){r+=c+"<"+u+">__EMPTY_STRING_</"+u+">"}else{r+=c+"<"+u+">"+e.toString()+"</"+u+">"}}}}return r};var h="";var k;for(k in f){if(f.hasOwnProperty(k)){h+=g(f[k],k,"")}}return j?h.replace(/\t/g,j):h.replace(/\t|\n/g,"")},parseXml:function(e){var g;try{var f=new DOMParser();g=f.parseFromString(e,"text/xml")}catch(h){g=new ActiveXObject("Microsoft.XMLDOM");g.async=false;g.loadXML(e)}return(g&&g.documentElement&&g.documentElement.tagName!="parsererror")?g:null},toObj:function(l){var m={};var k=/function/i;if(l.nodeType===1){if(l.attributes.length){var q;for(q=0;q<l.attributes.length;q+=1){m["@"+l.attributes[q].nodeName]=(l.attributes[q].nodeValue||"").toString()}}if(l.firstChild){var s=0,r=0,j=false;var o;for(o=l.firstChild;o;o=o.nextSibling){if(o.nodeType===1){j=true}else{if(o.nodeType===3&&o.nodeValue.match(/[^ \f\n\r\t\v]/)){s+=1}else{if(o.nodeType===4){r+=1}}}}if(j){if(s<2&&r<2){this.removeWhite(l);for(o=l.firstChild;o;o=o.nextSibling){if(o.nodeType===3){m["#text"]=this.escape(o.nodeValue)}else{if(o.nodeType===4){if(k.test(o.nodeValue)){m[o.nodeName]=[m[o.nodeName],o.nodeValue]}else{m["#cdata"]=this.escape(o.nodeValue)}}else{if(m[o.nodeName]){if(m[o.nodeName] instanceof Array){m[o.nodeName][m[o.nodeName].length]=this.toObj(o)}else{m[o.nodeName]=[m[o.nodeName],this.toObj(o)]}}else{m[o.nodeName]=this.toObj(o)}}}}}else{if(!l.attributes.length){m=this.escape(this.innerXml(l))}else{m["#text"]=this.escape(this.innerXml(l))}}}else{if(s){if(!l.attributes.length){m=this.escape(this.innerXml(l));if(m==="__EMPTY_ARRAY_"){m="[]"}else{if(m==="__EMPTY_STRING_"){m=""}}}else{m["#text"]=this.escape(this.innerXml(l))}}else{if(r){if(r>1){m=this.escape(this.innerXml(l))}else{for(o=l.firstChild;o;o=o.nextSibling){if(k.test(l.firstChild.nodeValue)){m=l.firstChild.nodeValue;break}else{m["#cdata"]=this.escape(o.nodeValue)}}}}}}}if(!l.attributes.length&&!l.firstChild){m=null}}else{if(l.nodeType===9){m=this.toObj(l.documentElement)}else{alert("unhandled node type: "+l.nodeType)}}return m},toJson:function(x,l,q){var r=l?('"'+l+'"'):"";if(x==="[]"){r+=(l?":[]":"[]")}else{if(x instanceof Array){var v,w;for(w=0,v=x.length;w<v;w+=1){x[w]=this.toJson(x[w],"",q+"\t")}r+=(l?":[":"[")+(x.length>1?("\n"+q+"\t"+x.join(",\n"+q+"\t")+"\n"+q):x.join(""))+"]"}else{if(x===null){r+=(l&&":")+"null"}else{if(typeof(x)==="object"){var s=[];var o;for(o in x){if(x.hasOwnProperty(o)){s[s.length]=this.toJson(x[o],o,q+"\t")}}r+=(l?":{":"{")+(s.length>1?("\n"+q+"\t"+s.join(",\n"+q+"\t")+"\n"+q):s.join(""))+"}"}else{if(typeof(x)==="string"){var m=/(^-?\d+\.?\d*$)/;var u=/function/i;x=x.toString();if(m.test(x)||u.test(x)||x==="false"||x==="true"){r+=(l&&":")+x}else{r+=(l&&":")+'"'+x+'"'}}else{r+=(l&&":")+x.toString()}}}}}return r},innerXml:function(f){var g="";if("innerHTML" in f){g=f.innerHTML}else{var h=function(a){var d="",b;if(a.nodeType===1){d+="<"+a.nodeName;for(b=0;b<a.attributes.length;b+=1){d+=" "+a.attributes[b].nodeName+'="'+(a.attributes[b].nodeValue||"").toString()+'"'}if(a.firstChild){d+=">";for(var e=a.firstChild;e;e=e.nextSibling){d+=h(e)}d+="</"+a.nodeName+">"}else{d+="/>"}}else{if(a.nodeType===3){d+=a.nodeValue}else{if(a.nodeType===4){d+="<![CDATA["+a.nodeValue+"]]>"}}}return d};for(var c=f.firstChild;c;c=c.nextSibling){g+=h(c)}}return g},escape:function(b){return b.replace(/[\\]/g,"\\\\").replace(/[\"]/g,'\\"').replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r")},removeWhite:function(f){f.normalize();var d;for(d=f.firstChild;d;){if(d.nodeType===3){if(!d.nodeValue.match(/[^ \f\n\r\t\v]/)){var e=d.nextSibling;f.removeChild(d);d=e}else{d=d.nextSibling}}else{if(d.nodeType===1){this.removeWhite(d);d=d.nextSibling}else{d=d.nextSibling}}}return f}};(function($){$.fn.jqGrid=function(p){p=$.extend(true,{url:"",height:150,page:1,rowNum:20,records:0,pager:"",pgbuttons:true,pginput:true,colModel:[],rowList:[],colNames:[],sortorder:"asc",sortname:"",datatype:"xml",mtype:"GET",imgpath:"",sortascimg:"sort_asc.gif",sortdescimg:"sort_desc.gif",firstimg:"first.gif",previmg:"prev.gif",nextimg:"next.gif",lastimg:"last.gif",altRows:true,selarrrow:[],savedRow:[],shrinkToFit:true,xmlReader:{},jsonReader:{},subGrid:false,subGridModel:[],lastpage:0,lastsort:0,selrow:null,beforeSelectRow:null,onSelectRow:null,onSortCol:null,ondblClickRow:null,onRightClickRow:null,onPaging:null,onSelectAll:null,loadComplete:null,gridComplete:null,loadError:null,loadBeforeSend:null,afterInsertRow:null,beforeRequest:null,onHeaderClick:null,viewrecords:false,loadonce:false,multiselect:false,multikey:false,editurl:null,search:false,searchdata:{},caption:"",hidegrid:true,hiddengrid:false,postData:{},userData:{},treeGrid:false,treeGridModel:"nested",treeReader:{},treeANode:0,ExpandColumn:null,tree_root_level:0,prmNames:{page:"page",rows:"rows",sort:"sidx",order:"sord"},sortclass:"grid_sort",resizeclass:"grid_resize",forceFit:false,gridstate:"visible",cellEdit:false,cellsubmit:"remote",nv:0,loadui:"enable",toolbar:[false,""],scroll:false,multiboxonly:false,scrollrows:false,deselectAfterSort:true},$.jgrid.defaults,p||{});var grid={headers:[],cols:[],dragStart:function(i,x){this.resizing={idx:i,startX:x};this.hDiv.style.cursor="e-resize"},dragMove:function(x){if(this.resizing){var diff=x-this.resizing.startX,h=this.headers[this.resizing.idx],newWidth=h.width+diff,hn,nWn;if(newWidth>25){if(p.forceFit===true){hn=this.headers[this.resizing.idx+p.nv];nWn=hn.width-diff;if(nWn>25){h.el.style.width=newWidth+"px";h.newWidth=newWidth;this.cols[this.resizing.idx].style.width=newWidth+"px";hn.el.style.width=nWn+"px";hn.newWidth=nWn;this.cols[this.resizing.idx+p.nv].style.width=nWn+"px";this.newWidth=this.width}}else{h.el.style.width=newWidth+"px";h.newWidth=newWidth;this.cols[this.resizing.idx].style.width=newWidth+"px";this.newWidth=this.width+diff;$("table:first",this.bDiv).css("width",this.newWidth+"px");$("table:first",this.hDiv).css("width",this.newWidth+"px");this.hDiv.scrollLeft=this.bDiv.scrollLeft}}}},dragEnd:function(){this.hDiv.style.cursor="default";if(this.resizing){var idx=this.resizing.idx;this.headers[idx].width=this.headers[idx].newWidth||this.headers[idx].width;this.cols[idx].style.width=this.headers[idx].newWidth||this.headers[idx].width;if(p.forceFit===true){this.headers[idx+p.nv].width=this.headers[idx+p.nv].newWidth||this.headers[idx+p.nv].width;this.cols[idx+p.nv].style.width=this.headers[idx+p.nv].newWidth||this.headers[idx+p.nv].width}if(this.newWidth){this.width=this.newWidth}this.resizing=false}},scrollGrid:function(){if(p.scroll===true){var scrollTop=this.bDiv.scrollTop;if(scrollTop!=this.scrollTop){this.scrollTop=scrollTop;if((this.bDiv.scrollHeight-scrollTop-$(this.bDiv).height())<=0){if(parseInt(p.page,10)+1<=parseInt(p.lastpage,10)){p.page=parseInt(p.page,10)+1;this.populate()}}}}this.hDiv.scrollLeft=this.bDiv.scrollLeft}};$.fn.getGridParam=function(pName){var $t=this[0];if(!$t.grid){return}if(!pName){return $t.p}else{return $t.p[pName]?$t.p[pName]:null}};$.fn.setGridParam=function(newParams){return this.each(function(){if(this.grid&&typeof(newParams)==="object"){$.extend(true,this.p,newParams)}})};$.fn.getDataIDs=function(){var ids=[];this.each(function(){$(this.rows).slice(1).each(function(i){ids[i]=this.id})});return ids};$.fn.setSortName=function(newsort){return this.each(function(){var $t=this;for(var i=0;i<$t.p.colModel.length;i++){if($t.p.colModel[i].name===newsort||$t.p.colModel[i].index===newsort){$("tr th:eq("+$t.p.lastsort+") div img",$t.grid.hDiv).remove();$t.p.lastsort=i;$t.p.sortname=newsort;break}}})};$.fn.setSelection=function(selection,onsr,sd){return this.each(function(){var $t=this,stat,pt,ind;onsr=onsr===false?false:true;if(selection===false){pt=sd}else{ind=$($t).getInd($t.rows,selection);pt=$($t.rows[ind])}selection=$(pt).attr("id");if(!pt.html()){return}if($t.p.selrow&&$t.p.scrollrows===true){var olr=$($t).getInd($t.rows,$t.p.selrow);var ner=$($t).getInd($t.rows,selection);if(ner>=0){if(ner>olr){scrGrid(ner,"d")}else{scrGrid(ner,"u")}}}if(!$t.p.multiselect){if($(pt).attr("class")!=="subgrid"){if($t.p.selrow){$("tr#"+$t.p.selrow.replace(".","\\."),$t.grid.bDiv).removeClass("selected")}$t.p.selrow=selection;$(pt).addClass("selected");if($t.p.onSelectRow&&onsr){$t.p.onSelectRow($t.p.selrow,true)}}}else{$t.p.selrow=selection;var ia=$.inArray($t.p.selrow,$t.p.selarrrow);if(ia===-1){if($(pt).attr("class")!=="subgrid"){$(pt).addClass("selected")}stat=true;$("#jqg_"+$t.p.selrow.replace(".","\\."),$t.rows).attr("checked",stat);$t.p.selarrrow.push($t.p.selrow);if($t.p.onSelectRow&&onsr){$t.p.onSelectRow($t.p.selrow,stat)}}else{if($(pt).attr("class")!=="subgrid"){$(pt).removeClass("selected")}stat=false;$("#jqg_"+$t.p.selrow.replace(".","\\."),$t.rows).attr("checked",stat);$t.p.selarrrow.splice(ia,1);if($t.p.onSelectRow&&onsr){$t.p.onSelectRow($t.p.selrow,stat)}var tpsr=$t.p.selarrrow[0];$t.p.selrow=(tpsr==undefined)?null:tpsr}}function scrGrid(iR,tp){var ch=$($t.grid.bDiv)[0].clientHeight,st=$($t.grid.bDiv)[0].scrollTop,nROT=$t.rows[iR].offsetTop+$t.rows[iR].clientHeight,pROT=$t.rows[iR].offsetTop;if(tp=="d"){if(nROT>=ch){$($t.grid.bDiv)[0].scrollTop=st+nROT-pROT}}if(tp=="u"){if(pROT<st){$($t.grid.bDiv)[0].scrollTop=st-nROT+pROT}}}})};$.fn.resetSelection=function(){return this.each(function(){var t=this,ind;if(!t.p.multiselect){if(t.p.selrow){$("tr#"+t.p.selrow.replace(".","\\."),t.grid.bDiv).removeClass("selected");t.p.selrow=null}}else{$(t.p.selarrrow).each(function(i,n){ind=$(t).getInd(t.rows,n);$(t.rows[ind]).removeClass("selected");$("#jqg_"+n.replace(".","\\."),t.rows[ind]).attr("checked",false)});$("#cb_jqg",t.grid.hDiv).attr("checked",false);t.p.selarrrow=[]}})};$.fn.getRowData=function(rowid,mode){var res={};this.each(function(){var $t=this,nm,ind,cm,ufp=false;ind=$($t).getInd($t.rows,rowid);if(ind===false){return res}if(typeof mode==="undefined"){mode="std"}if(mode=="unformat"&&$.unformat){ufp=true}$("td",$t.rows[ind]).each(function(i){nm=$t.p.colModel[i].name;cm=$t.p.colModel[i];if(nm!=="cb"&&nm!=="subgrid"){if($t.p.treeGrid===true&&nm==$t.p.ExpandColumn){if(ufp&&cm.formatter){res[nm]=$.unformat($("span:first",this),{colModel:cm},i)}else{res[nm]=$.htmlDecode($("span:first",this).html())}}else{if(ufp&&cm.formatter){res[nm]=$.unformat(this,{colModel:cm},i)}else{res[nm]=$.htmlDecode($(this).html())}}}})});return res};$.fn.delRowData=function(rowid){var success=false,rowInd,ia;this.each(function(){var $t=this;rowInd=$($t).getInd($t.rows,rowid);if(rowInd===false){return false}else{$($t.rows[rowInd]).remove();$t.p.records--;$t.updatepager();success=true;if(rowid==$t.p.selrow){$t.p.selrow=null}ia=$.inArray(rowid,$t.p.selarrrow);if(ia!=-1){$t.p.selarrrow.splice(ia,1)}}if(rowInd==1&&success&&($.browser.opera||$.browser.safari)){$($t.rows[1]).each(function(k){$(this).css("width",$t.grid.headers[k].width+"px");$t.grid.cols[k]=this})}if($t.p.altRows===true&&success){$($t.rows).slice(1).each(function(i){if(i%2==1){$(this).addClass("alt")}else{$(this).removeClass("alt")}})}});return success};$.fn.setRowData=function(rowid,data){var nm,success=false;this.each(function(){var t=this,vl,ind,ttd;if(!t.grid){return false}if(data){ind=$(t).getInd(t.rows,rowid);if(!ind){return false}success=true;$(this.p.colModel).each(function(i){nm=this.name;vl=data[nm];if(vl!==undefined){if(t.p.treeGrid===true&&nm==t.p.ExpandColumn){ttd=$("td:eq("+i+") > span:first",t.rows[ind])}else{ttd=$("td:eq("+i+")",t.rows[ind])}t.formatter(ttd,t.rows[ind],vl,i,"edit");success=true}})}});return success};$.fn.addRowData=function(rowid,data,pos,src){if(!pos){pos="last"}var success=false,nm,row,td,gi=0,si=0,sind,i;if(data){this.each(function(){var t=this;row=document.createElement("tr");row.id=rowid||t.p.records+1;$(row).addClass("jqgrow");if(t.p.multiselect){td=$("<td></td>");$(td[0],t.grid.bDiv).html("<input type='checkbox' id='jqg_"+rowid+"' class='cbox'/>");row.appendChild(td[0]);gi=1}if(t.p.subGrid){try{$(t).addSubGrid(t.grid.bDiv,row,gi)}catch(e){}si=1}for(i=gi+si;i<this.p.colModel.length;i++){nm=this.p.colModel[i].name;td=$("<td></td>");t.formatter(td,row,data[nm],i,"add");t.formatCol($(td[0],t.grid.bDiv),i);row.appendChild(td[0])}switch(pos){case"last":$(t.rows[t.rows.length-1]).after(row);break;case"first":$(t.rows[0]).after(row);break;case"after":sind=$(t).getInd(t.rows,src);sind>=0?$(t.rows[sind]).after(row):"";break;case"before":sind=$(t).getInd(t.rows,src);sind>0?$(t.rows[sind-1]).after(row):"";break}t.p.records++;if($.browser.safari||$.browser.opera){t.scrollLeft=t.scrollLeft;$("td",t.rows[1]).each(function(k){$(this).css("width",t.grid.headers[k].width+"px");t.grid.cols[k]=this})}if(t.p.altRows===true){if(pos=="last"){if(t.rows.length%2==1){$(row).addClass("alt")}}else{$(t.rows).slice(1).each(function(i){if(i%2==1){$(this).addClass("alt")}else{$(this).removeClass("alt")}})}}try{t.p.afterInsertRow(row.id,data)}catch(e){}t.updatepager();success=true})}return success};$.fn.hideCol=function(colname){return this.each(function(){var $t=this,w=0,fndh=false,gtw;if(!$t.grid){return}if(typeof colname=="string"){colname=[colname]}$(this.p.colModel).each(function(i){if($.inArray(this.name,colname)!=-1&&!this.hidden){w=parseInt($("tr th:eq("+i+")",$t.grid.hDiv).css("width"),10);$("tr th:eq("+i+")",$t.grid.hDiv).css({display:"none"});$($t.rows).each(function(j){$("td:eq("+i+")",$t.rows[j]).css({display:"none"})});$t.grid.cols[i].style.width=0;$t.grid.headers[i].width=0;$t.grid.width-=w;this.hidden=true;fndh=true}});if(fndh===true){gtw=Math.min($t.p._width,$t.grid.width);$("table:first",$t.grid.hDiv).width(gtw);$("table:first",$t.grid.bDiv).width(gtw);$($t.grid.hDiv).width(gtw);$($t.grid.bDiv).width(gtw);if($t.p.pager&&$($t.p.pager).hasClass("scroll")){$($t.p.pager).width(gtw)}if($t.p.caption){$($t.grid.cDiv).width(gtw)}if($t.p.toolbar[0]){$($t.grid.uDiv).width(gtw)}$t.grid.hDiv.scrollLeft=$t.grid.bDiv.scrollLeft}})};$.fn.showCol=function(colname){return this.each(function(){var $t=this,w=0,fdns=false,gtw,ofl;if(!$t.grid){return}if(typeof colname=="string"){colname=[colname]}$($t.p.colModel).each(function(i){if($.inArray(this.name,colname)!=-1&&this.hidden){w=parseInt($("tr th:eq("+i+")",$t.grid.hDiv).css("width"),10);$("tr th:eq("+i+")",$t.grid.hDiv).css("display","");$($t.rows).each(function(j){$("td:eq("+i+")",$t.rows[j]).css("display","").width(w)});this.hidden=false;$t.grid.cols[i].style.width=w;$t.grid.headers[i].width=w;$t.grid.width+=w;fdns=true}});if(fdns===true){gtw=Math.min($t.p._width,$t.grid.width);ofl=($t.grid.width<=$t.p._width)?"hidden":"auto";$("table:first",$t.grid.hDiv).width(gtw);$("table:first",$t.grid.bDiv).width(gtw);$($t.grid.hDiv).width(gtw);$($t.grid.bDiv).width(gtw).css("overflow-x",ofl);if($t.p.pager&&$($t.p.pager).hasClass("scroll")){$($t.p.pager).width(gtw)}if($t.p.caption){$($t.grid.cDiv).width(gtw)}if($t.p.toolbar[0]){$($t.grid.uDiv).width(gtw)}$t.grid.hDiv.scrollLeft=$t.grid.bDiv.scrollLeft}})};$.fn.setGridWidth=function(nwidth,shrink){return this.each(function(){var $t=this,chw=0,w,cw,ofl;if(!$t.grid){return}if(typeof shrink!="boolean"){shrink=true}var testdata=getScale();if(shrink!==true){testdata[0]=Math.min($t.p._width,$t.grid.width);testdata[2]=0}else{testdata[2]=testdata[1]}$.each($t.p.colModel,function(i,v){if(!this.hidden&&this.name!="cb"&&this.name!="subgrid"){cw=shrink!==true?$("tr:first th:eq("+i+")",$t.grid.hDiv).css("width"):this.width;w=Math.floor((IENum(nwidth)-IENum(testdata[2]))/IENum(testdata[0])*IENum(cw));chw+=w;$("table thead tr:first th:eq("+i+")",$t.grid.hDiv).css("width",w+"px");$("table:first tbody tr:first td:eq("+i+")",$t.grid.bDiv).css("width",w+"px");$t.grid.cols[i].style.width=w;$t.grid.headers[i].width=w}if(this.name=="cb"||this.name=="subgrid"){chw+=IENum(this.width)}});if(chw+testdata[1]<=nwidth||$t.p.forceFit===true){ofl="hidden";tw=nwidth}else{ofl="auto";tw=chw+testdata[1]}$("table:first",$t.grid.hDiv).width(tw);$("table:first",$t.grid.bDiv).width(tw);$($t.grid.hDiv).width(nwidth);$($t.grid.bDiv).width(nwidth).css("overflow-x",ofl);if($t.p.pager&&$($t.p.pager).hasClass("scroll")){$($t.p.pager).width(nwidth)}if($t.p.caption){$($t.grid.cDiv).width(nwidth)}if($t.p.toolbar[0]){$($t.grid.uDiv).width(nwidth)}$t.p._width=nwidth;$t.grid.width=tw;if($.browser.safari||$.browser.opera){$("table tbody tr:eq(1) td",$t.grid.bDiv).each(function(k){$(this).css("width",$t.grid.headers[k].width+"px");$t.grid.cols[k]=this})}$t.grid.hDiv.scrollLeft=$t.grid.bDiv.scrollLeft;function IENum(val){val=parseInt(val,10);return isNaN(val)?0:val}function getScale(){var testcell=$("table tr:first th:eq(1)",$t.grid.hDiv);var addpix=IENum($(testcell).css("padding-left"))+IENum($(testcell).css("padding-right"))+IENum($(testcell).css("border-left-width"))+IENum($(testcell).css("border-right-width"));var w=0,ap=0;$.each($t.p.colModel,function(i,v){if(!this.hidden){w+=parseInt(this.width);ap+=addpix}});return[w,ap,0]}})};$.fn.setGridHeight=function(nh){return this.each(function(){var ovfl,ovfl2,$t=this;if(!$t.grid){return}if($t.p.forceFit===true){ovfl2="hidden"}else{ovfl2=$($t.grid.bDiv).css("overflow-x")}ovfl=(isNaN(nh)&&$.browser.mozilla&&(nh.indexOf("%")!=-1||nh=="auto"))?"hidden":"auto";$($t.grid.bDiv).css({height:nh+(isNaN(nh)?"":"px"),"overflow-y":ovfl,"overflow-x":ovfl2});$t.p.height=nh})};$.fn.setCaption=function(newcap){return this.each(function(){this.p.caption=newcap;$("table:first th",this.grid.cDiv).html(newcap);$(this.grid.cDiv).show()})};$.fn.setLabel=function(colname,nData,prop,attrp){return this.each(function(){var $t=this,pos=-1;if(!$t.grid){return}if(isNaN(colname)){$($t.p.colModel).each(function(i){if(this.name==colname){pos=i;return false}})}else{pos=parseInt(colname,10)}if(pos>=0){var thecol=$("table:first th:eq("+pos+")",$t.grid.hDiv);if(nData){$("div",thecol).html(nData)}if(prop){if(typeof prop=="string"){$(thecol).addClass(prop)}else{$(thecol).css(prop)}}if(typeof attrp=="object"){$(thecol).attr(attrp)}}})};$.fn.setCell=function(rowid,colname,nData,cssp,attrp){return this.each(function(){var $t=this,pos=-1;if(!$t.grid){return}if(isNaN(colname)){$($t.p.colModel).each(function(i){if(this.name==colname){pos=i;return false}})}else{pos=parseInt(colname,10)}if(pos>=0){var ind=$($t).getInd($t.rows,rowid);if(ind>=0){var tcell=$("td:eq("+pos+")",$t.rows[ind]);if(nData!=""){$t.formatter(tcell,$t.rows[ind],nData,pos,"edit")}if(cssp){if(typeof cssp=="string"){$(tcell).addClass(cssp)}else{$(tcell).css(cssp)}}if(typeof attrp=="object"){$(tcell).attr(attrp)}}}})};$.fn.getCell=function(rowid,col){var ret=false;this.each(function(){var $t=this,pos=-1;if(!$t.grid){return}if(isNaN(col)){$($t.p.colModel).each(function(i){if(this.name==col){pos=i;return false}})}else{pos=parseInt(col,10)}if(pos>=0){var ind=$($t).getInd($t.rows,rowid);if(ind>=0){ret=$.htmlDecode($("td:eq("+pos+")",$t.rows[ind]).html())}}});return ret};$.fn.clearGridData=function(){return this.each(function(){var $t=this;if(!$t.grid){return}$("tbody tr:gt(0)",$t.grid.bDiv).remove();$t.p.selrow=null;$t.p.selarrrow=[];$t.p.savedRow=[];$t.p.records="0";$t.p.page="0";$t.p.lastpage="0";$t.updatepager()})};$.fn.getInd=function(obj,rowid,rc){var ret=false;$(obj).each(function(i){if(this.id==rowid){ret=rc===true?this:i;return false}});return ret};$.htmlDecode=function(value){if(value=="&nbsp;"||value=="&#160;"||(value.length==1&&value.charCodeAt(0)==160)){return""}return !value?value:String(value).replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"')};return this.each(function(){if(this.grid){return}this.p=p;if(this.p.colNames.length===0){for(var i=0;i<this.p.colModel.length;i++){this.p.colNames[i]=this.p.colModel[i].label||this.p.colModel[i].name}}if(this.p.colNames.length!==this.p.colModel.length){alert($.jgrid.errors.model);return}if(this.p.imgpath!==""){this.p.imgpath+="/"}$("<div class='loadingui' id=lui_"+this.id+"><div class='msgbox'>"+this.p.loadtext+"</div></div>").insertBefore(this);$(this).attr({cellSpacing:"0",cellPadding:"0",border:"0"});var ts=this,bSR=$.isFunction(this.p.beforeSelectRow)?this.p.beforeSelectRow:false,onSelectRow=$.isFunction(this.p.onSelectRow)?this.p.onSelectRow:false,ondblClickRow=$.isFunction(this.p.ondblClickRow)?this.p.ondblClickRow:false,onSortCol=$.isFunction(this.p.onSortCol)?this.p.onSortCol:false,loadComplete=$.isFunction(this.p.loadComplete)?this.p.loadComplete:false,loadError=$.isFunction(this.p.loadError)?this.p.loadError:false,loadBeforeSend=$.isFunction(this.p.loadBeforeSend)?this.p.loadBeforeSend:false,onRightClickRow=$.isFunction(this.p.onRightClickRow)?this.p.onRightClickRow:false,afterInsRow=$.isFunction(this.p.afterInsertRow)?this.p.afterInsertRow:false,onHdCl=$.isFunction(this.p.onHeaderClick)?this.p.onHeaderClick:false,beReq=$.isFunction(this.p.beforeRequest)?this.p.beforeRequest:false,onSC=$.isFunction(this.p.onCellSelect)?this.p.onCellSelect:false,sortkeys=["shiftKey","altKey","ctrlKey"];if($.inArray(ts.p.multikey,sortkeys)==-1){ts.p.multikey=false}var IntNum=function(val,defval){val=parseInt(val,10);if(isNaN(val)){return(defval)?defval:0}else{return val}};var formatCol=function(elem,pos){var ral=ts.p.colModel[pos].align;if(ral){$(elem).css("text-align",ral)}if(ts.p.colModel[pos].hidden){$(elem).css("display","none")}};var resizeFirstRow=function(t,er){$("tbody tr:eq("+er+") td",t).each(function(k){$(this).css("width",grid.headers[k].width+"px");grid.cols[k]=this})};var addCell=function(t,row,cell,pos){var td;td=document.createElement("td");formatter($(td,t),row,cell,pos,"add");row.appendChild(td);formatCol($(td,t),pos)};var formatter=function(elem,row,cellval,colpos,act){var cm=ts.p.colModel[colpos];if(cm.formatter){var opts={rowId:row.id,colModel:cm,rowData:row};if($.isFunction(cm.formatter)){cm.formatter(elem,cellval,opts,act)}else{if($.fmatter){$(elem).fmatter(cm.formatter,cellval,opts,act)}else{$(elem).html(cellval||"&#160;")}}}else{$(elem).html(cellval||"&#160;")}elem[0].title=elem[0].textContent||elem[0].innerText};var addMulti=function(t,row){var cbid,td;td=document.createElement("td");cbid="jqg_"+row.id;$(td,t).html("<input type='checkbox' id='"+cbid+"' class='cbox'/>");formatCol($(td,t),0);row.appendChild(td)};var reader=function(datatype){var field,f=[],j=0,i;for(i=0;i<ts.p.colModel.length;i++){field=ts.p.colModel[i];if(field.name!=="cb"&&field.name!=="subgrid"){f[j]=(datatype=="xml")?field.xmlmap||field.name:field.jsonmap||field.name;j++}}return f};var addXmlData=function addXmlData(xml,t,rcnt){if(xml){var fpos=ts.p.treeANode||0;rcnt=rcnt||0;if(fpos===0&&rcnt===0){$("tbody tr:gt(0)",t).remove()}}else{return}var v,row,gi=0,si=0,cbid,idn,getId,f=[],rd=[],cn=(ts.p.altRows===true)?"alt":"";if(!ts.p.xmlReader.repeatitems){f=reader("xml")}if(ts.p.keyIndex===false){idn=ts.p.xmlReader.id;if(idn.indexOf("[")===-1){getId=function(trow,k){return $(idn,trow).text()||k}}else{getId=function(trow,k){return trow.getAttribute(idn.replace(/[\[\]]/g,""))||k}}}else{getId=function(trow){return(f.length-1>=ts.p.keyIndex)?$(f[ts.p.keyIndex],trow).text():$(ts.p.xmlReader.cell+":eq("+ts.p.keyIndex+")",trow).text()}}$(ts.p.xmlReader.page,xml).each(function(){ts.p.page=this.textContent||this.text});$(ts.p.xmlReader.total,xml).each(function(){ts.p.lastpage=this.textContent||this.text});$(ts.p.xmlReader.records,xml).each(function(){ts.p.records=this.textContent||this.text});$(ts.p.xmlReader.userdata,xml).each(function(){ts.p.userData[this.getAttribute("name")]=this.textContent||this.text});$(ts.p.xmlReader.root+" "+ts.p.xmlReader.row,xml).each(function(j){row=document.createElement("tr");row.id=getId(this,j+1);if(ts.p.multiselect){addMulti(t,row);gi=1}if(ts.p.subGrid){try{$(ts).addSubGrid(t,row,gi,this)}catch(e){}si=1}if(ts.p.xmlReader.repeatitems===true){$(ts.p.xmlReader.cell,this).each(function(i){v=this.textContent||this.text;addCell(t,row,v,i+gi+si);rd[ts.p.colModel[i+gi+si].name]=v})}else{for(var i=0;i<f.length;i++){v=$(f[i],this).text();addCell(t,row,v,i+gi+si);rd[ts.p.colModel[i+gi+si].name]=v}}if(j%2==1){row.className=cn}$(row).addClass("jqgrow");if(ts.p.treeGrid===true){try{$(ts).setTreeNode(rd,row)}catch(e){}ts.p.treeANode=0}$(ts.rows[j+fpos+rcnt]).after(row);if(afterInsRow){ts.p.afterInsertRow(row.id,rd,this)}rd=[]});if(isSafari||isOpera){resizeFirstRow(t,1)}if(!ts.p.treeGrid&&!ts.p.scroll){ts.grid.bDiv.scrollTop=0}endReq();updatepager()};var addJSONData=function(data,t,rcnt){if(data){var fpos=ts.p.treeANode||0;rcnt=rcnt||0;if(fpos===0&&rcnt===0){$("tbody tr:gt(0)",t).remove()}}else{return}var v,i,j,row,f=[],cur,gi=0,si=0,drows,idn,rd=[],cn=(ts.p.altRows===true)?"alt":"";ts.p.page=data[ts.p.jsonReader.page];ts.p.lastpage=data[ts.p.jsonReader.total];ts.p.records=data[ts.p.jsonReader.records];ts.p.userData=data[ts.p.jsonReader.userdata]||{};if(!ts.p.jsonReader.repeatitems){f=reader("json")}if(ts.p.keyIndex===false){idn=ts.p.jsonReader.id;if(f.length>0&&!isNaN(idn)){idn=f[idn]}}else{idn=f.length>0?f[ts.p.keyIndex]:ts.p.keyIndex}drows=data[ts.p.jsonReader.root];if(drows){for(i=0;i<drows.length;i++){cur=drows[i];row=document.createElement("tr");row.id=cur[idn]||"";if(row.id===""){if(f.length===0){if(ts.p.jsonReader.cell){var ccur=cur[ts.p.jsonReader.cell];row.id=ccur[idn]||i+1;ccur=null}else{row.id=i+1}}else{row.id=i+1}}if(ts.p.multiselect){addMulti(t,row);gi=1}if(ts.p.subGrid){try{$(ts).addSubGrid(t,row,gi,drows[i])}catch(e){}si=1}if(ts.p.jsonReader.repeatitems===true){if(ts.p.jsonReader.cell){cur=cur[ts.p.jsonReader.cell]}for(j=0;j<cur.length;j++){addCell(t,row,cur[j],j+gi+si);rd[ts.p.colModel[j+gi+si].name]=cur[j]}}else{for(j=0;j<f.length;j++){v=cur[f[j]];if(v===undefined){try{v=eval("cur."+f[j])}catch(e){}}addCell(t,row,v,j+gi+si);rd[ts.p.colModel[j+gi+si].name]=cur[f[j]]}}if(i%2==1){row.className=cn}$(row).addClass("jqgrow");if(ts.p.treeGrid===true){try{$(ts).setTreeNode(rd,row)}catch(e){}ts.p.treeANode=0}$(ts.rows[i+fpos+rcnt]).after(row);if(afterInsRow){ts.p.afterInsertRow(row.id,rd,drows[i])}rd=[]}}if(isSafari||isOpera){resizeFirstRow(t,1)}if(!ts.p.treeGrid&&!ts.p.scroll){ts.grid.bDiv.scrollTop=0}endReq();updatepager()};var updatepager=function(){if(ts.p.pager){var cp,last,imp=ts.p.imgpath;if(ts.p.loadonce){cp=last=1;ts.p.lastpage=ts.page=1;$(".selbox",ts.p.pager).attr("disabled",true)}else{cp=IntNum(ts.p.page);last=IntNum(ts.p.lastpage);$(".selbox",ts.p.pager).attr("disabled",false)}if(ts.p.pginput===true){$("input.selbox",ts.p.pager).val(ts.p.page)}if(ts.p.viewrecords){if(ts.p.pgtext){$("#sp_1",ts.p.pager).html(ts.p.pgtext+"&#160;"+ts.p.lastpage)}$("#sp_2",ts.p.pager).html(ts.p.records+"&#160;"+ts.p.recordtext+"&#160;")}if(ts.p.pgbuttons===true){if(cp<=0){cp=last=1}if(cp==1){$("#first",ts.p.pager).attr({src:imp+"off-"+ts.p.firstimg,disabled:true})}else{$("#first",ts.p.pager).attr({src:imp+ts.p.firstimg,disabled:false})}if(cp==1){$("#prev",ts.p.pager).attr({src:imp+"off-"+ts.p.previmg,disabled:true})}else{$("#prev",ts.p.pager).attr({src:imp+ts.p.previmg,disabled:false})}if(cp==last){$("#next",ts.p.pager).attr({src:imp+"off-"+ts.p.nextimg,disabled:true})}else{$("#next",ts.p.pager).attr({src:imp+ts.p.nextimg,disabled:false})}if(cp==last){$("#last",ts.p.pager).attr({src:imp+"off-"+ts.p.lastimg,disabled:true})}else{$("#last",ts.p.pager).attr({src:imp+ts.p.lastimg,disabled:false})}}}if($.isFunction(ts.p.gridComplete)){ts.p.gridComplete()}};var populate=function(){if(!grid.hDiv.loading){beginReq();var gdata,prm={nd:(new Date().getTime()),_search:ts.p.search};prm[ts.p.prmNames.rows]=ts.p.rowNum;prm[ts.p.prmNames.page]=ts.p.page;prm[ts.p.prmNames.sort]=ts.p.sortname;prm[ts.p.prmNames.order]=ts.p.sortorder;gdata=$.extend(ts.p.postData,prm);if(ts.p.search===true){gdata=$.extend(gdata,ts.p.searchdata)}if($.isFunction(ts.p.datatype)){ts.p.datatype(gdata);endReq()}var rcnt=ts.p.scroll===false?0:ts.rows.length-1;switch(ts.p.datatype){case"json":$.ajax({url:ts.p.url,type:ts.p.mtype,dataType:"json",data:gdata,complete:function(JSON,st){if(st=="success"){addJSONData(eval("("+JSON.responseText+")"),ts.grid.bDiv,rcnt);JSON=null;if(loadComplete){loadComplete()}}},error:function(xhr,st,err){if(loadError){loadError(xhr,st,err)}endReq()},beforeSend:function(xhr){if(loadBeforeSend){loadBeforeSend(xhr)}}});if(ts.p.loadonce||ts.p.treeGrid){ts.p.datatype="local"}break;case"xml":$.ajax({url:ts.p.url,type:ts.p.mtype,dataType:"xml",data:gdata,complete:function(xml,st){if(st=="success"){addXmlData(xml.responseXML,ts.grid.bDiv,rcnt);xml=null;if(loadComplete){loadComplete()}}},error:function(xhr,st,err){if(loadError){loadError(xhr,st,err)}endReq()},beforeSend:function(xhr){if(loadBeforeSend){loadBeforeSend(xhr)}}});if(ts.p.loadonce||ts.p.treeGrid){ts.p.datatype="local"}break;case"xmlstring":addXmlData(stringToDoc(ts.p.datastr),ts.grid.bDiv);ts.p.datastr=null;ts.p.datatype="local";if(loadComplete){loadComplete()}break;case"jsonstring":if(typeof ts.p.datastr=="string"){ts.p.datastr=eval("("+ts.p.datastr+")")}addJSONData(ts.p.datastr,ts.grid.bDiv);ts.p.datastr=null;ts.p.datatype="local";if(loadComplete){loadComplete()}break;case"local":case"clientSide":ts.p.datatype="local";sortArrayData();break}}};var beginReq=function(){if(beReq){ts.p.beforeRequest()}grid.hDiv.loading=true;switch(ts.p.loadui){case"disable":break;case"enable":$("#load_"+ts.p.id).fadeIn("fast");break;case"block":$("#lui_"+ts.id).width($(grid.bDiv).width()).height(IntNum($(grid.bDiv).height())+IntNum(ts.p._height)).fadeIn("fast");break}};var endReq=function(){grid.hDiv.loading=false;switch(ts.p.loadui){case"disable":break;case"enable":$("#load_"+ts.p.id).fadeOut("fast");break;case"block":$("#lui_"+ts.id).fadeOut("fast");break}};var stringToDoc=function(xmlString){var xmlDoc;if(typeof xmlString!=="string"){return xmlString}try{var parser=new DOMParser();xmlDoc=parser.parseFromString(xmlString,"text/xml")}catch(e){xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async=false;xmlDoc.loadXML(xmlString)}return(xmlDoc&&xmlDoc.documentElement&&xmlDoc.documentElement.tagName!="parsererror")?xmlDoc:null};var sortArrayData=function(){var stripNum=/[\$,%]/g;var rows=[],col=0,st,sv,findSortKey,newDir=(ts.p.sortorder=="asc")?1:-1;$.each(ts.p.colModel,function(i,v){if(this.index==ts.p.sortname||this.name==ts.p.sortname){col=ts.p.lastsort=i;st=this.sorttype;return false}});if(st=="float"||st=="number"||st=="currency"){findSortKey=function($cell){var key=parseFloat($cell.replace(stripNum,""));return isNaN(key)?0:key}}else{if(st=="int"||st=="integer"){findSortKey=function($cell){return IntNum($cell.replace(stripNum,""))}}else{if(st=="date"){findSortKey=function($cell){var fd=ts.p.colModel[col].datefmt||"Y-m-d";return parseDate(fd,$cell).getTime()}}else{findSortKey=function($cell){return $.trim($cell.toUpperCase())}}}}$.each(ts.rows,function(index,row){if(index>0){try{sv=$.unformat($(row).children("td").eq(col),{colModel:ts.p.colModel[col]},col,true)}catch(_){sv=$(row).children("td").eq(col).text()}row.sortKey=findSortKey(sv);rows[index-1]=this}});if(ts.p.treeGrid){$(ts).SortTree(newDir)}else{rows.sort(function(a,b){if(a.sortKey<b.sortKey){return -newDir}if(a.sortKey>b.sortKey){return newDir}return 0});$.each(rows,function(index,row){$("tbody",ts.grid.bDiv).append(row);row.sortKey=null})}if(isSafari||isOpera){resizeFirstRow(ts.grid.bDiv,1)}if(ts.p.multiselect){$("tbody tr:gt(0)",ts.grid.bDiv).removeClass("selected");$("[id^=jqg_]",ts.rows).attr("checked",false);$("#cb_jqg",ts.grid.hDiv).attr("checked",false);ts.p.selarrrow=[]}if(ts.p.altRows===true){$("tbody tr:gt(0)",ts.grid.bDiv).removeClass("alt");$("tbody tr:odd",ts.grid.bDiv).addClass("alt")}ts.grid.bDiv.scrollTop=0;endReq()};var parseDate=function(format,date){var tsp={m:1,d:1,y:1970,h:0,i:0,s:0};format=format.toLowerCase();date=date.split(/[\\\/:_;.\s-]/);format=format.split(/[\\\/:_;.\s-]/);for(var i=0;i<format.length;i++){tsp[format[i]]=IntNum(date[i],tsp[format[i]])}tsp.m=parseInt(tsp.m,10)-1;var ty=tsp.y;if(ty>=70&&ty<=99){tsp.y=1900+tsp.y}else{if(ty>=0&&ty<=69){tsp.y=2000+tsp.y}}return new Date(tsp.y,tsp.m,tsp.d,tsp.h,tsp.i,tsp.s,0)};var setPager=function(){var inpt="<img class='pgbuttons' src='"+ts.p.imgpath+"spacer.gif'",pginp=(ts.p.pginput===true)?"<input class='selbox' type='text' size='3' maxlength='5' value='0'/>":"",pgl="",pgr="",str,clearVals=function(){ts.p.selrow=null;if(ts.p.multiselect){ts.p.selarrrow=[];$("#cb_jqg",ts.grid.hDiv).attr("checked",false)}ts.p.savedRow=[]};if(ts.p.viewrecords===true){pginp+="<span id='sp_1'></span>&#160;"}if(ts.p.pgbuttons===true){pgl=inpt+" id='first'/>&#160;&#160;"+inpt+" id='prev'/>&#160;";pgr=inpt+" id='next' />&#160;&#160;"+inpt+" id='last'/>"}$(ts.p.pager).append(pgl+pginp+pgr);if(ts.p.rowList.length>0){str="<SELECT class='selbox'>";for(var i=0;i<ts.p.rowList.length;i++){str+="<OPTION value="+ts.p.rowList[i]+((ts.p.rowNum==ts.p.rowList[i])?" selected":"")+">"+ts.p.rowList[i]}str+="</SELECT>";$(ts.p.pager).append("&#160;"+str+"&#160;<span id='sp_2'></span>");$(ts.p.pager).find("select").bind("change",function(){ts.p.rowNum=this.value;if(typeof ts.p.onPaging=="function"){ts.p.onPaging("records")}clearVals();populate()})}else{$(ts.p.pager).append("&#160;<span id='sp_2'></span>")}if(ts.p.pgbuttons===true){$(".pgbuttons",ts.p.pager).mouseover(function(e){if($(this).attr("disabled")=="true"){this.style.cursor="auto"}else{this.style.cursor="pointer"}return false}).mouseout(function(e){this.style.cursor="default";return false});$("#first, #prev, #next, #last",ts.p.pager).click(function(e){var cp=IntNum(ts.p.page),last=IntNum(ts.p.lastpage),selclick=false,fp=true,pp=true,np=true,lp=true;if(last===0||last===1){fp=false;pp=false;np=false;lp=false}else{if(last>1&&cp>=1){if(cp===1){fp=false;pp=false}else{if(cp>1&&cp<last){}else{if(cp===last){np=false;lp=false}}}}else{if(last>1&&cp===0){np=false;lp=false;cp=last-1}}}if(this.id==="first"&&fp){ts.p.page=1;selclick=true}if(this.id==="prev"&&pp){ts.p.page=(cp-1);selclick=true}if(this.id==="next"&&np){ts.p.page=(cp+1);selclick=true}if(this.id==="last"&&lp){ts.p.page=last;selclick=true}if(selclick){if(typeof ts.p.onPaging=="function"){ts.p.onPaging(this.id)}clearVals();populate()}e.stopPropagation();return false})}if(ts.p.pginput===true){$("input.selbox",ts.p.pager).keypress(function(e){var key=e.charCode?e.charCode:e.keyCode?e.keyCode:0;if(key==13){ts.p.page=($(this).val()>0)?$(this).val():ts.p.page;if(typeof ts.p.onPaging=="function"){ts.p.onPaging("user")}clearVals();populate();return false}return this})}};var sortData=function(index,idxcol,reload){var imgs,so,scg,ls,iId;if(ts.p.savedRow.length>0){return}if(!reload){if(ts.p.lastsort===idxcol){if(ts.p.sortorder==="asc"){ts.p.sortorder="desc"}else{if(ts.p.sortorder==="desc"){ts.p.sortorder="asc"}}}else{ts.p.sortorder="asc"}ts.p.page=1}imgs=(ts.p.sortorder==="asc")?ts.p.sortascimg:ts.p.sortdescimg;imgs="<img src='"+ts.p.imgpath+imgs+"'>";var thd=$("thead:first",grid.hDiv).get(0);ls=ts.p.colModel[ts.p.lastsort].name.replace(".","\\.");$("tr th div#jqgh_"+ls+" img",thd).remove();$("tr th div#jqgh_"+ls,thd).parent().removeClass(ts.p.sortclass);iId=index.replace(".","\\.");$("tr th div#"+iId,thd).append(imgs).parent().addClass(ts.p.sortclass);ts.p.lastsort=idxcol;index=index.substring(5);ts.p.sortname=ts.p.colModel[idxcol].index||index;so=ts.p.sortorder;if(onSortCol){onSortCol(index,idxcol,so)}if(ts.p.datatype=="local"){if(ts.p.deselectAfterSort){$(ts).resetSelection()}}else{ts.p.selrow=null;if(ts.p.multiselect){$("#cb_jqg",ts.grid.hDiv).attr("checked",false)}ts.p.selarrrow=[];ts.p.savedRow=[]}scg=ts.p.scroll;if(ts.p.scroll===true){ts.p.scroll=false}if(ts.p.subGrid&&ts.p.datatype=="local"){$("td.sgexpanded","#"+ts.p.id).each(function(){$(this).trigger("click")})}populate();if(ts.p.sortname!=index&&idxcol){ts.p.lastsort=idxcol}setTimeout(function(){ts.p.scroll=scg},500)};var setColWidth=function(){var initwidth=0;for(var l=0;l<ts.p.colModel.length;l++){if(!ts.p.colModel[l].hidden){initwidth+=IntNum(ts.p.colModel[l].width)}}var tblwidth=ts.p.width?ts.p.width:initwidth;for(l=0;l<ts.p.colModel.length;l++){if(!ts.p.shrinkToFit){ts.p.colModel[l].owidth=ts.p.colModel[l].width}ts.p.colModel[l].width=Math.round(tblwidth/initwidth*ts.p.colModel[l].width)}};var nextVisible=function(iCol){var ret=iCol,j=iCol,i;for(i=iCol+1;i<ts.p.colModel.length;i++){if(ts.p.colModel[i].hidden!==true){j=i;break}}return j-ret};this.p.id=this.id;if(this.p.treeGrid===true){this.p.subGrid=false;this.p.altRows=false;this.p.pgbuttons=false;this.p.pginput=false;this.p.multiselect=false;this.p.rowList=[];try{$(this).setTreeGrid();this.p.treedatatype=this.p.datatype;$.each(this.p.treeReader,function(i,n){if(n){ts.p.colNames.push(n);ts.p.colModel.push({name:n,width:1,hidden:true,sortable:false,resizable:false,hidedlg:true,editable:true,search:false})}})}catch(_){}}ts.p.keyIndex=false;for(var i=0;i<ts.p.colModel.length;i++){if(ts.p.colModel[i].key===true){ts.p.keyIndex=i;break}}if(this.p.subGrid){this.p.colNames.unshift("");this.p.colModel.unshift({name:"subgrid",width:25,sortable:false,resizable:false,hidedlg:true,search:false});var cm=this.p.subGridModel;if(cm[0]){cm[0].align=$.extend([],cm[0].align||[]);for(i=0;i<cm[0].name.length;i++){cm[0].align[i]=cm[0].align[i]||"left"}}cm=null}if(this.p.multiselect){this.p.colNames.unshift("<input id='cb_jqg' class='cbox' type='checkbox'/>");this.p.colModel.unshift({name:"cb",width:27,sortable:false,resizable:false,hidedlg:true,search:false})}var xReader={root:"rows",row:"row",page:"rows>page",total:"rows>total",records:"rows>records",repeatitems:true,cell:"cell",id:"[id]",userdata:"userdata",subgrid:{root:"rows",row:"row",repeatitems:true,cell:"cell"}};var jReader={root:"rows",page:"page",total:"total",records:"records",repeatitems:true,cell:"cell",id:"id",userdata:"userdata",subgrid:{root:"rows",repeatitems:true,cell:"cell"}};if(ts.p.scroll===true){ts.p.pgbuttons=false;ts.p.pginput=false;ts.p.pgtext=false;ts.p.rowList=[]}ts.p.xmlReader=$.extend(xReader,ts.p.xmlReader);ts.p.jsonReader=$.extend(jReader,ts.p.jsonReader);$.each(ts.p.colModel,function(i){this.width=IntNum(this.width,150)});if(ts.p.width){setColWidth()}var thead=document.createElement("thead");var trow=document.createElement("tr");thead.appendChild(trow);var i=0,th,idn,thdiv;if(ts.p.shrinkToFit===true&&ts.p.forceFit===true){for(i=ts.p.colModel.length-1;i>=0;i--){if(!ts.p.colModel[i].hidden){ts.p.colModel[i].resizable=false;break}}}for(i=0;i<this.p.colNames.length;i++){th=document.createElement("th");idn=ts.p.colModel[i].name;thdiv=document.createElement("div");$(thdiv).html(ts.p.colNames[i]+"&#160;");if(idn==ts.p.sortname){var imgs=(ts.p.sortorder==="asc")?ts.p.sortascimg:ts.p.sortdescimg;imgs="<img src='"+ts.p.imgpath+imgs+"'>";$(thdiv).append(imgs);ts.p.lastsort=i;$(th).addClass(ts.p.sortclass)}thdiv.id="jqgh_"+idn;th.appendChild(thdiv);trow.appendChild(th)}if(this.p.multiselect){var onSA=true,chk,emp=[];if(typeof ts.p.onSelectAll!=="function"){onSA=false}$("#cb_jqg",trow).bind("click",function(){if(this.checked){$("[id^=jqg_]",ts.rows).attr("checked",true);$(ts.rows).slice(1).each(function(i){if(!$(this).hasClass("subgrid")){$(this).addClass("selected");ts.p.selarrrow[i]=ts.p.selrow=this.id}});chk=true;emp=[]}else{$("[id^=jqg_]",ts.rows).attr("checked",false);$(ts.rows).slice(1).each(function(i){if(!$(this).hasClass("subgrid")){$(this).removeClass("selected");emp[i]=this.id}});ts.p.selarrrow=[];ts.p.selrow=null;chk=false}if(onSA){ts.p.onSelectAll(chk?ts.p.selarrrow:emp,chk)}})}this.appendChild(thead);thead=$("thead:first",ts).get(0);var w,res,sort;$("tr:first th",thead).each(function(j){w=ts.p.colModel[j].width;if(typeof ts.p.colModel[j].resizable==="undefined"){ts.p.colModel[j].resizable=true}res=document.createElement("span");$(res).html("&#160;");if(ts.p.colModel[j].resizable){$(this).addClass(ts.p.resizeclass);$(res).mousedown(function(e){if(ts.p.forceFit===true){ts.p.nv=nextVisible(j)}grid.dragStart(j,e.clientX);e.preventDefault();return false})}else{res=""}$(this).css("width",w+"px").prepend(res);if(ts.p.colModel[j].hidden){$(this).css("display","none")}grid.headers[j]={width:w,el:this};sort=ts.p.colModel[j].sortable;if(typeof sort!=="boolean"){sort=true}if(sort){$("div",this).css("cursor","pointer").click(function(){sortData(this.id,j);return false})}});var isMSIE=$.browser.msie?true:false,isMoz=$.browser.mozilla?true:false,isOpera=$.browser.opera?true:false,isSafari=$.browser.safari?true:false,td,ptr,gw=0,hdc=0,tbody=document.createElement("tbody");trow=document.createElement("tr");trow.id="_empty";tbody.appendChild(trow);for(i=0;i<ts.p.colNames.length;i++){td=document.createElement("td");trow.appendChild(td)}this.appendChild(tbody);$("tbody tr:first td",ts).each(function(ii){w=ts.p.colModel[ii].width;$(this).css({width:w+"px",height:"0px"});w+=IntNum($(this).css("padding-left"))+IntNum($(this).css("padding-right"))+IntNum($(this).css("border-left-width"))+IntNum($(this).css("border-right-width"));if(ts.p.colModel[ii].hidden===true){$(this).css("display","none");hdc+=w}grid.cols[ii]=this;gw+=w});if(isMoz){$(trow).css({visibility:"collapse"})}else{if(isSafari||isOpera){$(trow).css({display:"none"})}}grid.width=IntNum(gw)-IntNum(hdc);ts.p._width=grid.width;grid.hTable=document.createElement("table");$(grid.hTable).append(thead).css({width:grid.width+"px"}).attr({cellSpacing:"0",cellPadding:"0",border:"0"}).addClass("scroll grid_htable");grid.hDiv=document.createElement("div");var hg=(ts.p.caption&&ts.p.hiddengrid===true)?true:false;$(grid.hDiv).css({width:grid.width+"px",overflow:"hidden"}).prepend("<div class='loading' id='load_"+ts.p.id+"'>"+ts.p.loadtext+"</div>").addClass("grid_hdiv").append(grid.hTable).bind("selectstart",function(){return false});if(hg){$(grid.hDiv).hide();ts.p.gridstate="hidden"}if(ts.p.pager){if(typeof ts.p.pager=="string"){if(ts.p.pager.substr(0,1)!="#"){ts.p.pager="#"+ts.p.pager}}if($(ts.p.pager).hasClass("scroll")){$(ts.p.pager).css({width:grid.width+"px",overflow:"hidden"}).show();ts.p._height=parseInt($(ts.p.pager).height(),10);if(hg){$(ts.p.pager).hide()}}setPager()}if(ts.p.cellEdit===false){$(ts).mouseover(function(e){td=(e.target||e.srcElement);ptr=$(td,ts.rows).parents("tr:first");if($(ptr).hasClass("jqgrow")){$(ptr).addClass("over")}return false}).mouseout(function(e){td=(e.target||e.srcElement);ptr=$(td,ts.rows).parents("tr:first");$(ptr).removeClass("over");return false})}var ri,ci;$(ts).before(grid.hDiv).css("width",grid.width+"px").click(function(e){td=(e.target||e.srcElement);if(td.href){return true}var scb=$(td).hasClass("cbox");ptr=$(td,ts.rows).parents("tr.jqgrow");if($(ptr).length===0){return false}var cSel=true;if(bSR){cSel=bSR(ptr.attr("id"))}if(cSel===true){if(ts.p.cellEdit===true){if(ts.p.multiselect&&scb){$(ts).setSelection(false,true,ptr)}else{ri=ptr[0].rowIndex;ci=!$(td).is("td")?$(td).parents("td:first")[0].cellIndex:td.cellIndex;try{$(ts).editCell(ri,ci,true,true)}catch(e){}}}else{if(!ts.p.multikey){if(ts.p.multiselect&&ts.p.multiboxonly){if(scb){$(ts).setSelection(false,true,ptr)}}else{$(ts).setSelection(false,true,ptr)}}else{if(e[ts.p.multikey]){$(ts).setSelection(false,true,ptr)}else{if(ts.p.multiselect&&scb){scb=$("[id^=jqg_]",ptr).attr("checked");$("[id^=jqg_]",ptr).attr("checked",!scb)}}}}if(onSC){ri=ptr[0].id;ci=!$(td).is("td")?$(td).parents("td:first")[0].cellIndex:td.cellIndex;onSC(ri,ci,$(td).html(),td)}}e.stopPropagation()}).bind("reloadGrid",function(e){if(ts.p.treeGrid===true){ts.p.datatype=ts.p.treedatatype}if(ts.p.datatype=="local"){$(ts).resetSelection()}else{if(!ts.p.treeGrid){ts.p.selrow=null;if(ts.p.multiselect){ts.p.selarrrow=[];$("#cb_jqg",ts.grid.hDiv).attr("checked",false)}if(ts.p.cellEdit){ts.p.savedRow=[]}}}populate()});if(ondblClickRow){$(this).dblclick(function(e){td=(e.target||e.srcElement);ptr=$(td,ts.rows).parents("tr.jqgrow");if($(ptr).length===0){return false}ts.p.ondblClickRow($(ptr).attr("id"));return false})}if(onRightClickRow){$(this).bind("contextmenu",function(e){td=(e.target||e.srcElement);ptr=$(td,ts.rows).parents("tr.jqgrow");if($(ptr).length===0){return false}if(!ts.p.multiselect){$(ts).setSelection(false,true,ptr)}ri=ptr[0].id;ci=!$(td).is("td")?$(td).parents("td:first")[0].cellIndex:td.cellIndex;ts.p.onRightClickRow($(ptr).attr("id"),ri,ci);return false})}grid.bDiv=document.createElement("div");var ofl2=(isNaN(ts.p.height)&&isMoz&&(ts.p.height.indexOf("%")!=-1||ts.p.height=="auto"))?"hidden":"auto";$(grid.bDiv).addClass("grid_bdiv").scroll(function(e){grid.scrollGrid()}).css({height:ts.p.height+(isNaN(ts.p.height)?"":"px"),padding:"0px",margin:"0px",overflow:ofl2,width:(grid.width)+"px"}).css("overflow-x","hidden").append(this);$("table:first",grid.bDiv).css({width:grid.width+"px"});if(isMSIE){if($("tbody",this).size()===2){$("tbody:first",this).remove()}if(ts.p.multikey){$(grid.bDiv).bind("selectstart",function(){return false})}if(ts.p.treeGrid){$(grid.bDiv).css("position","relative")}}else{if(ts.p.multikey){$(grid.bDiv).bind("mousedown",function(){return false})}}if(hg){$(grid.bDiv).hide()}grid.cDiv=document.createElement("div");$(grid.cDiv).append("<table class='Header' cellspacing='0' cellpadding='0' border='0'><tr><td class='HeaderLeft'><img src='"+ts.p.imgpath+"spacer.gif' border='0' /></td><th>"+ts.p.caption+"</th>"+((ts.p.hidegrid===true)?"<td class='HeaderButton'><img src='"+ts.p.imgpath+"up.gif' border='0'/></td>":"")+"<td class='HeaderRight'><img src='"+ts.p.imgpath+"spacer.gif' border='0' /></td></tr></table>").addClass("GridHeader").width(grid.width);$(grid.cDiv).insertBefore(grid.hDiv);if(ts.p.toolbar[0]){grid.uDiv=document.createElement("div");if(ts.p.toolbar[1]=="top"){$(grid.uDiv).insertBefore(grid.hDiv)}else{$(grid.uDiv).insertAfter(grid.hDiv)}$(grid.uDiv).width(grid.width).addClass("userdata").attr("id","t_"+this.id);ts.p._height+=parseInt($(grid.uDiv).height(),10);if(hg){$(grid.uDiv).hide()}}if(ts.p.caption){ts.p._height+=parseInt($(grid.cDiv,ts).height(),10);var tdt=ts.p.datatype;if(ts.p.hidegrid===true){$(".HeaderButton",grid.cDiv).toggle(function(){if(ts.p.pager){$(ts.p.pager).slideUp()}if(ts.p.toolbar[0]){$(grid.uDiv,ts).slideUp()}$(grid.bDiv).hide();$(grid.hDiv).slideUp();$("img",this).attr("src",ts.p.imgpath+"down.gif");ts.p.gridstate="hidden";if(onHdCl){if(!hg){ts.p.onHeaderClick(ts.p.gridstate)}}},function(){$(grid.hDiv).slideDown();$(grid.bDiv).show();if(ts.p.pager){$(ts.p.pager).slideDown()}if(ts.p.toolbar[0]){$(grid.uDiv).slideDown()}$("img",this).attr("src",ts.p.imgpath+"up.gif");if(hg){ts.p.datatype=tdt;populate();hg=false}ts.p.gridstate="visible";if(onHdCl){ts.p.onHeaderClick(ts.p.gridstate)}});if(hg){$(".HeaderButton",grid.cDiv).trigger("click");ts.p.datatype="local"}}}else{$(grid.cDiv).hide()}ts.p._height+=parseInt($(grid.hDiv,ts).height(),10);$(grid.hDiv).mousemove(function(e){grid.dragMove(e.clientX);return false}).after(grid.bDiv);$(document).mouseup(function(e){if(grid.resizing){grid.dragEnd();if(grid.newWidth&&ts.p.forceFit===false){var gwdt=(grid.width<=ts.p._width)?grid.width:ts.p._width;var overfl=(grid.width<=ts.p._width)?"hidden":"auto";if(ts.p.pager&&$(ts.p.pager).hasClass("scroll")){$(ts.p.pager).width(gwdt)}if(ts.p.caption){$(grid.cDiv).width(gwdt)}if(ts.p.toolbar[0]){$(grid.uDiv).width(gwdt)}$(grid.bDiv).width(gwdt).css("overflow-x",overfl);$(grid.hDiv).width(gwdt)}return false}return true});ts.formatCol=function(a,b){formatCol(a,b)};ts.sortData=function(a,b,c){sortData(a,b,c)};ts.updatepager=function(){updatepager()};ts.formatter=function(elem,row,cellval,colpos,act){formatter(elem,row,cellval,colpos,act)};$.extend(grid,{populate:function(){populate()}});this.grid=grid;ts.addXmlData=function(d){addXmlData(d,ts.grid.bDiv)};ts.addJSONData=function(d){addJSONData(d,ts.grid.bDiv)};populate();if(!ts.p.shrinkToFit){ts.p.forceFit=false;$("tr:first th",thead).each(function(j){var w=ts.p.colModel[j].owidth;var diff=w-ts.p.colModel[j].width;if(diff>0&&!ts.p.colModel[j].hidden){grid.headers[j].width=w;$(this).add(grid.cols[j]).width(w);$("table:first",grid.bDiv).add(grid.hTable).width(ts.grid.width);ts.grid.width+=diff;grid.hDiv.scrollLeft=grid.bDiv.scrollLeft}});ofl2=(grid.width<=ts.p._width)?"hidden":"auto";$(grid.bDiv).css({"overflow-x":ofl2})}$(window).unload(function(){$(this).unbind("*");this.grid=null;this.p=null})})}})(jQuery);(function(b){b.fn.extend({editCell:function(a,f,g,h){return this.each(function(){var d=this,u,w,v;if(!d.grid||d.p.cellEdit!==true){return}var x=null;if(b.browser.msie&&b.browser.version<=7&&g===true&&h===true){f=s(d.rows[a],f)}f=parseInt(f,10);d.p.selrow=d.rows[a].id;if(!d.p.knv){b(d).GridNav()}if(d.p.savedRow.length>0){if(g===true){if(a==d.p.iRow&&f==d.p.iCol){return}}var y=b("td:eq("+d.p.savedRow[0].ic+")>#"+d.p.savedRow[0].id+"_"+d.p.savedRow[0].name.replace(".","\\."),d.rows[d.p.savedRow[0].id]).val();if(d.p.savedRow[0].v!=y){b(d).saveCell(d.p.savedRow[0].id,d.p.savedRow[0].ic)}else{b(d).restoreCell(d.p.savedRow[0].id,d.p.savedRow[0].ic)}}else{window.setTimeout(function(){b("#"+d.p.knv).attr("tabindex","-1").focus()},0)}u=d.p.colModel[f].name;if(u=="subgrid"){return}if(d.p.colModel[f].editable===true&&g===true){v=b("td:eq("+f+")",d.rows[a]);if(parseInt(d.p.iCol)>=0&&parseInt(d.p.iRow)>=0){b("td:eq("+d.p.iCol+")",d.rows[d.p.iRow]).removeClass("edit-cell");b(d.rows[d.p.iRow]).removeClass("selected-row")}b(v).addClass("edit-cell");b(d.rows[a]).addClass("selected-row");try{w=b.unformat(v,{colModel:d.p.colModel[f]},f)}catch(e){w=b(v).html()}var c=b.extend(d.p.colModel[f].editoptions||{},{id:a+"_"+u,name:u});if(!d.p.colModel[f].edittype){d.p.colModel[f].edittype="text"}d.p.savedRow[0]={id:a,ic:f,name:u,v:w};if(b.isFunction(d.p.formatCell)){var z=d.p.formatCell(d.rows[a].id,u,w,a,f);if(z){w=z}}var r=createEl(d.p.colModel[f].edittype,c,w,v);if(b.isFunction(d.p.beforeEditCell)){d.p.beforeEditCell(d.rows[a].id,u,w,a,f)}b(v).html("").append(r);window.setTimeout(function(){b(r).focus()},0);b("input, select, textarea",v).bind("keydown",function(j){if(j.keyCode===27){b(d).restoreCell(a,f)}if(j.keyCode===13){b(d).saveCell(a,f)}if(j.keyCode==9){if(j.shiftKey){b(d).prevCell(a,f)}else{b(d).nextCell(a,f)}}j.stopPropagation()});if(b.isFunction(d.p.afterEditCell)){d.p.afterEditCell(d.rows[a].id,u,w,a,f)}}else{if(parseInt(d.p.iCol)>=0&&parseInt(d.p.iRow)>=0){b("td:eq("+d.p.iCol+")",d.rows[d.p.iRow]).removeClass("edit-cell");b(d.rows[d.p.iRow]).removeClass("selected-row")}b("td:eq("+f+")",d.rows[a]).addClass("edit-cell");b(d.rows[a]).addClass("selected-row");if(b.isFunction(d.p.onSelectCell)){w=b("td:eq("+f+")",d.rows[a]).html().replace(/\&nbsp\;/ig,"");d.p.onSelectCell(d.rows[a].id,u,w,a,f)}}d.p.iCol=f;d.p.iRow=a;function s(l,j){var m=0;var o=0;for(i=0;i<l.cells.length;i++){var k=l.cells(i);if(k.style.display=="none"){m++}else{o++}if(o>j){return i}}return i}})},saveCell:function(a,d){return this.each(function(){var s=this,w,x;if(!s.grid||s.p.cellEdit!==true){return}if(s.p.savedRow.length==1){x=0}else{x=null}if(x!=null){var r=b("td:eq("+d+")",s.rows[a]),v,y;w=s.p.colModel[d].name;switch(s.p.colModel[d].edittype){case"select":v=b("#"+a+"_"+w.replace(".","\\.")+">option:selected",s.rows[a]).val();y=b("#"+a+"_"+w.replace(".","\\.")+">option:selected",s.rows[a]).text();break;case"checkbox":var B=["Yes","No"];if(s.p.colModel[d].editoptions){B=s.p.colModel[d].editoptions.value.split(":")}v=b("#"+a+"_"+w.replace(".","\\."),s.rows[a]).attr("checked")?B[0]:B[1];y=v;break;case"password":case"text":case"textarea":v=!s.p.autoencode?b("#"+a+"_"+w.replace(".","\\."),s.rows[a]).val():htmlEncode(b("#"+a+"_"+w.replace(".","\\."),s.rows[a]).val());y=v;break}if(y!=s.p.savedRow[x].v){if(b.isFunction(s.p.beforeSaveCell)){var z=s.p.beforeSaveCell(s.rows[a].id,w,v,a,d);if(z){v=z}}var e=checkValues(v,d,s);if(e[0]===true){var c={};if(b.isFunction(s.p.beforeSubmitCell)){c=s.p.beforeSubmitCell(s.rows[a].id,w,v,a,d);if(!c){c={}}}if(s.p.cellsubmit=="remote"){if(s.p.cellurl){var u={};u[w]=v;u.id=s.rows[a].id;u=b.extend(c,u);b.ajax({url:s.p.cellurl,data:u,type:"POST",complete:function(g,f){if(f=="success"){if(b.isFunction(s.p.afterSubmitCell)){var h=s.p.afterSubmitCell(g,u.id,w,v,a,d);if(h[0]===true){b(r).empty();b(s).setCell(s.rows[a].id,d,y);b(r).addClass("dirty-cell");b(s.rows[a]).addClass("edited");if(b.isFunction(s.p.afterSaveCell)){s.p.afterSaveCell(s.rows[a].id,w,v,a,d)}s.p.savedRow=[]}else{info_dialog(b.jgrid.errors.errcap,h[1],b.jgrid.edit.bClose,s.p.imgpath);b(s).restoreCell(a,d)}}else{b(r).empty();b(s).setCell(s.rows[a].id,d,y);b(r).addClass("dirty-cell");b(s.rows[a]).addClass("edited");if(b.isFunction(s.p.afterSaveCell)){s.p.afterSaveCell(s.rows[a].id,w,v,a,d)}s.p.savedRow=[]}}},error:function(f,g){if(b.isFunction(s.p.errorCell)){s.p.errorCell(f,g);b(s).restoreCell(a,d)}else{info_dialog(b.jgrid.errors.errcap,f.status+" : "+f.statusText+"<br/>"+g,b.jgrid.edit.bClose,s.p.imgpath);b(s).restoreCell(a,d)}}})}else{try{info_dialog(b.jgrid.errors.errcap,b.jgrid.errors.nourl,b.jgrid.edit.bClose,s.p.imgpath);b(s).restoreCell(a,d)}catch(A){}}}if(s.p.cellsubmit=="clientArray"){b(r).empty();b(s).setCell(s.rows[a].id,d,y);b(r).addClass("dirty-cell");b(s.rows[a]).addClass("edited");if(b.isFunction(s.p.afterSaveCell)){s.p.afterSaveCell(s.rows[a].id,w,v,a,d)}s.p.savedRow=[]}}else{try{window.setTimeout(function(){info_dialog(b.jgrid.errors.errcap,v+" "+e[1],b.jgrid.edit.bClose,s.p.imgpath)},100);b(s).restoreCell(a,d)}catch(A){}}}else{b(s).restoreCell(a,d)}}if(b.browser.opera){b("#"+s.p.knv).attr("tabindex","-1").focus()}else{window.setTimeout(function(){b("#"+s.p.knv).attr("tabindex","-1").focus()},0)}})},restoreCell:function(a,d){return this.each(function(){var c=this,m,e;if(!c.grid||c.p.cellEdit!==true){return}if(c.p.savedRow.length==1){e=0}else{e=null}if(e!=null){var l=b("td:eq("+d+")",c.rows[a]);if(b.isFunction(b.fn.datepicker)){try{b.datepicker("hide")}catch(k){try{b.datepicker.hideDatepicker()}catch(k){}}}b(l).empty();b(c).setCell(c.rows[a].id,d,c.p.savedRow[e].v);c.p.savedRow=[]}window.setTimeout(function(){b("#"+c.p.knv).attr("tabindex","-1").focus()},0)})},nextCell:function(a,d){return this.each(function(){var c=this,h=false,k;if(!c.grid||c.p.cellEdit!==true){return}for(var j=d+1;j<c.p.colModel.length;j++){if(c.p.colModel[j].editable===true){h=j;break}}if(h!==false){b(c).saveCell(a,d);b(c).editCell(a,h,true)}else{if(c.p.savedRow.length>0){b(c).saveCell(a,d)}}})},prevCell:function(a,d){return this.each(function(){var c=this,h=false,k;if(!c.grid||c.p.cellEdit!==true){return}for(var j=d-1;j>=0;j--){if(c.p.colModel[j].editable===true){h=j;break}}if(h!==false){b(c).saveCell(a,d);b(c).editCell(a,h,true)}else{if(c.p.savedRow.length>0){b(c).saveCell(a,d)}}})},GridNav:function(){return this.each(function(){var f=this;if(!f.grid||f.p.cellEdit!==true){return}f.p.knv=b("table:first",f.grid.bDiv).attr("id")+"_kn";var a=b("<span style='width:0px;height:0px;background-color:black;' tabindex='0'><span tabindex='-1' style='width:0px;height:0px;background-color:grey' id='"+f.p.knv+"'></span></span>");b(a).insertBefore(f.grid.cDiv);b("#"+f.p.knv).focus();b("#"+f.p.knv).keydown(function(c){switch(c.keyCode){case 38:if(f.p.iRow-1>=1){g(f.p.iRow-1,f.p.iCol,"vu");b(f).editCell(f.p.iRow-1,f.p.iCol,false)}break;case 40:if(f.p.iRow+1<=f.rows.length-1){g(f.p.iRow+1,f.p.iCol,"vd");b(f).editCell(f.p.iRow+1,f.p.iCol,false)}break;case 37:if(f.p.iCol-1>=0){var d=h(f.p.iCol-1,"lft");g(f.p.iRow,d,"h");b(f).editCell(f.p.iRow,d,false)}break;case 39:if(f.p.iCol+1<=f.p.colModel.length-1){var d=h(f.p.iCol+1,"rgt");g(f.p.iRow,d,"h");b(f).editCell(f.p.iRow,d,false)}break;case 13:if(parseInt(f.p.iCol,10)>=0&&parseInt(f.p.iRow,10)>=0){b(f).editCell(f.p.iRow,f.p.iCol,true)}break}return false});function g(v,d,c){if(c.substr(0,1)=="v"){var s=b(f.grid.bDiv)[0].clientHeight,x=b(f.grid.bDiv)[0].scrollTop,u=f.rows[v].offsetTop+f.rows[v].clientHeight,e=f.rows[v].offsetTop;if(c=="vd"){if(u>=s){b(f.grid.bDiv)[0].scrollTop=b(f.grid.bDiv)[0].scrollTop+f.rows[v].clientHeight}}if(c=="vu"){if(e<x){b(f.grid.bDiv)[0].scrollTop=b(f.grid.bDiv)[0].scrollTop-f.rows[v].clientHeight}}}if(c=="h"){var w=b(f.grid.bDiv)[0].clientWidth,r=b(f.grid.bDiv)[0].scrollLeft,z=f.rows[v].cells[d].offsetLeft+f.rows[v].cells[d].clientWidth,y=f.rows[v].cells[d].offsetLeft;if(z>=w+parseInt(r)){b(f.grid.bDiv)[0].scrollLeft=b(f.grid.bDiv)[0].scrollLeft+f.rows[v].cells[d].clientWidth}else{if(y<r){b(f.grid.bDiv)[0].scrollLeft=b(f.grid.bDiv)[0].scrollLeft-f.rows[v].cells[d].clientWidth}}}}function h(c,e){var k,d;if(e=="lft"){k=c+1;for(d=c;d>=0;d--){if(f.p.colModel[d].hidden!==true){k=d;break}}}if(e=="rgt"){k=c-1;for(d=c;d<f.p.colModel.length;d++){if(f.p.colModel[d].hidden!==true){k=d;break}}}return k}})},getChangedCells:function(d){var a=[];if(!d){d="all"}this.each(function(){var c=this;if(!c.grid||c.p.cellEdit!==true){return}b(c.rows).slice(1).each(function(g){var h={};if(b(this).hasClass("edited")){b("td",this).each(function(e){nm=c.p.colModel[e].name;if(nm!=="cb"&&nm!=="subgrid"){if(d=="dirty"){if(b(this).hasClass("dirty-cell")){h[nm]=b.htmlDecode(b(this).html())}}else{h[nm]=b.htmlDecode(b(this).html())}}});h.id=this.id;a.push(h)}})});return a}})})(jQuery);var showModal=function(b){b.w.show()};var closeModal=function(b){b.w.hide();if(b.o){b.o.remove()}};function createModal(w,u,o,y,A,B){var z=o.imgpath?o.imgpath+o.closeicon:o.closeicon;var x=document.createElement("div");jQuery(x).addClass("modalwin").attr("id",w.themodal);var q=jQuery('<div id="'+w.modalhead+'"><table width="100%"><tbody><tr><td class="modaltext">'+o.caption+'</td> <td style="text-align:right" ><a href="javascript:void(0);" class="jqmClose">'+(z!=""?'<img src="'+z+'" border="0"/>':"X")+"</a></td></tr></tbody></table> </div>").addClass("modalhead");var r=document.createElement("div");jQuery(r).addClass("modalcontent").attr("id",w.modalcontent).css("width","97%");jQuery(r).append(u);x.appendChild(r);var v=document.createElement("div");jQuery(v).addClass("loading").html(o.processData||"");jQuery(x).prepend(v);jQuery(x).prepend(q);jQuery(x).addClass("jqmWindow");if(o.drag){jQuery(x).append("<img  class='jqResize' src='"+o.imgpath+"resize.gif'/>")}if(B===true){jQuery("body").append(x)}else{jQuery(x).insertBefore(y)}if(o.left==0&&o.top==0){var s=[];s=findPos(A);o.left=s[0]+4;o.top=s[1]+4}if(o.width==0||!o.width){o.width=300}if(o.height==0||!o.width){o.height=200}if(!o.zIndex){o.zIndex=950}jQuery(x).css({top:o.top+"px",left:o.left+"px",width:o.width+"px",height:o.height+"px",zIndex:o.zIndex}).attr({tabIndex:"-1"});if(o.closeOnEscape&&o.closeOnEscape===true){jQuery(x).keydown(function(a){if(a.which==27){hideModal(this)}})}return false}function viewModal(d,c){c=jQuery.extend({toTop:true,overlay:10,modal:false,onShow:showModal,onHide:closeModal},c||{});jQuery(d).jqm(c).jqmShow();return false}function hideModal(b){jQuery(b).jqmHide()}function DnRModal(d,c){jQuery(c).css("cursor","move");jQuery(d).jqDrag(c).jqResize(".jqResize");return false}function info_dialog(j,h,g,f){var k="<div id='info_id'>";k+="<div align='center'><br />"+h+"<br /><br />";k+="<input type='button' size='10' id='closedialog' class='jqmClose EditButton' value='"+g+"' />";k+="</div></div>";createModal({themodal:"info_dialog",modalhead:"info_head",modalcontent:"info_content"},k,{width:290,height:120,drag:false,caption:"<b>"+j+"</b>",imgpath:f,closeicon:"ico-close.gif",left:250,top:170,closeOnEscape:true},"","",true);viewModal("#info_dialog",{onShow:function(a){a.w.show()},onHide:function(a){a.w.hide().remove();if(a.o){a.o.remove()}},modal:true})}function findPos(d){var c=curtop=0;if(d.offsetParent){do{c+=d.offsetLeft;curtop+=d.offsetTop}while(d=d.offsetParent)}return[c,curtop]}function isArray(b){if(b.constructor.toString().indexOf("Array")==-1){return false}else{return true}}function createEl(s,o,v){var q="";switch(s){case"textarea":q=document.createElement("textarea");if(!o.cols){jQuery(q).css("width","98%")}jQuery(q).attr(o);if(v=="&nbsp;"||v=="&#160;"||(v.length==1&&v.charCodeAt(0)==160)){v=""}jQuery(q).val(v);break;case"checkbox":q=document.createElement("input");q.type="checkbox";jQuery(q).attr({id:o.id,name:o.name});if(!o.value){v=v.toLowerCase();if(v.search(/(false|0|no|off|undefined)/i)<0&&v!==""){q.checked=true;q.defaultChecked=true;q.value=v}else{q.value="on"}jQuery(q).attr("offval","off")}else{var z=o.value.split(":");if(v==z[0]){q.checked=true;q.defaultChecked=true}q.value=z[0];jQuery(q).attr("offval",z[1])}break;case"select":v=jQuery.htmlDecode(v);q=document.createElement("select");var r=o.multiple==true?true:false;if(o.value){var x=[];if(r){jQuery(q).attr({multiple:"multiple"});x=v.split(",");x=jQuery.map(x,function(a){return jQuery.trim(a)})}if(typeof o.size==="undefined"){o.size=1}if(typeof o.value=="string"){var y=o.value.split(";"),A,C;jQuery(q).attr({id:o.id,name:o.name,size:Math.min(o.size,y.length)});for(var B=0;B<y.length;B++){A=y[B].split(":");C=document.createElement("option");C.value=A[0];C.innerHTML=A[1];if(!r&&A[1]==v){C.selected="selected"}if(r&&jQuery.inArray(jQuery.trim(A[1]),x)>-1){C.selected="selected"}q.appendChild(C)}}else{if(typeof o.value=="object"){var u=o.value;var B=0;for(var w in u){B++;C=document.createElement("option");C.value=w;C.innerHTML=u[w];if(!r&&u[w]==v){C.selected="selected"}if(r&&jQuery.inArray(jQuery.trim(u[w]),x)>-1){C.selected="selected"}q.appendChild(C)}jQuery(q).attr({id:o.id,name:o.name,size:Math.min(o.size,B)})}}}break;case"text":q=document.createElement("input");q.type="text";v=jQuery.htmlDecode(v);q.value=v;if(!o.size){jQuery(q).css({width:"98%"})}jQuery(q).attr(o);break;case"password":q=document.createElement("input");q.type="password";v=jQuery.htmlDecode(v);q.value=v;if(!o.size){jQuery(q).css("width","98%")}jQuery(q).attr(o);break;case"image":q=document.createElement("input");q.type="image";jQuery(q).attr(o);break}return q}function checkValues(g,q,m){if(q>=0){var l=m.p.colModel[q].editrules}if(l){if(l.required===true){if(g.match(/^s+$/)||g==""){return[false,m.p.colNames[q]+": "+jQuery.jgrid.edit.msg.required,""]}}var j=l.required===false?false:true;if(l.number===true){if(!(j===false&&isEmpty(g))){if(isNaN(g)){return[false,m.p.colNames[q]+": "+jQuery.jgrid.edit.msg.number,""]}}}if(l.minValue&&!isNaN(l.minValue)){if(parseFloat(g)<parseFloat(l.minValue)){return[false,m.p.colNames[q]+": "+jQuery.jgrid.edit.msg.minValue+" "+l.minValue,""]}}if(l.maxValue&&!isNaN(l.maxValue)){if(parseFloat(g)>parseFloat(l.maxValue)){return[false,m.p.colNames[q]+": "+jQuery.jgrid.edit.msg.maxValue+" "+l.maxValue,""]}}if(l.email===true){if(!(j===false&&isEmpty(g))){var k=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i;if(!k.test(g)){return[false,m.p.colNames[q]+": "+jQuery.jgrid.edit.msg.email,""]}}}if(l.integer===true){if(!(j===false&&isEmpty(g))){if(isNaN(g)){return[false,m.p.colNames[q]+": "+jQuery.jgrid.edit.msg.integer,""]}if((g%1!=0)||(g.indexOf(".")!=-1)){return[false,m.p.colNames[q]+": "+jQuery.jgrid.edit.msg.integer,""]}}}if(l.date===true){if(!(j===false&&isEmpty(g))){var o=m.p.colModel[q].datefmt||"Y-m-d";if(!checkDate(o,g)){return[false,m.p.colNames[q]+": "+jQuery.jgrid.edit.msg.date+" - "+o,""]}}}}return[true,"",""]}function checkDate(s,r){var v={};var j=false;var C;s=s.toLowerCase();if(s.indexOf("/")!=-1){C="/"}else{if(s.indexOf("-")!=-1){C="-"}else{if(s.indexOf(".")!=-1){C="."}else{C="/"}}}s=s.split(C);r=r.split(C);if(r.length!=3){return false}var x=-1,w,z=-1,u=-1;for(var A=0;A<s.length;A++){var y=isNaN(r[A])?0:parseInt(r[A],10);v[s[A]]=y;w=s[A];if(w.indexOf("y")!=-1){x=A}if(w.indexOf("m")!=-1){u=A}if(w.indexOf("d")!=-1){z=A}}if(s[x]=="y"||s[x]=="yyyy"){w=4}else{if(s[x]=="yy"){w=2}else{w=-1}}var q=DaysArray(12);var B;if(x===-1){return false}else{B=v[s[x]].toString();if(w==2&&B.length==1){w=1}if(B.length!=w||v[s[x]]==0){return false}}if(u===-1){return false}else{B=v[s[u]].toString();if(B.length<1||v[s[u]]<1||v[s[u]]>12){return false}}if(z===-1){return false}else{B=v[s[z]].toString();if(B.length<1||v[s[z]]<1||v[s[z]]>31||(v[s[u]]==2&&v[s[z]]>daysInFebruary(v[s[x]]))||v[s[z]]>q[v[s[u]]]){return false}}return true}function daysInFebruary(b){return(((b%4==0)&&((!(b%100==0))||(b%400==0)))?29:28)}function DaysArray(d){for(var c=1;c<=d;c++){this[c]=31;if(c==4||c==6||c==9||c==11){this[c]=30}if(c==2){this[c]=29}}return this}function isEmpty(b){if(b.match(/^s+$/)||b==""){return true}else{return false}}function htmlEncode(b){return !b?b:String(b).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")}(function(b){b.fn.extend({getColProp:function(j){var g={},k=this[0];if(!k.grid){return}var a=k.p.colModel;for(var h=0;h<a.length;h++){if(a[h].name==j){g=a[h];break}}return g},setColProp:function(a,d){return this.each(function(){if(this.grid){if(d){var c=this.p.colModel;for(var f=0;f<c.length;f++){if(c[f].name==a){b.extend(this.p.colModel[f],d);break}}}}})},sortGrid:function(a,d){return this.each(function(){var c=this,k=-1;if(!c.grid){return}if(!a){a=c.p.sortname}for(var j=0;j<c.p.colModel.length;j++){if(c.p.colModel[j].index==a||c.p.colModel[j].name==a){k=j;break}}if(k!=-1){var h=c.p.colModel[k].sortable;if(typeof h!=="boolean"){h=true}if(typeof d!=="boolean"){d=false}if(h){c.sortData("jqgh_"+a,k,d)}}})},GridDestroy:function(){return this.each(function(){if(this.grid){if(this.p.pager){b(this.p.pager).remove()}var d=this.id;b("#lui_"+d).remove();try{b("#editmod"+d).remove();b("#delmod"+d).remove();b("#srchmod"+d).remove()}catch(a){}b(this.grid.bDiv).remove();b(this.grid.hDiv).remove();b(this.grid.cDiv).remove();if(this.p.toolbar[0]){b(this.grid.uDiv).remove()}this.p=null;this.grid=null}})},GridUnload:function(){return this.each(function(){if(!this.grid){return}var a={id:b(this).attr("id"),cl:b(this).attr("class")};if(this.p.pager){b(this.p.pager).empty()}var g=document.createElement("table");b(g).attr({id:a.id});g.className=a.cl;var f=this.id;b("#lui_"+f).remove();try{b("#editmod"+f).remove();b("#delmod"+f).remove();b("#srchmod"+f).remove()}catch(h){}if(this.p.toolbar[0]){b(this.grid.uDiv).remove()}b(this.grid.cDiv).remove();b(this.grid.bDiv).remove();b(this.grid.hDiv).before(g).remove();this.p=null;this.grid=null})},filterGrid:function(a,d){d=b.extend({gridModel:false,gridNames:false,gridToolbar:false,filterModel:[],formtype:"horizontal",autosearch:true,formclass:"filterform",tableclass:"filtertable",buttonclass:"filterbutton",searchButton:"Search",clearButton:"Clear",enableSearch:false,enableClear:false,beforeSearch:null,afterSearch:null,beforeClear:null,afterClear:null,url:"",marksearched:true},d||{});return this.each(function(){var q=this;this.p=d;if(this.p.filterModel.length==0&&this.p.gridModel===false){alert("No filter is set");return}if(!a){alert("No target grid is set!");return}this.p.gridid=a.indexOf("#")!=-1?a:"#"+a;var o=b(this.p.gridid).getGridParam("colModel");if(o){if(this.p.gridModel===true){var u=b(this.p.gridid)[0];var v;b.each(o,function(e,f){var g=[];this.search=this.search===false?false:true;if(this.editrules&&this.editrules.searchhidden===true){v=true}else{if(this.hidden===true){v=false}else{v=true}}if(this.search===true&&v===true){if(q.p.gridNames===true){g.label=u.p.colNames[e]}else{g.label=""}g.name=this.name;g.index=this.index||this.name;g.stype=this.edittype||"text";if(g.stype!="select"||g.stype!="select"){g.stype="text"}g.defval=this.defval||"";g.surl=this.surl||"";g.sopt=this.editoptions||{};g.width=this.width;q.p.filterModel.push(g)}})}else{b.each(q.p.filterModel,function(e,f){for(var g=0;g<o.length;g++){if(this.name==o[g].name){this.index=o[g].index||this.name;break}}if(!this.index){this.index=this.name}})}}else{alert("Could not get grid colModel");return}var c=function(){var h={},e=0,k;var j=b(q.p.gridid)[0];if(b.isFunction(q.p.beforeSearch)){q.p.beforeSearch()}b.each(q.p.filterModel,function(y,l){switch(this.stype){case"select":k=b("select[name="+this.name+"]",q).val();if(k){h[this.index]=k;if(q.p.marksearched){b("#jqgh_"+this.name,j.grid.hDiv).addClass("dirty-cell")}e++}else{if(q.p.marksearched){b("#jqgh_"+this.name,j.grid.hDiv).removeClass("dirty-cell")}try{delete j.p.postData[this.index]}catch(m){}}break;default:k=b("input[name="+this.name+"]",q).val();if(k){h[this.index]=k;if(q.p.marksearched){b("#jqgh_"+this.name,j.grid.hDiv).addClass("dirty-cell")}e++}else{if(q.p.marksearched){b("#jqgh_"+this.name,j.grid.hDiv).removeClass("dirty-cell")}try{delete j.p.postData[this.index]}catch(m){}}}});var g=e>0?true:false;j.p.postData=b.extend(j.p.postData,h);var f;if(q.p.url){f=b(j).getGridParam("url");b(j).setGridParam({url:q.p.url})}b(j).setGridParam({search:g,page:1}).trigger("reloadGrid");if(f){b(j).setGridParam({url:f})}if(b.isFunction(q.p.afterSearch)){q.p.afterSearch()}};var s=function(){var h={},k,e=0;var j=b(q.p.gridid)[0];if(b.isFunction(q.p.beforeClear)){q.p.beforeClear()}b.each(q.p.filterModel,function(l,m){k=(this.defval)?this.defval:"";if(!this.stype){this.stype=="text"}switch(this.stype){case"select":if(k){var z;b("select[name="+this.name+"] option",q).each(function(){if(b(this).text()==k){this.selected=true;z=b(this).val();return false}});h[this.index]=z||"";if(q.p.marksearched){b("#jqgh_"+this.name,j.grid.hDiv).addClass("dirty-cell")}e++}else{if(q.p.marksearched){b("#jqgh_"+this.name,j.grid.hDiv).removeClass("dirty-cell")}try{delete j.p.postData[this.index]}catch(y){}}break;case"text":b("input[name="+this.name+"]",q).val(k);if(k){h[this.index]=k;if(q.p.marksearched){b("#jqgh_"+this.name,j.grid.hDiv).addClass("dirty-cell")}e++}else{if(q.p.marksearched){b("#jqgh_"+this.name,j.grid.hDiv).removeClass("dirty-cell")}try{delete j.p.postData[this.index]}catch(y){}}}});var g=e>0?true:false;j.p.postData=b.extend(j.p.postData,h);var f;if(q.p.url){f=b(j).getGridParam("url");b(j).setGridParam({url:q.p.url})}b(j).setGridParam({search:g,page:1}).trigger("reloadGrid");if(f){b(j).setGridParam({url:f})}if(b.isFunction(q.p.afterClear)){q.p.afterClear()}};var x=function(){var g=document.createElement("tr");var l,j,f,k,e,h;if(q.p.formtype=="horizontal"){b(w).append(g)}b.each(q.p.filterModel,function(D,m){k=document.createElement("td");b(k).append("<label for='"+this.name+"'>"+this.label+"</label>");e=document.createElement("td");var H=this;if(!this.stype){this.stype="text"}switch(this.stype){case"select":if(this.surl){b(e).load(this.surl,function(){if(H.defval){b("select",this).val(H.defval)}b("select",this).attr({name:H.name,id:"sg_"+H.name});if(H.sopt){b("select",this).attr(H.sopt)}if(q.p.gridToolbar===true&&H.width){b("select",this).width(H.width)}if(q.p.autosearch===true){b("select",this).change(function(y){c();return false})}})}else{if(H.sopt.value){var E=H.sopt.value.split(";"),J,F;var G=document.createElement("select");b(G).attr({name:H.name,id:"sg_"+H.name}).attr(H.sopt);for(var K=0;K<E.length;K++){J=E[K].split(":");F=document.createElement("option");F.value=J[0];F.innerHTML=J[1];if(J[1]==H.defval){F.selected="selected"}G.appendChild(F)}if(q.p.gridToolbar===true&&H.width){b(G).width(H.width)}b(e).append(G);if(q.p.autosearch===true){b(G).change(function(y){c();return false})}}}break;case"text":var I=this.defval?this.defval:"";b(e).append("<input type='text' name='"+this.name+"' id='sg_"+this.name+"' value='"+I+"'/>");if(H.sopt){b("input",e).attr(H.sopt)}if(q.p.gridToolbar===true&&H.width){if(b.browser.msie){b("input",e).width(H.width-4)}else{b("input",e).width(H.width-2)}}if(q.p.autosearch===true){b("input",e).keypress(function(y){var z=y.charCode?y.charCode:y.keyCode?y.keyCode:0;if(z==13){c();return false}return this})}break}if(q.p.formtype=="horizontal"){if(q.p.gridToolbar===true&&q.p.gridNames===false){b(g).append(e)}else{b(g).append(k).append(e)}b(g).append(e)}else{l=document.createElement("tr");b(l).append(k).append(e);b(w).append(l)}});e=document.createElement("td");if(q.p.enableSearch===true){j="<input type='button' id='sButton' class='"+q.p.buttonclass+"' value='"+q.p.searchButton+"'/>";b(e).append(j);b("input#sButton",e).click(function(){c();return false})}if(q.p.enableClear===true){f="<input type='button' id='cButton' class='"+q.p.buttonclass+"' value='"+q.p.clearButton+"'/>";b(e).append(f);b("input#cButton",e).click(function(){s();return false})}if(q.p.enableClear===true||q.p.enableSearch===true){if(q.p.formtype=="horizontal"){b(g).append(e)}else{l=document.createElement("tr");b(l).append("<td>&nbsp;</td>").append(e);b(w).append(l)}}};var r=b("<form name='SearchForm' style=display:inline;' class='"+this.p.formclass+"'></form>");var w=b("<table class='"+this.p.tableclass+"' cellspacing='0' cellpading='0' border='0'><tbody></tbody></table>");b(r).append(w);x();b(this).append(r);this.triggerSearch=function(){c()};this.clearSearch=function(){s()}})}})})(jQuery);(function(d){var c=null;d.fn.extend({searchGrid:function(a){a=d.extend({top:0,left:0,width:360,height:80,modal:false,drag:true,closeicon:"ico-close.gif",dirty:false,sField:"searchField",sValue:"searchString",sOper:"searchOper",processData:"",checkInput:false,beforeShowSearch:null,afterShowSearch:null,onInitializeSearch:null,closeAfterSearch:false,closeOnEscape:false,sopt:null},d.jgrid.search,a||{});return this.each(function(){var B=this;if(!B.grid){return}if(!a.imgpath){a.imgpath=B.p.imgpath}var F=d("table:first",B.grid.bDiv).attr("id");var b={themodal:"srchmod"+F,modalhead:"srchhead"+F,modalcontent:"srchcnt"+F};if(d("#"+b.themodal).html()!=null){if(d.isFunction(a.beforeShowSearch)){a.beforeShowSearch(d("#srchcnt"+F))}viewModal("#"+b.themodal,{modal:a.modal});if(d.isFunction(a.afterShowSearch)){a.afterShowSearch(d("#srchcnt"+F))}}else{var w=B.p.colModel;var x="<select id='snames' class='search'>";var D,I,A;for(var y=0;y<w.length;y++){D=w[y].name;A=(w[y].search===false)?false:true;if(w[y].editrules&&w[y].editrules.searchhidden===true){I=true}else{if(w[y].hidden===true){I=false}else{I=true}}if(D!=="cb"&&D!=="subgrid"&&A&&I===true){var v=(w[y].index)?w[y].index:D;x+="<option value='"+v+"'>"+B.p.colNames[y]+"</option>"}}x+="</select>";var H=a.sopt||["bw","eq","ne","lt","le","gt","ge","ew","cn"];var u="<select id='sopt' class='search'>";for(var y=0;y<H.length;y++){u+=H[y]=="eq"?"<option value='eq'>"+a.odata[0]+"</option>":"";u+=H[y]=="ne"?"<option value='ne'>"+a.odata[1]+"</option>":"";u+=H[y]=="lt"?"<option value='lt'>"+a.odata[2]+"</option>":"";u+=H[y]=="le"?"<option value='le'>"+a.odata[3]+"</option>":"";u+=H[y]=="gt"?"<option value='gt'>"+a.odata[4]+"</option>":"";u+=H[y]=="ge"?"<option value='ge'>"+a.odata[5]+"</option>":"";u+=H[y]=="bw"?"<option value='bw'>"+a.odata[6]+"</option>":"";u+=H[y]=="ew"?"<option value='ew'>"+a.odata[7]+"</option>":"";u+=H[y]=="cn"?"<option value='cn'>"+a.odata[8]+"</option>":""}u+="</select>";var C="<input id='sval' class='search' type='text' size='20' maxlength='100'/>";var z="<input id='sbut' class='buttonsearch' type='button' value='"+a.Find+"'/>";var E="<input id='sreset' class='buttonsearch' type='button' value='"+a.Reset+"'/>";var G=d("<table width='100%'><tbody><tr style='display:none' id='srcherr'><td colspan='5'></td></tr><tr><td>"+x+"</td><td>"+u+"</td><td>"+C+"</td><td>"+z+"</td><td>"+E+"</td></tr></tbody></table>");createModal(b,G,a,B.grid.hDiv,B.grid.hDiv);if(d.isFunction(a.onInitializeSearch)){a.onInitializeSearch(d("#srchcnt"+F))}if(d.isFunction(a.beforeShowSearch)){a.beforeShowSearch(d("#srchcnt"+F))}viewModal("#"+b.themodal,{modal:a.modal});if(d.isFunction(a.afterShowSearch)){a.afterShowSearch(d("#srchcnt"+F))}if(a.drag){DnRModal("#"+b.themodal,"#"+b.modalhead+" td.modaltext")}d("#sbut","#"+b.themodal).click(function(){if(d("#sval","#"+b.themodal).val()!=""){var f=[true,"",""];d("#srcherr >td","#srchcnt"+F).html("").hide();B.p.searchdata[a.sField]=d("option[selected]","#snames").val();B.p.searchdata[a.sOper]=d("option[selected]","#sopt").val();B.p.searchdata[a.sValue]=d("#sval","#"+b.modalcontent).val();if(a.checkInput){for(var e=0;e<w.length;e++){var g=(w[e].index)?w[e].index:D;if(g==B.p.searchdata[a.sField]){break}}f=checkValues(B.p.searchdata[a.sValue],e,B)}if(f[0]===true){B.p.search=true;if(a.dirty){d(".no-dirty-cell",B.p.pager).addClass("dirty-cell")}B.p.page=1;d(B).trigger("reloadGrid");if(a.closeAfterSearch===true){hideModal("#"+b.themodal)}}else{d("#srcherr >td","#srchcnt"+F).html(f[1]).show()}}});d("#sreset","#"+b.themodal).click(function(){if(B.p.search){d("#srcherr >td","#srchcnt"+F).html("").hide();B.p.search=false;B.p.searchdata={};B.p.page=1;d("#sval","#"+b.themodal).val("");if(a.dirty){d(".no-dirty-cell",B.p.pager).removeClass("dirty-cell")}d(B).trigger("reloadGrid")}})}})},editGridRow:function(b,a){a=d.extend({top:0,left:0,width:0,height:0,modal:false,drag:true,closeicon:"ico-close.gif",imgpath:"",url:null,mtype:"POST",closeAfterAdd:false,clearAfterAdd:true,closeAfterEdit:false,reloadAfterSubmit:true,onInitializeForm:null,beforeInitData:null,beforeShowForm:null,afterShowForm:null,beforeSubmit:null,afterSubmit:null,onclickSubmit:null,afterComplete:null,onclickPgButtons:null,afterclickPgButtons:null,editData:{},recreateForm:false,closeOnEscape:false,addedrow:"first"},d.jgrid.edit,a||{});c=a;return this.each(function(){var H=this;if(!H.grid||!b){return}if(!a.imgpath){a.imgpath=H.p.imgpath}var Q=d("table:first",H.grid.bDiv).attr("id"),Y={themodal:"editmod"+Q,modalhead:"edithd"+Q,modalcontent:"editcnt"+Q},ad=d.isFunction(c.beforeShowForm)?c.beforeShowForm:false,K=d.isFunction(c.afterShowForm)?c.afterShowForm:false,aa=d.isFunction(c.beforeInitData)?c.beforeInitData:false,X=d.isFunction(c.onInitializeForm)?c.onInitializeForm:false,M=1,S,O="FrmGrid_"+Q,Z="TblGrid_"+Q;if(b=="new"){b="_empty";a.caption=a.addCaption}else{a.caption=a.editCaption}if(a.recreateForm===true&&d("#"+Y.themodal).html()!=null){d("#"+Y.themodal).remove()}if(d("#"+Y.themodal).html()!=null){d(".modaltext","#"+Y.modalhead).html(a.caption);d("#FormError","#"+Z).hide();if(aa){aa(d("#"+O))}V(b,H);if(b=="_empty"){d("#pData, #nData","#"+Z).hide()}else{d("#pData, #nData","#"+Z).show()}if(ad){ad(d("#"+O))}if(a.processing===true){a.processing=false;d("#sData","#"+Z).attr("disabled",false);d("div.loading","#"+Y.themodal).hide()}viewModal("#"+Y.themodal,{modal:a.modal});if(K){K(d("#"+O))}}else{d(H.p.colModel).each(function(e){M=Math.max(M,this.formoptions?this.formoptions.colpos||0:0)});var N,ab=d("<form name='FormPost' id='"+O+"' class='FormGrid'></form>"),ae=d("<table id='"+Z+"' class='EditTable' cellspacing='0' cellpading='0' border='0'><tbody></tbody></table>");d(ab).append(ae);N=d("<tr id='FormError' style='display:none'><td colspan='"+(M*2)+"'></td></tr>");N[0].rp=0;d(ae).append(N);if(aa){aa(d("#"+O))}var T=W(b,H,ae,M),ac=H.p.imgpath,F="<img id='pData' src='"+ac+H.p.previmg+"'/>",L="<img id='nData' src='"+ac+H.p.nextimg+"'/>",G="<input id='sData' type='button' class='EditButton' value='"+a.bSubmit+"'/>",R="<input id='cData' type='button'  class='EditButton' value='"+a.bCancel+"'/>";N=d("<tr id='Act_Buttons'><td class='navButton'>"+F+"&nbsp;"+L+"</td><td colspan='"+(M*2-1)+"'class='EditButton'>"+G+"&nbsp;"+R+"</td></tr>");N[0].rp=T.length+100;d(ae).append(N);if(M>1){var I=[];d.each(d(ae)[0].rows,function(e,f){I[e]=f});I.sort(function(f,e){if(f.rp>e.rp){return 1}if(f.rp<e.rp){return -1}return 0});d.each(I,function(f,e){d("tbody",ae).append(e)})}createModal(Y,ab,a,H.grid.hDiv,H.grid.hDiv);if(X){X(d("#"+O))}if(a.drag){DnRModal("#"+Y.themodal,"#"+Y.modalhead+" td.modaltext")}if(b=="_empty"){d("#pData,#nData","#"+Z).hide()}else{d("#pData,#nData","#"+Z).show()}if(ad){ad(d("#"+O))}viewModal("#"+Y.themodal,{modal:a.modal});if(K){K(d("#"+O))}d("#sData","#"+Z).click(function(f){var e={},k=[true,"",""],g={};d("#FormError","#"+Z).hide();var j=0;d(".FormElement","#"+Z).each(function(l){var q=true;switch(d(this).get(0).type){case"checkbox":if(d(this).attr("checked")){e[this.name]=d(this).val()}else{var o=d(this).attr("offval");e[this.name]=o;g[this.name]=o}break;case"select-one":e[this.name]=d("option:selected",this).val();g[this.name]=d("option:selected",this).text();break;case"select-multiple":e[this.name]=d(this).val();var m=[];d("option:selected",this).each(function(r,s){m[r]=d(s).text()});g[this.name]=m.join(",");break;case"password":case"text":case"textarea":e[this.name]=d(this).val();k=checkValues(e[this.name],T[l],H);if(k[0]===false){q=false}else{e[this.name]=!H.p.autoencode?e[this.name]:htmlEncode(e[this.name])}break}j++;if(!q){return false}});if(j==0){k[0]=false;k[1]=d.jgrid.errors.norecords}if(d.isFunction(c.onclickSubmit)){c.editData=c.onclickSubmit(a)||{}}if(k[0]){if(d.isFunction(c.beforeSubmit)){k=c.beforeSubmit(e,d("#"+O))}}var h=c.url?c.url:H.p.editurl;if(k[0]){if(!h){k[0]=false;k[1]+=" "+d.jgrid.errors.nourl}}if(k[0]===false){d("#FormError>td","#"+Z).html(k[1]);d("#FormError","#"+Z).show()}else{if(!a.processing){a.processing=true;d("div.loading","#"+Y.themodal).show();d(this).attr("disabled",true);e.oper=e.id=="_empty"?"add":"edit";e=d.extend(e,c.editData);d.ajax({url:h,type:c.mtype,data:e,complete:function(m,l){if(l!="success"){k[0]=false;k[1]=l+" Status: "+m.statusText+" Error code: "+m.status}else{if(d.isFunction(c.afterSubmit)){k=c.afterSubmit(m,e)}}if(k[0]===false){d("#FormError>td","#"+Z).html(k[1]);d("#FormError","#"+Z).show()}else{e=d.extend(e,g);if(e.id=="_empty"){if(!k[2]){k[2]=parseInt(d(H).getGridParam("records"))+1}e.id=k[2];if(c.closeAfterAdd){if(c.reloadAfterSubmit){d(H).trigger("reloadGrid")}else{d(H).addRowData(k[2],e,a.addedrow);d(H).setSelection(k[2])}hideModal("#"+Y.themodal)}else{if(c.clearAfterAdd){if(c.reloadAfterSubmit){d(H).trigger("reloadGrid")}else{d(H).addRowData(k[2],e,a.addedrow)}d(".FormElement","#"+Z).each(function(o){switch(d(this).get(0).type){case"checkbox":d(this).attr("checked",0);break;case"select-one":case"select-multiple":d("option",this).attr("selected","");break;case"password":case"text":case"textarea":if(this.name=="id"){d(this).val("_empty")}else{d(this).val("")}break}});V("_empty",H)}else{if(c.reloadAfterSubmit){d(H).trigger("reloadGrid")}else{d(H).addRowData(k[2],e,a.addedrow)}}}}else{if(c.reloadAfterSubmit){d(H).trigger("reloadGrid");if(!c.closeAfterEdit){d(H).setSelection(e.id)}}else{if(H.p.treeGrid===true){d(H).setTreeRow(e.id,e)}else{d(H).setRowData(e.id,e)}}if(c.closeAfterEdit){hideModal("#"+Y.themodal)}}if(d.isFunction(c.afterComplete)){S=m;setTimeout(function(){c.afterComplete(S,e,d("#"+O));S=null},500)}}a.processing=false;d("#sData","#"+Z).attr("disabled",false);d("div.loading","#"+Y.themodal).hide()},error:function(o,l,m){d("#FormError>td","#"+Z).html(l+" : "+m);d("#FormError","#"+Z).show();a.processing=false;d("#sData","#"+Z).attr("disabled",false);d("div.loading","#"+Y.themodal).hide()}})}}f.stopPropagation();return false});d("#cData","#"+Z).click(function(e){hideModal("#"+Y.themodal);e.stopPropagation();return false});d("#nData","#"+Z).click(function(e){d("#FormError","#"+Z).hide();var f=P();f[0]=parseInt(f[0]);if(f[0]!=-1&&f[1][f[0]+1]){if(d.isFunction(a.onclickPgButtons)){a.onclickPgButtons("next",d("#"+O),f[1][f[0]])}V(f[1][f[0]+1],H);d(H).setSelection(f[1][f[0]+1]);if(d.isFunction(a.afterclickPgButtons)){a.afterclickPgButtons("next",d("#"+O),f[1][f[0]+1])}J(f[0]+1,f[1].length-1)}return false});d("#pData","#"+Z).click(function(e){d("#FormError","#"+Z).hide();var f=P();if(f[0]!=-1&&f[1][f[0]-1]){if(d.isFunction(a.onclickPgButtons)){a.onclickPgButtons("prev",d("#"+O),f[1][f[0]])}V(f[1][f[0]-1],H);d(H).setSelection(f[1][f[0]-1]);if(d.isFunction(a.afterclickPgButtons)){a.afterclickPgButtons("prev",d("#"+O),f[1][f[0]-1])}J(f[0]-1,f[1].length-1)}return false})}var U=P();J(U[0],U[1].length-1);function J(h,g,e){var f=H.p.imgpath;if(h==0){d("#pData","#"+Z).attr("src",f+"off-"+H.p.previmg)}else{d("#pData","#"+Z).attr("src",f+H.p.previmg)}if(h==g){d("#nData","#"+Z).attr("src",f+"off-"+H.p.nextimg)}else{d("#nData","#"+Z).attr("src",f+H.p.nextimg)}}function P(){var f=d(H).getDataIDs();var e=d("#id_g","#"+Z).val();var g=d.inArray(e,f);return[g,f]}function W(y,w,q,u){var m,k,A,v,j,f=0,e,g,x,l=[],z=false,h="<td class='CaptionTD'>&nbsp;</td><td class='DataTD'>&nbsp;</td>",s="";for(var r=1;r<=u;r++){s+=h}z=d(w).getInd(w.rows,y);d(w.p.colModel).each(function(D){m=this.name;if(this.editrules&&this.editrules.edithidden==true){k=false}else{k=this.hidden===true?true:false}g=k?"style='display:none'":"";if(m!=="cb"&&m!=="subgrid"&&this.editable===true){if(z===false){e=""}else{if(m==w.p.ExpandColumn&&w.p.treeGrid===true){e=d("td:eq("+D+")",w.rows[z]).text()}else{try{e=d.unformat(d("td:eq("+D+")",w.rows[z]),{colModel:this},D)}catch(ag){e=d("td:eq("+D+")",w.rows[z]).html()}}}var E=d.extend({},this.editoptions||{},{id:m,name:m}),B=d.extend({},{elmprefix:"",elmsuffix:""},this.formoptions||{}),af=parseInt(B.rowpos)||f+1,C=parseInt((parseInt(B.colpos)||1)*2);if(y=="_empty"&&E.defaultValue){e=d.isFunction(E.defaultValue)?E.defaultValue():E.defaultValue}if(!this.edittype){this.edittype="text"}x=createEl(this.edittype,E,e);d(x).addClass("FormElement");A=d(ae).find("tr[rowpos="+af+"]");if(A.length==0){A=d("<tr "+g+" rowpos='"+af+"'></tr>").addClass("FormData").attr("id","tr_"+m);d(A).append(s);d(q).append(A);A[0].rp=af}d("td:eq("+(C-2)+")",A[0]).html(typeof B.label==="undefined"?w.p.colNames[D]:B.label);d("td:eq("+(C-1)+")",A[0]).append(B.elmprefix).append(x).append(B.elmsuffix);l[f]=D;f++}});if(f>0){var o=d("<tr class='FormData' style='display:none'><td class='CaptionTD'></td><td colspan='"+(u*2-1)+"' class='DataTD'><input class='FormElement' id='id_g' type='text' name='id' value='"+y+"'/></td></tr>");o[0].rp=f+99;d(q).append(o)}return l}function V(l,j){var k,h,g=0,e,f;d("#"+l+" td",j.grid.bDiv).each(function(o){k=j.p.colModel[o].name;if(j.p.colModel[o].editrules&&j.p.colModel[o].editrules.edithidden===true){h=false}else{h=j.p.colModel[o].hidden===true?true:false}if(k!=="cb"&&k!=="subgrid"&&j.p.colModel[o].editable===true){if(k==j.p.ExpandColumn&&j.p.treeGrid===true){e=d(this).text()}else{try{e=d.unformat(this,{colModel:j.p.colModel[o]},o)}catch(m){e=d(this).html()}}k=k.replace(".","\\.");f=d.extend({},j.p.colModel[o].editoptions||{});if(l=="_empty"&&f.defaultValue){e=d.isFunction(f.defaultValue)?f.defaultValue():f.defaultValue}switch(j.p.colModel[o].edittype){case"password":case"text":d("#"+k,"#"+Z).val(e);break;case"textarea":if(e=="&nbsp;"||e=="&#160;"||(e.length==1&&e.charCodeAt(0)==160)){e=""}d("#"+k,"#"+Z).val(e);break;case"select":d("#"+k+" option","#"+Z).each(function(q){if(!f.multiple&&e==d(this).text()){this.selected=true}else{if(f.multiple){if(d.inArray(d(this).text(),e.split(","))>-1){this.selected=true}else{this.selected=false}}else{this.selected=false}}});break;case"checkbox":if(e==d("#"+k,"#"+Z).val()){d("#"+k,"#"+Z).attr("checked",true);d("#"+k,"#"+Z).attr("defaultChecked",true)}else{d("#"+k,"#"+Z).attr("checked",false);d("#"+k,"#"+Z).attr("defaultChecked","")}break}if(h){d("#"+k,"#"+Z).parents("tr:first").hide()}g++}});if(g>0){d("#id_g","#"+Z).val(l)}else{d("#id_g","#"+Z).val("")}return g}})},viewGridRow:function(b,a){a=d.extend({top:0,left:0,width:0,height:0,modal:false,drag:true,closeicon:"ico-close.gif",imgpath:"",closeOnEscape:false,labelswidth:"30%"},d.jgrid.view,a||{});return this.each(function(){var D=this;if(!D.grid||!b){return}if(!a.imgpath){a.imgpath=D.p.imgpath}var G=d("table:first",D.grid.bDiv).attr("id"),O={themodal:"viewmod"+G,modalhead:"viewhd"+G,modalcontent:"viewcnt"+G},L=1,K="ViewGrid_"+G,P="ViewTbl_"+G;if(d("#"+O.themodal).html()!=null){d(".modaltext","#"+O.modalhead).html(a.caption);d("#FormError","#"+P).hide();M(b,D);viewModal("#"+O.themodal,{modal:a.modal});C()}else{d(D.p.colModel).each(function(e){L=Math.max(L,this.formoptions?this.formoptions.colpos||0:0)});var N,R=d("<form name='FormPost' id='"+K+"' class='FormGrid'></form>"),Q=d("<table id='"+P+"' class='EditTable' cellspacing='0' cellpading='2' border='0' style='table-layout:fixed'><tbody></tbody></table>");d(R).append(Q);var T=J(b,D,Q,L),S=D.p.imgpath,B="<img id='pData' src='"+S+D.p.previmg+"'/>",U="<img id='nData' src='"+S+D.p.nextimg+"'/>",H="<input id='cData' type='button'  class='EditButton' value='"+a.bClose+"'/>";N=d("<tr id='Act_Buttons'><td class='navButton'>"+B+"&nbsp;"+U+"</td><td colspan='"+(L*2-1)+"'class='EditButton'>"+H+"</td></tr>");N[0].rp=T.length+100;d(Q).append(N);if(L>1){var A=[];d.each(d(Q)[0].rows,function(e,f){A[e]=f});A.sort(function(e,f){if(e.rp>f.rp){return 1}if(e.rp<f.rp){return -1}return 0});d.each(A,function(e,f){d("tbody",Q).append(f)})}createModal(O,R,a,D.grid.hDiv,D.grid.hDiv);if(a.drag){DnRModal("#"+O.themodal,"#"+O.modalhead+" td.modaltext")}viewModal("#"+O.themodal,{modal:a.modal});C();d("#cData","#"+P).click(function(e){hideModal("#"+O.themodal);e.stopPropagation();return false});d("#nData","#"+P).click(function(e){d("#FormError","#"+P).hide();var f=I();f[0]=parseInt(f[0]);if(f[0]!=-1&&f[1][f[0]+1]){if(d.isFunction(a.onclickPgButtons)){a.onclickPgButtons("next",d("#"+K),f[1][f[0]])}M(f[1][f[0]+1],D);d(D).setSelection(f[1][f[0]+1]);if(d.isFunction(a.afterclickPgButtons)){a.afterclickPgButtons("next",d("#"+K),f[1][f[0]+1])}E(f[0]+1,f[1].length-1)}C();return false});d("#pData","#"+P).click(function(e){d("#FormError","#"+P).hide();var f=I();if(f[0]!=-1&&f[1][f[0]-1]){if(d.isFunction(a.onclickPgButtons)){a.onclickPgButtons("prev",d("#"+K),f[1][f[0]])}M(f[1][f[0]-1],D);d(D).setSelection(f[1][f[0]-1]);if(d.isFunction(a.afterclickPgButtons)){a.afterclickPgButtons("prev",d("#"+K),f[1][f[0]-1])}E(f[0]-1,f[1].length-1)}C();return false})}function C(){if(a.closeOnEscape===true){setTimeout(function(){d(".jqmClose","#"+O.modalhead).focus()},0)}}var F=I();E(F[0],F[1].length-1);function E(f,h,e){var g=D.p.imgpath;if(f==0){d("#pData","#"+P).attr("src",g+"off-"+D.p.previmg)}else{d("#pData","#"+P).attr("src",g+D.p.previmg)}if(f==h){d("#nData","#"+P).attr("src",g+"off-"+D.p.nextimg)}else{d("#nData","#"+P).attr("src",g+D.p.nextimg)}}function I(){var f=d(D).getDataIDs();var e=d("#id_g","#"+P).val();var g=d.inArray(e,f);return[g,f]}function J(ad,z,x,s){var w,q,af,ab,j,f=0,e,g,ac,u=[],ae=false,h="<td class='CaptionTD' width='"+a.labelswidth+"'>&nbsp;</td><td class='DataTD'>&nbsp;</td>",Z="",k="<td class='CaptionTD'>&nbsp;</td><td class='DataTD'>&nbsp;</td>",o=["integer","number","currency"],m=0,l=0,aa,v;for(var y=1;y<=s;y++){Z+=y==1?h:k}d(z.p.colModel).each(function(V){if(this.editrules&&this.editrules.edithidden===true){q=false}else{q=this.hidden===true?true:false}if(!q&&this.align==="right"){if(this.formatter&&d.inArray(this.formatter,o)!==-1){m=Math.max(m,parseInt(this.width,10))}else{l=Math.max(l,parseInt(this.width,10))}}});aa=m!==0?m:l!==0?l:0;ae=d(z).getInd(z.rows,ad);d(z.p.colModel).each(function(X){w=this.name;v=false;if(this.editrules&&this.editrules.edithidden===true){q=false}else{q=this.hidden===true?true:false}g=q?"style='display:none'":"";if(w!=="cb"&&w!=="subgrid"&&this.editable===true){if(ae===false){e=""}else{if(w==z.p.ExpandColumn&&z.p.treeGrid===true){e=d("td:eq("+X+")",z.rows[ae]).text()}else{e=d("td:eq("+X+")",z.rows[ae]).html()}}v=this.align==="right"&&aa!==0?true:false;var Y=d.extend({},this.editoptions||{},{id:w,name:w}),W=d.extend({},{elmprefix:"",elmsuffix:""},this.formoptions||{}),V=parseInt(W.rowpos)||f+1,ag=parseInt((parseInt(W.colpos)||1)*2);if(!this.edittype){this.edittype="text"}af=d(Q).find("tr[rowpos="+V+"]");if(af.length==0){af=d("<tr "+g+" rowpos='"+V+"'></tr>").addClass("FormData").attr("id","tr_"+w);d(af).append(Z);d(x).append(af);af[0].rp=V}d("td:eq("+(ag-2)+")",af[0]).html("<b>"+(typeof W.label==="undefined"?z.p.colNames[X]:W.label)+"</b>");d("td:eq("+(ag-1)+")",af[0]).append("<span style='position:absolute;float:left;'>"+e+"</span>").attr("id",w);if(v){d("td:eq("+(ag-1)+") span",af[0]).css({"text-align":"right",width:aa+"px"})}u[f]=X;f++}});if(f>0){var r=d("<tr class='FormData' style='display:none'><td class='CaptionTD'></td><td colspan='"+(s*2-1)+"' class='DataTD'><input class='FormElement' id='id_g' type='text' name='id' value='"+ad+"'/></td></tr>");r[0].rp=f+99;d(x).append(r)}return u}function M(k,h){var f,l,e=0,j,g;d("#"+k+" td",h.grid.bDiv).each(function(m){f=h.p.colModel[m].name;if(h.p.colModel[m].editrules&&h.p.colModel[m].editrules.edithidden===true){l=false}else{l=h.p.colModel[m].hidden===true?true:false}if(f!=="cb"&&f!=="subgrid"&&h.p.colModel[m].editable===true){if(f==h.p.ExpandColumn&&h.p.treeGrid===true){j=d(this).text()}else{j=d(this).html()}f=f.replace(".","\\.");g=d.extend({},h.p.colModel[m].editoptions||{});d("#"+f+" span","#"+P).html(j);if(l){d("#"+f,"#"+P).parents("tr:first").hide()}e++}});if(e>0){d("#id_g","#"+P).val(k)}else{d("#id_g","#"+P).val("")}return e}})},delGridRow:function(a,b){b=d.extend({top:0,left:0,width:240,height:90,modal:false,drag:true,closeicon:"ico-close.gif",imgpath:"",url:"",mtype:"POST",reloadAfterSubmit:true,beforeShowForm:null,afterShowForm:null,beforeSubmit:null,onclickSubmit:null,afterSubmit:null,onclickSubmit:null,closeOnEscape:false,delData:{}},d.jgrid.del,b||{});return this.each(function(){var s=this;if(!s.grid){return}if(!a){return}if(!b.imgpath){b.imgpath=s.p.imgpath}var y=typeof b.beforeShowForm==="function"?true:false,w=typeof b.afterShowForm==="function"?true:false,v=d("table:first",s.grid.bDiv).attr("id"),z={themodal:"delmod"+v,modalhead:"delhd"+v,modalcontent:"delcnt"+v},x="DelTbl_"+v,u;if(isArray(a)){a=a.join()}if(d("#"+z.themodal).html()!=null){d("#DelData>td","#"+x).text(a);d("#DelError","#"+x).hide();if(b.processing===true){b.processing=false;d("#dData","#"+x).attr("disabled",false);d("div.loading","#"+z.themodal).hide()}if(y){b.beforeShowForm(d("#"+x))}viewModal("#"+z.themodal,{modal:b.modal});if(w){b.afterShowForm(d("#"+x))}}else{var r=d("<table id='"+x+"' class='DelTable'><tbody></tbody></table>");d(r).append("<tr id='DelError' style='display:none'><td >&nbsp;</td></tr>");d(r).append("<tr id='DelData' style='display:none'><td >"+a+"</td></tr>");d(r).append("<tr><td >"+b.msg+"</td></tr>");var q="<input id='dData' type='button' value='"+b.bSubmit+"'/>";var A="<input id='eData' type='button' value='"+b.bCancel+"'/>";d(r).append("<tr><td class='DelButton'>"+q+"&nbsp;"+A+"</td></tr>");createModal(z,r,b,s.grid.hDiv,s.grid.hDiv);if(b.drag){DnRModal("#"+z.themodal,"#"+z.modalhead+" td.modaltext")}d("#dData","#"+x).click(function(g){var j=[true,""];var f=d("#DelData>td","#"+x).text();if(typeof b.onclickSubmit==="function"){b.delData=b.onclickSubmit(b)||{}}if(typeof b.beforeSubmit==="function"){j=b.beforeSubmit(f)}var h=b.url?b.url:s.p.editurl;if(!h){j[0]=false;j[1]+=" "+d.jgrid.errors.nourl}if(j[0]===false){d("#DelError>td","#"+x).html(j[1]);d("#DelError","#"+x).show()}else{if(!b.processing){b.processing=true;d("div.loading","#"+z.themodal).show();d(this).attr("disabled",true);var e=d.extend({oper:"del",id:f},b.delData);d.ajax({url:h,type:b.mtype,data:e,complete:function(l,o){if(o!="success"){j[0]=false;j[1]=o+" Status: "+l.statusText+" Error code: "+l.status}else{if(typeof b.afterSubmit==="function"){j=b.afterSubmit(l,f)}}if(j[0]===false){d("#DelError>td","#"+x).html(j[1]);d("#DelError","#"+x).show()}else{if(b.reloadAfterSubmit){if(s.p.treeGrid){d(s).setGridParam({treeANode:0,datatype:s.p.treedatatype})}d(s).trigger("reloadGrid")}else{var k=[];k=f.split(",");if(s.p.treeGrid===true){try{d(s).delTreeNode(k[0])}catch(B){}}else{for(var m=0;m<k.length;m++){d(s).delRowData(k[m])}}s.p.selrow=null;s.p.selarrrow=[]}if(d.isFunction(b.afterComplete)){u=l;setTimeout(function(){b.afterComplete(u,f);u=null},500)}}b.processing=false;d("#dData","#"+x).attr("disabled",false);d("div.loading","#"+z.themodal).hide();if(j[0]){hideModal("#"+z.themodal)}},error:function(k,l,m){d("#DelError>td","#"+x).html(l+" : "+m);d("#DelError","#"+x).show();b.processing=false;d("#dData","#"+x).attr("disabled",false);d("div.loading","#"+z.themodal).hide()}})}}return false});d("#eData","#"+x).click(function(e){hideModal("#"+z.themodal);return false});if(y){b.beforeShowForm(d("#"+x))}viewModal("#"+z.themodal,{modal:b.modal});if(w){b.afterShowForm(d("#"+x))}}})},navGrid:function(a,q,b,k,m,l,o){q=d.extend({edit:true,editicon:"row_edit.gif",add:true,addicon:"row_add.gif",del:true,delicon:"row_delete.gif",search:true,searchicon:"find.gif",refresh:true,refreshicon:"refresh.gif",refreshstate:"firstpage",position:"left",closeicon:"ico-close.gif",closeOnEscape:true,view:true,viewicon:"row_view.gif"},d.jgrid.nav,q||{});return this.each(function(){var e={themodal:"alertmod",modalhead:"alerthd",modalcontent:"alertcnt"};var j=this;if(!j.grid){return}if(d("#"+e.themodal).html()==null){var h;var x;if(typeof window.innerWidth!="undefined"){h=window.innerWidth,x=window.innerHeight}else{if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){h=document.documentElement.clientWidth,x=document.documentElement.clientHeight}else{h=1024;x=768}}createModal(e,"<div>"+q.alerttext+"</div><span tabindex='0'><span tabindex='-1' id='jqg_alrt'><span></span>",{imgpath:j.p.imgpath,closeicon:q.closeicon,caption:q.alertcap,top:x/2-25,left:h/2-100,width:200,height:50,closeOnEscape:q.closeOnEscape},j.grid.hDiv,j.grid.hDiv,true);DnRModal("#"+e.themodal,"#"+e.modalhead)}var w=d("<table cellspacing='0' cellpadding='0' border='0' class='navtable'><tbody></tbody></table>").height(20);var u=document.createElement("tr");d(u).addClass("nav-row");var g=j.p.imgpath;var v;if(q.add){v=document.createElement("td");d(v).append("&nbsp;").css({border:"none",padding:"0px"});u.appendChild(v);v=document.createElement("td");v.title=q.addtitle||"";d(v).append("<table cellspacing='0' cellpadding='0' border='0' class='tbutton'><tr><td><img src='"+g+q.addicon+"'/></td><td>"+q.addtext+"&nbsp;</td></tr></table>").css("cursor","pointer").addClass("nav-button").click(function(){if(typeof q.addfunc=="function"){q.addfunc()}else{d(j).editGridRow("new",k||{})}return false}).hover(function(){d(this).addClass("nav-hover")},function(){d(this).removeClass("nav-hover")});u.appendChild(v);v=null}if(q.edit){v=document.createElement("td");d(v).append("&nbsp;").css({border:"none",padding:"0px"});u.appendChild(v);v=document.createElement("td");v.title=q.edittitle||"";d(v).append("<table cellspacing='0' cellpadding='0' border='0' class='tbutton'><tr><td><img src='"+g+q.editicon+"'/></td><td valign='center'>"+q.edittext+"&nbsp;</td></tr></table>").css("cursor","pointer").addClass("nav-button").click(function(){var r=d(j).getGridParam("selrow");if(r){if(typeof q.editfunc=="function"){q.editfunc(r)}else{d(j).editGridRow(r,b||{})}}else{viewModal("#"+e.themodal,{toTop:false});d("#jqg_alrt").focus()}return false}).hover(function(){d(this).addClass("nav-hover")},function(){d(this).removeClass("nav-hover")});u.appendChild(v);v=null}if(q.view){v=document.createElement("td");d(v).append("&nbsp;").css({border:"none",padding:"0px"});u.appendChild(v);v=document.createElement("td");v.title=q.viewtitle||"";d(v).append("<table cellspacing='0' cellpadding='0' border='0' class='tbutton'><tr><td><img src='"+g+q.viewicon+"'/></td><td valign='center'>"+q.viewtext+"&nbsp;</td></tr></table>").css("cursor","pointer").addClass("nav-button").click(function(){var r=d(j).getGridParam("selrow");if(r){d(j).viewGridRow(r,o||{})}else{viewModal("#"+e.themodal,{toTop:false});d("#jqg_alrt").focus()}return false}).hover(function(){d(this).addClass("nav-hover")},function(){d(this).removeClass("nav-hover")});u.appendChild(v);v=null}if(q.del){v=document.createElement("td");d(v).append("&nbsp;").css({border:"none",padding:"0px"});u.appendChild(v);v=document.createElement("td");v.title=q.deltitle||"";d(v).append("<table cellspacing='0' cellpadding='0' border='0' class='tbutton'><tr><td><img src='"+g+q.delicon+"'/></td><td>"+q.deltext+"&nbsp;</td></tr></table>").css("cursor","pointer").addClass("nav-button").click(function(){var r;if(j.p.multiselect){r=d(j).getGridParam("selarrrow");if(r.length==0){r=null}}else{r=d(j).getGridParam("selrow")}if(r){d(j).delGridRow(r,m||{})}else{viewModal("#"+e.themodal,{toTop:false});d("#jqg_alrt").focus()}return false}).hover(function(){d(this).addClass("nav-hover")},function(){d(this).removeClass("nav-hover")});u.appendChild(v);v=null}if(q.search){v=document.createElement("td");d(v).append("&nbsp;").css({border:"none",padding:"0px"});u.appendChild(v);v=document.createElement("td");if(d(a)[0]==j.p.pager[0]){l=d.extend(l,{dirty:true})}v.title=q.searchtitle||"";d(v).append("<table cellspacing='0' cellpadding='0' border='0' class='tbutton'><tr><td class='no-dirty-cell'><img src='"+g+q.searchicon+"'/></td><td>"+q.searchtext+"&nbsp;</td></tr></table>").css({cursor:"pointer"}).addClass("nav-button").click(function(){d(j).searchGrid(l||{});return false}).hover(function(){d(this).addClass("nav-hover")},function(){d(this).removeClass("nav-hover")});u.appendChild(v);v=null}if(q.refresh){v=document.createElement("td");d(v).append("&nbsp;").css({border:"none",padding:"0px"});u.appendChild(v);v=document.createElement("td");v.title=q.refreshtitle||"";var f=(d(a)[0]==j.p.pager[0])?true:false;d(v).append("<table cellspacing='0' cellpadding='0' border='0' class='tbutton'><tr><td><img src='"+g+q.refreshicon+"'/></td><td>"+q.refreshtext+"&nbsp;</td></tr></table>").css("cursor","pointer").addClass("nav-button").click(function(){j.p.search=false;switch(q.refreshstate){case"firstpage":j.p.page=1;d(j).trigger("reloadGrid");break;case"current":var s=j.p.multiselect===true?selarrrow:j.p.selrow;d(j).setGridParam({gridComplete:function(){if(j.p.multiselect===true){if(s.length>0){for(var y=0;y<s.length;y++){d(j).setSelection(s[y])}}}else{if(s){d(j).setSelection(s)}}}});d(j).trigger("reloadGrid");break}if(f){d(".no-dirty-cell",j.p.pager).removeClass("dirty-cell")}if(q.search){var r=d("table:first",j.grid.bDiv).attr("id");d("#sval","#srchcnt"+r).val("")}return false}).hover(function(){d(this).addClass("nav-hover")},function(){d(this).removeClass("nav-hover")});u.appendChild(v);v=null}if(q.position=="left"){d(w).append(u).addClass("nav-table-left")}else{d(w).append(u).addClass("nav-table-right")}d(a).prepend(w)})},navButtonAdd:function(b,a){a=d.extend({caption:"newButton",title:"",buttonimg:"",onClickButton:null,position:"last"},a||{});return this.each(function(){if(!this.grid){return}if(b.indexOf("#")!=0){b="#"+b}var m=d(".navtable",b)[0];if(m){var l,k;var k=document.createElement("td");d(k).append("&nbsp;").css({border:"none",padding:"0px"});var q=d("tr:eq(0)",m)[0];if(a.position!="first"){q.appendChild(k)}tbd=document.createElement("td");tbd.title=a.title;var o=(a.buttonimg)?"<img src='"+a.buttonimg+"'/>":"&nbsp;";d(tbd).append("<table cellspacing='0' cellpadding='0' border='0' class='tbutton'><tr><td>"+o+"</td><td>"+a.caption+"&nbsp;</td></tr></table>").css("cursor","pointer").addClass("nav-button").click(function(e){if(typeof a.onClickButton=="function"){a.onClickButton()}e.stopPropagation();return false}).hover(function(){d(this).addClass("nav-hover")},function(){d(this).removeClass("nav-hover")});if(a.position!="first"){q.appendChild(tbd)}else{d(q).prepend(tbd);d(q).prepend(k)}tbd=null;k=null}})},GridToForm:function(b,a){return this.each(function(){var h=this;if(!h.grid){return}var k=d(h).getRowData(b);if(k){for(var j in k){if(d("[name="+j+"]",a).is("input:radio")){d("[name="+j+"]",a).each(function(){if(d(this).val()==k[j]){d(this).attr("checked","checked")}else{d(this).attr("checked","")}})}else{d("[name="+j+"]",a).val(k[j])}}}})},FormToGrid:function(b,a){return this.each(function(){var h=this;if(!h.grid){return}var j=d(a).serializeArray();var k={};d.each(j,function(f,e){k[e.name]=e.value});d(h).setRowData(b,k)})}})})(jQuery);(function(b){b.fn.extend({jqGridImport:function(a){a=b.extend({imptype:"xml",impstring:"",impurl:"",mtype:"GET",impData:{},xmlGrid:{config:"roots>grid",data:"roots>rows"},jsonGrid:{config:"grid",data:"data"}},a||{});return this.each(function(){var j=this;var k=function(o,q){var d=b(q.xmlGrid.config,o)[0];var f=b(q.xmlGrid.data,o)[0];if(xmlJsonClass.xml2json&&JSON.parse){var e=xmlJsonClass.xml2json(d," ");var e=JSON.parse(e);for(var s in e){var r=e[s]}if(f){var c=e.grid.datatype;e.grid.datatype="xmlstring";e.grid.datastr=o;b(j).jqGrid(r).setGridParam({datatype:c})}else{b(j).jqGrid(r)}e=null;r=null}else{alert("xml2json or json.parse are not present")}};var h=function(f,o){if(f&&typeof f=="string"&&JSON.parse){var e=JSON.parse(f);var c=e[o.jsonGrid.config];var d=e[o.jsonGrid.data];if(d){var q=c.datatype;c.datatype="jsonstring";c.datastr=d;b(j).jqGrid(c).setGridParam({datatype:q})}else{b(j).jqGrid(c)}}};switch(a.imptype){case"xml":b.ajax({url:a.impurl,type:a.mtype,data:a.impData,dataType:"xml",complete:function(d,c){if(c=="success"){k(d.responseXML,a);d=null}}});break;case"xmlstring":if(a.impstring&&typeof a.impstring=="string"){var g=xmlJsonClass.parseXml(a.impstring);if(g){k(g,a);g=null}}break;case"json":b.ajax({url:a.impurl,type:a.mtype,data:a.impData,dataType:"json",complete:function(d,c){if(c=="success"){h(d.responseText,a);d=null}}});break;case"jsonstring":if(a.impstring&&typeof a.impstring=="string"){h(a.impstring,a)}break}})},jqGridExport:function(a){a=b.extend({exptype:"xmlstring"},a||{});var d=null;this.each(function(){if(!this.grid){return}var c=b(this).getGridParam();switch(a.exptype){case"xmlstring":d=xmlJsonClass.json2xml(c," ");break;case"jsonstring":d=JSON.stringify(c);break}});return d}})})(jQuery);(function(b){b.fn.extend({editRow:function(s,k,l,r,q,m,a,o){return this.each(function(){var j=this,w,d,y,h=0,g=null,c=[],x;if(!j.grid){return}var v,f,e;if(!j.p.multiselect){x=b(j).getInd(j.rows,s);if(x===false){return}y=b(j.rows[x]).attr("editable")||"0";if(y=="0"){b("td",j.rows[x]).each(function(u){w=j.p.colModel[u].name;e=j.p.colModel[u].hidden===true?true:false;try{d=b.unformat(this,{colModel:j.p.colModel[u]},u)}catch(z){d=b(this).html()}c[w]=d;if(w!=="cb"&&w!=="subgrid"&&j.p.colModel[u].editable===true&&!e){if(g===null){g=u}b(this).html("");var B=b.extend(j.p.colModel[u].editoptions||{},{id:s+"_"+w,name:w});if(!j.p.colModel[u].edittype){j.p.colModel[u].edittype="text"}var A=createEl(j.p.colModel[u].edittype,B,d,b(this));b(A).addClass("editable");b(this).append(A);if(j.p.colModel[u].edittype=="select"&&j.p.colModel[u].editoptions.multiple===true&&b.browser.msie){b(A).width(b(A).width())}h++}});if(h>0){c.id=s;j.p.savedRow.push(c);b(j.rows[x]).attr("editable","1");b("td:eq("+g+") input",j.rows[x]).focus();if(k===true){b(j.rows[x]).bind("keydown",function(u){if(u.keyCode===27){b(j).restoreRow(s)}if(u.keyCode===13){b(j).saveRow(s,r,q,m,a,o);return false}u.stopPropagation()})}if(b.isFunction(l)){l(s)}}}}})},saveRow:function(j,k,l,m,a,h){return this.each(function(){var v=this,w,d={},f={},y,z,e,g,u;if(!v.grid){return}u=b(v).getInd(v.rows,j);if(u===false){return}y=b(v.rows[u]).attr("editable");l=l?l:v.p.editurl;if(y==="1"&&l){b("td",v.rows[u]).each(function(s){w=v.p.colModel[s].name;if(w!=="cb"&&w!=="subgrid"&&v.p.colModel[s].editable===true){if(v.p.colModel[s].hidden===true){d[w]=b(this).html()}else{switch(v.p.colModel[s].edittype){case"checkbox":var q=["Yes","No"];if(v.p.colModel[s].editoptions){q=v.p.colModel[s].editoptions.value.split(":")}d[w]=b("input",this).attr("checked")?q[0]:q[1];break;case"text":case"password":case"textarea":d[w]=!v.p.autoencode?b("input, textarea",this).val():htmlEncode(b("input, textarea",this).val());break;case"select":if(!v.p.colModel[s].editoptions.multiple){d[w]=b("select>option:selected",this).val();f[w]=b("select>option:selected",this).text()}else{var o=b("select",this);d[w]=b(o).val();var r=[];b("select > option:selected",this).each(function(A,B){r[A]=b(B).text()});f[w]=r.join(",")}break}e=checkValues(d[w],s,v);if(e[0]===false){e[1]=d[w]+" "+e[1];return false}}}});if(e[0]===false){try{info_dialog(b.jgrid.errors.errcap,e[1],b.jgrid.edit.bClose,v.p.imgpath)}catch(x){alert(e[1])}return}if(d){d.id=j;if(m){d=b.extend({},d,m)}}if(!v.grid.hDiv.loading){v.grid.hDiv.loading=true;b("div.loading",v.grid.hDiv).fadeIn("fast");if(l=="clientArray"){d=b.extend({},d,f);b(v).setRowData(j,d);b(v.rows[u]).attr("editable","0");for(var c=0;c<v.p.savedRow.length;c++){if(v.p.savedRow[c].id===j){z=c;break}}if(z>=0){v.p.savedRow.splice(z,1)}if(b.isFunction(a)){a(j,res.responseText)}}else{b.ajax({url:l,data:d,type:"POST",complete:function(q,o){if(o==="success"){var r;if(b.isFunction(k)){r=k(q)}else{r=true}if(r===true){d=b.extend({},d,f);b(v).setRowData(j,d);b(v.rows[u]).attr("editable","0");for(var s=0;s<v.p.savedRow.length;s++){if(v.p.savedRow[s].id===j){z=s;break}}if(z>=0){v.p.savedRow.splice(z,1)}if(b.isFunction(a)){a(j,q.responseText)}}else{b(v).restoreRow(j)}}},error:function(o,q){if(b.isFunction(h)){h(o,q)}else{alert("Error Row: "+j+" Result: "+o.status+":"+o.statusText+" Status: "+q)}}})}v.grid.hDiv.loading=false;b("div.loading",v.grid.hDiv).fadeOut("fast");b(v.rows[u]).unbind("keydown")}}})},restoreRow:function(a){return this.each(function(){var k=this,j,m,l;if(!k.grid){return}l=b(k).getInd(k.rows,a);if(l===false){return}for(var h=0;h<k.p.savedRow.length;h++){if(k.p.savedRow[h].id===a){m=h;break}}if(m>=0){b(k).setRowData(a,k.p.savedRow[m]);b(k.rows[l]).attr("editable","0");k.p.savedRow.splice(m,1)}})}})})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"?????(?)",loadtext:"????????...",pgtext:"??"};b.jgrid.search={caption:"???????...",Find:"??????",Reset:"???????",odata:["?????","????????","??-?????","??-????? ???=","??-??????","??-?????? ??? =","??????? ?","???????? ?","???????"]};b.jgrid.edit={addCaption:"??? ?????",editCaption:"???????? ?????",bSubmit:"??????",bCancel:"?????",bClose:"???????",processData:"?????????...",msg:{required:"?????? ? ????????????",number:"???????? ??????? ?????!",minValue:"?????????? ?????? ?? ? ??-?????? ??? ????? ??",maxValue:"?????????? ?????? ?? ? ??-????? ??? ????? ??",email:"?? ? ??????? ??. ?????",integer:"???????? ??????? ???? ?????",date:"???????? ??????? ????"}};b.jgrid.del={caption:"?????????",msg:"?? ?????? ?? ????????? ??????",bSubmit:"??????",bCancel:"?????",processData:"?????????..."};b.jgrid.nav={edittext:" ",edittitle:"???????? ?????? ?????",addtext:" ",addtitle:"???????? ??? ?????",deltext:" ",deltitle:"????????? ?????? ?????",searchtext:" ",searchtitle:"??????? ?????(?)",refreshtext:"",refreshtitle:"?????? ???????",alertcap:"??????????????",alerttext:"????, ???????? ?????"};b.jgrid.col={caption:"??????",bSubmit:"?????",bCancel:"?????"};b.jgrid.errors={errcap:"??????",nourl:"???? ??????? url ?????",norecords:"???? ????? ?? ?????????",model:"?????? ?? ??????????? ?? ???????!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,defaultValue:0},currency:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:" ??.",defaultValue:0},date:{dayNames:["???","???","??","??","???","???","???","??????","??????????","???????","?????","?????????","?????","??????"],monthNames:["??","???","????","???","???","???","???","???","???","???","????","???","??????","????????","????","?????","???","???","???","??????","?????????","????????","???????","????????"],AmPm:["","","",""],S:function(a){if(a==7||a==8||a==27||a==28){return"??"}return["??","??","??"][Math.min((a-1)%10,2)]},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show"}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"?????(?)",loadtext:"????????...",pgtext:"??"};b.jgrid.search={caption:"???????...",Find:"??????",Reset:"???????",odata:["?????","????????","??-?????","??-????? ???=","??-??????","??-?????? ??? =","??????? ?","???????? ?","???????"]};b.jgrid.edit={addCaption:"??? ?????",editCaption:"???????? ?????",bSubmit:"??????",bCancel:"?????",bClose:"???????",processData:"?????????...",msg:{required:"?????? ? ????????????",number:"???????? ??????? ?????!",minValue:"?????????? ?????? ?? ? ??-?????? ??? ????? ??",maxValue:"?????????? ?????? ?? ? ??-????? ??? ????? ??",email:"?? ? ??????? e-mail ?????",integer:"???????? ??????? ???? ?????",date:"???????? ??????? ????"}};b.jgrid.del={caption:"?????????",msg:"?? ?????? ?? ???????? ??????",bSubmit:"??????",bCancel:"?????",processData:"?????????..."};b.jgrid.nav={edittext:" ",edittitle:"???????? ?? ?????? ?????",addtext:" ",addtitle:"???????? ?? ??? ?????",deltext:" ",deltitle:"????????? ?? ?????? ?????",searchtext:" ",searchtitle:"??????? ?????(?) ",refreshtext:"",refreshtitle:"?????? ???????",alertcap:"??????????????",alerttext:"????, ???????? ?????"};b.jgrid.col={caption:"??????",bSubmit:"?????",bCancel:"?????"};b.jgrid.errors={errcap:"??????",nourl:"???? ??????? URL ?????",norecords:"???? ????? ?? ?????????",model:"??????? ?? ??????????? ?? ???????!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,defaultValue:0},currency:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:" ??.",defaultValue:0},date:{dayNames:["???","???","??","??","???","???","???","??????","??????????","???????","?????","?????????","?????","??????"],monthNames:["??","???","????","???","???","???","???","???","???","???","????","???","??????","????????","????","?????","???","???","???","??????","?????????","????????","???????","????????"],AmPm:["","","",""],S:function(a){if(a==7||a==8||a==27||a==28){return"??"}return["??","??","??"][Math.min((a-1)%10,2)]},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show"}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"file(s)",loadtext:"Carregant...",pgtext:"/"};b.jgrid.search={caption:"Cerca...",Find:"Cercar",Reset:"Buidar",odata:["igual","no igual","menor","menor o igual","major","major o igual","comen?a amb","acaba amb","cont?"]};b.jgrid.edit={addCaption:"Afegir registre",editCaption:"Modificar registre",bSubmit:"Enviar",bCancel:"Cancelar",bClose:"Tancar",processData:"Processant...",msg:{required:"Camp obligatori",number:"Introdueixi un nombre",minValue:"El valor ha de ser major o igual que ",maxValue:"El valor ha de ser menor o igual a ",email:"no ?s una direcci? de correu v?lida",integer:"Introdueixi un valor enter",date:"Introdueixi una data correcta "}};b.jgrid.del={caption:"Eliminar",msg:"?Desitja eliminar els registres seleccionats?",bSubmit:"Eliminar",bCancel:"Cancelar",processData:"Processant..."};b.jgrid.nav={edittext:" ",edittitle:"Modificar fila seleccionada",addtext:" ",addtitle:"Agregar nova fila",deltext:" ",deltitle:"Eliminar fila seleccionada",searchtext:" ",searchtitle:"Cercar informaci?",refreshtext:"",refreshtitle:"Refrescar taula",alertcap:"Av?s",alerttext:"Seleccioni una fila"};b.jgrid.col={caption:"Mostrar/ocultar columnes",bSubmit:"Enviar",bCancel:"Cancelar"};b.jgrid.errors={errcap:"Error",nourl:"No s'ha especificat una URL",norecords:"No hi ha dades per processar",model:"Les columnes de noms s?n diferents de les columnes del model"};b.jgrid.formatter={integer:{thousandsSeparator:".",defaulValue:0},number:{decimalSeparator:",",thousandsSeparator:".",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:",",thousandsSeparator:".",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["Dg","Dl","Dt","Dc","Dj","Dv","Ds","Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"],monthNames:["Gen","Febr","Mar?","Abr","Maig","Juny","Jul","Ag","Set","Oct","Nov","Des","Gener","Febrer","Mar?","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],AmPm:["am","pm","AM","PM"],S:function(a){return a<11||a>13?["st","nd","rd","th"][Math.min((a-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d-m-Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show"}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"R?dek(u)",loadtext:"Nac?t?m...",pgtext:"/"};b.jgrid.search={caption:"Vyhled?v?m...",Find:"Hledat",Reset:"Reset",odata:["rovno","nen? rovno","men??","men?? nebo rovno","vet??","vet?? nebo rovno","zac?n? na","konc? na","obsahuje"]};b.jgrid.edit={addCaption:"Pridat z?znam",editCaption:"Editace z?znamu",bSubmit:"Ulo?it",bCancel:"Storno",bClose:"Zavr?t",processData:"Zpracov?v?m...",msg:{required:"Pole je vy?adov?no",number:"Pros?m, vlo?te validn? c?slo",minValue:"hodnota mus? b?t vet?? ne? nebo rovn? ",maxValue:"hodnota mus? b?t men?? ne? nebo rovn? ",email:"nen? validn? e-mail",integer:"Pros?m, vlo?te cel? c?slo",date:"Pros?m, vlo?te validn? datum"}};b.jgrid.del={caption:"Smazat",msg:"Smazat vybran?(?) z?znam(y)?",bSubmit:"Smazat",bCancel:"Storno",processData:"Zpracov?v?m..."};b.jgrid.nav={edittext:" ",edittitle:"Editovat vybran? r?dek",addtext:" ",addtitle:"Pridat nov? r?dek",deltext:" ",deltitle:"Smazat vybran? z?znam ",searchtext:" ",searchtitle:"Naj?t z?znamy",refreshtext:"",refreshtitle:"Obnovit tabulku",alertcap:"Varov?n?",alerttext:"Pros?m, vyberte r?dek"};b.jgrid.col={caption:"Zobrazit/Skr?t sloupce",bSubmit:"Ulo?it",bCancel:"Storno"};b.jgrid.errors={errcap:"Chyba",nourl:"Nen? nastavena url",norecords:"??dn? z?znamy ke zpracov?n?",model:"Length colNames <> colModel!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["Ne","Po","?t","St","Ct","P?","So","Nedele","Pondel?","?ter?","Streda","Ctvrtek","P?tek","Sobota"],monthNames:["Led","?no","Bre","Dub","Kve","Cer","Cvc","Srp","Z?r","R?j","Lis","Pro","Leden","?nor","Brezen","Duben","Kveten","Cerven","Cervenec","Srpen","Z?r?","R?jen","Listopad","Prosinec"],AmPm:["do","od","DO","OD"],S:function(a){return a<11||a>13?["st","nd","rd","th"][Math.min((a-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show",addParam:""}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"Zeile(n)",loadtext:"L?dt...",pgtext:"/"};b.jgrid.search={caption:"Suche...",Find:"Finden",Reset:"Zur?cksetzen",odata:["gleich","ungleich","kleiner","kleiner oder gleich","gr??er","gr??er oder gleich","beginnt mit","endet mit","beinhaltet"]};b.jgrid.edit={addCaption:"Datensatz hinzuf?gen",editCaption:"Datensatz bearbeiten",bSubmit:"Speichern",bCancel:"Abbrechen",bClose:"Schlie?en",processData:"Verarbeitung l?uft...",msg:{required:"Feld ist erforderlich",number:"Bitte geben Sie eine Zahl ein",minValue:"Wert muss gr??er oder gleich sein, als ",maxValue:"Wert muss kleiner oder gleich sein, als ",email:"ist keine valide E-Mail Adresse",integer:"Bitte geben Sie eine Ganzzahl ein",date:"Please, enter valid date value"}};b.jgrid.del={caption:"L?schen",msg:"Ausgew?hlte Datens?tze l?schen?",bSubmit:"L?schen",bCancel:"Abbrechen",processData:"Verarbeitung l?uft..."};b.jgrid.nav={edittext:" ",edittitle:"Ausgew?hlten Zeile editieren",addtext:" ",addtitle:"Neuen Zeile einf?gen",deltext:" ",deltitle:"Ausgew?hlte Zeile l?schen",searchtext:" ",searchtitle:"Datensatz finden",refreshtext:"",refreshtitle:"Tabelle neu laden",alertcap:"Warnung",alerttext:"Bitte Zeile ausw?hlen"};b.jgrid.col={caption:"Spalten anzeigen/verbergen",bSubmit:"Speichern",bCancel:"Abbrechen"};b.jgrid.errors={errcap:"Fehler",nourl:"Keine URL angegeben",norecords:"Keine Datens?tze zum verarbeiten",model:"Length of colNames <> colModel!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["Sun","Mon","Tue","Wed","Thr","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],AmPm:["am","pm","AM","PM"],S:function(a){return a<11||a>13?["st","nd","rd","th"][Math.min((a-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show"}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"R?kke(r)",loadtext:"Indl?ser...",pgtext:"/"};b.jgrid.search={caption:"S?g...",Find:"Find",Reset:"Nulstil",odata:["lig med","forskellig fra","mindre end","mindre end eller lig med","st?rre end"," st?rre end eller lig med","starter med","slutter med","indeholder"]};b.jgrid.edit={addCaption:"Tilf?j",editCaption:"Ret",bSubmit:"Send",bCancel:"Annuller",bClose:"Luk",processData:"Behandler...",msg:{required:"Felt er n?dvendigt",number:"Indtast venligst et validt tal",minValue:"v?rdi skal v?re st?rre end eller lig med",maxValue:"v?rdi skal v?re mindre end eller lig med",email:"er ikke en valid email",integer:"Indtast venligst et validt heltalt",date:"Indtast venligst en valid datov?rdi"}};b.jgrid.del={caption:"Slet",msg:"Slet valgte r?kke(r)?",bSubmit:"Slet",bCancel:"Annuller",processData:"Behandler..."};b.jgrid.nav={edittext:" ",edittitle:"Rediger valgte r?kke",addtext:" ",addtitle:"Tilf?j ny r?kke",deltext:" ",deltitle:"Slet valgte r?kke",searchtext:" ",searchtitle:"Find poster",refreshtext:"",refreshtitle:"Indl?s igen",alertcap:"Advarsel",alerttext:"V?lg venligst r?kke"};b.jgrid.col={caption:"Vis/skjul kolonner",bSubmit:"Send",bCancel:"Annuller"};b.jgrid.errors={errcap:"Fejl",nourl:"Ingel url valgt",norecords:"Ingen poster at behandle",model:"colNames og colModel har ikke samme l?ngde!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:",",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:",",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["S?n","Man","Tirs","Ons","Tors","Fre","L?r","S?ndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","L?rdag"],monthNames:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec","Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],AmPm:["","","",""],S:function(a){return"."},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"j/n/Y",LongDate:"l d. F Y",FullDateTime:"l d F Y G:i:s",MonthDay:"d. F",ShortTime:"G:i",LongTime:"G:i:s",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show"}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"????af??",loadtext:"F??t?s?...",pgtext:"/"};b.jgrid.search={caption:"??a??t?s?...",Find:"???es?",Reset:"?pa?af???",odata:["?s?","???s?","?????te?? ap?","?????te?? ? ?s?","?e?a??te?? ap?","?e?a??te?? ? ?s?","?e???? ?e","te?e???e? ?e","e?pe????e?"]};b.jgrid.edit={addCaption:"??sa???? ????af??",editCaption:"?pe?e??as?a ????af??",bSubmit:"?ata????s?",bCancel:"?????",bClose:"??e?s???",processData:"?p? epe?e??as?a...",msg:{required:"?? ped?? e??a? apa?a?t?t?",number:"?? ped?? d??eta? ???? a???????",minValue:"? t??? p??pe? ?a e??a? ?e?a??te?? ? ?s? t?? ",maxValue:"? t??? p??pe? ?a e??a? ?????te?? ? ?s? t?? ",email:"? d?e????s? e-mail de? e??a? ??????",integer:"?? ped?? d??eta? ???? a???a???? a???????",date:"? ??e??????a de? e??a? ??????"}};b.jgrid.del={caption:"??a??af?",msg:"??a??af? t?? ep??e?????? e???af??;",bSubmit:"?a?",bCancel:"?????",processData:"?p? epe?e??as?a..."};b.jgrid.nav={edittext:" ",edittitle:"?pe?e??as?a ep??e?????? e???af??",addtext:" ",addtitle:"??sa???? ??a? e???af??",deltext:" ",deltitle:"??a??af? ep??e?????? e???af??",searchtext:" ",searchtitle:"???es? ????af??",refreshtext:"",refreshtitle:"??a???s? ???a?a",alertcap:"???s???",alerttext:"?e? ??ete ep????e? e???af?"};b.jgrid.col={caption:"??f???s? / ?p?????? St????",bSubmit:"??",bCancel:"?????"};b.jgrid.errors={errcap:"Sf???a",nourl:"?e? ??e? d??e? d?e????s? ?e???s??? ??a t? s???e??????? e????e?a",norecords:"?e? ?p?????? e???af?? p??? epe?e??as?a",model:"???s?? a?????? ped??? colNames/colModel!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["???","?e?","???","?et","?e?","?a?","Sa?","????a??","?e?t??a","???t?","?et??t?","???pt?","?a?as?e??","S???at?"],monthNames:["?a?","Fe?","?a?","?p?","?a?","????","????","???","Sep","??t","??e","?e?","?a????????","Fe?????????","???t???","?p??????","?????","???????","???????","?????st??","Sept???????","??t??????","?????????","?e????????"],AmPm:["p?","??","??","??"],S:function(a){return a==1||a>1?["?"][Math.min((a-1)%10,3)]:""},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show"}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"Products(s)",loadtext:"Loading...",pgtext:"/"};b.jgrid.search={caption:"Search...",Find:"Find",Reset:"Reset",odata:["equal","not equal","less","less or equal","greater","greater or equal","begins with","ends with","contains"]};b.jgrid.edit={addCaption:"Add Record",editCaption:"Edit Record",bSubmit:"Submit",bCancel:"Cancel",bClose:"Close",processData:"Processing...",msg:{required:"Field is required",number:"Please, enter valid number",minValue:"value must be greater than or equal to ",maxValue:"value must be less than or equal to",email:"is not a valid e-mail",integer:"Please, enter valid integer value",date:"Please, enter valid date value"}};b.jgrid.view={caption:"View Record",bClose:"Close"};b.jgrid.del={caption:"Delete",msg:"Delete selected record(s)?",bSubmit:"Delete",bCancel:"Cancel",processData:"Processing..."};b.jgrid.nav={edittext:" ",edittitle:"Edit selected row",addtext:" ",addtitle:"Add new row",deltext:" ",deltitle:"Delete selected row",searchtext:" ",searchtitle:"Find records",refreshtext:"",refreshtitle:"Reload Grid",alertcap:"Warning",alerttext:"Please, select row",viewtext:" ",viewtitle:"View selected row"};b.jgrid.col={caption:"Show/Hide Columns",bSubmit:"Submit",bCancel:"Cancel"};b.jgrid.errors={errcap:"Error",nourl:"No url is set",norecords:"No records to process",model:"Length of colNames <> colModel!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["Sun","Mon","Tue","Wed","Thr","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],AmPm:["am","pm","AM","PM"],S:function(a){return a<11||a>13?["st","nd","rd","th"][Math.min((a-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show",addParam:"",checkbox:{disabled:true}}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"????",loadtext:"????????...",pgtext:"/"};b.jgrid.search={caption:"?????...",Find:"????? ??",Reset:"?????",odata:["?????","?? ?????","???? ??","???? ?? ?????","??????","?????? ?? ?????","????  ??","????? ??","????"]};b.jgrid.edit={addCaption:"????? ???? ?????",editCaption:"?????? ?????",bSubmit:"???",bCancel:"??????",bClose:"????",processData:"??????...",msg:{required:"?????? ???? ???? ?? ????",number:"???? ??? ????? ???? ????",minValue:"????? ???? ??? ???? ?????? ?? ????? ??",maxValue:"????? ???? ??? ???? ?????? ?? ?????",email:"??? ????????? ???? ??? ????? ????",integer:"???? ?? ??? ???? ???? ????",date:"???? ?? ????? ????? ???? ????"}};b.jgrid.del={caption:"???",msg:"?? ??? ????? ??? ?????? ??? ????? ??????",bSubmit:"???",bCancel:"?????",processData:"??????..."};b.jgrid.nav={edittext:" ",edittitle:"?????? ???? ??? ?????? ???",addtext:" ",addtitle:"?????? ???? ????",deltext:" ",deltitle:"??? ???? ??? ?????? ???",searchtext:" ",searchtitle:"?????? ????",refreshtext:"",refreshtitle:"??????? ???? ????",alertcap:"?????",alerttext:"???? ?? ???? ?????? ????"};b.jgrid.col={caption:"?????/??? ????? ????",bSubmit:"???",bCancel:"??????"};b.jgrid.errors={errcap:"???",nourl:"??? ????? ????? ???? ???",norecords:"??? ?????? ???? ?????? ????? ????",model:"??? ??? ???? ?? ????? ???? ??? ??? ?? ????!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["??","??","??","????","???","???","???","??????","??????","?? ????","????????","???????","????","????"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","??????","?????","????","?????","??","????","?????","???","???????","?????","??????","December"],AmPm:["?.?","?.?","?.?","?.?"],S:function(a){return a<11||a>13?["st","nd","rd","th"][Math.min((a-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"?????"}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"Rivej&auml;",loadtext:"Haetaan...",pgtext:"/"};b.jgrid.search={caption:"Etsi...",Find:"Etsi",Reset:"Tyhj&auml;&auml;",odata:["=","<>","<","<=",">",">=","alkaa","loppuu","sis&auml;t&auml;&auml;"]};b.jgrid.edit={addCaption:"Uusi rivi",editCaption:"Muokkaa rivi",bSubmit:"OK",bCancel:"Peru",bClose:"Sulje",processData:"Suoritetaan...",msg:{required:"pakollinen",number:"Anna kelvollinen nro",minValue:"arvo oltava >= ",maxValue:"arvo oltava  <= ",email:"virheellinen sposti ",integer:"Anna kelvollinen kokonaisluku",date:"Anna kelvollinen pvm"}};b.jgrid.del={caption:"Poista",msg:"Poista valitut  rivi(t)?",bSubmit:"Poista",bCancel:"Peru",processData:"Suoritetaan..."};b.jgrid.nav={edittext:" ",edittitle:"Muokkaa valittu rivi",addtext:" ",addtitle:"Uusi rivi",deltext:" ",deltitle:"Poista valittu rivi",searchtext:" ",searchtitle:"Etsi tietoja",refreshtext:"",refreshtitle:"Lataa uudelleen",alertcap:"Varoitus",alerttext:"Valitse rivi"};b.jgrid.col={caption:"Nayta/Piilota sarakkeet",bSubmit:"OK",bCancel:"Peru"};b.jgrid.errors={errcap:"Virhe",nourl:"url asettamatta",norecords:"Ei muokattavia tietoja",model:"Pituus colNames <> colModel!"};b.jgrid.formatter={integer:{thousandsSeparator:"",defaulValue:0},number:{decimalSeparator:",",thousandsSeparator:"",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:",",thousandsSeparator:"",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["Su","Ma","Ti","Ke","To","Pe","La","Sunnuntai","Maanantai","Tiista","Keskiviikko","Torstai","Perjantai","Lauantai"],monthNames:["Tam","Hel","Maa","Huh","Tou","Kes","Hei","Elo","Syy","Lok","Mar","Jou","Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kes&auml;kuu","Hein&auml;kuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],AmPm:["am","pm","AM","PM"],S:function(a){return a<11||a>13?["st","nd","rd","th"][Math.min((a-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"d.m.Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"nayta"}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"Ligne(s)",loadtext:"Chargement...",pgtext:"/"};b.jgrid.search={caption:"Recherche...",Find:"Chercher",Reset:"Annuler",odata:["?gal","diff?rent","inf?rieur","inf?rieur ou ?gal","sup?rieur","sup?rieur ou ?gal","d?bute par","termine par","contient"]};b.jgrid.edit={addCaption:"Ajouter",editCaption:"Editer",bSubmit:"Valider",bCancel:"Annuler",bClose:"Fermer",processData:"Traitement...",msg:{required:"Champ obligatoire",number:"Saisissez un nombre valide",minValue:"La valeur doit ?tre sup?rieure ou ?gal ? 0 ",maxValue:"La valeur doit ?tre inf?rieure ou ?gal ? 0",email:"n'est pas un email valide",integer:"Saisissez un entier valide",date:"Saisissez une date valide"}};b.jgrid.del={caption:"Supprimer",msg:"Supprimer les enregistrements s?lectionn?s ?",bSubmit:"Supprimer",bCancel:"Annuler",processData:"Traitement..."};b.jgrid.nav={edittext:" ",edittitle:"Editer la ligne s?lectionn?e",addtext:" ",addtitle:"Ajouter une ligne",deltext:" ",deltitle:"Supprimer la ligne s?lectionn?e",searchtext:" ",searchtitle:"Chercher un enregistrement",refreshtext:"",refreshtitle:"Recharger le tableau",alertcap:"Avertissement",alerttext:"Veuillez s?lectionner une ligne"};b.jgrid.col={caption:"Afficher/Masquer les colonnes",bSubmit:"Valider",bCancel:"Annuler"};b.jgrid.errors={errcap:"Erreur",nourl:"Aucune url param?tr?e",norecords:"Aucun enregistrement ? traiter",model:"Nombre de titres (colNames) <> Nombre de donn?es (colModel)!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam","Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],monthNames:["Jan","Fev","Mar","Avr","Mai","Jui","Jul","Aou","Sep","Oct","Nov","Dec","Janvier","F?vrier","Mars","Avril","Mai","Juin","Juillet","Ao?t","Saptembre","Octobre","Novembre","D?cembre"],AmPm:["am","pm","AM","PM"],S:function(a){return a<11||a>13?["st","nd","rd","th"][Math.min((a-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"d-m-Y H:i:s",ISO8601Short:"d-m-Y",ShortDate:"j/n/Y",LongDate:"l d F Y",FullDateTime:"l d F Y, G:i:s",MonthDay:"d F",ShortTime:"G:i",LongTime:"G:i:s",SortableDateTime:"d-m-Y\\TH:i:s",UniversalSortableDateTime:"d-m-Y H:i:sO",YearMonth:"F Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show"}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"Ra?ir(s)",loadtext:"Hle?ur...",pgtext:"/"};b.jgrid.search={caption:"Leita...",Find:"Leita",Reset:"Endursetja",odata:["sama og","ekki sama og","minna en","minna en e?a jafnt og","meira en","meira en e?a jafnt og","byrjar ?","endar ?","inniheldur"]};b.jgrid.edit={addCaption:"Add Record",editCaption:"Edit Record",bSubmit:"Vista",bCancel:"H?tta vi?",bClose:"Loka",processData:"Vinnur...",msg:{required:"Reitur er nau?synlegur",number:"Vinsamlega settu inn t?lu",minValue:"gildi ver?ur a? vera meira en e?a jafnt og ",maxValue:"gildi ver?ur a? vera minna en e?a jafnt og ",email:"er ekki l?glegt email",integer:"Vinsamlega settu inn t?lu"}};b.jgrid.del={caption:"Ey?a",msg:"Ey?a v?ldum f?rslum ?",bSubmit:"Ey?a",bCancel:"H?tta vi?",processData:"Vinnur..."};b.jgrid.nav={edittext:" ",edittitle:"Breyta f?rslu",addtext:" ",addtitle:"N? f?rsla",deltext:" ",deltitle:"Ey?a f?rslu",searchtext:" ",searchtitle:"Leita",refreshtext:"",refreshtitle:"Endurhla?a",alertcap:"Vi?v?run",alerttext:"Vinsamlega veldu f?rslu"};b.jgrid.col={caption:"S?na / fela d?lka",bSubmit:"Vista",bCancel:"H?tta vi?"};b.jgrid.errors={errcap:"Villa",nourl:"Vantar sl??",norecords:"Engar f?rslur valdar",model:"Length of colNames <> colModel!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["Sun","Mon","Tue","Wed","Thr","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],AmPm:["am","pm","AM","PM"],S:function(a){return a<11||a>13?["st","nd","rd","th"][Math.min((a-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show"}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"Record",loadtext:"Caricamento...",pgtext:"/"};b.jgrid.search={caption:"Ricerca...",Find:"Cerca",Reset:"Pulisci",odata:["uguale","diverso","minore","minore o uguale","maggiore","maggiore o uguale","inizia con","finisce con","contiene"]};b.jgrid.edit={addCaption:"Aggiungi Record",editCaption:"Modifica Record",bSubmit:"Invia",bCancel:"Annulla",bClose:"Chiudi",processData:"In elaborazione...",msg:{required:"Campo richiesto",number:"Per favore, inserisci un valore valido",minValue:"il valore deve essere maggiore o uguale a ",maxValue:"il valore deve essere minore o uguale a",email:"e-mail non corretta",integer:"Please, enter valid integer value",date:"Please, enter valid date value"}};b.jgrid.del={caption:"Cancella",msg:"Cancellare record selezionato/i?",bSubmit:"Cancella",bCancel:"Annulla",processData:"In elaborazione..."};b.jgrid.nav={edittext:" ",edittitle:"Modifica record selezionato",addtext:" ",addtitle:"Aggiungi nuovo record",deltext:" ",deltitle:"Cancella record selezionato",searchtext:" ",searchtitle:"Ricerca record",refreshtext:"",refreshtitle:"Aggiorna griglia",alertcap:"Attenzione",alerttext:"Per favore, seleziona un record"};b.jgrid.col={caption:"Mostra/Nascondi Colonne",bSubmit:"Invia",bCancel:"Annulla"};b.jgrid.errors={errcap:"Errore",nourl:"Url non settata",norecords:"Nessun record da elaborare",model:"Length of colNames <> colModel!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["Sun","Mon","Tue","Wed","Thr","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],AmPm:["am","pm","AM","PM"],S:function(a){return a<11||a>13?["st","nd","rd","th"][Math.min((a-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show"}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"\u884c",loadtext:"\u8aad\u307f\u8fbc\u307f\u4e2d...",pgtext:"/"};b.jgrid.search={caption:"\u691c\u7d22...",Find:"\u691c\u7d22",Reset:"\u30ea\u30bb\u30c3\u30c8",odata:["=","!=","<","<=",">",">=","\u6b21\u306e\u8a00\u8449\u3067\u59cb\u307e\u308b","\u6b21\u306e\u8a00\u8449\u3067\u7d42\u308f\u308b","\u6b21\u306e\u8a00\u8449\u3092\u542b\u3080"]};b.jgrid.edit={addCaption:"\u30ec\u30b3\u30fc\u30c9\u8ffd\u52a0",editCaption:"\u30ec\u30b3\u30fc\u30c9\u7de8\u96c6",bSubmit:"\u9001\u4fe1",bCancel:"\u30ad\u30e3\u30f3\u30bb\u30eb",bClose:"\u9589\u3058\u308b",processData:"\u51e6\u7406\u4e2d...",msg:{required:"\u3053\u306e\u9805\u76ee\u306f\u5fc5\u9808\u3067\u3059\u3002",number:"\u6b63\u3057\u3044\u6570\u5024\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002",minValue:"\u6b21\u306e\u5024\u4ee5\u4e0a\u3067\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002",maxValue:"\u6b21\u306e\u5024\u4ee5\u4e0b\u3067\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002",email:"e-mail\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002",integer:"\u6b63\u3057\u3044\u6574\u6570\u5024\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002",date:"\u6b63\u3057\u3044\u5024\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002"}};b.jgrid.del={caption:"\u524a\u9664",msg:"\u9078\u629e\u3057\u305f\u30ec\u30b3\u30fc\u30c9\u3092\u524a\u9664\u3057\u307e\u3059\u304b\uff1f",bSubmit:"\u524a\u9664",bCancel:"\u30ad\u30e3\u30f3\u30bb\u30eb",processData:"\u51e6\u7406\u4e2d..."};b.jgrid.nav={edittext:" ",edittitle:"\u9078\u629e\u3057\u305f\u884c\u3092\u7de8\u96c6",addtext:" ",addtitle:"\u884c\u3092\u65b0\u898f\u8ffd\u52a0",deltext:" ",deltitle:"\u9078\u629e\u3057\u305f\u884c\u3092\u524a\u9664",searchtext:" ",searchtitle:"\u30ec\u30b3\u30fc\u30c9\u691c\u7d22",refreshtext:"",refreshtitle:"\u30b0\u30ea\u30c3\u30c9\u3092\u30ea\u30ed\u30fc\u30c9",alertcap:"\u8b66\u544a",alerttext:"\u884c\u3092\u9078\u629e\u3057\u3066\u4e0b\u3055\u3044\u3002"};b.jgrid.col={caption:"\u5217\u3092\u8868\u793a\uff0f\u96a0\u3059",bSubmit:"\u9001\u4fe1",bCancel:"\u30ad\u30e3\u30f3\u30bb\u30eb"};b.jgrid.errors={errcap:"\u30a8\u30e9\u30fc",nourl:"URL\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002",norecords:"\u51e6\u7406\u5bfe\u8c61\u306e\u30ec\u30b3\u30fc\u30c9\u304c\u3042\u308a\u307e\u305b\u3093\u3002",model:"colNames\u306e\u9577\u3055\u304ccolModel\u3068\u4e00\u81f4\u3057\u307e\u305b\u3093\u3002"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["\u65e5","\u6708","\u706b","\u6c34","\u6728","\u91d1","\u571f","\u65e5","\u6708","\u706b","\u6c34","\u6728","\u91d1","\u571f"],monthNames:["1","2","3","4","5","6","7","8","9","10","11","12","1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],AmPm:["am","pm","AM","PM"],S:"\u756a\u76ee",srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"\u8868\u793a",addParam:""}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"Wiersz(y)",loadtext:"Ladowanie...",pgtext:"/"};b.jgrid.search={caption:"Wyszukiwanie...",Find:"Szukaj",Reset:"Czysc",odata:["dokladnie","r?zne od","mniejsze od","mniejsze lub r?zne","wieksze od","wieksze lub r?zne","zacznij od","zakoncz na","zawiera"]};b.jgrid.edit={addCaption:"Dodaj rekord",editCaption:"Edytuj rekord",bSubmit:"Zapisz",bCancel:"Anuluj",bClose:"Zamknij",processData:"Przetwarzanie...",msg:{required:"Pole jest wymagane",number:"Prosze wpisac poprawna liczbe",minValue:"wartosc musi byc wieksza lub r?wna",maxValue:"wartosc musi byc mniejsza od",email:"nie jest adresem e-mail",integer:"Prosze wpisac poprawna liczbe",date:"Please, enter valid date value"}};b.jgrid.del={caption:"Usuwanie",msg:"Usun wybrany rekord(y)?",bSubmit:"Usun",bCancel:"Anuluj",processData:"Przetwarzanie..."};b.jgrid.nav={edittext:" ",edittitle:"Edytuj wybrany wiersz",addtext:" ",addtitle:"Dodaj nowy wiersz",deltext:" ",deltitle:"Usun wybrany wiersz",searchtext:" ",searchtitle:"Wyszukaj rekord",refreshtext:"",refreshtitle:"Przeladuj",alertcap:"Uwaga",alerttext:"Prosze wybrac wiersz"};b.jgrid.col={caption:"Pokaz/Ukryj kolumny",bSubmit:"Zatwierdz",bCancel:"Anuluj"};b.jgrid.errors={errcap:"Blad",nourl:"Brak adresu url",norecords:"Brak danych",model:"Length of colNames <> colModel!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["Sun","Mon","Tue","Wed","Thr","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],AmPm:["am","pm","AM","PM"],S:function(a){return a<11||a>13?["st","nd","rd","th"][Math.min((a-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show"}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"Registro(s)",loadtext:"Carregando...",pgtext:"/"};b.jgrid.search={caption:"Procurar...",Find:"Procurar",Reset:"Resetar",odata:["igual","diferente","menor","menor igual","maior","maior igual","come?ando com","terminando com","cont?m"]};b.jgrid.edit={addCaption:"Incluir",editCaption:"Alterar",bSubmit:"Enviar",bCancel:"Cancelar",bClose:"Fechar",processData:"Carregando...",msg:{required:"Campo ? requerido",number:"Por favor, informe um n?mero v?lido",minValue:"valor deve ser igual ou maior que ",maxValue:"valor deve ser menor ou igual a",email:"este e-mail n?o ? v?lido",integer:"Por favor, informe um valor inteiro",date:"Please, enter valid date value"}};b.jgrid.del={caption:"Delete",msg:"Deletar registros selecionado(s)?",bSubmit:"Delete",bCancel:"Cancelar",processData:"Carregando..."};b.jgrid.nav={edittext:" ",edittitle:"Alterar registro selecionado",addtext:" ",addtitle:"Incluir novo registro",deltext:" ",deltitle:"Deletar registro selecionado",searchtext:" ",searchtitle:"Procurar registros",refreshtext:"",refreshtitle:"Recarrgando Tabela",alertcap:"Aviso",alerttext:"Por favor, selecione um registro"};b.jgrid.col={caption:"Mostrar/Esconder Colunas",bSubmit:"Enviar",bCancel:"Cancelar"};b.jgrid.errors={errcap:"Erro",nourl:"Nenhuma URL defenida",norecords:"Sem registros para exibir",model:"Length of colNames <> colModel!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["Sun","Mon","Tue","Wed","Thr","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],AmPm:["am","pm","AM","PM"],S:function(a){return a<11||a>13?["st","nd","rd","th"][Math.min((a-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show"}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"Registo(s)",loadtext:"A carregar...",pgtext:"/"};b.jgrid.search={caption:"Busca...",Find:"Procurar",Reset:"Limpar",odata:["igual","n?o igual","menor","menor ou igual","maior","maior ou igual","come?a com","termina com","cont?m"]};b.jgrid.edit={addCaption:"Adicionar Registo",editCaption:"Modificar Registo",bSubmit:"Submeter",bCancel:"Cancelar",bClose:"Fechar",processData:"A processar...",msg:{required:"Campo obrigat?rio",number:"Por favor, introduza um numero",minValue:"O valor deve ser maior ou igual que",maxValue:"O valor deve ser menor ou igual a",email:"N?o ? um endere?o de email v?lido",integer:"Por favor, introduza um numero inteiro",date:"Por favor, introduza uma data v?lida."}};b.jgrid.del={caption:"Eliminar",msg:"Deseja eliminar o(s) registo(s) seleccionado(s)?",bSubmit:"Eliminar",bCancel:"Cancelar",processData:"A processar..."};b.jgrid.nav={edittext:" ",edittitle:"Modificar registo seleccionado",addtext:" ",addtitle:"Adicionar novo registo",deltext:" ",deltitle:"Eliminar registo seleccionado",searchtext:" ",searchtitle:"Procurar",refreshtext:"",refreshtitle:"Actualizar",alertcap:"Aviso",alerttext:"Por favor, seleccione um registo"};b.jgrid.col={caption:"Mostrar/Ocultar Colunas",bSubmit:"Enviar",bCancel:"Cancelar"};b.jgrid.errors={errcap:"Erro",nourl:"N?o especificou um url",norecords:"N?o existem dados para processar",model:"Tamanho do colNames <> colModel!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["Dom","Seg","Ter","Qua","Qui","Sex","Sab","Domingo","Segunda-Feira","Ter?a-Feira","Quarta-Feira","Quinta-Feira","Sexta-Feira","S?bado"],monthNames:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez","Janeiro","Fevereiro","Mar?o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],AmPm:["am","pm","AM","PM"],S:function(a){return a<11||a>13?["?","?","?","?"][Math.min((a-1)%10,3)]:"?"},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show"}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"???????",loadtext:"????????...",pgtext:"/"};b.jgrid.search={caption:"?????...",Find:"?????",Reset:"?????",odata:["?????","?? ?????","??????","?????? ??? ?????","??????","?????? ??? ?????","?????????? ?","????????????? ??","????????"]};b.jgrid.edit={addCaption:"???????? ??????",editCaption:"????????????? ??????",bSubmit:"?????????",bCancel:"??????",bClose:"???????",processData:"?????????...",msg:{required:"???? ???????? ????????????",number:"??????????, ??????? ?????????? ?????",minValue:"???????? ?????? ???? ?????? ???? ?????",maxValue:"???????? ?????? ???? ?????? ???? ?????",email:"???????????? ???????? e-mail",integer:"?????????? ??????? ????? ?????",date:"Please, enter valid date value"}};b.jgrid.del={caption:"???????",msg:"??????? ?????????? ??????(?)?",bSubmit:"???????",bCancel:"??????",processData:"?????????..."};b.jgrid.nav={edittext:" ",edittitle:"????????????? ?????????? ??????",addtext:" ",addtitle:"???????? ????? ??????",deltext:" ",deltitle:"??????? ?????????? ??????",searchtext:" ",searchtitle:"????? ??????",refreshtext:"",refreshtitle:"???????? ???????",alertcap:"????????",alerttext:"??????????, ???????? ??????"};b.jgrid.col={caption:"????????/?????? ???????",bSubmit:"?????????",bCancel:"??????"};b.jgrid.errors={errcap:"??????",nourl:"URL ?? ??????????",norecords:"??? ??????? ??? ?????????",model:"????? ????? ?? ????????????? ????? ???????? ???????!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:",",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:",",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["??","??","??","??","??","??","??","???????????","???????????","???????","?????","???????","???????","???????"],monthNames:["???","???","???","???","???","???","???","???","???","???","???","???","??????","???????","????","??????","???","????","????","??????","????????","???????","??????","???????"],AmPm:["am","pm","AM","PM"],S:function(a){return a<11||a>13?["st","nd","rd","th"][Math.min((a-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d.m.Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n.j.Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y G:i:s",MonthDay:"F d",ShortTime:"G:i",LongTime:"G:i:s",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show"}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"fila(s)",loadtext:"Cargando...",pgtext:"/"};b.jgrid.search={caption:"B?squeda...",Find:"Buscar",Reset:"Limpiar",odata:["igual","no igual","menor","menor o igual","mayor","mayor o igual","comienza con","termina con","contiene"]};b.jgrid.edit={addCaption:"Agregar registro",editCaption:"Modificar registro",bSubmit:"Enviar",bCancel:"Cancelar",bClose:"Cerrar",processData:"Procesando...",msg:{required:"Campo obligatorio",number:"Introduzca un n?mero",minValue:"El valor debe ser mayor o igual a ",maxValue:"El valor debe ser menor o igual a ",email:"no es una direcci?n de correo v?lida",integer:"Introduzca un valor entero",date:"Introduza una fecha correcta "}};b.jgrid.del={caption:"Eliminar",msg:"?Desea eliminar los registros seleccionados?",bSubmit:"Eliminar",bCancel:"Cancelar",processData:"Procesando..."};b.jgrid.nav={edittext:" ",edittitle:"Modificar fila seleccionada",addtext:" ",addtitle:"Agregar nueva fila",deltext:" ",deltitle:"Eliminar fila seleccionada",searchtext:" ",searchtitle:"Buscar informaci?n",refreshtext:"",refreshtitle:"Recargar datos",alertcap:"Aviso",alerttext:"Seleccione una fila"};b.jgrid.col={caption:"Mostrar/ocultar columnas",bSubmit:"Enviar",bCancel:"Cancelar"};b.jgrid.errors={errcap:"Error",nourl:"No se ha especificado una URL",norecords:"No hay datos para procesar",model:"Las columnas de nombres son diferentes de las columnas de modelo"};b.jgrid.formatter={integer:{thousandsSeparator:".",defaulValue:0},number:{decimalSeparator:",",thousandsSeparator:".",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:",",thousandsSeparator:".",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["Do","Lu","Ma","Mi","Ju","Vi","Sa","Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sabado"],monthNames:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic","Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],AmPm:["am","pm","AM","PM"],S:function(a){return a<11||a>13?["st","nd","rd","th"][Math.min((a-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d-m-Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show"}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"post(er)",loadtext:"Laddar...",pgtext:"/"};b.jgrid.search={caption:"S?k...",Find:"Hitta",Reset:"?terst?ll",odata:["lika","ej lika","mindre","mindre eller lika","st?rre","st?rre eller lika","b?rjar med","slutar med","inneh?ller"]};b.jgrid.edit={addCaption:"Skapa post",editCaption:"?ndra post",bSubmit:"Utf?r",bCancel:"Avbryt",bClose:"St?ng",processData:"Processar...",msg:{required:"F?lt ?r obligatoriskt",number:"V?lj korrekt nummer",minValue:"v?rdet m?ste vara st?rre ?n eller lika med",maxValue:"v?rdet m?ste vara mindre ?n eller lika med",email:"?r inte korrekt e-mail adress",integer:"Var god ange korrekt heltal",date:"Var god att ange korrekt datum"}};b.jgrid.del={caption:"Ta bort",msg:"Ta bort vald post(er)?",bSubmit:"Utf?r",bCancel:"Avbryt",processData:"Processing..."};b.jgrid.nav={edittext:" ",edittitle:"?ndra vald rad",addtext:" ",addtitle:"Skapa ny rad",deltext:" ",deltitle:"Ta bort vald rad",searchtext:" ",searchtitle:"Hitta poster",refreshtext:"",refreshtitle:"Ladda om Grid",alertcap:"Varning",alerttext:"Var god v?lj rad"};b.jgrid.col={caption:"Visa/G?m kolumner",bSubmit:"Utf?r",bCancel:"Avbryt"};b.jgrid.errors={errcap:"Fel",nourl:"Ingen URL ?r definierad",norecords:"Inga poster att processa",model:"L?ngden av colNames <> colModel!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:",",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:",",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["S?n","M?n","Tis","Ons","Tor","Fre","L?r","S?ndag","M?ndag","Tisdag","Onsdag","Torsdag","Fredag","L?rdag"],monthNames:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec","Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],AmPm:["fm","em","FM","EM"],S:function(a){return a<11||a>13?["st","nd","rd","th"][Math.min((a-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"Y-m-d",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show",addParam:""}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"post(er)",loadtext:"Laddar...",pgtext:"/"};b.jgrid.search={caption:"S?k...",Find:"Hitta",Reset:"?terst?ll",odata:["lika","ej lika","mindre","mindre eller lika","st?rre","st?rre eller lika","b?rjar med","slutar med","inneh?ller"]};b.jgrid.edit={addCaption:"Skapa post",editCaption:"?ndra post",bSubmit:"Utf?r",bCancel:"Avbryt",bClose:"St?ng",processData:"Processar...",msg:{required:"F?lt ?r obligatoriskt",number:"V?lj korrekt nummer",minValue:"v?rdet m?ste vara st?rre ?n eller lika med",maxValue:"v?rdet m?ste vara mindre ?n eller lika med",email:"?r inte korrekt e-mail adress",integer:"Var god ange korrekt heltal",date:"Var god att ange korrekt datum"}};b.jgrid.del={caption:"Ta bort",msg:"Ta bort vald post(er)?",bSubmit:"Utf?r",bCancel:"Avbryt",processData:"Processing..."};b.jgrid.nav={edittext:" ",edittitle:"?ndra vald rad",addtext:" ",addtitle:"Skapa ny rad",deltext:" ",deltitle:"Ta bort vald rad",searchtext:" ",searchtitle:"Hitta poster",refreshtext:"",refreshtitle:"Ladda om Grid",alertcap:"Varning",alerttext:"Var god v?lj rad"};b.jgrid.col={caption:"Visa/G?m kolumner",bSubmit:"Utf?r",bCancel:"Avbryt"};b.jgrid.errors={errcap:"Fel",nourl:"Ingen URL ?r definierad",norecords:"Inga poster att processa",model:"L?ngden av colNames <> colModel!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:",",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:",",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["S?n","M?n","Tis","Ons","Tor","Fre","L?r","S?ndag","M?ndag","Tisdag","Onsdag","Torsdag","Fredag","L?rdag"],monthNames:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec","Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],AmPm:["fm","em","FM","EM"],S:function(a){return a<11||a>13?["st","nd","rd","th"][Math.min((a-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"Y-m-d",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show",addParam:""}})(jQuery);(function(b){b.jgrid={};b.jgrid.defaults={recordtext:"Satir(lar)",loadtext:"Y?kleniyor...",pgtext:"/"};b.jgrid.search={caption:"Arama...",Find:"Bul",Reset:"Temizle",odata:["esittir","esit degildir","k???k","k???k veya esit","b?y?k","b?y?k veya esit","ile baslayan","ile biten","i?eren"]};b.jgrid.edit={addCaption:"Kayit Ekle",editCaption:"Kayit D?zenle",bSubmit:"G?nder",bCancel:"Iptal",bClose:"Kapat",processData:"Islem yapiliyor...",msg:{required:"Alan gerekli",number:"L?tfen bir numara giriniz",minValue:"girilen deger daha b?y?k ya da buna esit olmalidir",maxValue:"girilen deger daha k???k ya da buna esit olmalidir",email:"ge?erli bir e-posta adresi degildir",integer:"L?tfen bir tamsayi giriniz",date:"Please, enter valid date value"}};b.jgrid.del={caption:"Sil",msg:"Se?ilen kayitlar silinsin mi?",bSubmit:"Sil",bCancel:"Iptal",processData:"Islem yapiliyor..."};b.jgrid.nav={edittext:" ",edittitle:"Se?ili satiri d?zenle",addtext:" ",addtitle:"Yeni satir ekle",deltext:" ",deltitle:"Se?ili satiri sil",searchtext:" ",searchtitle:"Kayitlari bul",refreshtext:"",refreshtitle:"Tabloyu yenile",alertcap:"Uyari",alerttext:"L?tfen bir satir se?iniz"};b.jgrid.col={caption:"S?tunlari g?ster/gizle",bSubmit:"G?nder",bCancel:"Iptal"};b.jgrid.errors={errcap:"Hata",nourl:"Bir url yapilandirilmamis",norecords:"Islem yapilacak bir kayit yok",model:"Length of colNames <> colModel!"};b.jgrid.formatter={integer:{thousandsSeparator:" ",defaulValue:0},number:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,defaulValue:0},currency:{decimalSeparator:".",thousandsSeparator:" ",decimalPlaces:2,prefix:"",suffix:"",defaulValue:0},date:{dayNames:["Sun","Mon","Tue","Wed","Thr","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],AmPm:["am","pm","AM","PM"],S:function(a){return a<11||a>13?["st","nd","rd","th"][Math.min((a-1)%10,3)]:"th"},srcformat:"Y-m-d",newformat:"d/m/Y",masks:{ISO8601Long:"Y-m-d H:i:s",ISO8601Short:"Y-m-d",ShortDate:"n/j/Y",LongDate:"l, F d, Y",FullDateTime:"l, F d, Y g:i:s A",MonthDay:"F d",ShortTime:"g:i A",LongTime:"g:i:s A",SortableDateTime:"Y-m-d\\TH:i:s",UniversalSortableDateTime:"Y-m-d H:i:sO",YearMonth:"F, Y"},reformatAfterEdit:false},baseLinkUrl:"",showAction:"show"}})(jQuery);(function(b){b.fn.extend({getPostData:function(){var a=this[0];if(!a.grid){return}return a.p.postData},setPostData:function(d){var a=this[0];if(!a.grid){return}if(typeof(d)==="object"){a.p.postData=d}else{alert("Error: cannot add a non-object postData value. postData unchanged.")}},appendPostData:function(d){var a=this[0];if(!a.grid){return}if(typeof(d)==="object"){b.extend(a.p.postData,d)}else{alert("Error: cannot append a non-object postData value. postData unchanged.")}},setPostDataItem:function(a,f){var e=this[0];if(!e.grid){return}e.p.postData[a]=f},getPostDataItem:function(d){var a=this[0];if(!a.grid){return}return a.p.postData[d]},removePostDataItem:function(d){var a=this[0];if(!a.grid){return}delete a.p.postData[d]},getUserData:function(){var a=this[0];if(!a.grid){return}return a.p.userData},getUserDataItem:function(d){var a=this[0];if(!a.grid){return}return a.p.userData[d]}})})(jQuery);(function(b){b.fn.extend({setColumns:function(a){a=b.extend({top:0,left:0,width:200,height:195,modal:false,drag:true,closeicon:"ico-close.gif",beforeShowForm:null,afterShowForm:null,afterSubmitForm:null},b.jgrid.col,a||{});return this.each(function(){var o=this;if(!o.grid){return}var z=typeof a.beforeShowForm==="function"?true:false;var q=typeof a.afterShowForm==="function"?true:false;var v=typeof a.afterSubmitForm==="function"?true:false;if(!a.imgpath){a.imgpath=o.p.imgpath}var r=b("table:first",o.grid.bDiv).attr("id");var x={themodal:"colmod"+r,modalhead:"colhd"+r,modalcontent:"colcnt"+r};var y="ColTbl_"+r;if(b("#"+x.themodal).html()!=null){if(z){a.beforeShowForm(b("#"+y))}viewModal("#"+x.themodal,{modal:a.modal});if(q){a.afterShowForm(b("#"+y))}}else{var u=b("<table id='"+y+"' class='ColTable'><tbody></tbody></table>");for(i=0;i<this.p.colNames.length;i++){if(!o.p.colModel[i].hidedlg){b(u).append("<tr><td ><input type='checkbox' id='col_"+this.p.colModel[i].name+"' class='cbox' value='T' "+((this.p.colModel[i].hidden==undefined)?"checked":"")+"/><label for='col_"+this.p.colModel[i].name+"'>"+this.p.colNames[i]+"("+this.p.colModel[i].name+")</label></td></tr>")}}var s="<input id='dData' type='button' value='"+a.bSubmit+"'/>";var w="<input id='eData' type='button' value='"+a.bCancel+"'/>";b(u).append("<tr><td class='ColButton'>"+s+"&nbsp;"+w+"</td></tr>");createModal(x,u,a,o.grid.hDiv,o.grid.hDiv);if(a.drag){DnRModal("#"+x.themodal,"#"+x.modalhead+" td.modaltext")}b("#dData","#"+y).click(function(c){for(i=0;i<o.p.colModel.length;i++){if(!o.p.colModel[i].hidedlg){if(b("#col_"+o.p.colModel[i].name).attr("checked")){b(o).showCol(o.p.colModel[i].name);b("#col_"+o.p.colModel[i].name).attr("defaultChecked",true)}else{b(o).hideCol(o.p.colModel[i].name);b("#col_"+o.p.colModel[i].name).attr("defaultChecked","")}}}b("#"+x.themodal).jqmHide();if(v){a.afterSubmitForm(b("#"+y))}return false});b("#eData","#"+y).click(function(c){b("#"+x.themodal).jqmHide();return false});if(z){a.beforeShowForm(b("#"+y))}viewModal("#"+x.themodal,{modal:a.modal});if(q){a.afterShowForm(b("#"+y))}}})}})})(jQuery);(function($){$.fn.extend({addSubGrid:function(t,row,pos,rowelem){return this.each(function(){var ts=this;if(!ts.grid){return}var td,res,_id,pID,nhc,bfsc;td=document.createElement("td");$(td,t).html("<img src='"+ts.p.imgpath+"plus.gif'/>").addClass("sgcollapsed").click(function(e){if($(this).hasClass("sgcollapsed")){pID=$("table:first",ts.grid.bDiv).attr("id");res=$(this).parent();var atd=pos==1?"<td></td>":"";_id=$(res).attr("id");bfsc=true;if($.isFunction(ts.p.subGridBeforeExpand)){bfsc=ts.p.subGridBeforeExpand(pID+"_"+_id,_id)}if(bfsc===false){return false}nhc=0;$.each(ts.p.colModel,function(i,v){if(this.hidden===true){nhc++}});var subdata="<tr class='subgrid'>"+atd+"<td><img src='"+ts.p.imgpath+"line3.gif'/></td><td colspan='"+parseInt(ts.p.colNames.length-1-nhc)+"'><div id="+pID+"_"+_id+" class='tablediv'>";$(this).parent().after(subdata+"</div></td></tr>");$(".tablediv",ts).css("width",ts.grid.width-20+"px");if($.isFunction(ts.p.subGridRowExpanded)){ts.p.subGridRowExpanded(pID+"_"+_id,_id)}else{populatesubgrid(res)}$(this).html("<img src='"+ts.p.imgpath+"minus.gif'/>").removeClass("sgcollapsed").addClass("sgexpanded")}else{if($(this).hasClass("sgexpanded")){bfsc=true;if($.isFunction(ts.p.subGridRowColapsed)){res=$(this).parent();_id=$(res).attr("id");bfsc=ts.p.subGridRowColapsed(pID+"_"+_id,_id)}if(bfsc===false){return false}$(this).parent().next().remove(".subgrid");$(this).html("<img src='"+ts.p.imgpath+"plus.gif'/>").removeClass("sgexpanded").addClass("sgcollapsed")}}return false});row.appendChild(td);var populatesubgrid=function(rd){var res,sid,dp;sid=$(rd).attr("id");dp={id:sid,nd_:(new Date().getTime())};if(!ts.p.subGridModel[0]){return false}if(ts.p.subGridModel[0].params){for(var j=0;j<ts.p.subGridModel[0].params.length;j++){for(var i=0;i<ts.p.colModel.length;i++){if(ts.p.colModel[i].name==ts.p.subGridModel[0].params[j]){dp[ts.p.colModel[i].name]=$("td:eq("+i+")",rd).text().replace(/\&nbsp\;/ig,"")}}}}if(!ts.grid.hDiv.loading){ts.grid.hDiv.loading=true;$("#load_"+ts.p.id).fadeIn("fast");if(!ts.p.subgridtype){ts.p.subgridtype=ts.p.datatype}if($.isFunction(ts.p.subgridtype)){ts.p.subgridtype(dp)}switch(ts.p.subgridtype){case"xml":$.ajax({type:ts.p.mtype,url:ts.p.subGridUrl,dataType:"xml",data:dp,complete:function(sxml){subGridXml(sxml.responseXML,sid);sxml=null}});break;case"json":$.ajax({type:ts.p.mtype,url:ts.p.subGridUrl,dataType:"json",data:dp,complete:function(JSON){subGridJson(eval("("+JSON.responseText+")"),sid);JSON=null}});break}}return false};var subGridCell=function(trdiv,cell,pos){var tddiv=document.createElement("div");tddiv.className="celldiv";$(tddiv).html(cell).css("text-align",ts.p.subGridModel[0].align[pos]).width(ts.p.subGridModel[0].width[pos]||80);trdiv.appendChild(tddiv)};var subGridXml=function(sjxml,sbid){var trdiv,tddiv,i,cur,sgmap,dummy=document.createElement("span");trdiv=document.createElement("div");trdiv.className="rowdiv";for(i=0;i<ts.p.subGridModel[0].name.length;i++){tddiv=document.createElement("div");tddiv.className="celldivth";$(tddiv).html(ts.p.subGridModel[0].name[i]).width(ts.p.subGridModel[0].width[i]);trdiv.appendChild(tddiv)}dummy.appendChild(trdiv);if(sjxml){sgmap=ts.p.xmlReader.subgrid;$(sgmap.root+">"+sgmap.row,sjxml).each(function(){trdiv=document.createElement("div");trdiv.className="rowdiv";if(sgmap.repeatitems===true){$(sgmap.cell,this).each(function(i){subGridCell(trdiv,this.textContent||this.text||"&nbsp;",i)})}else{var f=ts.p.subGridModel[0].mapping;if(f){for(i=0;i<f.length;i++){subGridCell(trdiv,$(f[i],this).text()||"&nbsp;",i)}}}dummy.appendChild(trdiv)})}var pID=$("table:first",ts.grid.bDiv).attr("id")+"_";$("#"+pID+sbid).append($(dummy).html());ts.grid.hDiv.loading=false;$("#load_"+ts.p.id).fadeOut("fast");return false};var subGridJson=function(sjxml,sbid){var trdiv,tddiv,result,i,cur,sgmap,dummy=document.createElement("span");trdiv=document.createElement("div");trdiv.className="rowdiv";for(i=0;i<ts.p.subGridModel[0].name.length;i++){tddiv=document.createElement("div");tddiv.className="celldivth";$(tddiv).html(ts.p.subGridModel[0].name[i]).width(ts.p.subGridModel[0].width[i]);trdiv.appendChild(tddiv)}dummy.appendChild(trdiv);if(sjxml){sgmap=ts.p.jsonReader.subgrid;result=sjxml[sgmap.root];if(typeof result!=="undefined"){for(i=0;i<result.length;i++){cur=result[i];trdiv=document.createElement("div");trdiv.className="rowdiv";if(sgmap.repeatitems===true){if(sgmap.cell){cur=cur[sgmap.cell]}for(var j=0;j<cur.length;j++){subGridCell(trdiv,cur[j]||"&nbsp;",j)}}else{var f=ts.p.subGridModel[0].mapping;if(f.length){for(var j=0;j<f.length;j++){subGridCell(trdiv,cur[f[j]]||"&nbsp;",j)}}}dummy.appendChild(trdiv)}}}var pID=$("table:first",ts.grid.bDiv).attr("id")+"_";$("#"+pID+sbid).append($(dummy).html());ts.grid.hDiv.loading=false;$("#load_"+ts.p.id).fadeOut("fast");return false};ts.subGridXml=function(xml,sid){subGridXml(xml,sid)};ts.subGridJson=function(json,sid){subGridJson(json,sid)}})},expandSubGridRow:function(rowid){return this.each(function(){var $t=this;if(!$t.grid&&!rowid){return}if($t.p.subGrid===true){var rc=$(this).getInd($t.rows,rowid,true);if(rc){var sgc=$("td.sgcollapsed",rc)[0];if(sgc){$(sgc).trigger("click")}}}})},collapseSubGridRow:function(rowid){return this.each(function(){var $t=this;if(!$t.grid&&!rowid){return}if($t.p.subGrid===true){var rc=$(this).getInd($t.rows,rowid,true);if(rc){var sgc=$("td.sgexpanded",rc)[0];if(sgc){$(sgc).trigger("click")}}}})},toggleSubGridRow:function(rowid){return this.each(function(){var $t=this;if(!$t.grid&&!rowid){return}if($t.p.subGrid===true){var rc=$(this).getInd($t.rows,rowid,true);if(rc){var sgc=$("td.sgcollapsed",rc)[0];if(sgc){$(sgc).trigger("click")}else{sgc=$("td.sgexpanded",rc)[0];if(sgc){$(sgc).trigger("click")}}}}})}})})(jQuery);function tableToGrid(b){$(b).each(function(){if(this.grid){return}$(this).width("99%");var x=$(this).width();var v=$("input[type=checkbox]:first",$(this));var u=$("input[type=radio]:first",$(this));var z=v.length>0;var y=!z&&u.length>0;var B=z||y;var C=v.attr("name")||u.attr("name");var q=[];var s=[];$("th",$(this)).each(function(){if(q.length==0&&B){q.push({name:"__selection__",index:"__selection__",width:0,hidden:true});s.push("__selection__")}else{q.push({name:$(this).html(),index:$(this).html(),width:$(this).width()||150});s.push($(this).html())}});var w=[];var a=[];var A=[];$("tbody > tr",$(this)).each(function(){var c={};var d=0;w.push(c);$("td",$(this)).each(function(){if(d==0&&B){var e=$("input",$(this));var f=e.attr("value");a.push(f||w.length);if(e.attr("checked")){A.push(f)}c[q[d].name]=e.attr("value")}else{c[q[d].name]=$(this).html()}d++})});$(this).empty();$(this).addClass("scroll");$(this).jqGrid({datatype:"local",width:x,colNames:s,colModel:q,multiselect:z});for(var D=0;D<w.length;D++){var r=null;if(a.length>0){r=a[D];if(r&&r.replace){r=encodeURIComponent(r).replace(/[.\-%]/g,"_")}}if(r==null){r=D+1}$(this).addRowData(r,w[D])}for(var D=0;D<A.length;D++){$(this).setSelection(A[D])}})}(function(b){b.fn.extend({setTreeNode:function(d,a){return this.each(function(){var x=this;if(!x.grid||!x.p.treeGrid){return}var c=0,F=0;if(!x.p.expColInd){for(var E in x.p.colModel){if(x.p.colModel[E].name==x.p.ExpandColumn){c=F;x.p.expColInd=c;break}F++}if(!x.p.expColInd){x.p.expColInd=c}}else{c=x.p.expColInd}var y=x.p.treeReader.expanded_field;var B=x.p.treeReader.leaf_field;var C=x.p.treeReader.level_field;a.level=d[C];if(x.p.treeGridModel=="nested"){a.lft=d[x.p.treeReader.left_field];a.rgt=d[x.p.treeReader.right_field];if(!d[B]){d[B]=(parseInt(a.rgt,10)===parseInt(a.lft,10)+1)?"true":"false"}}else{a.parent_id=d[x.p.treeReader.parent_id_field]}var G=(d[y]&&d[y]=="true")?true:false;var w=parseInt(a.level,10);var D,H;if(x.p.tree_root_level===0){D=w+1;H=w}else{D=w;H=w-1}var z=document.createElement("div");b(z).addClass("tree-wrap").width(D*18);var A=document.createElement("div");b(A).css("left",H*18);z.appendChild(A);if(d[B]=="true"){b(A).addClass("tree-leaf");a.isLeaf=true}else{if(d[y]=="true"){b(A).addClass("tree-minus treeclick");a.expanded=true}else{b(A).addClass("tree-plus treeclick");a.expanded=false}}if(parseInt(d[C],10)!==parseInt(x.p.tree_root_level,10)){if(!b(x).isVisibleNode(a)){b(a).css("display","none")}}var v=b("td:eq("+c+")",a).html();var u=b("td:eq("+c+")",a).html("<span>"+v+"</span>").prepend(z);b(".treeclick",u).click(function(f){var g=f.target||f.srcElement;var e=b(g,x.rows).parents("tr:first")[0].rowIndex;if(!x.rows[e].isLeaf){if(x.rows[e].expanded){b(x).collapseRow(x.rows[e]);b(x).collapseNode(x.rows[e])}else{b(x).expandRow(x.rows[e]);b(x).expandNode(x.rows[e])}}return false});if(x.p.ExpandColClick===true){b("span",u).css("cursor","pointer").click(function(f){var g=f.target||f.srcElement;var e=b(g,x.rows).parents("tr:first")[0].rowIndex;if(!x.rows[e].isLeaf){if(x.rows[e].expanded){b(x).collapseRow(x.rows[e]);b(x).collapseNode(x.rows[e])}else{b(x).expandRow(x.rows[e]);b(x).expandNode(x.rows[e])}}b(x).setSelection(x.rows[e].id);return false})}})},setTreeGrid:function(){return this.each(function(){var a=this;if(!a.p.treeGrid){return}b.extend(a.p,{treedatatype:null});if(a.p.treeGridModel=="nested"){a.p.treeReader=b.extend({level_field:"level",left_field:"lft",right_field:"rgt",leaf_field:"isLeaf",expanded_field:"expanded"},a.p.treeReader)}else{if(a.p.treeGridModel=="adjacency"){a.p.treeReader=b.extend({level_field:"level",parent_id_field:"parent",leaf_field:"isLeaf",expanded_field:"expanded"},a.p.treeReader)}}})},expandRow:function(a){this.each(function(){var f=this;if(!f.grid||!f.p.treeGrid){return}var e=b(f).getNodeChildren(a);b(e).each(function(c){b(this).css("display","");if(this.expanded){b(f).expandRow(this)}})})},collapseRow:function(a){this.each(function(){var f=this;if(!f.grid||!f.p.treeGrid){return}var e=b(f).getNodeChildren(a);b(e).each(function(c){b(this).css("display","none");b(f).collapseRow(this)})})},getRootNodes:function(){var a=[];this.each(function(){var f=this;if(!f.grid||!f.p.treeGrid){return}switch(f.p.treeGridModel){case"nested":var e=f.p.treeReader.level_field;b(f.rows).each(function(c){if(parseInt(this[e],10)===parseInt(f.p.tree_root_level,10)){a.push(this)}});break;case"adjacency":b(f.rows).each(function(c){if(this.parent_id.toLowerCase()=="null"){a.push(this)}});break}});return a},getNodeDepth:function(d){var a=null;this.each(function(){var c=this;if(!this.grid||!this.p.treeGrid){return}switch(c.p.treeGridModel){case"nested":a=parseInt(d.level,10)-parseInt(this.p.tree_root_level,10);break;case"adjacency":a=b(c).getNodeAncestors(d).length;break}});return a},getNodeParent:function(d){var a=null;this.each(function(){var c=this;if(!c.grid||!c.p.treeGrid){return}switch(c.p.treeGridModel){case"nested":var k=parseInt(d.lft,10),h=parseInt(d.rgt,10),j=parseInt(d.level,10);b(this.rows).each(function(){if(parseInt(this.level,10)===j-1&&parseInt(this.lft)<k&&parseInt(this.rgt)>h){a=this;return false}});break;case"adjacency":b(this.rows).each(function(){if(this.id===d.parent_id){a=this;return false}});break}});return a},getNodeChildren:function(d){var a=[];this.each(function(){var c=this;if(!c.grid||!c.p.treeGrid){return}switch(c.p.treeGridModel){case"nested":var k=parseInt(d.lft,10),j=parseInt(d.rgt,10),m=parseInt(d.level,10);var l=d.rowIndex;b(this.rows).slice(1).each(function(e){if(parseInt(this.level,10)===m+1&&parseInt(this.lft,10)>k&&parseInt(this.rgt,10)<j){a.push(this)}});break;case"adjacency":b(this.rows).slice(1).each(function(e){if(this.parent_id==d.id){a.push(this)}});break}});return a},getFullTreeNode:function(d){var a=[];this.each(function(){var c=this;if(!c.grid||!c.p.treeGrid){return}switch(c.p.treeGridModel){case"nested":var k=parseInt(d.lft,10),j=parseInt(d.rgt,10),m=parseInt(d.level,10);var l=d.rowIndex;b(this.rows).slice(1).each(function(e){if(parseInt(this.level,10)>=m&&parseInt(this.lft,10)>=k&&parseInt(this.lft,10)<=j){a.push(this)}});break;case"adjacency":break}});return a},getNodeAncestors:function(d){var a=[];this.each(function(){if(!this.grid||!this.p.treeGrid){return}var c=b(this).getNodeParent(d);while(c){a.push(c);c=b(this).getNodeParent(c)}});return a},isVisibleNode:function(d){var a=true;this.each(function(){var c=this;if(!c.grid||!c.p.treeGrid){return}var f=b(c).getNodeAncestors(d);b(f).each(function(){a=a&&this.expanded;if(!a){return false}})});return a},isNodeLoaded:function(d){var a;this.each(function(){var c=this;if(!c.grid||!c.p.treeGrid){return}if(d.loaded!==undefined){a=d.loaded}else{if(d.isLeaf||b(c).getNodeChildren(d).length>0){a=true}else{a=false}}});return a},expandNode:function(a){return this.each(function(){if(!this.grid||!this.p.treeGrid){return}if(!a.expanded){if(b(this).isNodeLoaded(a)){a.expanded=true;b("div.treeclick",a).removeClass("tree-plus").addClass("tree-minus")}else{a.expanded=true;b("div.treeclick",a).removeClass("tree-plus").addClass("tree-minus");this.p.treeANode=a.rowIndex;this.p.datatype=this.p.treedatatype;if(this.p.treeGridModel=="nested"){b(this).setGridParam({postData:{nodeid:a.id,n_left:a.lft,n_right:a.rgt,n_level:a.level}})}else{b(this).setGridParam({postData:{nodeid:a.id,parentid:a.parent_id,n_level:a.level}})}b(this).trigger("reloadGrid");if(this.p.treeGridModel=="nested"){b(this).setGridParam({postData:{nodeid:"",n_left:"",n_right:"",n_level:""}})}else{b(this).setGridParam({postData:{nodeid:"",parentid:"",n_level:""}})}}}})},collapseNode:function(a){return this.each(function(){if(!this.grid||!this.p.treeGrid){return}if(a.expanded){a.expanded=false;b("div.treeclick",a).removeClass("tree-minus").addClass("tree-plus")}})},SortTree:function(a){return this.each(function(){if(!this.grid||!this.p.treeGrid){return}var k,o,m,l=[],q=b(this).getRootNodes();q.sort(function(d,c){if(d.sortKey<c.sortKey){return -a}if(d.sortKey>c.sortKey){return a}return 0});for(k=0,o=q.length;k<o;k++){m=q[k];l.push(m);b(this).collectChildrenSortTree(l,m,a)}var j=this;b.each(l,function(d,c){b("tbody",j.grid.bDiv).append(c);c.sortKey=null})})},collectChildrenSortTree:function(f,e,a){return this.each(function(){if(!this.grid||!this.p.treeGrid){return}var j,c,k,d=b(this).getNodeChildren(e);d.sort(function(h,g){if(h.sortKey<g.sortKey){return -a}if(h.sortKey>g.sortKey){return a}return 0});for(j=0,c=d.length;j<c;j++){k=d[j];f.push(k);b(this).collectChildrenSortTree(f,k,a)}})},setTreeRow:function(a,f){var h,g=false;this.each(function(){var c=this;if(!c.grid||!c.p.treeGrid){return}g=b(c).setRowData(a,f)});return g},delTreeNode:function(a){return this.each(function(){var j=this;if(!j.grid||!j.p.treeGrid){return}var k=b(j).getInd(j.rows,a,true);if(k){var h=b(j).getNodeChildren(k);if(h.length>0){for(var g=0;g<h.length;g++){b(j).delRowData(h[g].id)}}b(j).delRowData(k.id)}})}})})(jQuery);
/*!!!!!!!!!!!!!!!!
* Autocomplete - jQuery plugin 1.1pre
*
* Copyright (c) 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, J�rn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
*   http://www.opensource.org/licenses/mit-license.php
*   http://www.gnu.org/licenses/gpl.html
*
* Revision: $Id: jquery.autocomplete.js 5785 2008-07-12 10:37:33Z joern.zaefferer $
*
*/
(function(a){a.fn.extend({autocomplete:function(d,b){var c=typeof d=="string";b=a.extend({},a.Autocompleter.defaults,{url:c?d:null,data:c?null:d,delay:c?a.Autocompleter.defaults.delay:10,max:b&&!b.scroll?10:150},b);b.highlight=b.highlight||function(e){return e};b.formatMatch=b.formatMatch||b.formatItem;return this.each(function(){new a.Autocompleter(this,b)})},result:function(b){return this.bind("result",b)},search:function(b){return this.trigger("search",[b])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(b){return this.trigger("setOptions",[b])},unautocomplete:function(){return this.trigger("unautocomplete")},getValue:function(){return"testing";return this.trigger("getValue")}});a.Autocompleter=function(w,f){var l={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var k=a(w).attr("autocomplete","off").addClass(f.inputClass);var m;var z;var u="";var s=a.Autocompleter.Cache(f);var b=0;var e;var q=false;var d="";var g={mouseDownOnSelect:false};var E=a.Autocompleter.Select(f,w,A,g);var v;a.browser.opera&&a(w.form).bind("submit.autocomplete",function(){if(v){v=false;return false}});k.bind("focus",function(F){if(F.target.value!=m){F.target.value=""}});k.bind((a.browser.opera?"keypress":"keydown")+".autocomplete",function(F){e=F.keyCode;switch(F.keyCode){case l.UP:F.preventDefault();if(E.visible()){E.prev()}else{y(0,true)}break;case l.DOWN:F.preventDefault();if(E.visible()){E.next()}else{y(0,true)}break;case l.PAGEUP:F.preventDefault();if(E.visible()){E.pageUp()}else{y(0,true)}break;case l.PAGEDOWN:F.preventDefault();if(E.visible()){E.pageDown()}else{y(0,true)}break;case f.multiple&&a.trim(f.multipleSeparator)==","&&l.COMMA:case l.TAB:case l.RETURN:if(A()){F.preventDefault();v=true;return false}break;case l.ESC:E.hide();break;default:clearTimeout(z);z=setTimeout(y,f.delay);break}}).focus(function(){b++}).blur(function(){b=0;if(!g.mouseDownOnSelect){x();if(u!=""&&w.value==""){u="";if(d!=""){k.trigger("result",["",""]);d=""}}}}).click(function(){if(b++>1&&!E.visible()){y(0,true)}}).bind("search",function(){setTimeout(function(){w.focus();q=true;var F=(arguments.length>1)?arguments[1]:null;function G(I,K){var J;if(K&&K.length){for(var H=0;H<K.length;H++){if(K[H].result.toLowerCase()==I.toLowerCase()){J=K[H];break}}}if(typeof F=="function"){F(J)}else{k.trigger("result",J&&[J.data,J.value.Text])}}a.each(C(k.val()),function(H,I){D(I,r,G)})},150)}).bind("flushCache",function(){s.flush()}).bind("setOptions",function(){a.extend(f,arguments[1]);if("data" in arguments[1]){s.populate()}}).bind("unautocomplete",function(){E.unbind();k.unbind();a(w.form).unbind(".autocomplete")}).bind("getValue",function(){return d.toString()});function A(){var F=E.selected();if(!F||!F.result){return false}var G=F.result.Text;u=G;if(f.multiple){var H=C(k.val());if(H.length>1){G=H.slice(0,H.length-1).join(f.multipleSeparator)+f.multipleSeparator+G}G+=f.multipleSeparator}k.val(G);h();m=F.value.Text;d=F.data;k.dataVal=d;k.trigger("result",[F.data,F.value.Text]);return true}function y(G,F){if(e==l.DEL){E.hide();return}var I=k.val();var H=e==0;if(!H){if(!F&&I==u){return}}u=I;I=j(I);if(I.length>=f.minChars||H){k.addClass(f.loadingClass);if(!f.matchCase){I=I.toLowerCase()}D(I,r,h)}else{B();E.hide()}}function C(H){if(!H){return[""]}var G=H.split(f.multipleSeparator);var F=[];a.each(G,function(I,J){if(a.trim(J)){F[I]=a.trim(J)}});return F}function j(G){if(!f.multiple){return G}var F=C(G);return F[F.length-1]}function o(F,G){if(f.autoFill&&(j(k.val()).toLowerCase()==F.toLowerCase())&&e!=l.BACKSPACE){k.val(k.val()+G.substring(j(u).length));a.Autocompleter.Selection(w,u.length,u.length+G.length)}}function x(){clearTimeout(z);z=setTimeout(h,200)}function h(){var F=E.visible();E.hide();clearTimeout(z);B();if(f.mustMatch){k.search(function(H){if(!H){if(f.multiple){var G=C(k.val()).slice(0,-1);k.val(G.join(f.multipleSeparator)+(G.length?f.multipleSeparator:""))}else{k.val("")}}})}if(F){}}function r(F,H){if(!(H&&H.length)){var G=[];G[0]={value:{Text:"No Results Found"},data:""};H=G}B();E.display(H,F);o(F,H[0].value.Text);E.show()}if(f.LoadOnStartup){D("",null,null)}function D(G,H,F){if(!f.matchCase){G=G.toLowerCase()}var J=s.load(G);if(J&&J.length){H(G,J)}else{if((typeof f.url=="string")&&(f.url.length>0)){var I={timestamp:+new Date()};a.each(f.extraParams,function(L,K){I[L]=typeof K=="function"?K():K});a.ajax({type:f.type,mode:"abort",port:"autocomplete"+w.name,dataType:f.dataType,contentType:"application/json",url:f.url+"searchTerm="+j(G),data:"'"+a.extend({q:j(G),limit:f.max},I)+"'",success:function(M){var K="";if(M){K=JSON.parse(M)}if(K){var L=f.parse&&f.parse(M)||c(K);s.add(G,L);if(G==""){f.data=K}if(H){H(G,L)}}}})}else{E.emptyList();F(G)}}}function c(F){var J=F;var H=[];var G=J.values;for(var I=0;I<G.length;I++){var K=G[I];if(K){H[H.length]={data:K.Value,value:K,result:f.formatResult&&f.formatResult(K.Value,K)||K}}}return H}function B(){k.removeClass(f.loadingClass)}};a.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(b){return b},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(c,b){return c.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+b.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:true,scrollHeight:180,columnNames:["Column1","Column2"],columnDataNames:["Data1","Data2"],BGISupport:true,LoadOnStartup:true};a.Autocompleter.Cache=function(f){var d={};var e=0;function b(j,l){if(!f.matchCase){j=j.toLowerCase()}var k=j.indexOf(l);if(f.matchContains=="word"){k=j.toLowerCase().search("\\b"+l.toLowerCase())}if(k==-1){return false}return k==0||f.matchContains}function c(k,j){if(e>f.cacheLength){g()}if(!d[k]){e++}d[k]=j}function h(){if(!f.data){return false}var q={},j=0;if(!f.url){f.cacheLength=1}q[""]=[];for(var o=0,m=f.data.length;o<m;o++){var k=f.data[o];k=(typeof k=="string")?[k]:k;var l=f.formatMatch(k,o+1,f.data.length);if(l===false){continue}var s=l.charAt(0).toLowerCase();if(!q[s]){q[s]=[]}var r={value:l,data:k,result:f.formatResult&&f.formatResult(k)||l};q[s].push(r);if(j++<f.max){q[""].push(r)}}a.each(q,function(u,v){f.cacheLength++;c(u,v)})}setTimeout(h,25);function g(){d={};e=0}return{flush:g,add:c,populate:h,load:function(o){if(!f.cacheLength||!e){return null}if(f.data&&f.matchContains){var r=[];for(var u in d){if(u.length>0){var j=d[u];a.each(j,function(k,q){if(b(q.value,o)){r.push(q)}})}}return r}else{if(d[o]){return d[o]}else{if(f.matchSubset){for(var v=o.length-1;v>=f.minChars;v--){var j=d[o.substr(0,v)];if(j){var r=[];a.each(j,function(k,q){if(b(q.value,o)){r[r.length]=q}});return r}}}}}if(f.data){var l=o.toLowerCase();var s=[];var x=0;for(var w=0;w<f.data.values.length;w++){var m=f.data.values[w];if(m.Text.toLowerCase().indexOf(l)>=0){s[x++]={data:m.Value,value:m,result:f.formatResult&&f.formatResult(m.Value,m)||m}}}return s}return null}}};a.Autocompleter.Select=function(f,s,y,g){var b={ACTIVE:"ac_over"};var o,r=-1,l,v="",w=true,c,h,e;function k(){if(!w){return}c=a("<div/>").hide().addClass(f.resultsClass).css("position","absolute").css("overflow","auto").appendTo(document.body);h=a("<table/>").appendTo(c).mouseover(function(z){}).mousedown(function(){g.mouseDownOnSelect=true}).mouseup(function(){g.mouseDownOnSelect=false}).click(function(z){a(m(z)).addClass(b.ACTIVE);y();s.focus();return false});if(f.width>0){c.css("width",f.width)}w=false}function m(z){var A=z.target;while(A&&A.tagName!="tr"){A=A.parentNode}if(!A){return[]}return A}function d(A){o.slice(r,r+1).removeClass(b.ACTIVE);q(A);var B=o.slice(r,r+1).addClass(b.ACTIVE);if(f.scroll){var z=0;o.slice(0,r).each(function(){z+=this.offsetHeight});if((z+B[0].offsetHeight-h.scrollTop())>h[0].clientHeight){h.scrollTop(z+B[0].offsetHeight-h.innerHeight())}else{if(z<h.scrollTop()){h.scrollTop(z)}}}}function q(z){r+=z;if(r<0){r=o.size()-1}else{if(r>=o.size()){r=0}}}function j(z){return f.max&&f.max<z?f.max:z}function u(){k();h.empty();a("<tr/>").html("<td>No Results Found.</td>").addClass("ac_header").appendTo(h)}function x(){h.empty();var D=j(l.length);var C="";for(var E=0;E<f.columnNames.length;E++){C+="<th  >"+f.columnNames[E]+"</th>"}a("<tr/>").html(C).addClass("ac_header").appendTo(h);for(var H=0;H<D;H++){if(!l[H]){continue}var A;A="";for(var F=0;F<f.columnDataNames.length;F++){var I=l[H].value[f.columnDataNames[F]];A+="<td >"+(I?I:"")+"</td>"}var z=f.formatItem(A,H+1,D,l[H].data,v);if(z===false){continue}var B=a("<tr/>").html(f.highlight(z,v)).addClass(H%2==0?"ac_even":"ac_odd").mouseout(function(J){a(J.target).parent().removeClass(b.ACTIVE)}).mouseover(function(J){o.slice(1,2).removeClass(b.ACTIVE);a(J.target).parent().addClass(b.ACTIVE);e=J.target}).mousedown(function(){g.mouseDownOnSelect=true}).mouseup(function(){g.mouseDownOnSelect=false}).click(function(){a(m(event)).addClass(b.ACTIVE);y()}).appendTo(h)[0];a.data(B,"ac_data",l[H])}o=h.find("tr");if(f.selectFirst){o.slice(1,2).addClass(b.ACTIVE);r=1}if(a.fn.bgiframe){try{if(f.BGISupport){c.bgiframe();c.css("overflow-x","hidden")}}catch(G){}}}return{showNoRes:function(){u()},display:function(A,z){k();l=A;v=z;x()},next:function(){d(1)},prev:function(){d(-1)},pageUp:function(){if(r!=0&&r-8<0){d(-r)}else{d(-8)}},pageDown:function(){if(r!=o.size()-1&&r+8>o.size()){d(o.size()-1-r)}else{d(8)}},hide:function(){c&&c.hide();o&&o.removeClass(b.ACTIVE);r=-1},visible:function(){return c&&c.is(":visible")},current:function(){return this.visible()&&(o.filter("."+b.ACTIVE)[0]||f.selectFirst&&o[0])},show:function(){var z=a(s).offset();c.css({width:typeof f.width=="string"||f.width>0?f.width:a(s).width(),top:z.top+s.offsetHeight,left:z.left}).show();if(f.scroll){h.scrollTop(0);if(a.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var B=0;o.each(function(){B+=this.offsetHeight});var A=B>f.scrollHeight;if(A){c.css("overflow","auto")}else{c.css("overflow","hidden")}if(!A){}}}},selected:function(){var z=o&&o.filter("."+b.ACTIVE).removeClass(b.ACTIVE);return z&&z.length&&a.data(z[0],"ac_data")},emptyList:function(){h&&h.empty()},unbind:function(){c&&c.remove()}}};a.Autocompleter.Selection=function(e,c,d){if(e.createTextRange){var b=e.createTextRange();b.collapse(true);b.moveStart("character",c);b.moveEnd("character",d);b.select()}else{if(e.setSelectionRange){e.setSelectionRange(c,d)}else{if(e.selectionStart){e.selectionStart=c;e.selectionEnd=d}}}e.focus()}})(jQuery);
/*!!!!!!!!!!!!!!!! 
*Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* $LastChangedDate: 2007-07-21 18:44:59 -0500 (Sat, 21 Jul 2007) $
* $Rev: 2446 $
*
* Version 2.1.1
*/
(function(a){a.fn.bgIframe=a.fn.bgiframe=function(b){if(a.browser.msie&&/6.0/.test(navigator.userAgent)){b=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},b||{});var c=function(e){return e&&e.constructor==Number?e+"px":e},d='<iframe class="bgiframe" frameborder="0" tabindex="-1" src="'+b.src+'"style="display:block;overflow: hidden;position:absolute;z-index:-1;'+(b.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(b.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":c(b.top))+";left:"+(b.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":c(b.left))+";width:"+(b.width=="auto"?"expression(this.parentNode.offsetWidth +'px')":c(b.width))+";height:"+(b.height=="auto"?"expression(this.parentNode.Height +'px')":c(b.height))+';"/>';return this.each(function(){if(a("> iframe.bgiframe",this).length==0){this.insertBefore(document.createElement(d),this.firstChild)}})}return this}})(jQuery);(function(a){a.fn.observeWithTimeout=function(b){var c={event:null,subscriber:null,timeout:1000};if(b){a.extend(c,b)}var d=null;var e={};_setData=function(g,f){e[g]=f};this.setData=_setData;this.each(function(){a(this).bind("setCustomData",function(f,h,g){_setData(h,g)});a(this).bind(c.event,function(g,j,f){var h=g.target.id;e[h]=j;if(d!=null){window.clearTimeout(d)}d=window.setTimeout(function(){if(f){f(e)}else{c.subscriber(e)}},c.timeout)})});return this}})(jQuery);
/*!!!!!!!!!!!!!!!!
* jQuery validation plug-in 1.5.5
*
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/
* http://docs.jquery.com/Plugins/Validation
*
* Copyright (c) 2006 - 2008 J�rn Zaefferer
*
* $Id: jquery.validate.js 6403 2009-06-17 14:27:16Z joern.zaefferer $
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
* 
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
* 
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
(function(a){a.extend(a.fn,{validate:function(c){if(!this.length){c&&c.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return}var b=a.data(this[0],"validator");if(b){return b}b=new a.validator(c,this[0]);a.data(this[0],"validator",b);if(b.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){b.cancelSubmit=true});if(b.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){b.submitButton=this})}this.submit(function(d){if(b.settings.debug){d.preventDefault()}function e(){if(b.settings.submitHandler){if(b.submitButton){var f=a("<input type='hidden'/>").attr("name",b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm)}b.settings.submitHandler.call(b,b.currentForm);if(b.submitButton){f.remove()}return false}return true}if(b.cancelSubmit){b.cancelSubmit=false;return e()}if(b.form()){if(b.pendingRequest){b.formSubmitted=true;return false}return e()}else{b.focusInvalid();return false}})}return b},valid:function(){if(a(this[0]).is("form")){return this.validate().form()}else{var c=true;var b=a(this[0].form).validate();this.each(function(){c&=b.element(this)});return c}},removeAttrs:function(b){var c={},d=this;a.each(b.split(/\s/),function(f,e){c[e]=d.attr(e);d.removeAttr(e)});return c},rules:function(g,j){var d=this[0];if(g){var e=a.data(d.form,"validator").settings;var c=e.rules;var h=a.validator.staticRules(d);switch(g){case"add":a.extend(h,a.validator.normalizeRule(j));c[d.name]=h;if(j.messages){e.messages[d.name]=a.extend(e.messages[d.name],j.messages)}break;case"remove":if(!j){delete c[d.name];return h}var k={};a.each(j.split(/\s/),function(m,l){k[l]=h[l];delete h[l]});return k}}var b=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(d),a.validator.classRules(d),a.validator.attributeRules(d),a.validator.staticRules(d)),d);if(b.required){var f=b.required;delete b.required;b=a.extend({required:f},b)}return b}});a.extend(a.expr[":"],{blank:function(b){return !a.trim(b.value)},filled:function(b){return !!a.trim(b.value)},unchecked:function(b){return !b.checked}});a.validator=function(c,b){this.settings=a.extend({},a.validator.defaults,c);this.currentForm=b;this.init()};a.validator.format=function(c,b){if(arguments.length==1){return function(){var d=a.makeArray(arguments);d.unshift(c);return a.validator.format.apply(this,d)}}if(arguments.length>2&&b.constructor!=Array){b=a.makeArray(arguments).slice(1)}if(b.constructor!=Array){b=[b]}a.each(b,function(d,e){c=c.replace(new RegExp("\\{"+d+"\\}","g"),e)});return c};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(b){this.lastActive=b;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,b,this.settings.errorClass,this.settings.validClass);this.errorsFor(b).hide()}},onfocusout:function(b){if(!this.checkable(b)&&(b.name in this.submitted||!this.optional(b))){this.element(b)}},onkeyup:function(b){if(b.name in this.submitted||b==this.lastElement){this.element(b)}},onclick:function(b){if(b.name in this.submitted){this.element(b)}},highlight:function(b,d,c){a(b).addClass(d).removeClass(c)},unhighlight:function(b,d,c){a(b).removeClass(d).addClass(c)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",dateDE:"Bitte geben Sie ein g�ltiges Datum ein.",number:"Please enter a valid number.",numberDE:"Bitte geben Sie eine Nummer ein.",digits:"Please enter only digits",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=(this.groups={});a.each(this.settings.groups,function(f,e){a.each(e.split(/\s/),function(h,g){b[g]=f})});var c=this.settings.rules;a.each(c,function(f,e){c[f]=a.validator.normalizeRule(e)});function d(f){var e=a.data(this[0].form,"validator");e.settings["on"+f.type]&&e.settings["on"+f.type].call(e,this[0])}a(this.currentForm).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",d).delegate("click",":radio, :checkbox",d);if(this.settings.invalidHandler){a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();a.extend(this.submitted,this.errorMap);this.invalid=a.extend({},this.errorMap);if(!this.valid()){a(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var b=0,c=(this.currentElements=this.elements());c[b];b++){this.check(c[b])}return this.valid()},element:function(c){c=this.clean(c);this.lastElement=c;this.prepareElement(c);this.currentElements=a(c);var b=this.check(c);if(b){delete this.invalid[c.name]}else{this.invalid[c.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return b},showErrors:function(c){if(c){a.extend(this.errorMap,c);this.errorList=[];for(var b in c){this.errorList.push({message:c[b],element:this.findByName(b)[0]})}this.successList=a.grep(this.successList,function(d){return !(d.name in c)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){if(a.fn.resetForm){a(this.currentForm).resetForm()}this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(d){var b=0;for(var c in d){b++}return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus()}catch(b){}}},findLastActive:function(){var b=this.lastActive;return b&&a.grep(this.errorList,function(c){return c.element.name==b.name}).length==1&&b},elements:function(){var b=this,c={};return a([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in c||!b.objectLength(a(this).rules())){return false}c[this.name]=true;return true})},clean:function(b){return a(b)[0]},errors:function(){return a(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.formSubmitted=false;this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(b){this.reset();this.toHide=this.errorsFor(b)},check:function(c){c=this.clean(c);if(this.checkable(c)){c=this.findByName(c.name)[0]}var g=a(c).rules();var f=false;for(method in g){var b={method:method,parameters:g[method]};try{var h=a.validator.methods[method].call(this,c.value.replace(/\r/g,""),c,b.parameters);if(h=="dependency-mismatch"){f=true;continue}f=false;if(h=="pending"){this.toHide=this.toHide.not(this.errorsFor(c));return}if(!h){this.formatAndAdd(c,b);return false}}catch(d){this.settings.debug&&window.console&&console.log("exception occurred when checking element "+c.id+", check the '"+b.method+"' method");throw d}}if(f){return}if(this.objectLength(g)){this.successList.push(c)}return true},customMetaMessage:function(b,c){if(!a.metadata){return}var d=this.settings.meta?a(b).metadata()[this.settings.meta]:a(b).metadata();return d&&d.messages&&d.messages[c]},customMessage:function(d,c){var b=this.settings.messages[d];return b&&(b.constructor==String?b:b[c])},findDefined:function(){for(var b=0;b<arguments.length;b++){if(arguments[b]!==undefined){return arguments[b]}}return undefined},defaultMessage:function(c,b){return this.findDefined(this.customMessage(c.name,b),this.customMetaMessage(c,b),!this.settings.ignoreTitle&&c.title||undefined,a.validator.messages[b],"<strong>Warning: No message defined for "+c.name+"</strong>")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method);if(typeof d=="function"){d=d.call(this,c.parameters,b)}this.errorList.push({message:d,element:b});this.errorMap[b.name]=d;this.submitted[b.name]=d},addWrapper:function(b){if(this.settings.wrapper){b=b.add(b.parent(this.settings.wrapper))}return b},defaultShowErrors:function(){for(var c=0;this.errorList[c];c++){var b=this.errorList[c];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(var c=0;this.successList[c];c++){this.showLabel(this.successList[c])}}if(this.settings.unhighlight){for(var c=0,d=this.validElements();d[c];c++){this.settings.unhighlight.call(this,d[c],this.settings.errorClass,this.settings.validClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d=this.errorsFor(b);if(d.length){d.removeClass().addClass(this.settings.errorClass);d.attr("generated")&&d.html(c)}else{d=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(b),generated:true}).addClass(this.settings.errorClass).html(c||"");if(this.settings.wrapper){d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(d).length){this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b)}}if(!c&&this.settings.success){d.text("");typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d)}this.toShow=this.toShow.add(d)},errorsFor:function(b){return this.errors().filter("[for='"+this.idOrName(b)+"']")},idOrName:function(b){return this.groups[b.name]||(this.checkable(b)?b.name:b.id||b.name)},checkable:function(b){return/radio|checkbox/i.test(b.type)},findByName:function(c){var b=this.currentForm;return a(document.getElementsByName(c)).map(function(e,d){return d.form==b&&d.name==c&&d||null})},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c)){return this.findByName(c.name).filter(":checked").length}}return b.length},depend:function(b,c){return this.dependTypes[typeof b]?this.dependTypes[typeof b](b,c):true},dependTypes:{"boolean":function(b,c){return b},string:function(b,c){return !!a(b,c.form).length},"function":function(b,c){return b(c)}},optional:function(b){return !a.validator.methods.required.call(this,a.trim(b.value),b)&&"dependency-mismatch"},startRequest:function(b){if(!this.pending[b.name]){this.pendingRequest++;this.pending[b.name]=true}},stopRequest:function(c,b){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[c.name];if(b&&this.pendingRequest==0&&this.formSubmitted&&this.form()){a(this.currentForm).submit()}else{if(!b&&this.pendingRequest==0&&this.formSubmitted){a(this.currentForm).triggerHandler("invalid-form",[this])}}},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",previous={old:null,valid:true,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(b,c){b.constructor==String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={};var d=a(b).attr("class");d&&a.each(d.split(" "),function(){if(this in a.validator.classRuleSettings){a.extend(c,a.validator.classRuleSettings[this])}});return c},attributeRules:function(b){var c={};var d=a(b);for(method in a.validator.methods){var e=d.attr(method);if(e){c[method]=e}}if(c.maxlength&&/-1|2147483647|524288/.test(c.maxlength)){delete c.maxlength}return c},metadataRules:function(c){if(!a.metadata){return{}}var b=a.data(c.form,"validator").settings.meta;return b?a(c).metadata()[b]:a(c).metadata()},staticRules:function(b){var d={};var c=a.data(b.form,"validator");if(c.settings.rules){d=a.validator.normalizeRule(c.settings.rules[b.name])||{}}return d},normalizeRules:function(b,c){a.each(b,function(e,f){if(f===false){delete b[e];return}if(f.param||f.depends){var d=true;switch(typeof f.depends){case"string":d=!!a(f.depends,c.form).length;break;case"function":d=f.depends.call(c,c);break}if(d){b[e]=f.param!==undefined?f.param:true}else{delete b[e]}}});a.each(b,function(e,d){b[e]=a.isFunction(d)?d(c):d});a.each(["minlength","maxlength","min","max"],function(){if(b[this]){b[this]=Number(b[this])}});a.each(["rangelength","range"],function(){if(b[this]){b[this]=[Number(b[this][0]),Number(b[this][1])]}});if(a.validator.autoCreateRanges){if(b.min&&b.max){b.range=[b.min,b.max];delete b.min;delete b.max}if(b.minlength&&b.maxlength){b.rangelength=[b.minlength,b.maxlength];delete b.minlength;delete b.maxlength}}if(b.messages){delete b.messages}return b},normalizeRule:function(b){if(typeof b=="string"){var c={};a.each(b.split(/\s/),function(){c[this]=true});b=c}return b},addMethod:function(d,c,b){a.validator.methods[d]=c;a.validator.messages[d]=b||a.validator.messages[d];if(c.length<3){a.validator.addClassRules(d,a.validator.normalizeRule(d))}},methods:{required:function(e,b,c){if(!this.depend(c,b)){return"dependency-mismatch"}switch(b.nodeName.toLowerCase()){case"select":var d=a("option:selected",b);return d.length>0&&(b.type=="select-multiple"||(a.browser.msie&&!(d[0].attributes.value.specified)?d[0].text:d[0].value).length>0);case"input":if(this.checkable(b)){return this.getLength(e,b)>0}default:return a.trim(e).length>0}},remote:function(e,b,d){if(this.optional(b)){return"dependency-mismatch"}var g=this.previousValue(b);if(!this.settings.messages[b.name]){this.settings.messages[b.name]={}}this.settings.messages[b.name].remote=typeof g.message=="function"?g.message(e):g.message;d=typeof d=="string"&&{url:d}||d;if(g.old!==e){g.old=e;var f=this;this.startRequest(b);var c={};c[b.name]=e;a.ajax(a.extend(true,{url:d,mode:"abort",port:"validate"+b.name,dataType:"json",data:c,success:function(l){var h=l===true;if(h){var k=f.formSubmitted;f.prepareElement(b);f.formSubmitted=k;f.successList.push(b);f.showErrors()}else{var j={};j[b.name]=g.message=l||f.defaultMessage(b,"remote");f.showErrors(j)}g.valid=h;f.stopRequest(b,h)}},d));return"pending"}else{if(this.pending[b.name]){return"pending"}}return g.valid},minlength:function(d,b,c){return this.optional(b)||this.getLength(a.trim(d),b)>=c},maxlength:function(d,b,c){return this.optional(b)||this.getLength(a.trim(d),b)<=c},rangelength:function(e,b,d){var c=this.getLength(a.trim(e),b);return this.optional(b)||(c>=d[0]&&c<=d[1])},min:function(d,b,c){return this.optional(b)||d>=c},max:function(d,b,c){return this.optional(b)||d<=c},range:function(d,b,c){return this.optional(b)||(d>=c[0]&&d<=c[1])},email:function(b,c){return this.optional(c)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(b)},url:function(b,c){return this.optional(c)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(b)},date:function(b,c){return this.optional(c)||!/Invalid|NaN/.test(new Date(b))},dateISO:function(b,c){return this.optional(c)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(b)},dateDE:function(b,c){return this.optional(c)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(b)},number:function(b,c){return this.optional(c)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(b)},numberDE:function(b,c){return this.optional(c)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(b)},digits:function(b,c){return this.optional(c)||/^\d+$/.test(b)},creditcard:function(f,d){if(this.optional(d)){return"dependency-mismatch"}if(/[^0-9-]+/.test(f)){return false}var c=0,b=0,e=false;f=f.replace(/\D/g,"");for(n=f.length-1;n>=0;n--){var g=f.charAt(n);var b=parseInt(g,10);if(e){if((b*=2)>9){b-=9}}c+=b;e=!e}return(c%10)==0},accept:function(d,b,c){c=typeof c=="string"?c.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||d.match(new RegExp(".("+c+")$","i"))},equalTo:function(d,b,c){return d==a(c).val()}}});a.format=a.validator.format})(jQuery);(function(b){var c=b.ajax;var a={};b.ajax=function(e){e=b.extend(e,b.extend({},b.ajaxSettings,e));var d=e.port;if(e.mode=="abort"){if(a[d]){a[d].abort()}return(a[d]=c.apply(this,arguments))}return c.apply(this,arguments)}})(jQuery);(function(a){a.each({focus:"focusin",blur:"focusout"},function(b,c){a.event.special[c]={setup:function(){if(a.browser.msie){return false}this.addEventListener(b,a.event.special[c].handler,true)},teardown:function(){if(a.browser.msie){return false}this.removeEventListener(b,a.event.special[c].handler,true)},handler:function(d){arguments[0]=a.event.fix(d);arguments[0].type=c;return a.event.handle.apply(this,arguments)}}});a.extend(a.fn,{delegate:function(c,d,b){return this.bind(c,function(f){var e=a(f.target);if(e.is(d)){return b.apply(e,arguments)}})},triggerEvent:function(c,b){return this.triggerHandler(c,[a.event.fix({type:c,target:b})])}})})(jQuery);jQuery.cookie=function(d,g,e){if(typeof g!="undefined"){e=e||{};if(g===null){g="";e.expires=-1}var f="";if(e.expires&&(typeof e.expires=="number"||e.expires.toUTCString)){var k;if(typeof e.expires=="number"){k=new Date();k.setTime(k.getTime()+(e.expires*24*60*60*1000))}else{k=e.expires}f="; expires="+k.toUTCString()}var b=e.path?"; path="+(e.path):"";var l=e.domain?"; domain="+(e.domain):"";var h=e.secure?"; secure":"";document.cookie=[d,"=",encodeURIComponent(g),f,b,l,h].join("")}else{var a=null;if(document.cookie&&document.cookie!=""){var j=document.cookie.split(";");for(var m=0;m<j.length;m++){var c=jQuery.trim(j[m]);if(c.substring(0,d.length+1)==(d+"=")){a=decodeURIComponent(c.substring(d.length+1));break}}}return a}};(function(a){a.fn.extend({mlTabs:function(){return this.each(function(){var b=a(this);var d=b.children("li");var c=(function(e){d.each(function(f){var h=a(this);var g=a(h.find("a").attr("href"));if(e===this){h.addClass("selected");g.show()}else{h.removeClass("selected");g.hide()}})});d.hover(function(){a(this).addClass("hover")},function(){a(this).removeClass("hover")}).click(function(){c(this);return false});c(d[0])})}})})(jQuery);(function(e){var d=0,f=0;e.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,a){if(b=="selected"){if(this.options.collapsible&&a==this.options.selected){return}this.select(a)}else{this.options[b]=a;if(b=="deselectable"){this.options.collapsible=a}this._tabify()}},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+(++d)},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var a=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+(++f));return e.cookie.apply(null,[a].concat(e.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var a=e(this);a.html(a.data("label.tabs")).removeData("label.tabs")})},_tabify:function(v){this.list=this.element.children("ul:first");this.lis=e("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return e("a",this)[0]});this.panels=e([]);var s=this,a=this.options;var o=/^#.+/;this.anchors.each(function(k,q){var g=e(q).attr("href");var h=g.split("#")[0],j;if(h&&(h===location.toString().split("#")[0]||(j=e("base")[0])&&h===j.href)){g=q.hash;q.href=g}if(o.test(g)){s.panels=s.panels.add(s._sanitizeSelector(g))}else{if(g!="#"){e.data(q,"href.tabs",g);e.data(q,"load.tabs",g.replace(/#.*$/,""));var m=s._tabId(q);q.href="#"+m;var l=e("#"+m);if(!l.length){l=e(a.panelTemplate).attr("id",m).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(s.panels[k-1]||s.list);l.data("destroy.tabs",true)}s.panels=s.panels.add(l)}else{a.disabled.push(k)}}});if(v){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(a.selected===undefined){if(location.hash){this.anchors.each(function(h,g){if(g.hash==location.hash){a.selected=h;return false}})}if(typeof a.selected!="number"&&a.cookie){a.selected=parseInt(s._cookie(),10)}if(typeof a.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){a.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}a.selected=a.selected||0}else{if(a.selected===null){a.selected=-1}}a.selected=((a.selected>=0&&this.anchors[a.selected])||a.selected<0)?a.selected:0;a.disabled=e.unique(a.disabled.concat(e.map(this.lis.filter(".ui-state-disabled"),function(h,g){return s.lis.index(h)}))).sort();if(e.inArray(a.selected,a.disabled)!=-1){a.disabled.splice(e.inArray(a.selected,a.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(a.selected>=0&&this.anchors.length){this.panels.eq(a.selected).removeClass("ui-tabs-hide");this.lis.eq(a.selected).addClass("ui-tabs-selected ui-state-active");s.element.queue("tabs",function(){s._trigger("show",null,s._ui(s.anchors[a.selected],s.panels[a.selected]))});this.load(a.selected)}e(window).bind("unload",function(){s.lis.add(s.anchors).unbind(".tabs");s.lis=s.anchors=s.panels=null})}else{a.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[a.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(a.cookie){this._cookie(a.selected,a.cookie)}for(var w=0,u;(u=this.lis[w]);w++){e(u)[e.inArray(w,a.disabled)!=-1&&!e(u).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(a.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(a.event!="mouseover"){var y=function(h,g){if(g.is(":not(.ui-state-disabled)")){g.addClass("ui-state-"+h)}};var A=function(h,g){g.removeClass("ui-state-"+h)};this.lis.bind("mouseover.tabs",function(){y("hover",e(this))});this.lis.bind("mouseout.tabs",function(){A("hover",e(this))});this.anchors.bind("focus.tabs",function(){y("focus",e(this).closest("li"))});this.anchors.bind("blur.tabs",function(){A("focus",e(this).closest("li"))})}var c,x;if(a.fx){if(e.isArray(a.fx)){c=a.fx[0];x=a.fx[1]}else{c=x=a.fx}}function b(g,h){g.css({display:""});if(e.browser.msie&&h.opacity){g[0].style.removeAttribute("filter")}}var B=x?function(g,h){e(g).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");h.hide().removeClass("ui-tabs-hide").animate(x,x.duration||"normal",function(){b(h,x);s._trigger("show",null,s._ui(g,h[0]))})}:function(g,h){e(g).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");h.removeClass("ui-tabs-hide");s._trigger("show",null,s._ui(g,h[0]))};var z=c?function(h,g){g.animate(c,c.duration||"normal",function(){s.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");g.addClass("ui-tabs-hide");b(g,c);s.element.dequeue("tabs")})}:function(j,h,g){s.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");h.addClass("ui-tabs-hide");s.element.dequeue("tabs")};this.anchors.bind(a.event+".tabs",function(){var j=this,k=e(this).closest("li"),h=s.panels.filter(":not(.ui-tabs-hide)"),g=e(s._sanitizeSelector(this.hash));if((k.hasClass("ui-tabs-selected")&&!a.collapsible)||k.hasClass("ui-state-disabled")||k.hasClass("ui-state-processing")||s._trigger("select",null,s._ui(this,g[0]))===false){this.blur();return false}a.selected=s.anchors.index(this);s.abort();if(a.collapsible){if(k.hasClass("ui-tabs-selected")){a.selected=-1;if(a.cookie){s._cookie(a.selected,a.cookie)}s.element.queue("tabs",function(){z(j,h)}).dequeue("tabs");this.blur();return false}else{if(!h.length){if(a.cookie){s._cookie(a.selected,a.cookie)}s.element.queue("tabs",function(){B(j,g)});s.load(s.anchors.index(this));this.blur();return false}}}if(a.cookie){s._cookie(a.selected,a.cookie)}if(g.length){if(h.length){s.element.queue("tabs",function(){z(j,h)})}s.element.queue("tabs",function(){B(j,g)});s.load(s.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(e.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var a=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var b=e.data(this,"href.tabs");if(b){this.href=b}var c=e(this).unbind(".tabs");e.each(["href","load","cache"],function(j,k){c.removeData(k+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(e.data(this,"destroy.tabs")){e(this).remove()}else{e(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(a.cookie){this._cookie(null,a.cookie)}},add:function(b,a,l){if(l===undefined){l=this.anchors.length}var c=this,r=this.options,o=e(r.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,a)),m=!b.indexOf("#")?b.replace("#",""):this._tabId(e("a",o)[0]);o.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var q=e("#"+m);if(!q.length){q=e(r.panelTemplate).attr("id",m).data("destroy.tabs",true)}q.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(l>=this.lis.length){o.appendTo(this.list);q.appendTo(this.list[0].parentNode)}else{o.insertBefore(this.lis[l]);q.insertBefore(this.panels[l])}r.disabled=e.map(r.disabled,function(h,g){return h>=l?++h:h});this._tabify();if(this.anchors.length==1){o.addClass("ui-tabs-selected ui-state-active");q.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[l],this.panels[l]))},remove:function(a){var c=this.options,h=this.lis.eq(a).remove(),b=this.panels.eq(a).remove();if(h.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(a+(a+1<this.anchors.length?1:-1))}c.disabled=e.map(e.grep(c.disabled,function(g,k){return g!=a}),function(g,k){return g>=a?--g:g});this._tabify();this._trigger("remove",null,this._ui(h.find("a")[0],b[0]))},enable:function(b){var a=this.options;if(e.inArray(b,a.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");a.disabled=e.grep(a.disabled,function(h,c){return h!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(b){var a=this,c=this.options;if(b!=c.selected){this.lis.eq(b).addClass("ui-state-disabled");c.disabled.push(b);c.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}},select:function(a){if(typeof a=="string"){a=this.anchors.index(this.anchors.filter("[href$="+a+"]"))}else{if(a===null){a=-1}}if(a==-1&&this.options.collapsible){a=this.options.selected}this.anchors.eq(a).trigger(this.options.event+".tabs")},load:function(b){var j=this,l=this.options,c=this.anchors.eq(b)[0],a=e.data(c,"load.tabs");this.abort();if(!a||this.element.queue("tabs").length!==0&&e.data(c,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(b).addClass("ui-state-processing");if(l.spinner){var k=e("span",c);k.data("label.tabs",k.html()).html(l.spinner)}this.xhr=e.ajax(e.extend({},l.ajaxOptions,{url:a,success:function(h,g){e(j._sanitizeSelector(c.hash)).html(h);j._cleanup();if(l.cache){e.data(c,"cache.tabs",true)}j._trigger("load",null,j._ui(j.anchors[b],j.panels[b]));try{l.ajaxOptions.success(h,g)}catch(m){}j.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(a,b){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});e.extend(e.ui.tabs,{version:"1.7.3",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});e.extend(e.ui.tabs.prototype,{rotation:null,rotate:function(a,k){var c=this,l=this.options;var j=c._rotate||(c._rotate=function(g){clearTimeout(c.rotation);c.rotation=setTimeout(function(){var h=l.selected;c.select(++h<c.anchors.length?h:0)},a);if(g){g.stopPropagation()}});var b=c._unrotate||(c._unrotate=!k?function(g){if(g.clientX){c.rotate(null)}}:function(g){t=l.selected;j()});if(a){this.element.bind("tabsshow",j);this.anchors.bind(l.event+".tabs",b);j()}else{clearTimeout(c.rotation);this.element.unbind("tabsshow",j);this.anchors.unbind(l.event+".tabs",b);delete this._rotate;delete this._unrotate}}})})(jQuery);(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:".",debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms")}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s)}else{alert(s)}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug=""}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter)}else{if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter)}}if(!p){p=detectParserForColumn(table,cells[i])}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n"}list.push(p)}}if(table.config.debug){log(parsersDebug)}return list}function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i<l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i]}}return parsers[0]}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i]}}return false}function buildCache(table){if(table.config.debug){var cacheTime=new Date()}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]))}cols.push(i);cache.normalized.push(cols);cols=null}if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime)}return cache}function getElementText(config,node){if(!node){return""}var t="";if(config.textExtraction=="simple"){if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML}else{t=node.innerHTML}}else{if(typeof(config.textExtraction)=="function"){t=config.textExtraction(node)}else{t=$(node).text()}}return t}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j<l;j++){tableBody[0].appendChild(o[j])}}}if(table.config.appender){table.config.appender(table,rows)}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime)}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd")},0)}function buildHeaders(table){if(table.config.debug){var time=new Date()}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i<table.tHead.rows.length;i++){tableHeadersRows[i]=0}$tableHeaders=$("thead th",table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index)){this.sortDisabled=true}if(!this.sortDisabled){$(this).addClass(table.config.cssHeader)}table.config.headerList[index]=this});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders)}return $tableHeaders}function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++))}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell)}}}return arr}function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true}return false}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true}return false}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table)}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i]}}}function formatSortingOrder(v){if(typeof(v)!="Number"){i=(v.toLowerCase()=="desc")?1:0}else{i=(v==(0||1))?v:0}return i}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true}}return false}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this)}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]])}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$("<colgroup>");$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($("<col>").css("width",$(this).width()))});$(table).prepend(colgroup)}}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date()}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)=="text")?((order==0)?"sortText":"sortTextDesc"):((order==0)?"sortNumeric":"sortNumericDesc");var e="e"+i;dynamicExp+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { "}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; "}dynamicExp+="return 0; ";dynamicExp+="}; ";eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime)}return cache}function sortText(a,b){return((a<b)?-1:((a>b)?1:0))}function sortTextDesc(a,b){return((b<a)?-1:((b>a)?1:0))}function sortNumeric(a,b){return a-b}function sortNumericDesc(a,b){return b-a}function getCachedSortType(parsers,i){return parsers[i].type}this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies){return}var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j])}}}config.sortList.push([i,this.order])}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2}}}else{config.sortList.push([i,this.order])}}setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache))},1);return false}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false}});$this.bind("update",function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this)}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache))}).bind("appendCache",function(){appendToTable(this,cache)}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this)}).bind("applyWidgets",function(){applyWidget(this)});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList])}applyWidget(this)})};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false}}if(a){parsers.push(parser)}};this.addWidget=function(widget){widgets.push(widget)};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i};this.isDigit=function(s,config){var DECIMAL="\\"+config.decimal;var exp="/(^[+]?0("+DECIMAL+"0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)"+DECIMAL+"(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*"+DECIMAL+"0+$)/";return RegExp(exp).test($.trim(s))};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild){this.removeChild(this.firstChild)}}empty.apply(table.tBodies[0])}else{table.tBodies[0].innerHTML=""}}}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true},format:function(s){return $.trim(s.toLowerCase())},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c)},format:function(s){return $.tablesorter.formatFloat(s)},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[�$�?.]/.test(s)},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""))},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s)},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item}else{r+=item}}return $.tablesorter.formatFloat(r)},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s)},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),""))},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s)},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0")},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s))},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""))},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/))},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime())},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s)},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2")}else{if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1")}else{if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3")}}}return $.tablesorter.formatFloat(new Date(s).getTime())},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s)},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime())},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?"sortValue":c.parserMetadataName;return $(cell).metadata()[p]},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date()}$("tr:visible",table.tBodies[0]).filter(":even").removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(":odd").removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time)}}})})(jQuery);(function(a){a.extend({tablesorterPager:new function(){function b(l){var m=a(l.cssPageDisplay,l.container).val((l.page+1)+l.seperator+l.totalPages)}function j(o,m){var l=o.config;l.size=m;l.totalPages=Math.ceil(l.totalRows/l.size);l.pagerPositionSet=false;e(o);d(o)}function d(m){var l=m.config;if(!l.pagerPositionSet&&l.positionFixed){var l=m.config,q=a(m);if(q.offset){l.container.css({top:q.offset().top+q.height()+"px",position:"absolute"})}l.pagerPositionSet=true}}function c(m){var l=m.config;l.page=0;e(m)}function g(m){var l=m.config;l.page=(l.totalPages-1);e(m)}function k(m){var l=m.config;l.page++;if(l.page>=(l.totalPages-1)){l.page=(l.totalPages-1)}e(m)}function f(m){var l=m.config;l.page--;if(l.page<=0){l.page=0}e(m)}function e(m){var l=m.config;if(l.page<0||l.page>(l.totalPages-1)){l.page=0}h(m,l.rowsCopy)}function h(u,m){var r=u.config;var A=m.length;var q=(r.page*r.size);var v=(q+r.size);if(v>m.length){v=m.length}var y=a(u.tBodies[0]);a.tablesorter.clearTableBody(u);for(var x=q;x<v;x++){var z=m[x];var A=z.length;for(var w=0;w<A;w++){y[0].appendChild(z[w])}}d(u,y);a(u).trigger("applyWidgets");if(r.page>=r.totalPages){g(u)}b(r)}this.appender=function(o,m){var l=o.config;l.rowsCopy=m;l.totalRows=m.length;l.totalPages=Math.ceil(l.totalRows/l.size);h(o,m)};this.defaults={size:10,offset:0,page:0,totalRows:0,totalPages:0,container:null,cssNext:".next",cssPrev:".prev",cssFirst:".first",cssLast:".last",cssPageDisplay:".pagedisplay",cssPageSize:".pagesize",seperator:"/",positionFixed:true,appender:this.appender};this.construct=function(l){return this.each(function(){config=a.extend(this.config,a.tablesorterPager.defaults,l);var o=this,m=config.container;a(this).trigger("appendCache");config.size=parseInt(a(".pagesize",m).val());a(config.cssFirst,m).click(function(){c(o);return false});a(config.cssNext,m).click(function(){k(o);return false});a(config.cssPrev,m).click(function(){f(o);return false});a(config.cssLast,m).click(function(){g(o);return false});a(config.cssPageSize,m).change(function(){j(o,parseInt(a(this).val()));return false})})}}});a.fn.extend({tablesorterPager:a.tablesorterPager.construct})})(jQuery);(function(a){a.fn.initializeLocalizationBar=function(f){var c=a.extend({addLocalizationEntryUrl:a(this).attr("addLocalizationEntryUrl")},f);function e(k,h){var j=prompt("Please enter a translation for: <"+k+">",h);if(typeof(j)==="string"){a.ajax({type:"POST",cache:false,url:c.addLocalizationEntryUrl,dataType:"text",data:({key:k,localizedText:j}),success:function(l){if(l!==null){a(".localizable[localizationKey="+k+"]").text(l)}},error:function(){alert("Could not add localization. Please try again or report this problem.")}})}}function g(j){var k=a(this);var l=k.attr("localizationKey");var h=k.text();e(l,h);j.preventDefault()}function b(j){var h=a(this).is(":checked");if(h){a(".localizable").addClass("localizeEnabled").bind("click.initializeLocalizationBar",g)}else{a(".localizable").removeClass("localizeEnabled").unbind(".initializeLocalizationBar")}}function d(h){if(this.selectedIndex!==0){e(this.value,this.value);this.selectedIndex=0}}return this.each(function(){var h=a(this);h.find(":checkbox").change(b).trigger("change");h.find("select").change(d)})}})(jQuery);$(document).ready(function(){$(".localizationBar").initializeLocalizationBar()});jQuery.validator.addMethod("regex",function(d,a,b){if(this.optional(a)){return true}var c=new RegExp(b).exec(d);return(c&&(c.index==0)&&(c[0].length==d.length))});function __MVC_ApplyValidator_Range(c,a,b){c.range=[a,b]}function __MVC_ApplyValidator_RegularExpression(b,a){b.regex=a}function __MVC_ApplyValidator_Required(a){a.required=true}function __MVC_ApplyValidator_StringLength(b,a){b.maxlength=a}function __MVC_ApplyValidator_Unknown(c,b,a){c[b]=a}function __MVC_CreateFieldToValidationMessageMapping(c){var b={};for(var d=0;d<c.length;d++){var a=c[d];b[a.FieldName]="#"+a.ValidationMessageId}return b}function __MVC_CreateErrorMessagesObject(h){var a={};for(var k=0;k<h.length;k++){var b=h[k];var d={};a[b.FieldName]=d;var e=b.ValidationRules;for(var f=0;f<e.length;f++){var g=e[f];if(g.ErrorMessage){var c=g.ValidationType;switch(g.ValidationType){case"regularExpression":c="regex";break;case"stringLength":c="maxlength";break}d[c]=g.ErrorMessage}}}return a}function __MVC_CreateRulesForField(a){var d=a.ValidationRules;var c={};for(var b=0;b<d.length;b++){var e=d[b];switch(e.ValidationType){case"range":__MVC_ApplyValidator_Range(c,e.ValidationParameters.minimum,e.ValidationParameters.maximum);break;case"regularExpression":case"regex":__MVC_ApplyValidator_RegularExpression(c,e.ValidationParameters.pattern);break;case"required":__MVC_ApplyValidator_Required(c);break;case"stringLength":__MVC_ApplyValidator_StringLength(c,e.ValidationParameters.maximumLength);break;default:__MVC_ApplyValidator_Unknown(c,e.ValidationType,e.ValidationParameters);break}}return c}function __MVC_CreateValidationOptions(b){var a={};for(var c=0;c<b.length;c++){var d=b[c];var e=d.FieldName;a[e]=__MVC_CreateRulesForField(d)}return a}function __MVC_EnableClientValidation(h){var a=$("#"+h.FormId);var g=h.Fields;var b=__MVC_CreateValidationOptions(g);var d=__MVC_CreateFieldToValidationMessageMapping(g);var k=__MVC_CreateErrorMessagesObject(g);var e={errorClass:"input-validation-error",errorElement:"span",errorPlacement:function(l,m){var o=d[m.attr("name")];$(o).empty();$(o).removeClass("field-validation-valid");$(o).addClass("field-validation-error");l.removeClass("input-validation-error");l.attr("_for_validation_message",o);l.appendTo(o)},messages:k,rules:b,success:function(m){var l=$(m.attr("_for_validation_message"));$(l).empty();$(l).addClass("field-validation-valid");$(l).removeClass("field-validation-error")}};var c=h.ValidationSummaryId;if(c){$("<ul />").appendTo($("#"+c+":not(:has(ul:first))"));e={errorContainer:"#"+c,errorLabelContainer:"#"+c+" ul:first",wrapper:"li",showErrors:function(l,u){var v=$(this.settings.errorContainer);var q=$("ul:first",v);for(var w=0;this.errorList[w];w++){var o=this.errorList[w].element;var r=$(d[o.name]);var m=r.html();if(!m||m.length==0){r.html("")}r.removeClass("field-validation-valid").addClass("field-validation-error");$("#"+o.id).addClass("input-validation-error")}for(var w=0;this.successList[w];w++){var o=this.successList[w];var r=d[o.name];$(r).addClass("field-validation-valid").removeClass("field-validation-error");$("#"+o.id).removeClass("input-validation-error")}if(this.numberOfInvalids()>0){v.removeClass("validation-summary-valid").addClass("validation-summary-errors")}this.defaultShowErrors();var s=q.children("li:not(:has(label))").length+this.numberOfInvalids();if(s>0){$(this.settings.errorContainer).css("display","block").addClass("validation-summary-errors").removeClass("validation-summary-valid");$(this.settings.errorLabelContainer).css("display","block")}},messages:k,rules:b}}var f=document.getElementById(h.FormId);var j=f.validationCallbacks;if(!j){j=[];f.validationCallbacks=j}j.push(function(){a.validate();return a.valid()});a.validate(e)}function __MVC_EnableClientValidationForAllForms(){var a=window.mvcClientValidationMetadata;if(a){while(a.length>0){var b=a.pop();__MVC_EnableClientValidation(b)}}}function __MVC_RefreshForm(c,a,b){if($(c).valid()){$(a).mask("Please wait...");$.post(b,$(c).serialize(),function(d){$(a).html(d);$(a).unmask()})}}$(document).ready(function(){__MVC_EnableClientValidationForAllForms()});
/*
* jQuery blockUI plugin
* Version 2.37 (29-JAN-2011)
* @requires jQuery v1.2.3 or later
*
* Examples at: http://malsup.com/jquery/block/
* Copyright (c) 2007-2010 M. Alsup
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Thanks to Amir-Hossein Sobhi for some excellent contributions!
*/
(function(o){if(/1\.(0|1|2)\.(0|1|2)/.test(o.fn.jquery)||/^1.1/.test(o.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+o.fn.jquery);return}o.fn._fadeIn=o.fn.fadeIn;var f=function(){};var j=document.documentMode||0;var l=o.browser.msie&&((o.browser.version<8&&!j)||j<8);var m=o.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!j;o.blockUI=function(s){g(window,s)};o.unblockUI=function(s){a(window,s)};o.growlUI=function(u,s,v,w){var x=o('<div class="growlUI"></div>');if(u){x.append("<h1>"+u+"</h1>")}if(s){x.append("<h2>"+s+"</h2>")}if(v==undefined){v=3000}o.blockUI({message:x,fadeIn:700,fadeOut:1000,centerY:false,timeout:v,showOverlay:false,onUnblock:w,css:o.blockUI.defaults.growlCSS})};o.fn.block=function(s){return this.unblock({fadeOut:0}).each(function(){if(o.css(this,"position")=="static"){this.style.position="relative"}if(o.browser.msie){this.style.zoom=1}g(this,s)})};o.fn.unblock=function(s){return this.each(function(){a(this,s)})};o.blockUI.version=2.37;o.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:0.6,cursor:"wait"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:0.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:false,baseZ:1000,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg"};var d=null;var r=[];function g(M,I){var G=(M==window);var w=I&&I.message!==undefined?I.message:undefined;I=o.extend({},o.blockUI.defaults,I||{});I.overlayCSS=o.extend({},o.blockUI.defaults.overlayCSS,I.overlayCSS||{});var O=o.extend({},o.blockUI.defaults.css,I.css||{});var v=o.extend({},o.blockUI.defaults.themedCSS,I.themedCSS||{});w=w===undefined?I.message:w;if(G&&d){a(window,{fadeOut:0})}if(w&&typeof w!="string"&&(w.parentNode||w.jquery)){var y=w.jquery?w[0]:w;var H={};o(M).data("blockUI.history",H);H.el=y;H.parent=y.parentNode;H.display=y.style.display;H.position=y.style.position;if(H.parent){H.parent.removeChild(y)}}var D=I.baseZ;var B=(o.browser.msie||I.forceIframe)?o('<iframe class="blockUI" style="z-index:'+(D++)+';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+I.iframeSrc+'"></iframe>'):o('<div class="blockUI" style="display:none"></div>');var P=o('<div class="blockUI blockOverlay" style="z-index:'+(D++)+';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');var Q,J;if(I.theme&&G){J='<div class="blockUI '+I.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+D+';display:none;position:fixed"><div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(I.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>'}else{if(I.theme){J='<div class="blockUI '+I.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+D+';display:none;position:absolute"><div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(I.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>'}else{if(G){J='<div class="blockUI '+I.blockMsgClass+' blockPage" style="z-index:'+D+';display:none;position:fixed"></div>'}else{J='<div class="blockUI '+I.blockMsgClass+' blockElement" style="z-index:'+D+';display:none;position:absolute"></div>'}}}Q=o(J);if(w){if(I.theme){Q.css(v);Q.addClass("ui-widget-content")}else{Q.css(O)}}if(!I.applyPlatformOpacityRules||!(o.browser.mozilla&&/Linux/.test(navigator.platform))){P.css(I.overlayCSS)}P.css("position",G?"fixed":"absolute");if(o.browser.msie||I.forceIframe){B.css("opacity",0)}var u=[B,P,Q],E=G?o("body"):o(M);o.each(u,function(){this.appendTo(E)});if(I.theme&&I.draggable&&o.fn.draggable){Q.draggable({handle:".ui-dialog-titlebar",cancel:"li"})}var x=l&&(!o.boxModel||o("object,embed",G?null:M).length>0);if(m||x){if(G&&I.allowBodyStretch&&o.boxModel){o("html,body").css("height","100%")}if((m||!o.boxModel)&&!G){var N=c(M,"borderTopWidth"),S=c(M,"borderLeftWidth");var K=N?"(0 - "+N+")":0;var L=S?"(0 - "+S+")":0}o.each([B,P,Q],function(U,W){var z=W[0].style;z.position="absolute";if(U<2){G?z.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+I.quirksmodeOffsetHack+') + "px"'):z.setExpression("height",'this.parentNode.offsetHeight + "px"');G?z.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):z.setExpression("width",'this.parentNode.offsetWidth + "px"');if(L){z.setExpression("left",L)}if(K){z.setExpression("top",K)}}else{if(I.centerY){if(G){z.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')}z.marginTop=0}else{if(!I.centerY&&G){var V=(I.css&&I.css.top)?parseInt(I.css.top):0;var T="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+V+') + "px"';z.setExpression("top",T)}}}})}if(w){if(I.theme){Q.find(".ui-widget-content").append(w)}else{Q.append(w)}if(w.jquery||w.nodeType){o(w).show()}}if((o.browser.msie||I.forceIframe)&&I.showOverlay){B.show()}if(I.fadeIn){var R=I.onBlock?I.onBlock:f;var F=(I.showOverlay&&!w)?R:f;var A=w?R:f;if(I.showOverlay){P._fadeIn(I.fadeIn,F)}if(w){Q._fadeIn(I.fadeIn,A)}}else{if(I.showOverlay){P.show()}if(w){Q.show()}if(I.onBlock){I.onBlock()}}q(1,M,I);if(G){d=Q[0];r=o(":input:enabled:visible",d);if(I.focusInput){setTimeout(e,20)}}else{k(Q[0],I.centerX,I.centerY)}if(I.timeout){var C=setTimeout(function(){G?o.unblockUI(I):o(M).unblock(I)},I.timeout);o(M).data("blockUI.timeout",C)}}function a(v,s){var z=(v==window);var y=o(v);var w=y.data("blockUI.history");var x=y.data("blockUI.timeout");if(x){clearTimeout(x);y.removeData("blockUI.timeout")}s=o.extend({},o.blockUI.defaults,s||{});q(0,v,s);var u;if(z){u=o("body").children().filter(".blockUI").add("body > .blockUI")}else{u=o(".blockUI",v)}if(z){d=r=null}if(s.fadeOut){u.fadeOut(s.fadeOut);setTimeout(function(){h(u,w,s,v)},s.fadeOut)}else{h(u,w,s,v)}}function h(v,w,u,s){v.each(function(x,y){if(this.parentNode){this.parentNode.removeChild(this)}});if(w&&w.el){w.el.style.display=w.display;w.el.style.position=w.position;if(w.parent){w.parent.appendChild(w.el)}o(s).removeData("blockUI.history")}if(typeof u.onUnblock=="function"){u.onUnblock(s,u)}}function q(u,v,s){var y=v==window,x=o(v);if(!u&&(y&&!d||!y&&!x.data("blockUI.isBlocked"))){return}if(!y){x.data("blockUI.isBlocked",u)}if(!s.bindEvents||(u&&!s.showOverlay)){return}var w="mousedown mouseup keydown keypress";u?o(document).bind(w,s,b):o(document).unbind(w,b)}function b(u){if(u.keyCode&&u.keyCode==9){if(d&&u.data.constrainTabKey){var x=r;var s=!u.shiftKey&&u.target===x[x.length-1];var v=u.shiftKey&&u.target===x[0];if(s||v){setTimeout(function(){e(v)},10);return false}}}var w=u.data;if(o(u.target).parents("div."+w.blockMsgClass).length>0){return true}return o(u.target).parents().children().filter("div.blockUI").length==0}function e(u){if(!r){return}var s=r[u===true?r.length-1:0];if(s){s.focus()}}function k(w,A,B){var v=w.parentNode,u=w.style;var C=((v.offsetWidth-w.offsetWidth)/2)-c(v,"borderLeftWidth");var z=((v.offsetHeight-w.offsetHeight)/2)-c(v,"borderTopWidth");if(A){u.left=C>0?(C+"px"):"0"}if(B){u.top=z>0?(z+"px"):"0"}}function c(u,s){return parseInt(o.css(u,s))||0}})(jQuery);jQuery(function(a){a.datepicker.regional.de={closeText:"schlie�en",prevText:"&#x3c;zur�ck",nextText:"Vor&#x3e;",currentText:"heute",monthNames:["Januar","Februar","M�rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthNamesShort:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],dayNamesShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayNamesMin:["So","Mo","Di","Mi","Do","Fr","Sa"],weekHeader:"Wo",dateFormat:"dd.mm.yy",firstDay:1,isRTL:false,showMonthAfterYear:false,yearSuffix:""}});jQuery(function(a){a.datepicker.regional.en={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"dd/mm/yy",firstDay:1,isRTL:false,showMonthAfterYear:false,yearSuffix:""}});
