var Prototype={Version:"1.6.0.3",Browser:{IE:!!(window.attachEvent&&navigator.userAgent.indexOf("Opera")===-1),Opera:navigator.userAgent.indexOf("Opera")>-1,WebKit:navigator.userAgent.indexOf("AppleWebKit/")>-1,Gecko:navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")===-1,MobileSafari:!!navigator.userAgent.match(/Apple.*Mobile.*Safari/)},BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:!!window.HTMLElement,SpecificElementExtensions:document.createElement("div")["__proto__"]&&document.createElement("div")["__proto__"]!==document.createElement("form")["__proto__"]},ScriptFragment:"<script[^>]*>([\\S\\s]*?)<\/script>",JSONFilter:/^\/\*-secure-([\s\S]*)\*\/\s*$/,emptyFunction:function(){},K:function(a){return a}};if(Prototype.Browser.MobileSafari){Prototype.BrowserFeatures.SpecificElementExtensions=false}var Class={create:function(){var e=null,d=$A(arguments);if(Object.isFunction(d[0])){e=d.shift()}function a(){this.initialize.apply(this,arguments)}Object.extend(a,Class.Methods);a.superclass=e;a.subclasses=[];if(e){var b=function(){};b.prototype=e.prototype;a.prototype=new b;e.subclasses.push(a)}for(var c=0;c<d.length;c++){a.addMethods(d[c])}if(!a.prototype.initialize){a.prototype.initialize=Prototype.emptyFunction}a.prototype.constructor=a;return a}};Class.Methods={addMethods:function(g){var c=this.superclass&&this.superclass.prototype;var b=Object.keys(g);if(!Object.keys({toString:true}).length){b.push("toString","valueOf")}for(var a=0,d=b.length;a<d;a++){var f=b[a],e=g[f];if(c&&Object.isFunction(e)&&e.argumentNames().first()=="$super"){var h=e;e=(function(i){return function(){return c[i].apply(this,arguments)}})(f).wrap(h);e.valueOf=h.valueOf.bind(h);e.toString=h.toString.bind(h)}this.prototype[f]=e}return this}};var Abstract={};Object.extend=function(a,c){for(var b in c){a[b]=c[b]}return a};Object.extend(Object,{inspect:function(a){try{if(Object.isUndefined(a)){return"undefined"}if(a===null){return"null"}return a.inspect?a.inspect():String(a)}catch(b){if(b instanceof RangeError){return"..."}throw b}},toJSON:function(a){var c=typeof a;switch(c){case"undefined":case"function":case"unknown":return;case"boolean":return a.toString()}if(a===null){return"null"}if(a.toJSON){return a.toJSON()}if(Object.isElement(a)){return}var b=[];for(var e in a){var d=Object.toJSON(a[e]);if(!Object.isUndefined(d)){b.push(e.toJSON()+": "+d)}}return"{"+b.join(", ")+"}"},toQueryString:function(a){return $H(a).toQueryString()},toHTML:function(a){return a&&a.toHTML?a.toHTML():String.interpret(a)},keys:function(a){var b=[];for(var c in a){b.push(c)}return b},values:function(b){var a=[];for(var c in b){a.push(b[c])}return a},clone:function(a){return Object.extend({},a)},isElement:function(a){return !!(a&&a.nodeType==1)},isArray:function(a){return a!=null&&typeof a=="object"&&"splice" in a&&"join" in a},isHash:function(a){return a instanceof Hash},isFunction:function(a){return typeof a=="function"},isString:function(a){return typeof a=="string"},isNumber:function(a){return typeof a=="number"},isUndefined:function(a){return typeof a=="undefined"}});Object.extend(Function.prototype,{argumentNames:function(){var a=this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1].replace(/\s+/g,"").split(",");return a.length==1&&!a[0]?[]:a},bind:function(){if(arguments.length<2&&Object.isUndefined(arguments[0])){return this}var a=this,c=$A(arguments),b=c.shift();return function(){return a.apply(b,c.concat($A(arguments)))}},bindAsEventListener:function(){var a=this,c=$A(arguments),b=c.shift();return function(d){return a.apply(b,[d||window.event].concat(c))}},curry:function(){if(!arguments.length){return this}var a=this,b=$A(arguments);return function(){return a.apply(this,b.concat($A(arguments)))}},delay:function(){var a=this,b=$A(arguments),c=b.shift()*1000;return window.setTimeout(function(){return a.apply(a,b)},c)},defer:function(){var a=[0.01].concat($A(arguments));return this.delay.apply(this,a)},wrap:function(b){var a=this;return function(){return b.apply(this,[a.bind(this)].concat($A(arguments)))}},methodize:function(){if(this._methodized){return this._methodized}var a=this;return this._methodized=function(){return a.apply(null,[this].concat($A(arguments)))}}});Date.prototype.toJSON=function(){return'"'+this.getUTCFullYear()+"-"+(this.getUTCMonth()+1).toPaddedString(2)+"-"+this.getUTCDate().toPaddedString(2)+"T"+this.getUTCHours().toPaddedString(2)+":"+this.getUTCMinutes().toPaddedString(2)+":"+this.getUTCSeconds().toPaddedString(2)+'Z"'};var Try={these:function(){var c;for(var b=0,d=arguments.length;b<d;b++){var a=arguments[b];try{c=a();break}catch(f){}}return c}};RegExp.prototype.match=RegExp.prototype.test;RegExp.escape=function(a){return String(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};var PeriodicalExecuter=Class.create({initialize:function(b,a){this.callback=b;this.frequency=a;this.currentlyExecuting=false;this.registerCallback()},registerCallback:function(){this.timer=setInterval(this.onTimerEvent.bind(this),this.frequency*1000)},execute:function(){this.callback(this)},stop:function(){if(!this.timer){return}clearInterval(this.timer);this.timer=null},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.execute()}finally{this.currentlyExecuting=false}}}});Object.extend(String,{interpret:function(a){return a==null?"":String(a)},specialChar:{"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\\":"\\\\"}});Object.extend(String.prototype,{gsub:function(e,c){var a="",d=this,b;c=arguments.callee.prepareReplacement(c);while(d.length>0){if(b=d.match(e)){a+=d.slice(0,b.index);a+=String.interpret(c(b));d=d.slice(b.index+b[0].length)}else{a+=d,d=""}}return a},sub:function(c,a,b){a=this.gsub.prepareReplacement(a);b=Object.isUndefined(b)?1:b;return this.gsub(c,function(d){if(--b<0){return d[0]}return a(d)})},scan:function(b,a){this.gsub(b,a);return String(this)},truncate:function(b,a){b=b||30;a=Object.isUndefined(a)?"...":a;return this.length>b?this.slice(0,b-a.length)+a:String(this)},strip:function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,"img"),"")},extractScripts:function(){var b=new RegExp(Prototype.ScriptFragment,"img");var a=new RegExp(Prototype.ScriptFragment,"im");return(this.match(b)||[]).map(function(c){return(c.match(a)||["",""])[1]})},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)})},escapeHTML:function(){var a=arguments.callee;a.text.data=this;return a.div.innerHTML},unescapeHTML:function(){var a=new Element("div");a.innerHTML=this.stripTags();return a.childNodes[0]?(a.childNodes.length>1?$A(a.childNodes).inject("",function(b,c){return b+c.nodeValue}):a.childNodes[0].nodeValue):""},toQueryParams:function(b){var a=this.strip().match(/([^?#]*)(#.*)?$/);if(!a){return{}}return a[1].split(b||"&").inject({},function(e,f){if((f=f.split("="))[0]){var c=decodeURIComponent(f.shift());var d=f.length>1?f.join("="):f[0];if(d!=undefined){d=decodeURIComponent(d)}if(c in e){if(!Object.isArray(e[c])){e[c]=[e[c]]}e[c].push(d)}else{e[c]=d}}return e})},toArray:function(){return this.split("")},succ:function(){return this.slice(0,this.length-1)+String.fromCharCode(this.charCodeAt(this.length-1)+1)},times:function(a){return a<1?"":new Array(a+1).join(this)},camelize:function(){var d=this.split("-"),a=d.length;if(a==1){return d[0]}var c=this.charAt(0)=="-"?d[0].charAt(0).toUpperCase()+d[0].substring(1):d[0];for(var b=1;b<a;b++){c+=d[b].charAt(0).toUpperCase()+d[b].substring(1)}return c},capitalize:function(){return this.charAt(0).toUpperCase()+this.substring(1).toLowerCase()},underscore:function(){return this.gsub(/::/,"/").gsub(/([A-Z]+)([A-Z][a-z])/,"#{1}_#{2}").gsub(/([a-z\d])([A-Z])/,"#{1}_#{2}").gsub(/-/,"_").toLowerCase()},dasherize:function(){return this.gsub(/_/,"-")},inspect:function(b){var a=this.gsub(/[\x00-\x1f\\]/,function(c){var d=String.specialChar[c[0]];return d?d:"\\u00"+c[0].charCodeAt().toPaddedString(2,16)});if(b){return'"'+a.replace(/"/g,'\\"')+'"'}return"'"+a.replace(/'/g,"\\'")+"'"},toJSON:function(){return this.inspect(true)},unfilterJSON:function(a){return this.sub(a||Prototype.JSONFilter,"#{1}")},isJSON:function(){var a=this;if(a.blank()){return false}a=this.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");return(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(a)},evalJSON:function(sanitize){var json=this.unfilterJSON();try{if(!sanitize||json.isJSON()){return eval("("+json+")")}}catch(e){}throw new SyntaxError("Badly formed JSON string: "+this.inspect())},include:function(a){return this.indexOf(a)>-1},startsWith:function(a){return this.indexOf(a)===0},endsWith:function(a){var b=this.length-a.length;return b>=0&&this.lastIndexOf(a)===b},empty:function(){return this==""},blank:function(){return/^\s*$/.test(this)},interpolate:function(a,b){return new Template(this,b).evaluate(a)}});if(Prototype.Browser.WebKit||Prototype.Browser.IE){Object.extend(String.prototype,{escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.stripTags().replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")}})}String.prototype.gsub.prepareReplacement=function(b){if(Object.isFunction(b)){return b}var a=new Template(b);return function(c){return a.evaluate(c)}};String.prototype.parseQuery=String.prototype.toQueryParams;Object.extend(String.prototype.escapeHTML,{div:document.createElement("div"),text:document.createTextNode("")});String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.text);var Template=Class.create({initialize:function(a,b){this.template=a.toString();this.pattern=b||Template.Pattern},evaluate:function(a){if(Object.isFunction(a.toTemplateReplacements)){a=a.toTemplateReplacements()}return this.template.gsub(this.pattern,function(d){if(a==null){return""}var f=d[1]||"";if(f=="\\"){return d[2]}var b=a,g=d[3];var e=/^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;d=e.exec(g);if(d==null){return f}while(d!=null){var c=d[1].startsWith("[")?d[2].gsub("\\\\]","]"):d[1];b=b[c];if(null==b||""==d[3]){break}g=g.substring("["==d[3]?d[1].length:d[0].length);d=e.exec(g)}return f+String.interpret(b)})}});Template.Pattern=/(^|.|\r|\n)(#\{(.*?)\})/;var $break={};var Enumerable={each:function(c,b){var a=0;try{this._each(function(e){c.call(b,e,a++)})}catch(d){if(d!=$break){throw d}}return this},eachSlice:function(d,c,b){var a=-d,e=[],f=this.toArray();if(d<1){return f}while((a+=d)<f.length){e.push(f.slice(a,a+d))}return e.collect(c,b)},all:function(c,b){c=c||Prototype.K;var a=true;this.each(function(e,d){a=a&&!!c.call(b,e,d);if(!a){throw $break}});return a},any:function(c,b){c=c||Prototype.K;var a=false;this.each(function(e,d){if(a=!!c.call(b,e,d)){throw $break}});return a},collect:function(c,b){c=c||Prototype.K;var a=[];this.each(function(e,d){a.push(c.call(b,e,d))});return a},detect:function(c,b){var a;this.each(function(e,d){if(c.call(b,e,d)){a=e;throw $break}});return a},findAll:function(c,b){var a=[];this.each(function(e,d){if(c.call(b,e,d)){a.push(e)}});return a},grep:function(d,c,b){c=c||Prototype.K;var a=[];if(Object.isString(d)){d=new RegExp(d)}this.each(function(f,e){if(d.match(f)){a.push(c.call(b,f,e))}});return a},include:function(a){if(Object.isFunction(this.indexOf)){if(this.indexOf(a)!=-1){return true}}var b=false;this.each(function(c){if(c==a){b=true;throw $break}});return b},inGroupsOf:function(b,a){a=Object.isUndefined(a)?null:a;return this.eachSlice(b,function(c){while(c.length<b){c.push(a)}return c})},inject:function(a,c,b){this.each(function(e,d){a=c.call(b,a,e,d)});return a},invoke:function(b){var a=$A(arguments).slice(1);return this.map(function(c){return c[b].apply(c,a)})},max:function(c,b){c=c||Prototype.K;var a;this.each(function(e,d){e=c.call(b,e,d);if(a==null||e>=a){a=e}});return a},min:function(c,b){c=c||Prototype.K;var a;this.each(function(e,d){e=c.call(b,e,d);if(a==null||e<a){a=e}});return a},partition:function(d,b){d=d||Prototype.K;var c=[],a=[];this.each(function(f,e){(d.call(b,f,e)?c:a).push(f)});return[c,a]},pluck:function(b){var a=[];this.each(function(c){a.push(c[b])});return a},reject:function(c,b){var a=[];this.each(function(e,d){if(!c.call(b,e,d)){a.push(e)}});return a},sortBy:function(b,a){return this.map(function(d,c){return{value:d,criteria:b.call(a,d,c)}}).sort(function(f,e){var d=f.criteria,c=e.criteria;return d<c?-1:d>c?1:0}).pluck("value")},toArray:function(){return this.map()},zip:function(){var b=Prototype.K,a=$A(arguments);if(Object.isFunction(a.last())){b=a.pop()}var c=[this].concat(a).map($A);return this.map(function(e,d){return b(c.pluck(d))})},size:function(){return this.toArray().length},inspect:function(){return"#<Enumerable:"+this.toArray().inspect()+">"}};Object.extend(Enumerable,{map:Enumerable.collect,find:Enumerable.detect,select:Enumerable.findAll,filter:Enumerable.findAll,member:Enumerable.include,entries:Enumerable.toArray,every:Enumerable.all,some:Enumerable.any});function $A(c){if(!c){return[]}if(c.toArray){return c.toArray()}var b=c.length||0,a=new Array(b);while(b--){a[b]=c[b]}return a}if(Prototype.Browser.WebKit){$A=function(c){if(!c){return[]}if(!(typeof c==="function"&&typeof c.length==="number"&&typeof c.item==="function")&&c.toArray){return c.toArray()}var b=c.length||0,a=new Array(b);while(b--){a[b]=c[b]}return a}}Array.from=$A;Object.extend(Array.prototype,Enumerable);if(!Array.prototype._reverse){Array.prototype._reverse=Array.prototype.reverse}Object.extend(Array.prototype,{_each:function(b){for(var a=0,c=this.length;a<c;a++){b(this[a])}},clear:function(){this.length=0;return this},first:function(){return this[0]},last:function(){return this[this.length-1]},compact:function(){return this.select(function(a){return a!=null})},flatten:function(){return this.inject([],function(b,a){return b.concat(Object.isArray(a)?a.flatten():[a])})},without:function(){var a=$A(arguments);return this.select(function(b){return !a.include(b)})},reverse:function(a){return(a!==false?this:this.toArray())._reverse()},reduce:function(){return this.length>1?this:this[0]},uniq:function(a){return this.inject([],function(d,c,b){if(0==b||(a?d.last()!=c:!d.include(c))){d.push(c)}return d})},intersect:function(a){return this.uniq().findAll(function(b){return a.detect(function(c){return b===c})})},clone:function(){return[].concat(this)},size:function(){return this.length},inspect:function(){return"["+this.map(Object.inspect).join(", ")+"]"},toJSON:function(){var a=[];this.each(function(b){var c=Object.toJSON(b);if(!Object.isUndefined(c)){a.push(c)}});return"["+a.join(", ")+"]"}});if(Object.isFunction(Array.prototype.forEach)){Array.prototype._each=Array.prototype.forEach}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c,a){a||(a=0);var b=this.length;if(a<0){a=b+a}for(;a<b;a++){if(this[a]===c){return a}}return -1}}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(b,a){a=isNaN(a)?this.length:(a<0?this.length+a:a)+1;var c=this.slice(0,a).reverse().indexOf(b);return(c<0)?c:a-c-1}}Array.prototype.toArray=Array.prototype.clone;function $w(a){if(!Object.isString(a)){return[]}a=a.strip();return a?a.split(/\s+/):[]}if(Prototype.Browser.Opera){Array.prototype.concat=function(){var e=[];for(var b=0,c=this.length;b<c;b++){e.push(this[b])}for(var b=0,c=arguments.length;b<c;b++){if(Object.isArray(arguments[b])){for(var a=0,d=arguments[b].length;a<d;a++){e.push(arguments[b][a])}}else{e.push(arguments[b])}}return e}}Object.extend(Number.prototype,{toColorPart:function(){return this.toPaddedString(2,16)},succ:function(){return this+1},times:function(b,a){$R(0,this,true).each(b,a);return this},toPaddedString:function(c,b){var a=this.toString(b||10);return"0".times(c-a.length)+a},toJSON:function(){return isFinite(this)?this.toString():"null"}});$w("abs round ceil floor").each(function(a){Number.prototype[a]=Math[a].methodize()});function $H(a){return new Hash(a)}var Hash=Class.create(Enumerable,(function(){function a(b,c){if(Object.isUndefined(c)){return b}return b+"="+encodeURIComponent(String.interpret(c))}return{initialize:function(b){this._object=Object.isHash(b)?b.toObject():Object.clone(b)},_each:function(c){for(var b in this._object){var d=this._object[b],e=[b,d];e.key=b;e.value=d;c(e)}},set:function(b,c){return this._object[b]=c},get:function(b){if(this._object[b]!==Object.prototype[b]){return this._object[b]}},unset:function(b){var c=this._object[b];delete this._object[b];return c},toObject:function(){return Object.clone(this._object)},keys:function(){return this.pluck("key")},values:function(){return this.pluck("value")},index:function(c){var b=this.detect(function(d){return d.value===c});return b&&b.key},merge:function(b){return this.clone().update(b)},update:function(b){return new Hash(b).inject(this,function(c,d){c.set(d.key,d.value);return c})},toQueryString:function(){return this.inject([],function(d,e){var c=encodeURIComponent(e.key),b=e.value;if(b&&typeof b=="object"){if(Object.isArray(b)){return d.concat(b.map(a.curry(c)))}}else{d.push(a(c,b))}return d}).join("&")},inspect:function(){return"#<Hash:{"+this.map(function(b){return b.map(Object.inspect).join(": ")}).join(", ")+"}>"},toJSON:function(){return Object.toJSON(this.toObject())},clone:function(){return new Hash(this)}}})());Hash.prototype.toTemplateReplacements=Hash.prototype.toObject;Hash.from=$H;var ObjectRange=Class.create(Enumerable,{initialize:function(c,a,b){this.start=c;this.end=a;this.exclusive=b},_each:function(a){var b=this.start;while(this.include(b)){a(b);b=b.succ()}},include:function(a){if(a<this.start){return false}if(this.exclusive){return a<this.end}return a<=this.end}});var $R=function(c,a,b){return new ObjectRange(c,a,b)};var Ajax={getTransport:function(){return Try.these(function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")})||false},activeRequestCount:0};Ajax.Responders={responders:[],_each:function(a){this.responders._each(a)},register:function(a){if(!this.include(a)){this.responders.push(a)}},unregister:function(a){this.responders=this.responders.without(a)},dispatch:function(d,b,c,a){this.each(function(f){if(Object.isFunction(f[d])){try{f[d].apply(f,[b,c,a])}catch(g){}}})}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++},onComplete:function(){Ajax.activeRequestCount--}});Ajax.Base=Class.create({initialize:function(a){this.options={method:"post",asynchronous:true,contentType:"application/x-www-form-urlencoded",encoding:"UTF-8",parameters:"",evalJSON:true,evalJS:true};Object.extend(this.options,a||{});this.options.method=this.options.method.toLowerCase();if(Object.isString(this.options.parameters)){this.options.parameters=this.options.parameters.toQueryParams()}else{if(Object.isHash(this.options.parameters)){this.options.parameters=this.options.parameters.toObject()}}}});Ajax.Request=Class.create(Ajax.Base,{_complete:false,initialize:function($super,b,a){$super(a);this.transport=Ajax.getTransport();this.request(b)},request:function(b){this.url=b;this.method=this.options.method;var d=Object.clone(this.options.parameters);if(!["get","post"].include(this.method)){d._method=this.method;this.method="post"}this.parameters=d;if(d=Object.toQueryString(d)){if(this.method=="get"){this.url+=(this.url.include("?")?"&":"?")+d}else{if(/Konqueror|Safari|KHTML/.test(navigator.userAgent)){d+="&_="}}}try{var a=new Ajax.Response(this);if(this.options.onCreate){this.options.onCreate(a)}Ajax.Responders.dispatch("onCreate",this,a);this.transport.open(this.method.toUpperCase(),this.url,this.options.asynchronous);if(this.options.asynchronous){this.respondToReadyState.bind(this).defer(1)}this.transport.onreadystatechange=this.onStateChange.bind(this);this.setRequestHeaders();this.body=this.method=="post"?(this.options.postBody||d):null;this.transport.send(this.body);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange()}}catch(c){this.dispatchException(c)}},onStateChange:function(){var a=this.transport.readyState;if(a>1&&!((a==4)&&this._complete)){this.respondToReadyState(this.transport.readyState)}},setRequestHeaders:function(){var e={"X-Requested-With":"XMLHttpRequest","X-Prototype-Version":Prototype.Version,Accept:"text/javascript, text/html, application/xml, text/xml, */*"};if(this.method=="post"){e["Content-type"]=this.options.contentType+(this.options.encoding?"; charset="+this.options.encoding:"");if(this.transport.overrideMimeType&&(navigator.userAgent.match(/Gecko\/(\d{4})/)||[0,2005])[1]<2005){e.Connection="close"}}if(typeof this.options.requestHeaders=="object"){var c=this.options.requestHeaders;if(Object.isFunction(c.push)){for(var b=0,d=c.length;b<d;b+=2){e[c[b]]=c[b+1]}}else{$H(c).each(function(f){e[f.key]=f.value})}}for(var a in e){this.transport.setRequestHeader(a,e[a])}},success:function(){var a=this.getStatus();return !a||(a>=200&&a<300)},getStatus:function(){try{return this.transport.status||0}catch(a){return 0}},respondToReadyState:function(a){var c=Ajax.Request.Events[a],b=new Ajax.Response(this);if(c=="Complete"){try{this._complete=true;(this.options["on"+b.status]||this.options["on"+(this.success()?"Success":"Failure")]||Prototype.emptyFunction)(b,b.headerJSON)}catch(d){this.dispatchException(d)}var f=b.getHeader("Content-type");if(this.options.evalJS=="force"||(this.options.evalJS&&this.isSameOrigin()&&f&&f.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))){this.evalResponse()}}try{(this.options["on"+c]||Prototype.emptyFunction)(b,b.headerJSON);Ajax.Responders.dispatch("on"+c,this,b,b.headerJSON)}catch(d){this.dispatchException(d)}if(c=="Complete"){this.transport.onreadystatechange=Prototype.emptyFunction}},isSameOrigin:function(){var a=this.url.match(/^\s*https?:\/\/[^\/]*/);return !a||(a[0]=="#{protocol}//#{domain}#{port}".interpolate({protocol:location.protocol,domain:document.domain,port:location.port?":"+location.port:""}))},getHeader:function(a){try{return this.transport.getResponseHeader(a)||null}catch(b){return null}},evalResponse:function(){try{return eval((this.transport.responseText||"").unfilterJSON())}catch(e){this.dispatchException(e)}},dispatchException:function(a){(this.options.onException||Prototype.emptyFunction)(this,a);Ajax.Responders.dispatch("onException",this,a)}});Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];Ajax.Response=Class.create({initialize:function(c){this.request=c;var d=this.transport=c.transport,a=this.readyState=d.readyState;if((a>2&&!Prototype.Browser.IE)||a==4){this.status=this.getStatus();this.statusText=this.getStatusText();this.responseText=String.interpret(d.responseText);this.headerJSON=this._getHeaderJSON()}if(a==4){var b=d.responseXML;this.responseXML=Object.isUndefined(b)?null:b;this.responseJSON=this._getResponseJSON()}},status:0,statusText:"",getStatus:Ajax.Request.prototype.getStatus,getStatusText:function(){try{return this.transport.statusText||""}catch(a){return""}},getHeader:Ajax.Request.prototype.getHeader,getAllHeaders:function(){try{return this.getAllResponseHeaders()}catch(a){return null}},getResponseHeader:function(a){return this.transport.getResponseHeader(a)},getAllResponseHeaders:function(){return this.transport.getAllResponseHeaders()},_getHeaderJSON:function(){var a=this.getHeader("X-JSON");if(!a){return null}a=decodeURIComponent(escape(a));try{return a.evalJSON(this.request.options.sanitizeJSON||!this.request.isSameOrigin())}catch(b){this.request.dispatchException(b)}},_getResponseJSON:function(){var a=this.request.options;if(!a.evalJSON||(a.evalJSON!="force"&&!(this.getHeader("Content-type")||"").include("application/json"))||this.responseText.blank()){return null}try{return this.responseText.evalJSON(a.sanitizeJSON||!this.request.isSameOrigin())}catch(b){this.request.dispatchException(b)}}});Ajax.Updater=Class.create(Ajax.Request,{initialize:function($super,a,c,b){this.container={success:(a.success||a),failure:(a.failure||(a.success?null:a))};b=Object.clone(b);var d=b.onComplete;b.onComplete=(function(e,f){this.updateContent(e.responseText);if(Object.isFunction(d)){d(e,f)}}).bind(this);$super(c,b)},updateContent:function(d){var c=this.container[this.success()?"success":"failure"],a=this.options;if(!a.evalScripts){d=d.stripScripts()}if(c=$(c)){if(a.insertion){if(Object.isString(a.insertion)){var b={};b[a.insertion]=d;c.insert(b)}else{a.insertion(c,d)}}else{c.update(d)}}}});Ajax.PeriodicalUpdater=Class.create(Ajax.Base,{initialize:function($super,a,c,b){$super(b);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=a;this.url=c;this.start()},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent()},stop:function(){this.updater.options.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments)},updateComplete:function(a){if(this.options.decay){this.decay=(a.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=a.responseText}this.timer=this.onTimerEvent.bind(this).delay(this.decay*this.frequency)},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options)}});function $(b){if(arguments.length>1){for(var a=0,d=[],c=arguments.length;a<c;a++){d.push($(arguments[a]))}return d}if(Object.isString(b)){b=document.getElementById(b)}return Element.extend(b)}if(Prototype.BrowserFeatures.XPath){document._getElementsByXPath=function(f,a){var c=[];var e=document.evaluate(f,$(a)||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);for(var b=0,d=e.snapshotLength;b<d;b++){c.push(Element.extend(e.snapshotItem(b)))}return c}}if(!window.Node){var Node={}}if(!Node.ELEMENT_NODE){Object.extend(Node,{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12})}(function(){var a=this.Element;this.Element=function(d,c){c=c||{};d=d.toLowerCase();var b=Element.cache;if(Prototype.Browser.IE&&c.name){d="<"+d+' name="'+c.name+'">';delete c.name;return Element.writeAttribute(document.createElement(d),c)}if(!b[d]){b[d]=Element.extend(document.createElement(d))}return Element.writeAttribute(b[d].cloneNode(false),c)};Object.extend(this.Element,a||{});if(a){this.Element.prototype=a.prototype}}).call(window);Element.cache={};Element.Methods={visible:function(a){return $(a).style.display!="none"},toggle:function(a){a=$(a);Element[Element.visible(a)?"hide":"show"](a);return a},hide:function(a){a=$(a);a.style.display="none";return a},show:function(a){a=$(a);a.style.display="";return a},remove:function(a){a=$(a);a.parentNode.removeChild(a);return a},update:function(a,b){a=$(a);if(b&&b.toElement){b=b.toElement()}if(Object.isElement(b)){return a.update().insert(b)}b=Object.toHTML(b);a.innerHTML=b.stripScripts();b.evalScripts.bind(b).defer();return a},replace:function(b,c){b=$(b);if(c&&c.toElement){c=c.toElement()}else{if(!Object.isElement(c)){c=Object.toHTML(c);var a=b.ownerDocument.createRange();a.selectNode(b);c.evalScripts.bind(c).defer();c=a.createContextualFragment(c.stripScripts())}}b.parentNode.replaceChild(c,b);return b},insert:function(c,e){c=$(c);if(Object.isString(e)||Object.isNumber(e)||Object.isElement(e)||(e&&(e.toElement||e.toHTML))){e={bottom:e}}var d,f,b,g;for(var a in e){d=e[a];a=a.toLowerCase();f=Element._insertionTranslations[a];if(d&&d.toElement){d=d.toElement()}if(Object.isElement(d)){f(c,d);continue}d=Object.toHTML(d);b=((a=="before"||a=="after")?c.parentNode:c).tagName.toUpperCase();g=Element._getContentFromAnonymousElement(b,d.stripScripts());if(a=="top"||a=="after"){g.reverse()}g.each(f.curry(c));d.evalScripts.bind(d).defer()}return c},wrap:function(b,c,a){b=$(b);if(Object.isElement(c)){$(c).writeAttribute(a||{})}else{if(Object.isString(c)){c=new Element(c,a)}else{c=new Element("div",c)}}if(b.parentNode){b.parentNode.replaceChild(c,b)}c.appendChild(b);return c},inspect:function(b){b=$(b);var a="<"+b.tagName.toLowerCase();$H({id:"id",className:"class"}).each(function(f){var e=f.first(),c=f.last();var d=(b[e]||"").toString();if(d){a+=" "+c+"="+d.inspect(true)}});return a+">"},recursivelyCollect:function(a,c){a=$(a);var b=[];while(a=a[c]){if(a.nodeType==1){b.push(Element.extend(a))}}return b},ancestors:function(a){return $(a).recursivelyCollect("parentNode")},descendants:function(a){return $(a).select("*")},firstDescendant:function(a){a=$(a).firstChild;while(a&&a.nodeType!=1){a=a.nextSibling}return $(a)},immediateDescendants:function(a){if(!(a=$(a).firstChild)){return[]}while(a&&a.nodeType!=1){a=a.nextSibling}if(a){return[a].concat($(a).nextSiblings())}return[]},previousSiblings:function(a){return $(a).recursivelyCollect("previousSibling")},nextSiblings:function(a){return $(a).recursivelyCollect("nextSibling")},siblings:function(a){a=$(a);return a.previousSiblings().reverse().concat(a.nextSiblings())},match:function(b,a){if(Object.isString(a)){a=new Selector(a)}return a.match($(b))},up:function(b,d,a){b=$(b);if(arguments.length==1){return $(b.parentNode)}var c=b.ancestors();return Object.isNumber(d)?c[d]:Selector.findElement(c,d,a)},down:function(b,c,a){b=$(b);if(arguments.length==1){return b.firstDescendant()}return Object.isNumber(c)?b.descendants()[c]:Element.select(b,c)[a||0]},previous:function(b,d,a){b=$(b);if(arguments.length==1){return $(Selector.handlers.previousElementSibling(b))}var c=b.previousSiblings();return Object.isNumber(d)?c[d]:Selector.findElement(c,d,a)},next:function(c,d,b){c=$(c);if(arguments.length==1){return $(Selector.handlers.nextElementSibling(c))}var a=c.nextSiblings();return Object.isNumber(d)?a[d]:Selector.findElement(a,d,b)},select:function(){var a=$A(arguments),b=$(a.shift());return Selector.findChildElements(b,a)},adjacent:function(){var a=$A(arguments),b=$(a.shift());return Selector.findChildElements(b.parentNode,a).without(b)},identify:function(b){b=$(b);var c=b.readAttribute("id"),a=arguments.callee;if(c){return c}do{c="anonymous_element_"+a.counter++}while($(c));b.writeAttribute("id",c);return c},readAttribute:function(c,a){c=$(c);if(Prototype.Browser.IE){var b=Element._attributeTranslations.read;if(b.values[a]){return b.values[a](c,a)}if(b.names[a]){a=b.names[a]}if(a.include(":")){return(!c.attributes||!c.attributes[a])?null:c.attributes[a].value}}return c.getAttribute(a)},writeAttribute:function(e,c,f){e=$(e);var b={},d=Element._attributeTranslations.write;if(typeof c=="object"){b=c}else{b[c]=Object.isUndefined(f)?true:f}for(var a in b){c=d.names[a]||a;f=b[a];if(d.values[a]){c=d.values[a](e,f)}if(f===false||f===null){e.removeAttribute(c)}else{if(f===true){e.setAttribute(c,c)}else{e.setAttribute(c,f)}}}return e},getHeight:function(a){return $(a).getDimensions().height},getWidth:function(a){return $(a).getDimensions().width},classNames:function(a){return new Element.ClassNames(a)},hasClassName:function(a,b){if(!(a=$(a))){return}var c=a.className;return(c.length>0&&(c==b||new RegExp("(^|\\s)"+b+"(\\s|$)").test(c)))},addClassName:function(a,b){if(!(a=$(a))){return}if(!a.hasClassName(b)){a.className+=(a.className?" ":"")+b}return a},removeClassName:function(a,b){if(!(a=$(a))){return}a.className=a.className.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)")," ").strip();return a},toggleClassName:function(a,b){if(!(a=$(a))){return}return a[a.hasClassName(b)?"removeClassName":"addClassName"](b)},cleanWhitespace:function(b){b=$(b);var c=b.firstChild;while(c){var a=c.nextSibling;if(c.nodeType==3&&!/\S/.test(c.nodeValue)){b.removeChild(c)}c=a}return b},empty:function(a){return $(a).innerHTML.blank()},descendantOf:function(b,a){b=$(b),a=$(a);if(b.compareDocumentPosition){return(b.compareDocumentPosition(a)&8)===8}if(a.contains){return a.contains(b)&&a!==b}while(b=b.parentNode){if(b==a){return true}}return false},scrollTo:function(a){a=$(a);var b=a.cumulativeOffset();window.scrollTo(b[0],b[1]);return a},getStyle:function(b,c){b=$(b);c=c=="float"?"cssFloat":c.camelize();var d=b.style[c];if(!d||d=="auto"){var a=document.defaultView.getComputedStyle(b,null);d=a?a[c]:null}if(c=="opacity"){return d?parseFloat(d):1}return d=="auto"?null:d},getOpacity:function(a){return $(a).getStyle("opacity")},setStyle:function(b,c){b=$(b);var e=b.style,a;if(Object.isString(c)){b.style.cssText+=";"+c;return c.include("opacity")?b.setOpacity(c.match(/opacity:\s*(\d?\.?\d*)/)[1]):b}for(var d in c){if(d=="opacity"){b.setOpacity(c[d])}else{e[(d=="float"||d=="cssFloat")?(Object.isUndefined(e.styleFloat)?"cssFloat":"styleFloat"):d]=c[d]}}return b},setOpacity:function(a,b){a=$(a);a.style.opacity=(b==1||b==="")?"":(b<0.00001)?0:b;return a},getDimensions:function(c){c=$(c);var g=c.getStyle("display");if(g!="none"&&g!=null){return{width:c.offsetWidth,height:c.offsetHeight}}var b=c.style;var f=b.visibility;var d=b.position;var a=b.display;b.visibility="hidden";b.position="absolute";b.display="block";var h=c.clientWidth;var e=c.clientHeight;b.display=a;b.position=d;b.visibility=f;return{width:h,height:e}},makePositioned:function(a){a=$(a);var b=Element.getStyle(a,"position");if(b=="static"||!b){a._madePositioned=true;a.style.position="relative";if(Prototype.Browser.Opera){a.style.top=0;a.style.left=0}}return a},undoPositioned:function(a){a=$(a);if(a._madePositioned){a._madePositioned=undefined;a.style.position=a.style.top=a.style.left=a.style.bottom=a.style.right=""}return a},makeClipping:function(a){a=$(a);if(a._overflow){return a}a._overflow=Element.getStyle(a,"overflow")||"auto";if(a._overflow!=="hidden"){a.style.overflow="hidden"}return a},undoClipping:function(a){a=$(a);if(!a._overflow){return a}a.style.overflow=a._overflow=="auto"?"":a._overflow;a._overflow=null;return a},cumulativeOffset:function(b){var a=0,c=0;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;b=b.offsetParent}while(b);return Element._returnOffset(c,a)},positionedOffset:function(b){var a=0,d=0;do{a+=b.offsetTop||0;d+=b.offsetLeft||0;b=b.offsetParent;if(b){if(b.tagName.toUpperCase()=="BODY"){break}var c=Element.getStyle(b,"position");if(c!=="static"){break}}}while(b);return Element._returnOffset(d,a)},absolutize:function(b){b=$(b);if(b.getStyle("position")=="absolute"){return b}var d=b.positionedOffset();var f=d[1];var e=d[0];var c=b.clientWidth;var a=b.clientHeight;b._originalLeft=e-parseFloat(b.style.left||0);b._originalTop=f-parseFloat(b.style.top||0);b._originalWidth=b.style.width;b._originalHeight=b.style.height;b.style.position="absolute";b.style.top=f+"px";b.style.left=e+"px";b.style.width=c+"px";b.style.height=a+"px";return b},relativize:function(a){a=$(a);if(a.getStyle("position")=="relative"){return a}a.style.position="relative";var c=parseFloat(a.style.top||0)-(a._originalTop||0);var b=parseFloat(a.style.left||0)-(a._originalLeft||0);a.style.top=c+"px";a.style.left=b+"px";a.style.height=a._originalHeight;a.style.width=a._originalWidth;return a},cumulativeScrollOffset:function(b){var a=0,c=0;do{a+=b.scrollTop||0;c+=b.scrollLeft||0;b=b.parentNode}while(b);return Element._returnOffset(c,a)},getOffsetParent:function(a){if(a.offsetParent){return $(a.offsetParent)}if(a==document.body){return $(a)}while((a=a.parentNode)&&a!=document.body){if(Element.getStyle(a,"position")!="static"){return $(a)}}return $(document.body)},viewportOffset:function(d){var a=0,c=0;var b=d;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;if(b.offsetParent==document.body&&Element.getStyle(b,"position")=="absolute"){break}}while(b=b.offsetParent);b=d;do{if(!Prototype.Browser.Opera||(b.tagName&&(b.tagName.toUpperCase()=="BODY"))){a-=b.scrollTop||0;c-=b.scrollLeft||0}}while(b=b.parentNode);return Element._returnOffset(c,a)},clonePosition:function(b,d){var a=Object.extend({setLeft:true,setTop:true,setWidth:true,setHeight:true,offsetTop:0,offsetLeft:0},arguments[2]||{});d=$(d);var e=d.viewportOffset();b=$(b);var f=[0,0];var c=null;if(Element.getStyle(b,"position")=="absolute"){c=b.getOffsetParent();f=c.viewportOffset()}if(c==document.body){f[0]-=document.body.offsetLeft;f[1]-=document.body.offsetTop}if(a.setLeft){b.style.left=(e[0]-f[0]+a.offsetLeft)+"px"}if(a.setTop){b.style.top=(e[1]-f[1]+a.offsetTop)+"px"}if(a.setWidth){b.style.width=d.offsetWidth+"px"}if(a.setHeight){b.style.height=d.offsetHeight+"px"}return b}};Element.Methods.identify.counter=1;Object.extend(Element.Methods,{getElementsBySelector:Element.Methods.select,childElements:Element.Methods.immediateDescendants});Element._attributeTranslations={write:{names:{className:"class",htmlFor:"for"},values:{}}};if(Prototype.Browser.Opera){Element.Methods.getStyle=Element.Methods.getStyle.wrap(function(d,b,c){switch(c){case"left":case"top":case"right":case"bottom":if(d(b,"position")==="static"){return null}case"height":case"width":if(!Element.visible(b)){return null}var e=parseInt(d(b,c),10);if(e!==b["offset"+c.capitalize()]){return e+"px"}var a;if(c==="height"){a=["border-top-width","padding-top","padding-bottom","border-bottom-width"]}else{a=["border-left-width","padding-left","padding-right","border-right-width"]}return a.inject(e,function(f,g){var h=d(b,g);return h===null?f:f-parseInt(h,10)})+"px";default:return d(b,c)}});Element.Methods.readAttribute=Element.Methods.readAttribute.wrap(function(c,a,b){if(b==="title"){return a.title}return c(a,b)})}else{if(Prototype.Browser.IE){Element.Methods.getOffsetParent=Element.Methods.getOffsetParent.wrap(function(c,b){b=$(b);try{b.offsetParent}catch(f){return $(document.body)}var a=b.getStyle("position");if(a!=="static"){return c(b)}b.setStyle({position:"relative"});var d=c(b);b.setStyle({position:a});return d});$w("positionedOffset viewportOffset").each(function(a){Element.Methods[a]=Element.Methods[a].wrap(function(f,c){c=$(c);try{c.offsetParent}catch(h){return Element._returnOffset(0,0)}var b=c.getStyle("position");if(b!=="static"){return f(c)}var d=c.getOffsetParent();if(d&&d.getStyle("position")==="fixed"){d.setStyle({zoom:1})}c.setStyle({position:"relative"});var g=f(c);c.setStyle({position:b});return g})});Element.Methods.cumulativeOffset=Element.Methods.cumulativeOffset.wrap(function(b,a){try{a.offsetParent}catch(c){return Element._returnOffset(0,0)}return b(a)});Element.Methods.getStyle=function(a,b){a=$(a);b=(b=="float"||b=="cssFloat")?"styleFloat":b.camelize();var c=a.style[b];if(!c&&a.currentStyle){c=a.currentStyle[b]}if(b=="opacity"){if(c=(a.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){if(c[1]){return parseFloat(c[1])/100}}return 1}if(c=="auto"){if((b=="width"||b=="height")&&(a.getStyle("display")!="none")){return a["offset"+b.capitalize()]+"px"}return null}return c};Element.Methods.setOpacity=function(b,e){function f(g){return g.replace(/alpha\([^\)]*\)/gi,"")}b=$(b);var a=b.currentStyle;if((a&&!a.hasLayout)||(!a&&b.style.zoom=="normal")){b.style.zoom=1}var d=b.getStyle("filter"),c=b.style;if(e==1||e===""){(d=f(d))?c.filter=d:c.removeAttribute("filter");return b}else{if(e<0.00001){e=0}}c.filter=f(d)+"alpha(opacity="+(e*100)+")";return b};Element._attributeTranslations={read:{names:{"class":"className","for":"htmlFor"},values:{_getAttr:function(a,b){return a.getAttribute(b,2)},_getAttrNode:function(a,c){var b=a.getAttributeNode(c);return b?b.value:""},_getEv:function(a,b){b=a.getAttribute(b);return b?b.toString().slice(23,-2):null},_flag:function(a,b){return $(a).hasAttribute(b)?b:null},style:function(a){return a.style.cssText.toLowerCase()},title:function(a){return a.title}}}};Element._attributeTranslations.write={names:Object.extend({cellpadding:"cellPadding",cellspacing:"cellSpacing"},Element._attributeTranslations.read.names),values:{checked:function(a,b){a.checked=!!b},style:function(a,b){a.style.cssText=b?b:""}}};Element._attributeTranslations.has={};$w("colSpan rowSpan vAlign dateTime accessKey tabIndex encType maxLength readOnly longDesc frameBorder").each(function(a){Element._attributeTranslations.write.names[a.toLowerCase()]=a;Element._attributeTranslations.has[a.toLowerCase()]=a});(function(a){Object.extend(a,{href:a._getAttr,src:a._getAttr,type:a._getAttr,action:a._getAttrNode,disabled:a._flag,checked:a._flag,readonly:a._flag,multiple:a._flag,onload:a._getEv,onunload:a._getEv,onclick:a._getEv,ondblclick:a._getEv,onmousedown:a._getEv,onmouseup:a._getEv,onmouseover:a._getEv,onmousemove:a._getEv,onmouseout:a._getEv,onfocus:a._getEv,onblur:a._getEv,onkeypress:a._getEv,onkeydown:a._getEv,onkeyup:a._getEv,onsubmit:a._getEv,onreset:a._getEv,onselect:a._getEv,onchange:a._getEv})})(Element._attributeTranslations.read.values)}else{if(Prototype.Browser.Gecko&&/rv:1\.8\.0/.test(navigator.userAgent)){Element.Methods.setOpacity=function(a,b){a=$(a);a.style.opacity=(b==1)?0.999999:(b==="")?"":(b<0.00001)?0:b;return a}}else{if(Prototype.Browser.WebKit){Element.Methods.setOpacity=function(a,b){a=$(a);a.style.opacity=(b==1||b==="")?"":(b<0.00001)?0:b;if(b==1){if(a.tagName.toUpperCase()=="IMG"&&a.width){a.width++;a.width--}else{try{var d=document.createTextNode(" ");a.appendChild(d);a.removeChild(d)}catch(c){}}}return a};Element.Methods.cumulativeOffset=function(b){var a=0,c=0;do{a+=b.offsetTop||0;c+=b.offsetLeft||0;if(b.offsetParent==document.body){if(Element.getStyle(b,"position")=="absolute"){break}}b=b.offsetParent}while(b);return Element._returnOffset(c,a)}}}}}if(Prototype.Browser.IE||Prototype.Browser.Opera){Element.Methods.update=function(b,c){b=$(b);if(c&&c.toElement){c=c.toElement()}if(Object.isElement(c)){return b.update().insert(c)}c=Object.toHTML(c);var a=b.tagName.toUpperCase();if(a in Element._insertionTranslations.tags){$A(b.childNodes).each(function(d){b.removeChild(d)});Element._getContentFromAnonymousElement(a,c.stripScripts()).each(function(d){b.appendChild(d)})}else{b.innerHTML=c.stripScripts()}c.evalScripts.bind(c).defer();return b}}if("outerHTML" in document.createElement("div")){Element.Methods.replace=function(c,e){c=$(c);if(e&&e.toElement){e=e.toElement()}if(Object.isElement(e)){c.parentNode.replaceChild(e,c);return c}e=Object.toHTML(e);var d=c.parentNode,b=d.tagName.toUpperCase();if(Element._insertionTranslations.tags[b]){var f=c.next();var a=Element._getContentFromAnonymousElement(b,e.stripScripts());d.removeChild(c);if(f){a.each(function(g){d.insertBefore(g,f)})}else{a.each(function(g){d.appendChild(g)})}}else{c.outerHTML=e.stripScripts()}e.evalScripts.bind(e).defer();return c}}Element._returnOffset=function(b,c){var a=[b,c];a.left=b;a.top=c;return a};Element._getContentFromAnonymousElement=function(c,b){var d=new Element("div"),a=Element._insertionTranslations.tags[c];if(a){d.innerHTML=a[0]+b+a[1];a[2].times(function(){d=d.firstChild})}else{d.innerHTML=b}return $A(d.childNodes)};Element._insertionTranslations={before:function(a,b){a.parentNode.insertBefore(b,a)},top:function(a,b){a.insertBefore(b,a.firstChild)},bottom:function(a,b){a.appendChild(b)},after:function(a,b){a.parentNode.insertBefore(b,a.nextSibling)},tags:{TABLE:["<table>","</table>",1],TBODY:["<table><tbody>","</tbody></table>",2],TR:["<table><tbody><tr>","</tr></tbody></table>",3],TD:["<table><tbody><tr><td>","</td></tr></tbody></table>",4],SELECT:["<select>","</select>",1]}};(function(){Object.extend(this.tags,{THEAD:this.tags.TBODY,TFOOT:this.tags.TBODY,TH:this.tags.TD})}).call(Element._insertionTranslations);Element.Methods.Simulated={hasAttribute:function(a,c){c=Element._attributeTranslations.has[c]||c;var b=$(a).getAttributeNode(c);return !!(b&&b.specified)}};Element.Methods.ByTag={};Object.extend(Element,Element.Methods);if(!Prototype.BrowserFeatures.ElementExtensions&&document.createElement("div")["__proto__"]){window.HTMLElement={};window.HTMLElement.prototype=document.createElement("div")["__proto__"];Prototype.BrowserFeatures.ElementExtensions=true}Element.extend=(function(){if(Prototype.BrowserFeatures.SpecificElementExtensions){return Prototype.K}var a={},b=Element.Methods.ByTag;var c=Object.extend(function(f){if(!f||f._extendedByPrototype||f.nodeType!=1||f==window){return f}var d=Object.clone(a),e=f.tagName.toUpperCase(),h,g;if(b[e]){Object.extend(d,b[e])}for(h in d){g=d[h];if(Object.isFunction(g)&&!(h in f)){f[h]=g.methodize()}}f._extendedByPrototype=Prototype.emptyFunction;return f},{refresh:function(){if(!Prototype.BrowserFeatures.ElementExtensions){Object.extend(a,Element.Methods);Object.extend(a,Element.Methods.Simulated)}}});c.refresh();return c})();Element.hasAttribute=function(a,b){if(a.hasAttribute){return a.hasAttribute(b)}return Element.Methods.Simulated.hasAttribute(a,b)};Element.addMethods=function(c){var h=Prototype.BrowserFeatures,d=Element.Methods.ByTag;if(!c){Object.extend(Form,Form.Methods);Object.extend(Form.Element,Form.Element.Methods);Object.extend(Element.Methods.ByTag,{FORM:Object.clone(Form.Methods),INPUT:Object.clone(Form.Element.Methods),SELECT:Object.clone(Form.Element.Methods),TEXTAREA:Object.clone(Form.Element.Methods)})}if(arguments.length==2){var b=c;c=arguments[1]}if(!b){Object.extend(Element.Methods,c||{})}else{if(Object.isArray(b)){b.each(g)}else{g(b)}}function g(j){j=j.toUpperCase();if(!Element.Methods.ByTag[j]){Element.Methods.ByTag[j]={}}Object.extend(Element.Methods.ByTag[j],c)}function a(l,k,j){j=j||false;for(var n in l){var m=l[n];if(!Object.isFunction(m)){continue}if(!j||!(n in k)){k[n]=m.methodize()}}}function e(l){var j;var k={OPTGROUP:"OptGroup",TEXTAREA:"TextArea",P:"Paragraph",FIELDSET:"FieldSet",UL:"UList",OL:"OList",DL:"DList",DIR:"Directory",H1:"Heading",H2:"Heading",H3:"Heading",H4:"Heading",H5:"Heading",H6:"Heading",Q:"Quote",INS:"Mod",DEL:"Mod",A:"Anchor",IMG:"Image",CAPTION:"TableCaption",COL:"TableCol",COLGROUP:"TableCol",THEAD:"TableSection",TFOOT:"TableSection",TBODY:"TableSection",TR:"TableRow",TH:"TableCell",TD:"TableCell",FRAMESET:"FrameSet",IFRAME:"IFrame"};if(k[l]){j="HTML"+k[l]+"Element"}if(window[j]){return window[j]}j="HTML"+l+"Element";if(window[j]){return window[j]}j="HTML"+l.capitalize()+"Element";if(window[j]){return window[j]}window[j]={};window[j].prototype=document.createElement(l)["__proto__"];return window[j]}if(h.ElementExtensions){a(Element.Methods,HTMLElement.prototype);a(Element.Methods.Simulated,HTMLElement.prototype,true)}if(h.SpecificElementExtensions){for(var i in Element.Methods.ByTag){var f=e(i);if(Object.isUndefined(f)){continue}a(d[i],f.prototype)}}Object.extend(Element,Element.Methods);delete Element.ByTag;if(Element.extend.refresh){Element.extend.refresh()}Element.cache={}};document.viewport={getDimensions:function(){var a={},b=Prototype.Browser;$w("width height").each(function(e){var c=e.capitalize();if(b.WebKit&&!document.evaluate){a[e]=self["inner"+c]}else{if(b.Opera&&parseFloat(window.opera.version())<9.5){a[e]=document.body["client"+c]}else{a[e]=document.documentElement["client"+c]}}});return a},getWidth:function(){return this.getDimensions().width},getHeight:function(){return this.getDimensions().height},getScrollOffsets:function(){return Element._returnOffset(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop)}};var Selector=Class.create({initialize:function(a){this.expression=a.strip();if(this.shouldUseSelectorsAPI()){this.mode="selectorsAPI"}else{if(this.shouldUseXPath()){this.mode="xpath";this.compileXPathMatcher()}else{this.mode="normal";this.compileMatcher()}}},shouldUseXPath:function(){if(!Prototype.BrowserFeatures.XPath){return false}var a=this.expression;if(Prototype.Browser.WebKit&&(a.include("-of-type")||a.include(":empty"))){return false}if((/(\[[\w-]*?:|:checked)/).test(a)){return false}return true},shouldUseSelectorsAPI:function(){if(!Prototype.BrowserFeatures.SelectorsAPI){return false}if(!Selector._div){Selector._div=new Element("div")}try{Selector._div.querySelector(this.expression)}catch(a){return false}return true},compileMatcher:function(){var e=this.expression,ps=Selector.patterns,h=Selector.handlers,c=Selector.criteria,le,p,m;if(Selector._cache[e]){this.matcher=Selector._cache[e];return}this.matcher=["this.matcher = function(root) {","var r = root, h = Selector.handlers, c = false, n;"];while(e&&le!=e&&(/\S/).test(e)){le=e;for(var i in ps){p=ps[i];if(m=e.match(p)){this.matcher.push(Object.isFunction(c[i])?c[i](m):new Template(c[i]).evaluate(m));e=e.replace(m[0],"");break}}}this.matcher.push("return h.unique(n);\n}");eval(this.matcher.join("\n"));Selector._cache[this.expression]=this.matcher},compileXPathMatcher:function(){var f=this.expression,g=Selector.patterns,b=Selector.xpath,d,a;if(Selector._cache[f]){this.xpath=Selector._cache[f];return}this.matcher=[".//*"];while(f&&d!=f&&(/\S/).test(f)){d=f;for(var c in g){if(a=f.match(g[c])){this.matcher.push(Object.isFunction(b[c])?b[c](a):new Template(b[c]).evaluate(a));f=f.replace(a[0],"");break}}}this.xpath=this.matcher.join("");Selector._cache[this.expression]=this.xpath},findElements:function(a){a=a||document;var c=this.expression,b;switch(this.mode){case"selectorsAPI":if(a!==document){var d=a.id,f=$(a).identify();c="#"+f+" "+c}b=$A(a.querySelectorAll(c)).map(Element.extend);a.id=d;return b;case"xpath":return document._getElementsByXPath(this.xpath,a);default:return this.matcher(a)}},match:function(j){this.tokens=[];var o=this.expression,a=Selector.patterns,f=Selector.assertions;var b,d,g;while(o&&b!==o&&(/\S/).test(o)){b=o;for(var k in a){d=a[k];if(g=o.match(d)){if(f[k]){this.tokens.push([k,Object.clone(g)]);o=o.replace(g[0],"")}else{return this.findElements(document).include(j)}}}}var n=true,c,l;for(var k=0,h;h=this.tokens[k];k++){c=h[0],l=h[1];if(!Selector.assertions[c](j,l)){n=false;break}}return n},toString:function(){return this.expression},inspect:function(){return"#<Selector:"+this.expression.inspect()+">"}});Object.extend(Selector,{_cache:{},xpath:{descendant:"//*",child:"/*",adjacent:"/following-sibling::*[1]",laterSibling:"/following-sibling::*",tagName:function(a){if(a[1]=="*"){return""}return"[local-name()='"+a[1].toLowerCase()+"' or local-name()='"+a[1].toUpperCase()+"']"},className:"[contains(concat(' ', @class, ' '), ' #{1} ')]",id:"[@id='#{1}']",attrPresence:function(a){a[1]=a[1].toLowerCase();return new Template("[@#{1}]").evaluate(a)},attr:function(a){a[1]=a[1].toLowerCase();a[3]=a[5]||a[6];return new Template(Selector.xpath.operators[a[2]]).evaluate(a)},pseudo:function(a){var b=Selector.xpath.pseudos[a[1]];if(!b){return""}if(Object.isFunction(b)){return b(a)}return new Template(Selector.xpath.pseudos[a[1]]).evaluate(a)},operators:{"=":"[@#{1}='#{3}']","!=":"[@#{1}!='#{3}']","^=":"[starts-with(@#{1}, '#{3}')]","$=":"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']","*=":"[contains(@#{1}, '#{3}')]","~=":"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]","|=":"[contains(concat('-', @#{1}, '-'), '-#{3}-')]"},pseudos:{"first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","only-child":"[not(preceding-sibling::* or following-sibling::*)]",empty:"[count(*) = 0 and (count(text()) = 0)]",checked:"[@checked]",disabled:"[(@disabled) and (@type!='hidden')]",enabled:"[not(@disabled) and (@type!='hidden')]",not:function(b){var j=b[6],h=Selector.patterns,a=Selector.xpath,f,c;var g=[];while(j&&f!=j&&(/\S/).test(j)){f=j;for(var d in h){if(b=j.match(h[d])){c=Object.isFunction(a[d])?a[d](b):new Template(a[d]).evaluate(b);g.push("("+c.substring(1,c.length-1)+")");j=j.replace(b[0],"");break}}}return"[not("+g.join(" and ")+")]"},"nth-child":function(a){return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ",a)},"nth-last-child":function(a){return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ",a)},"nth-of-type":function(a){return Selector.xpath.pseudos.nth("position() ",a)},"nth-last-of-type":function(a){return Selector.xpath.pseudos.nth("(last() + 1 - position()) ",a)},"first-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-of-type"](a)},"last-of-type":function(a){a[6]="1";return Selector.xpath.pseudos["nth-last-of-type"](a)},"only-of-type":function(a){var b=Selector.xpath.pseudos;return b["first-of-type"](a)+b["last-of-type"](a)},nth:function(g,e){var h,i=e[6],d;if(i=="even"){i="2n+0"}if(i=="odd"){i="2n+1"}if(h=i.match(/^(\d+)$/)){return"["+g+"= "+h[1]+"]"}if(h=i.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(h[1]=="-"){h[1]=-1}var f=h[1]?Number(h[1]):1;var c=h[2]?Number(h[2]):0;d="[((#{fragment} - #{b}) mod #{a} = 0) and ((#{fragment} - #{b}) div #{a} >= 0)]";return new Template(d).evaluate({fragment:g,a:f,b:c})}}}},criteria:{tagName:'n = h.tagName(n, r, "#{1}", c);      c = false;',className:'n = h.className(n, r, "#{1}", c);    c = false;',id:'n = h.id(n, r, "#{1}", c);           c = false;',attrPresence:'n = h.attrPresence(n, r, "#{1}", c); c = false;',attr:function(a){a[3]=(a[5]||a[6]);return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(a)},pseudo:function(a){if(a[6]){a[6]=a[6].replace(/"/g,'\\"')}return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(a)},descendant:'c = "descendant";',child:'c = "child";',adjacent:'c = "adjacent";',laterSibling:'c = "laterSibling";'},patterns:{laterSibling:/^\s*~\s*/,child:/^\s*>\s*/,adjacent:/^\s*\+\s*/,descendant:/^\s/,tagName:/^\s*(\*|[\w\-]+)(\b|$)?/,id:/^#([\w\-\*]+)(\b|$)/,className:/^\.([\w\-\*]+)(\b|$)/,pseudo:/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,attrPresence:/^\[((?:[\w]+:)?[\w]+)\]/,attr:/\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/},assertions:{tagName:function(a,b){return b[1].toUpperCase()==a.tagName.toUpperCase()},className:function(a,b){return Element.hasClassName(a,b[1])},id:function(a,b){return a.id===b[1]},attrPresence:function(a,b){return Element.hasAttribute(a,b[1])},attr:function(b,c){var a=Element.readAttribute(b,c[1]);return a&&Selector.operators[c[2]](a,c[5]||c[6])}},handlers:{concat:function(d,c){for(var e=0,f;f=c[e];e++){d.push(f)}return d},mark:function(a){var d=Prototype.emptyFunction;for(var b=0,c;c=a[b];b++){c._countedByPrototype=d}return a},unmark:function(a){for(var b=0,c;c=a[b];b++){c._countedByPrototype=undefined}return a},index:function(a,d,g){a._countedByPrototype=Prototype.emptyFunction;if(d){for(var b=a.childNodes,e=b.length-1,c=1;e>=0;e--){var f=b[e];if(f.nodeType==1&&(!g||f._countedByPrototype)){f.nodeIndex=c++}}}else{for(var e=0,c=1,b=a.childNodes;f=b[e];e++){if(f.nodeType==1&&(!g||f._countedByPrototype)){f.nodeIndex=c++}}}},unique:function(b){if(b.length==0){return b}var d=[],e;for(var c=0,a=b.length;c<a;c++){if(!(e=b[c])._countedByPrototype){e._countedByPrototype=Prototype.emptyFunction;d.push(Element.extend(e))}}return Selector.handlers.unmark(d)},descendant:function(a){var d=Selector.handlers;for(var c=0,b=[],e;e=a[c];c++){d.concat(b,e.getElementsByTagName("*"))}return b},child:function(a){var e=Selector.handlers;for(var d=0,c=[],f;f=a[d];d++){for(var b=0,g;g=f.childNodes[b];b++){if(g.nodeType==1&&g.tagName!="!"){c.push(g)}}}return c},adjacent:function(a){for(var c=0,b=[],e;e=a[c];c++){var d=this.nextElementSibling(e);if(d){b.push(d)}}return b},laterSibling:function(a){var d=Selector.handlers;for(var c=0,b=[],e;e=a[c];c++){d.concat(b,Element.nextSiblings(e))}return b},nextElementSibling:function(a){while(a=a.nextSibling){if(a.nodeType==1){return a}}return null},previousElementSibling:function(a){while(a=a.previousSibling){if(a.nodeType==1){return a}}return null},tagName:function(a,j,c,b){var k=c.toUpperCase();var e=[],g=Selector.handlers;if(a){if(b){if(b=="descendant"){for(var f=0,d;d=a[f];f++){g.concat(e,d.getElementsByTagName(c))}return e}else{a=this[b](a)}if(c=="*"){return a}}for(var f=0,d;d=a[f];f++){if(d.tagName.toUpperCase()===k){e.push(d)}}return e}else{return j.getElementsByTagName(c)}},id:function(b,a,j,f){var g=$(j),d=Selector.handlers;if(!g){return[]}if(!b&&a==document){return[g]}if(b){if(f){if(f=="child"){for(var c=0,e;e=b[c];c++){if(g.parentNode==e){return[g]}}}else{if(f=="descendant"){for(var c=0,e;e=b[c];c++){if(Element.descendantOf(g,e)){return[g]}}}else{if(f=="adjacent"){for(var c=0,e;e=b[c];c++){if(Selector.handlers.previousElementSibling(g)==e){return[g]}}}else{b=d[f](b)}}}}for(var c=0,e;e=b[c];c++){if(e==g){return[g]}}return[]}return(g&&Element.descendantOf(g,a))?[g]:[]},className:function(b,a,c,d){if(b&&d){b=this[d](b)}return Selector.handlers.byClassName(b,a,c)},byClassName:function(c,b,f){if(!c){c=Selector.handlers.descendant([b])}var h=" "+f+" ";for(var e=0,d=[],g,a;g=c[e];e++){a=g.className;if(a.length==0){continue}if(a==f||(" "+a+" ").include(h)){d.push(g)}}return d},attrPresence:function(c,b,a,g){if(!c){c=b.getElementsByTagName("*")}if(c&&g){c=this[g](c)}var e=[];for(var d=0,f;f=c[d];d++){if(Element.hasAttribute(f,a)){e.push(f)}}return e},attr:function(a,j,h,k,c,b){if(!a){a=j.getElementsByTagName("*")}if(a&&b){a=this[b](a)}var l=Selector.operators[c],f=[];for(var e=0,d;d=a[e];e++){var g=Element.readAttribute(d,h);if(g===null){continue}if(l(g,k)){f.push(d)}}return f},pseudo:function(b,c,e,a,d){if(b&&d){b=this[d](b)}if(!b){b=a.getElementsByTagName("*")}return Selector.pseudos[c](b,e,a)}},pseudos:{"first-child":function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(Selector.handlers.previousElementSibling(e)){continue}c.push(e)}return c},"last-child":function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(Selector.handlers.nextElementSibling(e)){continue}c.push(e)}return c},"only-child":function(b,g,a){var e=Selector.handlers;for(var d=0,c=[],f;f=b[d];d++){if(!e.previousElementSibling(f)&&!e.nextElementSibling(f)){c.push(f)}}return c},"nth-child":function(b,c,a){return Selector.pseudos.nth(b,c,a)},"nth-last-child":function(b,c,a){return Selector.pseudos.nth(b,c,a,true)},"nth-of-type":function(b,c,a){return Selector.pseudos.nth(b,c,a,false,true)},"nth-last-of-type":function(b,c,a){return Selector.pseudos.nth(b,c,a,true,true)},"first-of-type":function(b,c,a){return Selector.pseudos.nth(b,"1",a,false,true)},"last-of-type":function(b,c,a){return Selector.pseudos.nth(b,"1",a,true,true)},"only-of-type":function(b,d,a){var c=Selector.pseudos;return c["last-of-type"](c["first-of-type"](b,d,a),d,a)},getIndices:function(d,c,e){if(d==0){return c>0?[c]:[]}return $R(1,e).inject([],function(a,b){if(0==(b-c)%d&&(b-c)/d>=0){a.push(b)}return a})},nth:function(c,s,u,r,e){if(c.length==0){return[]}if(s=="even"){s="2n+0"}if(s=="odd"){s="2n+1"}var q=Selector.handlers,p=[],d=[],g;q.mark(c);for(var o=0,f;f=c[o];o++){if(!f.parentNode._countedByPrototype){q.index(f.parentNode,r,e);d.push(f.parentNode)}}if(s.match(/^\d+$/)){s=Number(s);for(var o=0,f;f=c[o];o++){if(f.nodeIndex==s){p.push(f)}}}else{if(g=s.match(/^(-?\d*)?n(([+-])(\d+))?/)){if(g[1]=="-"){g[1]=-1}var v=g[1]?Number(g[1]):1;var t=g[2]?Number(g[2]):0;var w=Selector.pseudos.getIndices(v,t,c.length);for(var o=0,f,k=w.length;f=c[o];o++){for(var n=0;n<k;n++){if(f.nodeIndex==w[n]){p.push(f)}}}}}q.unmark(c);q.unmark(d);return p},empty:function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(e.tagName=="!"||e.firstChild){continue}c.push(e)}return c},not:function(a,d,k){var g=Selector.handlers,l,c;var j=new Selector(d).findElements(k);g.mark(j);for(var f=0,e=[],b;b=a[f];f++){if(!b._countedByPrototype){e.push(b)}}g.unmark(j);return e},enabled:function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(!e.disabled&&(!e.type||e.type!=="hidden")){c.push(e)}}return c},disabled:function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(e.disabled){c.push(e)}}return c},checked:function(b,f,a){for(var d=0,c=[],e;e=b[d];d++){if(e.checked){c.push(e)}}return c}},operators:{"=":function(b,a){return b==a},"!=":function(b,a){return b!=a},"^=":function(b,a){return b==a||b&&b.startsWith(a)},"$=":function(b,a){return b==a||b&&b.endsWith(a)},"*=":function(b,a){return b==a||b&&b.include(a)},"$=":function(b,a){return b.endsWith(a)},"*=":function(b,a){return b.include(a)},"~=":function(b,a){return(" "+b+" ").include(" "+a+" ")},"|=":function(b,a){return("-"+(b||"").toUpperCase()+"-").include("-"+(a||"").toUpperCase()+"-")}},split:function(b){var a=[];b.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/,function(c){a.push(c[1].strip())});return a},matchElements:function(f,g){var e=$$(g),d=Selector.handlers;d.mark(e);for(var c=0,b=[],a;a=f[c];c++){if(a._countedByPrototype){b.push(a)}}d.unmark(e);return b},findElement:function(b,c,a){if(Object.isNumber(c)){a=c;c=false}return Selector.matchElements(b,c||"*")[a||0]},findChildElements:function(e,g){g=Selector.split(g.join(","));var d=[],f=Selector.handlers;for(var c=0,b=g.length,a;c<b;c++){a=new Selector(g[c].strip());f.concat(d,a.findElements(e))}return(b>1)?f.unique(d):d}});if(Prototype.Browser.IE){Object.extend(Selector.handlers,{concat:function(d,c){for(var e=0,f;f=c[e];e++){if(f.tagName!=="!"){d.push(f)}}return d},unmark:function(a){for(var b=0,c;c=a[b];b++){c.removeAttribute("_countedByPrototype")}return a}})}function $$(){return Selector.findChildElements(document,$A(arguments))}var Form={reset:function(a){$(a).reset();return a},serializeElements:function(g,b){if(typeof b!="object"){b={hash:!!b}}else{if(Object.isUndefined(b.hash)){b.hash=true}}var c,f,a=false,e=b.submit;var d=g.inject({},function(h,i){if(!i.disabled&&i.name){c=i.name;f=$(i).getValue();if(f!=null&&i.type!="file"&&(i.type!="submit"||(!a&&e!==false&&(!e||c==e)&&(a=true)))){if(c in h){if(!Object.isArray(h[c])){h[c]=[h[c]]}h[c].push(f)}else{h[c]=f}}}return h});return b.hash?d:Object.toQueryString(d)}};Form.Methods={serialize:function(b,a){return Form.serializeElements(Form.getElements(b),a)},getElements:function(a){return $A($(a).getElementsByTagName("*")).inject([],function(b,c){if(Form.Element.Serializers[c.tagName.toLowerCase()]){b.push(Element.extend(c))}return b})},getInputs:function(g,c,d){g=$(g);var a=g.getElementsByTagName("input");if(!c&&!d){return $A(a).map(Element.extend)}for(var e=0,h=[],f=a.length;e<f;e++){var b=a[e];if((c&&b.type!=c)||(d&&b.name!=d)){continue}h.push(Element.extend(b))}return h},disable:function(a){a=$(a);Form.getElements(a).invoke("disable");return a},enable:function(a){a=$(a);Form.getElements(a).invoke("enable");return a},findFirstElement:function(b){var c=$(b).getElements().findAll(function(d){return"hidden"!=d.type&&!d.disabled});var a=c.findAll(function(d){return d.hasAttribute("tabIndex")&&d.tabIndex>=0}).sortBy(function(d){return d.tabIndex}).first();return a?a:c.find(function(d){return["input","select","textarea"].include(d.tagName.toLowerCase())})},focusFirstElement:function(a){a=$(a);a.findFirstElement().activate();return a},request:function(b,a){b=$(b),a=Object.clone(a||{});var d=a.parameters,c=b.readAttribute("action")||"";if(c.blank()){c=window.location.href}a.parameters=b.serialize(true);if(d){if(Object.isString(d)){d=d.toQueryParams()}Object.extend(a.parameters,d)}if(b.hasAttribute("method")&&!a.method){a.method=b.method}return new Ajax.Request(c,a)}};Form.Element={focus:function(a){$(a).focus();return a},select:function(a){$(a).select();return a}};Form.Element.Methods={serialize:function(a){a=$(a);if(!a.disabled&&a.name){var b=a.getValue();if(b!=undefined){var c={};c[a.name]=b;return Object.toQueryString(c)}}return""},getValue:function(a){a=$(a);var b=a.tagName.toLowerCase();return Form.Element.Serializers[b](a)},setValue:function(a,b){a=$(a);var c=a.tagName.toLowerCase();Form.Element.Serializers[c](a,b);return a},clear:function(a){$(a).value="";return a},present:function(a){return $(a).value!=""},activate:function(a){a=$(a);try{a.focus();if(a.select&&(a.tagName.toLowerCase()!="input"||!["button","reset","submit"].include(a.type))){a.select()}}catch(b){}return a},disable:function(a){a=$(a);a.disabled=true;return a},enable:function(a){a=$(a);a.disabled=false;return a}};var Field=Form.Element;var $F=Form.Element.Methods.getValue;Form.Element.Serializers={input:function(a,b){switch(a.type.toLowerCase()){case"checkbox":case"radio":return Form.Element.Serializers.inputSelector(a,b);default:return Form.Element.Serializers.textarea(a,b)}},inputSelector:function(a,b){if(Object.isUndefined(b)){return a.checked?a.value:null}else{a.checked=!!b}},textarea:function(a,b){if(Object.isUndefined(b)){return a.value}else{a.value=b}},select:function(c,f){if(Object.isUndefined(f)){return this[c.type=="select-one"?"selectOne":"selectMany"](c)}else{var b,d,g=!Object.isArray(f);for(var a=0,e=c.length;a<e;a++){b=c.options[a];d=this.optionValue(b);if(g){if(d==f){b.selected=true;return}}else{b.selected=f.include(d)}}}},selectOne:function(b){var a=b.selectedIndex;return a>=0?this.optionValue(b.options[a]):null},selectMany:function(d){var a,e=d.length;if(!e){return null}for(var c=0,a=[];c<e;c++){var b=d.options[c];if(b.selected){a.push(this.optionValue(b))}}return a},optionValue:function(a){return Element.extend(a).hasAttribute("value")?a.value:a.text}};Abstract.TimedObserver=Class.create(PeriodicalExecuter,{initialize:function($super,a,b,c){$super(c,b);this.element=$(a);this.lastValue=this.getValue()},execute:function(){var a=this.getValue();if(Object.isString(this.lastValue)&&Object.isString(a)?this.lastValue!=a:String(this.lastValue)!=String(a)){this.callback(this.element,a);this.lastValue=a}}});Form.Element.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.Observer=Class.create(Abstract.TimedObserver,{getValue:function(){return Form.serialize(this.element)}});Abstract.EventObserver=Class.create({initialize:function(a,b){this.element=$(a);this.callback=b;this.lastValue=this.getValue();if(this.element.tagName.toLowerCase()=="form"){this.registerFormCallbacks()}else{this.registerCallback(this.element)}},onElementEvent:function(){var a=this.getValue();if(this.lastValue!=a){this.callback(this.element,a);this.lastValue=a}},registerFormCallbacks:function(){Form.getElements(this.element).each(this.registerCallback,this)},registerCallback:function(a){if(a.type){switch(a.type.toLowerCase()){case"checkbox":case"radio":Event.observe(a,"click",this.onElementEvent.bind(this));break;default:Event.observe(a,"change",this.onElementEvent.bind(this));break}}}});Form.Element.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.Element.getValue(this.element)}});Form.EventObserver=Class.create(Abstract.EventObserver,{getValue:function(){return Form.serialize(this.element)}});if(!window.Event){var Event={}}Object.extend(Event,{KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,KEY_HOME:36,KEY_END:35,KEY_PAGEUP:33,KEY_PAGEDOWN:34,KEY_INSERT:45,cache:{},relatedTarget:function(b){var a;switch(b.type){case"mouseover":a=b.fromElement;break;case"mouseout":a=b.toElement;break;default:return null}return Element.extend(a)}});Event.Methods=(function(){var a;if(Prototype.Browser.IE){var b={0:1,1:4,2:2};a=function(d,c){return d.button==b[c]}}else{if(Prototype.Browser.WebKit){a=function(d,c){switch(c){case 0:return d.which==1&&!d.metaKey;case 1:return d.which==1&&d.metaKey;default:return false}}}else{a=function(d,c){return d.which?(d.which===c+1):(d.button===c)}}}return{isLeftClick:function(c){return a(c,0)},isMiddleClick:function(c){return a(c,1)},isRightClick:function(c){return a(c,2)},element:function(e){e=Event.extend(e);var d=e.target,c=e.type,f=e.currentTarget;if(f&&f.tagName){if(c==="load"||c==="error"||(c==="click"&&f.tagName.toLowerCase()==="input"&&f.type==="radio")){d=f}}if(d.nodeType==Node.TEXT_NODE){d=d.parentNode}return Element.extend(d)},findElement:function(d,f){var c=Event.element(d);if(!f){return c}var e=[c].concat(c.ancestors());return Selector.findElement(e,f,0)},pointer:function(e){var d=document.documentElement,c=document.body||{scrollLeft:0,scrollTop:0};return{x:e.pageX||(e.clientX+(d.scrollLeft||c.scrollLeft)-(d.clientLeft||0)),y:e.pageY||(e.clientY+(d.scrollTop||c.scrollTop)-(d.clientTop||0))}},pointerX:function(c){return Event.pointer(c).x},pointerY:function(c){return Event.pointer(c).y},stop:function(c){Event.extend(c);c.preventDefault();c.stopPropagation();c.stopped=true}}})();Event.extend=(function(){var a=Object.keys(Event.Methods).inject({},function(b,c){b[c]=Event.Methods[c].methodize();return b});if(Prototype.Browser.IE){Object.extend(a,{stopPropagation:function(){this.cancelBubble=true},preventDefault:function(){this.returnValue=false},inspect:function(){return"[object Event]"}});return function(b){if(!b){return false}if(b._extendedByPrototype){return b}b._extendedByPrototype=Prototype.emptyFunction;var c=Event.pointer(b);Object.extend(b,{target:b.srcElement,relatedTarget:Event.relatedTarget(b),pageX:c.x,pageY:c.y});return Object.extend(b,a)}}else{Event.prototype=Event.prototype||document.createEvent("HTMLEvents")["__proto__"];Object.extend(Event.prototype,a);return Prototype.K}})();Object.extend(Event,(function(){var b=Event.cache;function c(j){if(j._prototypeEventID){return j._prototypeEventID[0]}arguments.callee.id=arguments.callee.id||1;return j._prototypeEventID=[++arguments.callee.id]}function g(j){if(j&&j.include(":")){return"dataavailable"}return j}function a(j){return b[j]=b[j]||{}}function f(l,j){var k=a(l);return k[j]=k[j]||[]}function h(k,j,l){var o=c(k);var n=f(o,j);if(n.pluck("handler").include(l)){return false}var m=function(p){if(!Event||!Event.extend||(p.eventName&&p.eventName!=j)){return false}Event.extend(p);l.call(k,p)};m.handler=l;n.push(m);return m}function i(m,j,k){var l=f(m,j);return l.find(function(n){return n.handler==k})}function d(m,j,k){var l=a(m);if(!l[j]){return false}l[j]=l[j].without(i(m,j,k))}function e(){for(var k in b){for(var j in b[k]){b[k][j]=null}}}if(window.attachEvent){window.attachEvent("onunload",e)}if(Prototype.Browser.WebKit){window.addEventListener("unload",Prototype.emptyFunction,false)}return{observe:function(l,j,m){l=$(l);var k=g(j);var n=h(l,j,m);if(!n){return l}if(l.addEventListener){l.addEventListener(k,n,false)}else{l.attachEvent("on"+k,n)}return l},stopObserving:function(l,j,m){l=$(l);var o=c(l),k=g(j);if(!m&&j){f(o,j).each(function(p){l.stopObserving(j,p.handler)});return l}else{if(!j){Object.keys(a(o)).each(function(p){l.stopObserving(p)});return l}}var n=i(o,j,m);if(!n){return l}if(l.removeEventListener){l.removeEventListener(k,n,false)}else{l.detachEvent("on"+k,n)}d(o,j,m);return l},fire:function(l,k,j){l=$(l);if(l==document&&document.createEvent&&!l.dispatchEvent){l=document.documentElement}var m;if(document.createEvent){m=document.createEvent("HTMLEvents");m.initEvent("dataavailable",true,true)}else{m=document.createEventObject();m.eventType="ondataavailable"}m.eventName=k;m.memo=j||{};if(document.createEvent){l.dispatchEvent(m)}else{l.fireEvent(m.eventType,m)}return Event.extend(m)}}})());Object.extend(Event,Event.Methods);Element.addMethods({fire:Event.fire,observe:Event.observe,stopObserving:Event.stopObserving});Object.extend(document,{fire:Element.Methods.fire.methodize(),observe:Element.Methods.observe.methodize(),stopObserving:Element.Methods.stopObserving.methodize(),loaded:false});(function(){var b;function a(){if(document.loaded){return}if(b){window.clearInterval(b)}document.fire("dom:loaded");document.loaded=true}if(document.addEventListener){if(Prototype.Browser.WebKit){b=window.setInterval(function(){if(/loaded|complete/.test(document.readyState)){a()}},0);Event.observe(window,"load",a)}else{document.addEventListener("DOMContentLoaded",a,false)}}else{document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");$("__onDOMContentLoaded").onreadystatechange=function(){if(this.readyState=="complete"){this.onreadystatechange=null;a()}}}})();Hash.toQueryString=Object.toQueryString;var Toggle={display:Element.toggle};Element.Methods.childOf=Element.Methods.descendantOf;var Insertion={Before:function(a,b){return Element.insert(a,{before:b})},Top:function(a,b){return Element.insert(a,{top:b})},Bottom:function(a,b){return Element.insert(a,{bottom:b})},After:function(a,b){return Element.insert(a,{after:b})}};var $continue=new Error('"throw $continue" is deprecated, use "return" instead');var Position={includeScrollOffsets:false,prepare:function(){this.deltaX=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;this.deltaY=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},within:function(b,a,c){if(this.includeScrollOffsets){return this.withinIncludingScrolloffsets(b,a,c)}this.xcomp=a;this.ycomp=c;this.offset=Element.cumulativeOffset(b);return(c>=this.offset[1]&&c<this.offset[1]+b.offsetHeight&&a>=this.offset[0]&&a<this.offset[0]+b.offsetWidth)},withinIncludingScrolloffsets:function(b,a,d){var c=Element.cumulativeScrollOffset(b);this.xcomp=a+c[0]-this.deltaX;this.ycomp=d+c[1]-this.deltaY;this.offset=Element.cumulativeOffset(b);return(this.ycomp>=this.offset[1]&&this.ycomp<this.offset[1]+b.offsetHeight&&this.xcomp>=this.offset[0]&&this.xcomp<this.offset[0]+b.offsetWidth)},overlap:function(b,a){if(!b){return 0}if(b=="vertical"){return((this.offset[1]+a.offsetHeight)-this.ycomp)/a.offsetHeight}if(b=="horizontal"){return((this.offset[0]+a.offsetWidth)-this.xcomp)/a.offsetWidth}},cumulativeOffset:Element.Methods.cumulativeOffset,positionedOffset:Element.Methods.positionedOffset,absolutize:function(a){Position.prepare();return Element.absolutize(a)},relativize:function(a){Position.prepare();return Element.relativize(a)},realOffset:Element.Methods.cumulativeScrollOffset,offsetParent:Element.Methods.getOffsetParent,page:Element.Methods.viewportOffset,clone:function(b,c,a){a=a||{};return Element.clonePosition(c,b,a)}};if(!document.getElementsByClassName){document.getElementsByClassName=function(b){function a(c){return c.blank()?null:"[contains(concat(' ', @class, ' '), ' "+c+" ')]"}b.getElementsByClassName=Prototype.BrowserFeatures.XPath?function(c,e){e=e.toString().strip();var d=/\s/.test(e)?$w(e).map(a).join(""):a(e);return d?document._getElementsByXPath(".//*"+d,c):[]}:function(e,f){f=f.toString().strip();var g=[],h=(/\s/.test(f)?$w(f):null);if(!h&&!f){return g}var c=$(e).getElementsByTagName("*");f=" "+f+" ";for(var d=0,k,j;k=c[d];d++){if(k.className&&(j=" "+k.className+" ")&&(j.include(f)||(h&&h.all(function(i){return !i.toString().blank()&&j.include(" "+i+" ")})))){g.push(Element.extend(k))}}return g};return function(d,c){return $(c||document.body).getElementsByClassName(d)}}(Element.Methods)}Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(a){this.element=$(a)},_each:function(a){this.element.className.split(/\s+/).select(function(b){return b.length>0})._each(a)},set:function(a){this.element.className=a},add:function(a){if(this.include(a)){return}this.set($A(this).concat(a).join(" "))},remove:function(a){if(!this.include(a)){return}this.set($A(this).without(a).join(" "))},toString:function(){return $A(this).join(" ")}};Object.extend(Element.ClassNames.prototype,Enumerable);Element.addMethods();
var a;
TLightBox=function(b,d,j,k){var g=true,e=null,h=lightBoxes.lightBoxes.length,i=100,f=50,l=false,m=1001+h,n=k;if(typeof k=="undefined")n=true;if(typeof d!="undefined")m=parseInt(d);if(typeof j!="undefined")f=parseInt(j);lightBoxes.lightBoxes[h]=this;this.pAllHidden=function(){for(var c=0;c<lightBoxes.lightBoxes.length;c++){var o=lightBoxes.lightBoxes[c];if(o.pVisible()&&o.pWithImage())return false}return true};this.pAutoMove=function(c){if(typeof c=="undefined")return g;else g=Boolean(c)};this.pDoFrame=function(){if(this.iframe){this.iframe.style.left=
e.offsetLeft+"px";this.iframe.style.width=e.offsetWidth+"px";this.iframe.style.height=e.offsetHeight+"px";if(g)positionElement(this.iframe,f);else this.iframe.style.top=e.offsetTop+"px"}};this.pElement=function(c){if(typeof c=="undefined")return e;else e=c};this.pGetRef=function(){return"lightBoxes.lightBoxes["+h+"]"};this.pIndex=function(){return h};this.pLeft=function(c){if(typeof c=="undefined")return i;else{i=parseInt(c);e.style.left=i+"px";this.pDoFrame()}};this.pName=function(){return b};this.pSize=
function(){if(e==null)return null;return new Size(e.offsetWidth,e.offsetHeight)};this.pTop=function(c){if(typeof c=="undefined")return f;else{f=parseInt(c);if(g)positionElement(e,f);else e.style.top=f+"px";this.pDoFrame()}};this.pVisible=function(c){if(typeof c=="undefined")return l;else l=c};this.pWithImage=function(){return n};this.pZIndex=function(){return m};bodyLoaded&&this.init()};a=TLightBox.prototype;a.autoMove=function(b){return this.pAutoMove(b)};
a.element=function(){this.pElement()||this.init();return this.pElement()};a.getHtml=function(b){if(this.pElement())return getHtml(this.pElement(),b);else if(this.init())return this.getHtml(b);return false};a.height=function(b){if(this.pElement())if(typeof b!="undefined"){this.pElement().style.height=parseInt(b)+"px";this.pDoFrame()}else return this.pElement().offsetHeight};
a.hide=function(){if(this.pElement()){if(this.pVisible()){this.pVisible(false);if(this.iframe)this.iframe.style.display="none";this.pElement().style.display="none";if(this.pAllHidden())Html.get("imgBack").style.display="none"}}else this.init()&&this.hide()};
a.init=function(){if(this.pElement()==null){var b=Html.get(this.pName());if(b){document.body.appendChild(b);this.pElement(b);b.style.display="none";b.style.position="absolute";b.style.zIndex=this.pZIndex();if(isIE6){this.iframe=document.createElement("IFRAME");this.iframe.src="misc/empty.htm";this.iframe.style.display="none";this.iframe.style.position="absolute";this.iframe.style.zIndex=this.pZIndex()-1;document.body.appendChild(this.iframe)}else this.iframe=null;return true}return false}else return true};
a.initialized=function(){return this.pElement()!=null};a.left=function(b){return this.pLeft(b)};a.move=function(b,d){this.pLeft(b);this.pTop(d)};a.name=function(){return this.pName()};a.position=function(b){if(this.pAutoMove())if(this.pElement()&&this.pVisible()){if(typeof b=="undefined"||typeof b.width=="undefined")b=getSize(szPage);this.pElement().style.left=(b.width-this.pElement().offsetWidth)/2+"px";positionElement(this.pElement(),this.pTop());this.pDoFrame()}};
a.show=function(){if(this.pElement()){if(!this.pVisible()){this.pVisible(true);if(this.iframe)this.iframe.style.display="block";this.pElement().style.display="block";if(this.pWithImage())Html.get("imgBack").style.display="block";var b=getSize(szWindow);b=Math.floor((b.height-this.height())/2);this.top()>b&&this.top(Math.min(b,40));if(this.pAutoMove())this.position();else{this.left((winSize.width-this.pElement().offsetWidth)/2);this.top(this.pTop())}this.pElement().scrollIntoView()}}else this.init()&&
this.show()};a.size=function(){return this.pSize()};a.top=function(b){return this.pTop(b)};a.visible=function(){return this.pVisible()};a.width=function(b){if(this.pElement())if(typeof b!="undefined"){this.pElement().style.width=parseInt(b)+"px";this.pDoFrame()}else return this.pElement().offsetWidth};TLightBoxes=function(){this.lightBoxes=[]};TLightBoxes.prototype.anyVisible=function(){for(var b=0;b<this.lightBoxes.length;b++)if(this.lightBoxes[b].visible())return true;return false};
TLightBoxes.prototype.init=function(){for(var b=0;b<this.lightBoxes.length;b++)this.lightBoxes[b].init()};TLightBoxes.prototype.position=function(b){var d=Html.get("imgBack");if(d){if(!this.anyVisible())d.style.display="none";d.style.position="absolute";d.style.zIndex=1E3;d.style.left="0px";d.style.top="0px";d.style.width=b.width+"px";d.style.height=b.height+"px"}for(d=0;d<this.lightBoxes.length;d++)this.lightBoxes[d].position(b)};
var isNS=(document.layers?true:false),isIE=(document.all?true:false),isIE6=(isIE&&window.clientInformation.appVersion.indexOf("MSIE 6")>-1),server=document.location.protocol+"//"+document.location.host+"/",TDataTypes=["dtBoolean","dtDateTime","dtDouble","dtInteger","dtString","dtMoney","dtPercentage","dtLong","dtGuid"],dtBoolean=0,dtDateTime=1,dtDouble=2,dtInteger=3,dtString=4,dtMoney=5,dtPercentage=6,dtLong=7,dtGuid=8,bodyLoaded=false,image=document.createElement("IMG"),kaTimer=setTimeout("keepAlive();",120000),pageSize=null,winSize=null,lightBoxes=new TLightBoxes(),messageBox=new TLightBox("divMessage",2000,200,imgBack);if(!window.XMLHttpRequest&&window.ActiveXObject){window.XMLHttpRequest=function(){var c=["Microsoft.XMLHTTP","MSXML2.XMLHTTP"],b=c.length;while(b--){try{return new ActiveXObject(c[b])}catch(a){}}throw new Error("No XML support in this browser.")}}if(!document.getElementByName){document.getElementByName=function(a){var b=document.getElementsByName(a);if(b.length>0){return b[0]}else{throw new Error('Element with name "'+a+'" not found.')}}}window.onresize=function anonymous(){bodyResize(document.body)};var browsers={unknown:0,IE:1,firefox:2,netscape:3,mozilla:4,opera:5,safari:6,chrome:7};function bodyLoad(d,c){bodyResize(d);try{if(typeof(document.documentElement)!="undefined"){document.documentElement.onscroll=function j(){bodyScroll(document.documentElement)}}}catch(h){}if(c){window.print();window.close()}else{lightBoxes.init();if(messageBox.initialized()){var i=10000,b=Html.get("divMessageText"),g=Html.get("btnCloseMessage");messageBox.show();if(b){var a=String(b.innerText).length;i=Math.max(Math.floor(a/80*7000),5000)}setTimeout("messageBox.hide();",i);if(g){try{g.focus()}catch(f){}}}if(typeof(menu)!="undefined"&&menu.Class&&menu.Class=="TMenu"){menu.initialize()}if(isIE6){checkAnchors()}}if(typeof(doWizards)!="undefined"){doWizards()}if(typeof(customBodyLoad)!="undefined"){customBodyLoad(d)}bodyLoaded=true}function bodyResize(c){var a=Html.get("__asptrace");if(a){a.style.width="12px";a.style.overflow="hidden"}pageSize=null;winSize=null;var b=getSize(szPage);lightBoxes.position(b);if(a){a.style.width=b.width+"px"}if(typeof(customBodyResize)!="undefined"){customBodyResize(c,b)}}function bodyScroll(b){var a=getSize(szPage);lightBoxes.position(a);if(typeof(customBodyScroll)!="undefined"){customBodyScroll(b)}}function clearElement(a,b){if(a.value==a.defaultValue){a.value=""}}function positionElement(c,d){var b=document.documentElement,e=(b.scrollTop+d),a=getSize(szWindow);if(d+c.offsetHeight+20>a.height){e=b.scrollTop+a.height-c.offsetHeight-20;if(e<b.scrollTop){e=b.scrollTop}}c.style.top=e+"px"}function closeMessage(a){var b=findForm();if(messageBox.initialized()){messageBox.hide()}if(b&&frmFormReady){frmFormReady(b.ID)}}function findForm(){if(document.forms){for(var c=0;c<document.forms.length;c++){var d=document.forms[c],b=String(d.name);if(b.startsWith("frmForm_")){var a=parseInt(b.split("_")[1]);d.ID=a;return d}}}}function intInputKeyPress(a,c){var b=[8,9,13,45,48,49,50,51,52,53,54,55,56,57];if(!b.contains(c.keyCode)){c.returnValue=false;return false}else{c.returnValue=true;return true}}function floatInputKeyPress(a,c){var b=[8,9,13,44,45,46,48,49,50,51,52,53,54,55,56,57];if(!b.contains(c.keyCode)){c.returnValue=false;return false}else{if(c.keyCode==44||c.keyCode==46){if(a.value.length==0||a.value.indexOf(".")>-1||a.value.indexOf(",")>-1){c.returnValue=false;return false}}else{c.returnValue=true;return true}}}function datetimeInputKeyPress(b,d){var e=Date.formatInfo,c=[8,9,13,32,48,49,50,51,52,53,54,55,56,57,58];for(var a=0;a<e.dateSeparator.length;a++){c.add(e.dateSeparator.charCodeAt(a))}for(var a=0;a<e.timeSeparator.length;a++){c.add(e.timeSeparator.charCodeAt(a))}if(!c.contains(d.keyCode)){d.cancelBubble=true;d.returnValue=false;return false}else{return true}}function dateInputKeyPress(b,d){var e=Date.formatInfo,c=[8,9,13,48,49,50,51,52,53,54,55,56,57];for(var a=0;a<e.dateSeparator.length;a++){c.add(e.dateSeparator.charCodeAt(a))}if(!c.contains(d.keyCode)){d.cancelBubble=true;d.returnValue=false;return false}else{return true}}function timeInputKeyPress(b,d){var e=Date.formatInfo,c=[8,9,13,48,49,50,51,52,53,54,55,56,57,58];for(var a=0;a<e.timeSeparator.length;a++){c.add(e.timeSeparator.charCodeAt(a))}if(!c.contains(d.keyCode)){d.cancelBubble=true;d.returnValue=false;return false}else{return true}}function checkAnchors(){var d=document.getElementsByTagName("a");for(var c=0;c<d.length;c++){var b=d[c];if(!b.href){b.className="anchor"}}}function rndString(d){if(typeof(d)=="undefined"){d=16}var c="1234567890abcdefghiklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",a="";for(var b=0;b<d;b++){a+=c.substr(Math.floor(Math.random()*c.length),1)}return a}function setStats(){var a="steID="+steID;if(typeof(itmID)!="undefined"){a+="&itmID="+itmID}else{if(typeof(catID)!="undefined"){a+="&catID="+catID}}if(screen){document.writeln('<div id="divStats"><img src="misc/setStats.aspx?ColorDepth='+screen.colorDepth+"&ScreenWidth="+screen.width+"&ScreenHeight="+screen.height+"&"+a+'" width="1" height="1" alt="stats" align="right"/></div>')}else{document.writeln('<div id="divStats"><img src="misc/setStats.aspx?'+a+'" width="1" height="1" alt="stats" align="right"/></div>')}}function keepAlive(){if(kaTimer){clearTimeout(kaTimer)}if(new Url().server().startsWith("http://localhost:")){return}document.body.appendChild(image);image.src="misc/keepAlive.aspx?str="+rndString();kaTimer=setTimeout("keepAlive();",120000)}function resizeFont(b,c,a){var d=getCookie("FontSize");if(d){d=parseInt(d)}else{d=1}if(typeof(a)!="undefined"){d=a}else{if(d==1){d=3}else{d=1}}document.body.style.fontSize=60+(d*10)+"%";setCookie("FontSize",d);if(typeof(onFontResize)!="undefined"){onFontResize(b,c,a)}return 60+(d*10)}function printItem(a){var b=new Url().remove("msg"),c;if(typeof(a)!="undefined"){b=b.remove("catID").add("itmID",a)}c=window.open(b.replacePage("printItem.aspx"),"printItem","menubar=0,location=0,toolbar=0,scrollbars=0,resizable=0,status=0,width=560,height=470");if(c){c.focus()}}function printPage(){printItem()}function sendItem(b){var g=Html.get("divSendItem"+b),c=Html.get("aSend"+b);if(g){var e=Html.get("divBookItem"+b);if(e&&e.style.display!="none"){bookItem(b)}include("js/default/effects.js");while(typeof(Effect)=="undefined"){setTimeout("sendItem("+b+")",100);return}if(g.style.display=="none"){if(c){Html.addClass(c,"active")}Effect.SlideDown("divSendItem"+b,{duration:0.3});g.style.display=""}else{if(c){Html.removeClass(c,"active")}Effect.SlideUp("divSendItem"+b,{duration:0.3});g.style.display="none"}return}var d=new Url().remove("msg"),f;f=window.open(d.replacePage("sendItem.aspx"),"sendItem","menubar=0,location=0,toolbar=0,scrollbars=0,resizable=0,status=0,width=400,height=290");if(f){f.focus()}}function bookItem(b){var f=Html.get("divBookItem"+b),c=Html.get("aBook"+b);if(f){var e=Html.get("divSendItem"+b);if(e&&e.style.display!="none"){sendItem(b)}include("js/default/effects.js");while(typeof(Effect)=="undefined"){setTimeout("bookItem("+b+")",100);return}if(f.style.display=="none"){if(c){Html.addClass(c,"active")}Effect.SlideDown("divBookItem"+b,{duration:0.3});f.style.display=""}else{if(c){Html.removeClass(c,"active")}Effect.SlideUp("divBookItem"+b,{duration:0.3});f.style.display="none"}return}var d=new Url().remove("msg");d=d.add("itmID",b);d=d.add("action","Add");document.location.href=d}function editItem(a){var b=new Url().remove("msg");b=b.add("itmID",a);b=b.add("action",1);document.location.href=b}function displayImage(a){var c=new Url(a);if(a.indexOf(".aspx")==-1){c=new Url("misc/showFile.aspx?File="+a)}var b=new Url().replacePage("misc/showImage.aspx",true).add("Filename",c.get("Filename")).add("File",c.get("File")),d=window.open(b,"showFile","menubar=0,location=0,toolbar=0,scrollbars=1,resizable=1,status=1,width=50,height=50,top=25,left=25");if(d){d.focus()}}function resizeWin(){var b=Html.get("imgMain"),c=b.offsetWidth,a=b.offsetHeight;if(isIE6){window.resizeTo(c+45,a+70)}else{window.resizeTo(c+45,a+95)}}function alertWin(d,a,c){var b=null;if(typeof(a)!="undefined"&&typeof(c)!="undefined"){b=window.open("",a,c)}else{if(typeof(a)!="undefined"){b=window.open("",a)}else{if(typeof(c)!="undefined"){b=window.open("","",c)}else{b=window.open()}}}if(b){b.document.open();b.document.write(d);b.document.close()}}function frmSendLinkSubmit(b,c){var a=b.elements.edtName,d=b.elements.edtEmail;if(String(a.value)==""){alert(nameEmpty[Languages.current]);a.focus();c.returnValue=false;return false}if(String(d.value)==""){alert(eMailEmpty[Languages.current]);d.focus();c.returnValue=false;return false}if(!isEmail(d.value)){alert(eMailInvalid[Languages.current]);d.focus();c.returnValue=false;return false}return true}function cookieName(a){a=escape(a);a=a.replace(/@/gi,"%40");a=a.replace(/\*/gi,"%2A");a=a.replace(/-/gi,"%2D");a=a.replace(/_/gi,"%5F");a=a.replace(/\+/gi,"%2B");a=a.replace(/\./gi,"%2E");a=a.replace(/\//gi,"%2F");return a}function getCookie(b){b=cookieName(b);var d=document.cookie,c=d.indexOf(" "+b+"=");if(c==-1){c=d.indexOf(b+"=")}if(c==-1){return null}c=d.indexOf("=",c)+1;var a=d.indexOf(";",c);if(a==-1){a=d.length}return unescape(d.substring(c,a))}function removeCookie(a){setCookie(a)}function setCookie(b,d,a){b=cookieName(b);if(d!=null&&typeof(d)!="undefined"&&String(d)!=""){var c=new Date().nextYear();if(arguments.length>2){c=a}if(c==null){document.cookie=b+"="+escape(d)+"; path=/"}else{document.cookie=b+"="+escape(d)+"; path=/;expires="+c.toGMTString()}}else{document.cookie=b+"=; path=/;expires="+new Date().priorDay().toGMTString()}}function toggleDisplay(a){if(typeof(a)=="string"){a=Html.get(a)}if(typeof(a)=="object"){if(a.style.display=="none"){a.style.display=""}else{a.style.display="none"}}}var checking=false;function checkBoxListClick(e,f,b){if(checking){return}checking=true;var g=document.getElementsByName(b);if(e.id.endsWith("All")){for(var d=0;d<g.length;d++){g[d].checked=e.checked}}else{var c=Html.get(b+"All");if(c){var a=true;for(var d=0;d<g.length;d++){if(!g[d].checked){a=false}}c.checked=a}}checking=false}function isChildOf(a,b){if(typeof(a.contains)!="undefined"){return a.contains(b)}else{if(b==null){return false}else{if(a==b){return true}else{return isChildOf(a,b.parentNode)}}}}function isParentOf(b,a){return isChildOf(a,b)}TEvent=function(a,c,b){this.object=a;this.event=c;this.func=b};TEvent.first=null;TEvent.events=[];TEvent.find=function(){for(var i=0;i<arguments.length;i++){try{return eval(arguments[i])}catch(error){}}return null};TEvent.unload=function(b){if(TEvent.events!=null){removeEvent(window,"unload",TEvent.first);for(var a=0;a<TEvent.events.length;a++){var c=TEvent.events[a];if(c.event!="unload"){removeEvent(c.object,c.event,c.func)}TEvent.events[a]==null}TEvent.first=null;TEvent.events=null}};function addEvent(a,c,b){if(typeof(a)=="string"){a=Html.get(a)}if(typeof(b)=="string"){b=new Function("event",b)}if(a.attachEvent){a.attachEvent("on"+c,b);if(!TEvent.first){TEvent.first=new Function("event","TEvent.unload( event );");window.attachEvent("onunload",TEvent.first)}}else{a.addEventListener(c,b,false);if(!TEvent.first){TEvent.first=new Function("event","TEvent.unload( event );");window.addEventListener("unload",TEvent.first,false)}}TEvent.events.add(new TEvent(a,c,b));return b}function cancelEvent(a){a.cancelBubble=true;if(typeof(a.preventDefault)=="function"){a.preventDefault()}else{if("returnValue" in a){a.returnValue=false}}return false}function createEvent(b){var a="click";if(typeof(b)=="string"){a=b;b=null}else{if(typeof(b)!="undefined"&&typeof(b.type)!="undefined"){a=b.type}}var e=b?b.charCode||b.keyCode:null,d=b?b.srcElement||b.target:null,c={altKey:b?b.altKey:false,button:b?b.button:null,bookmarks:b?b.bookmarks:[],boundElements:b?b.boundElements:[],cancelBubble:b?b.cancelBubble:false,clientX:b?b.clientX:0,clientY:b?b.clientY:0,ctrlKey:b?b.ctrlKey:false,fromElement:b?b.fromElement:null,keyCode:b?e:0,offsetX:b?b.offsetX:0,offsetY:b?b.offsetY:0,reason:b?b.reason:null,returnValue:b?b.returnValue:true,screenX:b?b.screenX:0,screenY:b?b.screenY:0,shiftKey:b?b.shiftKey:false,srcElement:b?d:null,srcFilter:b?b.srcFilter:null,target:b?d:null,toElement:b?b.toElement:null,type:b?b.type:a,x:b?b.x:0,y:b?b.y:0};return c}function filterEvent(a){return String(a).replace(/^function \w+\((event)?\)\s*{\s*((.|\n)*)\s*}/,"$2")}function removeEvent(a,c,b){if(typeof(a)=="string"){a=Html.get(a)}if(a.detachEvent){a.detachEvent("on"+c,b)}else{a.removeEventListener(c,b,false)}}function valueString(m){var k=typeof(m),c="";if(k=="boolean"){if(m){return"true"}else{return"false"}}else{if(k=="number"){return m}else{if(k=="string"){return'"'+m+'"'}else{if(k=="undefined"){return"undefined"}else{if(m==null){return"null"}else{if(m instanceof Array){for(var f=0;f<m.length;f++){c+=", "+valueString(m[f])}if(c.length){return"["+c.substr(2)+"]"}else{return"[]"}}else{if(m instanceof Date){return"#"+m.formatString("s").replace("T"," ")+"#"}else{if(m instanceof RegExp){return m.toString()}else{if(k=="function"){m=String(m);return m.substr(0,m.indexOf(")")+1)}else{if(k=="object"){if(typeof(m.nodeName)!="undefined"){var b=m.nodeName;if(b=="#text"||b=="#cdata"){return m.nodeName+'["'+m.nodeValue+'"]'}else{if(typeof(m.attributes)!="undefined"){if(m.attributes){for(var f=0;f<m.attributes.length;f++){var d=m.attributes[f];if(d.nodeValue!=""&&d.nodeValue!="inherit"&&d.nodeValue!=null&&!String(d.nodeValue).startsWith("function")){c+=" "+d.nodeName+'="'+d.nodeValue+'"'}}}if(typeof(m.nodeType)!="undefined"&&m.nodeType==2){return"@"+b+'= "'+m.nodeValue+'"'}else{return"<"+b+c+"/>"}}else{if(typeof(m.location)!="undefined"){return"window"+(window.name?'["'+m.name+'"]':"")}else{return"<"+b.toLowerCase()+(m.id?' id="'+m.id+'"':"")+(m.className?' class="'+m.className+'"':"")+"/>"}}}}if(typeof(m.Class)!="undefined"){var h=m.Class;if(h=="Point"){return"Point("+m.left+", "+m.top+")"}else{if(h=="Size"){return"Size("+m.width+", "+m.height+")"}else{if(h=="Url"){return'Url("'+m.toString()+'")'}else{if(h=="Rgb"){return"Rgb("+m.red+", "+m.green+", "+m.blue+') {"'+m.toHex()+'"}'}else{if(h=="TWizard"||h=="TTable"||h=="TColumn"){if(typeof(m.owner)=="undefined"){return h+'("'+m.name+'")'}else{return valueString(m.owner)+"."+h+'("'+m.name+'")'}}else{if(h=="TField"){return valueString(m.owner.owner)+".TRow["+m.owner.index+"]."+h+'("'+m.name+'")'}else{if(h=="TMenuItem"){return h+"["+m.id+"]"}else{if(typeof(m.ID)!="undefined"){return h+"["+valueString(m.ID)+"]"}else{if(h=="KeyStroke"){return m.toString()}else{return h}}}}}}}}}}if(typeof(m.toString)!="undefined"){var l="";try{for(var a in m){l+=", "+a+": "+valueString(m[a])}if(l.length){l="{"+l.substr(2)+"}"}}catch(g){l=""}return m.toString().replace(/^\[object( [^\]]+)\]$/gi,"$1")+l}if(typeof(m.srcElement)!="undefined"||typeof(m.target)!="undefined"){if(typeof(m.type)!="undefined"){return"event[type = "+m.type+"]"}else{return"event"}}try{return String(m)}catch(j){return'unhandled type: "'+typeof(m)+'". String( value ): '+j.message}}else{return'unhandled type: "'+typeof(m)+'"'}}}}}}}}}}}function parseBool(a){var b=parseInt(a);if(String(a).substr(0,4).toLowerCase()=="true"||(!isNaN(b)&&b!=0)){return true}else{if(String(a).substr(0,5).toUpperCase()=="false"||(!isNaN(b)&&b==0)){return false}else{return null}}}function isSame(b,a,f){if(typeof(f)=="undefined"){var e=typeof(b),d=typeof(a);if(e==d){if(b==null&&a==null){return true}else{if(b==null||a==null){return false}}if(typeof(b.Class)!="undefined"&&typeof(a.Class)!="undefined"){if(b.Class==a.Class){return b==a}}if(e=="string"){b=b.replace(/\r\n/gi,"\n");a=a.replace(/\r\n/gi,"\n")}return b.toString()==a.toString()}else{return false}}else{try{var b=convert(b,f),a=convert(a,f);return this.isSame(b,a)}catch(c){}}return false}function convert(c,a){if(c==null||String(c)==""){return null}switch(a){case dtBoolean:if(String(c).toLowerCase()=="false"||String(c)=="0"){return false}else{return true}case dtDateTime:var e=isDateTime(c);if(e!=false){return e}else{e=parseXmlDate(c);if(!isNaN(e)){return e}else{throw new Error(getIllegalDateMessage())}}case dtPercentage:if(String(c).endsWith("%")){c=String(c).substr(0,String(c).length-1)}case dtDouble:case dtMoney:if(typeof(c)!="number"){var d=Number.formatInfo;if(d.groupingSeparator=="."&&!c.contains(d.decimalSeparator)){c=String(c).replace(new RegExp("\\"+d.groupingSeparator+"{1}","gi"),d.decimalSeparator);c=String(c).replace(new RegExp("\\"+d.groupingSeparator,"gi"),"")}else{c=String(c).replace(new RegExp("\\"+d.groupingSeparator,"gi"),"")}c=c.replace(d.currencySymbol,"");c=c.trim();c=c.replace(new RegExp("\\"+d.decimalSeparator,"gi"),".")}if(!isNumeric(c)){var b=getMessage(17);if(b){throw new Error(b.text)}else{throw new Error("De ingevoerde waarde is niet correct. Er wordt een getal verwacht.")}}return parseFloat(c);case dtInteger:case dtLong:if(!String(c).match(/\d{1,10}/gi)){var b=getMessage(16);if(b){throw new Error(b.text)}else{throw new Error("De ingevoerde waarde is niet correct. Er wordt een geheel getal verwacht.")}}return parseInt(c);case dtString:case dtGuid:return String(c);default:throw new Error('Illegal assignment to parameter "type" ('+a+").")}}function getBackColor(b){if(typeof(b)=="string"){b=Html.get(b)}var a=Element.getStyle(b,"background-color");if(b.parentNode!=null){if(a=="transparent"||a.startsWith("rgba(0, 0, 0, 0)")){a=getBackColor(b.parentNode)}}return a}function getColor(b){if(typeof(b)=="string"){b=Html.get(b)}var a=Element.getStyle(b,"color");if(a=="transparent"||a.startsWith("rgba(0, 0, 0, 0)")){if(b.parentNode!=null){return getColor(b.parentNode)}else{return a}}else{return a}}function rgbToHex(a){if(isIE){return a.replace("#","")}else{if(a.startsWith("rgb(")){a=a.substr(4);a=a.substr(0,a.length-1);a=a.split(", ")}return toHex(a[0])+toHex(a[1])+toHex(a[2])}}function twoDigit(a){if(a.length==1){return"0"+a}else{return a}}Rgb=function(c,b,a){this.Class="Rgb";if(c=="transparent"){this.red=128;this.green=128;this.blue=128;this.transparent=true}else{if(typeof(c)=="undefined"||c==null){c=255}if(typeof(b)=="undefined"||b==null){b=255}if(typeof(a)=="undefined"||a==null){a=255}this.red=c;this.green=b;this.blue=a;this.transparent=false}};Rgb.prototype.lighter=function(b){if(this.transparent){return this}if(typeof(b)=="undefined"){b=5}var d=Math.round(this.red*(100+b)/100),c=Math.round(this.green*(100+b)/100),a=Math.round(this.blue*(100+b)/100);return new Rgb(Math.min(d,255),Math.min(c,255),Math.min(a,255))};Rgb.prototype.darker=function(b){if(this.transparent){return this}if(typeof(b)=="undefined"){b=5}var d=Math.round(this.red*(100-b)/100),c=Math.round(this.green*(100-b)/100),a=Math.round(this.blue*(100-b)/100);return new Rgb(d,c,a)};Rgb.prototype.toHex=function(){if(this.transparent){return""}else{return twoDigit(toHex(this.red))+twoDigit(toHex(this.green))+twoDigit(toHex(this.blue))}};Rgb.prototype.toString=function(){if(this.transparent){return"transparent"}else{return"#"+this.toHex()}};function hexToRgb(b){if(b=="transparent"||b==null){return new Rgb("transparent")}if(b.startsWith("0x")){b=b.substr(2)}if(b.startsWith("#")){b=b.substr(1)}b=b.toUpperCase();var d,c,a;if(b.length==6){d=hexToNum(b.substr(0,2));c=hexToNum(b.substr(2,2));a=hexToNum(b.substr(4,2))}else{if(b.length==3){d=hexToNum(b.substr(0,1)+b.substr(0,1));c=hexToNum(b.substr(1,1)+b.substr(1,1));a=hexToNum(b.substr(2,1)+b.substr(2,1))}else{throw new Error('Illegal call to hexToRgb( color ) ("'+b+"\"). Parameter 'color' is expected to be 'transparent' or a hexadecimal value in the formats '0xE0FFA8', '0xFFF', '#EF9090', '#888', 'A8CEF3' or 'FFF'.")}}return new Rgb(d,c,a)}function hexToNum(a,b){if(typeof(b)=="undefined"){b=1}var c=a.substr(a.length-1).toUpperCase();if(a.length>1){return hexToNum(a.substr(0,a.length-1),b*16)+hexToNum(c,b)}switch(c){case"A":return 10*b;case"B":return 11*b;case"C":return 12*b;case"D":return 13*b;case"E":return 14*b;case"F":return 15*b;default:return parseInt(c)*b}}function toHex(a){if(typeof(a)!="number"){throw new Error('Illegal call to toHex( number ) ("'+a+"\"). Parameter 'number' is not a number.")}if(a<10){return String(a)}switch(a){case 10:return"A";case 11:return"B";case 12:return"C";case 13:return"D";case 14:return"E";case 15:return"F"}return toHex(Math.floor(a/16))+toHex(a%16)}function fillOut(a){if(Number(a)<10){return"0"+String(a)}else{return String(a)}}function isEmail(a){var b=new RegExp("^([\\w-\\.]+)@([\\w-]+(\\.[\\w-]+)*)\\.((com)|(edu)|(gov)|(info)|(lan)|(mil)|(net)|(org)|(\\w{2,2}))$","gi");return b.test(a)}function isURL(a){return Url.isValid(a)}function flashString(a){a=a.replace(/\%/g,"%25");a=a.replace(/\&amp;/g,"%26");a=a.replace(/\&/g,"%26");a=a.replace(/\+/g,"%2B");return a}function withZeros(a,c){var e="",b="",d=new RegExp("^-?\\d+(\\.\\d+)?$","gi");if(!d.test(a)){return false}if(a.startsWith("-")){a=a.substr(1);e="-"}if(a.indexOf(".")>-1){while(a.endsWith("0")){a=a.substr(0,a.length-1)}if(a.endsWith(".")){a=a.substr(0,a.length-1)}}if(a.startsWith("0")){while(a.startsWith("0")){a=a.substr(1)}if(a.startsWith(".")){a="0"+a}if(a.length==0){a="0"}}return parseFloat(e+a)==c}function isNumeric(a){a=new String(a);if(a.indexOf(",")>-1&&a.indexOf(".")>-1){if(a.indexOf(",")>a.indexOf(".")){a=a.replace(/\./gi,"")}else{if(a.indexOf(",")<a.indexOf(".")){a=a.replace(/\,/gi,"")}}}a=a.replace(/\,/gi,".");return withZeros(a,parseFloat(a))}function toNumber(a){if(a.indexOf(",")>-1&&a.indexOf(".")>-1){if(a.indexOf(",")>a.indexOf(".")){a=a.replace(/\./gi,"")}else{if(a.indexOf(",")<a.indexOf(".")){a=a.replace(/\,/gi,"")}}}a=a.replace(/\,/gi,".");return parseFloat(a)}function include(e){var d=document.getElementsByTagName("head")[0],a=d?d.getElementsByTagName("script"):null;if(!d){return false}if(a){for(var c=0;c<a.length;c++){if(a[c].getAttribute("src")==e){return false}}}var b=document.createElement("script");b.setAttribute("language","javascript");b.setAttribute("type","text/javascript");b.setAttribute("src",e);d.appendChild(b);return true}function filterHeaders(b){b=b.replace(/\t*<\![^>]+>(\r\n)?/gi,"");b=b.replace(/\t*<\/?html[^>]*>(\r\n)?/gi,"");if(b.indexOf('<img id="imgBack')>-1){b=b.split("\r\n");for(var a=0;a<b.length;a++){if(!b[a].trim().startsWith('<img id="imgBack"')){b[a]=""}else{b[a]="";a=b.length}}b=b.join("\r\n").trimEnd().trimStart("\r\n")}b=b.replace(/\t*<\/body>(\r\n)?/gi,"");return b}function getHtml(b,a){if(b&&typeof(b.innerHTML)!="undefined"){if(typeof(a.request)=="undefined"){a=new Url(a)}a=a.add("rnd",rndString());var c=a.request();if((String(c).trim()!=""&&c==false)||String(c).toLowerCase()=="false"){return false}b.innerHTML=filterHeaders(c);return true}else{throw new Error('Illegal call to getHtml( element, url ). Parameter "element" is not a valid Html object.')}}function htmlSize(a){if(typeof(a)=="string"){a=Html.get(a)}if(typeof(a)=="undefined"||a==null){throw new Error("Illegal argument. First argument is undefined or element not found ("+valueString(a)+").")}a.size=new Size(a.offsetWidth-measure(a,"margin-left")-measure(a,"border-left-width")-measure(a,"padding-left")-measure(a,"padding-right")-measure(a,"border-right-width")-measure(a,"margin-right"),a.offsetHeight-measure(a,"margin-top")-measure(a,"border-top-width")-measure(a,"padding-top")-measure(a,"padding-bottom")-measure(a,"border-bottom-width")-measure(a,"margin-bottom"));return a.size}function isScrolling(a){if(typeof(a)=="undefined"||a==null){return false}else{var b=Element.getStyle(a,"overflow");if(isIE&&Element.getStyle(a,"overflowY")!="hidden"){b="auto"}if(a.offsetHeight<a.scrollHeight&&b!="hidden"){return true}else{return false}}}function xFind(d,g){var h=String(g).toLowerCase().split("/");for(var e=0;e<h.length&&d!=null;e++){var j=null,a=(h[e].contains("[")?h[e].split("[")[0]:h[e]),f=(h[e].contains("[")?h[e].split(/[\[\]]/)[1]:1);for(var c=0;c<d.childNodes.length&&f&&j==null;c++){var b=d.childNodes[c];if(b.nodeType==1&&(a=="*"||b.tagName.toLowerCase()==a)){f--;if(f==0){j=b}}}d=j}return d}function getParent(a,b){if(typeof(a)=="string"){a=Html.get(a)}if(typeof(b)=="undefined"){b=1}while(a&&b--){a=a.parentNode}return a}var szPage=1,szWindow=2;function getSize(d){if(document.body){if(pageSize==null||winSize==null){var b,e,c,a;if(window.innerHeight&&window.scrollMaxY){c=document.body.scrollWidth;a=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){c=document.body.scrollWidth;a=document.body.scrollHeight}else{c=document.body.offsetWidth;a=document.body.offsetHeight}}if(self.innerHeight){b=self.innerWidth;e=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){b=document.documentElement.clientWidth;e=document.documentElement.clientHeight}else{if(document.body){b=document.body.clientWidth;e=document.body.clientHeight}}}if(a<e){pageHeight=e}else{pageHeight=a}if(c<b){pageWidth=b;if(a>e){pageWidth-=18}}else{pageWidth=c}pageSize=new Size(pageWidth,pageHeight);winSize=new Size(b,e)}}else{return null}switch(d){case szPage:return pageSize;break;case szWindow:return winSize;break;default:return[pageSize,winSize];break}}function measure(a,b){if(b==null||b==""){return 0}b=String(b);var e=Element.getStyle(a,b),c=parseFloat(e),d=0;if(isNaN(c)){c=0}if(String(e).endsWith("%")){d=Math.round(a.offsetWidth*c/100,0)}else{if(String(e).endsWith("px")){d=c}}return d}function getLeft(a){if(a&&a!=document.body){var b=Element.getStyle(a,"position");if(b=="absolute"||b=="relative"){return a.offsetLeft}else{return a.offsetLeft+getLeft(a.offsetParent)-a.scrollLeft}}else{if(a&&browser==browsers.IE&&a==document.body){return measure(document.body,"margin-left")}else{return 0}}}function getTop(a){if(a&&a!=document.body){var b=Element.getStyle(a,"position");if(b=="absolute"||b=="relative"){return a.offsetTop}else{return a.offsetTop+getTop(a.offsetParent)-a.scrollTop}}else{if(a&&browser==browsers.IE&&a==document.body){return measure(document.body,"margin-top")}else{return 0}}}function getPos(a){return new Point(getLeft(a),getTop(a))}Point=function(b,a){this.Class="Point";if(typeof(b)!="undefined"){this.left=b}else{this.left=0}if(typeof(a)!="undefined"){this.top=a}else{this.top=0}};Point.prototype.toString=function(){return"Point("+this.left+", "+this.top+")"};Size=function(b,a){this.Class="Size";if(typeof(b)!="undefined"){this.width=b}else{this.width=0}if(typeof(a)!="undefined"){this.height=a}else{this.height=0}};Size.prototype.toString=function(){return"Size("+this.width+", "+this.height+")"};Array.contains=function(c,b){if(c==null||typeof(c.length)=="undefined"){throw new Error("Illegal call to Array.indexOf(). First parameter is not an array.")}for(var a=0;a<c.length;a++){if(b instanceof RegExp){if(String(c[a]).search(b)>-1){return true}}else{if(b instanceof Date){if(b.isSameDate(c[a])){return true}}else{if(c[a]==b){return true}}}}return false};Array.isArray=function(a){if(a==null){return false}return(a instanceof Array)};Array.indexOf=function(e,c,d,a){if(e==null||typeof(e.length)=="undefined"){throw new Error("Illegal call to Array.indexOf(). First parameter is not an array.")}if(typeof(d)=="undefined"){d=0}else{d=parseInt(d)}if(isNaN(d)||d<0){d=0}if(typeof(a)=="undefined"){a=e.length}else{a=parseInt(a)}if(isNaN(a)||a>e.length){a=e.length}for(var b=d;b<a;b++){if(c instanceof RegExp){if(String(e[b]).search(c)>-1){return true}}else{if(c instanceof Date){if(c.isSameDate(e[b])){return b}}else{if(e[b]==c){return b}}}}return -1};Array.prototype.add=function(b){var a=this.length;this[this.length]=b;return a};Array.prototype.clear=function(a){this.length=0};Array.prototype.contains=function(a){return Array.contains(this,a)};Array.prototype.insert=function(a,c){if(a<0){throw new Error("Illegal argument. Index out of range ("+a+").")}if(a>this.length){a=this.length}for(var b=this.length;b>a;b--){this[b]=this[b-1]}this[a]=c};Array.prototype.insertAfter=function(c,b){var a=this.indexOf(b);if(a==-1){throw new Error("Illegal argument. Given element is not contained by the array.")}this.insert(a+1,c)};Array.prototype.insertBefore=function(c,b){var a=this.indexOf(b);if(a==-1){throw new Error("Illegal argument. Given element is not contained by the array.")}this.insert(a,c)};Array.prototype.indexOf=function(b,c,a){return Array.indexOf(this,b,c,a)};Array.prototype.moveTo=function(c,b){var a=this.indexOf(c);if(a!=b){if(a>-1){this.remove(a)}this.insert(b,c)}};Array.prototype.remove=function(a){if(typeof(a)=="number"){for(var b=a;b<this.length-1;b++){this[b]=this[b+1]}this.length--}else{a=this.indexOf(a);if(a>-1){this.remove(a)}else{throw new Error("Illegal argument. Given element is not contained by the array.")}}return};NumberFormat=function(c,b,a){this.decimalSeparator=c;this.groupingSeparator=b;this.currencySymbol=a};Number.prototype.fillOut=function(b){if(isNaN(this)||!isFinite(this)){return String(this)}if(typeof(b)=="undefined"){b=2}var a=String(this);while(a.length<b){a="0"+a}return a};Number.prototype.formatString=function(n){if(n=="C"||n=="c"){return this.formatString(Number.formatInfo.currencySymbol+" ,##0.00")}else{if(n=="D"||n=="d"){return this.formatString("0")}else{if(n=="N"||n=="n"){return this.formatString(",##0.00")}else{if(n=="P"||n=="p"){return this.formatString(",##0.00%")}else{if(n==null||n==""||typeof(n)=="undefined"){return String(this).replace(".",Number.formatInfo.decimalSeparator)}else{n=String(n)}}}}}var e=String(this),d=n,j=e.split(/\./gi),b=n.indexOf(",")>-1,f=this<0;n=n.replace(/,/gi,"");n=n.split(/\./gi);if(n[0].match(/0#/gi)){throw new Error("Illegal format in call to \"formatString\". '#' encountered after '0' and before the decimal separator.")}if(n.length>1&&n[1].match(/#0/gi)){throw new Error("Illegal format in call to \"formatString\". '#' encountered before '0' and after the decimal separator.")}if(n.length>2){throw new Error('Illegal format in call to "formatString". Multiple use of decimal separator.')}if(!d.endsWith(".")){if(n.length==1){j=String(Math.round(e)).split(".")}else{if(n[1].length>0){var h=n[1].search(/[^#0]/g);if(h==-1){h=n[1].length}j=String(Math.round(e*Math.pow(10,h))/Math.pow(10,h)).split(".")}}}if(f){e=j[0].substr(1)}else{e=j[0]}var c=n[0].replace(/^[^0]*(0+)/gi,"$1");if(c.length>e.length){e=c.substr(0,c.length-e.length)+e}if(b){var l=e,e="";for(var g=l.length-1;g>=0;g-=3){if(g-2>=0){e=Number.formatInfo.groupingSeparator+l.substr(g-2,3)+e}else{e=l.substr(0,g+1)+e}}if(e.startsWith(".")){e=e.substr(1)}}var k=n[0].search(/[0#,\.]/);if(k>0){e=n[0].substr(0,k)+e}if(n.length>1){e+=Number.formatInfo.decimalSeparator;if(j.length>1){e+=j[1];if(n.length>1){var o=n[1].replace(/([#0])/g,"$1");if(o.length>j[1].length){e+=o.substr(o.length-j[1].length)}var a=Math.min(j[1].length,n[1].search(/[^#0]/g));if(a>-1){e+=n[1].substr(a)}}}else{if(n.length>1){e+=n[1]}}}var m=new RegExp(RegExp.escape(Number.formatInfo.decimalSeparator)+"#+","g");if(m.test(e)){e=e.replace(m,"")}e=e.replace(/#/gi,"");if(e.endsWith(Number.formatInfo.decimalSeparator)){e=e.substr(0,e.length-1)}return f?"-"+e:e};RegExp.escape=function(a){if(a==null||a==""||typeof(a)=="undefined"){return""}a=String(a);a=a.replace(/\\/g,"\\\\");a=a.replace(/\./g,"\\.");a=a.replace(/\^/g,"\\^");a=a.replace(/\$/g,"\\$");a=a.replace(/\?/g,"\\?");a=a.replace(/\*/g,"\\*");a=a.replace(/\+/g,"\\+");a=a.replace(/\|/g,"\\|");a=a.replace(/\(/g,"\\(");a=a.replace(/\)/g,"\\)");a=a.replace(/\{/g,"\\{");a=a.replace(/\}/g,"\\}");a=a.replace(/\[/g,"\\[");a=a.replace(/\]/g,"\\]");return a};var regExp={escape:function(a){return RegExp.escape(a)}};String.prototype.capitalize=function(){return this.substr(0,1).toUpperCase()+this.substr(1)};String.prototype.coalesce=function(){if(this!=""){return this}for(var a=0;a<arguments.length;a++){if(arguments[a]){return arguments[a]}}return""};String.prototype.contains=function(){for(var a=0;a<arguments.length;a++){if(this.indexOf(arguments[a])>-1){return true}}return false};String.prototype.decapitalize=function(){return this.substr(0,1).toLowerCase()+this.substr(1)};String.prototype.endsWith=function(a){return(this.substr(this.length-a.length)==new String(a))};String.prototype.htmlEncode=function(){var d=String(this);if(!d){d=""}d=d.replace(/\&/gi,"&amp;");for(var b=0;b<charCodes.length;b++){var c=charCodes[b],a=specialChar[c-160];d=d.replace(new RegExp(String.fromCharCode(c),"g"),a)}d=d.replace(/\"/gi,"&quot;");d=d.replace(/\</gi,"&lt;");d=d.replace(/\>/gi,"&gt;");return d};String.prototype.indent=function(b){var c="\r\n";if(typeof(b)=="undefined"){b=1}for(var a=0;a<b;a++){c+="\t"}return this.replace(/\r\n(\t*<)/gi,c+"$1")};String.prototype.innerTrim=function(){var a=new String(this);while(a.contains("  ")){a=a.replace(/ {2}/gi," ")}return a};String.prototype.insert=function(a,c){var b=new String(this);if(a>0){b=this.substr(0,a)}b+=c;if(a<this.length){b+=this.substr(a,this.length-a)}return b};String.prototype.lowerFirst=function(){return this.substr(0,1).toLowerCase()+this.substr(1)};String.prototype.reverse=function(){var a="";for(var b=0;b<this.length;b++){a+=this.substr(this.length-b-1,1)}return a};String.prototype.shortenLeft=function(a){return this.substr(a)};String.prototype.shortenRight=function(a){return this.substr(0,this.length-a)};String.prototype.startsWith=function(a){return(this.substr(0,a.length)==new String(a))};String.prototype.toJs=function(){var a=this.replace(/\\/gi,"\\\\");a=a.replace(/\"/gi,'\\"');a=a.replace(/\r/gi,"\\r");a=a.replace(/\n/gi,"\\n");a=a.replace(/\t/gi,"\\t");return'"'+a+'"'};String.prototype.trim=function(b){var c=new String(this);if(arguments.length==0){c=c.replace(/^\s*/gi,"");c=c.replace(/\s*$/gi,"")}else{var d=new RegExp("^["+RegExp.escape(b)+"]*","gi"),a=new RegExp("["+RegExp.escape(b)+"]*$","gi");c=c.replace(d,"");c=c.replace(a,"")}return c};String.prototype.trimEnd=function(a){var b=new String(this);if(typeof(a)=="undefined"){b=b.replace(/\s*$/gi,"")}else{b=b.replace(new RegExp("["+RegExp.escape(a)+"]*$","gi"),"")}return b};String.prototype.trimStart=function(a){var b=new String(this);if(typeof(a)=="undefined"){b=b.replace(/^\s*/gi,"")}else{b=b.replace(new RegExp("^["+RegExp.escape(a)+"]*","gi"),"")}return b};String.prototype.unindent=function(b){var c="\r\n";if(typeof(b)=="undefined"){b=1}for(var a=0;a<b;a++){c+="\t"}return this.replace(new RegExp(c),"\r\n")};String.prototype.upperFirst=function(){return this.substr(0,1).toUpperCase()+this.substr(1)};TUser=function(b,c,d,a){this.Class="TUser";this.ID=b;this.fullname=c;this.username=d;this.eMail=a};TUser.prototype.toJS=function(){var a="new TUser( "+valueString(this.ID)+", "+valueString(this.fullname)+", "+valueString(this.username)+", "+valueString(this.eMail)+")";return a};TUser.prototype.toXML=function(a){if(typeof(a)=="undefined"){a="user"}var b="\r\n<"+a;if(String(this.ID)!="null"){b+=' ID="'+this.ID+'"'}b+=">";if(this.fullname){b+="\r\n\t<fullname>"+this.fullname+"</fullname>"}if(this.username){b+="\r\n\t<username>"+this.username+"</username>"}if(this.eMail){b+="\r\n\t<eMail>"+this.eMail+"</eMail>"}b+="\r\n</"+a+">";return b};Url=function(a){var b=null;this.Class="Url";this.disposed=false;this.HTTP=null;this.onreadystagechange=null;this.index=Url.all.add(this);if(typeof(a)=="undefined"){b=String(document.location)}else{b=String(a).replace(/\&amp;/gi,"&")}if(Url.unload==null){Url.unload=addEvent(window,"unload","Url.dispose();")}this.url=function(c){if(typeof(c)=="undefined"){return b}else{b=c}}};Url.prototype.add=function(c,d){var b=this.url();if(d==null||typeof(d)=="undefined"){return this.remove(c)}else{if(typeof(d.age)!="undefined"){d=d.formatString("g?")}d=encodeURI(d).replace(/[&]/gi,"%26");if(b.search(new RegExp("([?&])("+c+"=[^&#]*)","gi"))>-1){b=b.replace(new RegExp("([?&])("+c+"=[^&#]*)","gi"),"$1"+c+"="+d)}else{var a=null;if(b.indexOf("#")>-1){a=b.substr(b.indexOf("#"));b=b.substr(0,b.indexOf("#"))}if(b.indexOf("?")>-1){b+="&"+c+"="+d}else{b+="?"+c+"="+d}if(a){b+=a}}}return new Url(b)};Url.prototype.async=function(c,a,b){if(typeof(b)=="string"){this.onreadystatechange=new Function("HTTP",b)}else{if(typeof(b)=="function"){this.onreadystatechange=b}}if(this.onreadystatechange!=null&&typeof(this.onreadystatechange)!="function"){throw new Error("Illegal assignment to Url.onreadystatechange. Property is not a function.")}if(typeof(c)=="undefined"){c="GET"}if(typeof(a)=="undefined"){a=null}this.HTTP=new XMLHttpRequest();if(this.onreadystatechange!=null){this.HTTP.onreadystatechange=new Function("Url.all["+this.index+"].loaded();")}this.HTTP.open(c.toUpperCase(),this.add("rnd",rndString()));this.HTTP.setRequestHeader("snakeware-ajax","true");if(c.toUpperCase()=="POST"){this.HTTP.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}this.HTTP.send(a)};Url.prototype.current=function(){return new Url(String(document.location))};Url.prototype.dispose=function(){if(!this.disposed){this.HTTP=null;this.onreadystagechange=null;this.disposed=true}};Url.prototype.get=function(b){var a=this.url(),c=a.replace(new RegExp(".*[?&]"+b+"=([^&#]*).*","gi"),"$1");if(c==a){c=null}else{c=decodeURI(c).replace(/%26/gi,"&")}return c};Url.prototype.filter=function(){var a=new Url(this.url());for(var b=0;b<arguments.length;b++){a=a.remove(arguments[b])}return a};Url.prototype.filterAllBut=function(){var a=new Url(this.url().replace(new RegExp(Url.regex),"$1$4"));for(var b=0;b<arguments.length;b++){a=a.add(arguments[b],this.get(arguments[b]))}return a};Url.prototype.isSame=function(b){if(!Url.isUrl(b)){b=new Url(b)}var a=this.page(),e=b.page();if(a!=null||e!=null){if(a==null&&e!=null){return false}if(a!=null&&e==null){return false}if(a.toLowerCase()!=e.toLowerCase()){return false}}var d=this.removeServer().replacePage("").url().substr(1).split("&");for(var c=0;c<d.length;c++){if(d[c].contains("=")){d[c]=d[c].substr(0,d[c].indexOf("="))}}for(var c=0;c<d.length;c++){if(b.get(d[c])!=this.get(d[c])){return false}}return true};Url.prototype.loaded=function(){if(this.HTTP.readyState==4){this.onreadystatechange(this.HTTP)}};Url.prototype.page=function(){var a=this.url().replace(new RegExp(Url.regex),"$4");if(a==""){a=null}return a};Url.prototype.remove=function(b){var a=this.url();if(b=="#"){if(a.indexOf("#")>-1){a=a.substr(a.indexOf("#"))}return new Url(a)}a=a.replace(new RegExp("([?&])"+b+"=[^&#]*","gi"),"$1");a=a.replace(/\?&/gi,"?");a=a.replace(/&&/gi,"&");a=a.replace(/&$/gi,"");a=a.replace(/\?$/gi,"");return new Url(a)};Url.prototype.removeServer=function(){var a=this.server();if(a!=null){return new Url(this.url().replace(a,""))}else{return new Url(this.url())}};Url.prototype.replacePage=function(c,e){var d=rewriting,a=this.url(),b=this.page();if(typeof(e)=="undefined"){e=false}if(e){d=false}if((b!=null&&b.endsWith(".aspx"))||!d){if(b==null){a=a.replace(new RegExp(Url.regex),"$1/"+c+"$9");a=a.replace("//"+c,"/"+c);if(a.startsWith("/"+c)){a=a.substr(1)}return new Url(a)}return new Url(a.replace(b,c))}else{return this.add("use",c.replace(".aspx",""))}};Url.prototype.request=function(e,c,b,a){if(typeof(e)=="undefined"){e="GET"}if(typeof(c)=="undefined"){c=null}if(typeof(b)=="undefined"){b=false}var d=new XMLHttpRequest();d.open(e.toUpperCase(),this.add("rnd",rndString()),false);d.setRequestHeader("snakeware-ajax","true");if(e.toUpperCase()=="POST"){d.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}d.send(c);if(d.status==200){if(b){return d.responseXML}else{return d.responseText}}else{if(a||typeof(a)=="undefined"){this.showError(d)}return false}};Url.prototype.server=function(){var a=this.url().replace(new RegExp(Url.files),"$1");if(a==""){a=null}return a};Url.prototype.showError=function(a){if(this.HTTP!=null&&typeof(a)=="undefined"){a=this.HTTP}alertWin(a.responseText)};Url.prototype.toString=function(){return this.url()};Url.all=[];Url.current=new Url();Url.disposed=false;Url.files=/^(https?:\/\/(localhost(\:\d+)?\/)?[^\/\?]+[\/]?)?(([^\/\.]+\/)*([^\.\?]+(\.(\w+))?)?)?(\?.*)?$/gi;Url.local=new RegExp("^([a-zA-Z0-9\\-]+|(http://)?localhost:\\d+)?(/\\S*)?$","gi");Url.regex=/^(https?:\/\/(localhost(\:\d+)?\/)?[^\/\?]+[\/]?)?(([^\/\.]+\/)*([^\.\?]+(\.(as[ph]x?|html?|php?))?)?)?(\?.*)?$/gi;Url.relative=new RegExp("^(/\\S*)?$","gi");Url.unload=null;Url.valid=new RegExp("^(http\\://)?([a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3})(/\\S*)?$","gi");Url.dispose=function(){if(!Url.disposed){for(var a=0;a<Url.all.length;a++){Url.all[a].dispose();Url.all[a]=null}Url.all=[];Url.disposed=true;Url.regex=null}};Url.isLocal=function(a){if(a==null){return false}if(Url.isUrl(a)){a=a.toString()}return new RegExp(Url.local).test(a)};Url.isRelative=function(a){if(a==null){return false}if(Url.isUrl(a)){a=a.toString()}return new RegExp(Url.relative).test(a)};Url.isUrl=function(a){return Object.getClass(a)=="Url"};Url.isValid=function(a){if(a==null){return false}if(Url.isUrl(a)){a=a.toString()}return new RegExp(Url.valid).test(a)};Object.getClass=function(a){if(a==null){return null}if(typeof(a)!="undefined"&&typeof(a.Class)!="undefined"){return a.Class}else{return typeof(a)}};var Log={active:false,Class:"Log",included:false,doWrite:function(){},write:function(){if(!Log.active){return}if(Log.included){return}var url=new Url("js/default/log.js"),js=url.request();eval(js);Log.included=true;Log.write.apply(this,arguments)}};var Cookies={exists:function(a){return Cookies(a)!=null},get:function(a){var d=getCookie(a);if(d==null){return d}else{var b=String(d).split("|~~|"),c=b.length>1?parseInt(b[1]):dtString;if(b.length){return convert(b[0],c)}else{return null}}},remove:function(a){removeCookie(a)},set:function(a,c,b){if(c==null&&String(c)=="null"){removeCookie(a);return}if(typeof(b)=="undefined"){if(typeof(c)=="boolean"){b=dtBoolean}else{if(typeof(c)=="number"){if(String(c).contains(".")){b=dtDouble}else{b=dtInteger}}else{if(typeof(c)=="object"&&typeof(c.formatString)!="undefined"){b=dtDateTime}else{b=dtString}}}}switch(b){case dtBoolean:c=c?"true":"false";break;case dtDateTime:c=c.formatString("g");break;default:c=String(c)}c+="|~~|"+b;setCookie(a,c)}};var Html={addClass:function(a,b){Element.addClassName(a,b)},blur:function(a){Element.removeClassName(a,"focused")},disable:function(a){Element.addClassName(a,"disabled")},enable:function(a){Element.removeClassName(a,"disabled")},find:function(d,b,a){if(typeof(a)=="undefined"){a=false}if(d&&typeof(d.childNodes)!="undefined"){for(var c=0;c<d.childNodes.length;c++){var e=d.childNodes[c];if(b==ntText){if(typeof(e.data)!="undefined"&&e.data!=""&&e.data!=null){return e}}else{if(e.nodeType==b){return e}}}if(a){for(var c=0;c<d.childNodes.length;c++){var e=d.childNodes[c];return Html.find(e,b,true)}}}return null},focus:function(a){Element.addClassName(a,"focused")},get:function(a){if(typeof(a)=="string"){return document.getElementById(a)}else{if(typeof(a)=="undefined"){return null}else{return a}}},getText:function(a){var b=Html.find(a,ntText,true);if(b!=null){return b.data}else{return null}},hasClass:function(a,b){return Element.hasClassName(a,b)},remove:function(a){if(a.parentNode){a.parentNode.removeChild(a)}},removeClass:function(a,b){Element.removeClassName(a,b)},setText:function(a,b){if(b==null){b=""}if(typeof(b)!="string"){b=String(b)}var c=Html.find(a,ntText);if(c!=null){c.data=b}else{a.insertBefore(document.createTextNode(b),a.firstChild)}},toAttrib:function(a){if(a!=null){a=String(a);while(a.indexOf("&amp;")>-1){a=a.replace(/\&amp;/gi,"&")}a=a.replace(/\&/gi,"&amp;");a=a.replace(/\"/gi,"&quot;");a=a.replace(/</gi,"&lt;");a=a.replace(/>/gi,"&gt;")}else{a=""}return a},toHtml:function(a){if(a!=null){a=String(a);a=a.htmlEncode();a=a.replace(/\r?\n/gi,"<br/>");a=a.trim()}else{a=""}return a},toText:function(b){if(b!=null){b=String(b);b=b.replace(/[\r?\n]/gi,"");b=b.replace(/<p>&nbsp;<\/p>/gi,"<p></p>");b=b.replace(/<br\/?>/gi,"\r\n");b=b.replace(/<\/p>/gi,"\r\n");b=b.replace(/<\/h\d>/gi,"\r\n");b=b.replace(/<\/?[^>]+>/gi,"");for(var a=0;a<charCodes.length;a++){var c=new RegExp(RegExp.escape(specialChar[charCodes[a]-160]),"g");b=b.replace(c,String.fromCharCode(charCodes[a]))}b=b.trim()}return b}};var Counter={element:null,startValue:null,stop:false,timer:null,action:function(a){clearTimeout(Counter.timer);var b=Number(Counter.element.value);if(b+a>0&&b+a<100){if(!Counter.stop||Counter.startValue==b){Counter.element.value=b+a}if(!Counter.stop){Counter.timer=setTimeout("Counter.action( "+a+");",200)}}else{Counter.stop=true}if(Counter.stop){Counter.stopped()}},end:function(){Counter.stop=true},start:function(a,b){if(typeof(a)!="string"){a=xFind(a.parentNode,"input").id}if(typeof(b)=="undefined"){b=1}if(Number(b)==NaN){b=1}if(b>1){b=1}if(b<-1){b=-1}if(Counter.timer==null){Counter.stop=false;Counter.element=Html.get(a);Counter.startValue=Number(Counter.element.value);Counter.timer=setTimeout("Counter.action( "+b+" );",120)}},stopped:function(){clearTimeout(Counter.timer);var a=Counter.element;Counter.element=null;Counter.startValue=null;Counter.timer=null;if(typeof(a.field)!="undefined"){var b=a.field;b.value(a.value)}}};
var base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(b){var d="",c=0,a,e,f,g,h,i;for(b=base64._utf8_encode(b);c<b.length;){a=b.charCodeAt(c++);e=b.charCodeAt(c++);f=b.charCodeAt(c++);g=a>>2;a=(a&3)<<4|e>>4;h=(e&15)<<2|f>>6;i=f&63;if(isNaN(e))h=i=64;else if(isNaN(f))i=64;d=d+this._keyStr.charAt(g)+this._keyStr.charAt(a)+this._keyStr.charAt(h)+this._keyStr.charAt(i)}return d},decode:function(b){var d="",c=0,a,e,f,g,h;for(b=b.replace(/[^A-Za-z0-9\+\/\=]/g,
"");c<b.length;){a=this._keyStr.indexOf(b.charAt(c++));e=this._keyStr.indexOf(b.charAt(c++));g=this._keyStr.indexOf(b.charAt(c++));h=this._keyStr.indexOf(b.charAt(c++));a=a<<2|e>>4;e=(e&15)<<4|g>>2;f=(g&3)<<6|h;d+=String.fromCharCode(a);if(g!=64)d+=String.fromCharCode(e);if(h!=64)d+=String.fromCharCode(f)}return d=base64._utf8_decode(d)},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");for(var d="",c=0;c<b.length;c++){var a=b.charCodeAt(c);if(a<128)d+=String.fromCharCode(a);else{if(a>127&&a<2048)d+=
String.fromCharCode(a>>6|192);else{d+=String.fromCharCode(a>>12|224);d+=String.fromCharCode(a>>6&63|128)}d+=String.fromCharCode(a&63|128)}}return d},_utf8_decode:function(b){for(var d="",c=0,a=c1=c2=0;c<b.length;){a=b.charCodeAt(c);if(a<128){d+=String.fromCharCode(a);c++}else if(a>191&&a<224){c2=b.charCodeAt(c+1);d+=String.fromCharCode((a&31)<<6|c2&63);c+=2}else{c2=b.charCodeAt(c+1);c3=b.charCodeAt(c+2);d+=String.fromCharCode((a&15)<<12|(c2&63)<<6|c3&63);c+=3}}return d}};
var a,TWeekDay=["wdSunday","wdMonday","wdTuesday","wdWednesday","wdThursday","wdFriday","wdSaturday"],wdSunday=0,wdMonday=1,wdTuesday=2,wdWednesday=3,wdThursday=4,wdFriday=5,wdSaturday=6;DateTimeFormat=function(b,c,d,h,q,j,m){this.dateSeparator=b;this.longDatePattern=c;this.shortDatePattern=d;this.timeSeparator=h;this.longTimePattern=q;this.shortTimePattern=j;this.firstDay=m};
DateTimeFormat.prototype.getDateDisplayPattern=function(){var b=this.shortDatePattern;b=b.split("'");for(var c=1;c<b.length;c++)b[c]="";b=b.join("");return b=b.replace(new RegExp("[^dmy"+regExp.escape(this.dateSeparator)+"]","gi"),"").trim()};DateTimeFormat.prototype.getTimeDisplayPattern=function(){var b=this.shortTimePattern;b=b.split("'");for(var c=1;c<b.length;c++)b[c]="";b=b.join("");return b=b.replace(new RegExp("[^hnst"+regExp.escape(this.timeSeparator)+"]","gi"),"").trim()};a=Date.prototype;
a.addDays=function(b){var c=new Date(this);c.setDate(this.getDate()+b);return c};a.addHours=function(b){var c=new Date(this);c.setHours(this.getHours()+b);return c};a.addMinutes=function(b){var c=new Date(this);c.setMinutes(this.getMinutes()+b);return c};a.addMonths=function(b){var c=new Date(this);c.setMonths(this.getMonths()+b);return c};a.addSeconds=function(b){var c=new Date(this);c.setSeconds(this.getSeconds()+b);return c};
a.addYears=function(b){var c=new Date(this);c.setFullYear(this.getFullYear()+b);return c};a.age=function(){var b=new Date,c=b.getFullYear()-this.getFullYear();if(b.getMonth()<this.getMonth()||b.getMonth()==this.getMonth()&&b.getDate()<this.getDate())c--;return c};a.daysInMonth=function(){switch(this.getMonth()+1){case 4:case 6:case 9:case 11:return 30;case 2:return this.isLeapYear()?29:28;default:return 31}};
a.formatString=function(b){var c=String(b);if(b==null||b==""||typeof b=="undefined")c=Date.formatInfo.shortDatePattern+" "+Date.formatInfo.shortTimePattern;else if(b=="s")c="yyyy-mm-ddTHH:nn:ss";else if(b=="d")c=Date.formatInfo.shortDatePattern;else if(b=="D")c=Date.formatInfo.longDatePattern;else if(b=="t")c=Date.formatInfo.shortTimePattern;else if(b=="T")c=Date.formatInfo.longTimePattern;else if(b=="f?")c=this.getHours()==0&&this.getMinutes()==0?Date.formatInfo.longDatePattern:Date.formatInfo.longDatePattern+
" "+Date.formatInfo.shortTimePattern;else if(b=="f")c=Date.formatInfo.longDatePattern+" "+Date.formatInfo.shortTimePattern;else if(b=="F?")c=this.getHours()==0&&this.getMinutes()==0&&this.getSeconds()==0?Date.formatInfo.longDatePattern:Date.formatInfo.longDatePattern+" "+Date.formatInfo.longTimePattern;else if(b=="F")c=Date.formatInfo.longDatePattern+" "+Date.formatInfo.longTimePattern;else if(b=="g?")c=this.getHours()==0&&this.getMinutes()==0?Date.formatInfo.shortDatePattern:Date.formatInfo.shortDatePattern+
" "+Date.formatInfo.shortTimePattern;else if(b=="g")c=Date.formatInfo.shortDatePattern+" "+Date.formatInfo.shortTimePattern;else if(b=="G?")c=this.getHours()==0&&this.getMinutes()==0&&this.getSeconds()==0?Date.formatInfo.shortDatePattern:Date.formatInfo.shortDatePattern+" "+Date.formatInfo.longTimePattern;else if(b=="G")c=Date.formatInfo.shortDatePattern+" "+Date.formatInfo.longTimePattern;c=c.replace(/\%/g,"");c=c.replace(/\//g,Date.formatInfo.dateSeparator);c=c.replace(/-/g,Date.formatInfo.dateSeparator);
c=c.replace(/:/g,Date.formatInfo.timeSeparator);c=c.replace(/yyyy/gi,this.getFullYear());if(c.toLowerCase().indexOf("yyy")>-1)throw new Error('Illegal yearformat "yyy".');c=c.replace(/yy/gi,(new String(this.getFullYear())).substr(2));c=c.replace(/^mm$/gi,fillOut(this.getMonth()+1));c=c.replace(/^mm([^m])/gi,fillOut(this.getMonth()+1)+"$1");c=c.replace(/([^m])mm$/gi,"$1"+fillOut(this.getMonth()+1));c=c.replace(/([^m])mm([^m])/gi,"$1"+fillOut(this.getMonth()+1)+"$2");c=c.replace(/^m$/gi,this.getMonth()+
1);c=c.replace(/^m([^m])/gi,this.getMonth()+1+"$1");c=c.replace(/([^m])m$/gi,"$1"+(this.getMonth()+1));c=c.replace(/([^m])m([^m])/gi,"$1"+(this.getMonth()+1)+"$2");c=c.replace(/^dd$/gi,fillOut(this.getDate()));c=c.replace(/^dd([^d])/gi,fillOut(this.getDate())+"$1");c=c.replace(/([^d])dd$/gi,"$1"+fillOut(this.getDate()));c=c.replace(/([^d])dd([^d])/gi,"$1"+fillOut(this.getDate())+"$2");c=c.replace(/^d$/gi,this.getDate());c=c.replace(/^d([^d])/gi,this.getDate()+"$1");c=c.replace(/([^d])d$/gi,"$1"+this.getDate());
c=c.replace(/([^d])d([^d])/gi,"$1"+this.getDate()+"$2");if(this.getHours()>12){c=c.replace(/hh/g,fillOut(this.getHours()-12));c=c.replace(/h/g,this.getHours()-12)}else if(this.getHours()==0){c=c.replace(/hh/g,"12");c=c.replace(/h/g,"12")}else{c=c.replace(/hh/g,fillOut(this.getHours()));c=c.replace(/h/g,this.getHours())}c=c.replace(/HH/g,fillOut(this.getHours()));c=c.replace(/H/g,this.getHours());c=c.replace(/nn/gi,fillOut(this.getMinutes()));c=c.replace(/n/gi,this.getMinutes());c=c.replace(/ss/gi,
fillOut(this.getSeconds()));c=c.replace(/s/gi,this.getSeconds());if(this.getHours()<12){c=c.replace(/tt/g,"AM");c=c.replace(/t/g,"A")}else{c=c.replace(/tt/g,"PM");c=c.replace(/t/g,"P")}c=c.replace(/mmmm/gi,months[this.getMonth()]);c=c.replace(/mmm/gi,months[this.getMonth()].substr(0,3));c=c.replace(/dddd/gi,days[this.getDay()]);c=c.replace(/ddd/gi,days[this.getDay()].substr(0,2));if(b=="s"){if(this.dateSeparator!="-")c=c.replace(new RegExp(regExp.escape(Date.formatInfo.dateSeparator),"gi"),"-");if(this.timeSeparator!=
":")c=c.replace(new RegExp(regExp.escape(Date.formatInfo.timeSeparator),"gi"),":")}return c};a.integrateDate=function(b){var c=new Date(this);c.setFullYear(b.getFullYear());c.setMonth(b.getMonth());c.setDate(b.getDate());return c};a.integrateTime=function(b){var c=new Date(this);c.setHours(b.getHours());c.setMinutes(b.getMinutes());c.setSeconds(b.getSeconds());c.setMilliseconds(b.getMilliseconds());return c};a.isLeapYear=function(){var b=this.getFullYear();return b%4==0&&(b%100||b%1E3==0)?true:false};
a.isSameDate=function(b){return this.getDate()==b.getDate()&&this.getMonth()==b.getMonth()&&this.getFullYear()==b.getFullYear()};a.isSameTime=function(b){return this.getSeconds()==b.getSeconds()&&this.getMinutes()==b.getMinutes()&&this.getHours()==b.getHours()};a.isSame=function(b){return this.isSameDate(b)&&this.isSameTime(b)};
a.jsDate=function(){return"new Date("+this.getFullYear()+", "+this.getMonth()+", "+this.getDate()+", "+this.getHours()+", "+this.getMinutes()+", "+this.getSeconds()+", "+this.getMilliseconds()+")"};a.nextDay=function(b){b||(b=1);var c=new Date(this);if(c.getDate()+b<=c.daysInMonth())c.setDate(c.getDate()+b);else if(c.getMonth()<11){c.setDate(c.getDate()+b-c.daysInMonth());c.setMonth(c.getMonth()+1)}else{c.setDate(c.getDate()+b-c.daysInMonth());c.setYear(c.getFullYear()+1);c.setMonth(0)}return c};
a.nextMonth=function(){var b=new Date(this);if(b.getMonth()<11)for(b.setMonth(b.getMonth()+1);b.getMonth()>this.getMonth()+1;)b=b.priorDay();else{b.setMonth(0);b.setYear(b.getFullYear()+1)}return b};a.nextWeek=function(){return this.nextDay(7)};a.nextYear=function(b){b||(b=1);var c=new Date(this);c.setYear(c.getFullYear()+b);return c};
a.priorDay=function(b){b||(b=1);var c=new Date(this);if(c.getDate()-b>=1)c.setDate(c.getDate()-b);else{if(c.getMonth()>0)c.setMonth(c.getMonth()-1);else{c.setYear(c.getFullYear()-1);c.setMonth(11)}c.setDate(c.daysInMonth()-b+c.getDate())}return c};a.priorWeek=function(){return this.priorDay(7)};a.priorMonth=function(){var b=new Date(this);if(b.getMonth()>0)for(b.setMonth(b.getMonth()-1);b.getMonth()==this.getMonth();)b=b.priorDay();else{b.setMonth(11);b.setYear(b.getFullYear()-1)}return b};
a.priorYear=function(b){b||(b=1);var c=new Date(this);c.setYear(c.getFullYear()-b);return c};a.round=function(){var b=new Date(this);b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0);return b};
a.weekNo=function(){var b=this.getFullYear(),c=this.getMonth()+1,d=this.getDate()+Date.formatInfo.firstDay,h=Math.floor((14-c)/12);b=b+4800-h;c=c+12*h-3;h=Math.floor(b/4)-Math.floor(b/100)+Math.floor(b/400);d=d+Math.floor((153*c+2)/5)+365*b+h-32045;d=(d+31741-d%7)%146097%36524%1461;b=Math.floor(d/1460);return Math.floor(((d-b)%365+b)/7)+1};Date.isDate=function(b){return isDate(b)};Date.isDateTime=function(b){return isDateTime(b)};Date.isTime=function(b){return isTime(b)};
TDay=function(b,c,d,h){this.owner=b;this.date=new Date(c);this.disabled=d?true:false;this.className=typeof h!="undefined"?String(h):null};
TDateInput=function(b,c,d,h,q,j){var m=q,r=d,l=null,n=j?new Date(j):null,k=[],g=false,o=[],z=null,w=c,x=TDateInput.instances.length,v=null,s=new Date(9999,11,31,23,59,59),u=new Date(1753,0,1),t=n?n:new Date;this.allowTime=h;this.blockedMessage=blockedMessage[Languages.current];this.Class="TDateInput";this.doHide=true;this.maxDateMessage=maxDateMessage[Languages.current];this.minDateMessage=minDateMessage[Languages.current];this.onshow=this.onchange=null;this.settingDate=false;this.timer=0;if(typeof b==
"undefined"||String(b).length==0)throw new Error('Illegal call to constructor. "name" cannot be empty.');if(typeof h=="undefined")h=false;if(typeof c=="undefined")throw new Error('Illegal call to constructor. "element" cannot be empty.');if(typeof d=="undefined")throw new Error('Illegal call to constructor. "button" cannot be empty.');if(m){if(!m.contains)throw new Error('Illegal call to constructor. "block" should be an array of Date.');}else m=[];for(c=0;c<m.length;c++)if(typeof m[c].age!="function")throw new Error('Illegal call to constructor. "block" contains elements which are not of type Date.');
else m[c]=m[c].round();TDateInput.instances.add(this);this.div=document.createElement("DIV");this.div.id="div"+b.upperFirst();this.div.style.display="none";this.div.style.background="white";this.div.style.border="1px solid black";this.div.style.color="black";this.div.style.display="block";this.div.style.padding="0px";this.div.style.position="absolute";this.div.onmouseover=new Function("event","TDateInput.instances["+x+"].stopHide( this );");this.div.onmouseout=new Function("event","TDateInput.instances["+
x+"].hide( this );");if(isIE){this.frame=document.createElement("IFRAME");this.frame.id="frm"+b.upperFirst();this.frame.src="misc/empty.htm";this.frame.style.visiblity="hidden";this.frame.style.position="absolute";this.frame.style.border="0px solid";this.frame.onmouseover=new Function("event","TDateInput.instances["+x+"].stopHide( this );");this.frame.onmouseout=new Function("event","TDateInput.instances["+x+"].hide( this );")}bodyLoaded||addEvent(window,"load","TDateInput.instances["+x+"].init( event );");
this.blocked=function(f){return m.contains(f)};this.pButton=function(f){if(typeof f=="undefined")return r;else r=Html.get(f)};this.pClearDays=function(f,e){z=new Date(f);v=new Date(e);k=[]};this.pClearFilled=function(){o=[]};this.pDataUrl=function(f){if(typeof f=="undefined")return l;else l=typeof f.Class!="undefined"&&f.Class=="Url"?f:new Url(f);typeof w=="string"&&this.getData()};this.pDate=function(f,e,i){if(typeof f=="undefined")return n;if(!this.settingDate){this.settingDate=true;if(f!=null){if(typeof f.isLeapYear==
"undefined")throw new Error('Illegal assignment to date. Value is not a date object and not null ("'+valueString(f)+'").');this.allowTime||(f=f.round());if(f>=s)throw new Error(this.maxDateMessage.replace("[MAXDATE]",s.formatString("d")));if(f<u)throw new Error(this.minDateMessage.replace("[MINDATE]",u.formatString("d")));if(this.blocked(f.round()))throw new Error(this.blockedMessage.replace("[DATE]",f.round().formatString("d")));}if(!isSame(n,f)){n=f;if(n==null){this.pElement().value="";this.write()}else{this.pShowDate(n);
this.pFillElement(n)}typeof i=="boolean"&&i&&this.pHide();if(this.onchange){e=typeof e=="undefined"?createEvent("change"):createEvent(e);e.srcElement=w;this.onchange(e)}}this.settingDate=false}};this.pDispose=function(){if(!g){g=true;r=r.DateInput=null;this.frame=this.div=w=w.DateInput=null}};this.pElement=function(f){if(typeof f=="undefined")return w;else w=Html.get(f)};this.pFilled=function(){return o};this.pFillElement=function(f){if(f==null)this.pElement().value="";else if(f.getHours()>0||f.getMinutes()>
0||f.getSeconds()>0)this.pElement().value=f.formatString("g");else this.pElement().value=f.formatString("d")};this.getData=function(f,e){if(e==null)e=t;if(typeof f!="undefined"&&f!=null)if(f.getMonth()==e.getMonth()&&f.getFullYear()==e.getFullYear())return;if(l!=null){f=l.add("date",e.formatString("d")).request("GET",null,true);this.pClearFilled();m=[];if(f!=null)if(f.firstChild!=null&&f.firstChild.childNodes!=null)for(e=0;e<f.firstChild.childNodes.length;e++){var i=f.firstChild.childNodes[e],p=parseBool(i.getAttribute("disabled")),
y=i.getAttribute("class");i=parseXmlDate(i.firstChild.nodeValue);if(Date.isDate(i))if(p){m.contains(i)||m.add(i);if(isSame(n,i)){n=null;if(w)w.value=""}y&&this.addFilled(i,y)}else this.addFilled(i,y)}}};this.pGetDay=function(f){f=k[f];return typeof f!="undefined"?f:null};this.pGetDays=function(){return k};this.pGetFirst=function(){return z};this.pGetLast=function(){return v};this.pGetRef=function(){return"TDateInput.instances["+x+"]"};this.pHide=function(){this.div.style.display="none";this.frame&&
this.frame.parentNode==document.body&&document.body.removeChild(this.frame)};this.pMaxDate=function(f){if(typeof f=="undefined")return s;else if(f>new Date(9999,11,31))throw new Error("Illegal assignment to maxDate. Max. value is 31-12-9999");else if(f<new Date(1753,0,1))throw new Error("Illegal assignment to maxDate. Min. value is 1-1-1753");else if(f<=u)throw new Error("Illegal assignment to maxDate. Date smaller than minDate");else{s=f.round();n&&n>=s&&this.pDate(s.priorDay());t&&t>=s?this.pShowDate(s.priorDay()):
this.write()}};this.pMinDate=function(f){if(typeof f=="undefined")return u;else if(f>new Date(9999,11,31))throw new Error("Illegal assignment to minDate. Max. value is 31-12-9999");else if(f<new Date(1753,0,1))throw new Error("Illegal assignment to minDate. Min. value is 1-1-1753");else if(f>=s)throw new Error("Illegal assignment to minDate. Date greater than maxDate");else{u=f.round();n&&n<u&&this.pDate(u);t&&t<u?this.pShowDate(u):this.write()}};this.pName=function(){return b};this.pShowDate=function(f){var e=
t;if(typeof f=="undefined")return t;else t=f>=s?s.priorDay():f<u?u:f.round();if(!isSame(e,t)){this.getData(e,t);this.write();this.onshow&&this.onshow(this)}};this.td=function(f){var e=false,i="";k[f]=new TDay(this,f);if(f<u||f>=s||this.blocked(f)){e=true;i+=' disabled="true"';k[f].disabled=true}else i+=' onclick="'+this.pGetRef()+".setDate("+f.jsDate()+', event, true );"';i+=f.getMonth()!=t.getMonth()?' class="calDayOM':' class="calDay';if(f.isSameDate(new Date))i+=" calToday";if(n&&f.isSameDate(n))i+=
" calSelected";if(typeof o[f]=="boolean"&&o[f]==true){i+=" calFilled";k[f].className="calFilled"}else if(typeof o[f]=="string"&&o[f]!=""){i+=" "+o[f];k[f].className=o[f]}if(e)i+=" calDisabled";i+='"';if(e)i+=' style="cursor:default;"';else{i+=" onmouseover=\"this.oldclass = this.className; this.className += ' calSelected';\"";i+=' onmouseout="this.className = this.oldclass;"'}return i};bodyLoaded&&this.init()};a=TDateInput.prototype;
a.addFilled=function(b,c){Date.isDate(b)||(b=new Date(b));if(typeof b.age=="function"){c=typeof c=="undefined"||c==null?true:String(c);this.pFilled()[b.round()]=c;this.pFilled()[this.pFilled().length]=b}else throw new Error('Illegal call to TDateInput.addFilled(). Parameter "date" is no date.');};a.button=function(){return this.pButton()};a.clearFilled=function(){this.pClearFilled()};a.days=function(){return this.pGetDays()};a.dispose=function(){this.pDispose()};a.dataUrl=function(b){return this.pDataUrl(b)};
a.date=function(b){return this.pDate(b)};a.dayNo=function(b){return b.getDay()<Date.formatInfo.firstDay?7-Date.formatInfo.firstDay+b.getDay():b.getDay()-Date.formatInfo.firstDay};a.element=function(){return this.pElement()};a.filled=function(){return this.pFilled()};a.getDay=function(b){return this.pGetDay(b)};a.hide=function(b,c){if(this.doHide){if(typeof c=="undefined")c=50;this.timer=setTimeout(this.pGetRef()+".pHide();",c)}};
a.init=function(){this.pElement(this.pElement());this.pElement().DateInput=this;this.pElement().value!=""&&this.setDate(this.pElement());if(this.pElement().onchange){this.onchange=new Function("event",filterEvent(this.pElement().onchange).replace("this","this.pElement()"));this.pElement().onchange=null}addEvent(this.pElement(),"change",this.pGetRef()+".setDate( this, event );");if(isIE)this.pElement().style.behavior="";this.pButton(this.pButton());this.pButton().DateInput=this;addEvent(this.pButton(),
"mouseout",this.pGetRef()+".hide( this, 500 );");addEvent(this.pButton(),"mouseover",this.pGetRef()+".stopHide( this );");addEvent(this.pButton(),"click",this.pGetRef()+".show( this )");if(this.pButton().hideFocus)this.pButton().hideFocus=true;this.write()};a.maxDate=function(b){return this.pMaxDate(b)};a.minDate=function(b){return this.pMinDate(b)};a.month=function(){for(var b=this.pGetFirst(),c=this.pGetLast(),d=c.nextDay(),h=[],q=b;q<d;q=q.nextDay())h[q]=this.getDay(q);return{first:b,last:c,days:h}};
a.name=function(){return this.pName()};a.nextMonth=function(){try{this.pShowDate(this.pShowDate().nextMonth());return true}catch(b){this.settingDate=false;if(b.description)alert(b.description);else b.message?alert(b.message):alert(b);return false}};a.priorMonth=function(){try{this.pShowDate(this.pShowDate().priorMonth());return true}catch(b){this.settingDate=false;if(b.description)alert(b.description);else b.message?alert(b.message):alert(b);return false}};a.showDate=function(b){return this.pShowDate(b)};
a.setDate=function(b,c,d){if(b==this.pElement()){b=String(this.pElement().value).length>0?this.allowTime?isDateTime(this.pElement().value):isDate(this.pElement().value):null;if(b==false){b=getIllegalDateMessage();alert(b);if(isIE)this.pElement().select();else{this.pFillElement(this.date());this.pElement.focus()}return typeof c!="undefined"?cancelEvent(c):false}}else if(b!=null&&typeof b.age!="function")b=this.allowTime?isDateTime(b):isDate(b);if(this.allowTime&&b!=null)if(b.formatString("HHnnss")==
"000000"&&this.pDate()!=null&&this.pDate().formatString("HHnnss")!="000000")b=b.integrateTime(this.pDate());try{this.pDate(b,c,d);return true}catch(h){this.settingDate=false;if(h.description)alert(h.description);else h.message?alert(h.message):alert(h);if(isIE){this.pElement().select();if(typeof c!="undefined")c.returnValue=false}else{if(this.date())this.pFillElement(this.date());else this.pElement().value="";this.pElement().focus()}return false}};
a.setMonth=function(b){try{var c=new Date(this.pShowDate());c.setMonth(b.value);this.pShowDate(c);return true}catch(d){if(d.description)alert(d.description);else d.message?alert(d.message):alert(d);return false}};a.setYear=function(b){try{var c=new Date(this.pShowDate());c.setYear(b.value);this.pShowDate(c);return true}catch(d){if(d.description)alert(d.description);else d.message?alert(d.message):alert(d);return false}};
a.show=function(){this.div.parentNode!=document.body&&document.body.appendChild(this.div);isIE&&document.body.appendChild(this.frame);this.div.style.display=="none"&&this.date()&&this.pShowDate(this.date());var b=getLeft(this.pButton())+this.pButton().offsetWidth,c=getTop(this.pButton())+this.pButton().offsetHeight,d=getLeft(this.pElement()),h=getTop(this.pElement())+this.pElement().offsetHeight;this.x=d;this.y=Math.max(c,h);this.div.style.left=this.x+"px";this.div.style.top=this.y+"px";this.div.style.zIndex=
9999;this.div.style.display="";this.div.style.left=b-this.div.offsetWidth+"px";if(typeof this.frame!="undefined"){this.frame.style.zIndex=9998;this.frame.style.left=this.div.offsetLeft+"px";this.frame.style.top=this.div.offsetTop+"px";this.frame.style.width=this.div.offsetWidth+"px";this.frame.style.height=this.div.offsetHeight+"px";this.frame.style.visibility="visible"}};a.startHiding=function(){this.doHide=true};a.stopHiding=function(){this.doHide=false};
a.stopHide=function(){clearTimeout(this.timer);this.timer=0};
a.write=function(){this.name();var b=new Date(this.pShowDate()),c=new Date(this.pMinDate()),d=new Date(this.pMaxDate()),h=b.getFullYear(),q=b.getMonth(),j=new Date(h,q,1),m=j.nextMonth(),r=this.dayNo(j),l=new Date(b),n=b.nextMonth(),k="";this.pClearDays(j,m.priorDay());l.setDate(1);l=l.priorDay();l=l<c?' disabled="true"':"";n.setDate(1);n=n>d?' disabled="true"':"";k='<table border="0" cellspacing="0" cellpadding="3" style="float:left;">\r\n\t<col/><col/><col/><col/><col/><col/><col/><col/>\r\n\t<tr style="font-size:90%;" onmouseover="'+this.pGetRef()+
'.stopHide( this );">\r\n\t\t<td colspan="5" align="center" style="padding:0px 0px; border-bottom:1px solid black;">\r\n\t\t\t<select onchange="'+this.pGetRef()+".setMonth( this ); "+this.pGetRef()+'.startHiding();" onmousedown="'+this.pGetRef()+".stopHide( this ); "+this.pGetRef()+'.stopHiding();" onmouseleave="'+this.pGetRef()+'.startHiding();" style="width:100%">\r\n';var g=0,o=11;if(g<c.getMonth()&&h==c.getFullYear())g=c.getMonth();if(o>d.getMonth()&&h==d.getFullYear())o=d.getMonth();for(g=g;g<
o+1;g++)k+='\t\t\t\t<option value="'+g+'"'+(g==q?' selected="selected"':"")+">"+months[g]+"</option>\r\n";k+='\t\t\t</select>\r\n\t\t</td>\r\n\t\t<td colspan="3" align="center" style="padding:0px 0px; border-bottom:1px solid black;">\r\n\t\t\t<select onchange="'+this.pGetRef()+".setYear( this ); "+this.pGetRef()+'.startHiding();" onmousedown="'+this.pGetRef()+".stopHide( this ); "+this.pGetRef()+'.stopHiding();" onmouseleave="'+this.pGetRef()+'.startHiding();" style="width:100%">\r\n';g=b.getFullYear()-
75;o=b.getFullYear()+75;if(g<c.getFullYear())g=c.getFullYear();if(o>d.getFullYear())o=d.getFullYear();for(g=g;g<o+1;g++)k+='\t\t\t\t<option value="'+g+'"'+(g==h?' selected="selected"':"")+">"+g+"</option>\r\n";k+='\t\t\t</select>\r\n\t\t</td>\r\n\t</tr>\r\n\t<tr id="trButtons" style="font-size:90%;" onmouseover="'+this.pGetRef()+'.stopHide( this );">\r\n\t\t<td style="padding:0px 0px;"><button type="button"'+l+' onclick="'+this.pGetRef()+'.priorMonth();" onmouseover="'+this.pGetRef()+'.stopHide( this );" style="width:100%; margin:0px;">&lt;</button></td>\t\t<td colspan="6" align="center">'+
b.formatString("MMMM yyyy")+'</td>\r\n\t\t<td style="padding:0px 0px;"><button type="button"'+n+' onclick="'+this.pGetRef()+'.nextMonth();"  onmouseover="'+this.pGetRef()+'.stopHide( this );" style="width:100%; margin:0px;">&gt;</button></td>\r\n\t</tr>\r\n\t<tr height="20" style="font-size:90%;">\r\n\t\t<td><img src="img/default/pixTrans.gif" height="1" width="20" /></td>\r\n';for(g=Date.formatInfo.firstDay;g<7;g++)k+='\t\t<td class="calDayHeader"><img src="img/default/pixTrans.gif" height="1" width="20" /><br/>'+
days[g].substr(0,2)+"</td>\r\n";for(g=0;g<Date.formatInfo.firstDay;g++)k+='\t\t<td class="calDayHeader"><img src="img/default/pixTrans.gif" height="1" width="20" /><br/>'+days[g].substr(0,2)+"</td>\r\n";k+='\t</tr>\r\n\t<tr style="font-size:90%;">\r\n\t\t<td class="calWeekNo" style="cursor:default;">'+j.priorDay(r).weekNo()+"</td>\r\n";for(g=r;g>0;g--){l=j.priorDay(g);k+="\t\t<td"+this.td(l)+">"+l.formatString("%d")+"</td>\r\n"}for(;j<m;){k+="\t\t<td"+this.td(j)+">"+j.formatString("%d")+"</td>\r\n";
j=j.nextDay();r=this.dayNo(j);if(j<m&&r==0)k+='\t</tr>\r\n\t<tr style="font-size:90%;">\r\n\t\t<td class="calWeekNo" style="cursor:default;">'+j.weekNo()+"</td>"}if(r)for(g=0;g<20&&r<7;j=j.nextDay(),g++){k+="<td"+this.td(j)+">"+j.formatString("%d")+"</td>";r++}k+="\t</tr>\r\n</table>";this.div.innerHTML=k;if(this.frame){this.frame.style.left=this.div.offsetLeft+"px";this.frame.style.top=this.div.offsetTop+"px";this.frame.style.width=this.div.offsetWidth+"px";this.frame.style.height=this.div.offsetHeight+
"px"}};TDateInput.instances=[];TDateInput.dispose=function(){for(var b=0;b<TDateInput.instances.length;b++){TDateInput.instances[b].dispose();TDateInput.instances[b]=null}TDateInput.instances=[]};addEvent(window,"unload","TDateInput.dispose();");
TCalendar=function(b,c,d,h,q,j){var m=h,r=null,l=q?new Date(q):null,n=[],k=false,g=false,o=[],z=null,w=TCalendar.instances.length,x=null,v=new Date(9999,11,31,23,59,59),s=new Date(1753,0,1),u=c,t=l?l:new Date,f=typeof j=="boolean"?j:true;this.allowTime=d;this.blockedMessage=blockedMessage[Languages.current];this.Class="TCalendar";this.maxDateMessage=maxDateMessage[Languages.current];this.minDateMessage=minDateMessage[Languages.current];this.onshow=this.onchange=null;this.timer=0;if(typeof b=="undefined"||
String(b).length==0)throw new Error('Illegal call to constructor. "name" cannot be empty.');if(typeof d=="undefined")d=false;if(typeof c=="undefined")throw new Error('Illegal call to constructor. "parent" cannot be empty.');if(m){if(!m.contains)throw new Error('Illegal call to constructor. "block" should be an array of Date.');}else m=[];for(c=0;c<m.length;c++)if(typeof m[c].age!="function")throw new Error('Illegal call to constructor. "block" contains elements which are not of type Date.');else m[c]=
m[c].round();TCalendar.instances.add(this);this.div=document.createElement("DIV");this.div.id="div"+b.upperFirst();this.div.style.border="0px solid";this.div.style.color="black";this.div.style.display="block";this.div.style.padding="0px";bodyLoaded||addEvent(window,"load","TCalendar.instances["+w+"].init();");this.blocked=function(e){return m.contains(e)};this.pClearDays=function(e,i){z=new Date(e);x=new Date(i);n=[]};this.pClearFilled=function(){o=[]};this.pDataUrl=function(e){if(typeof e=="undefined")return r;
else r=typeof e.Class!="undefined"&&e.Class=="Url"?e:new Url(e);typeof u=="string"&&this.getData()};this.pDate=function(e,i,p){if(typeof e=="undefined")return l;else if(e!=null){if(typeof e.age!="function")throw new Error('Illegal assignment to date. Value is not a date object and not null ("'+valueString(e)+'").');this.allowTime||(e=e.round());if(e>=v)throw new Error(this.maxDateMessage.replace("[MAXDATE]",v.formatString("d")));if(e<s)throw new Error(this.maxDateMessage.replace("[MINDATE]",s.formatString("d")));
if(this.blocked(e.round()))throw new Error(this.blockedMessage.replace("[DATE]",e.round().formatString("d")));}if(!isSame(l,e)){l=e;l==null||k?this.write():this.pShowDate(l);if(this.onchange)if(typeof i!="undefined"){e=createEvent(i);if(typeof p!="undefined"){p.calendar=this;e.srcElement=p}else e.srcElement=this;this.onchange(this,e)}else this.onchange(this)}};this.pDirect=function(e){if(typeof e=="undefined")return k;else k=e?true:false};this.pDispose=function(){if(!g){g=true;this.div=u=u.Calendar=
null}};this.pFilled=function(){return o};this.getData=function(e,i){if(i==null)i=t;if(typeof e!="undefined"&&e!=null)if(e.getMonth()==i.getMonth()&&e.getFullYear()==i.getFullYear())return;if(r!=null){e=r.add("date",i.formatString("d")).request("GET",null,true);this.pClearFilled();m=[];if(e!=null)if(e.firstChild!=null&&e.firstChild.childNodes!=null)for(i=0;i<e.firstChild.childNodes.length;i++){var p=e.firstChild.childNodes[i],y=parseBool(p.getAttribute("disabled")),A=p.getAttribute("class");p=parseXmlDate(p.firstChild.nodeValue);
if(Date.isDate(p))if(y){m.contains(p)||m.add(p);isSame(l,p)&&this.pDate(null);A&&this.addFilled(p,A)}else this.addFilled(p,A)}}};this.pGetDay=function(e){e=n[e];return typeof e!="undefined"?e:null};this.pGetDays=function(){return n};this.pGetFirst=function(){return z};this.pGetFirst=function(){return z};this.pGetLast=function(){return x};this.pGetRef=function(){return"TCalendar.instances["+w+"]"};this.pMaxDate=function(e){if(typeof e=="undefined")return v;else if(e>new Date(9999,11,31))throw new Error("Illegal assignment to maxDate. Max. value is 31-12-9999");
else if(e<new Date(1753,0,1))throw new Error("Illegal assignment to maxDate. Min. value is 1-1-1753");else if(e<=s)throw new Error("Illegal assignment to maxDate. Date smaller than minDate");else{v=e.round();l&&l>=v&&this.pDate(v.priorDay());t&&t>=v?this.pShowDate(v.priorDay()):this.write()}};this.pMinDate=function(e){if(typeof e=="undefined")return s;else if(e>new Date(9999,11,31))throw new Error("Illegal assignment to minDate. Max. value is 31-12-9999");else if(e<new Date(1753,0,1))throw new Error("Illegal assignment to minDate. Min. value is 1-1-1753");
else if(e>=v)throw new Error("Illegal assignment to minDate. Date greater than maxDate");else{s=e.round();l&&l<s&&this.pDate(s);t&&t<s?this.pShowDate(s):this.write()}};this.pName=function(){return b};this.pParent=function(e){if(typeof e=="undefined")return u;else u=Html.get(e)};this.pShowDate=function(e,i,p){var y=t;if(typeof e=="undefined")return t;else t=e>=v?v.priorDay():e<s?s:e.round();if(!isSame(y,t)){this.getData(y,t);k?this.pDate(t,i,p):this.write();this.onshow&&this.onshow(this)}};this.pShowSelects=
function(e){if(typeof e=="undefined")return f;else{f=e;if(e=Html.get("trSelects"))e.style.display=f?"block":"none"}};this.td=function(e){var i=false,p="";n[e]=new TDay(this,e);if(e<s||e>=v||this.blocked(e)){i=true;p+=' disabled="true"';n[e].disabled=true}else p+=' onclick="'+this.pGetRef()+".setDate("+e.jsDate()+', event );"';p+=e.getMonth()!=t.getMonth()?' class="calDayOM':' class="calDay';if(e.isSameDate(new Date))p+=" calToday";if(l&&e.isSameDate(l))p+=" calSelected";if(typeof o[e]=="boolean"&&
o[e]==true){p+=" calFilled";n[e].className="calFilled"}else if(typeof o[e]=="string"&&o[e]!=""){p+=" "+o[e];n[e].className=o[e]}if(i)p+=" calDisabled";p+='"';if(i)p+=' style="cursor:default;"';else{p+=" onmouseover=\"this.oldclass = this.className; this.className += ' calSelected';\"";p+=' onmouseout="this.className = this.oldclass;"'}return p};bodyLoaded&&this.init()};a=TCalendar.prototype;
a.addFilled=function(b,c){if(typeof b.age!="function")b=new Date(b);if(typeof b.age=="function"){c=typeof c=="undefined"||c==null?true:String(c);this.pFilled()[b.round()]=c;this.pFilled()[this.pFilled().length]=b}else throw new Error('Illegal call to TCalendar.addFilled(). Parameter "date" is no date.');};a.clearFilled=function(){this.pClearFilled()};a.days=function(){return this.pGetDays()};a.dispose=function(){this.pDispose()};a.dataUrl=function(b){return this.pDataUrl(b)};a.date=function(b){return this.pDate(b)};
a.dayNo=function(b){return b.getDay()<Date.formatInfo.firstDay?7-Date.formatInfo.firstDay+b.getDay():b.getDay()-Date.formatInfo.firstDay};a.direct=function(b){return this.pDirect(b)};a.filled=function(){return this.pFilled()};a.getDay=function(b){return this.pGetDay(b)};a.hideSelects=function(){this.pShowSelects(false)};a.init=function(){this.pParent(this.pParent());this.write();this.parent().appendChild(this.div);this.div.style.width=this.div.firstChild.offsetWidth+"px"};a.maxDate=function(b){return this.pMaxDate(b)};
a.minDate=function(b){return this.pMinDate(b)};a.month=function(){for(var b=this.pGetFirst(),c=this.pGetLast(),d=c.nextDay(),h=[],q=b;q<d;q=q.nextDay())h[q]=this.getDay(q);return{first:b,last:c,days:h}};a.name=function(){return this.pName()};a.nextMonth=function(b,c){try{this.pShowDate(this.pShowDate().nextMonth(),c,b);return true}catch(d){if(d.description)alert(d.description);else d.message?alert(d.message):alert(d);return false}};
a.priorMonth=function(b,c){try{this.pShowDate(this.pShowDate().priorMonth(),c,b);return true}catch(d){if(d.description)alert(d.description);else d.message?alert(d.message):alert(d);return false}};a.parent=function(){return this.pParent()};a.showDate=function(b){return this.pShowDate(b)};a.showSelects=function(){this.pShowSelects(true)};
a.setDate=function(b,c){if(b!=null&&typeof b.isLeapYear=="undefined")b=this.allowTime?isDateTime(b):isDate(b);if(this.allowTime)if(b.formatString("HHnnss")=="000000"&&this.pDate()!=null&&this.pDate().formatString("HHnnss")!="000000")b=b.integrateTime(this.pDate());try{this.pDate(b,c);return true}catch(d){if(d.description)alert(d.description);else d.message?alert(d.message):alert(d);return false}};
a.setMonth=function(b){try{var c=new Date(this.pShowDate());c.setMonth(b.value);this.pShowDate(c);return true}catch(d){if(d.description)alert(d.description);else d.message?alert(d.message):alert(d);return false}};a.setYear=function(b){try{var c=new Date(this.pShowDate());c.setYear(b.value);this.pShowDate(c);return true}catch(d){if(d.description)alert(d.description);else d.message?alert(d.message):alert(d);return false}};
a.write=function(){this.name();var b=new Date(this.pShowDate()),c=new Date(this.pMinDate()),d=new Date(this.pMaxDate()),h=b.getFullYear(),q=b.getMonth(),j=new Date(h,q,1),m=j.nextMonth(),r=this.dayNo(j),l=new Date(b),n=b.nextMonth(),k="";this.pClearDays(j,m.priorDay());l.setDate(1);l=l.priorDay();l=l<c?' disabled="true"':"";n.setDate(1);n=n>d?' disabled="true"':"";k='<table border="0" cellspacing="0" cellpadding="3" style="float:left;">\r\n\t<col/><col/><col/><col/><col/><col/><col/><col/>\r\n\t<tr id="trSelects" style="font-size:90%;'+
(this.pShowSelects()?"":" display:none;")+'">\r\n\t\t<td colspan="5" align="center" style="padding:0px 0px;">\r\n\t\t\t<select onchange="'+this.pGetRef()+'.setMonth( this );" style="width:100%">\r\n';var g=0,o=11;if(g<c.getMonth()&&h==c.getFullYear())g=c.getMonth();if(o>d.getMonth()&&h==d.getFullYear())o=d.getMonth();for(g=g;g<o+1;g++)k+='\t\t\t\t<option value="'+g+'"'+(g==q?' selected="selected"':"")+">"+months[g]+"</option>\r\n";k+='\t\t\t</select>\r\n\t\t</td>\r\n\t\t<td colspan="3" align="center" style="padding:0px 0px;">\r\n\t\t\t<select onchange="'+
this.pGetRef()+'.setYear( this );" style="width:100%">\r\n';g=b.getFullYear()-75;o=b.getFullYear()+75;if(g<c.getFullYear())g=c.getFullYear();if(o>d.getFullYear())o=d.getFullYear();for(g=g;g<o+1;g++)k+='\t\t\t\t<option value="'+g+'"'+(g==h?' selected="selected"':"")+">"+g+"</option>\r\n";k+='\t\t\t</select>\r\n\t\t</td>\r\n\t</tr>\r\n\t<tr id="trButtons" style="font-size:90%;">\r\n\t\t<td style="padding:0px 0px;"><button type="button"'+l+' onclick="'+this.pGetRef()+'.priorMonth( this, event );" style="width:100%; margin:0px;">&lt;</button></td>\t\t<td colspan="6" align="center">'+
b.formatString("MMMM yyyy")+'</td>\r\n\t\t<td style="padding:0px 0px;"><button type="button"'+n+' onclick="'+this.pGetRef()+'.nextMonth( this, event );" style="width:100%; margin:0px;">&gt;</button></td>\r\n\t</tr>\r\n\t<tr height="20" style="font-size:90%;">\r\n\t\t<td><img src="img/default/pixTrans.gif" height="1" class="calWeekNo" /></td>\r\n';for(g=Date.formatInfo.firstDay;g<7;g++)k+='\t\t<td class="calDayHeader"><img src="img/default/pixTrans.gif" height="1" class="calDayHeader" /><br/>'+days[g].substr(0,
2)+"</td>\r\n";for(g=0;g<Date.formatInfo.firstDay;g++)k+='\t\t<td class="calDayHeader"><img src="img/default/pixTrans.gif" height="1" class="calDayHeader" /><br/>'+days[g].substr(0,2)+"</td>\r\n";k+='\t</tr>\r\n\t<tr style="font-size:90%;">\r\n\t\t<td class="calWeekNo" style="cursor:default;">'+j.priorDay(r).weekNo()+"</td>\r\n";for(g=r;g>0;g--){l=j.priorDay(g);k+="\t\t<td"+this.td(l)+">"+l.formatString("%d")+"</td>\r\n"}for(;j<m;){k+="\t\t<td"+this.td(j)+">"+j.formatString("%d")+"</td>\r\n";j=j.nextDay();
r=this.dayNo(j);if(j<m&&r==0)k+='\t</tr>\r\n\t<tr style="font-size:90%;">\r\n\t\t<td class="calWeekNo" style="cursor:default;">'+j.weekNo()+"</td>"}if(r)for(g=0;g<20&&r<7;j=j.nextDay(),g++){k+="<td"+this.td(j)+">"+j.formatString("%d")+"</td>";r++}k+="\t</tr>\r\n</table>";this.div.innerHTML=k};TCalendar.instances=[];TCalendar.dispose=function(){for(var b=0;b<TCalendar.instances.length;b++){TCalendar.instances[b].dispose();TCalendar.instances[b]=null}TCalendar.instances=[]};
addEvent(window,"unload","TCalendar.dispose();");
function isDate(b){if(typeof b.age=="function")return b;if((new String(b)).length==0)return true;var c=new Date,d=(new String(b)).split(Date.formatInfo.dateSeparator.trim());if(d.length<2||d.length>3)return false;for(b=0;b<d.length;b++){for(;d[b].startsWith("0");)d[b]=d[b].substr(1);if(d[b]=="")d[b]="0"}b=d.length>0?parseInt(d[0]):null;var h=d.length>1?parseInt(d[1]):null;c=d.length>2?parseInt(d[2]):c.getYear();if(isNaN(b)||b==null)return false;if(isNaN(h)||h==null)return false;if(isNaN(c))return false;
if(b!=Number(d[0]))return false;if(h!=Number(d[1]))return false;if(d.length>2&&c!=Number(d[2]))return false;d=Date.formatInfo.shortDatePattern;if(d.search("y")<d.search("m")&&d.search("m")<d.search("d")){d=c;c=b;b=d}else if(d.search("m")<d.search("d")){d=h;h=b;b=d}if(b<1||h<1||h>12)return false;if(c<50)c+=2E3;else if(c<100)c+=1900;if(c<1753||c>9999)return false;switch(h){case 2:if(c%4==0&&(c%100!=0||c%1E3==0)){if(b>29)return false}else if(b>28)return false;break;case 1:case 3:case 5:case 7:case 8:case 10:case 12:if(b>
31)return false;break;case 4:case 6:case 9:case 11:if(b>30)return false;break;default:return false}return new Date(c,h-1,b,0,0,0)}
function isTime(b){if(typeof b.age=="function")return b;if((new String(b)).length==0)return true;try{var c=(new String(b)).split(new RegExp("["+Date.formatInfo.timeSeparator+" ]","gi"));if(c.length<2||c.length>3)return false;for(b=0;b<c.length;b++){for(;c[b].startsWith("0");)c[b]=c[b].substr(1);if(c[b]=="")c[b]="0"}var d=c.length>0?Number(c[0]):null,h=c.length>1?Number(c[1]):null,q=c.length>2?Number(c[2]):0,j=c.length>3?c[3]:null;if(isNaN(d)||d==null)return false;if(isNaN(h)||h==null)return false;
if(isNaN(q))if(/(AM|PM)/.test(c[2])){j=c[2].toUpperCase();q=0}else return false;if(j=="PM"&&d<12)d+=12;if(d<0||d>23)return false;if(h<0||h>59)return false;if(q<0||q>59)return false;return new Date(1900,0,1,d,h,q)}catch(m){return false}}
function isDateTime(b){if(typeof b.age=="function")return b;var c=new Date;b=b.split(/\s+/gi);if(b.length>1){for(c=2;c<b.length;c++)b[1]+=" "+b[c];c=isDate(b[0]);var d=isTime(b[1]);if(c!=false&&d!=false){c.setHours(d.getHours());c.setMinutes(d.getMinutes());c.setSeconds(d.getSeconds());return c}else{b=b.join(" ");d=isTime(b);return d!=false?d:false}}else return b[0].indexOf(Date.formatInfo.dateSeparator)>-1?isDate(b[0]):b[0].indexOf(Date.formatInfo.timeSeparator)>-1?isTime(b[0]):false}
function getIllegalDateMessage(){var b="'"+Date.formatInfo.getDateDisplayPattern()+"'",c=getMessage(19);return c?c.text.replace("D-M-JJJJ",b):"De ingevoerde datum is niet correct. Er wordt een datum met het volgende formaat verwacht: "+b+"."};


			Number.formatInfo = new NumberFormat(",", ".", "€"); 
			Date.formatInfo   = new DateTimeFormat("-", "dddd d mmmm yyyy", "d-m-yyyy", ":", "H:nn:ss", "H:nn", wdMonday);


function getMessage(b){var g;if(typeof(messages[b])!="undefined"){return messages[b]}try{g=new XMLHttpRequest();g.open("POST","misc/getMessage.aspx",false);g.setRequestHeader("snakeware-ajax","true");g.setRequestHeader("Content-Type","application/x-www-form-urlencoded");g.send('<message ID="'+b+'" />');if(g.status==200){var c=g.responseXML.documentElement,e=parseInt(c.getAttribute("ID")),a=c.getElementsByTagName("name")[0].firstChild.data,h=c.getElementsByTagName("text")[0],i=parseBool(c.getAttribute("isMail"));if(h&&h.firstChild){h=h.firstChild.data}else{return null}if(isNaN(e)){e=b}messages[e]=new TMessage(e,a,h,i);return messages[e]}else{var d=window.open();if(d){d.document.open();d.document.write(g.responseText);d.document.close()}return null}}catch(f){if(f.description){alert(f.description)}else{if(f.message){alert(f.message)}else{alert(f)}}return null}}var messages=[];TMessage=function(a,c,d,b){this.Class="TMessage";this.ID=a;this.name=c;this.text=d;this.isMail=b};TMessage.prototype.toString=function(){return this.text};var Languages={dutch:0,english:1,german:2,french:3,spanisch:4,italian:5,letvian:6,chinese:7,russian:8,swahili:9,arabic:10,bulgarian:11,current:language,abbr:["nl","en","de","fr","es","it","lv","ch","ru","sw","ar","bg"]};var Language={abbr:Languages.abbr[language]};var Days={monday:0,tuesday:1,wednesday:2,thursday:3,friday:4,saturday:5,sunday:6};var Months={january:0,february:1,march:2,april:3,may:4,june:5,july:6,august:7,september:8,october:9,november:10,december:11};var lngMonths=[["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],["january","february","march","april","may","june","july","august","september","october","november","december"],["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]],lngDays=[["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],["Sonntag","Monntag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]];months=lngMonths[Languages.current],days=lngDays[Languages.current],newPassword=["Weet u zeker dat u een nieuw wachtwoord wil opvragen?","Are you sure you want to request a new password?","Sind Sie sicher das Sie um eines neues Kennwort bitten wolt?","Êtes-vous sûr vous voulez-vous demander un nouveau mot de passe?"],noUsername=["U heeft uw gebruikersnaam nog niet ingevoerd.","You did not enter your username.","Sie haben Ihrem Anwendername nicht ausgefüllt.","Vous n'avez pas écrit votre nom d'utilisateur."],noNewPassword1=["U heeft uw nieuwe wachtwoord nog niet ingevuld.","You did not enter your new password.","Sie haben Ihre neue Stichwort nicht eingetrugen.","Vous n'avez pas entré votre nouveau mot de passe."],noNewPassword2=["U heeft de bevestiging van het nieuwe wachtwoord nog niet ingevuld.","You did not enter the confirmation of your new password.","Sie haben die Bestätigung Ihres neuen Stichwortes nicht eingetrugen.","Vous n'avez pas écrit la confirmation de votre nouveau mot de passe."],noOldPassword=["U heeft uw huidige wachtwoord nog niet ingevuld.","You did not enter your current password.","Sie haben Ihre gegenwärtiges Stichwort nicht eingetrugen.","Vous n'avez pas entré votre mot de passe courant."],noPassword=["U heeft uw wachtwoord nog niet ingevoerd.","You left the password field empty.","Sie haben Ihrem Kennwort nicht ausgefüllt.","Vous n'avez pas écrit votre mot de passe."],noSearchText=["U heeft nog geen zoekwoorden ingevuld.","You did not enter any keywords to search for.","Sie trugen keine Schlüsselwörter ein, um nach zu suchen.","Vous n'avez écrit aucun mot-clé pour rechercher."],illegalSearchWords=["U heeft alleen zoekwoorden ingevuld die te kort of niet relevant zijn.","You have entered keywords that too short or not relevant only.","Sie haben nur Stichworte eingegeben, die zu kurz oder nicht relevant sein.","Vous avez seulement entré des mots clés trop court ou pas trait."],minDateMessage=['De ingevoerde datum is te klein. De datum moet op of na "[MINDATE]" liggen.','The entered date is to small. The date should lie on or after "[MINDATE]".','Das ausgefüllte Datum ist zu klein. Das Datum sollte auf oder nach "[MINDATE]" liegen','La date écrite est à petit. La date devrait se trouver ou après "[MINDATE]".'],maxDateMessage=['De ingevoerde datum is te groot. De datum moet voor "[MAXDATE]" liggen.','The entered date is to large. The date should lie before "[MAXDATE]".','Das ausgefüllte Datum ist zu groß. Das Datum sollte vor "[MAXDATE]" liegen.','La date écrite est à grand. La date devrait se trouver devant "[MAXDATE]".'],blockedMessage=["De ingevoerde datum is niet toegestaan.","The entered date is not allowed.","Das erreichte Datum wird nicht gewährt.","La date écrite n'est pas accordée."],nameEmpty=["U heeft uw naam nog niet ingevuld.","You left your name empty.","Sie ließen Ihren Namen leer.","Vous avez laissé votre nom vide."],eMailEmpty=["U heeft het e-mailadres nog niet ingevuld.","You left the e-mail address empty.","Sie ließen die E-mail Adresse leer.","Vous avez laissé l'adresse du E-mail vide"],eMailInvalid=["U heeft een incorrect e-mailadres ingevuld.","The entered e-mail address is invalid.","Die eingetragene E-mail Adresse ist unzulässig.","L'adresse écrite de E-mail est inadmissible."],mandatory=["Dit veld is verplicht en moet worden ingevuld.","This field is mandatory and must be completed.","Dieses Feld ist obligatorisch und muss darum ausgefüllt werden.","Ce champ est obligatoire et doit être complété."],wrongValue=["U heeft een niet correcte waarde ingevuld.","You have entered an incorrect value.","Sie haben einen falschen Wert ausgefüllt.","Vous avez entré une valeur incorrecte."],maxAnswers=["U heeft teveel vinkjes gezet. U mag maximaal [MAXANSWERS] vinkjes zetten.","You have checked too many checkmarks. You can check up to [MAXANSWERS] checkmarks.","Sie haben zu viele Markierungen geklickt. Sie können bis zu [MAXANSWERS] Markierungen klicken.","Vous avez coché trop de checkmarks. Vous pouvez consulter jusqu'à [MAXANSWERS] checkmarks."],noUserSelected=["U heeft nog geen gebruiker geselecteerd.","You did not select a user yet.","Sie haben noch nicht einen Anwender gewählt.","Vous n'avez pas choisi un utilisateur encore."],subjectEmpty=["U heeft nog geen onderwerp ingevuld.","You left the subject empty.","Sie ließen das Thema leer.","Vous avez laissé le sujet vide."],textEmpty=["U heeft nog geen tekst ingevuld.","You did not enter any text.","Sie trugen keinen Text ein.","Vous n'avez écrit aucun texte."],commentsEmpty=["U heeft nog geen opmerkingen ingevuld.","You did not enter any comments yet.","Sie trugen noch keine Anmerkungen ein.","Vous n'avez écrit aucun commentaire encore."],noMailingChecked=["U heeft nog geen enkele nieuwsbrief aangevinkt.","You did not select any newsletter yet.","Sie haben schon noch keine Newsletter gewählt.","Vous n'avez choisi aucun bulletin encore."],webAddresInvalid=["U heeft een incorrect web adres ingevuld.","You entered an invalid webaddress.","Sie trugen eine unzulässige Verbindung ein.","Vous avez écrit un lien inadmissible."],titleEmpty=["U heeft nog geen titel ingevuld.","You left the title empty.","Sie trugen keinen Titel ein.","Vous avez laissé le title vide."],trueText=["waar","true","wahr","vrai"],falseText=["onwaar","false","falsch","faux"];
var ntElement=1,ntAttribute=2,ntText=3,ntCData=4,ntComment=8,ntDocument=9,charCodes=[160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,338,339,352,353,376,402,710,732,
8211,8212,8216,8217,8218,8220,8221,8222,8224,8225,8226,8230,8240,8249,8250,8364,8482],specialChar=["&nbsp;","&iexcl;","&cent;","&pound;","&curren;","&yen;","&brvbar;","&sect;","&uml;","&copy;","&ordf;","&laquo;","&not;","&shy;","&reg;","&macr;","&deg;","&plusmn;","&sup2;","&sup3;","&acute;","&micro;","&para;","&middot;","&cedil;","&sup1;","&ordm;","&raquo;","&frac14;","&frac12;","&frac34;","&iquest;","&Agrave;","&Aacute;","&Acirc;","&Atilde;","&Auml;","&Aring;","&AElig;","&Ccedil;","&Egrave;","&Eacute;",
"&Ecirc;","&Euml;","&Igrave;","&Iacute;","&Icirc;","&Iuml;","&ETH;","&Ntilde;","&Ograve;","&Oacute;","&Ocirc;","&Otilde;","&Ouml;","&times;","&Oslash;","&Ugrave;","&Uacute;","&Ucirc;","&Uuml;","&Yacute;","&THORN;","&szlig;","&agrave;","&aacute;","&acirc;","&atilde;","&auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&ouml;","&divide;","&oslash;","&ugrave;","&uacute;",
"&ucirc;","&uuml;","&yacute;","&thorn;","&yuml;"];specialChar[178]="&OElig;";specialChar[179]="&oelig;";specialChar[192]="&Scaron;";specialChar[193]="&scaron;";specialChar[216]="&Yuml;";specialChar[242]="&fnof;";specialChar[550]="&circ;";specialChar[572]="&tilde;";specialChar[8051]="&ndash;";specialChar[8052]="&mdash;";specialChar[8056]="&lsquo;";specialChar[8057]="&rsquo;";specialChar[8058]="&sbquo;";specialChar[8060]="&ldquo;";specialChar[8061]="&rdquo;";specialChar[8062]="&bdquo;";
specialChar[8064]="&dagger;";specialChar[8065]="&Dagger;";specialChar[8066]="&bull;";specialChar[8070]="&hellip;";specialChar[8080]="&permil;";specialChar[8089]="&lsaquo;";specialChar[8090]="&rsaquo;";specialChar[8204]="&euro;";specialChar[8322]="&trade;";var Xml={Class:"Xml"};
Xml.compare=function(a,b){if(typeof a=="undefined")throw new Error("Illegal argument. First argument is not defined.");if(typeof b=="undefined")throw new Error("Illegal argument. Second argument is not defined.");if(a==null&&b==null)return null;else if(a==null&&b!=null)return{node1:a,node2:b,reason:"First node is null, second is not null.",reasons:[]};else if(a!=null&&b==null)return{node1:a,node2:b,reason:"First node is not null, second is null.",reasons:[]};if(typeof a.ownerDocument=="undefined"&&
a.documentElement=="undefined")throw new Error("Illegal argument. First argument is not an XmlNode ("+valueString(a)+").");if(typeof b.ownerDocument=="undefined"&&b.documentElement=="undefined")throw new Error("Illegal argument. Second argument is not an XmlNode ("+valueString(b)+").");var c,d=function(h,f){for(var j=0;j<h.childNodes.length;j++)if(h.childNodes[j].nodeType==f)return h.childNodes[j];return null};getXPath=function(h){for(var f="",j=0;j<h.attributes.length;j++){var k=h.attributes.item(j);
f+=" and @"+k.nodeName+" = '"+String(k.value).replace(/\'/gi,"&#39;")+"'"}return f=f!=""?h.nodeName+"["+f.substr(5)+"]":h.nodeName};compare=function(h,f){for(var j=[],k=0;k<h.childNodes.length;k++){var l=h.childNodes[k],i=null;switch(l.nodeType){case ntElement:var o=getXPath(l),m=Xml.selectNodes(f,o);if(m.length==0)return{node1:h,node2:f,reason:"Couldn't find child: \""+o+'".',reasons:j};for(var n=0;n<m.length&&i==null;n++){var p=compare(l,m[n]);if(p==null)i=m[n];else j.add(p)}if(i==null)return j.length==
1?j[0]:{node1:h,node2:f,reason:"Couldn't find correct child: \""+o+'".',reasons:j};break;case ntText:case ntCData:i=d(f,l.nodeType);if(i==null)return{node1:h,node2:f,reason:"Couldn't find text or CDATA node.",reasons:j};if(l.nodeValue!=i.nodeValue)return{node1:l,node2:i,reason:"text or CDATA nodes are not the same.",reasons:j};break}}return null};if(typeof a.documentElement!="undefined"){c=a;a=c.documentElement}else c=a.ownerDocument;if(typeof b.documentElement!="undefined"){c=b;b=c.documentElement}else c=
b.ownerDocument;if(a.nodeName!=b.nodeName)return{node1:a,node2:b,reason:"Root nodes are not the same.",reasons:[]};if(a.nodeType!=b.nodeType)return{node1:a,node2:b,reason:"Root nodes are not of the same type.",reasons:[]};if(a.nodeType==ntElement){for(c=0;c<a.attributes.length;c++){var e=a.attributes.item(c),g=b.getAttributeNode(e.nodeName);if(g==null)return{node1:a,node2:b,reason:'Attribute "'+e.nodeName+'" does not exists in second node.',reasons:[]};if(e.value!=g.value)return{node1:e,node2:g,reason:'The values of the "'+
e.nodeName+'" attributes are not the same ("'+e.value+'" and "'+g.value+'").',reasons:[]}}for(c=0;c<b.attributes.length;c++){g=b.attributes.item(c);e=a.getAttributeNode(g.nodeName);if(e==null)return{node1:a,node2:b,reason:'Attribute "'+g.nodeName+'" does not exists in first node.',reasons:[]};if(e.value!=g.value)return{node1:e,node2:g,reason:'The values of the "'+e.nodeName+'" attributes are not the same ("'+e.value+'" and "'+g.value+'").',reasons:[]}}}c=compare(a,b);if(c!=null)return c;return compare(b,
a)};
Xml.create=function(a,b,c){function d(k){var l=Xml.create(Xml.toString(k.responseXML));c({status:k.status,statusText:k.statusText,responseText:k.responseText,responseXML:l})}var e=null;if(typeof a!="undefined"&&a!=null)if(Url.isUrl(a)){if(typeof c=="string")c=new Function("request",c);if(typeof c=="function"){a.onreadystatechange=d;typeof b!="undefined"&&b!=null?a.async("post",Xml.toString(b)):a.async();return}else{e=null;e=(e=typeof b!="undefined"?a.request("post",Xml.toString(b),true,true):a.request("get",
null,true,true))?Xml.create(Xml.toString(e)):Xml.create()}}else if(typeof a.documentElement!="undefined")e=a;else if(typeof a.ownerDocument!="undefined")return Xml.create(Xml.toString(a));else if(typeof a!="string")throw new Error("Illegal argument. First argument is not an Xml object, a string or an url ("+valueString(a)+").");try{if(e==null||typeof e.documentElement=="undefined")if(window.ActiveXObject){b=0;for(var g=["MSXML2.DOMDocument.6.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument",
"Microsoft.XMLDOM"];e==null&&b<g.length;){try{e=new ActiveXObject(g[b])}catch(h){}b++}if(e==null)throw new Error("Capability not supported. Cannot create DOMDocument object.");typeof a=="string"&&e.loadXML(a)}else e=typeof a=="string"?(new DOMParser).parseFromString(a,"text/xml"):document.implementation.createDocument("","",null)}catch(f){Log.error(f);e=typeof a!="undefined"?new Xml(a):new Xml}try{e.setProperty("SelectionLanguage","XPath")}catch(j){Log.write('doc.setProperty("SelectionLanguage", "XPath"); not supported...')}return e};
Xml.createPath=function(a,b,c,d){if(a==null||typeof a.ownerDocument=="undefined")throw new Error("Illegal argument. First argument is expected to be a XmlNode ("+valueString(a)+").");if(typeof b!="string")throw new Error("Illegal argument. xPath expression expected to be of type string ("+valueString(b)+").");if(b.length==0)throw new Error("Illegal argument. xPath expression's length is zero.");if(typeof c=="undefined")return null;if(a.nodeType==ntDocument){if(b.contains("/"))b=b.substr(b.indexOf("/")+
1);return Xml.createPath(a.documentElement,b,c,d)}var e=a.ownerDocument;b=b.split("/");if(a.nodeType==ntDocument)e=a;for(var g=0;g<b.length;g++){var h=Xml.selectSingleNode(a,b[g]);if(h==null)if(b[g].startsWith("@")){h=b[g].substr(1);h=e.createAttribute(h);a.setAttributeNode(h)}else h=a.appendChild(function(f){var j=null;if(f.indexOf("[")>-1){var k=f.substr(f.indexOf("[")+1);f=f.substr(0,f.indexOf("["));j=e.createElement(f);k=k.substr(0,k.length-1);k=k.replace(/(\s+or\s+|\s+and\s+)/gi,"|");k=k.split("|");
for(var l=0;l<k.length;l++){var i=k[l];if(i.contains("=")){i=i.split("=");f=i[0].trim();i=i.length>1?i[1].trim():null;if(f.startsWith("@"))f=f.substr(1);if(i!=null){if(i.startsWith('"')||i.startsWith("'"))i=i.substr(1);if(i.endsWith('"')||i.endsWith("'"))i=i.substr(0,i.length-1)}j.setAttribute(f,i)}}}else j=e.createElement(f);return j}(b[g]));a=h}if(a.nodeType==ntElement&&d==ntCData){for(;a.firstChild!=null;)a.removeChild(a.firstChild);a.appendChild(e.createCDATASection(c))}else Xml.setText(a,c);
return a};Xml.find=function(a,b){if(a==null||typeof a.ownerDocument=="undefined")throw new Error("Illegal argument. First argument is expected to be a XmlNode ("+valueString(a)+").");if(typeof a.childNodes!="undefined")for(var c=0;c<a.childNodes.length;c++)if(a.childNodes[c].nodeType==b)return a.childNodes[c];return null};
Xml.getText=function(a){if(a==null)return null;if(typeof a.ownerDocument=="undefined")throw new Error("Illegal argument. First argument is expected to be a XmlNode ("+valueString(a)+").");if(a.nodeType==ntElement){var b=Xml.find(a,ntText);if(b==null)b=Xml.find(a,ntCData);return b!=null?b.nodeValue:null}else return a.nodeValue};
Xml.moveBottom=function(a){if(a==null||typeof a.ownerDocument=="undefined")throw new Error("Illegal argument. First argument is expected to be a XmlNode ("+valueString(a)+").");if(a.nextSibling){a.parentNode.appendChild(a);return true}return false};
Xml.moveDown=function(a){if(a==null||typeof a.ownerDocument=="undefined")throw new Error("Illegal argument. First argument is expected to be a XmlNode ("+valueString(a)+").");if(a.nextSibling){a.nextSibling.nextSibling?a.parentNode.insertBefore(a,a.nextSibling.nextSibling):a.parentNode.appendChild(a);return true}return false};
Xml.moveTop=function(a){if(a==null||typeof a.ownerDocument=="undefined")throw new Error("Illegal argument. First argument is expected to be a XmlNode ("+valueString(a)+").");if(a.previousSibling){a.parentNode.insertBefore(a,a.parentNode.firstChild);return true}return false};
Xml.moveUp=function(a){if(a==null||typeof a.ownerDocument=="undefined")throw new Error("Illegal argument. First argument is expected to be a XmlNode ("+valueString(a)+").");if(a.previousSibling){a.parentNode.insertBefore(a,a.previousSibling);return true}return false};
Xml.removeNode=function(a){if(a==null||typeof a.ownerDocument=="undefined")throw new Error("Illegal argument. First argument is expected to be a XmlNode ("+valueString(a)+").");if(a.parentNode)a.parentNode.removeChild(a);else throw new Error("Illegal argument. The given node has no parent.");};
Xml.selectNodes=function(a,b){if(a==null||typeof a.ownerDocument=="undefined")throw new Error("Illegal argument. First argument is expected to be a XmlNode ("+valueString(a)+").");if(typeof b!="string")throw new Error("Illegal argument. Second argument is not a string ("+valueString(b)+").");if(typeof a.selectNodes!="undefined")return a.selectNodes(b);var c=a.ownerDocument;if(a.nodeType==ntDocument)c=a;var d=[];a=c.evaluate(b,a,null,XPathResult.ANY_TYPE,null);for(b=a.iterateNext();b;){d.add(b);b=
a.iterateNext()}return d};
Xml.selectSingleNode=function(a,b){if(a==null||typeof a.ownerDocument=="undefined")throw new Error("Illegal argument. First argument is expected to be a XmlNode ("+valueString(a)+").");if(typeof b!="string")throw new Error("Illegal argument. Second argument is not a string ("+valueString(b)+").");if(typeof a.selectSingleNode!="undefined")return a.selectSingleNode(b);var c=a.ownerDocument;if(a.nodeType==ntDocument)c=a;return(a=c.evaluate(b,a,null,XPathResult.ANY_TYPE,null).iterateNext())?a:null};
Xml.setText=function(a,b){if(a==null||typeof a.ownerDocument=="undefined")throw new Error("Illegal argument. First argument is expected to be a XmlNode ("+valueString(a)+").");if(a.nodeType==ntElement){for(var c=a.firstChild?a.firstChild.nodeType:ntText,d=0;d<a.childNodes.length;d++){var e=a.childNodes[d];if(e.nodeType==ntText||e.nodeType==ntCData){a.removeChild(e);d--}}if(b!=null&&String(b)!="")c==ntCData?a.insertBefore(a.ownerDocument.createCDATASection(b),a.firstChild):a.insertBefore(a.ownerDocument.createTextNode(b),
a.firstChild)}else a.nodeValue=b!=null&&String(b)!=""?b:""};
Xml.setValue=function(a,b,c,d,e){if(a==null||typeof a.ownerDocument=="undefined")throw new Error("Illegal argument. First argument is expected to be a XmlNode ("+valueString(a)+").");var g=Xml.selectSingleNode(a,b),h=a,f=b;if(b.contains("/")){f=b.substr(b.lastIndexOf("/")+1);h=Xml.selectSingleNode(a,b.substr(0,b.lastIndexOf("/")))}if(f.startsWith("@")){f=f.substr(1);e=ntAttribute}if(c==null||String(c)==""){if(g!=null){if(e==ntAttribute)h.removeAttribute(f);else a!=null&&h.removeChild(g);g=null}}else{if(typeof e==
"undefined")e=ntElement;c=d==dtString?c:toXml(c,d);if(g==null)g=Xml.createPath(a,b,c,e);else Xml.setText(g,c)}return g};Xml.show=function(a,b){if(a==null||typeof a!="string"&&typeof a.childNodes=="undefined")throw new Error("Illegal argument. First argument is expected to be a XmlNode or a string containing Xml ("+valueString(a)+").");showXml(Xml.create(a),b)};Xml.strToXPath=function(a){if(a==null)return"''";var b=a.split("'");return b.length>1?"concat('"+b.join("', \"'\", '")+"')":"'"+a+"'"};
Xml.toString=function(a){if(a==null||typeof a.childNodes=="undefined")throw new Error("Illegal argument. First argument is expected to be a XmlNode ("+valueString(a)+").");return typeof a.xml!="undefined"?a.xml:(new XMLSerializer).serializeToString(a)};
Xml.toHtml=function(a){if(a==null)return"";if(a==null||typeof a!="string"&&typeof a.childNodes=="undefined")throw new Error("Illegal argument. First argument is expected to be a XmlNode or a string containing Xml ("+valueString(a)+").");var b=new RegExp("<(a|b|blockquote|body|button|center|code|colgroup|div|em|fieldset|font|frame|frameset|head|h[dn]|html|iframe|label|legend|li|object|ol|optgroup|option|p|q|s|script|select|span|strike|strong|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|u|ul)(\\b[^>]*?)?\\s*/>","gi"),
c=new RegExp('<\\?xml version="1\\.0" encoding="[^"]*"\\?>',"gi");return(typeof a=="string"?a:Xml.toString(a)).replace(b,"<$1$2></$1>").replace(c,"")};
Xml.transform=function(a,b){if(a==null||typeof a.childNodes=="undefined")throw new Error("Illegal argument. First argument is expected to be a XmlNode ("+valueString(a)+").");if(b!=null&&typeof b=="string")b=Xml.create(new Url(b));if(b==null||typeof b.documentElement=="undefined")throw new Error("Illegal argument. Second argument is expected to be a XmlDocument or a string containing the path to a valid Xsl file ("+valueString(b)+").");if(typeof a.transformNode!="undefined")return a.transformNode(b);
else{var c=new XSLTProcessor;c.importStylesheet(b);return Xml.toString(c.transformToFragment(a,a.ownerDocument))}};
function toXml(a,b){if(typeof b!="undefined")switch(b){case dtBoolean:return a?"1":"0";case dtDateTime:return a.formatString("s");case dtDouble:case dtMoney:case dtPercentage:return a.formatString("0.0#########").replace(",",".");case dtInteger:case dtLong:break;case dtString:case dtGuid:a=a.replace(/\&/gi,"&amp;");a=a.replace(/\"/gi,"&quot;");a=a.replace(/\</gi,"&lt;");a=a.replace(/\>/gi,"&gt;");break;default:throw new Error('Illegal assignment to parameter "type" ('+b+").");}else{b=typeof a;if(b==
"boolean")return toXml(a,dtBoolean);else if(b=="number")return toXml(a,dtDouble);else if(b=="string")return toXml(a,dtString);else if(a instanceof Date)return toXml(a,dtDateTime);else throw new Error('Illegal assignment to parameter "value" ('+valueString(a)+"). The value is of an illegal type.");}return a}
function fromXml(a,b){if(typeof a!="undefined"&&typeof a.firstChild!="undefined")a=Xml.getText(a);if(a==null||String(a)=="")return null;if(typeof b=="undefined")return a;switch(b){case dtBoolean:return String(a)=="0"||String(a).toLowerCase()=="false"||String(a).toLowerCase()=="no"?false:true;case dtDateTime:a=parseXmlDate(a);return isNaN(a)?null:a;case dtDouble:case dtMoney:case dtPercentage:a=parseFloat(a);return isNaN(a)?null:a;case dtInteger:case dtLong:a=parseInt(a);return isNaN(a)?null:a;case dtString:case dtGuid:a=
a.replace(/\r+\n/gi,"\n");a=a.replace(/\n/gi,"\r\n");a=a.replace(/&amp;/gi,"&");a=a.replace(/&quot;/gi,'"');a=a.replace(/&lt;/gi,"<");return a=a.replace(/&gt;/gi,">");default:throw new Error('Illegal assignment to parameter "type" ('+b+").");}}
function parseXmlDate(a){if(/^(\d{4}-\d{2}-\d{2})(T\d{2}:\d{2}:\d{2}(\.\d{1,7})?)?$/i.test(a)){a=a.split(/[-T:\.]/g);for(var b=0;b<a.length;b++)for(;a[b].startsWith("0")&&String(a[b]).length>1;)a[b]=a[b].substr(1);b=parseInt(a[0]);month=parseInt(a[1]);day=parseInt(a[2]);hour=parseInt(a[3]);minute=parseInt(a[4]);second=parseInt(a[5]);if(isNaN(hour))hour=0;if(isNaN(minute))minute=0;if(isNaN(second))second=0;return new Date(b,month-1,day,hour,minute,second)}else return parseInt("knaag")}
function htmlEncode(a){var b;try{b=new String(a);b=b.replace(/&/g,"&amp;");for(var c=0;c<charCodes.length;c++){var d=charCodes[c],e=specialChar[d-160];b=b.replace(new RegExp(String.fromCharCode(d),"g"),"&amp;"+e.substr(1))}b=b.replace(/</g,"&lt;");b=b.replace(/>/g,"&gt;");b=b.replace(/"/g,"&quot;")}catch(g){try{b=a.join(", ")}catch(h){b=a}}return b}
function showXml(a,b){if(typeof b=="undefined"||b==null)b="";if(typeof a!="object"||typeof a.childNodes=="undefined")throw new Error("Illegal argument. First argument is not an XmlNode.");if(typeof a.documentElement!="undefined")a=a.documentElement;var c=String('<?xml version="1.0" encoding="utf-8"?>\r\n').length,d=window.open("","frmXML"+b,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=788,height=570");if(typeof Xml!="undefined"&&typeof Xml.toString=="function")c+=
Xml.toString(a).length;if(d){d.document.open();d.document.writeln("<html><head><title>Xml "+b+'</title></head><body style="font-family: Lucida Console, Courier New; font-size:11px; color:navy; margin:5px; background-color:white;">&lt;?xml version="1.0" encoding="Windows-1252"?&gt;');d.document.writeln(buildXml(a));if(typeof Xml!="undefined"&&typeof Xml.toString=="function")if(c<2048)d.document.writeln('<div style="clear:both; margin-top:10px; font-family:Verdana; color:black;"><b>XML size:</b> '+
c+" bytes</div></html>");else if(c/1024<2048)d.document.writeln('<div style="clear:both; margin-top:10px; font-family:Verdana; color:black;"><b>XML size:</b> '+Math.round(c/1024*100)/100+" kB</div></html>");else c/1024/1024<2048&&d.document.writeln('<div style="clear:both; margin-top:10px; font-family:Verdana; color:black;"><b>XML size:</b> '+Math.round(c/1024/1024*100)/100+" MB</div></html>");d.document.writeln("</body></html>");d.document.close();d.focus()}}
function nodeName(a){var b=a.nodeName;if(a.attributes)for(var c=0;c<a.attributes.length;c++){var d=a.attributes.item(c);if(d.nodeName!="xmlns:sql"&&d.value!="null"&&d.value!=""&&d.value!=null)b+=" "+d.nodeName+'=<font color="blue">"'+d.value.replace(/\"/g,"&amp;quot;")+'"</font>'}return b}
function buildXml(a,b){var c="";if(b==undefined)b="";if(a.childNodes.length){c+="<br/>"+b+"&lt;"+nodeName(a)+"&gt;";for(var d=0;d<a.childNodes.length;d++)c+=buildXml(a.childNodes[d],b+"&nbsp;&nbsp;&nbsp;");var e=a.childNodes.length;for(d=0;d<a.childNodes.length;d++)if(a.childNodes[d].nodeType==ntText||a.childNodes[d].nodeType==ntCData)e--;if(e>0)c+="<br/>"+b;c+="&lt;/"+a.nodeName+"&gt;"}else if(a.nodeType==ntText){d=null;if(typeof a.value!="undefined")d=a.value;else if(typeof a.text!="undefined")d=
a.text;else if(typeof a.nodeValue!="undefined")d=a.nodeValue;if(typeof d!="undefined"&&d!=""&&d!=null)c+='<font color="black"><b>'+toXml(d,dtString).htmlEncode().replace(/[\r\n]/gi,"<br/>")+"</b></font>"}else if(a.nodeType==ntCData){d=null;if(typeof a.value!="undefined")d=a.value;else if(typeof a.text!="undefined")d=a.text;else if(typeof a.nodeValue!="undefined")d=a.nodeValue;c+='<font color="red">&lt;![CDATA[<br/><div style="margin-left:'+b.length/6*7+'px; padding-left:3px; border-left:1px solid #C00000;"><font color="black">';
c+=toXml(d,dtString).replace(/[\r\n]/gi,"<br/>").replace(/[\t]/gi,"&nbsp;&nbsp;&nbsp;");c+="</font><br/></div>"+b+"]]&gt;</font>"}else if(a.nodeType==ntElement)c+="<br/>"+b+"&lt;"+nodeName(a)+"/&gt;";return c};
/*=:project
  scalable Inman Flash Replacement (sIFR) version 3, revision 419

  =:file
    Copyright: 2006 Mark Wubben.
    Author: Mark Wubben, <http://novemberborn.net/>

  =:history
    * IFR: Shaun Inman
    * sIFR 1: Mike Davidson, Shaun Inman and Tomas Jogin
    * sIFR 2: Mike Davidson, Shaun Inman, Tomas Jogin and Mark Wubben

  =:license
    This software is licensed and provided under the CC-GNU LGPL.
    See <http://creativecommons.org/licenses/LGPL/2.1/>    
*/

var sIFR=new function(){var O=this;var E={ACTIVE:"sIFR-active",REPLACED:"sIFR-replaced",IGNORE:"sIFR-ignore",ALTERNATE:"sIFR-alternate",CLASS:"sIFR-class",LAYOUT:"sIFR-layout",FLASH:"sIFR-flash",FIX_FOCUS:"sIFR-fixfocus",DUMMY:"sIFR-dummy"};E.IGNORE_CLASSES=[E.REPLACED,E.IGNORE,E.ALTERNATE];this.MIN_FONT_SIZE=6;this.MAX_FONT_SIZE=126;this.FLASH_PADDING_BOTTOM=5;this.VERSION="419";this.isActive=false;this.isEnabled=true;this.fixHover=true;this.autoInitialize=true;this.setPrefetchCookie=true;this.cookiePath="/";this.domains=[];this.forceWidth=true;this.fitExactly=false;this.forceTextTransform=true;this.useDomLoaded=true;this.useStyleCheck=false;this.hasFlashClassSet=false;this.repaintOnResize=true;this.replacements=[];var L=0;var R=false;function Y(){}function D(c){function d(e){return e.toLocaleUpperCase()}this.normalize=function(e){return e.replace(/\n|\r|\xA0/g,D.SINGLE_WHITESPACE).replace(/\s+/g,D.SINGLE_WHITESPACE)};this.textTransform=function(e,f){switch(e){case"uppercase":return f.toLocaleUpperCase();case"lowercase":return f.toLocaleLowerCase();case"capitalize":return f.replace(/^\w|\s\w/g,d)}return f};this.toHexString=function(e){if(e.charAt(0)!="#"||e.length!=4&&e.length!=7){return e}e=e.substring(1);return"0x"+(e.length==3?e.replace(/(.)(.)(.)/,"$1$1$2$2$3$3"):e)};this.toJson=function(g,f){var e="";switch(typeof (g)){case"string":e='"'+f(g)+'"';break;case"number":case"boolean":e=g.toString();break;case"object":e=[];for(var h in g){if(g[h]==Object.prototype[h]){continue}e.push('"'+h+'":'+this.toJson(g[h]))}e="{"+e.join(",")+"}";break}return e};this.convertCssArg=function(e){if(!e){return{}}if(typeof (e)=="object"){if(e.constructor==Array){e=e.join("")}else{return e}}var l={};var m=e.split("}");for(var h=0;h<m.length;h++){var k=m[h].match(/([^\s{]+)\s*\{(.+)\s*;?\s*/);if(!k||k.length!=3){continue}if(!l[k[1]]){l[k[1]]={}}var g=k[2].split(";");for(var f=0;f<g.length;f++){var n=g[f].match(/\s*([^:\s]+)\s*\:\s*([^;]+)/);if(!n||n.length!=3){continue}l[k[1]][n[1]]=n[2].replace(/\s+$/,"")}}return l};this.extractFromCss=function(g,f,i,e){var h=null;if(g&&g[f]&&g[f][i]){h=g[f][i];if(e){delete g[f][i]}}return h};this.cssToString=function(f){var g=[];for(var e in f){var j=f[e];if(j==Object.prototype[e]){continue}g.push(e,"{");for(var i in j){if(j[i]==Object.prototype[i]){continue}var h=j[i];if(D.UNIT_REMOVAL_PROPERTIES[i]){h=parseInt(h,10)}g.push(i,":",h,";")}g.push("}")}return g.join("")};this.escape=function(e){return escape(e).replace(/\+/g,"%2B")};this.encodeVars=function(e){return e.join("&").replace(/%/g,"%25")};this.copyProperties=function(g,f){for(var e in g){if(f[e]===undefined){f[e]=g[e]}}return f};this.domain=function(){var f="";try{f=document.domain}catch(g){}return f};this.domainMatches=function(h,g){if(g=="*"||g==h){return true}var f=g.lastIndexOf("*");if(f>-1){g=g.substr(f+1);var e=h.lastIndexOf(g);if(e>-1&&(e+g.length)==h.length){return true}}return false};this.uriEncode=function(e){return encodeURI(decodeURIComponent(e))};this.delay=function(f,h,g){var e=Array.prototype.slice.call(arguments,3);setTimeout(function(){h.apply(g,e)},f)}}D.UNIT_REMOVAL_PROPERTIES={leading:true,"margin-left":true,"margin-right":true,"text-indent":true};D.SINGLE_WHITESPACE=" ";function U(e){var d=this;function c(g,j,h){var k=d.getStyleAsInt(g,j,e.ua.ie);if(k==0){k=g[h];for(var f=3;f<arguments.length;f++){k-=d.getStyleAsInt(g,arguments[f],true)}}return k}this.getBody=function(){return document.getElementsByTagName("body")[0]||null};this.querySelectorAll=function(f){return window.parseSelector(f)};this.addClass=function(f,g){if(g){g.className=((g.className||"")==""?"":g.className+" ")+f}};this.removeClass=function(f,g){if(g){g.className=g.className.replace(new RegExp("(^|\\s)"+f+"(\\s|$)"),"").replace(/^\s+|(\s)\s+/g,"$1")}};this.hasClass=function(f,g){return new RegExp("(^|\\s)"+f+"(\\s|$)").test(g.className)};this.hasOneOfClassses=function(h,g){for(var f=0;f<h.length;f++){if(this.hasClass(h[f],g)){return true}}return false};this.ancestorHasClass=function(g,f){g=g.parentNode;while(g&&g.nodeType==1){if(this.hasClass(f,g)){return true}g=g.parentNode}return false};this.create=function(f,g){var h=document.createElementNS?document.createElementNS(U.XHTML_NS,f):document.createElement(f);if(g){h.className=g}return h};this.getComputedStyle=function(h,i){var f;if(document.defaultView&&document.defaultView.getComputedStyle){var g=document.defaultView.getComputedStyle(h,null);f=g?g[i]:null}else{if(h.currentStyle){f=h.currentStyle[i]}}return f||""};this.getStyleAsInt=function(g,i,f){var h=this.getComputedStyle(g,i);if(f&&!/px$/.test(h)){return 0}return parseInt(h)||0};this.getWidthFromStyle=function(f){return c(f,"width","offsetWidth","paddingRight","paddingLeft","borderRightWidth","borderLeftWidth")};this.getHeightFromStyle=function(f){return c(f,"height","offsetHeight","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth")};this.getDimensions=function(j){var h=j.offsetWidth;var f=j.offsetHeight;if(h==0||f==0){for(var g=0;g<j.childNodes.length;g++){var k=j.childNodes[g];if(k.nodeType!=1){continue}h=Math.max(h,k.offsetWidth);f=Math.max(f,k.offsetHeight)}}return{width:h,height:f}};this.getViewport=function(){return{width:window.innerWidth||document.documentElement.clientWidth||this.getBody().clientWidth,height:window.innerHeight||document.documentElement.clientHeight||this.getBody().clientHeight}};this.blurElement=function(g){try{g.blur();return }catch(h){}var f=this.create("input");f.style.width="0px";f.style.height="0px";g.parentNode.appendChild(f);f.focus();f.blur();f.parentNode.removeChild(f)}}U.XHTML_NS="http://www.w3.org/1999/xhtml";function H(r){var g=navigator.userAgent.toLowerCase();var q=(navigator.product||"").toLowerCase();var h=navigator.platform.toLowerCase();this.parseVersion=H.parseVersion;this.macintosh=/^mac/.test(h);this.windows=/^win/.test(h);this.quicktime=false;this.opera=/opera/.test(g);this.konqueror=/konqueror/.test(q);this.ie=false/*@cc_on||true@*/;this.ieSupported=this.ie&&!/ppc|smartphone|iemobile|msie\s5\.5/.test(g)/*@cc_on&&@_jscript_version>=5.5@*/;this.ieWin=this.ie&&this.windows/*@cc_on&&@_jscript_version>=5.1@*/;this.windows=this.windows&&(!this.ie||this.ieWin);this.ieMac=this.ie&&this.macintosh/*@cc_on&&@_jscript_version<5.1@*/;this.macintosh=this.macintosh&&(!this.ie||this.ieMac);this.safari=/safari/.test(g);this.webkit=!this.konqueror&&/applewebkit/.test(g);this.khtml=this.webkit||this.konqueror;this.gecko=!this.webkit&&q=="gecko";this.ieVersion=this.ie&&/.*msie\s(\d\.\d)/.exec(g)?this.parseVersion(RegExp.$1):"0";this.operaVersion=this.opera&&/.*opera(\s|\/)(\d+\.\d+)/.exec(g)?this.parseVersion(RegExp.$2):"0";this.webkitVersion=this.webkit&&/.*applewebkit\/(\d+).*/.exec(g)?this.parseVersion(RegExp.$1):"0";this.geckoVersion=this.gecko&&/.*rv:\s*([^\)]+)\)\s+gecko/.exec(g)?this.parseVersion(RegExp.$1):"0";this.konquerorVersion=this.konqueror&&/.*konqueror\/([\d\.]+).*/.exec(g)?this.parseVersion(RegExp.$1):"0";this.flashVersion=0;if(this.ieWin){var l;var o=false;try{l=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(m){try{l=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");this.flashVersion=this.parseVersion("6");l.AllowScriptAccess="always"}catch(m){o=this.flashVersion==this.parseVersion("6")}if(!o){try{l=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(m){}}}if(!o&&l){this.flashVersion=this.parseVersion((l.GetVariable("$version")||"").replace(/^\D+(\d+)\D+(\d+)\D+(\d+).*/g,"$1.$2.$3"))}}else{if(navigator.plugins&&navigator.plugins["Shockwave Flash"]){var n=navigator.plugins["Shockwave Flash"].description.replace(/^.*\s+(\S+\s+\S+$)/,"$1");var p=n.replace(/^\D*(\d+\.\d+).*$/,"$1");if(/r/.test(n)){p+=n.replace(/^.*r(\d*).*$/,".$1")}else{if(/d/.test(n)){p+=".0"}}this.flashVersion=this.parseVersion(p);var j=false;for(var k=0,c=this.flashVersion>=H.MIN_FLASH_VERSION;c&&k<navigator.mimeTypes.length;k++){var f=navigator.mimeTypes[k];if(f.type!="application/x-shockwave-flash"){continue}if(f.enabledPlugin){j=true;if(f.enabledPlugin.description.toLowerCase().indexOf("quicktime")>-1){c=false;this.quicktime=true}}}if(this.quicktime||!j){this.flashVersion=this.parseVersion("0")}}}this.flash=this.flashVersion>=H.MIN_FLASH_VERSION;this.transparencySupport=this.macintosh||this.windows;this.computedStyleSupport=this.ie||!!document.defaultView.getComputedStyle;this.fixFocus=this.gecko&&this.windows;this.nativeDomLoaded=this.gecko||this.webkit&&this.webkitVersion>=this.parseVersion("525")||this.konqueror&&this.konquerorMajor>this.parseVersion("03")||this.opera;this.mustCheckStyle=this.khtml||this.opera;this.forcePageLoad=this.webkit&&this.webkitVersion<this.parseVersion("523");this.properDocument=typeof (document.location)=="object";this.supported=this.flash&&this.properDocument&&(!this.ie||this.ieSupported)&&this.computedStyleSupport&&(!this.opera||this.operaVersion>=this.parseVersion("9.50"))&&(!this.webkit||this.webkitVersion>=this.parseVersion("412"))&&(!this.gecko||this.geckoVersion>=this.parseVersion("1.8.0.12"))&&(!this.konqueror)}H.parseVersion=function(c){return c.replace(/(^|\D)(\d+)(?=\D|$)/g,function(f,e,g){f=e;for(var d=4-g.length;d>=0;d--){f+="0"}return f+g})};H.MIN_FLASH_VERSION=H.parseVersion("8");function F(c){this.fix=c.ua.ieWin&&window.location.hash!="";var d;this.cache=function(){d=document.title};function e(){document.title=d}this.restore=function(){if(this.fix){setTimeout(e,0)}}}function S(l){var e=null;function c(){try{if(l.ua.ie||document.readyState!="loaded"&&document.readyState!="complete"){document.documentElement.doScroll("left")}}catch(n){return setTimeout(c,10)}i()}function i(){if(l.useStyleCheck){h()}else{if(!l.ua.mustCheckStyle){d(null,true)}}}function h(){e=l.dom.create("div",E.DUMMY);l.dom.getBody().appendChild(e);m()}function m(){if(l.dom.getComputedStyle(e,"marginLeft")=="42px"){g()}else{setTimeout(m,10)}}function g(){if(e&&e.parentNode){e.parentNode.removeChild(e)}e=null;d(null,true)}function d(n,o){l.initialize(o);if(n&&n.type=="load"){if(document.removeEventListener){document.removeEventListener("DOMContentLoaded",d,false)}if(window.removeEventListener){window.removeEventListener("load",d,false)}}}function j(){l.prepareClearReferences();if(document.readyState=="interactive"){document.attachEvent("onstop",f);setTimeout(function(){document.detachEvent("onstop",f)},0)}}function f(){document.detachEvent("onstop",f);k()}function k(){l.clearReferences()}this.attach=function(){if(window.addEventListener){window.addEventListener("load",d,false)}else{window.attachEvent("onload",d)}if(!l.useDomLoaded||l.ua.forcePageLoad||l.ua.ie&&window.top!=window){return }if(l.ua.nativeDomLoaded){document.addEventListener("DOMContentLoaded",i,false)}else{if(l.ua.ie||l.ua.khtml){c()}}};this.attachUnload=function(){if(!l.ua.ie){return }window.attachEvent("onbeforeunload",j);window.attachEvent("onunload",k)}}var Q="sifrFetch";function N(c){var e=false;this.fetchMovies=function(f){if(c.setPrefetchCookie&&new RegExp(";?"+Q+"=true;?").test(document.cookie)){return }try{e=true;d(f)}catch(g){if(c.debug){throw g}}if(c.setPrefetchCookie){document.cookie=Q+"=true;path="+c.cookiePath}};this.clear=function(){if(!e){return }try{var f=document.getElementsByTagName("script");for(var g=f.length-1;g>=0;g--){var h=f[g];if(h.type=="sifr/prefetch"){h.parentNode.removeChild(h)}}}catch(j){}};function d(f){for(var g=0;g<f.length;g++){document.write('<script defer type="sifr/prefetch" src="'+f[g].src+'"><\/script>')}}}function b(e){var g=e.ua.ie;var f=g&&e.ua.flashVersion<e.ua.parseVersion("9.0.115");var d={};var c={};this.fixFlash=f;this.register=function(h){if(!g){return }var i=h.getAttribute("id");this.cleanup(i,false);c[i]=h;delete d[i];if(f){window[i]=h}};this.reset=function(){if(!g){return false}for(var j=0;j<e.replacements.length;j++){var h=e.replacements[j];var k=c[h.id];if(!d[h.id]&&(!k.parentNode||k.parentNode.nodeType==11)){h.resetMovie();d[h.id]=true}}return true};this.cleanup=function(l,h){var i=c[l];if(!i){return }for(var k in i){if(typeof (i[k])=="function"){i[k]=null}}c[l]=null;if(f){window[l]=null}if(i.parentNode){if(h&&i.parentNode.nodeType==1){var j=document.createElement("div");j.style.width=i.offsetWidth+"px";j.style.height=i.offsetHeight+"px";i.parentNode.replaceChild(j,i)}else{i.parentNode.removeChild(i)}}};this.prepareClearReferences=function(){if(!f){return }__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}};this.clearReferences=function(){if(f){var j=document.getElementsByTagName("object");for(var h=j.length-1;h>=0;h--){c[j[h].getAttribute("id")]=j[h]}}for(var k in c){if(Object.prototype[k]!=c[k]){this.cleanup(k,true)}}}}function K(d,g,f,c,e){this.sIFR=d;this.id=g;this.vars=f;this.movie=null;this.__forceWidth=c;this.__events=e;this.__resizing=0}K.prototype={getFlashElement:function(){return document.getElementById(this.id)},getAlternate:function(){return document.getElementById(this.id+"_alternate")},getAncestor:function(){var c=this.getFlashElement().parentNode;return !this.sIFR.dom.hasClass(E.FIX_FOCUS,c)?c:c.parentNode},available:function(){var c=this.getFlashElement();return c&&c.parentNode},call:function(c){var d=this.getFlashElement();return Function.prototype.apply.call(d[c],d,Array.prototype.slice.call(arguments,1))},attempt:function(){if(!this.available()){return false}try{this.call.apply(this,arguments)}catch(c){if(this.sIFR.debug){throw c}return false}return true},updateVars:function(c,e){for(var d=0;d<this.vars.length;d++){if(this.vars[d].split("=")[0]==c){this.vars[d]=c+"="+e;break}}var f=this.sIFR.util.encodeVars(this.vars);this.movie.injectVars(this.getFlashElement(),f);this.movie.injectVars(this.movie.html,f)},storeSize:function(c,d){this.movie.setSize(c,d);this.updateVars(c,d)},fireEvent:function(c){if(this.available()&&this.__events[c]){this.sIFR.util.delay(0,this.__events[c],this,this)}},resizeFlashElement:function(c,d,e){if(!this.available()){return }this.__resizing++;var f=this.getFlashElement();f.setAttribute("height",c);this.updateVars("renderheight",c);this.storeSize("height",c);if(d!==null){f.setAttribute("width",d);this.movie.setSize("width",d)}if(this.__events.onReplacement){this.sIFR.util.delay(0,this.__events.onReplacement,this,this);delete this.__events.onReplacement}if(e){this.sIFR.util.delay(0,function(){this.attempt("scaleMovie");this.__resizing--},this)}else{this.__resizing--}},blurFlashElement:function(){if(this.available()){this.sIFR.dom.blurElement(this.getFlashElement())}},resetMovie:function(){this.sIFR.util.delay(0,this.movie.reset,this.movie,this.getFlashElement(),this.getAlternate())},resizeAfterScale:function(){if(this.available()&&this.__resizing==0){this.sIFR.util.delay(0,this.resize,this)}},resize:function(){if(!this.available()){return }this.__resizing++;var g=this.getFlashElement();var f=g.offsetWidth;if(f==0){return }var e=g.getAttribute("width");var l=g.getAttribute("height");var m=this.getAncestor();var o=this.sIFR.dom.getHeightFromStyle(m);g.style.width="1px";g.style.height="1px";m.style.minHeight=o+"px";var c=this.getAlternate().childNodes;var n=[];for(var k=0;k<c.length;k++){var h=c[k].cloneNode(true);n.push(h);m.appendChild(h)}var d=this.sIFR.dom.getWidthFromStyle(m);for(var k=0;k<n.length;k++){m.removeChild(n[k])}g.style.width=g.style.height=m.style.minHeight="";g.setAttribute("width",this.__forceWidth?d:e);g.setAttribute("height",l);if(sIFR.ua.ie){g.style.display="none";var j=g.offsetHeight;g.style.display=""}if(d!=f){if(this.__forceWidth){this.storeSize("width",d)}this.attempt("resize",d)}this.__resizing--},replaceText:function(g,j){var d=this.sIFR.util.escape(g);if(!this.attempt("replaceText",d)){return false}this.updateVars("content",d);var f=this.getAlternate();if(j){while(f.firstChild){f.removeChild(f.firstChild)}for(var c=0;c<j.length;c++){f.appendChild(j[c])}}else{try{f.innerHTML=g}catch(h){}}return true},changeCSS:function(c){c=this.sIFR.util.escape(this.sIFR.util.cssToString(this.sIFR.util.convertCssArg(c)));this.updateVars("css",c);return this.attempt("changeCSS",c)},remove:function(){if(this.movie&&this.available()){this.movie.remove(this.getFlashElement(),this.id)}}};var X=new function(){this.create=function(p,n,j,i,f,e,g,o,l,h,m){var k=p.ua.ie?d:c;return new k(p,n,j,i,f,e,g,o,["flashvars",l,"wmode",h,"bgcolor",m,"allowScriptAccess","always","quality","best"])};function c(s,q,l,h,f,e,g,r,n){var m=s.dom.create("object",E.FLASH);var p=["type","application/x-shockwave-flash","id",f,"name",f,"data",e,"width",g,"height",r];for(var o=0;o<p.length;o+=2){m.setAttribute(p[o],p[o+1])}var j=m;if(h){j=W.create("div",E.FIX_FOCUS);j.appendChild(m)}for(var o=0;o<n.length;o+=2){if(n[o]=="name"){continue}var k=W.create("param");k.setAttribute("name",n[o]);k.setAttribute("value",n[o+1]);m.appendChild(k)}while(l.firstChild){l.removeChild(l.firstChild)}l.appendChild(j);this.html=j.cloneNode(true)}c.prototype={reset:function(e,f){e.parentNode.replaceChild(this.html.cloneNode(true),e)},remove:function(e,f){e.parentNode.removeChild(e)},setSize:function(e,f){this.html.setAttribute(e,f)},injectVars:function(e,g){var h=e.getElementsByTagName("param");for(var f=0;f<h.length;f++){if(h[f].getAttribute("name")=="flashvars"){h[f].setAttribute("value",g);break}}}};function d(p,n,j,h,f,e,g,o,k){this.dom=p.dom;this.broken=n;this.html='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="'+f+'" width="'+g+'" height="'+o+'" class="'+E.FLASH+'"><param name="movie" value="'+e+'"></param></object>';var m="";for(var l=0;l<k.length;l+=2){m+='<param name="'+k[l]+'" value="'+k[l+1]+'"></param>'}this.html=this.html.replace(/(<\/object>)/,m+"$1");j.innerHTML=this.html;this.broken.register(j.firstChild)}d.prototype={reset:function(f,g){g=g.cloneNode(true);var e=f.parentNode;e.innerHTML=this.html;this.broken.register(e.firstChild);e.appendChild(g)},remove:function(e,f){this.broken.cleanup(f)},setSize:function(e,f){this.html=this.html.replace(e=="height"?/(height)="\d+"/:/(width)="\d+"/,'$1="'+f+'"')},injectVars:function(e,f){if(e!=this.html){return }this.html=this.html.replace(/(flashvars(=|\"\svalue=)\")[^\"]+/,"$1"+f)}}};this.errors=new Y(O);var A=this.util=new D(O);var W=this.dom=new U(O);var T=this.ua=new H(O);var G={fragmentIdentifier:new F(O),pageLoad:new S(O),prefetch:new N(O),brokenFlashIE:new b(O)};this.__resetBrokenMovies=G.brokenFlashIE.reset;var J={kwargs:[],replaceAll:function(d){for(var c=0;c<this.kwargs.length;c++){O.replace(this.kwargs[c])}if(!d){this.kwargs=[]}}};this.activate=function(){if(!T.supported||!this.isEnabled||this.isActive||!C()||a()){return }G.prefetch.fetchMovies(arguments);this.isActive=true;this.setFlashClass();G.fragmentIdentifier.cache();G.pageLoad.attachUnload();if(!this.autoInitialize){return }G.pageLoad.attach()};this.setFlashClass=function(){if(this.hasFlashClassSet){return }W.addClass(E.ACTIVE,W.getBody()||document.documentElement);this.hasFlashClassSet=true};this.removeFlashClass=function(){if(!this.hasFlashClassSet){return }W.removeClass(E.ACTIVE,W.getBody());W.removeClass(E.ACTIVE,document.documentElement);this.hasFlashClassSet=false};this.initialize=function(c){if(!this.isActive||!this.isEnabled){return }if(R){if(!c){J.replaceAll(false)}return }R=true;J.replaceAll(c);if(O.repaintOnResize){if(window.addEventListener){window.addEventListener("resize",Z,false)}else{window.attachEvent("onresize",Z)}}G.prefetch.clear()};this.replace=function(w,t){if(!T.supported){return }if(t){w=A.copyProperties(w,t)}if(!R){return J.kwargs.push(w)}if(this.onReplacementStart){this.onReplacementStart(w)}var AL=w.elements||W.querySelectorAll(w.selector);if(AL.length==0){return }var v=M(w.src);var AQ=A.convertCssArg(w.css);var u=B(w.filters);var AM=w.forceSingleLine===true;var AR=w.preventWrap===true&&!AM;var p=AM||(w.fitExactly==null?this.fitExactly:w.fitExactly)===true;var AC=p||(w.forceWidth==null?this.forceWidth:w.forceWidth)===true;var r=w.ratios||[];var AD=w.pixelFont===true;var q=parseInt(w.tuneHeight)||0;var y=!!w.onRelease||!!w.onRollOver||!!w.onRollOut;if(p){A.extractFromCss(AQ,".sIFR-root","text-align",true)}var s=A.extractFromCss(AQ,".sIFR-root","font-size",true)||"0";var e=A.extractFromCss(AQ,".sIFR-root","background-color",true)||"#FFFFFF";var n=A.extractFromCss(AQ,".sIFR-root","kerning",true)||"";var AV=A.extractFromCss(AQ,".sIFR-root","opacity",true)||"100";var k=A.extractFromCss(AQ,".sIFR-root","cursor",true)||"default";var AO=parseInt(A.extractFromCss(AQ,".sIFR-root","leading"))||0;var AI=w.gridFitType||(A.extractFromCss(AQ,".sIFR-root","text-align")=="right")?"subpixel":"pixel";var h=this.forceTextTransform===false?"none":A.extractFromCss(AQ,".sIFR-root","text-transform",true)||"none";s=/^\d+(px)?$/.test(s)?parseInt(s):0;AV=parseFloat(AV)<1?100*parseFloat(AV):AV;var AB=w.modifyCss?"":A.cssToString(AQ);var AF=w.wmode||"";if(!AF){if(w.transparent){AF="transparent"}else{if(w.opaque){AF="opaque"}}}if(AF=="transparent"){if(!T.transparencySupport){AF="opaque"}else{e="transparent"}}for(var AU=0;AU<AL.length;AU++){var AE=AL[AU];if(W.hasOneOfClassses(E.IGNORE_CLASSES,AE)||W.ancestorHasClass(AE,E.ALTERNATE)){continue}var AN=W.getDimensions(AE);var f=AN.height;var c=AN.width;var z=W.getComputedStyle(AE,"display");if(!f||!c||!z||z=="none"){continue}c=W.getWidthFromStyle(AE);var m,AG;if(!s){var AK=I(AE);m=Math.min(this.MAX_FONT_SIZE,Math.max(this.MIN_FONT_SIZE,AK.fontSize));if(AD){m=Math.max(8,8*Math.round(m/8))}AG=AK.lines;if(isNaN(AG)||!isFinite(AG)||AG==0){AG=1}if(AG>1&&AO){f+=Math.round((AG-1)*AO)}}else{m=s;AG=1}var d=W.create("span",E.ALTERNATE);var AW=AE.cloneNode(true);AE.parentNode.appendChild(AW);for(var AT=0,AS=AW.childNodes.length;AT<AS;AT++){d.appendChild(AW.childNodes[AT].cloneNode(true))}if(w.modifyContent){w.modifyContent(AW,w.selector)}if(w.modifyCss){AB=w.modifyCss(AQ,AW,w.selector)}var o=P(AW,h,w.uriEncode);AW.parentNode.removeChild(AW);if(w.modifyContentString){o.text=w.modifyContentString(o.text,w.selector)}if(o.text==""){continue}f=Math.round(AG*m);var AJ=Math.round(AG*V(m,r)*m)+this.FLASH_PADDING_BOTTOM+q;var AA=AC?c:"100%";var AH="sIFR_replacement_"+L++;var AP=["id="+AH,"content="+A.escape(o.text),"width="+c,"height="+f,"renderheight="+AJ,"link="+A.escape(o.primaryLink.href||""),"target="+A.escape(o.primaryLink.target||""),"size="+m,"css="+A.escape(AB),"cursor="+k,"tunewidth="+(w.tuneWidth||0),"tuneheight="+q,"offsetleft="+(w.offsetLeft||""),"offsettop="+(w.offsetTop||""),"fitexactly="+p,"preventwrap="+AR,"forcesingleline="+AM,"antialiastype="+(w.antiAliasType||""),"thickness="+(w.thickness||""),"sharpness="+(w.sharpness||""),"kerning="+n,"gridfittype="+AI,"flashfilters="+u,"opacity="+AV,"blendmode="+(w.blendMode||""),"selectable="+(w.selectable==null||AF!=""&&!sIFR.ua.macintosh&&sIFR.ua.gecko&&sIFR.ua.geckoVersion>=sIFR.ua.parseVersion("1.9")?"true":w.selectable===true),"fixhover="+(this.fixHover===true),"events="+y,"delayrun="+G.brokenFlashIE.fixFlash,"version="+this.VERSION];var x=A.encodeVars(AP);var g=new K(O,AH,AP,AC,{onReplacement:w.onReplacement,onRollOver:w.onRollOver,onRollOut:w.onRollOut,onRelease:w.onRelease});g.movie=X.create(sIFR,G.brokenFlashIE,AE,T.fixFocus&&w.fixFocus,AH,v,AA,AJ,x,AF,e);this.replacements.push(g);this.replacements[AH]=g;if(w.selector){if(!this.replacements[w.selector]){this.replacements[w.selector]=[g]}else{this.replacements[w.selector].push(g)}}d.setAttribute("id",AH+"_alternate");AE.appendChild(d);W.addClass(E.REPLACED,AE)}G.fragmentIdentifier.restore()};this.getReplacementByFlashElement=function(d){for(var c=0;c<O.replacements.length;c++){if(O.replacements[c].id==d.getAttribute("id")){return O.replacements[c]}}};this.redraw=function(){for(var c=0;c<O.replacements.length;c++){O.replacements[c].resetMovie()}};this.prepareClearReferences=function(){G.brokenFlashIE.prepareClearReferences()};this.clearReferences=function(){G.brokenFlashIE.clearReferences();G=null;J=null;delete O.replacements};function C(){if(O.domains.length==0){return true}var d=A.domain();for(var c=0;c<O.domains.length;c++){if(A.domainMatches(d,O.domains[c])){return true}}return false}function a(){if(document.location.protocol=="file:"){if(O.debug){O.errors.fire("isFile")}return true}return false}function M(c){if(T.ie&&c.charAt(0)=="/"){c=window.location.toString().replace(/([^:]+)(:\/?\/?)([^\/]+).*/,"$1$2$3")+c}return c}function V(d,e){for(var c=0;c<e.length;c+=2){if(d<=e[c]){return e[c+1]}}return e[e.length-1]||1}function B(g){var e=[];for(var d in g){if(g[d]==Object.prototype[d]){continue}var c=g[d];d=[d.replace(/filter/i,"")+"Filter"];for(var f in c){if(c[f]==Object.prototype[f]){continue}d.push(f+":"+A.escape(A.toJson(c[f],A.toHexString)))}e.push(d.join(","))}return A.escape(e.join(";"))}function Z(d){var e=Z.viewport;var c=W.getViewport();if(e&&c.width==e.width&&c.height==e.height){return }Z.viewport=c;if(O.replacements.length==0){return }if(Z.timer){clearTimeout(Z.timer)}Z.timer=setTimeout(function(){delete Z.timer;for(var f=0;f<O.replacements.length;f++){O.replacements[f].resize()}},200)}function I(g){var h,d;if(!T.ie){h=W.getStyleAsInt(g,"lineHeight");d=Math.floor(W.getStyleAsInt(g,"height")/h)}else{if(T.ie){var h=W.getComputedStyle(g,"fontSize");if(h.indexOf("px")>0){h=parseInt(h)}else{var f=g.innerHTML;g.style.visibility="visible";g.style.overflow="visible";g.style.position="static";g.style.zoom="normal";g.style.writingMode="lr-tb";g.style.width=g.style.height="auto";g.style.maxWidth=g.style.maxHeight=g.style.styleFloat="none";var i=g;var c=g.currentStyle.hasLayout;if(c){g.innerHTML='<div class="'+E.LAYOUT+'">X<br>X<br>X</div>';i=g.firstChild}else{g.innerHTML="X<br>X<br>X"}var e=i.getClientRects();h=e[1].bottom-e[1].top;h=Math.ceil(h*0.8);if(c){g.innerHTML='<div class="'+E.LAYOUT+'">'+f+"</div>";i=g.firstChild}else{g.innerHTML=f}e=i.getClientRects();d=e.length;if(c){g.innerHTML=f}g.style.visibility=g.style.width=g.style.height=g.style.maxWidth=g.style.maxHeight=g.style.overflow=g.style.styleFloat=g.style.position=g.style.zoom=g.style.writingMode=""}}}return{fontSize:h,lines:d}}function P(c,g,s){s=s||A.uriEncode;var q=[],m=[];var k=null;var e=c.childNodes;var o=false,p=false;var j=0;while(j<e.length){var f=e[j];if(f.nodeType==3){var t=A.textTransform(g,A.normalize(f.nodeValue)).replace(/</g,"&lt;");if(o&&p){t=t.replace(/^\s+/,"")}m.push(t);o=/\s$/.test(t);p=false}if(f.nodeType==1&&!/^(style|script)$/i.test(f.nodeName)){var h=[];var r=f.nodeName.toLowerCase();var n=f.className||"";if(/\s+/.test(n)){if(n.indexOf(E.CLASS)>-1){n=n.match("(\\s|^)"+E.CLASS+"-([^\\s$]*)(\\s|$)")[2]}else{n=n.match(/^([^\s]+)/)[1]}}if(n!=""){h.push('class="'+n+'"')}if(r=="a"){var d=s(f.getAttribute("href")||"");var l=f.getAttribute("target")||"";h.push('href="'+d+'"','target="'+l+'"');if(!k){k={href:d,target:l}}}m.push("<"+r+(h.length>0?" ":"")+h.join(" ")+">");p=true;if(f.hasChildNodes()){q.push(j);j=0;e=f.childNodes;continue}else{if(!/^(br|img)$/i.test(f.nodeName)){m.push("</",f.nodeName.toLowerCase(),">")}}}if(q.length>0&&!f.nextSibling){do{j=q.pop();e=f.parentNode.parentNode.childNodes;f=e[j];if(f){m.push("</",f.nodeName.toLowerCase(),">")}}while(j==e.length-1&&q.length>0)}j++}return{text:m.join("").replace(/^\s+|\s+$|\s*(<br>)\s*/g,"$1"),primaryLink:k||{}}}};
var parseSelector=(function(){var B=/\s*,\s*/;var A=/\s*([\s>+~(),]|^|$)\s*/g;var L=/([\s>+~,]|[^(]\+|^)([#.:@])/g;var F=/(^|\))[^\s>+~]/g;var M=/(\)|^)/;var K=/[\s#.:>+~()@]|[^\s#.:>+~()@]+/g;function H(R,P){P=P||document.documentElement;var S=R.split(B),X=[];for(var U=0;U<S.length;U++){var N=[P],W=G(S[U]);for(var T=0;T<W.length;){var Q=W[T++],O=W[T++],V="";if(W[T]=="("){while(W[T++]!=")"&&T<W.length){V+=W[T]}V=V.slice(0,-1)}N=I(N,Q,O,V)}X=X.concat(N)}return X}function G(N){var O=N.replace(A,"$1").replace(L,"$1*$2").replace(F,D);return O.match(K)||[]}function D(N){return N.replace(M,"$1 ")}function I(N,P,Q,O){return(H.selectors[P])?H.selectors[P](N,Q,O):[]}var E={toArray:function(O){var N=[];for(var P=0;P<O.length;P++){N.push(O[P])}return N}};var C={isTag:function(O,N){return(N=="*")||(N.toLowerCase()==O.nodeName.toLowerCase())},previousSiblingElement:function(N){do{N=N.previousSibling}while(N&&N.nodeType!=1);return N},nextSiblingElement:function(N){do{N=N.nextSibling}while(N&&N.nodeType!=1);return N},hasClass:function(N,O){return(O.className||"").match("(^|\\s)"+N+"(\\s|$)")},getByTag:function(N,O){return O.getElementsByTagName(N)}};var J={"#":function(N,P){for(var O=0;O<N.length;O++){if(N[O].getAttribute("id")==P){return[N[O]]}}return[]}," ":function(O,Q){var N=[];for(var P=0;P<O.length;P++){N=N.concat(E.toArray(C.getByTag(Q,O[P])))}return N},">":function(O,R){var N=[];for(var Q=0,S;Q<O.length;Q++){S=O[Q];for(var P=0,T;P<S.childNodes.length;P++){T=S.childNodes[P];if(T.nodeType==1&&C.isTag(T,R)){N.push(T)}}}return N},".":function(O,Q){var N=[];for(var P=0,R;P<O.length;P++){R=O[P];if(C.hasClass([Q],R)){N.push(R)}}return N},":":function(N,P,O){return(H.pseudoClasses[P])?H.pseudoClasses[P](N,O):[]}};H.selectors=J;H.pseudoClasses={};H.util=E;H.dom=C;return H})();
sIFR.debug=new (function(){function h(){this.fire=function(a){this[a+"Alert"]&&alert(this[a+"Alert"]);throw new Error(this[a]);};this.isFile="sIFR: Did not activate because the page is being loaded from the filesystem.";this.isFileAlert="Hi!\n\nThanks for using sIFR on your page. Unfortunately sIFR couldn't activate, because it was loaded directly from your computer.\nDue to Flash security restrictions, you need to load sIFR through a web server.\n\nWe apologize for the inconvenience."}function f(a){!sIFR.ua.safari&&
window.console&&console.log?console.log(a):alert(a)}function g(a,b,c){if(sIFR.ua.ie&&a.charAt(0)=="/")a=window.location.toString().replace(/([^:]+)(:\/?\/?)([^\/]+).*/,"$1$2$3")+a;var d=new XMLHttpRequest;d.open("GET",a,true);d.onreadystatechange=function(){if(d.readyState==4)d.status!=200?f(b):f(c)};d.send("")}sIFR.errors=new h;this.ua=function(){var a=[];for(var b in sIFR.ua)sIFR.ua[b]!=Object.prototype[b]&&a.push(b,": ",sIFR.ua[b],"\n");f(a.join(""))};this.domains=function(){if(sIFR.domains.length==
0)f("No domain verification used.");else{for(var a=sIFR.util.domain(),b=[],c=[],d=0;d<sIFR.domains.length;d++){var e=sIFR.domains[d];sIFR.util.domainMatches(a,e)?b.push(e):c.push(e)}a=['The domain "',a,'"'];b.length>0&&a.push(" matches:\n* ",b.join("\n* "));b.length>0&&c.length>0&&a.push("\nbut");c.length>0&&a.push(" does not match:\n* ",c.join("\n* "));f(a.join(""))}};this.ratios=function(a,b){if(b)a=sIFR.util.copyProperties(a,b);if(!a.selector&&!a.elements)f("Cannot calculate ratios, no selector or element given.");
else{delete a.wmode;delete a.transparent;delete a.opaque;var c=false;a.onReplacement=function(d){if(!c){c=true;sIFR.debug.__ratiosCallback[d.id]=function(e){e="["+e.join(", ")+"]";setTimeout(function(){var i=new Date;prompt("The ratios for "+a.selector+" are:",e);sIFR.ua.ie&&i-new Date<200&&alert("Press Control+C to copy the text of this alert box. Then paste it into your favorite text editor.\nThe numbers between the braces, including the braces, are the ratios. You have to add those to your sIFR configuration.\n\nTip: try calculating the ratios in Firefox instead, it'll be easier to copy the ratios.\n\n"+
e);d.resetMovie()},0)};d.call("calculateRatios")}};sIFR.replace(a)}};this.__ratiosCallback=function(a,b){this.__ratiosCallback[a]&&this.__ratiosCallback[a](b)};this.test=function(a,b){a=merge(a,b);a=a.src;b=false;if(typeof a!="string"){if(a.src)a=a.src;if(typeof a!="string"){b=[];for(var c in a)a[c]!=Object.prototype[c]&&b.push(c);b.sort().reverse();c="";for(var d=-1;!c&&++d<b.length;){if(parseFloat(b[d])<=ua.flashVersion)c=a[b[d]];var e="<"+a[b[d]]+">, flash "+parseFloat(b[d]);g(a[b[d]],"FAILED: "+
e,"OK: "+e)}a=c;b=true}}if(a)b||g(a,"FAILED: <"+a+">","OK: <"+a+">");else f("Could not determine appropriate source.")};this.forceTest=function(){var a=sIFR.replace;sIFR.replace=function(b,c){sIFR.debug.test(b,c);a.call(sIFR,b,c)}}});
var ItcStoneSans={src:"../flash/ITC-StoneSans.swf"};sIFR.activate(ItcStoneSans);sIFR.replace(ItcStoneSans,{selector:"h2.flash",wmode:"transparent",ratios:[8,1.41,10,1.32,11,1.31,15,1.29,19,1.28,26,1.25,31,1.24,37,1.23,41,1.22,42,1.23,53,1.22,56,1.21,57,1.22,92,1.21,93,1.2,97,1.21,98,1.2,101,1.21,103,1.2,104,1.21,108,1.2,109,1.21,113,1.2,114,1.21,118,1.2,119,1.21,1.2],css:[".sIFR-root{font-weight: normal; color:#000000; letter-spacing:0; margin-left:0;} a{color:#000000; text-decoration:none;} a:hover{color:#666666;}"]});sIFR.replace(ItcStoneSans,{selector:"h2.flashPortal",wmode:"transparent",ratios:[8,1.41,10,1.32,11,1.31,15,1.29,19,1.28,26,1.25,31,1.24,37,1.23,41,1.22,42,1.23,53,1.22,56,1.21,57,1.22,92,1.21,93,1.2,97,1.21,98,1.2,101,1.21,103,1.2,104,1.21,108,1.2,109,1.21,113,1.2,114,1.21,118,1.2,119,1.21,1.2],css:[".sIFR-root{font-weight: normal; color:#00A1B2; letter-spacing:0; margin-left:0;} a{color:#00A1B2; text-decoration:none;} a:hover{color:#00A1B2;}"]});
String.prototype.parseColor=function(a){var b="#";if(this.slice(0,4)=="rgb("){var c=this.slice(4,this.length-1).split(","),d=0;do b+=parseInt(c[d]).toColorPart();while(++d<3)}else if(this.slice(0,1)=="#"){if(this.length==4)for(d=1;d<4;d++)b+=(this.charAt(d)+this.charAt(d)).toLowerCase();if(this.length==7)b=this.toLowerCase()}return b.length==7?b:a||this};
Element.collectTextNodes=function(a){return $A($(a).childNodes).collect(function(b){return b.nodeType==3?b.nodeValue:b.hasChildNodes()?Element.collectTextNodes(b):""}).flatten().join("")};Element.collectTextNodesIgnoreClass=function(a,b){return $A($(a).childNodes).collect(function(c){return c.nodeType==3?c.nodeValue:c.hasChildNodes()&&!Element.hasClassName(c,b)?Element.collectTextNodesIgnoreClass(c,b):""}).flatten().join("")};
Element.setContentZoom=function(a,b){a=$(a);a.setStyle({fontSize:b/100+"em"});Prototype.Browser.WebKit&&window.scrollBy(0,0);return a};Element.getInlineOpacity=function(a){return $(a).style.opacity||""};Element.forceRerendering=function(a){try{a=$(a);var b=document.createTextNode(" ");a.appendChild(b);a.removeChild(b)}catch(c){}};
var Effect={_elementDoesNotExistError:{name:"ElementDoesNotExistError",message:"The specified DOM element does not exist, but is required for this effect to operate"},Transitions:{linear:Prototype.K,sinoidal:function(a){return-Math.cos(a*Math.PI)/2+0.5},reverse:function(a){return 1-a},flicker:function(a){a=-Math.cos(a*Math.PI)/4+0.75+Math.random()/4;return a>1?1:a},wobble:function(a){return-Math.cos(a*Math.PI*9*a)/2+0.5},pulse:function(a,b){return-Math.cos(a*((b||5)-0.5)*2*Math.PI)/2+0.5},spring:function(a){return 1-
Math.cos(a*4.5*Math.PI)*Math.exp(-a*6)},none:function(){return 0},full:function(){return 1}},DefaultOptions:{duration:1,fps:100,sync:false,from:0,to:1,delay:0,queue:"parallel"},tagifyText:function(a){var b="position:relative";if(Prototype.Browser.IE)b+=";zoom:1";a=$(a);$A(a.childNodes).each(function(c){if(c.nodeType==3){c.nodeValue.toArray().each(function(d){a.insertBefore((new Element("span",{style:b})).update(d==" "?String.fromCharCode(160):d),c)});Element.remove(c)}})},multiple:function(a,b,c){a=
(typeof a=="object"||Object.isFunction(a))&&a.length?a:$(a).childNodes;var d=Object.extend({speed:0.1,delay:0},c||{}),e=d.delay;$A(a).each(function(f,g){new b(f,Object.extend(d,{delay:g*d.speed+e}))})},PAIRS:{slide:["SlideDown","SlideUp"],blind:["BlindDown","BlindUp"],appear:["Appear","Fade"]},toggle:function(a,b,c){a=$(a);b=(b||"appear").toLowerCase();c=Object.extend({queue:{position:"end",scope:a.id||"global",limit:1}},c||{});Effect[a.visible()?Effect.PAIRS[b][1]:Effect.PAIRS[b][0]](a,c)}};
Effect.DefaultOptions.transition=Effect.Transitions.sinoidal;
Effect.ScopedQueue=Class.create(Enumerable,{initialize:function(){this.effects=[];this.interval=null},_each:function(a){this.effects._each(a)},add:function(a){var b=(new Date).getTime();switch(Object.isString(a.options.queue)?a.options.queue:a.options.queue.position){case "front":this.effects.findAll(function(c){return c.state=="idle"}).each(function(c){c.startOn+=a.finishOn;c.finishOn+=a.finishOn});break;case "with-last":b=this.effects.pluck("startOn").max()||b;break;case "end":b=this.effects.pluck("finishOn").max()||
b;break}a.startOn+=b;a.finishOn+=b;if(!a.options.queue.limit||this.effects.length<a.options.queue.limit)this.effects.push(a);if(!this.interval)this.interval=setInterval(this.loop.bind(this),15)},remove:function(a){this.effects=this.effects.reject(function(b){return b==a});if(this.effects.length==0){clearInterval(this.interval);this.interval=null}},loop:function(){for(var a=(new Date).getTime(),b=0,c=this.effects.length;b<c;b++)this.effects[b]&&this.effects[b].loop(a)}});
Effect.Queues={instances:$H(),get:function(a){if(!Object.isString(a))return a;return this.instances.get(a)||this.instances.set(a,new Effect.ScopedQueue)}};Effect.Queue=Effect.Queues.get("global");
Effect.Base=Class.create({position:null,start:function(a){if(a&&a.transition===false)a.transition=Effect.Transitions.linear;this.options=Object.extend(Object.extend({},Effect.DefaultOptions),a||{});this.currentFrame=0;this.state="idle";this.startOn=this.options.delay*1E3;this.finishOn=this.startOn+this.options.duration*1E3;this.fromToDelta=this.options.to-this.options.from;this.totalTime=this.finishOn-this.startOn;this.totalFrames=this.options.fps*this.options.duration;this.render=function(){function b(c,
d){c.options[d+"Internal"]&&c.options[d+"Internal"](c);c.options[d]&&c.options[d](c)}return function(c){if(this.state==="idle"){this.state="running";b(this,"beforeSetup");this.setup&&this.setup();b(this,"afterSetup")}if(this.state==="running"){this.position=c=this.options.transition(c)*this.fromToDelta+this.options.from;b(this,"beforeUpdate");this.update&&this.update(c);b(this,"afterUpdate")}}}();this.event("beforeStart");this.options.sync||Effect.Queues.get(Object.isString(this.options.queue)?"global":
this.options.queue.scope).add(this)},loop:function(a){if(a>=this.startOn)if(a>=this.finishOn){this.render(1);this.cancel();this.event("beforeFinish");this.finish&&this.finish();this.event("afterFinish")}else{a=(a-this.startOn)/this.totalTime;var b=(a*this.totalFrames).round();if(b>this.currentFrame){this.render(a);this.currentFrame=b}}},cancel:function(){this.options.sync||Effect.Queues.get(Object.isString(this.options.queue)?"global":this.options.queue.scope).remove(this);this.state="finished"},
event:function(a){this.options[a+"Internal"]&&this.options[a+"Internal"](this);this.options[a]&&this.options[a](this)},inspect:function(){var a=$H();for(property in this)Object.isFunction(this[property])||a.set(property,this[property]);return"#<Effect:"+a.inspect()+",options:"+$H(this.options).inspect()+">"}});
Effect.Parallel=Class.create(Effect.Base,{initialize:function(a,b){this.effects=a||[];this.start(b)},update:function(a){this.effects.invoke("render",a)},finish:function(a){this.effects.each(function(b){b.render(1);b.cancel();b.event("beforeFinish");b.finish&&b.finish(a);b.event("afterFinish")})}});
Effect.Tween=Class.create(Effect.Base,{initialize:function(a,b,c){a=Object.isString(a)?$(a):a;var d=$A(arguments),e=d.last();d=d.length==5?d[3]:null;this.method=Object.isFunction(e)?e.bind(a):Object.isFunction(a[e])?a[e].bind(a):function(f){a[e]=f};this.start(Object.extend({from:b,to:c},d||{}))},update:function(a){this.method(a)}});Effect.Event=Class.create(Effect.Base,{initialize:function(a){this.start(Object.extend({duration:0},a||{}))},update:Prototype.emptyFunction});
Effect.Opacity=Class.create(Effect.Base,{initialize:function(a,b){this.element=$(a);if(!this.element)throw Effect._elementDoesNotExistError;Prototype.Browser.IE&&!this.element.currentStyle.hasLayout&&this.element.setStyle({zoom:1});this.start(Object.extend({from:this.element.getOpacity()||0,to:1},b||{}))},update:function(a){this.element.setOpacity(a)}});
Effect.Move=Class.create(Effect.Base,{initialize:function(a,b){this.element=$(a);if(!this.element)throw Effect._elementDoesNotExistError;this.start(Object.extend({x:0,y:0,mode:"relative"},b||{}))},setup:function(){this.element.makePositioned();this.originalLeft=parseFloat(this.element.getStyle("left")||"0");this.originalTop=parseFloat(this.element.getStyle("top")||"0");if(this.options.mode=="absolute"){this.options.x-=this.originalLeft;this.options.y-=this.originalTop}},update:function(a){this.element.setStyle({left:(this.options.x*
a+this.originalLeft).round()+"px",top:(this.options.y*a+this.originalTop).round()+"px"})}});Effect.MoveBy=function(a,b,c,d){return new Effect.Move(a,Object.extend({x:c,y:b},d||{}))};
Effect.Scale=Class.create(Effect.Base,{initialize:function(a,b,c){this.element=$(a);if(!this.element)throw Effect._elementDoesNotExistError;this.start(Object.extend({scaleX:true,scaleY:true,scaleContent:true,scaleFromCenter:false,scaleMode:"box",scaleFrom:100,scaleTo:b},c||{}))},setup:function(){this.restoreAfterFinish=this.options.restoreAfterFinish||false;this.elementPositioning=this.element.getStyle("position");this.originalStyle={};["top","left","width","height","fontSize"].each(function(b){this.originalStyle[b]=
this.element.style[b]}.bind(this));this.originalTop=this.element.offsetTop;this.originalLeft=this.element.offsetLeft;var a=this.element.getStyle("font-size")||"100%";["em","px","%","pt"].each(function(b){if(a.indexOf(b)>0){this.fontSize=parseFloat(a);this.fontSizeType=b}}.bind(this));this.factor=(this.options.scaleTo-this.options.scaleFrom)/100;this.dims=null;if(this.options.scaleMode=="box")this.dims=[this.element.offsetHeight,this.element.offsetWidth];if(/^content/.test(this.options.scaleMode))this.dims=
[this.element.scrollHeight,this.element.scrollWidth];if(!this.dims)this.dims=[this.options.scaleMode.originalHeight,this.options.scaleMode.originalWidth]},update:function(a){a=this.options.scaleFrom/100+this.factor*a;this.options.scaleContent&&this.fontSize&&this.element.setStyle({fontSize:this.fontSize*a+this.fontSizeType});this.setDimensions(this.dims[0]*a,this.dims[1]*a)},finish:function(){this.restoreAfterFinish&&this.element.setStyle(this.originalStyle)},setDimensions:function(a,b){var c={};
if(this.options.scaleX)c.width=b.round()+"px";if(this.options.scaleY)c.height=a.round()+"px";if(this.options.scaleFromCenter){a=(a-this.dims[0])/2;b=(b-this.dims[1])/2;if(this.elementPositioning=="absolute"){if(this.options.scaleY)c.top=this.originalTop-a+"px";if(this.options.scaleX)c.left=this.originalLeft-b+"px"}else{if(this.options.scaleY)c.top=-a+"px";if(this.options.scaleX)c.left=-b+"px"}}this.element.setStyle(c)}});
Effect.Highlight=Class.create(Effect.Base,{initialize:function(a,b){this.element=$(a);if(!this.element)throw Effect._elementDoesNotExistError;this.start(Object.extend({startcolor:"#ffff99"},b||{}))},setup:function(){if(this.element.getStyle("display")=="none")this.cancel();else{this.oldStyle={};if(!this.options.keepBackgroundImage){this.oldStyle.backgroundImage=this.element.getStyle("background-image");this.element.setStyle({backgroundImage:"none"})}if(!this.options.endcolor)this.options.endcolor=
this.element.getStyle("background-color").parseColor("#ffffff");if(!this.options.restorecolor)this.options.restorecolor=this.element.getStyle("background-color");this._base=$R(0,2).map(function(a){return parseInt(this.options.startcolor.slice(a*2+1,a*2+3),16)}.bind(this));this._delta=$R(0,2).map(function(a){return parseInt(this.options.endcolor.slice(a*2+1,a*2+3),16)-this._base[a]}.bind(this))}},update:function(a){this.element.setStyle({backgroundColor:$R(0,2).inject("#",function(b,c,d){return b+
(this._base[d]+this._delta[d]*a).round().toColorPart()}.bind(this))})},finish:function(){this.element.setStyle(Object.extend(this.oldStyle,{backgroundColor:this.options.restorecolor}))}});Effect.ScrollTo=function(a,b){b=b||{};var c=document.viewport.getScrollOffsets();a=$(a).cumulativeOffset();if(b.offset)a[1]+=b.offset;return new Effect.Tween(null,c.top,a[1],b,function(d){scrollTo(c.left,d.round())})};
Effect.Fade=function(a,b){a=$(a);var c=a.getInlineOpacity();b=Object.extend({from:a.getOpacity()||1,to:0,afterFinishInternal:function(d){d.options.to==0&&d.element.hide().setStyle({opacity:c})}},b||{});return new Effect.Opacity(a,b)};
Effect.Appear=function(a,b){a=$(a);b=Object.extend({from:a.getStyle("display")=="none"?0:a.getOpacity()||0,to:1,afterFinishInternal:function(c){c.element.forceRerendering()},beforeSetup:function(c){c.element.setOpacity(c.options.from).show()}},b||{});return new Effect.Opacity(a,b)};
Effect.Puff=function(a,b){a=$(a);var c={opacity:a.getInlineOpacity(),position:a.getStyle("position"),top:a.style.top,left:a.style.left,width:a.style.width,height:a.style.height};return new Effect.Parallel([new Effect.Scale(a,200,{sync:true,scaleFromCenter:true,scaleContent:true,restoreAfterFinish:true}),new Effect.Opacity(a,{sync:true,to:0})],Object.extend({duration:1,beforeSetupInternal:function(d){Position.absolutize(d.effects[0].element)},afterFinishInternal:function(d){d.effects[0].element.hide().setStyle(c)}},
b||{}))};Effect.BlindUp=function(a,b){a=$(a);a.makeClipping();return new Effect.Scale(a,0,Object.extend({scaleContent:false,scaleX:false,restoreAfterFinish:true,afterFinishInternal:function(c){c.element.hide().undoClipping()}},b||{}))};
Effect.BlindDown=function(a,b){a=$(a);var c=a.getDimensions();return new Effect.Scale(a,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:0,scaleMode:{originalHeight:c.height,originalWidth:c.width},restoreAfterFinish:true,afterSetup:function(d){d.element.makeClipping().setStyle({height:"0px"}).show()},afterFinishInternal:function(d){d.element.undoClipping()}},b||{}))};
Effect.SwitchOff=function(a,b){a=$(a);var c=a.getInlineOpacity();return new Effect.Appear(a,Object.extend({duration:0.4,from:0,transition:Effect.Transitions.flicker,afterFinishInternal:function(d){new Effect.Scale(d.element,1,{duration:0.3,scaleFromCenter:true,scaleX:false,scaleContent:false,restoreAfterFinish:true,beforeSetup:function(e){e.element.makePositioned().makeClipping()},afterFinishInternal:function(e){e.element.hide().undoClipping().undoPositioned().setStyle({opacity:c})}})}},b||{}))};
Effect.DropOut=function(a,b){a=$(a);var c={top:a.getStyle("top"),left:a.getStyle("left"),opacity:a.getInlineOpacity()};return new Effect.Parallel([new Effect.Move(a,{x:0,y:100,sync:true}),new Effect.Opacity(a,{sync:true,to:0})],Object.extend({duration:0.5,beforeSetup:function(d){d.effects[0].element.makePositioned()},afterFinishInternal:function(d){d.effects[0].element.hide().undoPositioned().setStyle(c)}},b||{}))};
Effect.Shake=function(a,b){a=$(a);b=Object.extend({distance:20,duration:0.5},b||{});var c=parseFloat(b.distance),d=parseFloat(b.duration)/10,e={top:a.getStyle("top"),left:a.getStyle("left")};return new Effect.Move(a,{x:c,y:0,duration:d,afterFinishInternal:function(f){new Effect.Move(f.element,{x:-c*2,y:0,duration:d*2,afterFinishInternal:function(g){new Effect.Move(g.element,{x:c*2,y:0,duration:d*2,afterFinishInternal:function(h){new Effect.Move(h.element,{x:-c*2,y:0,duration:d*2,afterFinishInternal:function(i){new Effect.Move(i.element,
{x:c*2,y:0,duration:d*2,afterFinishInternal:function(j){new Effect.Move(j.element,{x:-c,y:0,duration:d,afterFinishInternal:function(k){k.element.undoPositioned().setStyle(e)}})}})}})}})}})}})};
Effect.SlideDown=function(a,b){a=$(a).cleanWhitespace();var c=a.down().getStyle("bottom"),d=a.getDimensions();return new Effect.Scale(a,100,Object.extend({scaleContent:false,scaleX:false,scaleFrom:window.opera?0:1,scaleMode:{originalHeight:d.height,originalWidth:d.width},restoreAfterFinish:true,afterSetup:function(e){e.element.makePositioned();e.element.down().makePositioned();window.opera&&e.element.setStyle({top:""});e.element.makeClipping().setStyle({height:"0px"}).show()},afterUpdateInternal:function(e){e.element.down().setStyle({bottom:e.dims[0]-
e.element.clientHeight+"px"})},afterFinishInternal:function(e){e.element.undoClipping().undoPositioned();e.element.down().undoPositioned().setStyle({bottom:c})}},b||{}))};
Effect.SlideUp=function(a,b){a=$(a).cleanWhitespace();var c=a.down().getStyle("bottom"),d=a.getDimensions();return new Effect.Scale(a,window.opera?0:1,Object.extend({scaleContent:false,scaleX:false,scaleMode:"box",scaleFrom:100,scaleMode:{originalHeight:d.height,originalWidth:d.width},restoreAfterFinish:true,afterSetup:function(e){e.element.makePositioned();e.element.down().makePositioned();window.opera&&e.element.setStyle({top:""});e.element.makeClipping().show()},afterUpdateInternal:function(e){e.element.down().setStyle({bottom:e.dims[0]-
e.element.clientHeight+"px"})},afterFinishInternal:function(e){e.element.hide().undoClipping().undoPositioned();e.element.down().undoPositioned().setStyle({bottom:c})}},b||{}))};Effect.Squish=function(a){return new Effect.Scale(a,window.opera?1:0,{restoreAfterFinish:true,beforeSetup:function(b){b.element.makeClipping()},afterFinishInternal:function(b){b.element.hide().undoClipping()}})};
Effect.Grow=function(a,b){a=$(a);var c=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.full},b||{}),d={top:a.style.top,left:a.style.left,height:a.style.height,width:a.style.width,opacity:a.getInlineOpacity()},e=a.getDimensions(),f,g,h,i;switch(c.direction){case "top-left":f=g=h=i=0;break;case "top-right":f=e.width;g=i=0;h=-e.width;break;case "bottom-left":f=h=0;g=e.height;i=-e.height;break;
case "bottom-right":f=e.width;g=e.height;h=-e.width;i=-e.height;break;case "center":f=e.width/2;g=e.height/2;h=-e.width/2;i=-e.height/2;break}return new Effect.Move(a,{x:f,y:g,duration:0.01,beforeSetup:function(j){j.element.hide().makeClipping().makePositioned()},afterFinishInternal:function(j){new Effect.Parallel([new Effect.Opacity(j.element,{sync:true,to:1,from:0,transition:c.opacityTransition}),new Effect.Move(j.element,{x:h,y:i,sync:true,transition:c.moveTransition}),new Effect.Scale(j.element,
100,{scaleMode:{originalHeight:e.height,originalWidth:e.width},sync:true,scaleFrom:window.opera?1:0,transition:c.scaleTransition,restoreAfterFinish:true})],Object.extend({beforeSetup:function(k){k.effects[0].element.setStyle({height:"0px"}).show()},afterFinishInternal:function(k){k.effects[0].element.undoClipping().undoPositioned().setStyle(d)}},c))}})};
Effect.Shrink=function(a,b){a=$(a);b=Object.extend({direction:"center",moveTransition:Effect.Transitions.sinoidal,scaleTransition:Effect.Transitions.sinoidal,opacityTransition:Effect.Transitions.none},b||{});var c={top:a.style.top,left:a.style.left,height:a.style.height,width:a.style.width,opacity:a.getInlineOpacity()},d=a.getDimensions(),e,f;switch(b.direction){case "top-left":e=f=0;break;case "top-right":e=d.width;f=0;break;case "bottom-left":e=0;f=d.height;break;case "bottom-right":e=d.width;f=
d.height;break;case "center":e=d.width/2;f=d.height/2;break}return new Effect.Parallel([new Effect.Opacity(a,{sync:true,to:0,from:1,transition:b.opacityTransition}),new Effect.Scale(a,window.opera?1:0,{sync:true,transition:b.scaleTransition,restoreAfterFinish:true}),new Effect.Move(a,{x:e,y:f,sync:true,transition:b.moveTransition})],Object.extend({beforeStartInternal:function(g){g.effects[0].element.makePositioned().makeClipping()},afterFinishInternal:function(g){g.effects[0].element.hide().undoClipping().undoPositioned().setStyle(c)}},
b))};Effect.Pulsate=function(a,b){a=$(a);var c=b||{},d=a.getInlineOpacity(),e=c.transition||Effect.Transitions.linear;return new Effect.Opacity(a,Object.extend(Object.extend({duration:2,from:0,afterFinishInternal:function(f){f.element.setStyle({opacity:d})}},c),{transition:function(f){return 1-e(-Math.cos(f*(c.pulses||5)*2*Math.PI)/2+0.5)}}))};
Effect.Fold=function(a,b){a=$(a);var c={top:a.style.top,left:a.style.left,width:a.style.width,height:a.style.height};a.makeClipping();return new Effect.Scale(a,5,Object.extend({scaleContent:false,scaleX:false,afterFinishInternal:function(){new Effect.Scale(a,1,{scaleContent:false,scaleY:false,afterFinishInternal:function(d){d.element.hide().undoClipping().setStyle(c)}})}},b||{}))};
Effect.Morph=Class.create(Effect.Base,{initialize:function(a,b){this.element=$(a);if(!this.element)throw Effect._elementDoesNotExistError;a=Object.extend({style:{}},b||{});if(Object.isString(a.style))if(a.style.include(":"))this.style=a.style.parseStyle();else{this.element.addClassName(a.style);this.style=$H(this.element.getStyles());this.element.removeClassName(a.style);var c=this.element.getStyles();this.style=this.style.reject(function(d){return d.value==c[d.key]});a.afterFinishInternal=function(d){d.element.addClassName(d.options.style);
d.transforms.each(function(e){d.element.style[e.style]=""})}}else this.style=$H(a.style);this.start(a)},setup:function(){function a(b){if(!b||["rgba(0, 0, 0, 0)","transparent"].include(b))b="#ffffff";b=b.parseColor();return $R(0,2).map(function(c){return parseInt(b.slice(c*2+1,c*2+3),16)})}this.transforms=this.style.map(function(b){var c=b[0];b=b[1];var d=null;if(b.parseColor("#zzzzzz")!="#zzzzzz"){b=b.parseColor();d="color"}else if(c=="opacity"){b=parseFloat(b);Prototype.Browser.IE&&!this.element.currentStyle.hasLayout&&
this.element.setStyle({zoom:1})}else if(Element.CSS_LENGTH.test(b)){d=b.match(/^([\+\-]?[0-9\.]+)(.*)$/);b=parseFloat(d[1]);d=d.length==3?d[2]:null}var e=this.element.getStyle(c);return{style:c.camelize(),originalValue:d=="color"?a(e):parseFloat(e||0),targetValue:d=="color"?a(b):b,unit:d}}.bind(this)).reject(function(b){return b.originalValue==b.targetValue||b.unit!="color"&&(isNaN(b.originalValue)||isNaN(b.targetValue))})},update:function(a){for(var b={},c,d=this.transforms.length;d--;)b[(c=this.transforms[d]).style]=
c.unit=="color"?"#"+Math.round(c.originalValue[0]+(c.targetValue[0]-c.originalValue[0])*a).toColorPart()+Math.round(c.originalValue[1]+(c.targetValue[1]-c.originalValue[1])*a).toColorPart()+Math.round(c.originalValue[2]+(c.targetValue[2]-c.originalValue[2])*a).toColorPart():(c.originalValue+(c.targetValue-c.originalValue)*a).toFixed(3)+(c.unit===null?"":c.unit);this.element.setStyle(b,true)}});
Effect.Transform=Class.create({initialize:function(a,b){this.tracks=[];this.options=b||{};this.addTracks(a)},addTracks:function(a){a.each(function(b){b=$H(b);var c=b.values().first();this.tracks.push($H({ids:b.keys().first(),effect:Effect.Morph,options:{style:c}}))}.bind(this));return this},play:function(){return new Effect.Parallel(this.tracks.map(function(a){var b=a.get("ids"),c=a.get("effect"),d=a.get("options");return[$(b)||$$(b)].flatten().map(function(e){return new c(e,Object.extend({sync:true},
d))})}).flatten(),this.options)}});Element.CSS_PROPERTIES=$w("backgroundColor backgroundPosition borderBottomColor borderBottomStyle borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderSpacing borderTopColor borderTopStyle borderTopWidth bottom clip color fontSize fontWeight height left letterSpacing lineHeight marginBottom marginLeft marginRight marginTop markerOffset maxHeight maxWidth minHeight minWidth opacity outlineColor outlineOffset outlineWidth paddingBottom paddingLeft paddingRight paddingTop right textIndent top width wordSpacing zIndex");
Element.CSS_LENGTH=/^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;String.__parseStyleElement=document.createElement("div");
String.prototype.parseStyle=function(){var a,b=$H();if(Prototype.Browser.WebKit)a=(new Element("div",{style:this})).style;else{String.__parseStyleElement.innerHTML='<div style="'+this+'"></div>';a=String.__parseStyleElement.childNodes[0].style}Element.CSS_PROPERTIES.each(function(c){a[c]&&b.set(c,a[c])});Prototype.Browser.IE&&this.include("opacity")&&b.set("opacity",this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]);return b};
Element.getStyles=document.defaultView&&document.defaultView.getComputedStyle?function(a){var b=document.defaultView.getComputedStyle($(a),null);return Element.CSS_PROPERTIES.inject({},function(c,d){c[d]=b[d];return c})}:function(a){a=$(a);var b=a.currentStyle,c;c=Element.CSS_PROPERTIES.inject({},function(d,e){d[e]=b[e];return d});if(!c.opacity)c.opacity=a.getOpacity();return c};
Effect.Methods={morph:function(a,b,c){a=$(a);new Effect.Morph(a,Object.extend({style:b},c||{}));return a},visualEffect:function(a,b,c){a=$(a);b=b.dasherize().camelize();b=b.charAt(0).toUpperCase()+b.substring(1);new Effect[b](a,c);return a},highlight:function(a,b){a=$(a);new Effect.Highlight(a,b);return a}};
$w("fade appear grow shrink fold blindUp blindDown slideUp slideDown pulsate shake puff squish switchOff dropOut").each(function(a){Effect.Methods[a]=function(b,c){b=$(b);Effect[a.charAt(0).toUpperCase()+a.substring(1)](b,c);return b}});$w("getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles").each(function(a){Effect.Methods[a]=Element[a]});Element.addMethods(Effect.Methods);
function customBodyLoad(a){repositionDiv("textSize",208,955,685);repositionDiv("quickSearch",218,955,697);repositionDiv("quickSearchPortal",225,955,705);a=(new Url).get("folder");if(a!=null){document.getElementById("fldID_105").value=unescape(a);document.getElementById("fldID_105").disabled=true}}function customBodyResize(a,b){repositionDiv("textSize",208,955,685);repositionDiv("quickSearch",218,955,697);repositionDiv("quickSearchPortal",225,955,705)}function customBodyScroll(a){}
function closeDirections(){var a=document.getElementById("accordion"),b=document.getElementById("directions");if(a)a.style.display="block";if(b)b.style.display="none";directions.clear()}var map,baseIcon,directionsPanel,directions,toAddress;
function initializeMap(){if(GBrowserIsCompatible()){initBaseIcon();map=new GMap2(document.getElementById("map_canvas"));map.addControl(new GLargeMapControl3D);map.addControl(new GMapTypeControl);map.setCenter(new GLatLng(52.1390488,5.0396849),10);directionsPanel=document.getElementById("direction_text");directions=new GDirections(map,directionsPanel);GEvent.addListener(directions,"error",handleErrors);GEvent.addListener(map,"zoomend",function(){reposition()})}}
function planRoute(a,b){toAddress=b;document.getElementById("toAddress").innerHTML=a;a=document.getElementById("accordion");b=document.getElementById("directions");if(a)a.style.display="none";if(b)b.style.display="block"}function getDirections(){var a=document.getElementById("fromAddress");a&&directions.load("from: "+a.value+" to: "+toAddress,{locale:"nl_NL"})}
function handleErrors(){if(directions.getStatus().code==G_GEO_UNKNOWN_ADDRESS)alert("No corresponding geographic location could be found for one of the specified addresses. This may be due to the fact that the address is relatively new, or it may be incorrect.\nError code: "+directions.getStatus().code);else if(directions.getStatus().code==G_GEO_SERVER_ERROR)alert("A geocoding or directions request could not be successfully processed, yet the exact reason for the failure is not known.\n Error code: "+
directions.getStatus().code);else if(directions.getStatus().code==G_GEO_MISSING_QUERY)alert("The HTTP q parameter was either missing or had no value. For geocoder requests, this means that an empty address was specified as input. For directions requests, this means that no query was specified in the input.\n Error code: "+directions.getStatus().code);else if(directions.getStatus().code==G_GEO_BAD_KEY)alert("The given key is either invalid or does not match the domain for which it was given. \n Error code: "+
directions.getStatus().code);else directions.getStatus().code==G_GEO_BAD_REQUEST?alert("A directions request could not be successfully parsed.\n Error code: "+directions.getStatus().code):alert("An unknown error occurred.")}
function initBaseIcon(){baseIcon=new GIcon;baseIcon.image="http://www.opendeuren.com/img/googleMap.png";baseIcon.shadow="http://www.opendeuren.com/img/googleMapShadow.png";baseIcon.iconSize=new GSize(52,68);baseIcon.shadowSize=new GSize(92,68);baseIcon.iconAnchor=new GPoint(26,68);baseIcon.infoWindowAnchor=new GPoint(0,0)}function subGPoints(a,b){return new GPoint(a.x-b.x,a.y-b.y)}
function addToMap(a,b,c,d,f,e,h,i){var k=new GLatLng(a,b);marker=new PdMarker(new GLatLng(a,b));marker.setTooltip(c);marker.setTitle(c);marker.setAddress(d);marker.setRouteAddress(f);marker.setDescription(e);marker.setImage(h);marker.setId(i);GEvent.addListener(marker,"click",function(){closeAllInfoWindows();var g=this.getPoint().lat();g=this.getPoint().lng();map.savePosition();g=map.fromLatLngToDivPixel(map.getCenter());var j=map.fromLatLngToDivPixel(this.getPoint());g=subGPoints(j,g);map.panBy(new GSize(-g.x-
100,-g.y+150))});map.addOverlay(marker)}var moveEndEvent;function openInfoWindow(a){closeAllInfoWindows();a=map.getMarkerById(a);var b=a.getPoint().lat();b=a.getPoint().lng();b=map.getZoom();map.savePosition();b=map.fromLatLngToDivPixel(map.getCenter());var c=map.fromLatLngToDivPixel(a.getPoint());b=subGPoints(c,b);map.panTo(a.getPoint());a.showDetailWin()}
function reposition(){for(var a,b=map.getFirstMarker();b!=null;){if(b.detailOpen)a=b;b=map.getNextMarker()}if(a!=null){a.closeDetailWin();b=a.getPoint().lat();b=a.getPoint().lng();map.savePosition();b=map.fromLatLngToDivPixel(map.getCenter());var c=map.fromLatLngToDivPixel(a.getPoint());b=subGPoints(c,b);map.panBy(new GSize(-b.x,-b.y));a.showDetailWin()}}function deleteAllMarkers(){for(var a=map.getFirstMarker();a!=null;){a.remove();a=map.getFirstMarker()}}
function closeAllInfoWindows(){for(var a=map.getFirstMarker();a!=null;){a.closeDetailWin();a=map.getNextMarker()}}
function toggleAccordion(a,b,c){var d=0,f=a+""+b;if(document.getElementById(f).style.display=="none"){for(var e=1;e<=c;e++)document.getElementById(a+e)&&document.getElementById(a+e).style.display==""&&d++;if(d==0)d=1;if(d==1){for(e=1;e<=c;e++)if(document.getElementById(a+e)){if(document.getElementById(a+"title"+e))document.getElementById(a+"title"+e).className="sliderTitleGreen";document.getElementById(a+e).style.display==""&&Effect.BlindUp(a+e,{duration:0.3})}if(document.getElementById(a+"title"+
b))document.getElementById(a+"title"+b).className="sliderTitleBlack";Effect.BlindDown(f,{duration:0.3})}}}function hideAll(a,b,c){for(var d=0;d<=b;d++)if(d!=c){if(document.getElementById(a+""+d))document.getElementById(a+""+d).style.display="none"}else if(document.getElementById(a+"title"+d))document.getElementById(a+"title"+d).className="sliderTitleBlack"}function toggleTextSize(){var a=document.getElementById("textSize");if(a)a.style.display=a.style.display=="none"?"block":"none"}
function toggleQuickSearchPortal(){var a=document.getElementById("quickSearchPortal");if(a)a.style.display=a.style.display=="none"?"block":"none"}function toggleQuickSearch(){var a=document.getElementById("quickSearch");if(a)a.style.display=a.style.display=="none"?"block":"none"}function repositionDiv(a,b,c,d){if(a=document.getElementById(a))a.style.left=document.body.offsetWidth>c?Math.round(b+document.body.offsetWidth/2)+"px":d+"px"}var ecardSend=null;
function showEcardSend(a,b){var c=new Url;c=c.replacePage("misc/sendEcard.aspx").add("catID",a).add("fleID",b);if(ecardSend==null)ecardSend=new TLightBox("divEcardSend");ecardSend.getHtml(c)&&ecardSend.show()}
function saveEcard(){var a=new Url;a=a.add("action","save");var b=ecards.Ecards.Rows(0).fields;if(b.FromName.FValue==null)alert("U moet nog uw eigen naam invullen");else if(b.FromEmail.FValue==null)alert("U moet nog uw E-mail adres invullen");else if(b.ToName.FValue==null)alert("U moet nog de naam invullen van de persoon naar wie je ecard wil sturem");else if(b.ToEmail.FValue==null)alert("U bent een email adres vergeten");else if(b.Message.FValue==null)alert("U heeft nog geen bericht ingevuld");else location.href=
a}var ecardShow=null;function showEcardShow(){if(ecardShow==null)ecardShow=new TLightBox("divShowEcard");ecardShow!=null&&setTimeout("ecardShow.show()",10)}function showOrderForm(){var a=document.getElementById("orderform");if(a)a.style.display="block"}function fillHiddenFields(a,b,c){var d=document.getElementById("fldID_121");if(d)d.value=a;if(a=document.getElementById("fldID_122"))a.value=b;if(b=document.getElementById("fldID_123"))b.value=c}
function submitQuickSearch(){var a=document.getElementById("edtCseID"),b="";if(a){a.value="";for(var c=2;c<5;c++){var d=document.getElementById("chk_"+c);if(d)if(d.checked)b+=b.length>0?", "+d.value:d.value}if(b.length>0)a.value=b}(a=document.getElementById("searchForm"))&&frmSearchSubmit(a,event)&&a.submit()}
function changeCheck(a){if(a.id=="chk_1"&&a.checked){document.getElementById("chk_2").checked=false;document.getElementById("chk_3").checked=false;document.getElementById("chk_4").checked=false}else if((a.id=="chk_2"||a.id=="chk_3"||a.id=="chk_4")&&a.checked)document.getElementById("chk_1").checked=false}
function answer(a,b,c,d){var f=$(a+"_"+b),e=$("A_"+b),h=$("B_"+b),i=$("C_"+b);b=$("D_"+b);c=$("answer_"+c);if(e)e.style.backgroundImage="url('img/bgTestAnswerGrey.gif')";if(h)h.style.backgroundImage="url('img/bgTestAnswerGrey.gif')";if(i)i.style.backgroundImage="url('img/bgTestAnswerGrey.gif')";if(b)b.style.backgroundImage="url('img/bgTestAnswerGrey.gif')";if(f)f.style.backgroundImage="url('img/bgTestAnswerGreen.gif')";if(c)c.value=a;a=true;for(f=1;f<=d;f++)if(e=$("answer_"+f))if(e.value.length==
0)a=false;if(a)if(d=$("submit"))d.style.display=""};
function frmLoginSubmit(a,b){var c=a.elements.edtUsername,d=a.elements.edtPassword;a=a.elements.action;if(c.type!="hidden"&&(!c.value||c.value==c.defaultValue)){alert(noUsername[Languages.current]);c.focus();return b.returnValue=false}if(!a||a.value==0)if(!d.value||d.value==d.defaultValue){alert(noPassword[Languages.current]);d.focus();return b.returnValue=false}return true}function edtUsernameFocus(a,b){if(a&&(!a.oldValue||a.value==a.oldValue)){a.oldValue=a.value;a.value=""}}
function edtUsernameBlur(a,b){if(a&&a.oldValue&&String(a.value)=="")a.value=a.oldValue}
function edtPasswordFocus(a,b){if(a&&a.type=="text")if(b=a.parentNode){var c=a.value,d=document.body.appendChild(document.createElement("DIV")),e='<input type="password" id="edtPassword" name="'+a.name+'"';if(a.className!="")e+=' class="'+a.className+'"';if(a.onfocus!="")e+=' onfocus="edtPasswordFocus( this, event );"';if(a.onblur!="")e+=' onblur="edtPasswordBlur( this, event );"';e+=" />";d.innerHTML=e;b.replaceChild(d.getElementsByTagName("INPUT")[0],a);Html.get("edtPassword").oldValue=c;setTimeout('Html.get("edtPassword").focus();',
50)}}function edtPasswordBlur(a,b){if(a&&a.type=="password"&&String(a.value)=="")if(b=a.parentNode){var c=document.createElement("DIV"),d='<input type="text" id="edtPassword" name="'+a.name+'"';if(a.className!="")d+=' class="'+a.className+'"';if(a.onfocus!="")d+=' onfocus="edtPasswordFocus( this, event );"';if(a.onblur!="")d+=' onblur="edtPasswordBlur( this, event );"';if(a.oldValue!="")d+=' value="'+a.oldValue+'"';d+=" />";c.innerHTML=d;b.replaceChild(c.getElementsByTagName("INPUT")[0],a)}}
function frmLoginChangeAction(){var a=document.getElementsByName("frmLogin")[0],b=a.elements.edtUsername,c=a.elements.action;if(b.type!="hidden"&&(!b.value||b.value==b.defaultValue)){alert(noUsername[Languages.current]);b.focus();if(typeof event!="undefined"&&event!=null)event.returnValue=false;return false}if(confirm(newPassword[Languages.current])){c.value=3;a.submit()}}
function frmChangePasswordSubmit(a,b){var c=a.elements.edtOldPassword,d=a.elements.edtNewPassword1;a=a.elements.edtNewPassword2;if(typeof c!="undefined"&&!c.value){alert(noOldPassword[Languages.current]);c.focus();return b.returnValue=false}if(!d.value){alert(noNewPassword1[Languages.current]);d.focus();return b.returnValue=false}if(!a.value){alert(noNewPassword2[Languages.current]);a.focus();return b.returnValue=false}return true}
function frmLoginLikeSubmit(a,b){a=a.elements.cmbUsers;if(a.selectedIndex==-1){alert(noUserSelected[Languages.current]);a.focus();return b.returnValue=false}return true}
function edtFindUserKeyUp(a,b){var c=a.form.elements.cmbUsers,d=0,e=1;if(b.keyCode==40)d=c.selectedIndex+1;else if(b.keyCode==38){d=c.selectedIndex-1;e=-1}if(String(a.value).length>0)for(b=d;e>0&&b<c.options.length||e<0&&b>0;b+=e)if(String(c.options[b].text).toUpperCase().indexOf(a.value.toUpperCase())>-1){c.options[b].selected=true;return}}function clearUserCookie(){Cookies.remove("User");var a=new Url;a=a.replacePage("login.aspx");a=a.remove("msg");a=a.add("action",9);document.location.href=a};
function frmSearchSubmit(a,d){var b=a.elements.edtSearchAll,c=a.elements.edtSearchExact,e=a.elements.edtSearchAtLeastOne,f=a.elements.edtSearchWithout;if(a=a.elements.edtSearchText){if(!a.value){alert(noSearchText[Languages.current]);a.focus();return d.returnValue=false}c=allowedWords(a.value);if(c.length==0){alert(illegalSearchWords[Languages.current]);a.focus();return d.returnValue=false}else a.value=c.join(" ")}else if(b){if(!b.value&&!c.value&&!e.value&&!f.value){alert(noSearchText[Languages.current]);
b.focus();return d.returnValue=false}if(b.value){c=allowedWords(b.value);if(c.length==0){alert(illegalSearchWords[Languages.current]);b.focus();return d.returnValue=false}else b.value=c.join(" ")}if(e.value){c=allowedWords(e.value);if(c.length==0){alert(illegalSearchWords[Languages.current]);e.focus();return d.returnValue=false}else e.value=c.join(" ")}if(f.value){c=allowedWords(f.value);if(c.length==0){alert(illegalSearchWords[Languages.current]);f.focus();return d.returnValue=false}else f.value=
c.join(" ")}}return true}function allowedWords(a){var d=[];a=String(a.trim()).split(/[\s",]+/gi);for(var b=0;b<a.length;b++)if(a[b].length>=minSearchLen)d[d.length]=a[b];return d}function checkFiles(){for(var a=Html.get("cbElement2"),d=document.getElementsByName("cbElement"),b=true,c=0;c<d.length&&b;c++)if(d.checked)b=false;if(a!=null&&b)a.checked=true};
if(typeof com=="undefined")var com={};if(typeof com.deconcept=="undefined")com.deconcept={};if(typeof com.deconcept.util=="undefined")com.deconcept.util={};if(typeof com.deconcept.FlashObjectUtil=="undefined")com.deconcept.FlashObjectUtil={};
com.deconcept.FlashObject=function(a,b,c,f,d,g,e,h,i,j,k){if(document.createElement&&document.getElementById){this.DETECT_KEY=k?k:"detectflash";this.skipDetect=com.deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];this.useExpressInstall=e;a&&this.setAttribute("swf",a);b&&this.setAttribute("id",b);c&&this.setAttribute("width",c);f&&this.setAttribute("height",f);d&&this.setAttribute("version",new com.deconcept.PlayerVersion(d.toString().split(".")));
this.installedVer=com.deconcept.FlashObjectUtil.getPlayerVersion(this.getAttribute("version"),e);g&&this.addParam("bgcolor",g);this.addParam("quality",h?h:"high");this.setAttribute("xiRedirectUrl",i?i:window.location);this.setAttribute("redirectUrl","");j&&this.setAttribute("redirectUrl",j)}};
com.deconcept.FlashObject.prototype={setAttribute:function(a,b){this.attributes[a]=b},getAttribute:function(a){return this.attributes[a]},addParam:function(a,b){this.params[a]=b},getParams:function(){return this.params},addVariable:function(a,b){this.variables[a]=b},getVariable:function(a){return this.variables[a]},getVariables:function(){return this.variables},createParamTag:function(a,b){var c=document.createElement("param");c.setAttribute("name",a);c.setAttribute("value",b);return c},getVariablePairs:function(){var a=
[],b,c=this.getVariables();for(b in c)a.push(b+"="+c[b]);return a},getFlashHTML:function(){var a="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){this.getAttribute("doExpressInstall")&&this.addVariable("MMplayerType","PlugIn");a='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'"';a+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var b=this.getParams();
for(var c in b)a+=[c]+'="'+b[c]+'" ';c=this.getVariablePairs().join("&");if(c.length>0)a+='flashvars="'+c+'"';a+="/>"}else{this.getAttribute("doExpressInstall")&&this.addVariable("MMplayerType","ActiveX");a='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'">';a+='<param name="movie" value="'+this.getAttribute("swf")+'" />"';b=this.getParams();for(c in b)a+='<param name="'+c+
'" value="'+b[c]+'">';c=this.getVariablePairs().join("&");if(c.length>0){a+='<param name="flashvars" value="'+c+'">';a+="</object>"}}return a},write:function(a){if(this.useExpressInstall){if(this.installedVer.versionIsValid(new com.deconcept.PlayerVersion([6,0,65]))&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));this.addVariable("MMdoctitle",document.title)}}else this.setAttribute("doExpressInstall",
false);if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version")))(typeof a=="string"?document.getElementById(a):a).innerHTML=this.getFlashHTML();else this.getAttribute("redirectUrl")!=""&&document.location.replace(this.getAttribute("redirectUrl"))}};
com.deconcept.FlashObjectUtil.getPlayerVersion=function(a,b){var c=new com.deconcept.PlayerVersion(0,0,0);if(navigator.plugins&&navigator.mimeTypes.length){if((a=navigator.plugins["Shockwave Flash"])&&a.description)c=new com.deconcept.PlayerVersion(a.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}else{try{for(var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),d=3;f!=null;d++){f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+d);c=new com.deconcept.PlayerVersion([d,
0,0])}}catch(g){}if(a&&c.major>a.major)return c;if(!a||(a.minor!=0||a.rev!=0)&&c.major==a.major||c.major!=6||b)try{c=new com.deconcept.PlayerVersion(f.GetVariable("$version").split(" ")[1].split(","))}catch(e){}}return c};com.deconcept.PlayerVersion=function(a){this.major=parseInt(a[0])||0;this.minor=parseInt(a[1])||0;this.rev=parseInt(a[2])||0};
com.deconcept.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major)return false;if(this.major>a.major)return true;if(this.minor<a.minor)return false;if(this.minor>a.minor)return true;if(this.rev<a.rev)return false;return true};
com.deconcept.util={getRequestParameter:function(a){var b=document.location.search||document.location.href.hash;if(b){a=b.indexOf(a+"=");var c=b.indexOf("&",a)>-1?b.indexOf("&",a):b.length;if(b.length>1&&a>-1)return b.substring(b.indexOf("=",a)+1,c)}return""},removeChildren:function(a){for(;a.hasChildNodes();)a.removeChild(a.firstChild)}};if(Array.prototype.push==null)Array.prototype.push=function(a){this[this.length]=a;return this.length};
var getQueryParamValue=com.deconcept.util.getRequestParameter,FlashObject=com.deconcept.FlashObject,isIE=navigator.appVersion.indexOf("MSIE")!=-1?true:false,isWin=navigator.appVersion.toLowerCase().indexOf("win")!=-1?true:false,isOpera=navigator.userAgent.indexOf("Opera")!=-1?true:false;
function ControlVersion(){var a,b;try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=b.GetVariable("$version")}catch(c){}if(!a)try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a="WIN 6,0,21,0";b.AllowScriptAccess="always";a=b.GetVariable("$version")}catch(f){}if(!a)try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a=b.GetVariable("$version")}catch(d){}if(!a)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a="WIN 3,0,18,0"}catch(g){}if(!a)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
a="WIN 2,0,0,11"}catch(e){a=-1}return a}
function GetSwfVer(){var a=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){a=navigator.plugins["Shockwave Flash"+(navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"")].description.split(" ");var b=a[2].split("."),c=b[0];b=b[1];tempArrayMinor=a[3]!=""?a[3].split("r"):a[4].split("r");a=c+"."+b+"."+(tempArrayMinor[1]>0?tempArrayMinor[1]:0)}}else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1)a=
4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)a=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)a=2;else if(isIE&&isWin&&!isOpera)a=ControlVersion();return a}
function DetectFlashVer(a,b,c){versionStr=GetSwfVer();if(versionStr==-1)return false;else if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else versionArray=versionStr.split(".");var f=versionArray[0],d=versionArray[1],g=versionArray[2];if(f>parseFloat(a))return true;else if(f==parseFloat(a))if(d>parseFloat(b))return true;else if(d==parseFloat(b))if(g>=parseFloat(c))return true;return false}}
function AC_AddExtension(a,b){return a.indexOf("?")!=-1?a.replace(/\?/,b+"?"):a+b}function AC_Generateobj(a,b,c){var f="";if(isIE&&isWin&&!isOpera){f+="<object ";for(var d in a)f+=d+'="'+a[d]+'" ';for(d in b)f+='><param name="'+d+'" value="'+b[d]+'" /> ';f+="></object>"}else{f+="<embed ";for(d in c)f+=d+'="'+c[d]+'" ';f+="> </embed>"}document.write(f)}
function AC_FL_RunContent(){var a=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}
function AC_GetArgs(a,b,c,f,d){var g={};g.embedAttrs={};g.params={};g.objAttrs={};for(var e=0;e<a.length;e+=2)switch(a[e].toLowerCase()){case "classid":break;case "pluginspage":g.embedAttrs[a[e]]=a[e+1];break;case "src":case "movie":a[e+1]=AC_AddExtension(a[e+1],b);g.embedAttrs.src=a[e+1];g.params[c]=a[e+1];break;case "onafterupdate":case "onbeforeupdate":case "onblur":case "oncellchange":case "onclick":case "ondblClick":case "ondrag":case "ondragend":case "ondragenter":case "ondragleave":case "ondragover":case "ondrop":case "onfinish":case "onfocus":case "onhelp":case "onmousedown":case "onmouseup":case "onmouseover":case "onmousemove":case "onmouseout":case "onkeypress":case "onkeydown":case "onkeyup":case "onload":case "onlosecapture":case "onpropertychange":case "onreadystatechange":case "onrowsdelete":case "onrowenter":case "onrowexit":case "onrowsinserted":case "onstart":case "onscroll":case "onbeforeeditfocus":case "onactivate":case "onbeforedeactivate":case "ondeactivate":case "type":case "codebase":case "id":g.objAttrs[a[e]]=
a[e+1];break;case "width":case "height":case "align":case "vspace":case "hspace":case "class":case "title":case "accesskey":case "name":case "tabindex":g.embedAttrs[a[e]]=g.objAttrs[a[e]]=a[e+1];break;default:g.embedAttrs[a[e]]=g.params[a[e]]=a[e+1]}g.objAttrs.classid=f;if(d)g.embedAttrs.type=d;return g}
Vars=function(a){this.numVars=0;if(a!=null){var b,c;a=a.split("&");for(var f=a.length,d=0;d<f;d++){c=a[d];if(c.indexOf("=")!=-1&&c.length>3){b=c.split("=");c=b[0];b=b[1];if(this[c]==null&&c.length>0&&b.length>0){this[c]=b;this.numVars++}}}}};Vars.prototype.toString=function(a){var b="";if(a==null)a="";for(var c in this)if(this[c]!=null&&typeof this[c]!="object"&&typeof this[c]!="function"&&c!="numVars")b+=a+c+"="+this[c]+"&";if(b.length>0)b=b.substr(0,b.length-1);return b};
function getSearch(a){var b="";if(a.location.search.length>1){b=new String(a.location.search);b=b.substring(1,b.length)}return b}var lc_id=Math.floor(Math.random()*1E5).toString(16);try{if(this!=top){top.Vars=Vars;top.getSearch=getSearch;top.lc_id=lc_id}}catch(e$$8){}function gotFlash(a){a=typeof a=="string"?a.split("."):[];return DetectFlashVer(a.length>0?a[0]:8,a.length>1?a[1]:0,a.length>2?a[2]:0)}
function tryFlash(a,b,c,f,d){a=typeof a=="string"?a.split("."):[];var g=b.indexOf("/")>-1?b.substr(0,b.lastIndexOf("/")+1):"";b=b.indexOf("/")>-1?b.substr(b.lastIndexOf("/")+1):b;var e=a.length>0?a[0]:8,h=a.length>1?a[1]:0,i=a.length>2?a[2]:0;a=DetectFlashVer(6,0,65);e=DetectFlashVer(e,h,i);b=b.substr(0,b.lastIndexOf("."));if(a&&!e){d=isIE==true?"ActiveX":"PlugIn";g=window.location;e=document.title.slice(0,47)+" - Flash Player Installation";AC_FL_RunContent("src","img/default/playerProductInstall",
"FlashVars","MMredirectURL="+g+"&MMplayerType="+d+"&MMdoctitle="+e+"","width",String(c),"height",String(f),"align","middle","id",String(b),"quality","high","bgcolor","#869ca7","name",String(b),"allowScriptAccess","sameDomain","type","application/x-shockwave-flash","pluginspage","http://www.adobe.com/go/getflashplayer");return true}else if(e){AC_FL_RunContent("src",g+b,"width",String(c),"height",String(f),"align","middle","id",String(b),"quality","high","bgcolor","#869ca7","name",String(b),"flashvars",
d,"allowScriptAccess","sameDomain","type","application/x-shockwave-flash","pluginspage","http://www.adobe.com/go/getflashplayer");return true}else return false};
