﻿//----------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------
// MicrosoftAjax.js
Function.__typeName="Function";Function.__class=true;Function.createCallback=function(b,a){return function(){var e=arguments.length;if(e>0){var d=[];for(var c=0;c<e;c++)d[c]=arguments[c];d[e]=a;return b.apply(this,d)}return b.call(this,a)}};Function.createDelegate=function(a,b){return function(){return b.apply(a,arguments)}};Function.emptyFunction=Function.emptyMethod=function(){};Function._validateParams=function(e,c){var a;a=Function._validateParameterCount(e,c);if(a){a.popStackFrame();return a}for(var b=0;b<e.length;b++){var d=c[Math.min(b,c.length-1)],f=d.name;if(d.parameterArray)f+="["+(b-c.length+1)+"]";a=Function._validateParameter(e[b],d,f);if(a){a.popStackFrame();return a}}return null};Function._validateParameterCount=function(e,a){var c=a.length,d=0;for(var b=0;b<a.length;b++)if(a[b].parameterArray)c=Number.MAX_VALUE;else if(!a[b].optional)d++;if(e.length<d||e.length>c){var f=Error.parameterCount();f.popStackFrame();return f}return null};Function._validateParameter=function(c,a,h){var b,g=a.type,l=!!a.integer,k=!!a.domElement,m=!!a.mayBeNull;b=Function._validateParameterType(c,g,l,k,m,h);if(b){b.popStackFrame();return b}var e=a.elementType,f=!!a.elementMayBeNull;if(g===Array&&typeof c!=="undefined"&&c!==null&&(e||!f)){var j=!!a.elementInteger,i=!!a.elementDomElement;for(var d=0;d<c.length;d++){var n=c[d];b=Function._validateParameterType(n,e,j,i,f,h+"["+d+"]");if(b){b.popStackFrame();return b}}}return null};Function._validateParameterType=function(a,c,n,m,k,d){var b;if(typeof a==="undefined")if(k)return null;else{b=Error.argumentUndefined(d);b.popStackFrame();return b}if(a===null)if(k)return null;else{b=Error.argumentNull(d);b.popStackFrame();return b}if(c&&c.__enum){if(typeof a!=="number"){b=Error.argumentType(d,Object.getType(a),c);b.popStackFrame();return b}if(a%1===0){var e=c.prototype;if(!c.__flags||a===0){for(var i in e)if(e[i]===a)return null}else{var l=a;for(var i in e){var f=e[i];if(f===0)continue;if((f&a)===f)l-=f;if(l===0)return null}}}b=Error.argumentOutOfRange(d,a,String.format(Sys.Res.enumInvalidValue,a,c.getName()));b.popStackFrame();return b}if(m){var h;if(typeof a.nodeType!=="number"){var g=a.ownerDocument||a.document||a;if(g!=a){var j=g.defaultView||g.parentWindow;h=j!=a&&!(j.document&&a.document&&j.document===a.document)}else h=typeof g.body==="undefined"}else h=a.nodeType===3;if(h){b=Error.argument(d,Sys.Res.argumentDomElement);b.popStackFrame();return b}}if(c&&!c.isInstanceOfType(a)){b=Error.argumentType(d,Object.getType(a),c);b.popStackFrame();return b}if(c===Number&&n)if(a%1!==0){b=Error.argumentOutOfRange(d,a,Sys.Res.argumentInteger);b.popStackFrame();return b}return null};Error.__typeName="Error";Error.__class=true;Error.create=function(d,b){var a=new Error(d);a.message=d;if(b)for(var c in b)a[c]=b[c];a.popStackFrame();return a};Error.argument=function(a,c){var b="Sys.ArgumentException: "+(c?c:Sys.Res.argument);if(a)b+="\n"+String.format(Sys.Res.paramName,a);var d=Error.create(b,{name:"Sys.ArgumentException",paramName:a});d.popStackFrame();return d};Error.argumentNull=function(a,c){var b="Sys.ArgumentNullException: "+(c?c:Sys.Res.argumentNull);if(a)b+="\n"+String.format(Sys.Res.paramName,a);var d=Error.create(b,{name:"Sys.ArgumentNullException",paramName:a});d.popStackFrame();return d};Error.argumentOutOfRange=function(c,a,d){var b="Sys.ArgumentOutOfRangeException: "+(d?d:Sys.Res.argumentOutOfRange);if(c)b+="\n"+String.format(Sys.Res.paramName,c);if(typeof a!=="undefined"&&a!==null)b+="\n"+String.format(Sys.Res.actualValue,a);var e=Error.create(b,{name:"Sys.ArgumentOutOfRangeException",paramName:c,actualValue:a});e.popStackFrame();return e};Error.argumentType=function(d,c,b,e){var a="Sys.ArgumentTypeException: ";if(e)a+=e;else if(c&&b)a+=String.format(Sys.Res.argumentTypeWithTypes,c.getName(),b.getName());else a+=Sys.Res.argumentType;if(d)a+="\n"+String.format(Sys.Res.paramName,d);var f=Error.create(a,{name:"Sys.ArgumentTypeException",paramName:d,actualType:c,expectedType:b});f.popStackFrame();return f};Error.argumentUndefined=function(a,c){var b="Sys.ArgumentUndefinedException: "+(c?c:Sys.Res.argumentUndefined);if(a)b+="\n"+String.format(Sys.Res.paramName,a);var d=Error.create(b,{name:"Sys.ArgumentUndefinedException",paramName:a});d.popStackFrame();return d};Error.format=function(a){var c="Sys.FormatException: "+(a?a:Sys.Res.format),b=Error.create(c,{name:"Sys.FormatException"});b.popStackFrame();return b};Error.invalidOperation=function(a){var c="Sys.InvalidOperationException: "+(a?a:Sys.Res.invalidOperation),b=Error.create(c,{name:"Sys.InvalidOperationException"});b.popStackFrame();return b};Error.notImplemented=function(a){var c="Sys.NotImplementedException: "+(a?a:Sys.Res.notImplemented),b=Error.create(c,{name:"Sys.NotImplementedException"});b.popStackFrame();return b};Error.parameterCount=function(a){var c="Sys.ParameterCountException: "+(a?a:Sys.Res.parameterCount),b=Error.create(c,{name:"Sys.ParameterCountException"});b.popStackFrame();return b};Error.prototype.popStackFrame=function(){if(typeof this.stack==="undefined"||this.stack===null||typeof this.fileName==="undefined"||this.fileName===null||typeof this.lineNumber==="undefined"||this.lineNumber===null)return;var a=this.stack.split("\n"),c=a[0],e=this.fileName+":"+this.lineNumber;while(typeof c!=="undefined"&&c!==null&&c.indexOf(e)===-1){a.shift();c=a[0]}var d=a[1];if(typeof d==="undefined"||d===null)return;var b=d.match(/@(.*):(\d+)$/);if(typeof b==="undefined"||b===null)return;this.fileName=b[1];this.lineNumber=parseInt(b[2]);a.shift();this.stack=a.join("\n")};Object.__typeName="Object";Object.__class=true;Object.getType=function(b){var a=b.constructor;if(!a||typeof a!=="function"||!a.__typeName||a.__typeName==="Object")return Object;return a};Object.getTypeName=function(a){return Object.getType(a).getName()};String.__typeName="String";String.__class=true;String.prototype.endsWith=function(a){return this.substr(this.length-a.length)===a};String.prototype.startsWith=function(a){return this.substr(0,a.length)===a};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.trimEnd=function(){return this.replace(/\s+$/,"")};String.prototype.trimStart=function(){return this.replace(/^\s+/,"")};String.format=function(){return String._toFormattedString(false,arguments)};String.localeFormat=function(){return String._toFormattedString(true,arguments)};String._toFormattedString=function(l,j){var c="",e=j[0];for(var a=0;true;){var f=e.indexOf("{",a),d=e.indexOf("}",a);if(f<0&&d<0){c+=e.slice(a);break}if(d>0&&(d<f||f<0)){c+=e.slice(a,d+1);a=d+2;continue}c+=e.slice(a,f);a=f+1;if(e.charAt(a)==="{"){c+="{";a++;continue}if(d<0)break;var h=e.substring(a,d),g=h.indexOf(":"),k=parseInt(g<0?h:h.substring(0,g),10)+1,i=g<0?"":h.substring(g+1),b=j[k];if(typeof b==="undefined"||b===null)b="";if(b.toFormattedString)c+=b.toFormattedString(i);else if(l&&b.localeFormat)c+=b.localeFormat(i);else if(b.format)c+=b.format(i);else c+=b.toString();a=d+1}return c};Boolean.__typeName="Boolean";Boolean.__class=true;Boolean.parse=function(b){var a=b.trim().toLowerCase();if(a==="false")return false;if(a==="true")return true};Date.__typeName="Date";Date.__class=true;Date._appendPreOrPostMatch=function(e,b){var d=0,a=false;for(var c=0,g=e.length;c<g;c++){var f=e.charAt(c);switch(f){case "'":if(a)b.append("'");else d++;a=false;break;case "\\":if(a)b.append("\\");a=!a;break;default:b.append(f);a=false}}return d};Date._expandFormat=function(a,b){if(!b)b="F";if(b.length===1)switch(b){case "d":return a.ShortDatePattern;case "D":return a.LongDatePattern;case "t":return a.ShortTimePattern;case "T":return a.LongTimePattern;case "F":return a.FullDateTimePattern;case "M":case "m":return a.MonthDayPattern;case "s":return a.SortableDateTimePattern;case "Y":case "y":return a.YearMonthPattern;default:throw Error.format(Sys.Res.formatInvalidString)}return b};Date._expandYear=function(c,a){if(a<100){var b=(new Date).getFullYear();a+=b-b%100;if(a>c.Calendar.TwoDigitYearMax)return a-100}return a};Date._getParseRegExp=function(b,e){if(!b._parseRegExp)b._parseRegExp={};else if(b._parseRegExp[e])return b._parseRegExp[e];var c=Date._expandFormat(b,e);c=c.replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1");var a=new Sys.StringBuilder("^"),j=[],f=0,i=0,h=Date._getTokenRegExp(),d;while((d=h.exec(c))!==null){var l=c.slice(f,d.index);f=h.lastIndex;i+=Date._appendPreOrPostMatch(l,a);if(i%2===1){a.append(d[0]);continue}switch(d[0]){case "dddd":case "ddd":case "MMMM":case "MMM":a.append("(\\D+)");break;case "tt":case "t":a.append("(\\D*)");break;case "yyyy":a.append("(\\d{4})");break;case "fff":a.append("(\\d{3})");break;case "ff":a.append("(\\d{2})");break;case "f":a.append("(\\d)");break;case "dd":case "d":case "MM":case "M":case "yy":case "y":case "HH":case "H":case "hh":case "h":case "mm":case "m":case "ss":case "s":a.append("(\\d\\d?)");break;case "zzz":a.append("([+-]?\\d\\d?:\\d{2})");break;case "zz":case "z":a.append("([+-]?\\d\\d?)")}Array.add(j,d[0])}Date._appendPreOrPostMatch(c.slice(f),a);a.append("$");var k=a.toString().replace(/\s+/g,"\\s+"),g={"regExp":k,"groups":j};b._parseRegExp[e]=g;return g};Date._getTokenRegExp=function(){return /dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z/g};Date.parseLocale=function(a){return Date._parse(a,Sys.CultureInfo.CurrentCulture,arguments)};Date.parseInvariant=function(a){return Date._parse(a,Sys.CultureInfo.InvariantCulture,arguments)};Date._parse=function(g,c,h){var e=false;for(var a=1,i=h.length;a<i;a++){var f=h[a];if(f){e=true;var b=Date._parseExact(g,f,c);if(b)return b}}if(!e){var d=c._getDateTimeFormats();for(var a=0,i=d.length;a<i;a++){var b=Date._parseExact(g,d[a],c);if(b)return b}}return null};Date._parseExact=function(s,y,j){s=s.trim();var m=j.dateTimeFormat,v=Date._getParseRegExp(m,y),x=(new RegExp(v.regExp)).exec(s);if(x===null)return null;var w=v.groups,f=null,c=null,h=null,g=null,d=0,n=0,o=0,e=0,k=null,r=false;for(var p=0,z=w.length;p<z;p++){var a=x[p+1];if(a)switch(w[p]){case "dd":case "d":h=parseInt(a,10);if(h<1||h>31)return null;break;case "MMMM":c=j._getMonthIndex(a);if(c<0||c>11)return null;break;case "MMM":c=j._getAbbrMonthIndex(a);if(c<0||c>11)return null;break;case "M":case "MM":var c=parseInt(a,10)-1;if(c<0||c>11)return null;break;case "y":case "yy":f=Date._expandYear(m,parseInt(a,10));if(f<0||f>9999)return null;break;case "yyyy":f=parseInt(a,10);if(f<0||f>9999)return null;break;case "h":case "hh":d=parseInt(a,10);if(d===12)d=0;if(d<0||d>11)return null;break;case "H":case "HH":d=parseInt(a,10);if(d<0||d>23)return null;break;case "m":case "mm":n=parseInt(a,10);if(n<0||n>59)return null;break;case "s":case "ss":o=parseInt(a,10);if(o<0||o>59)return null;break;case "tt":case "t":var u=a.toUpperCase();r=u===m.PMDesignator.toUpperCase();if(!r&&u!==m.AMDesignator.toUpperCase())return null;break;case "f":e=parseInt(a,10)*100;if(e<0||e>999)return null;break;case "ff":e=parseInt(a,10)*10;if(e<0||e>999)return null;break;case "fff":e=parseInt(a,10);if(e<0||e>999)return null;break;case "dddd":g=j._getDayIndex(a);if(g<0||g>6)return null;break;case "ddd":g=j._getAbbrDayIndex(a);if(g<0||g>6)return null;break;case "zzz":var q=a.split(/:/);if(q.length!==2)return null;var i=parseInt(q[0],10);if(i<-12||i>13)return null;var l=parseInt(q[1],10);if(l<0||l>59)return null;k=i*60+(a.startsWith("-")?-l:l);break;case "z":case "zz":var i=parseInt(a,10);if(i<-12||i>13)return null;k=i*60}}var b=new Date;if(f===null)f=b.getFullYear();if(c===null)c=b.getMonth();if(h===null)h=b.getDate();b.setFullYear(f,c,h);if(b.getDate()!==h)return null;if(g!==null&&b.getDay()!==g)return null;if(r&&d<12)d+=12;b.setHours(d,n,o,e);if(k!==null){var t=b.getMinutes()-(k+b.getTimezoneOffset());b.setHours(b.getHours()+parseInt(t/60,10),t%60)}return b};Date.prototype.format=function(a){return this._toFormattedString(a,Sys.CultureInfo.InvariantCulture)};Date.prototype.localeFormat=function(a){return this._toFormattedString(a,Sys.CultureInfo.CurrentCulture)};Date.prototype._toFormattedString=function(e,h){if(!e||e.length===0||e==="i")if(h&&h.name.length>0)return this.toLocaleString();else return this.toString();var d=h.dateTimeFormat;e=Date._expandFormat(d,e);var a=new Sys.StringBuilder,b;function c(a){if(a<10)return "0"+a;return a.toString()}function g(a){if(a<10)return "00"+a;if(a<100)return "0"+a;return a.toString()}var j=0,i=Date._getTokenRegExp();for(;true;){var l=i.lastIndex,f=i.exec(e),k=e.slice(l,f?f.index:e.length);j+=Date._appendPreOrPostMatch(k,a);if(!f)break;if(j%2===1){a.append(f[0]);continue}switch(f[0]){case "dddd":a.append(d.DayNames[this.getDay()]);break;case "ddd":a.append(d.AbbreviatedDayNames[this.getDay()]);break;case "dd":a.append(c(this.getDate()));break;case "d":a.append(this.getDate());break;case "MMMM":a.append(d.MonthNames[this.getMonth()]);break;case "MMM":a.append(d.AbbreviatedMonthNames[this.getMonth()]);break;case "MM":a.append(c(this.getMonth()+1));break;case "M":a.append(this.getMonth()+1);break;case "yyyy":a.append(this.getFullYear());break;case "yy":a.append(c(this.getFullYear()%100));break;case "y":a.append(this.getFullYear()%100);break;case "hh":b=this.getHours()%12;if(b===0)b=12;a.append(c(b));break;case "h":b=this.getHours()%12;if(b===0)b=12;a.append(b);break;case "HH":a.append(c(this.getHours()));break;case "H":a.append(this.getHours());break;case "mm":a.append(c(this.getMinutes()));break;case "m":a.append(this.getMinutes());break;case "ss":a.append(c(this.getSeconds()));break;case "s":a.append(this.getSeconds());break;case "tt":a.append(this.getHours()<12?d.AMDesignator:d.PMDesignator);break;case "t":a.append((this.getHours()<12?d.AMDesignator:d.PMDesignator).charAt(0));break;case "f":a.append(g(this.getMilliseconds()).charAt(0));break;case "ff":a.append(g(this.getMilliseconds()).substr(0,2));break;case "fff":a.append(g(this.getMilliseconds()));break;case "z":b=this.getTimezoneOffset()/60;a.append((b<=0?"+":"-")+Math.floor(Math.abs(b)));break;case "zz":b=this.getTimezoneOffset()/60;a.append((b<=0?"+":"-")+c(Math.floor(Math.abs(b))));break;case "zzz":b=this.getTimezoneOffset()/60;a.append((b<=0?"+":"-")+c(Math.floor(Math.abs(b)))+d.TimeSeparator+c(Math.abs(this.getTimezoneOffset()%60)))}}return a.toString()};Number.__typeName="Number";Number.__class=true;Number.parseLocale=function(a){return Number._parse(a,Sys.CultureInfo.CurrentCulture)};Number.parseInvariant=function(a){return Number._parse(a,Sys.CultureInfo.InvariantCulture)};Number._parse=function(b,o){b=b.trim();if(b.match(/^[+-]?infinity$/i))return parseFloat(b);if(b.match(/^0x[a-f0-9]+$/i))return parseInt(b);var a=o.numberFormat,g=Number._parseNumberNegativePattern(b,a,a.NumberNegativePattern),h=g[0],e=g[1];if(h===""&&a.NumberNegativePattern!==1){g=Number._parseNumberNegativePattern(b,a,1);h=g[0];e=g[1]}if(h==="")h="+";var j,d,f=e.indexOf("e");if(f<0)f=e.indexOf("E");if(f<0){d=e;j=null}else{d=e.substr(0,f);j=e.substr(f+1)}var c,k,m=d.indexOf(a.NumberDecimalSeparator);if(m<0){c=d;k=null}else{c=d.substr(0,m);k=d.substr(m+a.NumberDecimalSeparator.length)}c=c.split(a.NumberGroupSeparator).join("");var n=a.NumberGroupSeparator.replace(/\u00A0/g," ");if(a.NumberGroupSeparator!==n)c=c.split(n).join("");var l=h+c;if(k!==null)l+="."+k;if(j!==null){var i=Number._parseNumberNegativePattern(j,a,1);if(i[0]==="")i[0]="+";l+="e"+i[0]+i[1]}if(l.match(/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/))return parseFloat(l);return Number.NaN};Number._parseNumberNegativePattern=function(a,d,e){var b=d.NegativeSign,c=d.PositiveSign;switch(e){case 4:b=" "+b;c=" "+c;case 3:if(a.endsWith(b))return ["-",a.substr(0,a.length-b.length)];else if(a.endsWith(c))return ["+",a.substr(0,a.length-c.length)];break;case 2:b+=" ";c+=" ";case 1:if(a.startsWith(b))return ["-",a.substr(b.length)];else if(a.startsWith(c))return ["+",a.substr(c.length)];break;case 0:if(a.startsWith("(")&&a.endsWith(")"))return ["-",a.substr(1,a.length-2)]}return ["",a]};Number.prototype.format=function(a){return this._toFormattedString(a,Sys.CultureInfo.InvariantCulture)};Number.prototype.localeFormat=function(a){return this._toFormattedString(a,Sys.CultureInfo.CurrentCulture)};Number.prototype._toFormattedString=function(d,j){if(!d||d.length===0||d==="i")if(j&&j.name.length>0)return this.toLocaleString();else return this.toString();var o=["n %","n%","%n"],n=["-n %","-n%","-%n"],p=["(n)","-n","- n","n-","n -"],m=["$n","n$","$ n","n $"],l=["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"];function g(a,c,d){for(var b=a.length;b<c;b++)a=d?"0"+a:a+"0";return a}function i(j,i,l,n,p){var h=l[0],k=1,o=Math.pow(10,i),m=Math.round(j*o)/o;if(!isFinite(m))m=j;j=m;var b=j.toString(),a="",c,e=b.split(/e/i);b=e[0];c=e.length>1?parseInt(e[1]):0;e=b.split(".");b=e[0];a=e.length>1?e[1]:"";var q;if(c>0){a=g(a,c,false);b+=a.slice(0,c);a=a.substr(c)}else if(c<0){c=-c;b=g(b,c+1,true);a=b.slice(-c,b.length)+a;b=b.slice(0,-c)}if(i>0){if(a.length>i)a=a.slice(0,i);else a=g(a,i,false);a=p+a}else a="";var d=b.length-1,f="";while(d>=0){if(h===0||h>d)if(f.length>0)return b.slice(0,d+1)+n+f+a;else return b.slice(0,d+1)+a;if(f.length>0)f=b.slice(d-h+1,d+1)+n+f;else f=b.slice(d-h+1,d+1);d-=h;if(k<l.length){h=l[k];k++}}return b.slice(0,d+1)+n+f+a}var a=j.numberFormat,e=Math.abs(this);if(!d)d="D";var b=-1;if(d.length>1)b=parseInt(d.slice(1),10);var c;switch(d.charAt(0)){case "d":case "D":c="n";if(b!==-1)e=g(""+e,b,true);if(this<0)e=-e;break;case "c":case "C":if(this<0)c=l[a.CurrencyNegativePattern];else c=m[a.CurrencyPositivePattern];if(b===-1)b=a.CurrencyDecimalDigits;e=i(Math.abs(this),b,a.CurrencyGroupSizes,a.CurrencyGroupSeparator,a.CurrencyDecimalSeparator);break;case "n":case "N":if(this<0)c=p[a.NumberNegativePattern];else c="n";if(b===-1)b=a.NumberDecimalDigits;e=i(Math.abs(this),b,a.NumberGroupSizes,a.NumberGroupSeparator,a.NumberDecimalSeparator);break;case "p":case "P":if(this<0)c=n[a.PercentNegativePattern];else c=o[a.PercentPositivePattern];if(b===-1)b=a.PercentDecimalDigits;e=i(Math.abs(this)*100,b,a.PercentGroupSizes,a.PercentGroupSeparator,a.PercentDecimalSeparator);break;default:throw Error.format(Sys.Res.formatBadFormatSpecifier)}var k=/n|\$|-|%/g,f="";for(;true;){var q=k.lastIndex,h=k.exec(c);f+=c.slice(q,h?h.index:c.length);if(!h)break;switch(h[0]){case "n":f+=e;break;case "$":f+=a.CurrencySymbol;break;case "-":f+=a.NegativeSign;break;case "%":f+=a.PercentSymbol}}return f};RegExp.__typeName="RegExp";RegExp.__class=true;Array.__typeName="Array";Array.__class=true;Array.add=Array.enqueue=function(a,b){a[a.length]=b};Array.addRange=function(a,b){a.push.apply(a,b)};Array.clear=function(a){a.length=0};Array.clone=function(a){if(a.length===1)return [a[0]];else return Array.apply(null,a)};Array.contains=function(a,b){return Array.indexOf(a,b)>=0};Array.dequeue=function(a){return a.shift()};Array.forEach=function(b,e,d){for(var a=0,f=b.length;a<f;a++){var c=b[a];if(typeof c!=="undefined")e.call(d,c,a,b)}};Array.indexOf=function(d,e,a){if(typeof e==="undefined")return -1;var c=d.length;if(c!==0){a=a-0;if(isNaN(a))a=0;else{if(isFinite(a))a=a-a%1;if(a<0)a=Math.max(0,c+a)}for(var b=a;b<c;b++)if(typeof d[b]!=="undefined"&&d[b]===e)return b}return -1};Array.insert=function(a,b,c){a.splice(b,0,c)};Array.parse=function(value){if(!value)return [];return eval(value)};Array.remove=function(b,c){var a=Array.indexOf(b,c);if(a>=0)b.splice(a,1);return a>=0};Array.removeAt=function(a,b){a.splice(b,1)};if(!window)this.window=this;window.Type=Function;Type.prototype.callBaseMethod=function(a,d,b){var c=this.getBaseMethod(a,d);if(!b)return c.apply(a);else return c.apply(a,b)};Type.prototype.getBaseMethod=function(d,c){var b=this.getBaseType();if(b){var a=b.prototype[c];return a instanceof Function?a:null}return null};Type.prototype.getBaseType=function(){return typeof this.__baseType==="undefined"?null:this.__baseType};Type.prototype.getInterfaces=function(){var a=[],b=this;while(b){var c=b.__interfaces;if(c)for(var d=0,f=c.length;d<f;d++){var e=c[d];if(!Array.contains(a,e))a[a.length]=e}b=b.__baseType}return a};Type.prototype.getName=function(){return typeof this.__typeName==="undefined"?"":this.__typeName};Type.prototype.implementsInterface=function(d){this.resolveInheritance();var c=d.getName(),a=this.__interfaceCache;if(a){var e=a[c];if(typeof e!=="undefined")return e}else a=this.__interfaceCache={};var b=this;while(b){var f=b.__interfaces;if(f)if(Array.indexOf(f,d)!==-1)return a[c]=true;b=b.__baseType}return a[c]=false};Type.prototype.inheritsFrom=function(b){this.resolveInheritance();var a=this.__baseType;while(a){if(a===b)return true;a=a.__baseType}return false};Type.prototype.initializeBase=function(a,b){this.resolveInheritance();if(this.__baseType)if(!b)this.__baseType.apply(a);else this.__baseType.apply(a,b);return a};Type.prototype.isImplementedBy=function(a){if(typeof a==="undefined"||a===null)return false;var b=Object.getType(a);return !!(b.implementsInterface&&b.implementsInterface(this))};Type.prototype.isInstanceOfType=function(b){if(typeof b==="undefined"||b===null)return false;if(b instanceof this)return true;var a=Object.getType(b);return !!(a===this)||a.inheritsFrom&&a.inheritsFrom(this)||a.implementsInterface&&a.implementsInterface(this)};Type.prototype.registerClass=function(c,b,d){this.prototype.constructor=this;this.__typeName=c;this.__class=true;if(b){this.__baseType=b;this.__basePrototypePending=true}Sys.__upperCaseTypes[c.toUpperCase()]=this;if(d){this.__interfaces=[];for(var a=2,f=arguments.length;a<f;a++){var e=arguments[a];this.__interfaces.push(e)}}return this};Type.prototype.registerInterface=function(a){Sys.__upperCaseTypes[a.toUpperCase()]=this;this.prototype.constructor=this;this.__typeName=a;this.__interface=true;return this};Type.prototype.resolveInheritance=function(){if(this.__basePrototypePending){var b=this.__baseType;b.resolveInheritance();for(var a in b.prototype){var c=b.prototype[a];if(!this.prototype[a])this.prototype[a]=c}delete this.__basePrototypePending}};Type.getRootNamespaces=function(){return Array.clone(Sys.__rootNamespaces)};Type.isClass=function(a){if(typeof a==="undefined"||a===null)return false;return !!a.__class};Type.isInterface=function(a){if(typeof a==="undefined"||a===null)return false;return !!a.__interface};Type.isNamespace=function(a){if(typeof a==="undefined"||a===null)return false;return !!a.__namespace};Type.parse=function(typeName,ns){var fn;if(ns){fn=Sys.__upperCaseTypes[ns.getName().toUpperCase()+"."+typeName.toUpperCase()];return fn||null}if(!typeName)return null;if(!Type.__htClasses)Type.__htClasses={};fn=Type.__htClasses[typeName];if(!fn){fn=eval(typeName);Type.__htClasses[typeName]=fn}return fn};Type.registerNamespace=function(f){var d=window,c=f.split(".");for(var b=0;b<c.length;b++){var e=c[b],a=d[e];if(!a){a=d[e]={__namespace:true,__typeName:c.slice(0,b+1).join(".")};if(b===0)Sys.__rootNamespaces[Sys.__rootNamespaces.length]=a;a.getName=function(){return this.__typeName}}d=a}};window.Sys={__namespace:true,__typeName:"Sys",getName:function(){return "Sys"},__upperCaseTypes:{}};Sys.__rootNamespaces=[Sys];Sys.IDisposable=function(){};Sys.IDisposable.prototype={};Sys.IDisposable.registerInterface("Sys.IDisposable");Sys.StringBuilder=function(a){this._parts=typeof a!=="undefined"&&a!==null&&a!==""?[a.toString()]:[];this._value={};this._len=0};Sys.StringBuilder.prototype={append:function(a){this._parts[this._parts.length]=a},appendLine:function(a){this._parts[this._parts.length]=typeof a==="undefined"||a===null||a===""?"\r\n":a+"\r\n"},clear:function(){this._parts=[];this._value={};this._len=0},isEmpty:function(){if(this._parts.length===0)return true;return this.toString()===""},toString:function(a){a=a||"";var b=this._parts;if(this._len!==b.length){this._value={};this._len=b.length}var d=this._value;if(typeof d[a]==="undefined"){if(a!=="")for(var c=0;c<b.length;)if(typeof b[c]==="undefined"||b[c]===""||b[c]===null)b.splice(c,1);else c++;d[a]=this._parts.join(a)}return d[a]}};Sys.StringBuilder.registerClass("Sys.StringBuilder");if(!window.XMLHttpRequest)window.XMLHttpRequest=function(){var b=["Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP"];for(var a=0,c=b.length;a<c;a++)try{return new ActiveXObject(b[a])}catch(d){}return null};Sys.Browser={};Sys.Browser.InternetExplorer={};Sys.Browser.Firefox={};Sys.Browser.Safari={};Sys.Browser.Opera={};Sys.Browser.agent=null;Sys.Browser.hasDebuggerStatement=false;Sys.Browser.name=navigator.appName;Sys.Browser.version=parseFloat(navigator.appVersion);Sys.Browser.documentMode=0;if(navigator.userAgent.indexOf(" MSIE ")>-1){Sys.Browser.agent=Sys.Browser.InternetExplorer;Sys.Browser.version=parseFloat(navigator.userAgent.match(/MSIE (\d+\.\d+)/)[1]);if(Sys.Browser.version>=8)if(document.documentMode>=7)Sys.Browser.documentMode=document.documentMode;Sys.Browser.hasDebuggerStatement=true}else if(navigator.userAgent.indexOf(" Firefox/")>-1){Sys.Browser.agent=Sys.Browser.Firefox;Sys.Browser.version=parseFloat(navigator.userAgent.match(/Firefox\/(\d+\.\d+)/)[1]);Sys.Browser.name="Firefox";Sys.Browser.hasDebuggerStatement=true}else if(navigator.userAgent.indexOf(" AppleWebKit/")>-1){Sys.Browser.agent=Sys.Browser.Safari;Sys.Browser.version=parseFloat(navigator.userAgent.match(/AppleWebKit\/(\d+(\.\d+)?)/)[1]);Sys.Browser.name="Safari"}else if(navigator.userAgent.indexOf("Opera/")>-1)Sys.Browser.agent=Sys.Browser.Opera;Type.registerNamespace("Sys.UI");Sys._Debug=function(){};Sys._Debug.prototype={_appendConsole:function(a){if(typeof Debug!=="undefined"&&Debug.writeln)Debug.writeln(a);if(window.console&&window.console.log)window.console.log(a);if(window.opera)window.opera.postError(a);if(window.debugService)window.debugService.trace(a)},_appendTrace:function(b){var a=document.getElementById("TraceConsole");if(a&&a.tagName.toUpperCase()==="TEXTAREA")a.value+=b+"\n"},assert:function(c,a,b){if(!c){a=b&&this.assert.caller?String.format(Sys.Res.assertFailedCaller,a,this.assert.caller):String.format(Sys.Res.assertFailed,a);if(confirm(String.format(Sys.Res.breakIntoDebugger,a)))this.fail(a)}},clearTrace:function(){var a=document.getElementById("TraceConsole");if(a&&a.tagName.toUpperCase()==="TEXTAREA")a.value=""},fail:function(message){this._appendConsole(message);if(Sys.Browser.hasDebuggerStatement)eval("debugger")},trace:function(a){this._appendConsole(a);this._appendTrace(a)},traceDump:function(a,b){var c=this._traceDump(a,b,true)},_traceDump:function(a,c,f,b,d){c=c?c:"traceDump";b=b?b:"";if(a===null){this.trace(b+c+": null");return}switch(typeof a){case "undefined":this.trace(b+c+": Undefined");break;case "number":case "string":case "boolean":this.trace(b+c+": "+a);break;default:if(Date.isInstanceOfType(a)||RegExp.isInstanceOfType(a)){this.trace(b+c+": "+a.toString());break}if(!d)d=[];else if(Array.contains(d,a)){this.trace(b+c+": ...");return}Array.add(d,a);if(a==window||a===document||window.HTMLElement&&a instanceof HTMLElement||typeof a.nodeName==="string"){var k=a.tagName?a.tagName:"DomElement";if(a.id)k+=" - "+a.id;this.trace(b+c+" {"+k+"}")}else{var i=Object.getTypeName(a);this.trace(b+c+(typeof i==="string"?" {"+i+"}":""));if(b===""||f){b+="    ";var e,j,l,g,h;if(Array.isInstanceOfType(a)){j=a.length;for(e=0;e<j;e++)this._traceDump(a[e],"["+e+"]",f,b,d)}else for(g in a){h=a[g];if(!Function.isInstanceOfType(h))this._traceDump(h,g,f,b,d)}}}Array.remove(d,a)}}};Sys._Debug.registerClass("Sys._Debug");Sys.Debug=new Sys._Debug;Sys.Debug.isDebug=false;function Sys$Enum$parse(c,e){var a,b,i;if(e){a=this.__lowerCaseValues;if(!a){this.__lowerCaseValues=a={};var g=this.prototype;for(var f in g)a[f.toLowerCase()]=g[f]}}else a=this.prototype;if(!this.__flags){i=e?c.toLowerCase():c;b=a[i.trim()];if(typeof b!=="number")throw Error.argument("value",String.format(Sys.Res.enumInvalidValue,c,this.__typeName));return b}else{var h=(e?c.toLowerCase():c).split(","),j=0;for(var d=h.length-1;d>=0;d--){var k=h[d].trim();b=a[k];if(typeof b!=="number")throw Error.argument("value",String.format(Sys.Res.enumInvalidValue,c.split(",")[d].trim(),this.__typeName));j|=b}return j}}function Sys$Enum$toString(c){if(typeof c==="undefined"||c===null)return this.__string;var d=this.prototype,a;if(!this.__flags||c===0){for(a in d)if(d[a]===c)return a}else{var b=this.__sortedValues;if(!b){b=[];for(a in d)b[b.length]={key:a,value:d[a]};b.sort(function(a,b){return a.value-b.value});this.__sortedValues=b}var e=[],g=c;for(a=b.length-1;a>=0;a--){var h=b[a],f=h.value;if(f===0)continue;if((f&c)===f){e[e.length]=h.key;g-=f;if(g===0)break}}if(e.length&&g===0)return e.reverse().join(", ")}return ""}Type.prototype.registerEnum=function(b,c){Sys.__upperCaseTypes[b.toUpperCase()]=this;for(var a in this.prototype)this[a]=this.prototype[a];this.__typeName=b;this.parse=Sys$Enum$parse;this.__string=this.toString();this.toString=Sys$Enum$toString;this.__flags=c;this.__enum=true};Type.isEnum=function(a){if(typeof a==="undefined"||a===null)return false;return !!a.__enum};Type.isFlags=function(a){if(typeof a==="undefined"||a===null)return false;return !!a.__flags};Sys.EventHandlerList=function(){this._list={}};Sys.EventHandlerList.prototype={addHandler:function(b,a){Array.add(this._getEvent(b,true),a)},removeHandler:function(c,b){var a=this._getEvent(c);if(!a)return;Array.remove(a,b)},getHandler:function(b){var a=this._getEvent(b);if(!a||a.length===0)return null;a=Array.clone(a);return function(c,d){for(var b=0,e=a.length;b<e;b++)a[b](c,d)}},_getEvent:function(a,b){if(!this._list[a]){if(!b)return null;this._list[a]=[]}return this._list[a]}};Sys.EventHandlerList.registerClass("Sys.EventHandlerList");Sys.EventArgs=function(){};Sys.EventArgs.registerClass("Sys.EventArgs");Sys.EventArgs.Empty=new Sys.EventArgs;Sys.CancelEventArgs=function(){Sys.CancelEventArgs.initializeBase(this);this._cancel=false};Sys.CancelEventArgs.prototype={get_cancel:function(){return this._cancel},set_cancel:function(a){this._cancel=a}};Sys.CancelEventArgs.registerClass("Sys.CancelEventArgs",Sys.EventArgs);Sys.INotifyPropertyChange=function(){};Sys.INotifyPropertyChange.prototype={};Sys.INotifyPropertyChange.registerInterface("Sys.INotifyPropertyChange");Sys.PropertyChangedEventArgs=function(a){Sys.PropertyChangedEventArgs.initializeBase(this);this._propertyName=a};Sys.PropertyChangedEventArgs.prototype={get_propertyName:function(){return this._propertyName}};Sys.PropertyChangedEventArgs.registerClass("Sys.PropertyChangedEventArgs",Sys.EventArgs);Sys.INotifyDisposing=function(){};Sys.INotifyDisposing.prototype={};Sys.INotifyDisposing.registerInterface("Sys.INotifyDisposing");Sys.Component=function(){if(Sys.Application)Sys.Application.registerDisposableObject(this)};Sys.Component.prototype={_id:null,_initialized:false,_updating:false,get_events:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_id:function(){return this._id},set_id:function(a){this._id=a},get_isInitialized:function(){return this._initialized},get_isUpdating:function(){return this._updating},add_disposing:function(a){this.get_events().addHandler("disposing",a)},remove_disposing:function(a){this.get_events().removeHandler("disposing",a)},add_propertyChanged:function(a){this.get_events().addHandler("propertyChanged",a)},remove_propertyChanged:function(a){this.get_events().removeHandler("propertyChanged",a)},beginUpdate:function(){this._updating=true},dispose:function(){if(this._events){var a=this._events.getHandler("disposing");if(a)a(this,Sys.EventArgs.Empty)}delete this._events;Sys.Application.unregisterDisposableObject(this);Sys.Application.removeComponent(this)},endUpdate:function(){this._updating=false;if(!this._initialized)this.initialize();this.updated()},initialize:function(){this._initialized=true},raisePropertyChanged:function(b){if(!this._events)return;var a=this._events.getHandler("propertyChanged");if(a)a(this,new Sys.PropertyChangedEventArgs(b))},updated:function(){}};Sys.Component.registerClass("Sys.Component",null,Sys.IDisposable,Sys.INotifyPropertyChange,Sys.INotifyDisposing);function Sys$Component$_setProperties(a,i){var d,j=Object.getType(a),e=j===Object||j===Sys.UI.DomElement,h=Sys.Component.isInstanceOfType(a)&&!a.get_isUpdating();if(h)a.beginUpdate();for(var c in i){var b=i[c],f=e?null:a["get_"+c];if(e||typeof f!=="function"){var k=a[c];if(!b||typeof b!=="object"||e&&!k)a[c]=b;else Sys$Component$_setProperties(k,b)}else{var l=a["set_"+c];if(typeof l==="function")l.apply(a,[b]);else if(b instanceof Array){d=f.apply(a);for(var g=0,m=d.length,n=b.length;g<n;g++,m++)d[m]=b[g]}else if(typeof b==="object"&&Object.getType(b)===Object){d=f.apply(a);Sys$Component$_setProperties(d,b)}}}if(h)a.endUpdate()}function Sys$Component$_setReferences(c,b){for(var a in b){var e=c["set_"+a],d=$find(b[a]);e.apply(c,[d])}}var $create=Sys.Component.create=function(h,f,d,c,g){var a=g?new h(g):new h,b=Sys.Application,i=b.get_isCreatingComponents();a.beginUpdate();if(f)Sys$Component$_setProperties(a,f);if(d)for(var e in d)a["add_"+e](d[e]);if(a.get_id())b.addComponent(a);if(i){b._createdComponents[b._createdComponents.length]=a;if(c)b._addComponentToSecondPass(a,c);else a.endUpdate()}else{if(c)Sys$Component$_setReferences(a,c);a.endUpdate()}return a};Sys.UI.MouseButton=function(){throw Error.notImplemented()};Sys.UI.MouseButton.prototype={leftButton:0,middleButton:1,rightButton:2};Sys.UI.MouseButton.registerEnum("Sys.UI.MouseButton");Sys.UI.Key=function(){throw Error.notImplemented()};Sys.UI.Key.prototype={backspace:8,tab:9,enter:13,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,del:127};Sys.UI.Key.registerEnum("Sys.UI.Key");Sys.UI.Point=function(a,b){this.x=a;this.y=b};Sys.UI.Point.registerClass("Sys.UI.Point");Sys.UI.Bounds=function(c,d,b,a){this.x=c;this.y=d;this.height=a;this.width=b};Sys.UI.Bounds.registerClass("Sys.UI.Bounds");Sys.UI.DomEvent=function(e){var a=e,b=this.type=a.type.toLowerCase();this.rawEvent=a;this.altKey=a.altKey;if(typeof a.button!=="undefined")this.button=typeof a.which!=="undefined"?a.button:a.button===4?Sys.UI.MouseButton.middleButton:a.button===2?Sys.UI.MouseButton.rightButton:Sys.UI.MouseButton.leftButton;if(b==="keypress")this.charCode=a.charCode||a.keyCode;else if(a.keyCode&&a.keyCode===46)this.keyCode=127;else this.keyCode=a.keyCode;this.clientX=a.clientX;this.clientY=a.clientY;this.ctrlKey=a.ctrlKey;this.target=a.target?a.target:a.srcElement;if(!b.startsWith("key"))if(typeof a.offsetX!=="undefined"&&typeof a.offsetY!=="undefined"){this.offsetX=a.offsetX;this.offsetY=a.offsetY}else if(this.target&&this.target.nodeType!==3&&typeof a.clientX==="number"){var c=Sys.UI.DomElement.getLocation(this.target),d=Sys.UI.DomElement._getWindow(this.target);this.offsetX=(d.pageXOffset||0)+a.clientX-c.x;this.offsetY=(d.pageYOffset||0)+a.clientY-c.y}this.screenX=a.screenX;this.screenY=a.screenY;this.shiftKey=a.shiftKey};Sys.UI.DomEvent.prototype={preventDefault:function(){if(this.rawEvent.preventDefault)this.rawEvent.preventDefault();else if(window.event)this.rawEvent.returnValue=false},stopPropagation:function(){if(this.rawEvent.stopPropagation)this.rawEvent.stopPropagation();else if(window.event)this.rawEvent.cancelBubble=true}};Sys.UI.DomEvent.registerClass("Sys.UI.DomEvent");var $addHandler=Sys.UI.DomEvent.addHandler=function(a,d,e){if(!a._events)a._events={};var c=a._events[d];if(!c)a._events[d]=c=[];var b;if(a.addEventListener){b=function(b){return e.call(a,new Sys.UI.DomEvent(b))};a.addEventListener(d,b,false)}else if(a.attachEvent){b=function(){var b={};try{b=Sys.UI.DomElement._getWindow(a).event}catch(c){}return e.call(a,new Sys.UI.DomEvent(b))};a.attachEvent("on"+d,b)}c[c.length]={handler:e,browserHandler:b}},$addHandlers=Sys.UI.DomEvent.addHandlers=function(e,d,c){for(var b in d){var a=d[b];if(c)a=Function.createDelegate(c,a);$addHandler(e,b,a)}},$clearHandlers=Sys.UI.DomEvent.clearHandlers=function(a){if(a._events){var e=a._events;for(var b in e){var d=e[b];for(var c=d.length-1;c>=0;c--)$removeHandler(a,b,d[c].handler)}a._events=null}},$removeHandler=Sys.UI.DomEvent.removeHandler=function(a,e,f){var d=null,c=a._events[e];for(var b=0,g=c.length;b<g;b++)if(c[b].handler===f){d=c[b].browserHandler;break}if(a.removeEventListener)a.removeEventListener(e,d,false);else if(a.detachEvent)a.detachEvent("on"+e,d);c.splice(b,1)};Sys.UI.DomElement=function(){};Sys.UI.DomElement.registerClass("Sys.UI.DomElement");Sys.UI.DomElement.addCssClass=function(a,b){if(!Sys.UI.DomElement.containsCssClass(a,b))if(a.className==="")a.className=b;else a.className+=" "+b};Sys.UI.DomElement.containsCssClass=function(b,a){return Array.contains(b.className.split(" "),a)};Sys.UI.DomElement.getBounds=function(a){var b=Sys.UI.DomElement.getLocation(a);return new Sys.UI.Bounds(b.x,b.y,a.offsetWidth||0,a.offsetHeight||0)};var $get=Sys.UI.DomElement.getElementById=function(f,e){if(!e)return document.getElementById(f);if(e.getElementById)return e.getElementById(f);var c=[],d=e.childNodes;for(var b=0;b<d.length;b++){var a=d[b];if(a.nodeType==1)c[c.length]=a}while(c.length){a=c.shift();if(a.id==f)return a;d=a.childNodes;for(b=0;b<d.length;b++){a=d[b];if(a.nodeType==1)c[c.length]=a}}return null};switch(Sys.Browser.agent){case Sys.Browser.InternetExplorer:Sys.UI.DomElement.getLocation=function(a){if(a.self||a.nodeType===9)return new Sys.UI.Point(0,0);var b=a.getBoundingClientRect();if(!b)return new Sys.UI.Point(0,0);var d=a.ownerDocument.documentElement,e=b.left-2+d.scrollLeft,f=b.top-2+d.scrollTop;try{var c=a.ownerDocument.parentWindow.frameElement||null;if(c){var g=c.frameBorder==="0"||c.frameBorder==="no"?2:0;e+=g;f+=g}}catch(h){}return new Sys.UI.Point(e,f)};break;case Sys.Browser.Safari:Sys.UI.DomElement.getLocation=function(c){if(c.window&&c.window===c||c.nodeType===9)return new Sys.UI.Point(0,0);var f=0,g=0,j=null,e=null,b;for(var a=c;a;j=a,(e=b,a=a.offsetParent)){b=Sys.UI.DomElement._getCurrentStyle(a);var d=a.tagName?a.tagName.toUpperCase():null;if((a.offsetLeft||a.offsetTop)&&(d!=="BODY"||(!e||e.position!=="absolute"))){f+=a.offsetLeft;g+=a.offsetTop}}b=Sys.UI.DomElement._getCurrentStyle(c);var h=b?b.position:null;if(!h||h!=="absolute")for(var a=c.parentNode;a;a=a.parentNode){d=a.tagName?a.tagName.toUpperCase():null;if(d!=="BODY"&&d!=="HTML"&&(a.scrollLeft||a.scrollTop)){f-=a.scrollLeft||0;g-=a.scrollTop||0}b=Sys.UI.DomElement._getCurrentStyle(a);var i=b?b.position:null;if(i&&i==="absolute")break}return new Sys.UI.Point(f,g)};break;case Sys.Browser.Opera:Sys.UI.DomElement.getLocation=function(b){if(b.window&&b.window===b||b.nodeType===9)return new Sys.UI.Point(0,0);var d=0,e=0,i=null;for(var a=b;a;i=a,a=a.offsetParent){var f=a.tagName;d+=a.offsetLeft||0;e+=a.offsetTop||0}var g=b.style.position,c=g&&g!=="static";for(var a=b.parentNode;a;a=a.parentNode){f=a.tagName?a.tagName.toUpperCase():null;if(f!=="BODY"&&f!=="HTML"&&(a.scrollLeft||a.scrollTop)&&(c&&(a.style.overflow==="scroll"||a.style.overflow==="auto"))){d-=a.scrollLeft||0;e-=a.scrollTop||0}var h=a&&a.style?a.style.position:null;c=c||h&&h!=="static"}return new Sys.UI.Point(d,e)};break;default:Sys.UI.DomElement.getLocation=function(d){if(d.window&&d.window===d||d.nodeType===9)return new Sys.UI.Point(0,0);var e=0,f=0,i=null,g=null,b=null;for(var a=d;a;i=a,(g=b,a=a.offsetParent)){var c=a.tagName?a.tagName.toUpperCase():null;b=Sys.UI.DomElement._getCurrentStyle(a);if((a.offsetLeft||a.offsetTop)&&!(c==="BODY"&&(!g||g.position!=="absolute"))){e+=a.offsetLeft;f+=a.offsetTop}if(i!==null&&b){if(c!=="TABLE"&&c!=="TD"&&c!=="HTML"){e+=parseInt(b.borderLeftWidth)||0;f+=parseInt(b.borderTopWidth)||0}if(c==="TABLE"&&(b.position==="relative"||b.position==="absolute")){e+=parseInt(b.marginLeft)||0;f+=parseInt(b.marginTop)||0}}}b=Sys.UI.DomElement._getCurrentStyle(d);var h=b?b.position:null;if(!h||h!=="absolute")for(var a=d.parentNode;a;a=a.parentNode){c=a.tagName?a.tagName.toUpperCase():null;if(c!=="BODY"&&c!=="HTML"&&(a.scrollLeft||a.scrollTop)){e-=a.scrollLeft||0;f-=a.scrollTop||0;b=Sys.UI.DomElement._getCurrentStyle(a);if(b){e+=parseInt(b.borderLeftWidth)||0;f+=parseInt(b.borderTopWidth)||0}}}return new Sys.UI.Point(e,f)}}Sys.UI.DomElement.removeCssClass=function(d,c){var a=" "+d.className+" ",b=a.indexOf(" "+c+" ");if(b>=0)d.className=(a.substr(0,b)+" "+a.substring(b+c.length+1,a.length)).trim()};Sys.UI.DomElement.setLocation=function(b,c,d){var a=b.style;a.position="absolute";a.left=c+"px";a.top=d+"px"};Sys.UI.DomElement.toggleCssClass=function(b,a){if(Sys.UI.DomElement.containsCssClass(b,a))Sys.UI.DomElement.removeCssClass(b,a);else Sys.UI.DomElement.addCssClass(b,a)};Sys.UI.DomElement.getVisibilityMode=function(a){return a._visibilityMode===Sys.UI.VisibilityMode.hide?Sys.UI.VisibilityMode.hide:Sys.UI.VisibilityMode.collapse};Sys.UI.DomElement.setVisibilityMode=function(a,b){Sys.UI.DomElement._ensureOldDisplayMode(a);if(a._visibilityMode!==b){a._visibilityMode=b;if(Sys.UI.DomElement.getVisible(a)===false)if(a._visibilityMode===Sys.UI.VisibilityMode.hide)a.style.display=a._oldDisplayMode;else a.style.display="none";a._visibilityMode=b}};Sys.UI.DomElement.getVisible=function(b){var a=b.currentStyle||Sys.UI.DomElement._getCurrentStyle(b);if(!a)return true;return a.visibility!=="hidden"&&a.display!=="none"};Sys.UI.DomElement.setVisible=function(a,b){if(b!==Sys.UI.DomElement.getVisible(a)){Sys.UI.DomElement._ensureOldDisplayMode(a);a.style.visibility=b?"visible":"hidden";if(b||a._visibilityMode===Sys.UI.VisibilityMode.hide)a.style.display=a._oldDisplayMode;else a.style.display="none"}};Sys.UI.DomElement._ensureOldDisplayMode=function(a){if(!a._oldDisplayMode){var b=a.currentStyle||Sys.UI.DomElement._getCurrentStyle(a);a._oldDisplayMode=b?b.display:null;if(!a._oldDisplayMode||a._oldDisplayMode==="none")switch(a.tagName.toUpperCase()){case "DIV":case "P":case "ADDRESS":case "BLOCKQUOTE":case "BODY":case "COL":case "COLGROUP":case "DD":case "DL":case "DT":case "FIELDSET":case "FORM":case "H1":case "H2":case "H3":case "H4":case "H5":case "H6":case "HR":case "IFRAME":case "LEGEND":case "OL":case "PRE":case "TABLE":case "TD":case "TH":case "TR":case "UL":a._oldDisplayMode="block";break;case "LI":a._oldDisplayMode="list-item";break;default:a._oldDisplayMode="inline"}}};Sys.UI.DomElement._getWindow=function(a){var b=a.ownerDocument||a.document||a;return b.defaultView||b.parentWindow};Sys.UI.DomElement._getCurrentStyle=function(a){if(a.nodeType===3)return null;var c=Sys.UI.DomElement._getWindow(a);if(a.documentElement)a=a.documentElement;var b=c&&a!==c&&c.getComputedStyle?c.getComputedStyle(a,null):a.currentStyle||a.style;if(!b&&Sys.Browser.agent===Sys.Browser.Safari&&a.style){var g=a.style.display,f=a.style.position;a.style.position="absolute";a.style.display="block";var e=c.getComputedStyle(a,null);a.style.display=g;a.style.position=f;b={};for(var d in e)b[d]=e[d];b.display="none"}return b};Sys.IContainer=function(){};Sys.IContainer.prototype={};Sys.IContainer.registerInterface("Sys.IContainer");Sys._ScriptLoader=function(){this._scriptsToLoad=null;this._sessions=[];this._scriptLoadedDelegate=Function.createDelegate(this,this._scriptLoadedHandler)};Sys._ScriptLoader.prototype={dispose:function(){this._stopSession();this._loading=false;if(this._events)delete this._events;this._sessions=null;this._currentSession=null;this._scriptLoadedDelegate=null},loadScripts:function(d,b,c,a){var e={allScriptsLoadedCallback:b,scriptLoadFailedCallback:c,scriptLoadTimeoutCallback:a,scriptsToLoad:this._scriptsToLoad,scriptTimeout:d};this._scriptsToLoad=null;this._sessions[this._sessions.length]=e;if(!this._loading)this._nextSession()},notifyScriptLoaded:function(){if(!this._loading)return;this._currentTask._notified++;if(Sys.Browser.agent===Sys.Browser.Safari)if(this._currentTask._notified===1)window.setTimeout(Function.createDelegate(this,function(){this._scriptLoadedHandler(this._currentTask.get_scriptElement(),true)}),0)},queueCustomScriptTag:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,a)},queueScriptBlock:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,{text:a})},queueScriptReference:function(a){if(!this._scriptsToLoad)this._scriptsToLoad=[];Array.add(this._scriptsToLoad,{src:a})},_createScriptElement:function(c){var a=document.createElement("script");a.type="text/javascript";for(var b in c)a[b]=c[b];return a},_loadScriptsInternal:function(){var b=this._currentSession;if(b.scriptsToLoad&&b.scriptsToLoad.length>0){var c=Array.dequeue(b.scriptsToLoad),a=this._createScriptElement(c);if(a.text&&Sys.Browser.agent===Sys.Browser.Safari){a.innerHTML=a.text;delete a.text}if(typeof c.src==="string"){this._currentTask=new Sys._ScriptLoaderTask(a,this._scriptLoadedDelegate);this._currentTask.execute()}else{document.getElementsByTagName("head")[0].appendChild(a);Sys._ScriptLoader._clearScript(a);this._loadScriptsInternal()}}else{this._stopSession();var d=b.allScriptsLoadedCallback;if(d)d(this);this._nextSession()}},_nextSession:function(){if(this._sessions.length===0){this._loading=false;this._currentSession=null;return}this._loading=true;var a=Array.dequeue(this._sessions);this._currentSession=a;if(a.scriptTimeout>0)this._timeoutCookie=window.setTimeout(Function.createDelegate(this,this._scriptLoadTimeoutHandler),a.scriptTimeout*1000);this._loadScriptsInternal()},_raiseError:function(a){var c=this._currentSession.scriptLoadFailedCallback,b=this._currentTask.get_scriptElement();this._stopSession();if(c){c(this,b,a);this._nextSession()}else{this._loading=false;throw Sys._ScriptLoader._errorScriptLoadFailed(b.src,a)}},_scriptLoadedHandler:function(a,b){if(b&&this._currentTask._notified)if(this._currentTask._notified>1)this._raiseError(true);else{Array.add(Sys._ScriptLoader._getLoadedScripts(),a.src);this._currentTask.dispose();this._currentTask=null;this._loadScriptsInternal()}else this._raiseError(false)},_scriptLoadTimeoutHandler:function(){var a=this._currentSession.scriptLoadTimeoutCallback;this._stopSession();if(a)a(this);this._nextSession()},_stopSession:function(){if(this._timeoutCookie){window.clearTimeout(this._timeoutCookie);this._timeoutCookie=null}if(this._currentTask){this._currentTask.dispose();this._currentTask=null}}};Sys._ScriptLoader.registerClass("Sys._ScriptLoader",null,Sys.IDisposable);Sys._ScriptLoader.getInstance=function(){var a=Sys._ScriptLoader._activeInstance;if(!a)a=Sys._ScriptLoader._activeInstance=new Sys._ScriptLoader;return a};Sys._ScriptLoader.isScriptLoaded=function(b){var a=document.createElement("script");a.src=b;return Array.contains(Sys._ScriptLoader._getLoadedScripts(),a.src)};Sys._ScriptLoader.readLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts){var b=Sys._ScriptLoader._referencedScripts=[],c=document.getElementsByTagName("script");for(i=c.length-1;i>=0;i--){var d=c[i],a=d.src;if(a.length)if(!Array.contains(b,a))Array.add(b,a)}}};Sys._ScriptLoader._clearScript=function(a){if(!Sys.Debug.isDebug)a.parentNode.removeChild(a)};Sys._ScriptLoader._errorScriptLoadFailed=function(b,d){var a;if(d)a=Sys.Res.scriptLoadMultipleCallbacks;else a=Sys.Res.scriptLoadFailed;var e="Sys.ScriptLoadFailedException: "+String.format(a,b),c=Error.create(e,{name:"Sys.ScriptLoadFailedException","scriptUrl":b});c.popStackFrame();return c};Sys._ScriptLoader._getLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts){Sys._ScriptLoader._referencedScripts=[];Sys._ScriptLoader.readLoadedScripts()}return Sys._ScriptLoader._referencedScripts};Sys._ScriptLoaderTask=function(b,a){this._scriptElement=b;this._completedCallback=a;this._notified=0};Sys._ScriptLoaderTask.prototype={get_scriptElement:function(){return this._scriptElement},dispose:function(){if(this._disposed)return;this._disposed=true;this._removeScriptElementHandlers();Sys._ScriptLoader._clearScript(this._scriptElement);this._scriptElement=null},execute:function(){this._addScriptElementHandlers();document.getElementsByTagName("head")[0].appendChild(this._scriptElement)},_addScriptElementHandlers:function(){this._scriptLoadDelegate=Function.createDelegate(this,this._scriptLoadHandler);if(Sys.Browser.agent!==Sys.Browser.InternetExplorer){this._scriptElement.readyState="loaded";$addHandler(this._scriptElement,"load",this._scriptLoadDelegate)}else $addHandler(this._scriptElement,"readystatechange",this._scriptLoadDelegate);if(this._scriptElement.addEventListener){this._scriptErrorDelegate=Function.createDelegate(this,this._scriptErrorHandler);this._scriptElement.addEventListener("error",this._scriptErrorDelegate,false)}},_removeScriptElementHandlers:function(){if(this._scriptLoadDelegate){var a=this.get_scriptElement();if(Sys.Browser.agent!==Sys.Browser.InternetExplorer)$removeHandler(a,"load",this._scriptLoadDelegate);else $removeHandler(a,"readystatechange",this._scriptLoadDelegate);if(this._scriptErrorDelegate){this._scriptElement.removeEventListener("error",this._scriptErrorDelegate,false);this._scriptErrorDelegate=null}this._scriptLoadDelegate=null}},_scriptErrorHandler:function(){if(this._disposed)return;this._completedCallback(this.get_scriptElement(),false)},_scriptLoadHandler:function(){if(this._disposed)return;var a=this.get_scriptElement();if(a.readyState!=="loaded"&&a.readyState!=="complete")return;var b=this;window.setTimeout(function(){b._completedCallback(a,true)},0)}};Sys._ScriptLoaderTask.registerClass("Sys._ScriptLoaderTask",null,Sys.IDisposable);Sys.ApplicationLoadEventArgs=function(b,a){Sys.ApplicationLoadEventArgs.initializeBase(this);this._components=b;this._isPartialLoad=a};Sys.ApplicationLoadEventArgs.prototype={get_components:function(){return this._components},get_isPartialLoad:function(){return this._isPartialLoad}};Sys.ApplicationLoadEventArgs.registerClass("Sys.ApplicationLoadEventArgs",Sys.EventArgs);Sys.HistoryEventArgs=function(a){Sys.HistoryEventArgs.initializeBase(this);this._state=a};Sys.HistoryEventArgs.prototype={get_state:function(){return this._state}};Sys.HistoryEventArgs.registerClass("Sys.HistoryEventArgs",Sys.EventArgs);Sys._Application=function(){Sys._Application.initializeBase(this);this._disposableObjects=[];this._components={};this._createdComponents=[];this._secondPassComponents=[];this._appLoadHandler=null;this._beginRequestHandler=null;this._clientId=null;this._currentEntry="";this._endRequestHandler=null;this._history=null;this._enableHistory=false;this._historyFrame=null;this._historyInitialized=false;this._historyInitialLength=0;this._historyLength=0;this._historyPointIsNew=false;this._ignoreTimer=false;this._initialState=null;this._state={};this._timerCookie=0;this._timerHandler=null;this._uniqueId=null;this._unloadHandlerDelegate=Function.createDelegate(this,this._unloadHandler);this._loadHandlerDelegate=Function.createDelegate(this,this._loadHandler);Sys.UI.DomEvent.addHandler(window,"unload",this._unloadHandlerDelegate);Sys.UI.DomEvent.addHandler(window,"load",this._loadHandlerDelegate)};Sys._Application.prototype={_creatingComponents:false,_disposing:false,get_isCreatingComponents:function(){return this._creatingComponents},get_stateString:function(){var a=window.location.hash;if(this._isSafari2()){var b=this._getHistory();if(b)a=b[window.history.length-this._historyInitialLength]}if(a.length>0&&a.charAt(0)==="#")a=a.substring(1);if(Sys.Browser.agent===Sys.Browser.Firefox)a=this._serializeState(this._deserializeState(a,true));return a},get_enableHistory:function(){return this._enableHistory},set_enableHistory:function(a){this._enableHistory=a},add_init:function(a){if(this._initialized)a(this,Sys.EventArgs.Empty);else this.get_events().addHandler("init",a)},remove_init:function(a){this.get_events().removeHandler("init",a)},add_load:function(a){this.get_events().addHandler("load",a)},remove_load:function(a){this.get_events().removeHandler("load",a)},add_navigate:function(a){this.get_events().addHandler("navigate",a)},remove_navigate:function(a){this.get_events().removeHandler("navigate",a)},add_unload:function(a){this.get_events().addHandler("unload",a)},remove_unload:function(a){this.get_events().removeHandler("unload",a)},addComponent:function(a){this._components[a.get_id()]=a},addHistoryPoint:function(c,f){this._ensureHistory();var b=this._state;for(var a in c){var d=c[a];if(d===null){if(typeof b[a]!=="undefined")delete b[a]}else b[a]=d}var e=this._serializeState(b);this._historyPointIsNew=true;this._setState(e,f);this._raiseNavigate()},beginCreateComponents:function(){this._creatingComponents=true},dispose:function(){if(!this._disposing){this._disposing=true;if(this._timerCookie){window.clearTimeout(this._timerCookie);delete this._timerCookie}if(this._endRequestHandler){Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(this._endRequestHandler);delete this._endRequestHandler}if(this._beginRequestHandler){Sys.WebForms.PageRequestManager.getInstance().remove_beginRequest(this._beginRequestHandler);delete this._beginRequestHandler}if(window.pageUnload)window.pageUnload(this,Sys.EventArgs.Empty);var c=this.get_events().getHandler("unload");if(c)c(this,Sys.EventArgs.Empty);var b=Array.clone(this._disposableObjects);for(var a=0,e=b.length;a<e;a++)b[a].dispose();Array.clear(this._disposableObjects);Sys.UI.DomEvent.removeHandler(window,"unload",this._unloadHandlerDelegate);if(this._loadHandlerDelegate){Sys.UI.DomEvent.removeHandler(window,"load",this._loadHandlerDelegate);this._loadHandlerDelegate=null}var d=Sys._ScriptLoader.getInstance();if(d)d.dispose();Sys._Application.callBaseMethod(this,"dispose")}},endCreateComponents:function(){var b=this._secondPassComponents;for(var a=0,d=b.length;a<d;a++){var c=b[a].component;Sys$Component$_setReferences(c,b[a].references);c.endUpdate()}this._secondPassComponents=[];this._creatingComponents=false},findComponent:function(b,a){return a?Sys.IContainer.isInstanceOfType(a)?a.findComponent(b):a[b]||null:Sys.Application._components[b]||null},getComponents:function(){var a=[],b=this._components;for(var c in b)a[a.length]=b[c];return a},initialize:function(){if(!this._initialized&&!this._initializing){this._initializing=true;window.setTimeout(Function.createDelegate(this,this._doInitialize),0)}},notifyScriptLoaded:function(){var a=Sys._ScriptLoader.getInstance();if(a)a.notifyScriptLoaded()},registerDisposableObject:function(a){if(!this._disposing)this._disposableObjects[this._disposableObjects.length]=a},raiseLoad:function(){var b=this.get_events().getHandler("load"),a=new Sys.ApplicationLoadEventArgs(Array.clone(this._createdComponents),!this._initializing);if(b)b(this,a);if(window.pageLoad)window.pageLoad(this,a);this._createdComponents=[]},removeComponent:function(b){var a=b.get_id();if(a)delete this._components[a]},setServerId:function(a,b){this._clientId=a;this._uniqueId=b},setServerState:function(a){this._ensureHistory();this._state.__s=a;this._updateHiddenField(a)},unregisterDisposableObject:function(a){if(!this._disposing)Array.remove(this._disposableObjects,a)},_addComponentToSecondPass:function(b,a){this._secondPassComponents[this._secondPassComponents.length]={component:b,references:a}},_deserializeState:function(a,i){var e={};a=a||"";var b=a.indexOf("&&");if(b!==-1&&b+2<a.length){e.__s=a.substr(b+2);a=a.substr(0,b)}var g=a.split("&");for(var f=0,k=g.length;f<k;f++){var d=g[f],c=d.indexOf("=");if(c!==-1&&c+1<d.length){var j=d.substr(0,c),h=d.substr(c+1);e[j]=i?h:decodeURIComponent(h)}}return e},_doInitialize:function(){Sys._Application.callBaseMethod(this,"initialize");var b=this.get_events().getHandler("init");if(b){this.beginCreateComponents();b(this,Sys.EventArgs.Empty);this.endCreateComponents()}if(Sys.WebForms){this._beginRequestHandler=Function.createDelegate(this,this._onPageRequestManagerBeginRequest);Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(this._beginRequestHandler);this._endRequestHandler=Function.createDelegate(this,this._onPageRequestManagerEndRequest);Sys.WebForms.PageRequestManager.getInstance().add_endRequest(this._endRequestHandler)}var a=this.get_stateString();if(a!==this._currentEntry)this._navigate(a);this.raiseLoad();this._initializing=false},_enableHistoryInScriptManager:function(){this._enableHistory=true},_ensureHistory:function(){if(!this._historyInitialized&&this._enableHistory){if(Sys.Browser.agent===Sys.Browser.InternetExplorer&&Sys.Browser.documentMode<8){this._historyFrame=document.getElementById("__historyFrame");this._ignoreIFrame=true}if(this._isSafari2()){var a=document.getElementById("__history");this._setHistory([window.location.hash]);this._historyInitialLength=window.history.length}this._timerHandler=Function.createDelegate(this,this._onIdle);this._timerCookie=window.setTimeout(this._timerHandler,100);try{this._initialState=this._deserializeState(this.get_stateString())}catch(b){}this._historyInitialized=true}},_getHistory:function(){var a=document.getElementById("__history");if(!a)return "";var b=a.value;return b?Sys.Serialization.JavaScriptSerializer.deserialize(b,true):""},_isSafari2:function(){return Sys.Browser.agent===Sys.Browser.Safari&&Sys.Browser.version<=419.3},_loadHandler:function(){if(this._loadHandlerDelegate){Sys.UI.DomEvent.removeHandler(window,"load",this._loadHandlerDelegate);this._loadHandlerDelegate=null}this.initialize()},_navigate:function(c){this._ensureHistory();var b=this._deserializeState(c);if(this._uniqueId){var d=this._state.__s||"",a=b.__s||"";if(a!==d){this._updateHiddenField(a);__doPostBack(this._uniqueId,a);this._state=b;return}}this._setState(c);this._state=b;this._raiseNavigate()},_onIdle:function(){delete this._timerCookie;var a=this.get_stateString();if(a!==this._currentEntry){if(!this._ignoreTimer){this._historyPointIsNew=false;this._navigate(a);this._historyLength=window.history.length}}else this._ignoreTimer=false;this._timerCookie=window.setTimeout(this._timerHandler,100)},_onIFrameLoad:function(a){this._ensureHistory();if(!this._ignoreIFrame){this._historyPointIsNew=false;this._navigate(a)}this._ignoreIFrame=false},_onPageRequestManagerBeginRequest:function(){this._ignoreTimer=true},_onPageRequestManagerEndRequest:function(e,d){var b=d.get_dataItems()[this._clientId],a=document.getElementById("__EVENTTARGET");if(a&&a.value===this._uniqueId)a.value="";if(typeof b!=="undefined"){this.setServerState(b);this._historyPointIsNew=true}else this._ignoreTimer=false;var c=this._serializeState(this._state);if(c!==this._currentEntry){this._ignoreTimer=true;this._setState(c);this._raiseNavigate()}},_raiseNavigate:function(){var c=this.get_events().getHandler("navigate"),b={};for(var a in this._state)if(a!=="__s")b[a]=this._state[a];var d=new Sys.HistoryEventArgs(b);if(c)c(this,d)},_serializeState:function(d){var b=[];for(var a in d){var e=d[a];if(a==="__s")var c=e;else b[b.length]=a+"="+encodeURIComponent(e)}return b.join("&")+(c?"&&"+c:"")},_setHistory:function(b){var a=document.getElementById("__history");if(a)a.value=Sys.Serialization.JavaScriptSerializer.serialize(b)},_setState:function(a,c){a=a||"";if(a!==this._currentEntry){if(window.theForm){var e=window.theForm.action,f=e.indexOf("#");window.theForm.action=(f!==-1?e.substring(0,f):e)+"#"+a}if(this._historyFrame&&this._historyPointIsNew){this._ignoreIFrame=true;this._historyPointIsNew=false;var d=this._historyFrame.contentWindow.document;d.open("javascript:'<html></html>'");d.write("<html><head><title>"+(c||document.title)+"</title><scri"+'pt type="text/javascript">parent.Sys.Application._onIFrameLoad(\''+a+"');</scri"+"pt></head><body></body></html>");d.close()}this._ignoreTimer=false;var h=this.get_stateString();this._currentEntry=a;if(a!==h){if(this._isSafari2()){var g=this._getHistory();g[window.history.length-this._historyInitialLength+1]=a;this._setHistory(g);this._historyLength=window.history.length+1;var b=document.createElement("form");b.method="get";b.action="#"+a;document.appendChild(b);b.submit();document.removeChild(b)}else window.location.hash=a;if(typeof c!=="undefined"&&c!==null)document.title=c}}},_unloadHandler:function(){this.dispose()},_updateHiddenField:function(b){if(this._clientId){var a=document.getElementById(this._clientId);if(a)a.value=b}}};Sys._Application.registerClass("Sys._Application",Sys.Component,Sys.IContainer);Sys.Application=new Sys._Application;var $find=Sys.Application.findComponent;Type.registerNamespace("Sys.Net");Sys.Net.WebRequestExecutor=function(){this._webRequest=null;this._resultObject=null};Sys.Net.WebRequestExecutor.prototype={get_webRequest:function(){return this._webRequest},_set_webRequest:function(a){this._webRequest=a},get_started:function(){throw Error.notImplemented()},get_responseAvailable:function(){throw Error.notImplemented()},get_timedOut:function(){throw Error.notImplemented()},get_aborted:function(){throw Error.notImplemented()},get_responseData:function(){throw Error.notImplemented()},get_statusCode:function(){throw Error.notImplemented()},get_statusText:function(){throw Error.notImplemented()},get_xml:function(){throw Error.notImplemented()},get_object:function(){if(!this._resultObject)this._resultObject=Sys.Serialization.JavaScriptSerializer.deserialize(this.get_responseData());return this._resultObject},executeRequest:function(){throw Error.notImplemented()},abort:function(){throw Error.notImplemented()},getResponseHeader:function(){throw Error.notImplemented()},getAllResponseHeaders:function(){throw Error.notImplemented()}};Sys.Net.WebRequestExecutor.registerClass("Sys.Net.WebRequestExecutor");Sys.Net.XMLDOM=function(d){if(!window.DOMParser){var c=["Msxml2.DOMDocument.3.0","Msxml2.DOMDocument"];for(var b=0,f=c.length;b<f;b++)try{var a=new ActiveXObject(c[b]);a.async=false;a.loadXML(d);a.setProperty("SelectionLanguage","XPath");return a}catch(g){}}else try{var e=new window.DOMParser;return e.parseFromString(d,"text/xml")}catch(g){}return null};Sys.Net.XMLHttpExecutor=function(){Sys.Net.XMLHttpExecutor.initializeBase(this);var a=this;this._xmlHttpRequest=null;this._webRequest=null;this._responseAvailable=false;this._timedOut=false;this._timer=null;this._aborted=false;this._started=false;this._onReadyStateChange=function(){if(a._xmlHttpRequest.readyState===4){try{if(typeof a._xmlHttpRequest.status==="undefined")return}catch(b){return}a._clearTimer();a._responseAvailable=true;try{a._webRequest.completed(Sys.EventArgs.Empty)}finally{if(a._xmlHttpRequest!=null){a._xmlHttpRequest.onreadystatechange=Function.emptyMethod;a._xmlHttpRequest=null}}}};this._clearTimer=function(){if(a._timer!=null){window.clearTimeout(a._timer);a._timer=null}};this._onTimeout=function(){if(!a._responseAvailable){a._clearTimer();a._timedOut=true;a._xmlHttpRequest.onreadystatechange=Function.emptyMethod;a._xmlHttpRequest.abort();a._webRequest.completed(Sys.EventArgs.Empty);a._xmlHttpRequest=null}}};Sys.Net.XMLHttpExecutor.prototype={get_timedOut:function(){return this._timedOut},get_started:function(){return this._started},get_responseAvailable:function(){return this._responseAvailable},get_aborted:function(){return this._aborted},executeRequest:function(){this._webRequest=this.get_webRequest();var c=this._webRequest.get_body(),a=this._webRequest.get_headers();this._xmlHttpRequest=new XMLHttpRequest;this._xmlHttpRequest.onreadystatechange=this._onReadyStateChange;var e=this._webRequest.get_httpVerb();this._xmlHttpRequest.open(e,this._webRequest.getResolvedUrl(),true);if(a)for(var b in a){var f=a[b];if(typeof f!=="function")this._xmlHttpRequest.setRequestHeader(b,f)}if(e.toLowerCase()==="post"){if(a===null||!a["Content-Type"])this._xmlHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8");if(!c)c=""}var d=this._webRequest.get_timeout();if(d>0)this._timer=window.setTimeout(Function.createDelegate(this,this._onTimeout),d);this._xmlHttpRequest.send(c);this._started=true},getResponseHeader:function(b){var a;try{a=this._xmlHttpRequest.getResponseHeader(b)}catch(c){}if(!a)a="";return a},getAllResponseHeaders:function(){return this._xmlHttpRequest.getAllResponseHeaders()},get_responseData:function(){return this._xmlHttpRequest.responseText},get_statusCode:function(){var a=0;try{a=this._xmlHttpRequest.status}catch(b){}return a},get_statusText:function(){return this._xmlHttpRequest.statusText},get_xml:function(){var a=this._xmlHttpRequest.responseXML;if(!a||!a.documentElement){a=Sys.Net.XMLDOM(this._xmlHttpRequest.responseText);if(!a||!a.documentElement)return null}else if(navigator.userAgent.indexOf("MSIE")!==-1)a.setProperty("SelectionLanguage","XPath");if(a.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml"&&a.documentElement.tagName==="parsererror")return null;if(a.documentElement.firstChild&&a.documentElement.firstChild.tagName==="parsererror")return null;return a},abort:function(){if(this._aborted||this._responseAvailable||this._timedOut)return;this._aborted=true;this._clearTimer();if(this._xmlHttpRequest&&!this._responseAvailable){this._xmlHttpRequest.onreadystatechange=Function.emptyMethod;this._xmlHttpRequest.abort();this._xmlHttpRequest=null;this._webRequest.completed(Sys.EventArgs.Empty)}}};Sys.Net.XMLHttpExecutor.registerClass("Sys.Net.XMLHttpExecutor",Sys.Net.WebRequestExecutor);Sys.Net._WebRequestManager=function(){this._defaultTimeout=0;this._defaultExecutorType="Sys.Net.XMLHttpExecutor"};Sys.Net._WebRequestManager.prototype={add_invokingRequest:function(a){this._get_eventHandlerList().addHandler("invokingRequest",a)},remove_invokingRequest:function(a){this._get_eventHandlerList().removeHandler("invokingRequest",a)},add_completedRequest:function(a){this._get_eventHandlerList().addHandler("completedRequest",a)},remove_completedRequest:function(a){this._get_eventHandlerList().removeHandler("completedRequest",a)},_get_eventHandlerList:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_defaultTimeout:function(){return this._defaultTimeout},set_defaultTimeout:function(a){this._defaultTimeout=a},get_defaultExecutorType:function(){return this._defaultExecutorType},set_defaultExecutorType:function(a){this._defaultExecutorType=a},executeRequest:function(webRequest){var executor=webRequest.get_executor();if(!executor){var failed=false;try{var executorType=eval(this._defaultExecutorType);executor=new executorType}catch(a){failed=true}webRequest.set_executor(executor)}if(executor.get_aborted())return;var evArgs=new Sys.Net.NetworkRequestEventArgs(webRequest),handler=this._get_eventHandlerList().getHandler("invokingRequest");if(handler)handler(this,evArgs);if(!evArgs.get_cancel())executor.executeRequest()}};Sys.Net._WebRequestManager.registerClass("Sys.Net._WebRequestManager");Sys.Net.WebRequestManager=new Sys.Net._WebRequestManager;Sys.Net.NetworkRequestEventArgs=function(a){Sys.Net.NetworkRequestEventArgs.initializeBase(this);this._webRequest=a};Sys.Net.NetworkRequestEventArgs.prototype={get_webRequest:function(){return this._webRequest}};Sys.Net.NetworkRequestEventArgs.registerClass("Sys.Net.NetworkRequestEventArgs",Sys.CancelEventArgs);Sys.Net.WebRequest=function(){this._url="";this._headers={};this._body=null;this._userContext=null;this._httpVerb=null;this._executor=null;this._invokeCalled=false;this._timeout=0};Sys.Net.WebRequest.prototype={add_completed:function(a){this._get_eventHandlerList().addHandler("completed",a)},remove_completed:function(a){this._get_eventHandlerList().removeHandler("completed",a)},completed:function(b){var a=Sys.Net.WebRequestManager._get_eventHandlerList().getHandler("completedRequest");if(a)a(this._executor,b);a=this._get_eventHandlerList().getHandler("completed");if(a)a(this._executor,b)},_get_eventHandlerList:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_url:function(){return this._url},set_url:function(a){this._url=a},get_headers:function(){return this._headers},get_httpVerb:function(){if(this._httpVerb===null){if(this._body===null)return "GET";return "POST"}return this._httpVerb},set_httpVerb:function(a){this._httpVerb=a},get_body:function(){return this._body},set_body:function(a){this._body=a},get_userContext:function(){return this._userContext},set_userContext:function(a){this._userContext=a},get_executor:function(){return this._executor},set_executor:function(a){this._executor=a;this._executor._set_webRequest(this)},get_timeout:function(){if(this._timeout===0)return Sys.Net.WebRequestManager.get_defaultTimeout();return this._timeout},set_timeout:function(a){this._timeout=a},getResolvedUrl:function(){return Sys.Net.WebRequest._resolveUrl(this._url)},invoke:function(){Sys.Net.WebRequestManager.executeRequest(this);this._invokeCalled=true}};Sys.Net.WebRequest._resolveUrl=function(b,a){if(b&&b.indexOf("://")!==-1)return b;if(!a||a.length===0){var d=document.getElementsByTagName("base")[0];if(d&&d.href&&d.href.length>0)a=d.href;else a=document.URL}var c=a.indexOf("?");if(c!==-1)a=a.substr(0,c);c=a.indexOf("#");if(c!==-1)a=a.substr(0,c);a=a.substr(0,a.lastIndexOf("/")+1);if(!b||b.length===0)return a;if(b.charAt(0)==="/"){var e=a.indexOf("://"),g=a.indexOf("/",e+3);return a.substr(0,g)+b}else{var f=a.lastIndexOf("/");return a.substr(0,f+1)+b}};Sys.Net.WebRequest._createQueryString=function(d,b){if(!b)b=encodeURIComponent;var a=new Sys.StringBuilder,f=0;for(var c in d){var e=d[c];if(typeof e==="function")continue;var g=Sys.Serialization.JavaScriptSerializer.serialize(e);if(f!==0)a.append("&");a.append(c);a.append("=");a.append(b(g));f++}return a.toString()};Sys.Net.WebRequest._createUrl=function(a,b){if(!b)return a;var d=Sys.Net.WebRequest._createQueryString(b);if(d.length>0){var c="?";if(a&&a.indexOf("?")!==-1)c="&";return a+c+d}else return a};Sys.Net.WebRequest.registerClass("Sys.Net.WebRequest");Sys.Net.WebServiceProxy=function(){};Sys.Net.WebServiceProxy.prototype={get_timeout:function(){return this._timeout},set_timeout:function(a){if(a<0)throw Error.argumentOutOfRange("value",a,Sys.Res.invalidTimeout);this._timeout=a},get_defaultUserContext:function(){return this._userContext},set_defaultUserContext:function(a){this._userContext=a},get_defaultSucceededCallback:function(){return this._succeeded},set_defaultSucceededCallback:function(a){this._succeeded=a},get_defaultFailedCallback:function(){return this._failed},set_defaultFailedCallback:function(a){this._failed=a},get_path:function(){return this._path},set_path:function(a){this._path=a},_invoke:function(d,e,g,f,c,b,a){if(c===null||typeof c==="undefined")c=this.get_defaultSucceededCallback();if(b===null||typeof b==="undefined")b=this.get_defaultFailedCallback();if(a===null||typeof a==="undefined")a=this.get_defaultUserContext();return Sys.Net.WebServiceProxy.invoke(d,e,g,f,c,b,a,this.get_timeout())}};Sys.Net.WebServiceProxy.registerClass("Sys.Net.WebServiceProxy");Sys.Net.WebServiceProxy.invoke=function(k,a,j,d,i,c,f,h){var b=new Sys.Net.WebRequest;b.get_headers()["Content-Type"]="application/json; charset=utf-8";if(!d)d={};var g=d;if(!j||!g)g={};b.set_url(Sys.Net.WebRequest._createUrl(k+"/"+encodeURIComponent(a),g));var e=null;if(!j){e=Sys.Serialization.JavaScriptSerializer.serialize(d);if(e==="{}")e=""}b.set_body(e);b.add_completed(l);if(h&&h>0)b.set_timeout(h);b.invoke();function l(d){if(d.get_responseAvailable()){var g=d.get_statusCode(),b=null;try{var e=d.getResponseHeader("Content-Type");if(e.startsWith("application/json"))b=d.get_object();else if(e.startsWith("text/xml"))b=d.get_xml();else b=d.get_responseData()}catch(m){}var k=d.getResponseHeader("jsonerror"),h=k==="true";if(h){if(b)b=new Sys.Net.WebServiceError(false,b.Message,b.StackTrace,b.ExceptionType)}else if(e.startsWith("application/json"))b=b.d;if(g<200||g>=300||h){if(c){if(!b||!h)b=new Sys.Net.WebServiceError(false,String.format(Sys.Res.webServiceFailedNoMsg,a),"","");b._statusCode=g;c(b,f,a)}}else if(i)i(b,f,a)}else{var j;if(d.get_timedOut())j=String.format(Sys.Res.webServiceTimedOut,a);else j=String.format(Sys.Res.webServiceFailedNoMsg,a);if(c)c(new Sys.Net.WebServiceError(d.get_timedOut(),j,"",""),f,a)}}return b};Sys.Net.WebServiceProxy._generateTypedConstructor=function(a){return function(b){if(b)for(var c in b)this[c]=b[c];this.__type=a}};Sys.Net.WebServiceError=function(c,d,b,a){this._timedOut=c;this._message=d;this._stackTrace=b;this._exceptionType=a;this._statusCode=-1};Sys.Net.WebServiceError.prototype={get_timedOut:function(){return this._timedOut},get_statusCode:function(){return this._statusCode},get_message:function(){return this._message},get_stackTrace:function(){return this._stackTrace},get_exceptionType:function(){return this._exceptionType}};Sys.Net.WebServiceError.registerClass("Sys.Net.WebServiceError");Type.registerNamespace("Sys.Services");Sys.Services._ProfileService=function(){Sys.Services._ProfileService.initializeBase(this);this.properties={}};Sys.Services._ProfileService.DefaultWebServicePath="";Sys.Services._ProfileService.prototype={_defaultLoadCompletedCallback:null,_defaultSaveCompletedCallback:null,_path:"",_timeout:0,get_defaultLoadCompletedCallback:function(){return this._defaultLoadCompletedCallback},set_defaultLoadCompletedCallback:function(a){this._defaultLoadCompletedCallback=a},get_defaultSaveCompletedCallback:function(){return this._defaultSaveCompletedCallback},set_defaultSaveCompletedCallback:function(a){this._defaultSaveCompletedCallback=a},get_path:function(){return this._path||""},load:function(c,d,e,f){var b,a;if(!c){a="GetAllPropertiesForCurrentUser";b={authenticatedUserOnly:false}}else{a="GetPropertiesForCurrentUser";b={properties:this._clonePropertyNames(c),authenticatedUserOnly:false}}this._invoke(this._get_path(),a,false,b,Function.createDelegate(this,this._onLoadComplete),Function.createDelegate(this,this._onLoadFailed),[d,e,f])},save:function(d,b,c,e){var a=this._flattenProperties(d,this.properties);this._invoke(this._get_path(),"SetPropertiesForCurrentUser",false,{values:a.value,authenticatedUserOnly:false},Function.createDelegate(this,this._onSaveComplete),Function.createDelegate(this,this._onSaveFailed),[b,c,e,a.count])},_clonePropertyNames:function(e){var c=[],d={};for(var b=0;b<e.length;b++){var a=e[b];if(!d[a]){Array.add(c,a);d[a]=true}}return c},_flattenProperties:function(a,i,j){var b={},e,d,g=0;if(a&&a.length===0)return {value:b,count:0};for(var c in i){e=i[c];d=j?j+"."+c:c;if(Sys.Services.ProfileGroup.isInstanceOfType(e)){var k=this._flattenProperties(a,e,d),h=k.value;g+=k.count;for(var f in h){var l=h[f];b[f]=l}}else if(!a||Array.indexOf(a,d)!==-1){b[d]=e;g++}}return {value:b,count:g}},_get_path:function(){var a=this.get_path();if(!a.length)a=Sys.Services._ProfileService.DefaultWebServicePath;if(!a||!a.length)throw Error.invalidOperation(Sys.Res.servicePathNotSet);return a},_onLoadComplete:function(a,e,g){if(typeof a!=="object")throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,g,"Object"));var c=this._unflattenProperties(a);for(var b in c)this.properties[b]=c[b];var d=e[0]||this.get_defaultLoadCompletedCallback()||this.get_defaultSucceededCallback();if(d){var f=e[2]||this.get_defaultUserContext();d(a.length,f,"Sys.Services.ProfileService.load")}},_onLoadFailed:function(d,b){var a=b[1]||this.get_defaultFailedCallback();if(a){var c=b[2]||this.get_defaultUserContext();a(d,c,"Sys.Services.ProfileService.load")}},_onSaveComplete:function(a,b,f){var c=b[3];if(a!==null)if(a instanceof Array)c-=a.length;else if(typeof a==="number")c=a;else throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,f,"Array"));var d=b[0]||this.get_defaultSaveCompletedCallback()||this.get_defaultSucceededCallback();if(d){var e=b[2]||this.get_defaultUserContext();d(c,e,"Sys.Services.ProfileService.save")}},_onSaveFailed:function(d,b){var a=b[1]||this.get_defaultFailedCallback();if(a){var c=b[2]||this.get_defaultUserContext();a(d,c,"Sys.Services.ProfileService.save")}},_unflattenProperties:function(e){var c={},d,f,h=0;for(var a in e){h++;f=e[a];d=a.indexOf(".");if(d!==-1){var g=a.substr(0,d);a=a.substr(d+1);var b=c[g];if(!b||!Sys.Services.ProfileGroup.isInstanceOfType(b)){b=new Sys.Services.ProfileGroup;c[g]=b}b[a]=f}else c[a]=f}e.length=h;return c}};Sys.Services._ProfileService.registerClass("Sys.Services._ProfileService",Sys.Net.WebServiceProxy);Sys.Services.ProfileService=new Sys.Services._ProfileService;Sys.Services.ProfileGroup=function(a){if(a)for(var b in a)this[b]=a[b]};Sys.Services.ProfileGroup.registerClass("Sys.Services.ProfileGroup");Sys.Services._AuthenticationService=function(){Sys.Services._AuthenticationService.initializeBase(this)};Sys.Services._AuthenticationService.DefaultWebServicePath="";Sys.Services._AuthenticationService.prototype={_defaultLoginCompletedCallback:null,_defaultLogoutCompletedCallback:null,_path:"",_timeout:0,_authenticated:false,get_defaultLoginCompletedCallback:function(){return this._defaultLoginCompletedCallback},set_defaultLoginCompletedCallback:function(a){this._defaultLoginCompletedCallback=a},get_defaultLogoutCompletedCallback:function(){return this._defaultLogoutCompletedCallback},set_defaultLogoutCompletedCallback:function(a){this._defaultLogoutCompletedCallback=a},get_isLoggedIn:function(){return this._authenticated},get_path:function(){return this._path||""},login:function(c,b,a,h,f,d,e,g){this._invoke(this._get_path(),"Login",false,{userName:c,password:b,createPersistentCookie:a},Function.createDelegate(this,this._onLoginComplete),Function.createDelegate(this,this._onLoginFailed),[c,b,a,h,f,d,e,g])},logout:function(c,a,b,d){this._invoke(this._get_path(),"Logout",false,{},Function.createDelegate(this,this._onLogoutComplete),Function.createDelegate(this,this._onLogoutFailed),[c,a,b,d])},_get_path:function(){var a=this.get_path();if(!a.length)a=Sys.Services._AuthenticationService.DefaultWebServicePath;if(!a||!a.length)throw Error.invalidOperation(Sys.Res.servicePathNotSet);return a},_onLoginComplete:function(e,c,f){if(typeof e!=="boolean")throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,f,"Boolean"));var b=c[4],d=c[7]||this.get_defaultUserContext(),a=c[5]||this.get_defaultLoginCompletedCallback()||this.get_defaultSucceededCallback();if(e){this._authenticated=true;if(a)a(true,d,"Sys.Services.AuthenticationService.login");if(typeof b!=="undefined"&&b!==null)window.location.href=b}else if(a)a(false,d,"Sys.Services.AuthenticationService.login")},_onLoginFailed:function(d,b){var a=b[6]||this.get_defaultFailedCallback();if(a){var c=b[7]||this.get_defaultUserContext();a(d,c,"Sys.Services.AuthenticationService.login")}},_onLogoutComplete:function(f,a,e){if(f!==null)throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,e,"null"));var b=a[0],d=a[3]||this.get_defaultUserContext(),c=a[1]||this.get_defaultLogoutCompletedCallback()||this.get_defaultSucceededCallback();this._authenticated=false;if(c)c(null,d,"Sys.Services.AuthenticationService.logout");if(!b)window.location.reload();else window.location.href=b},_onLogoutFailed:function(c,b){var a=b[2]||this.get_defaultFailedCallback();if(a)a(c,b[3],"Sys.Services.AuthenticationService.logout")},_setAuthenticated:function(a){this._authenticated=a}};Sys.Services._AuthenticationService.registerClass("Sys.Services._AuthenticationService",Sys.Net.WebServiceProxy);Sys.Services.AuthenticationService=new Sys.Services._AuthenticationService;Sys.Services._RoleService=function(){Sys.Services._RoleService.initializeBase(this);this._roles=[]};Sys.Services._RoleService.DefaultWebServicePath="";Sys.Services._RoleService.prototype={_defaultLoadCompletedCallback:null,_rolesIndex:null,_timeout:0,_path:"",get_defaultLoadCompletedCallback:function(){return this._defaultLoadCompletedCallback},set_defaultLoadCompletedCallback:function(a){this._defaultLoadCompletedCallback=a},get_path:function(){return this._path||""},get_roles:function(){return Array.clone(this._roles)},isUserInRole:function(a){var b=this._get_rolesIndex()[a.trim().toLowerCase()];return !!b},load:function(a,b,c){Sys.Net.WebServiceProxy.invoke(this._get_path(),"GetRolesForCurrentUser",false,{},Function.createDelegate(this,this._onLoadComplete),Function.createDelegate(this,this._onLoadFailed),[a,b,c],this.get_timeout())},_get_path:function(){var a=this.get_path();if(!a||!a.length)a=Sys.Services._RoleService.DefaultWebServicePath;if(!a||!a.length)throw Error.invalidOperation(Sys.Res.servicePathNotSet);return a},_get_rolesIndex:function(){if(!this._rolesIndex){var b={};for(var a=0;a<this._roles.length;a++)b[this._roles[a].toLowerCase()]=true;this._rolesIndex=b}return this._rolesIndex},_onLoadComplete:function(a,c,f){if(a&&!(a instanceof Array))throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,f,"Array"));this._roles=a;this._rolesIndex=null;var b=c[0]||this.get_defaultLoadCompletedCallback()||this.get_defaultSucceededCallback();if(b){var e=c[2]||this.get_defaultUserContext(),d=Array.clone(a);b(d,e,"Sys.Services.RoleService.load")}},_onLoadFailed:function(d,b){var a=b[1]||this.get_defaultFailedCallback();if(a){var c=b[2]||this.get_defaultUserContext();a(d,c,"Sys.Services.RoleService.load")}}};Sys.Services._RoleService.registerClass("Sys.Services._RoleService",Sys.Net.WebServiceProxy);Sys.Services.RoleService=new Sys.Services._RoleService;Type.registerNamespace("Sys.Serialization");Sys.Serialization.JavaScriptSerializer=function(){};Sys.Serialization.JavaScriptSerializer.registerClass("Sys.Serialization.JavaScriptSerializer");Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs=[];Sys.Serialization.JavaScriptSerializer._charsToEscape=[];Sys.Serialization.JavaScriptSerializer._dateRegEx=new RegExp('(^|[^\\\\])\\"\\\\/Date\\((-?[0-9]+)(?:[a-zA-Z]|(?:\\+|-)[0-9]{4})?\\)\\\\/\\"',"g");Sys.Serialization.JavaScriptSerializer._escapeChars={};Sys.Serialization.JavaScriptSerializer._escapeRegEx=new RegExp('["\\\\\\x00-\\x1F]',"i");Sys.Serialization.JavaScriptSerializer._escapeRegExGlobal=new RegExp('["\\\\\\x00-\\x1F]',"g");Sys.Serialization.JavaScriptSerializer._jsonRegEx=new RegExp("[^,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t]","g");Sys.Serialization.JavaScriptSerializer._jsonStringRegEx=new RegExp('"(\\\\.|[^"\\\\])*"',"g");Sys.Serialization.JavaScriptSerializer._serverTypeFieldName="__type";Sys.Serialization.JavaScriptSerializer._init=function(){var c=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000b","\\f","\\r","\\u000e","\\u000f","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001a","\\u001b","\\u001c","\\u001d","\\u001e","\\u001f"];Sys.Serialization.JavaScriptSerializer._charsToEscape[0]="\\";Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs["\\"]=new RegExp("\\\\","g");Sys.Serialization.JavaScriptSerializer._escapeChars["\\"]="\\\\";Sys.Serialization.JavaScriptSerializer._charsToEscape[1]='"';Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs['"']=new RegExp('"',"g");Sys.Serialization.JavaScriptSerializer._escapeChars['"']='\\"';for(var a=0;a<32;a++){var b=String.fromCharCode(a);Sys.Serialization.JavaScriptSerializer._charsToEscape[a+2]=b;Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs[b]=new RegExp(b,"g");Sys.Serialization.JavaScriptSerializer._escapeChars[b]=c[a]}};Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder=function(b,a){a.append(b.toString())};Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder=function(a,b){if(isFinite(a))b.append(String(a));else throw Error.invalidOperation(Sys.Res.cannotSerializeNonFiniteNumbers)};Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder=function(a,c){c.append('"');if(Sys.Serialization.JavaScriptSerializer._escapeRegEx.test(a)){if(Sys.Serialization.JavaScriptSerializer._charsToEscape.length===0)Sys.Serialization.JavaScriptSerializer._init();if(a.length<128)a=a.replace(Sys.Serialization.JavaScriptSerializer._escapeRegExGlobal,function(a){return Sys.Serialization.JavaScriptSerializer._escapeChars[a]});else for(var d=0;d<34;d++){var b=Sys.Serialization.JavaScriptSerializer._charsToEscape[d];if(a.indexOf(b)!==-1)if(Sys.Browser.agent===Sys.Browser.Opera||Sys.Browser.agent===Sys.Browser.FireFox)a=a.split(b).join(Sys.Serialization.JavaScriptSerializer._escapeChars[b]);else a=a.replace(Sys.Serialization.JavaScriptSerializer._charsToEscapeRegExs[b],Sys.Serialization.JavaScriptSerializer._escapeChars[b])}}c.append(a);c.append('"')};Sys.Serialization.JavaScriptSerializer._serializeWithBuilder=function(b,a,i,g){var c;switch(typeof b){case "object":if(b)if(Number.isInstanceOfType(b))Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder(b,a);else if(Boolean.isInstanceOfType(b))Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder(b,a);else if(String.isInstanceOfType(b))Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder(b,a);else if(Array.isInstanceOfType(b)){a.append("[");for(c=0;c<b.length;++c){if(c>0)a.append(",");Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(b[c],a,false,g)}a.append("]")}else{if(Date.isInstanceOfType(b)){a.append('"\\/Date(');a.append(b.getTime());a.append(')\\/"');break}var d=[],f=0;for(var e in b){if(e.startsWith("$"))continue;if(e===Sys.Serialization.JavaScriptSerializer._serverTypeFieldName&&f!==0){d[f++]=d[0];d[0]=e}else d[f++]=e}if(i)d.sort();a.append("{");var j=false;for(c=0;c<f;c++){var h=b[d[c]];if(typeof h!=="undefined"&&typeof h!=="function"){if(j)a.append(",");else j=true;Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(d[c],a,i,g);a.append(":");Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(h,a,i,g)}}a.append("}")}else a.append("null");break;case "number":Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder(b,a);break;case "string":Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder(b,a);break;case "boolean":Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder(b,a);break;default:a.append("null")}};Sys.Serialization.JavaScriptSerializer.serialize=function(b){var a=new Sys.StringBuilder;Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(b,a,false);return a.toString()};Sys.Serialization.JavaScriptSerializer.deserialize=function(data,secure){if(data.length===0)throw Error.argument("data",Sys.Res.cannotDeserializeEmptyString);try{var exp=data.replace(Sys.Serialization.JavaScriptSerializer._dateRegEx,"$1new Date($2)");if(secure&&Sys.Serialization.JavaScriptSerializer._jsonRegEx.test(exp.replace(Sys.Serialization.JavaScriptSerializer._jsonStringRegEx,"")))throw null;return eval("("+exp+")")}catch(a){throw Error.argument("data",Sys.Res.cannotDeserializeInvalidJson)}};Sys.CultureInfo=function(c,b,a){this.name=c;this.numberFormat=b;this.dateTimeFormat=a};Sys.CultureInfo.prototype={_getDateTimeFormats:function(){if(!this._dateTimeFormats){var a=this.dateTimeFormat;this._dateTimeFormats=[a.MonthDayPattern,a.YearMonthPattern,a.ShortDatePattern,a.ShortTimePattern,a.LongDatePattern,a.LongTimePattern,a.FullDateTimePattern,a.RFC1123Pattern,a.SortableDateTimePattern,a.UniversalSortableDateTimePattern]}return this._dateTimeFormats},_getMonthIndex:function(a){if(!this._upperMonths)this._upperMonths=this._toUpperArray(this.dateTimeFormat.MonthNames);return Array.indexOf(this._upperMonths,this._toUpper(a))},_getAbbrMonthIndex:function(a){if(!this._upperAbbrMonths)this._upperAbbrMonths=this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames);return Array.indexOf(this._upperAbbrMonths,this._toUpper(a))},_getDayIndex:function(a){if(!this._upperDays)this._upperDays=this._toUpperArray(this.dateTimeFormat.DayNames);return Array.indexOf(this._upperDays,this._toUpper(a))},_getAbbrDayIndex:function(a){if(!this._upperAbbrDays)this._upperAbbrDays=this._toUpperArray(this.dateTimeFormat.AbbreviatedDayNames);return Array.indexOf(this._upperAbbrDays,this._toUpper(a))},_toUpperArray:function(c){var b=[];for(var a=0,d=c.length;a<d;a++)b[a]=this._toUpper(c[a]);return b},_toUpper:function(a){return a.split("\u00a0").join(" ").toUpperCase()}};Sys.CultureInfo._parse=function(b){var a=Sys.Serialization.JavaScriptSerializer.deserialize(b);return new Sys.CultureInfo(a.name,a.numberFormat,a.dateTimeFormat)};Sys.CultureInfo.registerClass("Sys.CultureInfo");Sys.CultureInfo.InvariantCulture=Sys.CultureInfo._parse('{"name":"","numberFormat":{"CurrencyDecimalDigits":2,"CurrencyDecimalSeparator":".","IsReadOnly":true,"CurrencyGroupSizes":[3],"NumberGroupSizes":[3],"PercentGroupSizes":[3],"CurrencyGroupSeparator":",","CurrencySymbol":"\u00a4","NaNSymbol":"NaN","CurrencyNegativePattern":0,"NumberNegativePattern":1,"PercentPositivePattern":0,"PercentNegativePattern":0,"NegativeInfinitySymbol":"-Infinity","NegativeSign":"-","NumberDecimalDigits":2,"NumberDecimalSeparator":".","NumberGroupSeparator":",","CurrencyPositivePattern":0,"PositiveInfinitySymbol":"Infinity","PositiveSign":"+","PercentDecimalDigits":2,"PercentDecimalSeparator":".","PercentGroupSeparator":",","PercentSymbol":"%","PerMilleSymbol":"\u2030","NativeDigits":["0","1","2","3","4","5","6","7","8","9"],"DigitSubstitution":1},"dateTimeFormat":{"AMDesignator":"AM","Calendar":{"MinSupportedDateTime":"@-62135568000000@","MaxSupportedDateTime":"@253402300799999@","AlgorithmType":1,"CalendarType":1,"Eras":[1],"TwoDigitYearMax":2029,"IsReadOnly":true},"DateSeparator":"/","FirstDayOfWeek":0,"CalendarWeekRule":0,"FullDateTimePattern":"dddd, dd MMMM yyyy HH:mm:ss","LongDatePattern":"dddd, dd MMMM yyyy","LongTimePattern":"HH:mm:ss","MonthDayPattern":"MMMM dd","PMDesignator":"PM","RFC1123Pattern":"ddd, dd MMM yyyy HH\':\'mm\':\'ss \'GMT\'","ShortDatePattern":"MM/dd/yyyy","ShortTimePattern":"HH:mm","SortableDateTimePattern":"yyyy\'-\'MM\'-\'dd\'T\'HH\':\'mm\':\'ss","TimeSeparator":":","UniversalSortableDateTimePattern":"yyyy\'-\'MM\'-\'dd HH\':\'mm\':\'ss\'Z\'","YearMonthPattern":"yyyy MMMM","AbbreviatedDayNames":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"ShortestDayNames":["Su","Mo","Tu","We","Th","Fr","Sa"],"DayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"AbbreviatedMonthNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"IsReadOnly":true,"NativeCalendarName":"Gregorian Calendar","AbbreviatedMonthGenitiveNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthGenitiveNames":["January","February","March","April","May","June","July","August","September","October","November","December",""]}}');if(typeof __cultureInfo==="undefined")var __cultureInfo='{"name":"en-US","numberFormat":{"CurrencyDecimalDigits":2,"CurrencyDecimalSeparator":".","IsReadOnly":false,"CurrencyGroupSizes":[3],"NumberGroupSizes":[3],"PercentGroupSizes":[3],"CurrencyGroupSeparator":",","CurrencySymbol":"$","NaNSymbol":"NaN","CurrencyNegativePattern":0,"NumberNegativePattern":1,"PercentPositivePattern":0,"PercentNegativePattern":0,"NegativeInfinitySymbol":"-Infinity","NegativeSign":"-","NumberDecimalDigits":2,"NumberDecimalSeparator":".","NumberGroupSeparator":",","CurrencyPositivePattern":0,"PositiveInfinitySymbol":"Infinity","PositiveSign":"+","PercentDecimalDigits":2,"PercentDecimalSeparator":".","PercentGroupSeparator":",","PercentSymbol":"%","PerMilleSymbol":"\u2030","NativeDigits":["0","1","2","3","4","5","6","7","8","9"],"DigitSubstitution":1},"dateTimeFormat":{"AMDesignator":"AM","Calendar":{"MinSupportedDateTime":"@-62135568000000@","MaxSupportedDateTime":"@253402300799999@","AlgorithmType":1,"CalendarType":1,"Eras":[1],"TwoDigitYearMax":2029,"IsReadOnly":false},"DateSeparator":"/","FirstDayOfWeek":0,"CalendarWeekRule":0,"FullDateTimePattern":"dddd, MMMM dd, yyyy h:mm:ss tt","LongDatePattern":"dddd, MMMM dd, yyyy","LongTimePattern":"h:mm:ss tt","MonthDayPattern":"MMMM dd","PMDesignator":"PM","RFC1123Pattern":"ddd, dd MMM yyyy HH\':\'mm\':\'ss \'GMT\'","ShortDatePattern":"M/d/yyyy","ShortTimePattern":"h:mm tt","SortableDateTimePattern":"yyyy\'-\'MM\'-\'dd\'T\'HH\':\'mm\':\'ss","TimeSeparator":":","UniversalSortableDateTimePattern":"yyyy\'-\'MM\'-\'dd HH\':\'mm\':\'ss\'Z\'","YearMonthPattern":"MMMM, yyyy","AbbreviatedDayNames":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"ShortestDayNames":["Su","Mo","Tu","We","Th","Fr","Sa"],"DayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"AbbreviatedMonthNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthNames":["January","February","March","April","May","June","July","August","September","October","November","December",""],"IsReadOnly":false,"NativeCalendarName":"Gregorian Calendar","AbbreviatedMonthGenitiveNames":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""],"MonthGenitiveNames":["January","February","March","April","May","June","July","August","September","October","November","December",""]}}';Sys.CultureInfo.CurrentCulture=Sys.CultureInfo._parse(__cultureInfo);delete __cultureInfo;Sys.UI.Behavior=function(b){Sys.UI.Behavior.initializeBase(this);this._element=b;var a=b._behaviors;if(!a)b._behaviors=[this];else a[a.length]=this};Sys.UI.Behavior.prototype={_name:null,get_element:function(){return this._element},get_id:function(){var a=Sys.UI.Behavior.callBaseMethod(this,"get_id");if(a)return a;if(!this._element||!this._element.id)return "";return this._element.id+"$"+this.get_name()},get_name:function(){if(this._name)return this._name;var a=Object.getTypeName(this),b=a.lastIndexOf(".");if(b!=-1)a=a.substr(b+1);if(!this.get_isInitialized())this._name=a;return a},set_name:function(a){this._name=a},initialize:function(){Sys.UI.Behavior.callBaseMethod(this,"initialize");var a=this.get_name();if(a)this._element[a]=this},dispose:function(){Sys.UI.Behavior.callBaseMethod(this,"dispose");if(this._element){var a=this.get_name();if(a)this._element[a]=null;Array.remove(this._element._behaviors,this);delete this._element}}};Sys.UI.Behavior.registerClass("Sys.UI.Behavior",Sys.Component);Sys.UI.Behavior.getBehaviorByName=function(b,c){var a=b[c];return a&&Sys.UI.Behavior.isInstanceOfType(a)?a:null};Sys.UI.Behavior.getBehaviors=function(a){if(!a._behaviors)return [];return Array.clone(a._behaviors)};Sys.UI.Behavior.getBehaviorsByType=function(d,e){var a=d._behaviors,c=[];if(a)for(var b=0,f=a.length;b<f;b++)if(e.isInstanceOfType(a[b]))c[c.length]=a[b];return c};Sys.UI.VisibilityMode=function(){throw Error.notImplemented()};Sys.UI.VisibilityMode.prototype={hide:0,collapse:1};Sys.UI.VisibilityMode.registerEnum("Sys.UI.VisibilityMode");Sys.UI.Control=function(a){Sys.UI.Control.initializeBase(this);this._element=a;a.control=this};Sys.UI.Control.prototype={_parent:null,_visibilityMode:Sys.UI.VisibilityMode.hide,get_element:function(){return this._element},get_id:function(){if(!this._element)return "";return this._element.id},set_id:function(){throw Error.invalidOperation(Sys.Res.cantSetId)},get_parent:function(){if(this._parent)return this._parent;if(!this._element)return null;var a=this._element.parentNode;while(a){if(a.control)return a.control;a=a.parentNode}return null},set_parent:function(a){this._parent=a},get_visibilityMode:function(){return Sys.UI.DomElement.getVisibilityMode(this._element)},set_visibilityMode:function(a){Sys.UI.DomElement.setVisibilityMode(this._element,a)},get_visible:function(){return Sys.UI.DomElement.getVisible(this._element)},set_visible:function(a){Sys.UI.DomElement.setVisible(this._element,a)},addCssClass:function(a){Sys.UI.DomElement.addCssClass(this._element,a)},dispose:function(){Sys.UI.Control.callBaseMethod(this,"dispose");if(this._element){this._element.control=undefined;delete this._element}if(this._parent)delete this._parent},onBubbleEvent:function(){return false},raiseBubbleEvent:function(b,c){var a=this.get_parent();while(a){if(a.onBubbleEvent(b,c))return;a=a.get_parent()}},removeCssClass:function(a){Sys.UI.DomElement.removeCssClass(this._element,a)},toggleCssClass:function(a){Sys.UI.DomElement.toggleCssClass(this._element,a)}};Sys.UI.Control.registerClass("Sys.UI.Control",Sys.Component);
Type.registerNamespace('Sys');Sys.Res={"argumentInteger":"Value must be an integer.","scriptLoadMultipleCallbacks":"The script \u0027{0}\u0027 contains multiple calls to Sys.Application.notifyScriptLoaded(). Only one is allowed.","invokeCalledTwice":"Cannot call invoke more than once.","webServiceFailed":"The server method \u0027{0}\u0027 failed with the following error: {1}","webServiceInvalidJsonWrapper":"The server method \u0027{0}\u0027 returned invalid data. The \u0027d\u0027 property is missing from the JSON wrapper.","argumentType":"Object cannot be converted to the required type.","argumentNull":"Value cannot be null.","controlCantSetId":"The id property can\u0027t be set on a control.","formatBadFormatSpecifier":"Format specifier was invalid.","webServiceFailedNoMsg":"The server method \u0027{0}\u0027 failed.","argumentDomElement":"Value must be a DOM element.","invalidExecutorType":"Could not create a valid Sys.Net.WebRequestExecutor from: {0}.","cannotCallBeforeResponse":"Cannot call {0} when responseAvailable is false.","actualValue":"Actual value was {0}.","enumInvalidValue":"\u0027{0}\u0027 is not a valid value for enum {1}.","scriptLoadFailed":"The script \u0027{0}\u0027 could not be loaded.","parameterCount":"Parameter count mismatch.","cannotDeserializeEmptyString":"Cannot deserialize empty string.","formatInvalidString":"Input string was not in a correct format.","invalidTimeout":"Value must be greater than or equal to zero.","cannotAbortBeforeStart":"Cannot abort when executor has not started.","argument":"Value does not fall within the expected range.","cannotDeserializeInvalidJson":"Cannot deserialize. The data does not correspond to valid JSON.","invalidHttpVerb":"httpVerb cannot be set to an empty or null string.","nullWebRequest":"Cannot call executeRequest with a null webRequest.","eventHandlerInvalid":"Handler was not added through the Sys.UI.DomEvent.addHandler method.","cannotSerializeNonFiniteNumbers":"Cannot serialize non finite numbers.","argumentUndefined":"Value cannot be undefined.","webServiceInvalidReturnType":"The server method \u0027{0}\u0027 returned an invalid type. Expected type: {1}","servicePathNotSet":"The path to the web service has not been set.","argumentTypeWithTypes":"Object of type \u0027{0}\u0027 cannot be converted to type \u0027{1}\u0027.","cannotCallOnceStarted":"Cannot call {0} once started.","badBaseUrl1":"Base URL does not contain ://.","badBaseUrl2":"Base URL does not contain another /.","badBaseUrl3":"Cannot find last / in base URL.","setExecutorAfterActive":"Cannot set executor after it has become active.","paramName":"Parameter name: {0}","cannotCallOutsideHandler":"Cannot call {0} outside of a completed event handler.","cannotSerializeObjectWithCycle":"Cannot serialize object with cyclic reference within child properties.","format":"One of the identified items was in an invalid format.","assertFailedCaller":"Assertion Failed: {0}\r\nat {1}","argumentOutOfRange":"Specified argument was out of the range of valid values.","webServiceTimedOut":"The server method \u0027{0}\u0027 timed out.","notImplemented":"The method or operation is not implemented.","assertFailed":"Assertion Failed: {0}","invalidOperation":"Operation is not valid due to the current state of the object.","breakIntoDebugger":"{0}\r\n\r\nBreak into debugger?"};
//----------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------
// MicrosoftAjaxWebForms.js
Type.registerNamespace("Sys.WebForms");Sys.WebForms.BeginRequestEventArgs=function(b,a){Sys.WebForms.BeginRequestEventArgs.initializeBase(this);this._request=b;this._postBackElement=a};Sys.WebForms.BeginRequestEventArgs.prototype={get_postBackElement:function(){return this._postBackElement},get_request:function(){return this._request}};Sys.WebForms.BeginRequestEventArgs.registerClass("Sys.WebForms.BeginRequestEventArgs",Sys.EventArgs);Sys.WebForms.EndRequestEventArgs=function(c,a,b){Sys.WebForms.EndRequestEventArgs.initializeBase(this);this._errorHandled=false;this._error=c;this._dataItems=a||{};this._response=b};Sys.WebForms.EndRequestEventArgs.prototype={get_dataItems:function(){return this._dataItems},get_error:function(){return this._error},get_errorHandled:function(){return this._errorHandled},set_errorHandled:function(a){this._errorHandled=a},get_response:function(){return this._response}};Sys.WebForms.EndRequestEventArgs.registerClass("Sys.WebForms.EndRequestEventArgs",Sys.EventArgs);Sys.WebForms.InitializeRequestEventArgs=function(b,a){Sys.WebForms.InitializeRequestEventArgs.initializeBase(this);this._request=b;this._postBackElement=a};Sys.WebForms.InitializeRequestEventArgs.prototype={get_postBackElement:function(){return this._postBackElement},get_request:function(){return this._request}};Sys.WebForms.InitializeRequestEventArgs.registerClass("Sys.WebForms.InitializeRequestEventArgs",Sys.CancelEventArgs);Sys.WebForms.PageLoadedEventArgs=function(b,a,c){Sys.WebForms.PageLoadedEventArgs.initializeBase(this);this._panelsUpdated=b;this._panelsCreated=a;this._dataItems=c||{}};Sys.WebForms.PageLoadedEventArgs.prototype={get_dataItems:function(){return this._dataItems},get_panelsCreated:function(){return this._panelsCreated},get_panelsUpdated:function(){return this._panelsUpdated}};Sys.WebForms.PageLoadedEventArgs.registerClass("Sys.WebForms.PageLoadedEventArgs",Sys.EventArgs);Sys.WebForms.PageLoadingEventArgs=function(b,a,c){Sys.WebForms.PageLoadingEventArgs.initializeBase(this);this._panelsUpdating=b;this._panelsDeleting=a;this._dataItems=c||{}};Sys.WebForms.PageLoadingEventArgs.prototype={get_dataItems:function(){return this._dataItems},get_panelsDeleting:function(){return this._panelsDeleting},get_panelsUpdating:function(){return this._panelsUpdating}};Sys.WebForms.PageLoadingEventArgs.registerClass("Sys.WebForms.PageLoadingEventArgs",Sys.EventArgs);Sys.WebForms.PageRequestManager=function(){this._form=null;this._activeDefaultButton=null;this._activeDefaultButtonClicked=false;this._updatePanelIDs=null;this._updatePanelClientIDs=null;this._updatePanelHasChildrenAsTriggers=null;this._asyncPostBackControlIDs=null;this._asyncPostBackControlClientIDs=null;this._postBackControlIDs=null;this._postBackControlClientIDs=null;this._scriptManagerID=null;this._pageLoadedHandler=null;this._additionalInput=null;this._onsubmit=null;this._onSubmitStatements=[];this._originalDoPostBack=null;this._originalDoPostBackWithOptions=null;this._originalFireDefaultButton=null;this._originalDoCallback=null;this._isCrossPost=false;this._postBackSettings=null;this._request=null;this._onFormSubmitHandler=null;this._onFormElementClickHandler=null;this._onWindowUnloadHandler=null;this._asyncPostBackTimeout=null;this._controlIDToFocus=null;this._scrollPosition=null;this._processingRequest=false;this._scriptDisposes={};this._transientFields=["__VIEWSTATEENCRYPTED","__VIEWSTATEFIELDCOUNT"]};Sys.WebForms.PageRequestManager.prototype={_get_eventHandlerList:function(){if(!this._events)this._events=new Sys.EventHandlerList;return this._events},get_isInAsyncPostBack:function(){return this._request!==null},add_beginRequest:function(a){this._get_eventHandlerList().addHandler("beginRequest",a)},remove_beginRequest:function(a){this._get_eventHandlerList().removeHandler("beginRequest",a)},add_endRequest:function(a){this._get_eventHandlerList().addHandler("endRequest",a)},remove_endRequest:function(a){this._get_eventHandlerList().removeHandler("endRequest",a)},add_initializeRequest:function(a){this._get_eventHandlerList().addHandler("initializeRequest",a)},remove_initializeRequest:function(a){this._get_eventHandlerList().removeHandler("initializeRequest",a)},add_pageLoaded:function(a){this._get_eventHandlerList().addHandler("pageLoaded",a)},remove_pageLoaded:function(a){this._get_eventHandlerList().removeHandler("pageLoaded",a)},add_pageLoading:function(a){this._get_eventHandlerList().addHandler("pageLoading",a)},remove_pageLoading:function(a){this._get_eventHandlerList().removeHandler("pageLoading",a)},abortPostBack:function(){if(!this._processingRequest&&this._request){this._request.get_executor().abort();this._request=null}},_cancelPendingCallbacks:function(){for(var a=0,e=window.__pendingCallbacks.length;a<e;a++){var c=window.__pendingCallbacks[a];if(c){if(!c.async)window.__synchronousCallBackIndex=-1;window.__pendingCallbacks[a]=null;var d="__CALLBACKFRAME"+a,b=document.getElementById(d);if(b)b.parentNode.removeChild(b)}}},_commitControls:function(a,b){if(a){this._updatePanelIDs=a.updatePanelIDs;this._updatePanelClientIDs=a.updatePanelClientIDs;this._updatePanelHasChildrenAsTriggers=a.updatePanelHasChildrenAsTriggers;this._asyncPostBackControlIDs=a.asyncPostBackControlIDs;this._asyncPostBackControlClientIDs=a.asyncPostBackControlClientIDs;this._postBackControlIDs=a.postBackControlIDs;this._postBackControlClientIDs=a.postBackControlClientIDs}if(typeof b!=="undefined"&&b!==null)this._asyncPostBackTimeout=b*1000},_createHiddenField:function(c,d){var b,a=document.getElementById(c);if(a)if(!a._isContained)a.parentNode.removeChild(a);else b=a.parentNode;if(!b){b=document.createElement("span");b.style.cssText="display:none !important";this._form.appendChild(b)}b.innerHTML="<input type='hidden' />";a=b.childNodes[0];a._isContained=true;a.id=a.name=c;a.value=d},_createPageRequestManagerTimeoutError:function(){var b="Sys.WebForms.PageRequestManagerTimeoutException: "+Sys.WebForms.Res.PRM_TimeoutError,a=Error.create(b,{name:"Sys.WebForms.PageRequestManagerTimeoutException"});a.popStackFrame();return a},_createPageRequestManagerServerError:function(a,d){var c="Sys.WebForms.PageRequestManagerServerErrorException: "+(d||String.format(Sys.WebForms.Res.PRM_ServerError,a)),b=Error.create(c,{name:"Sys.WebForms.PageRequestManagerServerErrorException",httpStatusCode:a});b.popStackFrame();return b},_createPageRequestManagerParserError:function(b){var c="Sys.WebForms.PageRequestManagerParserErrorException: "+String.format(Sys.WebForms.Res.PRM_ParserError,b),a=Error.create(c,{name:"Sys.WebForms.PageRequestManagerParserErrorException"});a.popStackFrame();return a},_createPostBackSettings:function(c,b,a){return {async:c,panelID:b,sourceElement:a}},_convertToClientIDs:function(a,d,c){if(a)for(var b=0,e=a.length;b<e;b++){Array.add(d,a[b]);Array.add(c,this._uniqueIDToClientID(a[b]))}},_destroyTree:function(f){if(f.nodeType===1){var d=f.childNodes;for(var b=d.length-1;b>=0;b--){var a=d[b];if(a.nodeType===1){if(a.dispose&&typeof a.dispose==="function")a.dispose();else if(a.control&&typeof a.control.dispose==="function")a.control.dispose();var e=Sys.UI.Behavior.getBehaviors(a);for(var c=e.length-1;c>=0;c--)e[c].dispose();this._destroyTree(a)}}}},dispose:function(){if(this._form){Sys.UI.DomEvent.removeHandler(this._form,"submit",this._onFormSubmitHandler);Sys.UI.DomEvent.removeHandler(this._form,"click",this._onFormElementClickHandler);Sys.UI.DomEvent.removeHandler(window,"unload",this._onWindowUnloadHandler);Sys.UI.DomEvent.removeHandler(window,"load",this._pageLoadedHandler)}if(this._originalDoPostBack){window.__doPostBack=this._originalDoPostBack;this._originalDoPostBack=null}if(this._originalDoPostBackWithOptions){window.WebForm_DoPostBackWithOptions=this._originalDoPostBackWithOptions;this._originalDoPostBackWithOptions=null}if(this._originalFireDefaultButton){window.WebForm_FireDefaultButton=this._originalFireDefaultButton;this._originalFireDefaultButton=null}if(this._originalDoCallback){window.WebForm_DoCallback=this._originalDoCallback;this._originalDoCallback=null}this._form=null;this._updatePanelIDs=null;this._updatePanelClientIDs=null;this._asyncPostBackControlIDs=null;this._asyncPostBackControlClientIDs=null;this._postBackControlIDs=null;this._postBackControlClientIDs=null;this._asyncPostBackTimeout=null;this._scrollPosition=null},_doCallback:function(d,b,c,f,a,e){if(!this.get_isInAsyncPostBack())this._originalDoCallback(d,b,c,f,a,e)},_doPostBack:function(a,e){this._additionalInput=null;var b=this._form;if(a===null||typeof a==="undefined"||this._isCrossPost){this._postBackSettings=this._createPostBackSettings(false,null,null);this._isCrossPost=false}else{var f=this._uniqueIDToClientID(a),d=document.getElementById(f);if(!d)if(Array.contains(this._asyncPostBackControlIDs,a))this._postBackSettings=this._createPostBackSettings(true,this._scriptManagerID+"|"+a,null);else if(Array.contains(this._postBackControlIDs,a))this._postBackSettings=this._createPostBackSettings(false,null,null);else{var c=this._findNearestElement(a);if(c)this._postBackSettings=this._getPostBackSettings(c,a);else this._postBackSettings=this._createPostBackSettings(false,null,null)}else this._postBackSettings=this._getPostBackSettings(d,a)}if(!this._postBackSettings.async){b.onsubmit=this._onsubmit;this._originalDoPostBack(a,e);b.onsubmit=null;return}b.__EVENTTARGET.value=a;b.__EVENTARGUMENT.value=e;this._onFormSubmit()},_doPostBackWithOptions:function(a){this._isCrossPost=a&&a.actionUrl;this._originalDoPostBackWithOptions(a)},_elementContains:function(b,a){while(a){if(a===b)return true;a=a.parentNode}return false},_endPostBack:function(a,d,f){if(this._request===d.get_webRequest()){this._processingRequest=false;this._additionalInput=null;this._request=null}var e=this._get_eventHandlerList().getHandler("endRequest"),b=false;if(e){var c=new Sys.WebForms.EndRequestEventArgs(a,f?f.dataItems:{},d);e(this,c);b=c.get_errorHandled()}if(a&&!b)throw a},_findNearestElement:function(a){while(a.length>0){var d=this._uniqueIDToClientID(a),c=document.getElementById(d);if(c)return c;var b=a.lastIndexOf("$");if(b===-1)return null;a=a.substring(0,b)}return null},_findText:function(b,a){var c=Math.max(0,a-20),d=Math.min(b.length,a+20);return b.substring(c,d)},_fireDefaultButton:function(a,d){if(a.keyCode===13){var c=a.srcElement||a.target;if(!c||c.tagName.toLowerCase()!=="textarea"){var b=document.getElementById(d);if(b&&typeof b.click!=="undefined"){this._activeDefaultButton=b;this._activeDefaultButtonClicked=false;try{b.click()}finally{this._activeDefaultButton=null}a.cancelBubble=true;if(typeof a.stopPropagation==="function")a.stopPropagation();return false}}}return true},_getPageLoadedEventArgs:function(j,e){var i=[],h=[],d=e?e.updatePanelData:null,c,g,b;if(!d){c=this._updatePanelIDs;g=null;b=null}else{c=d.updatePanelIDs;g=d.childUpdatePanelIDs;b=d.panelsToRefreshIDs}var a,f;if(b)for(a=0,f=b.length;a<f;a++)Array.add(i,document.getElementById(this._uniqueIDToClientID(b[a])));for(a=0,f=c.length;a<f;a++)if(j||Array.indexOf(g,c[a])!==-1)Array.add(h,document.getElementById(this._uniqueIDToClientID(c[a])));return new Sys.WebForms.PageLoadedEventArgs(i,h,e?e.dataItems:{})},_getPageLoadingEventArgs:function(h){var g=[],f=[],c=h.updatePanelData,b=c.oldUpdatePanelIDs,j=c.updatePanelIDs,i=c.childUpdatePanelIDs,e=c.panelsToRefreshIDs,a,d;for(a=0,d=e.length;a<d;a++)Array.add(g,document.getElementById(this._uniqueIDToClientID(e[a])));for(a=0,d=b.length;a<d;a++)if(Array.indexOf(e,b[a])===-1&&(Array.indexOf(j,b[a])===-1||Array.indexOf(i,b[a])>-1))Array.add(f,document.getElementById(this._uniqueIDToClientID(b[a])));return new Sys.WebForms.PageLoadingEventArgs(g,f,h.dataItems)},_getPostBackSettings:function(a,c){var d=a,b=null;while(a){if(a.id){if(!b&&Array.contains(this._asyncPostBackControlClientIDs,a.id))b=this._createPostBackSettings(true,this._scriptManagerID+"|"+c,d);else if(!b&&Array.contains(this._postBackControlClientIDs,a.id))return this._createPostBackSettings(false,null,null);else{var e=Array.indexOf(this._updatePanelClientIDs,a.id);if(e!==-1)if(this._updatePanelHasChildrenAsTriggers[e])return this._createPostBackSettings(true,this._updatePanelIDs[e]+"|"+c,d);else return this._createPostBackSettings(true,this._scriptManagerID+"|"+c,d)}if(!b&&this._matchesParentIDInList(a.id,this._asyncPostBackControlClientIDs))b=this._createPostBackSettings(true,this._scriptManagerID+"|"+c,d);else if(!b&&this._matchesParentIDInList(a.id,this._postBackControlClientIDs))return this._createPostBackSettings(false,null,null)}a=a.parentNode}if(!b)return this._createPostBackSettings(false,null,null);else return b},_getScrollPosition:function(){var a=document.documentElement;if(a&&(this._validPosition(a.scrollLeft)||this._validPosition(a.scrollTop)))return {x:a.scrollLeft,y:a.scrollTop};else{a=document.body;if(a&&(this._validPosition(a.scrollLeft)||this._validPosition(a.scrollTop)))return {x:a.scrollLeft,y:a.scrollTop};else if(this._validPosition(window.pageXOffset)||this._validPosition(window.pageYOffset))return {x:window.pageXOffset,y:window.pageYOffset};else return {x:0,y:0}}},_initializeInternal:function(a,b){if(this._prmInitialized)throw Error.invalidOperation(Sys.WebForms.Res.PRM_CannotRegisterTwice);this._prmInitialized=true;this._scriptManagerID=a;this._form=b;this._onsubmit=this._form.onsubmit;this._form.onsubmit=null;this._onFormSubmitHandler=Function.createDelegate(this,this._onFormSubmit);this._onFormElementClickHandler=Function.createDelegate(this,this._onFormElementClick);this._onWindowUnloadHandler=Function.createDelegate(this,this._onWindowUnload);Sys.UI.DomEvent.addHandler(this._form,"submit",this._onFormSubmitHandler);Sys.UI.DomEvent.addHandler(this._form,"click",this._onFormElementClickHandler);Sys.UI.DomEvent.addHandler(window,"unload",this._onWindowUnloadHandler);this._originalDoPostBack=window.__doPostBack;if(this._originalDoPostBack)window.__doPostBack=Function.createDelegate(this,this._doPostBack);this._originalDoPostBackWithOptions=window.WebForm_DoPostBackWithOptions;if(this._originalDoPostBackWithOptions)window.WebForm_DoPostBackWithOptions=Function.createDelegate(this,this._doPostBackWithOptions);this._originalFireDefaultButton=window.WebForm_FireDefaultButton;if(this._originalFireDefaultButton)window.WebForm_FireDefaultButton=Function.createDelegate(this,this._fireDefaultButton);this._originalDoCallback=window.WebForm_DoCallback;if(this._originalDoCallback)window.WebForm_DoCallback=Function.createDelegate(this,this._doCallback);this._pageLoadedHandler=Function.createDelegate(this,this._pageLoadedInitialLoad);Sys.UI.DomEvent.addHandler(window,"load",this._pageLoadedHandler)},_matchesParentIDInList:function(c,b){for(var a=0,d=b.length;a<d;a++)if(c.startsWith(b[a]+"_"))return true;return false},_onFormElementActive:function(a,d,e){if(a.disabled)return;this._postBackSettings=this._getPostBackSettings(a,a.name);if(a.name){var b=a.tagName.toUpperCase();if(b==="INPUT"){var c=a.type;if(c==="submit")this._additionalInput=encodeURIComponent(a.name)+"="+encodeURIComponent(a.value);else if(c==="image")this._additionalInput=encodeURIComponent(a.name)+".x="+d+"&"+encodeURIComponent(a.name)+".y="+e}else if(b==="BUTTON"&&a.name.length!==0&&a.type==="submit")this._additionalInput=encodeURIComponent(a.name)+"="+encodeURIComponent(a.value)}},_onFormElementClick:function(a){this._activeDefaultButtonClicked=a.target===this._activeDefaultButton;this._onFormElementActive(a.target,a.offsetX,a.offsetY)},_onFormSubmit:function(h){var g=true,t=this._isCrossPost;this._isCrossPost=false;var e,s;if(this._onsubmit)g=this._onsubmit();if(g)for(e=0,s=this._onSubmitStatements.length;e<s;e++)if(!this._onSubmitStatements[e]()){g=false;break}if(!g){if(h)h.preventDefault();return}var n=this._form;if(t)return;if(this._activeDefaultButton&&!this._activeDefaultButtonClicked)this._onFormElementActive(this._activeDefaultButton,0,0);if(!this._postBackSettings.async)return;var a=new Sys.StringBuilder;a.append(encodeURIComponent(this._scriptManagerID)+"="+encodeURIComponent(this._postBackSettings.panelID)+"&");var v=n.elements.length;for(e=0;e<v;e++){var d=n.elements[e],f=d.name;if(typeof f==="undefined"||f===null||f.length===0||f===this._scriptManagerID)continue;var m=d.tagName.toUpperCase();if(m==="INPUT"){var k=d.type;if(k==="text"||k==="password"||k==="hidden"||(k==="checkbox"||k==="radio")&&d.checked){a.append(encodeURIComponent(f));a.append("=");a.append(encodeURIComponent(d.value));a.append("&")}}else if(m==="SELECT"){var u=d.options.length;for(var o=0;o<u;o++){var q=d.options[o];if(q.selected){a.append(encodeURIComponent(f));a.append("=");a.append(encodeURIComponent(q.value));a.append("&")}}}else if(m==="TEXTAREA"){a.append(encodeURIComponent(f));a.append("=");a.append(encodeURIComponent(d.value));a.append("&")}}a.append("__ASYNCPOST=true&");if(this._additionalInput){a.append(this._additionalInput);this._additionalInput=null}var c=new Sys.Net.WebRequest,b=n.action;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var p=b.indexOf("#");if(p!==-1)b=b.substr(0,p);var l=b.indexOf("?");if(l!==-1){var r=b.substr(0,l);if(r.indexOf("%")===-1)b=encodeURI(r)+b.substr(l)}else if(b.indexOf("%")===-1)b=encodeURI(b)}c.set_url(b);c.get_headers()["X-MicrosoftAjax"]="Delta=true";c.get_headers()["Cache-Control"]="no-cache";c.set_timeout(this._asyncPostBackTimeout);c.add_completed(Function.createDelegate(this,this._onFormSubmitCompleted));c.set_body(a.toString());var i,j=this._get_eventHandlerList().getHandler("initializeRequest");if(j){i=new Sys.WebForms.InitializeRequestEventArgs(c,this._postBackSettings.sourceElement);j(this,i);g=!i.get_cancel()}if(!g){if(h)h.preventDefault();return}this._scrollPosition=this._getScrollPosition();this.abortPostBack();j=this._get_eventHandlerList().getHandler("beginRequest");if(j){i=new Sys.WebForms.BeginRequestEventArgs(c,this._postBackSettings.sourceElement);j(this,i)}if(this._originalDoCallback)this._cancelPendingCallbacks();this._request=c;this._processingRequest=false;c.invoke();if(h)h.preventDefault()},_onFormSubmitCompleted:function(c){this._processingRequest=true;if(c.get_timedOut()){this._endPostBack(this._createPageRequestManagerTimeoutError(),c,null);return}if(c.get_aborted()){this._endPostBack(null,c,null);return}if(!this._request||c.get_webRequest()!==this._request)return;if(c.get_statusCode()!==200){this._endPostBack(this._createPageRequestManagerServerError(c.get_statusCode()),c,null);return}var a=this._parseDelta(c);if(!a)return;var b,e;if(a.asyncPostBackControlIDsNode&&a.postBackControlIDsNode&&a.updatePanelIDsNode&&a.panelsToRefreshNode&&a.childUpdatePanelIDsNode){var p=this._updatePanelIDs,h=a.childUpdatePanelIDsNode.content,n=h.length?h.split(","):[],l=this._splitNodeIntoArray(a.asyncPostBackControlIDsNode),m=this._splitNodeIntoArray(a.postBackControlIDsNode),o=this._splitNodeIntoArray(a.updatePanelIDsNode),g=this._splitNodeIntoArray(a.panelsToRefreshNode);for(b=0,e=g.length;b<e;b++){var i=this._uniqueIDToClientID(g[b]);if(!document.getElementById(i)){this._endPostBack(Error.invalidOperation(String.format(Sys.WebForms.Res.PRM_MissingPanel,i)),c,a);return}}var f=this._processUpdatePanelArrays(o,l,m);f.oldUpdatePanelIDs=p;f.childUpdatePanelIDs=n;f.panelsToRefreshIDs=g;a.updatePanelData=f}a.dataItems={};var d;for(b=0,e=a.dataItemNodes.length;b<e;b++){d=a.dataItemNodes[b];a.dataItems[d.id]=d.content}for(b=0,e=a.dataItemJsonNodes.length;b<e;b++){d=a.dataItemJsonNodes[b];a.dataItems[d.id]=Sys.Serialization.JavaScriptSerializer.deserialize(d.content)}var k=this._get_eventHandlerList().getHandler("pageLoading");if(k)k(this,this._getPageLoadingEventArgs(a));Sys._ScriptLoader.readLoadedScripts();Sys.Application.beginCreateComponents();var j=Sys._ScriptLoader.getInstance();this._queueScripts(j,a.scriptBlockNodes,true,false);this._processingRequest=true;j.loadScripts(0,Function.createDelegate(this,Function.createCallback(this._scriptIncludesLoadComplete,a)),Function.createDelegate(this,Function.createCallback(this._scriptIncludesLoadFailed,a)),null)},_onWindowUnload:function(){this.dispose()},_pageLoaded:function(a,c){var b=this._get_eventHandlerList().getHandler("pageLoaded");if(b)b(this,this._getPageLoadedEventArgs(a,c));if(!a)Sys.Application.raiseLoad()},_pageLoadedInitialLoad:function(){this._pageLoaded(true,null)},_parseDelta:function(g){var c=g.get_responseData(),d,h,D,E,C,b=0,e=null,i=[];while(b<c.length){d=c.indexOf("|",b);if(d===-1){e=this._findText(c,b);break}h=parseInt(c.substring(b,d),10);if(h%1!==0){e=this._findText(c,b);break}b=d+1;d=c.indexOf("|",b);if(d===-1){e=this._findText(c,b);break}D=c.substring(b,d);b=d+1;d=c.indexOf("|",b);if(d===-1){e=this._findText(c,b);break}E=c.substring(b,d);b=d+1;if(b+h>=c.length){e=this._findText(c,c.length);break}C=c.substr(b,h);b+=h;if(c.charAt(b)!=="|"){e=this._findText(c,b);break}b++;Array.add(i,{type:D,id:E,content:C})}if(e){this._endPostBack(this._createPageRequestManagerParserError(String.format(Sys.WebForms.Res.PRM_ParserErrorDetails,e)),g,null);return null}var w=[],u=[],o=[],v=[],r=[],B=[],z=[],y=[],t=[],q=[],k,n,s,l,m,p,x;for(var j=0,F=i.length;j<F;j++){var a=i[j];switch(a.type){case "updatePanel":Array.add(w,a);break;case "hiddenField":Array.add(u,a);break;case "arrayDeclaration":Array.add(o,a);break;case "scriptBlock":Array.add(v,a);break;case "scriptStartupBlock":Array.add(r,a);break;case "expando":Array.add(B,a);break;case "onSubmit":Array.add(z,a);break;case "asyncPostBackControlIDs":k=a;break;case "postBackControlIDs":n=a;break;case "updatePanelIDs":s=a;break;case "asyncPostBackTimeout":l=a;break;case "childUpdatePanelIDs":m=a;break;case "panelsToRefreshIDs":p=a;break;case "formAction":x=a;break;case "dataItem":Array.add(y,a);break;case "dataItemJson":Array.add(t,a);break;case "scriptDispose":Array.add(q,a);break;case "pageRedirect":if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var f=document.createElement("a");f.style.display="none";f.attachEvent("onclick",A);f.href=a.content;document.body.appendChild(f);f.click();f.detachEvent("onclick",A);document.body.removeChild(f);function A(a){a.cancelBubble=true}}else window.location.href=a.content;return;case "error":this._endPostBack(this._createPageRequestManagerServerError(Number.parseInvariant(a.id),a.content),g,null);return null;case "pageTitle":document.title=a.content;break;case "focus":this._controlIDToFocus=a.content;break;default:this._endPostBack(this._createPageRequestManagerParserError(String.format(Sys.WebForms.Res.PRM_UnknownToken,a.type)),g,null);return null}}return {executor:g,updatePanelNodes:w,hiddenFieldNodes:u,arrayDeclarationNodes:o,scriptBlockNodes:v,scriptStartupNodes:r,expandoNodes:B,onSubmitNodes:z,dataItemNodes:y,dataItemJsonNodes:t,scriptDisposeNodes:q,asyncPostBackControlIDsNode:k,postBackControlIDsNode:n,updatePanelIDsNode:s,asyncPostBackTimeoutNode:l,childUpdatePanelIDsNode:m,panelsToRefreshNode:p,formActionNode:x}},_processUpdatePanelArrays:function(e,l,n){var d,c,b;if(e){var f=e.length;d=new Array(f);c=new Array(f);b=new Array(f);for(var a=0;a<f;a++){var k=e[a].substr(1),m=e[a].charAt(0)==="t";b[a]=m;d[a]=k;c[a]=this._uniqueIDToClientID(k)}}else{d=[];c=[];b=[]}var i=[],g=[];this._convertToClientIDs(l,i,g);var j=[],h=[];this._convertToClientIDs(n,j,h);return {updatePanelIDs:d,updatePanelClientIDs:c,updatePanelHasChildrenAsTriggers:b,asyncPostBackControlIDs:i,asyncPostBackControlClientIDs:g,postBackControlIDs:j,postBackControlClientIDs:h}},_queueScripts:function(scriptLoader,scriptBlockNodes,queueIncludes,queueBlocks){for(var i=0,l=scriptBlockNodes.length;i<l;i++){var scriptBlockType=scriptBlockNodes[i].id;switch(scriptBlockType){case "ScriptContentNoTags":if(!queueBlocks)continue;scriptLoader.queueScriptBlock(scriptBlockNodes[i].content);break;case "ScriptContentWithTags":var scriptTagAttributes;eval("scriptTagAttributes = "+scriptBlockNodes[i].content);if(scriptTagAttributes.src){if(!queueIncludes||Sys._ScriptLoader.isScriptLoaded(scriptTagAttributes.src))continue}else if(!queueBlocks)continue;scriptLoader.queueCustomScriptTag(scriptTagAttributes);break;case "ScriptPath":if(!queueIncludes||Sys._ScriptLoader.isScriptLoaded(scriptBlockNodes[i].content))continue;scriptLoader.queueScriptReference(scriptBlockNodes[i].content)}}},_registerDisposeScript:function(a,b){if(!this._scriptDisposes[a])this._scriptDisposes[a]=[b];else Array.add(this._scriptDisposes[a],b)},_scriptIncludesLoadComplete:function(e,b){if(b.executor.get_webRequest()!==this._request)return;this._commitControls(b.updatePanelData,b.asyncPostBackTimeoutNode?b.asyncPostBackTimeoutNode.content:null);if(b.formActionNode)this._form.action=b.formActionNode.content;var a,d,c;for(a=0,d=b.updatePanelNodes.length;a<d;a++){c=b.updatePanelNodes[a];var j=document.getElementById(c.id);if(!j){this._endPostBack(Error.invalidOperation(String.format(Sys.WebForms.Res.PRM_MissingPanel,c.id)),b.executor,b);return}this._updatePanel(j,c.content)}for(a=0,d=b.scriptDisposeNodes.length;a<d;a++){c=b.scriptDisposeNodes[a];this._registerDisposeScript(c.id,c.content)}for(a=0,d=this._transientFields.length;a<d;a++){var g=document.getElementById(this._transientFields[a]);if(g){var k=g._isContained?g.parentNode:g;k.parentNode.removeChild(k)}}for(a=0,d=b.hiddenFieldNodes.length;a<d;a++){c=b.hiddenFieldNodes[a];this._createHiddenField(c.id,c.content)}if(b.scriptsFailed)throw Sys._ScriptLoader._errorScriptLoadFailed(b.scriptsFailed.src,b.scriptsFailed.multipleCallbacks);this._queueScripts(e,b.scriptBlockNodes,false,true);var i="";for(a=0,d=b.arrayDeclarationNodes.length;a<d;a++){c=b.arrayDeclarationNodes[a];i+="Sys.WebForms.PageRequestManager._addArrayElement('"+c.id+"', "+c.content+");\r\n"}var h="";for(a=0,d=b.expandoNodes.length;a<d;a++){c=b.expandoNodes[a];h+=c.id+" = "+c.content+"\r\n"}if(i.length)e.queueScriptBlock(i);if(h.length)e.queueScriptBlock(h);this._queueScripts(e,b.scriptStartupNodes,true,true);var f="";for(a=0,d=b.onSubmitNodes.length;a<d;a++){if(a===0)f="Array.add(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements, function() {\r\n";f+=b.onSubmitNodes[a].content+"\r\n"}if(f.length){f+="\r\nreturn true;\r\n});\r\n";e.queueScriptBlock(f)}e.loadScripts(0,Function.createDelegate(this,Function.createCallback(this._scriptsLoadComplete,b)),null,null)},_scriptIncludesLoadFailed:function(d,c,b,a){a.scriptsFailed={src:c.src,multipleCallbacks:b};this._scriptIncludesLoadComplete(d,a)},_scriptsLoadComplete:function(f,c){var e=c.executor;if(window.__theFormPostData)window.__theFormPostData="";if(window.__theFormPostCollection)window.__theFormPostCollection=[];if(window.WebForm_InitCallback)window.WebForm_InitCallback();if(this._scrollPosition){if(window.scrollTo)window.scrollTo(this._scrollPosition.x,this._scrollPosition.y);this._scrollPosition=null}Sys.Application.endCreateComponents();this._pageLoaded(false,c);this._endPostBack(null,e,c);if(this._controlIDToFocus){var a,d;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var b=$get(this._controlIDToFocus);a=b;if(b&&!WebForm_CanFocus(b))a=WebForm_FindFirstFocusableChild(b);if(a&&typeof a.contentEditable!=="undefined"){d=a.contentEditable;a.contentEditable=false}else a=null}WebForm_AutoFocus(this._controlIDToFocus);if(a)a.contentEditable=d;this._controlIDToFocus=null}},_splitNodeIntoArray:function(b){var a=b.content,c=a.length?a.split(","):[];return c},_uniqueIDToClientID:function(a){return a.replace(/\$/g,"_")},_updateControls:function(d,a,c,b){this._commitControls(this._processUpdatePanelArrays(d,a,c),b)},_updatePanel:function(updatePanelElement,rendering){for(var updatePanelID in this._scriptDisposes)if(this._elementContains(updatePanelElement,document.getElementById(updatePanelID))){var disposeScripts=this._scriptDisposes[updatePanelID];for(var i=0,l=disposeScripts.length;i<l;i++)eval(disposeScripts[i]);delete this._scriptDisposes[updatePanelID]}this._destroyTree(updatePanelElement);updatePanelElement.innerHTML=rendering},_validPosition:function(a){return typeof a!=="undefined"&&a!==null&&a!==0}};Sys.WebForms.PageRequestManager.getInstance=function(){var a=Sys.WebForms.PageRequestManager._instance;if(!a)a=Sys.WebForms.PageRequestManager._instance=new Sys.WebForms.PageRequestManager;return a};Sys.WebForms.PageRequestManager._addArrayElement=function(a){if(!window[a])window[a]=[];for(var b=1,c=arguments.length;b<c;b++)Array.add(window[a],arguments[b])};Sys.WebForms.PageRequestManager._initialize=function(a,b){Sys.WebForms.PageRequestManager.getInstance()._initializeInternal(a,b)};Sys.WebForms.PageRequestManager.registerClass("Sys.WebForms.PageRequestManager");Sys.UI._UpdateProgress=function(a){Sys.UI._UpdateProgress.initializeBase(this,[a]);this._displayAfter=500;this._dynamicLayout=true;this._associatedUpdatePanelId=null;this._beginRequestHandlerDelegate=null;this._startDelegate=null;this._endRequestHandlerDelegate=null;this._pageRequestManager=null;this._timerCookie=null};Sys.UI._UpdateProgress.prototype={get_displayAfter:function(){return this._displayAfter},set_displayAfter:function(a){this._displayAfter=a},get_dynamicLayout:function(){return this._dynamicLayout},set_dynamicLayout:function(a){this._dynamicLayout=a},get_associatedUpdatePanelId:function(){return this._associatedUpdatePanelId},set_associatedUpdatePanelId:function(a){this._associatedUpdatePanelId=a},_clearTimeout:function(){if(this._timerCookie){window.clearTimeout(this._timerCookie);this._timerCookie=null}},_handleBeginRequest:function(d,c){var a=c.get_postBackElement(),b=!this._associatedUpdatePanelId;while(!b&&a){if(a.id&&this._associatedUpdatePanelId===a.id)b=true;a=a.parentNode}if(b)this._timerCookie=window.setTimeout(this._startDelegate,this._displayAfter)},_startRequest:function(){if(this._pageRequestManager.get_isInAsyncPostBack())if(this._dynamicLayout)this.get_element().style.display="block";else this.get_element().style.visibility="visible";this._timerCookie=null},_handleEndRequest:function(){if(this._dynamicLayout)this.get_element().style.display="none";else this.get_element().style.visibility="hidden";this._clearTimeout()},dispose:function(){if(this._beginRequestHandlerDelegate!==null){this._pageRequestManager.remove_beginRequest(this._beginRequestHandlerDelegate);this._pageRequestManager.remove_endRequest(this._endRequestHandlerDelegate);this._beginRequestHandlerDelegate=null;this._endRequestHandlerDelegate=null}this._clearTimeout();Sys.UI._UpdateProgress.callBaseMethod(this,"dispose")},initialize:function(){Sys.UI._UpdateProgress.callBaseMethod(this,"initialize");this._beginRequestHandlerDelegate=Function.createDelegate(this,this._handleBeginRequest);this._endRequestHandlerDelegate=Function.createDelegate(this,this._handleEndRequest);this._startDelegate=Function.createDelegate(this,this._startRequest);if(Sys.WebForms&&Sys.WebForms.PageRequestManager)this._pageRequestManager=Sys.WebForms.PageRequestManager.getInstance();if(this._pageRequestManager!==null){this._pageRequestManager.add_beginRequest(this._beginRequestHandlerDelegate);this._pageRequestManager.add_endRequest(this._endRequestHandlerDelegate)}}};Sys.UI._UpdateProgress.registerClass("Sys.UI._UpdateProgress",Sys.UI.Control);
Type.registerNamespace('Sys.WebForms');Sys.WebForms.Res={"PRM_UnknownToken":"Unknown token: \u0027{0}\u0027.","PRM_MissingPanel":"Could not find UpdatePanel with ID \u0027{0}\u0027. If it is being updated dynamically then it must be inside another UpdatePanel.","PRM_ServerError":"An unknown error occurred while processing the request on the server. The status code returned from the server was: {0}","PRM_ParserError":"The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.\r\nDetails: {0}","PRM_TimeoutError":"The server request timed out.","PRM_ParserErrorDetails":"Error parsing near \u0027{0}\u0027.","PRM_CannotRegisterTwice":"The PageRequestManager cannot be initialized more than once."};
/*!
 * jQuery JavaScript Library v1.4
 * http://jquery.com/
 *
 * Copyright 2010, John Resig
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://docs.jquery.com/License
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 * Copyright 2010, The Dojo Foundation
 * Released under the MIT, BSD, and GPL Licenses.
 *
 * Date: Wed Jan 13 15:23:05 2010 -0500
 */
(function(A,w){function oa(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(oa,1);return}c.ready()}}function La(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function $(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var o in b)$(a,o,b[o],f,e,d);return a}if(d!==w){f=!i&&f&&c.isFunction(d);for(o=0;o<j;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,i);return a}return j?
e(a[0],b):null}function K(){return(new Date).getTime()}function aa(){return false}function ba(){return true}function pa(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function qa(a){var b=true,d=[],f=[],e=arguments,i,j,o,p,n,t=c.extend({},c.data(this,"events").live);for(p in t){j=t[p];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete t[p]}i=c(a.target).closest(f,a.currentTarget);
n=0;for(l=i.length;n<l;n++)for(p in t){j=t[p];o=i[n].elem;f=null;if(i[n].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==o)d.push({elem:o,fn:j})}}n=0;for(l=d.length;n<l;n++){i=d[n];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,e)===false){b=false;break}}return b}function ra(a,b){return["live",a,b.replace(/\./g,"`").replace(/ /g,"&")].join(".")}function sa(a){return!a||!a.parentNode||a.parentNode.nodeType===
11}function ta(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var i in f)for(var j in f[i])c.event.add(this,i,f[i][j],f[i][j].data)}}})}function ua(a,b,d){var f,e,i;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&a[0].indexOf("<option")<0){e=true;if(i=c.fragments[a[0]])if(i!==1)f=i}if(!f){b=b&&b[0]?b[0].ownerDocument||b[0]:s;f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=
i?f:1;return{fragment:f,cacheable:e}}function T(a){for(var b=0,d,f;(d=a[b])!=null;b++)if(!c.noData[d.nodeName.toLowerCase()]&&(f=d[H]))delete c.cache[f]}function L(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ma=A.jQuery,Na=A.$,s=A.document,U,Oa=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Pa=/^.[^:#\[\.,]*$/,Qa=/\S/,
Ra=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Sa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],M,ca=Object.prototype.toString,da=Object.prototype.hasOwnProperty,ea=Array.prototype.push,R=Array.prototype.slice,V=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Oa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Sa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];
c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ua([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return U.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a)}else return!b||b.jquery?(b||U).find(a):c(b).find(a);else if(c.isFunction(a))return U.ready(a);if(a.selector!==w){this.selector=a.selector;
this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,this)},selector:"",jquery:"1.4",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=
0;ea.apply(this,a);return this},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||
c(null)},push:ea,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(i in e){j=a[i];o=e[i];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){j=j&&(c.isPlainObject(j)||c.isArray(j))?j:c.isArray(o)?[]:{};a[i]=c.extend(f,j,o)}else if(o!==w)a[i]=
o}return a};c.extend({noConflict:function(a){A.$=Na;if(a)A.jQuery=Ma;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",M,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",
M);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&oa()}}},isFunction:function(a){return ca.call(a)==="[object Function]"},isArray:function(a){return ca.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||ca.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!da.call(a,"constructor")&&!da.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===w||da.call(a,b)},
isEmptyObject:function(a){for(var b in a)return false;return true},noop:function(){},globalEval:function(a){if(a&&Qa.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,i=a.length,j=i===w||c.isFunction(a);
if(d)if(j)for(f in a){if(b.apply(a[f],d)===false)break}else for(;e<i;){if(b.apply(a[e++],d)===false)break}else if(j)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<i&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Ra,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ea.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=
0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,i=a.length;e<i;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,i=0,j=a.length;i<j;i++){e=b(a[i],i,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b===
"string"){d=a;a=d[b];b=w}else if(b&&!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){var b={browser:""};a=a.toLowerCase();if(/webkit/.test(a))b={browser:"webkit",version:/webkit[\/ ]([\w.]+)/};else if(/opera/.test(a))b={browser:"opera",version:/version/.test(a)?/version[\/ ]([\w.]+)/:/opera[\/ ]([\w.]+)/};else if(/msie/.test(a))b={browser:"msie",version:/msie ([\w.]+)/};else if(/mozilla/.test(a)&&
!/compatible/.test(a))b={browser:"mozilla",version:/rv:([\w.]+)/};b.version=(b.version&&b.version.exec(a)||[0,"0"])[1];return b},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=true;if(V)c.inArray=function(a,b){return V.call(b,a)};U=c(s);if(s.addEventListener)M=function(){s.removeEventListener("DOMContentLoaded",M,false);c.ready()};else if(s.attachEvent)M=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",
M);c.ready()}};if(V)c.inArray=function(a,b){return V.call(b,a)};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+K();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,
htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,
a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function o(){c.support.noCloneEvent=false;d.detachEvent("onclick",o)});d.cloneNode(true).fireEvent("onclick")}c(function(){var o=s.createElement("div");o.style.width=o.style.paddingLeft="1px";s.body.appendChild(o);c.boxModel=c.support.boxModel=o.offsetWidth===2;s.body.removeChild(o).style.display="none"});a=function(o){var p=s.createElement("div");o="on"+o;var n=o in
p;if(!n){p.setAttribute(o,"return;");n=typeof p[o]==="function"}return n};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var H="jQuery"+K(),Ta=0,ya={},Ua={};c.extend({cache:{},expando:H,noData:{embed:true,object:true,applet:true},data:function(a,
b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?ya:a;var f=a[H],e=c.cache;if(!b&&!f)return null;f||(f=++Ta);if(typeof b==="object"){a[H]=f;e=e[f]=c.extend(true,{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Ua:(e[f]={});if(d!==w){a[H]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?ya:a;var d=a[H],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[H]}catch(i){a.removeAttribute&&
a.removeAttribute(H)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,
a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,
a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var za=/[\n\t]/g,fa=/\s+/,Va=/\r/g,Wa=/href|src|style/,Xa=/(button|input)/i,Ya=/(button|input|object|select|textarea)/i,Za=/^(a|area)$/i,Aa=/radio|checkbox/;c.fn.extend({attr:function(a,
b){return $(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.addClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className)for(var i=" "+e.className+" ",j=0,o=b.length;j<o;j++){if(i.indexOf(" "+b[j]+" ")<0)e.className+=
" "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.removeClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var i=(" "+e.className+" ").replace(za," "),j=0,o=b.length;j<o;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a,
b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var i=c(this);i.toggleClass(a.call(this,e,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,i=0,j=c(this),o=b,p=a.split(fa);e=p[i++];){o=f?o:!j.hasClass(e);j[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=
" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(za," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(Aa.test(b.type)&&
!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Va,"")}return w}var o=c.isFunction(a);return this.each(function(p){var n=c(this),t=a;if(this.nodeType===1){if(o)t=a.call(this,p,n.val());if(typeof t==="number")t+="";if(c.isArray(t)&&Aa.test(this.type))this.checked=c.inArray(n.val(),t)>=0;else if(c.nodeName(this,"select")){var z=c.makeArray(t);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),z)>=0});if(!z.length)this.selectedIndex=
-1}else this.value=t}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Wa.test(b);if(b in a&&f&&!i){if(e){if(b==="type"&&Xa.test(a.nodeName)&&a.parentNode)throw"type property can't be changed";a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;
if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Ya.test(a.nodeName)||Za.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var $a=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===
3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;if(!d.guid)d.guid=c.guid++;if(f!==w){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):w};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var o,p=0;o=b[p++];){var n=o.split(".");o=n.shift();d.type=n.slice(0).sort().join(".");var t=e[o],z=this.special[o]||{};if(!t){t=e[o]={};
if(!z.setup||z.setup.call(a,f,n,d)===false)if(a.addEventListener)a.addEventListener(o,i,false);else a.attachEvent&&a.attachEvent("on"+o,i)}if(z.add)if((n=z.add.call(a,d,f,n,t))&&c.isFunction(n)){n.guid=n.guid||d.guid;d=n}t[d.guid]=d;this.global[o]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===w||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);
for(var o=0;i=b[o++];){var p=i.split(".");i=p.shift();var n=!p.length,t=c.map(p.slice(0).sort(),$a);t=new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.)?")+"(\\.|$)");var z=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var B in f[i])if(n||t.test(f[i][B].type))delete f[i][B];z.remove&&z.remove.call(a,p,j);for(e in f[i])break;if(!e){if(!z.teardown||z.teardown.call(a,p)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+
i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(B=c.data(a,"handle"))B.elem=null;c.removeData(a,"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[H]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;var i=c.data(d,"handle");i&&i.apply(d,b);var j,o;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){j=d[e];o=d["on"+e]}}catch(p){}i=c.nodeName(d,"a")&&e==="click";if(!f&&j&&!a.isDefaultPrevented()&&!i){this.triggered=true;try{d[e]()}catch(n){}}else if(o&&d["on"+e].apply(d,b)===false)a.result=false;this.triggered=false;if(!a.isPropagationStopped())(d=d.parentNode||d.ownerDocument)&&c.event.trigger(a,b,d,true)},
handle:function(a){var b,d;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},
props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[H])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||
s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&
a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;c.event.add(this,b.live,qa,b)},remove:function(a){if(a.length){var b=0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],qa)}},special:{}},beforeunload:{setup:function(a,
b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=K();this[H]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ba;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=
ba;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ba;this.stopPropagation()},isDefaultPrevented:aa,isPropagationStopped:aa,isImmediatePropagationStopped:aa};var Ba=function(a){for(var b=a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ca=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",
mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ca:Ba,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ca:Ba)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return pa("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+
d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return pa("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this,"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var ga=/textarea|input|select/i;function Da(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>
-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ha(a,b){var d=a.target,f,e;if(!(!ga.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Da(d);if(e!==f){if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",e);if(d.type!=="select"&&(f!=null||e)){a.type="change";return c.event.trigger(a,b,this)}}}}c.event.special.change={filters:{focusout:ha,click:function(a){var b=a.target,d=b.type;if(d===
"radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ha.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ha.call(this,a)},beforeactivate:function(a){a=a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Da(a))}},setup:function(a,b,d){for(var f in W)c.event.add(this,f+".specialChange."+d.guid,W[f]);return ga.test(this.nodeName)},
remove:function(a,b){for(var d in W)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),W[d]);return ga.test(this.nodeName)}};var W=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,
f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){thisObject=e;e=f;f=w}var j=b==="one"?c.proxy(e,function(o){c(this).unbind(o,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e,thisObject):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,
b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||
a)},live:function(a,b,d){if(c.isFunction(b)){d=b;b=w}c(this.context).bind(ra(a,this.selector),{data:b,selector:this.selector,live:a},d);return this},die:function(a,b){c(this.context).unbind(ra(a,this.selector),b?{guid:b.guid+this.selector+a}:null);return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d){return d?
this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",k,m=0;g[m];m++){k=g[m];if(k.nodeType===3||k.nodeType===4)h+=k.nodeValue;else if(k.nodeType!==8)h+=a(k.childNodes)}return h}function b(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache===
k){y=m[u.sizset];break}if(u.nodeType===1&&!q){u.sizcache=k;u.sizset=r}if(u.nodeName.toLowerCase()===h){y=u;break}u=u[g]}m[r]=y}}}function d(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache===k){y=m[u.sizset];break}if(u.nodeType===1){if(!q){u.sizcache=k;u.sizset=r}if(typeof h!=="string"){if(u===h){y=true;break}}else if(p.filter(h,[u]).length>0){y=u;break}}u=u[g]}m[r]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
e=0,i=Object.prototype.toString,j=false,o=true;[0,0].sort(function(){o=false;return 0});var p=function(g,h,k,m){k=k||[];var r=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return k;for(var q=[],v,u,y,S,I=true,N=x(h),J=g;(f.exec(""),v=f.exec(J))!==null;){J=v[3];q.push(v[1]);if(v[2]){S=v[3];break}}if(q.length>1&&t.exec(g))if(q.length===2&&n.relative[q[0]])u=ia(q[0]+q[1],h);else for(u=n.relative[q[0]]?[h]:p(q.shift(),h);q.length;){g=q.shift();if(n.relative[g])g+=q.shift();
u=ia(g,u)}else{if(!m&&q.length>1&&h.nodeType===9&&!N&&n.match.ID.test(q[0])&&!n.match.ID.test(q[q.length-1])){v=p.find(q.shift(),h,N);h=v.expr?p.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:q.pop(),set:B(m)}:p.find(q.pop(),q.length===1&&(q[0]==="~"||q[0]==="+")&&h.parentNode?h.parentNode:h,N);u=v.expr?p.filter(v.expr,v.set):v.set;if(q.length>0)y=B(u);else I=false;for(;q.length;){var E=q.pop();v=E;if(n.relative[E])v=q.pop();else E="";if(v==null)v=h;n.relative[E](y,v,N)}}else y=[]}y||(y=u);if(!y)throw"Syntax error, unrecognized expression: "+
(E||g);if(i.call(y)==="[object Array]")if(I)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&F(h,y[g])))k.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&k.push(u[g]);else k.push.apply(k,y);else B(y,k);if(S){p(S,r,k,m);p.uniqueSort(k)}return k};p.uniqueSort=function(g){if(D){j=o;g.sort(D);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};p.matches=function(g,h){return p(g,null,null,h)};p.find=function(g,h,k){var m,r;if(!g)return[];
for(var q=0,v=n.order.length;q<v;q++){var u=n.order[q];if(r=n.leftMatch[u].exec(g)){var y=r[1];r.splice(1,1);if(y.substr(y.length-1)!=="\\"){r[1]=(r[1]||"").replace(/\\/g,"");m=n.find[u](r,h,k);if(m!=null){g=g.replace(n.match[u],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};p.filter=function(g,h,k,m){for(var r=g,q=[],v=h,u,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var I in n.filter)if((u=n.leftMatch[I].exec(g))!=null&&u[2]){var N=n.filter[I],J,E;E=u[1];y=false;u.splice(1,1);if(E.substr(E.length-
1)!=="\\"){if(v===q)q=[];if(n.preFilter[I])if(u=n.preFilter[I](u,v,k,q,m,S)){if(u===true)continue}else y=J=true;if(u)for(var X=0;(E=v[X])!=null;X++)if(E){J=N(E,u,X,v);var Ea=m^!!J;if(k&&J!=null)if(Ea)y=true;else v[X]=false;else if(Ea){q.push(E);y=true}}if(J!==w){k||(v=q);g=g.replace(n.match[I],"");if(!y)return[];break}}}if(g===r)if(y==null)throw"Syntax error, unrecognized expression: "+g;else break;r=g}return v};var n=p.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
relative:{"+":function(g,h){var k=typeof h==="string",m=k&&!/\W/.test(h);k=k&&!m;if(m)h=h.toLowerCase();m=0;for(var r=g.length,q;m<r;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=k||q&&q.nodeName.toLowerCase()===h?q||false:q===h}k&&p.filter(h,g,true)},">":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,r=g.length;m<r;m++){var q=g[m];if(q){k=q.parentNode;g[m]=k.nodeName.toLowerCase()===h?k:false}}}else{m=0;for(r=g.length;m<r;m++)if(q=g[m])g[m]=
k?q.parentNode:q.parentNode===h;k&&p.filter(h,g,true)}},"":function(g,h,k){var m=e++,r=d;if(typeof h==="string"&&!/\W/.test(h)){var q=h=h.toLowerCase();r=b}r("parentNode",h,m,g,q,k)},"~":function(g,h,k){var m=e++,r=d;if(typeof h==="string"&&!/\W/.test(h)){var q=h=h.toLowerCase();r=b}r("previousSibling",h,m,g,q,k)}},find:{ID:function(g,h,k){if(typeof h.getElementById!=="undefined"&&!k)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var k=[];
h=h.getElementsByName(g[1]);for(var m=0,r=h.length;m<r;m++)h[m].getAttribute("name")===g[1]&&k.push(h[m]);return k.length===0?null:k}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,k,m,r,q){g=" "+g[1].replace(/\\/g,"")+" ";if(q)return g;q=0;for(var v;(v=h[q])!=null;q++)if(v)if(r^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))k||m.push(v);else if(k)h[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,m,r,q){h=g[1].replace(/\\/g,"");if(!q&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,m,r){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=p(g[3],null,null,h);else{g=p.filter(g[3],h,k,true^r);k||m.push.apply(m,
g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!p(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
setFilters:{first:function(g,h){return h===0},last:function(g,h,k,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return h<k[3]-0},gt:function(g,h,k){return h>k[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,m){var r=h[1],q=n.filters[r];if(q)return q(g,k,h,m);else if(r==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(r==="not"){h=
h[3];k=0;for(m=h.length;k<m;k++)if(h[k]===g)return false;return true}else throw"Syntax error, unrecognized expression: "+r;},CHILD:function(g,h){var k=h[1],m=g;switch(k){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(k==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":k=h[2];var r=h[3];if(k===1&&r===0)return true;h=h[0];var q=g.parentNode;if(q&&(q.sizcache!==h||!g.nodeIndex)){var v=0;for(m=q.firstChild;m;m=
m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;q.sizcache=h}g=g.nodeIndex-r;return k===0?g===0:g%k===0&&g/k>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=n.attrHandle[k]?n.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
"="?k===h:m==="*="?k.indexOf(h)>=0:m==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:m==="!="?k!==h:m==="^="?k.indexOf(h)===0:m==="$="?k.substr(k.length-h.length)===h:m==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,m){var r=n.setFilters[h[2]];if(r)return r(g,k,h,m)}}},t=n.match.POS;for(var z in n.match){n.match[z]=new RegExp(n.match[z].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[z]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[z].source.replace(/\\(\d+)/g,function(g,
h){return"\\"+(h-0+1)}))}var B=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){B=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,m=g.length;k<m;k++)h.push(g[k]);else for(k=0;g[k];k++)h.push(g[k]);return h}}var D;if(s.documentElement.compareDocumentPosition)D=function(g,h){if(!g.compareDocumentPosition||
!h.compareDocumentPosition){if(g==h)j=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)j=true;return g};else if("sourceIndex"in s.documentElement)D=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)j=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)j=true;return g};else if(s.createRange)D=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)j=true;return g.ownerDocument?-1:1}var k=g.ownerDocument.createRange(),m=
h.ownerDocument.createRange();k.setStart(g,0);k.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=k.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)j=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var k=s.documentElement;k.insertBefore(g,k.firstChild);if(s.getElementById(h)){n.find.ID=function(m,r,q){if(typeof r.getElementById!=="undefined"&&!q)return(r=r.getElementById(m[1]))?r.id===m[1]||typeof r.getAttributeNode!=="undefined"&&
r.getAttributeNode("id").nodeValue===m[1]?[r]:w:[]};n.filter.ID=function(m,r){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===r}}k.removeChild(g);k=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;k[m];m++)k[m].nodeType===1&&h.push(k[m]);k=h}return k};g.innerHTML="<a href='#'></a>";
if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=p,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){p=function(m,r,q,v){r=r||s;if(!v&&r.nodeType===9&&!x(r))try{return B(r.querySelectorAll(m),q)}catch(u){}return g(m,r,q,v)};for(var k in g)p[k]=g[k];h=null}}();
(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,k,m){if(typeof k.getElementsByClassName!=="undefined"&&!m)return k.getElementsByClassName(h[1])};g=null}}})();var F=s.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,
h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ia=function(g,h){var k=[],m="",r;for(h=h.nodeType?[h]:h;r=n.match.PSEUDO.exec(g);){m+=r[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;r=0;for(var q=h.length;r<q;r++)p(g,h[r],k);return p.filter(m,k)};c.find=p;c.expr=p.selectors;c.expr[":"]=c.expr.filters;c.unique=p.uniqueSort;c.getText=a;c.isXMLDoc=x;c.contains=F})();var ab=/Until$/,bb=/^(?:parents|prevUntil|prevAll)/,
cb=/,/;R=Array.prototype.slice;var Fa=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,i){return!!b.call(e,i,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Pa.test(b))return c.filter(b,f,!d);else b=c.filter(b,a)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
c.find(a,this[f],b);if(f>0)for(var i=d;i<b.length;i++)for(var j=0;j<d;j++)if(b[j]===b[i]){b.splice(i--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Fa(this,a,false),"not",a)},filter:function(a){return this.pushStack(Fa(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i=
{},j;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){j=a[e];i[j]||(i[j]=c.expr.match.POS.test(j)?c(j,b||this.context):j)}for(;f&&f.ownerDocument&&f!==b;){for(j in i){e=i[j];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var p=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,t){for(;t&&t.ownerDocument&&t!==b;){if(p?p.index(t)>-1:c(t).is(a))return t;t=t.parentNode}return null})},index:function(a){if(!a||typeof a===
"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(sa(a[0])||sa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);ab.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||cb.test(f))&&bb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||!c(a).is(d));){a.nodeType===
1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ga=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,db=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/<tbody/i,gb=/<|&\w+;/,hb=function(a,b,d){return eb.test(d)?a:b+"></"+d+">"},G={option:[1,"<select multiple='multiple'>","</select>"],
legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};G.optgroup=G.option;G.tbody=G.tfoot=G.colgroup=G.caption=G.thead;G.th=G.td;if(!c.support.htmlSerialize)G._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);
return d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.getText(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
wrapInner:function(a){return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&
this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,
"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ga,"").replace(Y,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ta(this,b);ta(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===
1?this[0].innerHTML.replace(Ga,""):null;else if(typeof a==="string"&&!/<script/i.test(a)&&(c.support.leadingWhitespace||!Y.test(a))&&!G[(Ha.exec(a)||["",""])[1].toLowerCase()])try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){T(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}else c.isFunction(a)?this.each(function(e){var i=c(this),j=i.html();i.empty().append(function(){return a.call(this,e,j)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
this[0].parentNode){c.isFunction(a)||(a=c(a).detach());return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(t){return c.nodeName(t,"table")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}var e,i,j=a[0],o=[];if(c.isFunction(j))return this.each(function(t){var z=
c(this);a[0]=j.call(this,t,b?z.html():w);return z.domManip(a,b,d)});if(this[0]){e=a[0]&&a[0].parentNode&&a[0].parentNode.nodeType===11?{fragment:a[0].parentNode}:ua(a,this,o);if(i=e.fragment.firstChild){b=b&&c.nodeName(i,"tr");for(var p=0,n=this.length;p<n;p++)d.call(b?f(this[p],i):this[p],e.cacheable||this.length>1||p>0?e.fragment.cloneNode(true):e.fragment)}o&&c.each(o,La)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},
function(a,b){c.fn[a]=function(d){var f=[];d=c(d);for(var e=0,i=d.length;e<i;e++){var j=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),j);f=f.concat(j)}return this.pushStack(f,a,d.selector)}});c.each({remove:function(a,b){if(!a||c.filter(a,[this]).length){if(!b&&this.nodeType===1){T(this.getElementsByTagName("*"));T([this])}this.parentNode&&this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&T(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}},
function(a,b){c.fn[a]=function(){return this.each(b,arguments)}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;var e=[];c.each(a,function(i,j){if(typeof j==="number")j+="";if(j){if(typeof j==="string"&&!gb.test(j))j=b.createTextNode(j);else if(typeof j==="string"){j=j.replace(db,hb);var o=(Ha.exec(j)||["",""])[1].toLowerCase(),p=G[o]||G._default,n=p[0];i=b.createElement("div");for(i.innerHTML=p[1]+j+p[2];n--;)i=i.lastChild;
if(!c.support.tbody){n=fb.test(j);o=o==="table"&&!n?i.firstChild&&i.firstChild.childNodes:p[1]==="<table>"&&!n?i.childNodes:[];for(p=o.length-1;p>=0;--p)c.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!c.support.leadingWhitespace&&Y.test(j)&&i.insertBefore(b.createTextNode(Y.exec(j)[0]),i.firstChild);j=c.makeArray(i.childNodes)}if(j.nodeType)e.push(j);else e=c.merge(e,j)}});if(d)for(a=0;e[a];a++)if(f&&c.nodeName(e[a],"script")&&(!e[a].type||e[a].type.toLowerCase()===
"text/javascript"))f.push(e[a].parentNode?e[a].parentNode.removeChild(e[a]):e[a]);else{e[a].nodeType===1&&e.splice.apply(e,[a+1,0].concat(c.makeArray(e[a].getElementsByTagName("script"))));d.appendChild(e[a])}return e}});var ib=/z-?index|font-?weight|opacity|zoom|line-?height/i,Ia=/alpha\([^)]*\)/,Ja=/opacity=([^)]*)/,ja=/float/i,ka=/-([a-z])/ig,jb=/([A-Z])/g,kb=/^-?\d+(?:px)?$/i,lb=/^-?\d/,mb={position:"absolute",visibility:"hidden",display:"block"},nb=["Left","Right"],ob=["Top","Bottom"],pb=s.defaultView&&
s.defaultView.getComputedStyle,Ka=c.support.cssFloat?"cssFloat":"styleFloat",la=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return $(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!ib.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""===
"NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Ia.test(a)?a.replace(Ia,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Ja.exec(f.filter)[1])/100+"":""}if(ja.test(b))b=Ka;b=b.replace(ka,la);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,i=b==="width"?nb:ob;function j(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(i,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=
parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0})}a.offsetWidth!==0?j():c.swap(a,mb,j);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Ja.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ja.test(b))b=Ka;if(!d&&e&&e[b])f=e[b];else if(pb){if(ja.test(b))b="float";b=b.replace(jb,"-$1").toLowerCase();e=
a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ka,la);f=a.currentStyle[b]||a.currentStyle[d];if(!kb.test(f)&&lb.test(f)){b=e.left;var i=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=i}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=
f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var qb=K(),rb=/<script(.|\s)*?\/script>/gi,sb=/select|textarea/i,tb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,O=/=\?(&|$)/,ma=/\?/,ub=/(\?|&)_=.*?(&|$)/,vb=/^(\w+:)?\/\/([^\/?#]+)/,
wb=/%20/g;c.fn.extend({_load:c.fn.load,load:function(a,b,d){if(typeof a!=="string")return this._load(a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}c.ajax({url:a,type:f,dataType:"html",data:b,context:this,complete:function(i,j){if(j==="success"||j==="notmodified")this.html(e?c("<div />").append(i.responseText.replace(rb,
"")).find(e):i.responseText);d&&this.each(d,[i.responseText,j,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||sb.test(this.nodeName)||tb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});
c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},
ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",
text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(p,o,j,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(p,x,j);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(r,q){(e.context?c(e.context):c.event).trigger(r,q)}var e=c.extend(true,{},c.ajaxSettings,a),i,j,o,p=e.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,
e.traditional);if(e.dataType==="jsonp"){if(n==="GET")O.test(e.url)||(e.url+=(ma.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!O.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&O.test(e.data)||O.test(e.url))){i=e.jsonpCallback||"jsonp"+qb++;if(e.data)e.data=(e.data+"").replace(O,"="+i+"$1");e.url=e.url.replace(O,"="+i+"$1");e.dataType="script";A[i]=A[i]||function(r){o=r;b();d();A[i]=w;try{delete A[i]}catch(q){}B&&
B.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&n==="GET"){var t=K(),z=e.url.replace(ub,"$1_="+t+"$2");e.url=z+(z===e.url?(ma.test(e.url)?"&":"?")+"_="+t:"")}if(e.data&&n==="GET")e.url+=(ma.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");t=(t=vb.exec(e.url))&&(t[1]&&t[1]!==location.protocol||t[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&t){var B=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");
C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!i){var D=false;C.onload=C.onreadystatechange=function(){if(!D&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){D=true;b();d();C.onload=C.onreadystatechange=null;B&&C.parentNode&&B.removeChild(C)}}}B.insertBefore(C,B.firstChild);return w}var F=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",
e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}t||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ia){}if(e.beforeSend&&e.beforeSend.call(p,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",
[x,e]);var g=x.onreadystatechange=function(r){if(!x||x.readyState===0){F||d();F=true;if(x)x.onreadystatechange=c.noop}else if(!F&&x&&(x.readyState===4||r==="timeout")){F=true;x.onreadystatechange=c.noop;j=r==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";if(j==="success")try{o=c.httpData(x,e.dataType,e)}catch(q){j="parsererror"}if(j==="success"||j==="notmodified")i||b();else c.handleError(e,x,j);d();r==="timeout"&&x.abort();if(e.async)x=
null}};try{var h=x.abort;x.abort=function(){if(x){h.call(x);if(x)x.readyState=0}g()}}catch(k){}e.async&&e.timeout>0&&setTimeout(function(){x&&!F&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||A,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol===
"file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;if(e&&a.documentElement.nodeName==="parsererror")throw"parsererror";if(d&&
d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&f.indexOf("json")>=0)if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))a=A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+a))();else throw"Invalid JSON: "+a;else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(e,i){i=
c.isFunction(i)?i():i;f[f.length]=encodeURIComponent(e)+"="+encodeURIComponent(i)}var f=[];if(b===w)b=c.ajaxSettings.traditional;c.isArray(a)||a.jquery?c.each(a,function(){d(this.name,this.value)}):c.each(a,function e(i,j){if(c.isArray(j))c.each(j,function(o,p){b?d(i,p):e(i+"["+(typeof p==="object"||c.isArray(p)?o:"")+"]",p)});else!b&&j!=null&&typeof j==="object"?c.each(j,function(o,p){e(i+"["+o+"]",p)}):d(i,j)});return f.join("&").replace(wb,"+")}});var na={},xb=/toggle|show|hide/,yb=/^([+-]=)?([\d+-.]+)(.*)$/,
Z,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a!=null)return this.animate(L("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(na[d])f=na[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();
na[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a!=null)return this.animate(L("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&
c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(L("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,o=this.nodeType===1&&c(this).is(":hidden"),
p=this;for(j in a){var n=j.replace(ka,la);if(j!==n){a[n]=a[j];delete a[j];j=n}if(a[j]==="hide"&&o||a[j]==="show"&&!o)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(t,z){var B=new c.fx(p,i,t);if(xb.test(z))B[z==="toggle"?o?"show":"hide":z](a);
else{var C=yb.exec(z),D=B.cur(true)||0;if(C){z=parseFloat(C[2]);var F=C[3]||"px";if(F!=="px"){p.style[t]=(z||1)+F;D=(z||1)/B.cur(true)*D;p.style[t]=D+F}if(C[1])z=(C[1]==="-="?-1:1)*z+D;B.custom(D,z,F)}else B.custom(D,z,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle",
1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,
b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==
null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(i){return e.step(i)}this.startTime=K();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!Z)Z=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop===
"width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=K(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=
this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=
c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},stop:function(){clearInterval(Z);Z=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=
null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),
f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(t){c.offset.setOffset(this,a,t)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=
b,e=b.ownerDocument,i,j=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var p=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==j;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;i=e?e.getComputedStyle(b,null):b.currentStyle;p-=b.scrollTop;n-=b.scrollLeft;if(b===d){p+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){p+=parseFloat(i.borderTopWidth)||
0;n+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){p+=parseFloat(i.borderTopWidth)||0;n+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){p+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){p+=Math.max(j.scrollTop,o.scrollTop);n+=Math.max(j.scrollLeft,o.scrollLeft)}return{top:p,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),
d,f,e,i=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);
d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i;a.removeChild(b);c.offset.initialize=c.noop},
bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,j=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+i,left:b.left-
e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=
this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==w)return this.each(function(){if(i=wa(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=wa(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+
b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);

jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.1",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger("start",b);this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c);b._clear()})}else{this._trigger("stop",c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));a.extend(a.ui.draggable,{version:"1.7.1",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,e){var d=a(this).data("draggable"),f=d.options,b=a.extend({},e,{item:d.element});d.sortables=[];a(f.connectToSortable).each(function(){var g=a.data(this,"sortable");if(g&&!g.options.disabled){d.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",c,b)}})},stop:function(c,e){var d=a(this).data("draggable"),b=a.extend({},e,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;if(d.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,b)}})},drag:function(c,f){var e=a(this).data("draggable"),b=this;var d=function(i){var n=this.offset.click.top,m=this.offset.click.left;var g=this.positionAbs.top,k=this.positionAbs.left;var j=i.height,l=i.width;var p=i.top,h=i.left;return a.ui.isOver(g+n,k+m,p,h,j,l)};a.each(e.sortables,function(g){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(b).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=e.offset.click.top;this.instance.offset.click.left=e.offset.click.left;this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top;e._trigger("toSortable",c);e.dropped=this.instance.element;e.currentItem=e.element;this.instance.fromOutside=e}if(this.instance.currentItem){this.instance._mouseDrag(c)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}e._trigger("fromSortable",c);e.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(c,d){var b=a("body"),e=a(this).data("draggable").options;if(b.css("cursor")){e._cursor=b.css("cursor")}b.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._cursor){a("body").css("cursor",d._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(b,c){var d=a(this).data("draggable").options;a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop+f.scrollSpeed}else{if(d.pageY-c.overflowOffset.top<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop-f.scrollSpeed}}}if(!f.axis||f.axis!="y"){if((c.overflowOffset.left+c.scrollParent[0].offsetWidth)-d.pageX<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft+f.scrollSpeed}else{if(d.pageX-c.overflowOffset.left<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft-f.scrollSpeed}}}}else{if(!f.axis||f.axis!="x"){if(d.pageY-a(document).scrollTop()<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed)}else{if(a(window).height()-(d.pageY-a(document).scrollTop())<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed)}}}if(!f.axis||f.axis!="y"){if(d.pageX-a(document).scrollLeft()<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed)}else{if(a(window).width()-(d.pageX-a(document).scrollLeft())<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}}}}if(b!==false&&a.ui.ddmanager&&!f.dropBehaviour){a.ui.ddmanager.prepareOffsets(c,d)}}});a.ui.plugin.add("draggable","snap",{start:function(c,d){var b=a(this).data("draggable"),e=b.options;b.snapElements=[];a(e.snap.constructor!=String?(e.snap.items||":data(draggable)"):e.snap).each(function(){var g=a(this);var f=g.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left})}})},drag:function(u,p){var g=a(this).data("draggable"),q=g.options;var y=q.snapTolerance;var x=p.offset.left,w=x+g.helperProportions.width,f=p.offset.top,e=f+g.helperProportions.height;for(var v=g.snapElements.length-1;v>=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y<x&&x<n+y&&m-y<f&&f<A+y)||(s-y<x&&x<n+y&&m-y<e&&e<A+y)||(s-y<w&&w<n+y&&m-y<f&&f<A+y)||(s-y<w&&w<n+y&&m-y<e&&e<A+y))){if(g.snapElements[v].snapping){(g.options.snap.release&&g.options.snap.release.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=false;continue}if(q.snapMode!="inner"){var c=Math.abs(m-e)<=y;var z=Math.abs(A-f)<=y;var j=Math.abs(s-w)<=y;var k=Math.abs(n-x)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m-g.helperProportions.height,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s-g.helperProportions.width}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n}).left-g.margins.left}}var h=(c||z||j||k);if(q.snapMode!="outer"){var c=Math.abs(m-f)<=y;var z=Math.abs(A-e)<=y;var j=Math.abs(s-x)<=y;var k=Math.abs(n-w)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A-g.helperProportions.height,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[v].snapping&&(c||z||j||k||h)){(g.options.snap.snap&&g.options.snap.snap.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=(c||z||j||k||h)}}});a.ui.plugin.add("draggable","stack",{start:function(b,c){var e=a(this).data("draggable").options;var d=a.makeArray(a(e.stack.group)).sort(function(g,f){return(parseInt(a(g).css("zIndex"),10)||e.stack.min)-(parseInt(a(f).css("zIndex"),10)||e.stack.min)});a(d).each(function(f){this.style.zIndex=e.stack.min+f});this[0].style.zIndex=e.stack.min+d.length}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("zIndex")){e._zIndex=b.css("zIndex")}b.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._zIndex){a(c.helper).css("zIndex",d._zIndex)}}})})(jQuery);;
;(function(h){var m=h.scrollTo=function(b,c,g){h(window).scrollTo(b,c,g)};m.defaults={axis:'y',duration:1};m.window=function(b){return h(window).scrollable()};h.fn.scrollable=function(){return this.map(function(){var b=this.parentWindow||this.defaultView,c=this.nodeName=='#document'?b.frameElement||b:this,g=c.contentDocument||(c.contentWindow||c).document,i=c.setInterval;return c.nodeName=='IFRAME'||i&&h.browser.safari?g.body:i?g.documentElement:this})};h.fn.scrollTo=function(r,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};a=h.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=h(k),d=r,l,e={},p=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(d)){d=n(d);break}d=h(d,this);case'object':if(d.is||d.style)l=(d=h(d)).offset()}h.each(a.axis.split(''),function(b,c){var g=c=='x'?'Left':'Top',i=g.toLowerCase(),f='scroll'+g,s=k[f],t=c=='x'?'Width':'Height',v=t.toLowerCase();if(l){e[f]=l[i]+(p?0:s-o.offset()[i]);if(a.margin){e[f]-=parseInt(d.css('margin'+g))||0;e[f]-=parseInt(d.css('border'+g+'Width'))||0}e[f]+=a.offset[i]||0;if(a.over[i])e[f]+=d[v]()*a.over[i]}else e[f]=d[i];if(/^\d+$/.test(e[f]))e[f]=e[f]<=0?0:Math.min(e[f],u(t));if(!b&&a.queue){if(s!=e[f])q(a.onAfterFirst);delete e[f]}});q(a.onAfter);function q(b){o.animate(e,j,a.easing,b&&function(){b.call(this,r,a)})};function u(b){var c='scroll'+b,g=k.ownerDocument;return p?Math.max(g.documentElement[c],g.body[c]):k[c]}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery);
jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1}var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000))}else{date=options.expires}expires='; expires='+date.toUTCString()}var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('')}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break}}}return cookieValue}};
var JSON = {}; 
JSON.parse = function(s) {
    try {
        return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(
                                   s.replace(/"(\\.|[^"\\])*"/g, ''))) &&
            eval('(' + s + ')');
    }
    catch (e) {
        return false;
    }
};
(function () {
    var m = {
            '\b': '\\b', '\t': '\\t',  '\n': '\\n', '\f': '\\f',
            '\r': '\\r', '"' : '\\"',  '\\': '\\\\'
        },
        s = {
            'boolean': function (x) { return String(x); },
            'null': function (x) { return "null"; },
            number: function (x) { return isFinite(x) ? String(x) : 'null'; },
            string: function (x) {
                if (/["\\\x00-\x1f]/.test(x)) {
                    x = x.replace(/([\x00-\x1f\\"])/g, function(a, b) {
                        var c = m[b];
                        if (c) {
                            return c;
                        }
                        c = b.charCodeAt();
                        return '\\u00' +
                            Math.floor(c / 16).toString(16) +
                            (c % 16).toString(16);
                    });
                }
                return '"' + x + '"';
            },
            array: function (x) {
                var a = ['['], b, f, i, l = x.length, v;
                for (i = 0; i < l; i += 1) {
                    v = x[i];
                    f = s[typeof v];
                    if (f) {
                        v = f(v);
                        if (typeof v == 'string') {
                            if (b) {
                                a[a.length] = ',';
                            }
                            a[a.length] = v;
                            b = true;
                        }
                    }
                }
                a[a.length] = ']';
                return a.join('');
            },
            object: function (x) {
                if (x) {
                    if (x instanceof Array) {
                        return s.array(x);
                    }
                    var a = ['{'], b, f, i, v;
                    for (i in x) {
                        v = x[i];
                        f = s[typeof v];
                        if (f) {
                            v = f(v);
                            if (typeof v == 'string') {
                                if (b) {
                                    a[a.length] = ',';
                                }
                                a.push(s.string(i), ':', v);
                                b = true;
                            }
                        }
                    }
                    a[a.length] = '}';
                    return a.join('');
                }
                return 'null';
            }
        };
    JSON.serialize = function(o) { return s.object(o); };
})();
/* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2 */
(function($) { $.fn.hoverIntent = function(f, g) { var cfg = { sensitivity: 7, interval: 100, timeout: 0 }; cfg = $.extend(cfg, g ? { over: f, out: g} : f); var cX, cY, pX, pY; var track = function(ev) { cX = ev.pageX; cY = ev.pageY; }; var compare = function(ev, ob) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); if ((Math.abs(pX - cX) + Math.abs(pY - cY)) < cfg.sensitivity) { $(ob).unbind("mousemove", track); ob.hoverIntent_s = 1; return cfg.over.apply(ob, [ev]); } else { pX = cX; pY = cY; ob.hoverIntent_t = setTimeout(function() { compare(ev, ob); }, cfg.interval); } }; var delay = function(ev, ob) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); ob.hoverIntent_s = 0; return cfg.out.apply(ob, [ev]); }; var handleHover = function(e) { var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget; while (p && p != this) { try { p = p.parentNode; } catch (e) { p = this; } } if (p == this) { return false; } var ev = jQuery.extend({}, e); var ob = this; if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); } if (e.type == "mouseover") { pX = ev.pageX; pY = ev.pageY; $(ob).bind("mousemove", track); if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout(function() { compare(ev, ob); }, cfg.interval); } } else { $(ob).unbind("mousemove", track); if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout(function() { delay(ev, ob); }, cfg.timeout); } } }; return this.mouseover(handleHover).mouseout(handleHover); }; })(jQuery);

function openHotelLightBox(hotelId,catId){
    $("select.start-page-select-country-and-resort").hide();
    $("div#light-box").removeClass("light-box-layer").addClass("unique-lightbox").css("height", $(document).height() + 630 + "px").show();
    $("div#light-box-content").css("top", "10px").load(String.format("/BlueSites/Templates/DynamicContent/BlueUnique.aspx?hotel={0}&cat={1}", hotelId, catId), function() {
        $.getScript(oBaseAppSettings.IncludeSiteDirectory+"/Js/JQuery/reflection.js", function() {
            setTimeout('addReflections()', 100);
            Cufon.replace('span.blue-unique-second-heading', { fontFamily: 'TUIType' })('span.grade', { fontFamily: 'TUIType' })('span.cityname', { fontFamily: 'TUIType' })('span#image-counter', { fontFamily: 'TUIType' });
        });
    }).fadeIn("slow");
    scroll(0,0);
}
function openLightBox(id,catId){
    $("select.start-page-select-country-and-resort").hide();
    $("div#light-box").removeClass("light-box-layer").addClass("unique-lightbox").css("height", $(document).height() + 680 + "px").show();
    $("div#light-box-content").css("top", "10px").load(String.format("/BlueSites/Templates/DynamicContent/BlueUnique.aspx?index={0}&cat={1}", id, catId), function() {
        $.getScript(oBaseAppSettings.IncludeSiteDirectory+"/Js/JQuery/reflection.js", function() {
            $.getScript(oBaseAppSettings.IncludeSiteDirectory+"/Js/JQuery/jquery.scrollfollow.js", function() {
                addReflections();
                Cufon.replace('span.blue-unique-second-heading', { fontFamily: 'TUIType' })('span.grade', { fontFamily: 'TUIType' })('span.cityname', { fontFamily: 'TUIType' })('span#image-counter', { fontFamily: 'TUIType' });
                $('img.unique-arrow-left').scrollFollow({ speed: 300, offset: 200 });
                $('img.unique-arrow-right').scrollFollow({ speed: 300, offset: 200 });
            });
        });
    }).fadeIn("slow");
    scroll(0,0);
}
function openGenericLightBox(epiId, width){
    var w=0;
    if (typeof (width) != 'undefined'){
        w=width;
    }

    $("select.start-page-select-country-and-resort").hide();
    $("div#light-box").removeClass("light-box-layer").addClass("unique-lightbox").css("height", $(document).height() + 100 + "px").show();
    $("div#light-box-content").css("top", "10px").load("/BlueSites/Templates/DynamicContent/GenericContent.aspx?epiid=" + epiId + "&width=" + w, function() {

    }).fadeIn("slow");
    scroll(0,0);
}
$(document).ready(function() {
    $("a#open-light-box").click(function() {
        var rel = $(this).attr("rel");
        if (rel.indexOf("|") == -1) {
            rel = rel + "|" + 324;
        }
        var arr = rel.split("|");
        openHotelLightBox(arr[0], arr[1]);
    });
    $("#toggler-container a").click(function() {
        $("#toggler-container a").removeClass("selected");
        $(this).addClass("selected");

        var currentId = $(this).attr("id").replace("listItem_", "");
        $("#expandPanelImage").attr("src", $("#hidden_" + currentId).attr("value"));

        $(".box-extra-info-expand").removeClass("display-block").addClass("display-none");
        $("#container_" + currentId).removeClass("display-none").addClass("display-block");
    });
    $("a.close-expand-panel-JS, a.close-link").click(function() {
        var currentId = $(this).attr("id").replace("close_", "");
        $("#container_" + currentId).removeClass("display-block").addClass("display-none");
        $("#listItem_" + currentId).removeClass("selected");
        return false;
    });
    $('div#flash-map-small div#flash-container a.map-link, #page #select-country-or-map a').click(function(event) {
        event.preventDefault();
        if ($("div.dialog-google-maps").length == 0) {
            var mapsUrl = "/BlueSites/Templates/DynamicContent/GoogleMapsOverView.aspx";
            var dialogControl = TUI.Web.UI.WebControls.Dialog.createNewGlobalDialog({ 'innerHtmlCenter': '<iframe frameborder="0" scrolling="no" src="' + mapsUrl + '"></iframe>', 'showOverlay': true, 'isDraggable': true }, 'dialog-google-maps');
            $("div#light-box").css("height", $(document).height() + 100 + "px").show();
            dialogControl.show();
            $("div.dialog-google-maps").css({ zIndex: "101", position: "absolute" }).find("a.dialog-top-close-link").click(function() {
                $("div#light-box").hide();
            });
            $("div.dialog-overlay").hide();
        }
        else {
            $("div#light-box, div.dialog-google-maps").css("visibility", "visible").show();
        }
        return false;
    });
});
function triggerOpenLightBox2(){openLightBox(this.id);}
function triggerOpenLightBox(id,catId){openLightBox(id,catId);}
function triggerOpenGenericLightBox(id, width){openGenericLightBox(id,width);}
    
/** SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php */
if(typeof deconcept=="undefined")var deconcept=new Object();if(typeof deconcept.util=="undefined")deconcept.util=new Object();
if(typeof deconcept.SWFObjectUtil=="undefined")deconcept.SWFObjectUtil=new Object();deconcept.SWFObject=function(swf,id,w,h,ver,c,quality,xiRedirectUrl,redirectUrl,detectKey){
	if(!document.getElementById){return;}this.DETECT_KEY=detectKey?detectKey:'detectflash';this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();
	this.attributes=new Array();if(swf){this.setAttribute('swf',swf);}if(id){this.setAttribute('id',id);}if(w){this.setAttribute('width',w);}
	if(h){this.setAttribute('height',h);}
	if(ver){this.setAttribute('version',new deconcept.PlayerVersion(ver.toString().split(".")));}
	this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
	if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}
	if(c){this.addParam('bgcolor',c);}var q=quality?quality:'high';
	this.addParam('quality',q);this.setAttribute('useExpressInstall',false);
	this.setAttribute('doExpressInstall',false);var xir=(xiRedirectUrl)?xiRedirectUrl:window.location;
	this.setAttribute('xiRedirectUrl',xir);this.setAttribute('redirectUrl','');
	if(redirectUrl){this.setAttribute('redirectUrl',redirectUrl);}}
deconcept.SWFObject.prototype={useExpressInstall: function(path){this.xiSWFPath=!path?"expressinstall.swf":path;
		this.setAttribute('useExpressInstall',true);},setAttribute: function(name,value){this.attributes[name]=value;
	},getAttribute: function(name){return this.attributes[name];},addParam: function(name,value){this.params[name] = value;},getParams: function(){
		return this.params;},addVariable: function(name,value){this.variables[name]=value;},getVariable: function(name){return this.variables[name];
	},getVariables: function(){return this.variables;},getVariablePairs: function(){var variablePairs=new Array();var key;var variables=this.getVariables();
		for(key in variables){variablePairs[variablePairs.length]=key+"="+variables[key];}return variablePairs;},getSWFHTML: function(){var swfNode="";
		if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");
				this.setAttribute('swf', this.xiSWFPath);}
			swfNode='<embed type="application/x-shockwave-flash" src="'+this.getAttribute('swf')+'" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" style="'+this.getAttribute('style')+'"';
			swfNode+=' id="'+this.getAttribute('id')+'" name="'+this.getAttribute('id')+'" ';var params=this.getParams(); for(var key in params){swfNode+=[key]+'="'+params[key]+'" ';}
			var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='flashvars="'+pairs+'"';}swfNode+='/>';}else{if(this.getAttribute("doExpressInstall")){
				this.addVariable("MMplayerType","ActiveX");this.setAttribute('swf',this.xiSWFPath);}swfNode='<object id="'+this.getAttribute('id')+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" style="'+this.getAttribute('style')+'">';
			swfNode+='<param name="movie" value="'+this.getAttribute('swf')+'" />';var params=this.getParams();	for(var key in params){swfNode+='<param name="'+key+'" value="'+params[key]+'" />';}
			var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='<param name="flashvars" value="'+pairs+'" />';}swfNode+="</object>";}return swfNode;
	},write: function(elementId){if(this.getAttribute('useExpressInstall')){var expressInstallReqVer=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(expressInstallReqVer)&&!this.installedVer.versionIsValid(this.getAttribute('version'))){
				this.setAttribute('doExpressInstall',true);this.addVariable("MMredirectURL",escape(this.getAttribute('xiRedirectUrl')));document.title=document.title.slice(0,47)+" - Flash Player Installation";
				this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute('doExpressInstall')||this.installedVer.versionIsValid(this.getAttribute('version'))){
			var n=(typeof elementId=='string')?document.getElementById(elementId):elementId;n.innerHTML=this.getSWFHTML();return true;}else{
			if(this.getAttribute('redirectUrl')!=""){document.location.replace(this.getAttribute('redirectUrl'));}}return false;}}
deconcept.SWFObjectUtil.getPlayerVersion=function(){var PlayerVersion=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){
		var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){PlayerVersion=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
	}else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var counter=3;while(axo){try{counter++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+counter);
				PlayerVersion=new deconcept.PlayerVersion([counter,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{
				var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");PlayerVersion=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";
			}catch(e){if(PlayerVersion.major==6){return PlayerVersion;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){PlayerVersion=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}
	}return PlayerVersion;}
deconcept.PlayerVersion=function(arrVersion){
	this.major=arrVersion[0]!=null?parseInt(arrVersion[0]):0;this.minor=arrVersion[1]!=null?parseInt(arrVersion[1]):0;this.rev=arrVersion[2]!=null?parseInt(arrVersion[2]):0;}
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
	if(this.major<fv.major)return false; if(this.major>fv.major)return true; if(this.minor<fv.minor)return false; if(this.minor>fv.minor)return true; if(this.rev<fv.rev)return false; return true;}
deconcept.util={
	getRequestParameter: function(param){
		var q=document.location.search||document.location.hash;
		if(param==null){return q;}
		if(q){var pairs=q.substring(1).split("&");
			for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return pairs[i].substring((pairs[i].indexOf("=")+1));}}}return "";}}
deconcept.SWFObjectUtil.cleanupSWFs=function(){
	var objects=document.getElementsByTagName("OBJECT");
	for(var i=objects.length-1;i>=0;i--){
		objects[i].style.display='none';
		for(var x in objects[i]){if(typeof objects[i][x]=='function'){objects[i][x]=function(){};}}}}
if(deconcept.SWFObject.doPrepUnload){
	if(!deconcept.unloadSet){
		deconcept.SWFObjectUtil.prepUnload=function(){
			__flash_unloadHandler=function(){};
			__flash_savedUnloadHandler=function(){};
			window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);}
		window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
		deconcept.unloadSet=true;}}
if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

/** getXML - sets text for specified object from call to specified url
* @param strURL					- url to get
* @param oElmToPresentContentIn	- element to set innerHTML for
* @param doAfterCompletion			- optional. function to call after completion /TS (T1)
*/
function getXML(strURL, oElmToPresentContentIn, doAfterCompletion) {
    if (!oElmToPresentContentIn)
        return;

    var oXMLHTTPRequest;
    var strHTML;
    if (typeof XMLHttpRequest != "undefined") { oXMLHTTPRequest = new XMLHttpRequest(); }
    else if (typeof window.ActiveXObject != "undefined") {
        try { oXMLHTTPRequest = new ActiveXObject("Msxml2.XMLHTTP.4.0"); }
        catch (e) {
            try { oXMLHTTPRequest = new ActiveXObject("MSXML2.XMLHTTP"); }
            catch (e) {
                try { oXMLHTTPRequest = new ActiveXObject("Microsoft.XMLHTTP"); }
                catch (e) { oXMLHTTPRequest = null; alert(strSorryXmlHttp); } 
            } 
        } 
    }
    else { alert(strSorryXmlHttp); }
    if (oXMLHTTPRequest) {
        oXMLHTTPRequest.onreadystatechange = function() {
            if (oXMLHTTPRequest.readyState == 4) {
                try {
                    strHTML = oXMLHTTPRequest.responseText;
                    oElmToPresentContentIn.innerHTML = strHTML;
                    if (doAfterCompletion)	// perform extra task after load?
                        doAfterCompletion();
                    this.onreadystatechange = new function() { };
                    if (oXMLHTTPRequest && typeof oXMLHTTPRequest.abort == "function") {
                        oXMLHTTPRequest.abort();
                        oXMLHTTPRequest = null;
                    } 
                }
                catch (e) { }
                return true;
            } 
        }
        oXMLHTTPRequest.open("GET", strURL, true);
        oXMLHTTPRequest.send(null);
    }
    return oXMLHTTPRequest;
}
function getJavaScriptArray(strURL, oFunctionToCall) {
    var oXMLHTTPRequest;
    var strHTML;
    if (typeof XMLHttpRequest != "undefined") { oXMLHTTPRequest = new XMLHttpRequest(); }
    else if (typeof window.ActiveXObject != "undefined") {
        try { oXMLHTTPRequest = new ActiveXObject("Msxml2.XMLHTTP.4.0"); }
        catch (e) {
            try { oXMLHTTPRequest = new ActiveXObject("MSXML2.XMLHTTP"); }
            catch (e) {
                try { oXMLHTTPRequest = new ActiveXObject("Microsoft.XMLHTTP"); }
                catch (e) { oXMLHTTPRequest = null; alert(strSorryXmlHttp); } 
            } 
        } 
    }
    else { alert(strSorryXmlHttp); }
    if (oXMLHTTPRequest) {
        oXMLHTTPRequest.onreadystatechange = function() {
            if (oXMLHTTPRequest.readyState == 4) {
                strJavaScript = oXMLHTTPRequest.responseText;
                strJavaScript = strJavaScript.substring(0, strJavaScript.lastIndexOf(']') + 1);
                if (oFunctionToCall)
                    eval(oFunctionToCall + "(" + strJavaScript.replace(/[\n\r\t]/g, "") + ")");
                this.onreadystatechange = new function() { };
                if (oXMLHTTPRequest && typeof oXMLHTTPRequest.abort == "function") {
                    oXMLHTTPRequest.abort();
                    oXMLHTTPRequest = null;
                }
                return true;
            } 
        }
        oXMLHTTPRequest.open("GET", strURL, true);
        oXMLHTTPRequest.send(null);
    } 
}
function getJavaScriptArrayWithIdentifier(strId, strURL, oFunctionToCall) {
    var oXMLHTTPRequest;
    var strHTML;
    if (typeof XMLHttpRequest != "undefined") { oXMLHTTPRequest = new XMLHttpRequest(); }
    else if (typeof window.ActiveXObject != "undefined") {
        try { oXMLHTTPRequest = new ActiveXObject("Msxml2.XMLHTTP.4.0"); }
        catch (e) {
            try { oXMLHTTPRequest = new ActiveXObject("MSXML2.XMLHTTP"); }
            catch (e) {
                try { oXMLHTTPRequest = new ActiveXObject("Microsoft.XMLHTTP"); }
                catch (e) { oXMLHTTPRequest = null; alert(strSorryXmlHttp); } 
            } 
        } 
    }
    else { alert(strSorryXmlHttp); }
    if (oXMLHTTPRequest) {
        oXMLHTTPRequest.onreadystatechange = function() {
            if (oXMLHTTPRequest.readyState == 4) {
                strJavaScript = oXMLHTTPRequest.responseText;
                if (oFunctionToCall) {
                    strJavaScript = strJavaScript.substring(0, strJavaScript.lastIndexOf(']') + 1);
                    var toDo = oFunctionToCall + "('" + strId + "'," + strJavaScript.replace(/[\n\r\t]/g, "") + ")";
                    try { eval(toDo); }
                    catch (e) { }
                }
                this.onreadystatechange = new function() { };
                if (oXMLHTTPRequest && typeof oXMLHTTPRequest.abort == "function") {
                    oXMLHTTPRequest.abort();
                    oXMLHTTPRequest = null;
                }
                return true;
            }
        }
        oXMLHTTPRequest.open("GET", strURL, true);
        oXMLHTTPRequest.send(null);
    } 
}

//Humany
$(document).ready(function() {
    $("#humanySuggestSearchInput").keyup(function(event) {
        clearTimeout(timer);
        if (event.keyCode == 13) {
            var selectedIndex = $("div#humanySuggestResult div.entry-item").index($("div#humanySuggestResult div.hover"));
            if (selectedIndex > -1) {
                browseToItem(selectedIndex);
            } else {
                browseToLargeSearch();
            }
            return;
        } else if (event.keyCode == 38 || event.keyCode == 40) {
            step(event.keyCode);
            return;
        }
        timer = setTimeout("initHumanySearch()", 500);
        $("#humanySuggestSearchInput").addClass("searching");
    });

    // For notfound page
    $("#not-found #search-field").keyup(function(event) {
        clearTimeout(timer);
        if (event.keyCode == 13) {            
                browseToLargeSearch();           
            return;
        } else if (event.keyCode == 38 || event.keyCode == 40) {
            step(event.keyCode);
            return;
        }
    });

    $("#humanySearchInput").keyup(function() {
        clearTimeout(timer);
        timer = setTimeout("initHumanySearchLarge()", 500);
        $("#humanySearchInput").addClass("searching");
    });

    $("input#humanySearchSubmit, input.search-humany-button").click(function(event) {
        event.preventDefault();
        browseToLargeSearch();
        //$("div#humanySuggestResult").show();
        return false;
    });

    $("#humanySuggestSearchInput, #humanySearchInput").keydown(function(event) {
        return (event.keyCode != 13);
    });

    $("#humanySuggestSearchInput").focus(function() {
        if (($("div#humanySuggestResult").children("div").length > 0) && ($.trim($(this).val()) != "") && ($.trim($(this).val()) != initialTextValue)) {
            $("div#humanySuggestResult").show();
            $("#panorama-container").css("visibility", "hidden");
        }
        else {
            $("#panorama-container").css("visibility", "visible");
        }
    });

    oTabHelper = new TabHelper();
    oTabHelper.listItemsTop.children("a").click(toggleTabContent);
    oTabHelper.listItemsRight.children("a").click(toggleTabContent);

    $("div.tab-content div.section-header span.item-count a").click(function() {
        selectedTab = $("ul.tabs-large li a").eq(($("div.tab-content div.section-container").index($(this).parents("div.section-container:first")) + 1));
        $(document).scrollTo(250, 500, function() {
            selectedTab.trigger("click");
        });
    });

    initialTextValue = getInitialTextValue();
});

HumanyEventTracker = function() {
    this.SearchType = "Search box";
    this.NoResult = false;
    this.NoResultURIAttr = "&gaCat2=No result";
    this.SetSearchType = function() {
        if ($("div#search-box input#humanySearchInput").length > 0) { this.SearchType = "Actual search page"; }
    }
    this.NoOfHits = 0;
    this.SearchPhrase = "";
    this.SearchPhrasePrevious = this.SearchPhrase;
    this.SetSearchPhrase = function(searchPhrase) {
        this.SearchPhrase = $.trim(searchPhrase);
    }
    this.SetCountryResult = function(numberOfHits) {
        this.NoOfHits += numberOfHits;
    }
    this.SetDestinationResult = function(numberOfHits) {
        this.NoOfHits += numberOfHits;
    }
    this.SetHotelResult = function(numberOfHits) {
        this.NoOfHits += numberOfHits;
    }
    this.SetFaqResult = function(numberOfHits) {
        this.NoOfHits += numberOfHits;
    }
    this.SetExcursionResult = function(numberOfHits) {
        this.NoOfHits += numberOfHits;
    }
    this.SendEvent = function(pageNum) {
        if (this.SearchPhrase == "" || this.SearchPhrase == "undefined" || typeof (this.SearchPhrase) == "undefined") {
            return;
        }
        if ((pageNum == 1) && (this.SearchPhrase != this.SearchPhrasePrevious)) {
            this.SetSearchType();
            this.NoResult = (!this.NoOfHits > 0);
            try {
                var siteSearchURI = encodeURI(WebGuideStrings.showAllLinkUrl + "?gaEntry=" + this.SearchPhrase + "&gaCat1=" + this.SearchType + ((this.NoResult) ? this.NoResultURIAttr : "") + "&view=" + Math.ceil(999999 * Math.random()));
                //$("body").prepend("<b>" + this.SearchType + ", " + this.NoOfHits + ", " + siteSearchURI + "</b><br/>");
                _gaq.push(['_trackPageview', siteSearchURI]);
            } catch (err) { }
        }
        this.SearchPhrasePrevious = this.SearchPhrase;
        this.NoOfHits = 0;
    }
}
humanyEventTracker = new HumanyEventTracker();

var defaultItemsPerPage = 10;
var itemsPerPage = 10;
var itemsPerSuggestion = 2;
var oTabHelper = null;
TabHelper = function() {
    this.selectedIndex = 1;
    this.listTop = $("ul.tabs-large");
    this.listItemsTop = this.listTop.children("li");
    this.listRight = $("div.right-column ul.tab-links");
    this.listItemsRight = this.listRight.children("li");
}

toggleTabContent = function(event) {
    event.preventDefault();
    if ($(this).parent("li").hasClass("disabled")) {
        return false;
    }
    oTabHelper.selectedIndex = $(this).parents("ul:first").find("li a").index(this);
    oTabHelper.listItemsTop.removeClass("selected");
    oTabHelper.listItemsRight.removeClass("selected");

    oTabHelper.listItemsTop.eq(oTabHelper.selectedIndex).addClass("selected");
    oTabHelper.listItemsRight.eq(oTabHelper.selectedIndex).addClass("selected");

    $("div#tab-box-large").attr("class", "tab-box-large-left tab-selected-" + (oTabHelper.selectedIndex + 1));

    if (oTabHelper.selectedIndex == 0) {
        itemsPerPage = 10;
        if (typeof ($("div.countries div.country-result")[0].itemsPerPage) != "undefined" && $("div.countries div.country-result")[0].itemsPerPage != itemsPerPage && $("div.countries div.country-result")[0].numberOfHits > defaultItemsPerPage) {
            getPagedCountries($("div.countries div.country-result").html("").addClass("searching"), 1);
        }
        if (typeof ($("div.destinations div.destination-result")[0].itemsPerPage) != "undefined" && $("div.destinations div.destination-result")[0].itemsPerPage != itemsPerPage && $("div.destinations div.destination-result")[0].numberOfHits > defaultItemsPerPage) {
            getPagedDestinations($("div.destinations div.destination-result").html("").addClass("searching"), 1);
        }
        if (typeof ($("div.hotels div.hotel-result")[0].itemsPerPage) != "undefined" && $("div.hotels div.hotel-result")[0].itemsPerPage != itemsPerPage && $("div.hotels div.hotel-result")[0].numberOfHits > defaultItemsPerPage) {
            getPagedHotels($("div.hotels div.hotel-result").html("").addClass("searching"), 1);
        }
        if (typeof ($("div.excursions div.excursion-result")[0].itemsPerPage) != "undefined" && $("div.excursions div.excursion-result")[0].itemsPerPage != itemsPerPage && $("div.excursions div.excursion-result")[0].numberOfHits > defaultItemsPerPage) {
            getPagedExcursions($("div.excursions div.excursion-result").html("").addClass("searching"), 1);
        }
    }
    else if (oTabHelper.selectedIndex == 2) {
        itemsPerPage = 30;
        if (typeof ($("div.countries div.country-result")[0].itemsPerPage) != "undefined" && $("div.countries div.country-result")[0].itemsPerPage != itemsPerPage && $("div.countries div.country-result")[0].numberOfHits > defaultItemsPerPage) {
            getPagedCountries($("div.countries div.country-result").html("").addClass("searching"), 1);
        }
    }
    else if (oTabHelper.selectedIndex == 3) {
        itemsPerPage = 30;
        if (typeof ($("div.destinations div.destination-result")[0].itemsPerPage) != "undefined" && $("div.destinations div.destination-result")[0].itemsPerPage != itemsPerPage && $("div.destinations div.destination-result")[0].numberOfHits > defaultItemsPerPage) {
            getPagedDestinations($("div.destinations div.destination-result").html("").addClass("searching"), 1);
        }
    }
    else if (oTabHelper.selectedIndex == 4) {
        itemsPerPage = 30;
        if (typeof ($("div.hotels div.hotel-result")[0].itemsPerPage) != "undefined" && $("div.hotels div.hotel-result")[0].itemsPerPage != itemsPerPage && $("div.hotels div.hotel-result")[0].numberOfHits > defaultItemsPerPage) {
            getPagedHotels($("div.hotels div.hotel-result").html("").addClass("searching"), 1);
        }
    }
    else if (oTabHelper.selectedIndex == 5) {
        itemsPerPage = 30;
        if (typeof ($("div.excursions div.excursion-result")[0].itemsPerPage) != "undefined" && $("div.excursions div.excursion-result")[0].itemsPerPage != itemsPerPage && $("div.excursions div.excursion-result")[0].numberOfHits > defaultItemsPerPage) {
            getPagedExcursions($("div.excursions div.excursion-result").html("").addClass("searching"), 1);
        }
    }
}

var timer = null;
initHumanySearch = function() {
    clearTimeout(timer);
    timer = null;
    performHumanySearch();
}

initHumanySearchLarge = function() {
    clearTimeout(timer);
    timer = null;
    performHumanySearchLarge();
}

var loadingContainersTimer = null;
checkForLoadingContainers = function() {
    clearTimeout(loadingContainersTimer);
    loadingContainersTimer = null;
    if ($("div#humanySuggestResult").length > 0) { $("div#humanySuggestResult div.searching").removeClass("searching").addClass("empty"); }
    else if ($("div#humany-container").length > 0) { $("div#humany-container div.searching").removeClass("searching").addClass("empty"); }
}

initCheckForLoadingContainers = function() {
    if (loadingContainersTimer == null && timer == null) { loadingContainersTimer = setTimeout("checkForLoadingContainers()", 1500); }
}

getInitialTextValue = function() {
    if ($("#humanySuggestSearchInput").length > 0) {
        return $("#humanySuggestSearchInput").val();
    }
    else {
        return "";
    }
}

var currentSearchText = "";
var initialTextValue = "";
performHumanySearch = function() {
    var inputValue = $.trim($("#humanySuggestSearchInput").val()).toLowerCase();
    if (inputValue == "" || inputValue == "undefined" || typeof (inputValue) == "undefined") {
        $("#humanySuggestResult").hide();
        $("#humanySuggestSearchInput").removeClass("searching");
        currentSearchText = "";
        return;
    }
    else if ((inputValue == currentSearchText) || (inputValue == initialTextValue)) {
        $("#humanySuggestSearchInput").removeClass("searching");
        return;
    }
    currentSearchText = inputValue;
    var loadingResultHTML =
        "<div class=\"entry-top\">" +
            "<a href=\"javascript:void(0)\"><img src=\"" + oBaseAppSettings.IncludeSiteDirectory + "/Images/BlueSites/Humany/1/btn_close.png\" alt=\"\" /></a>" +
        "</div>" +
        "<div class=\"entry-middle\">" +
            "<div class=\"entry-result\"></div>" +
        "</div>" +
        "<div class=\"entry-bottom\"><a href=\"" + WebGuideStrings.showAllLinkUrl + "?humanyEntry=" + currentSearchText + "&view=" + Math.ceil(999999 * Math.random()) + "\">" + WebGuideStrings.showAllOnOwnPage + " &#187;</a></div>" +
        "<div class=\"clear\"></div>";
    $("#humanySuggestResult").html(loadingResultHTML).show();
    $("#humanySuggestResult .entry-top a").click(function() { $("#humanySuggestResult").hide(); $("#panorama-container").css("visibility", "visible"); });
    var resultHTML =
        "<div class=\"countries searching\">" +
            "<span class=\"status\"></span><h3>" + WebGuideStrings.countries + "</h3>" +
        "</div>" +
        "<div class=\"destinations searching\">" +
            "<span class=\"status\"></span><h3>" + WebGuideStrings.destinations + "</h3>" +
        "</div>" +
        "<div class=\"hotels searching\">" +
            "<span class=\"status\"></span><h3>" + WebGuideStrings.hotels + "</h3>" +
        "</div>" +
        "<div class=\"excursions searching\">" +
            "<span class=\"status\"></span><h3>" + WebGuideStrings.excursions + "</h3>" +
        "</div>" +
        "<div class=\"faq searching\">" +
            "<h3>" + WebGuideStrings.faq + "</h3>" +
        "</div>" +
        "<div class=\"all-empty\">" +
            "<h3>&#160;</h3>" +
            "<div class=\"text-item\">" + WebGuideStrings.searchNoResult + "</div>" +
        "</div>";
    var resultElems = $(resultHTML);
    $("#panorama-container").css("visibility", "hidden");
    $("#humanySuggestResult div.entry-result").html("").append(resultElems);

    humanyEventTracker.SetSearchPhrase(inputValue);

    $.getJSON("http://fritidsresor.humany.com/" + WebGuideStrings.countryCode + "/json_flat.asp?entry=" + escape(inputValue) + "&type=country&pageSize=" + itemsPerSuggestion + "&pageNumber=1&suggest=true&callback=?", function(data) {
        var entryHTML = "";
        var entryCounter = 0;
        if (data.country != null) {
            $.each(data.country, function(ientry, entry) {
                if (entryCounter < itemsPerSuggestion) {
                    entryHTML += getItemHTML(entryCounter, entry);
                }
                entryCounter++;
            });
        }
        humanyEventTracker.SetCountryResult(data.numberOfHits);
        resultElems.eq(0).children("span.status").html(String.format(WebGuideStrings.textNumberOfHits, ((entryCounter > itemsPerSuggestion) ? itemsPerSuggestion : entryCounter), data.numberOfHits));
        resultElems.eq(0).children("h3").after(entryHTML);
        if (resultElems.eq(0).children("div.entry-item").length > 0) {
            resultElems.eq(0).removeClass("searching").show();
            bindEntryItemEvents(resultElems.eq(0).children("div.entry-item"));
        } else { resultElems.eq(0).removeClass("searching").addClass("empty"); }
        if (resultElems.filter(".empty").length == 5) { $("div#humanySuggestResult div.all-empty").show(); humanyEventTracker.SendEvent(1); }
        else if (resultElems.filter(".searching").length == 0) { resultElems.find("span.status:visible").eq(0).addClass("first"); humanyEventTracker.SendEvent(1); }
        $("#humanySuggestSearchInput").removeClass("searching");
        initCheckForLoadingContainers();
    });

    $.getJSON("http://fritidsresor.humany.com/" + WebGuideStrings.countryCode + "/json_flat.asp?entry=" + escape(inputValue) + "&type=destination&pageSize=" + itemsPerSuggestion + "&pageNumber=1&suggest=true&callback=?", function(data) {
        var destinationHTML = "";
        var destinationCounter = 0;
        if (data.destination != null) {
            $.each(data.destination, function(idestination, destination) {
                if (typeof (destination.name) != "undefined") {
                    if (destinationCounter < itemsPerSuggestion) {
                        destinationHTML += getItemHTML(destinationCounter, destination);
                    }
                    destinationCounter++;
                }
            });
        }
        humanyEventTracker.SetDestinationResult(data.numberOfHits);
        resultElems.eq(1).children("span.status").html(String.format(WebGuideStrings.textNumberOfHits, ((destinationCounter > itemsPerSuggestion) ? itemsPerSuggestion : destinationCounter), data.numberOfHits));
        resultElems.eq(1).children("h3").after(destinationHTML);
        if (resultElems.eq(1).children("div.entry-item").length > 0) {
            resultElems.eq(1).removeClass("searching").show();
            bindEntryItemEvents(resultElems.eq(1).children("div.entry-item"));
        } else { resultElems.eq(1).removeClass("searching").addClass("empty"); }
        if (resultElems.filter(".empty").length == 5) { $("div#humanySuggestResult div.all-empty").show(); humanyEventTracker.SendEvent(1); }
        else if (resultElems.filter(".searching").length == 0) { resultElems.find("span.status:visible").eq(0).addClass("first"); humanyEventTracker.SendEvent(1); }
        $("#humanySuggestSearchInput").removeClass("searching");
        initCheckForLoadingContainers();
    });

    $.getJSON("http://fritidsresor.humany.com/" + WebGuideStrings.countryCode + "/json_flat.asp?entry=" + escape(inputValue) + "&type=hotel&pageSize=" + itemsPerSuggestion + "&pageNumber=1&suggest=true&callback=?", function(data) {
        var hotelHTML = "";
        var hotelCounter = 0;
        if (data.hotel != null) {
            $.each(data.hotel, function(ihotel, hotel) {
                if (hotelCounter < itemsPerSuggestion) {
                    hotelHTML += getItemHTML(hotelCounter, hotel);
                }
                hotelCounter++;
            });
        }
        humanyEventTracker.SetHotelResult(data.numberOfHits);
        resultElems.eq(2).children("span.status").html(String.format(WebGuideStrings.textNumberOfHits, ((hotelCounter > itemsPerSuggestion) ? itemsPerSuggestion : hotelCounter), data.numberOfHits));
        resultElems.eq(2).children("h3").after(hotelHTML);
        if (resultElems.eq(2).children("div.entry-item").length > 0) {
            resultElems.eq(2).removeClass("searching").show();
            bindEntryItemEvents(resultElems.eq(2).children("div.entry-item"));
        } else { resultElems.eq(2).removeClass("searching").addClass("empty"); }
        if (resultElems.filter(".empty").length == 5) { $("div#humanySuggestResult div.all-empty").show(); humanyEventTracker.SendEvent(1); }
        else if (resultElems.filter(".searching").length == 0) { resultElems.find("span.status:visible").eq(0).addClass("first"); humanyEventTracker.SendEvent(1); }
        $("#humanySuggestSearchInput").removeClass("searching");
        initCheckForLoadingContainers();
    });
    $.getJSON("http://fritidsresor.humany.com/" + WebGuideStrings.countryCode + "/json_flat.asp?entry=" + escape(inputValue) + "&type=excursion&pageSize=" + itemsPerSuggestion + "&pageNumber=1&suggest=true&callback=?", function(data) {
        var excursionHTML = "";
        var excursionCounter = 0;
        if (data.excursion != null) {
            $.each(data.excursion, function(iexcursion, excursion) {
                if (excursionCounter < itemsPerSuggestion) {
                    excursionHTML += getExcursionHTML(excursionCounter, excursion);
                }
                excursionCounter++;
            });
        }
        humanyEventTracker.SetExcursionResult(data.numberOfHits);
        resultElems.eq(3).children("span.status").html(String.format(WebGuideStrings.textNumberOfHits, ((excursionCounter > itemsPerSuggestion) ? itemsPerSuggestion : excursionCounter), data.numberOfHits));
        resultElems.eq(3).children("h3").after(excursionHTML);
        if (resultElems.eq(3).children("div.entry-item").length > 0) {
            resultElems.eq(3).removeClass("searching").show();
            bindEntryItemEvents(resultElems.eq(3).children("div.entry-item"));
        } else { resultElems.eq(3).removeClass("searching").addClass("empty"); }
        if (resultElems.filter(".empty").length == 5) { $("div#humanySuggestResult div.all-empty").show(); humanyEventTracker.SendEvent(1); }
        else if (resultElems.filter(".searching").length == 0) { resultElems.find("span.status:visible").eq(0).addClass("first"); humanyEventTracker.SendEvent(1); }
        $("#humanySuggestSearchInput").removeClass("searching");
        initCheckForLoadingContainers();
    });

    $.getJSON("http://fritidsresor.humany.com/" + WebGuideStrings.countryCode + "/json_flat.asp?entry=" + escape(inputValue) + "&type=faq&pageSize=" + itemsPerSuggestion + "&pageNumber=1&suggest=true&callback=?", function(data) {
        renderFaqResults(data, resultElems);
        initCheckForLoadingContainers();
    });
}
renderFaqResults = function(data, resultElems) {
    resultElems.eq(4).addClass("searching").find("div.entry-item-faq").remove();
    var faqHTML = "";
    var faqCounter = 0;
    if (data.faq != null && data.numberOfHits > 0) {
        $.each(data.faq, function(ifaq, faq) {
            if (faqCounter < itemsPerPage) {
                faqHTML += "<div class=\"entry-item-faq\">" + ((faq.title != "") ? "<h4>" + faq.title + "</h4>" : "") +
                            "<span>" + faq.answer + "</span>" + "</div>";
            }
            faqCounter++;
        });
    }
    resultElems.eq(4).children("h3").after(faqHTML);

    humanyEventTracker.SetFaqResult(data.numberOfHits);

    if (resultElems.eq(4).children("div.entry-item-faq").length > 0) {
        resultElems.eq(4).removeClass("searching").show();

        resultElems.eq(4).find("a").bind("click", function(e) {
            if ($(this).attr("href").indexOf("fritidsresor.humany.com") != -1) {
                $.getJSON($(this).attr("href") + "&callback=?", function(datadata) {
                    renderFaqResults(datadata, resultElems);
                });
                return false;
            }
        });

    } else { resultElems.eq(4).removeClass("searching").addClass("empty"); }
    if (resultElems.filter(".empty").length == 5) { $("div#humanySuggestResult div.all-empty").show(); humanyEventTracker.SendEvent(1); }
    else if (resultElems.filter(".searching").length == 0) { resultElems.find("span.status:visible").eq(0).addClass("first"); humanyEventTracker.SendEvent(1); }
    $("#humanySuggestSearchInput").removeClass("searching");
}

performHumanySearchLarge = function() {
    $("div.tab-content div.all-empty").hide();
    var inputValue = $.trim($("#humanySearchInput").val()).toLowerCase();
    if (inputValue == "" || inputValue == currentSearchText) {
        currentSearchText = inputValue;
        $("#humanySearchInput").removeClass("searching");
        return;
    }
    else if (inputValue == initialTextValue) {
        $("#humanySearchInput").removeClass("searching");
        return;
    }
    currentSearchText = inputValue;

    humanyEventTracker.SetSearchPhrase(inputValue);

    var faqResultHTML = "<div class=\"faq-result searching\"></div>";
    var faqResultElem = $(faqResultHTML);
    $("div.tab-content div.section-container").eq(0).children("div.section-content").html("").append(faqResultElem);
    $.getJSON("http://fritidsresor.humany.com/" + WebGuideStrings.countryCode + "/json_flat.asp?entry=" + escape(inputValue) + "&type=faq&pageSize=" + itemsPerPage + "&pageNumber=1&callback=?", function(data) {
        renderFaqResultsLarge(data, faqResultElem);
        initCheckForLoadingContainers();
    });

    var countriesResultHTML = "<div class=\"country-result searching\"></div>";
    getPagedCountries($(countriesResultHTML), 1);

    var destinationsResultHTML = "<div class=\"destination-result searching\"></div>";
    getPagedDestinations($(destinationsResultHTML), 1);

    var hotelResultHTML = "<div class=\"hotel-result searching\"></div>";
    getPagedHotels($(hotelResultHTML), 1);

    var excursionsResultHTML = "<div class=\"excursion-result searching\"></div>";
    getPagedExcursions($(excursionsResultHTML), 1);
}

renderFaqResultsLarge = function(data, faqResultElem) {
    var faqHTML = "";
    var tipHTML = "";
    var faqCounter = 0;
    if (data.faq != null) {
        $("div.tab-content div.section-container").eq(0).removeClass("number-of-hits-0").removeClass("number-of-hits-1").addClass(String.format("number-of-hits-{0}", data.numberOfHits));
        $.each(data.faq, function(i, faq) {
            if (faqCounter < itemsPerPage) {
                faqHTML += ((faq.title != "") ? "<h3>" + faq.title + "</h3>" : "") +
                            "<span>" + faq.answer + "</span>";
                tipHTML += (typeof (faq.suggestion) != "undefined" && faq.suggestion != null && faq.suggestion != "") ? "<p>" + faq.suggestion + "</p>" : "";
            }
            faqCounter++;
        });
    }
    faqResultElem.append(faqHTML);

    humanyEventTracker.SetFaqResult(data.numberOfHits);

    $("ul.tabs-large li").eq(1).find("span b").text((data.numberOfHits > 0) ? "(" + data.numberOfHits + ")" : "");
    $("div.right-column ul.tab-links li").eq(1).find("b").text((data.numberOfHits > 0) ? "(" + data.numberOfHits + ")" : "");
    $("div#tab-box-large div.right-column div.small-box div.small-box-content").html(tipHTML).find("a.suggestion").click(function() {
        $("input#humanySearchInput").val($("input#humanySearchInput").val() + " " + $(this).text());
        initHumanySearchLarge();
    });
    if (faqResultElem.children("span").length > 0) {
        faqResultElem.removeClass("searching");

        faqResultElem.find("a").bind("click", function(e) {
            if ($(this).attr("href").indexOf("fritidsresor.humany.com") != -1) {
                faqResultElem.addClass("searching").html("");
                $.getJSON($(this).attr("href") + "&callback=?", function(datadata) {
                    renderFaqResultsLarge(datadata, faqResultElem);
                });
                return false;
            }
        });

    } else { faqResultElem.removeClass("searching").addClass("empty").html(WebGuideStrings.searchNoResult); }
    if (($("div.tab-content div.section-container .empty").length == 4) || ($("div.tab-content div.section-container .searching").length == 0)) { humanyEventTracker.SendEvent(1); }
    $("#humanySearchInput").removeClass("searching");
}

getItemHTML = function(counter, item, cssClass, catalogues) {
    if (item == null) { return ""; }
    var seasonIconHTML = "";
    if (catalogues != null) {
        seasonIconHTML = getSeasonIconHTML(catalogues, item.catalogue_id);
    }
    var itemName = item.name;
    var itemText = ((typeof (item.text) != "undefined") ? item.text : "");
    if (itemText == "") { itemText = (typeof (item.info) != "undefined" && typeof (item.info.usp) != "undefined") ? item.info.usp : ""; }
    if (itemName == "" && itemText == "" && typeof (item.city) != "undefined") { itemName = item.city; }
    return "<div class=\"entry-item" + ((counter > 0) ? " delimiter" : "") + "" + ((typeof (cssClass) != "undefined") ? " " + cssClass : "") + "\">" +
            "<img src=\"" + item.media.icon_picture.replace(/w=152&h=100/gi, "cw=45&h=30&ct=0") + "\" class=\"thumb\" alt=\"\" />" +
            "<div class=\"info" + (seasonIconHTML != "" ? " info-small" : "") + "\">" +
                "<h4><a href=\"" + item.page + "\">" + itemName + ((typeof (item.grade) != "undefined") ? " " + writeHotelGrade(item.grade) : "") + "</a></h4>" +
                "<p>" + itemText + "</p>" +
            "</div>" +
            seasonIconHTML +
            "<div class=\"clear\"></div>" +
        "</div>";
}

getHotelHTML = function(counter, item, cssClass, catalogues, priceExample) {
    if (item == null) { return ""; }
    var seasonIconHTML = "";
    var priceExampleHTML = "", priceExampleInfoHTML = "";
    if (catalogues != null) {
        seasonIconHTML = getSeasonIconHTML(catalogues, item.catalogue_id);
    }
    if (priceExample != null) {
        priceExampleHTML = getPriceExampleHTML(priceExample);
        priceExampleInfoHTML = getPriceExampleTextHTML(priceExample);
    }
    var itemName = item.name;
    var itemText = ((typeof (item.text) != "undefined") ? item.text : "");
    if (itemText == "") { itemText = (typeof (item.info) != "undefined" && typeof (item.info.usp) != "undefined") ? item.info.usp : ""; }
    if (itemName == "" && itemText == "" && typeof (item.city) != "undefined") { itemName = item.city; item.city = ""; }
    return "<div class=\"entry-item" + ((counter > 0) ? " delimiter" : "") + "" + ((typeof (cssClass) != "undefined") ? " " + cssClass : "") + "\">" +
            "<img src=\"" + item.media.icon_picture.replace(/w=152&h=100/gi, "w=115&h=78&ct=0") + "\" class=\"hotel-thumb\" alt=\"\" />" +
            "<div class=\"info" + (seasonIconHTML != "" ? " info-small hotel-info-small" : "") + "\">" +
                "<div class=\"breadcrumbs\"><a href=\"" + item.country_page + "\">" + item.country + "</a>" + ((typeof (item.destination) != "undefined" && item.destination != null && item.destination != "") ? "<span class=\"pipe\">|</span><a href=\"" + item.destination_page + "\">" + item.destination + "</a>" : "") + ((typeof (item.city) != "undefined" && item.city != null && item.city != "") ? "<span class=\"pipe\">|</span><a href=\"" + item.city_page + "\">" + item.city + "</a>" : "") + "</div>" +
                "<h4><a href=\"" + item.page + "\">" + itemName + ((typeof (item.grade) != "undefined") ? " " + writeHotelGrade(item.grade) : "") + "</a></h4>" +
                "<p>" + itemText + "</p>" +
            "</div>" +
            priceExampleHTML +
            seasonIconHTML +
            "<div class=\"clear\"></div>" +
            priceExampleInfoHTML +
        "</div>";
}

getExcursionHTML = function(counter, item) {
    if (item == null) { return ""; }
    return "<div class=\"entry-item" + ((counter > 0) ? " delimiter" : "") + "\">" +
            "<img src=\"" + item.media.icon_picture.replace(/g=excursion/gi, "&g=extra").replace(/w=152&h=100/gi, "cw=45&h=30&ct=0") + "\" class=\"thumb\" alt=\"\" />" +
            "<div class=\"info\">" +
                "<h4><a href=\"" + item.page + "\">" + item.name + "</a></h4>" +
                "<p>" + item.intro + "</p>" +
            "</div>" +
            "<div class=\"clear\"></div>" +
        "</div>";
}

getSeasonIconHTML = function(catalogues, catid) {
    var seasonIconHTML = "";
    $.each(catalogues, function(icatalogue, catalogue) {
        if (catalogue.id == catid) {
            seasonIconHTML = "<div class=\"season-icon season-" + catalogue.symbol + "\">" + catalogue.name + "</div>";
            return;
        }
    });
    return seasonIconHTML;
}

getPriceExampleHTML = function(priceExample) {
    return "<span class=\"hotel-price-example\">" + WebGuideStrings.priceExamplePerAdult + "*<b>" + formatPriceExample(parseInt(priceExample.price.replace(" ", ""), 10) / 2) + "</b></span>";
}

formatPriceExample = function(n) {
    if (isNaN(n)) { return ("0"); }
    s = n.toString(); nStart = s.indexOf(" ");
    if (nStart < 0) { nStart = s.length; } nStart -= 3;
    while (nStart >= 1) { s = s.substring(0, nStart) + " " + s.substring(nStart, s.length); nStart -= 3; }
    return ((s.indexOf(WebGuideStrings.currencySign) != -1) ? s : s + WebGuideStrings.currencySign);
}

getPriceExampleTextHTML = function(priceexample) {
    var priceExampleInfoHTML = "";
    if ((typeof (priceexample) != "undefined") && (priceexample != null)) {
        priceExampleInfoHTML = "<div class=\"hotel-price-example-text\">* " + WebGuideStrings.date + " " + priceexample.departuredate + " | " + WebGuideStrings.departure + ": " + priceexample.departurecity + " | " + priceexample.lengthofstay + " " + WebGuideStrings.days + "</div>"
    }
    return priceExampleInfoHTML;
}

getHotelItemHTML = function(counter, country, destination, city, hotel) {
    return "<div class=\"c_1\">" +
            getHotelConceptHTML(hotel.category) +
            "<a href=\"#\">" + country.name + "</a> | " +
            ((typeof (destination.name) != "undefined" && destination.name != "") ? "<a href=\"#\">" + destination.name + "</a> | " : "") +
            "<a href=\"#\">" + city.name + "</a>" +
            "<h2>" + hotel.name + ((typeof (hotel.grade) != "undefined") ? " " + writeHotelGrade(hotel.grade) : "") + "</h2>" +
            "<div class=\"clear\"></div>" +
        "</div>" +
        "<div class=\"c_2\">" +
            ((typeof (hotel.info) != "undefined" && typeof (hotel.info[0]) != "undefined" && typeof (hotel.info[0].usp) != "undefined") ? "<h3 class=\"usp\"><span>" + hotel.info[0].usp + "</span></h3>" : "") +
            "<div class=\"left-container\">" +
                "<div style=\"background-image: url(" + hotel.media.icon_picture.replace(/&w=152&h=100/gi, "&w=254") + ");\" class=\"hotel-image-bg\">" +
                    "<a class=\"hotel-about-info\" href=\"javascript:void(0)\">" +
                        "<img alt=\"" + hotel.name + "\" src=\""+oBaseAppSettings.IncludeSiteDirectory+"/Images/Layout/HotelItem/hi-border.png\"/>" +
                    "</a>" +
                "</div>" +
            "</div>" +
            "<div class=\"right-container\">" +
                "<div class=\"hotel-facts-dp\">" +
                    "<table class=\"hotel-facts-dp\">" +
                        "<tbody>" +
                            getHotelFactsHTML(hotel.fact) +
                        "</tbody>" +
                    "</table>" +
                    "<a href=\"#\" class=\"read-more\">L�s mer &#187;</a>" +
                "</div> " +
                getPriceExamplePriceHTML(hotel.priceexample) +
            "</div>" +
            "<input type=\"image\" class=\"select-package-btn\" alt=\"V�lj resa\" src=\""+oBaseAppSettings.IncludeSiteDirectory+"/Images/Buttons/1/select.gif\"/>" +
        "</div>" +
        getPriceExampleInfoHTML(hotel.priceexample);
}

getHotelConceptHTML = function(concept) {
    var conceptHTML = "";
    if (concept == "BlueVillage") {
        conceptHTML = "<img class=\"concept-logo\" src=\""+oBaseAppSettings.IncludeSiteDirectory+"/Images/ConceptLogo/1/BlueVillage.png\" />";
    } else if (concept == "BlueVillageExotic") {
        conceptHTML = "<img class=\"concept-logo\" src=\""+oBaseAppSettings.IncludeSiteDirectory+"/Images/ConceptLogo/1/BlueVillageExotic.png\" />";
    } else if (concept == "BlueInclusive") {
        conceptHTML = "<img class=\"concept-logo\" src=\""+oBaseAppSettings.IncludeSiteDirectory+"/Images/ConceptLogo/1/BlueInclusive.png\" />";
    } else if (concept == "BlueCouples") {
        conceptHTML = "<img class=\"concept-logo\" src=\""+oBaseAppSettings.IncludeSiteDirectory+"/Images/ConceptLogo/1/BlueCouples.png\" />";
    } else if (concept == "BlueSelection") {
        conceptHTML = "<img class=\"concept-logo\" src=\""+oBaseAppSettings.IncludeSiteDirectory+"/Images/ConceptLogo/1/BlueSelection.png\" />";
    } else if (concept == "BlueUnique") {
        conceptHTML = "<img class=\"concept-logo\" src=\""+oBaseAppSettings.IncludeSiteDirectory+"/Images/ConceptLogo/1/BlueUnique.png\" />";
    }
    return conceptHTML;
}

getHotelFactsHTML = function(facts) {
    var factHTML = "";
    if ((typeof (facts) != "undefined") && (facts != null)) {
        $.each(facts, function(ifact, fact) {
            if (ifact > 4) {
                return;
            }
            factHTML += "<tr class=\"" + ((ifact % 2 == 0) ? "odd" : "") + "\">" +
                    "<td class=\"label\">" + fact.text + ":</td><td>" + fact.value + "</td>" +
                "</tr>"
        });
    }
    return factHTML;
}

getPriceExamplePriceHTML = function(priceexample) {
    var priceExamplePriceHTML = "";
    if ((typeof (priceexample) != "undefined") && (priceexample != null)) {
        priceExamplePriceHTML = "<span class=\"hotel-price-text\">Prisex/vuxen*</span><span class=\"hotel-price\">" + priceexample.price + ":-</span>";
    }
    return priceExamplePriceHTML;
}

getPriceExampleInfoHTML = function(priceexample) {
    var priceExampleInfoHTML = "";
    if ((typeof (priceexample) != "undefined") && (priceexample != null)) {
        priceExampleInfoHTML = "<div class=\"c_3\">* Datum " + priceexample.departuredate + " | Avresa fr�n " + priceexample.departurecity + " | " + priceexample.lengthofstay + " dagar</div>"
    }
    return priceExampleInfoHTML;
}

writeHotelGrade = function(grade) {
    var gradeLetters = "";
    var letter = "F";
    if ($("body").hasClass("brand-id-2") || $("body").hasClass("brand-id-4")) { letter = "S"; }
    for (i = 0; i < Math.floor(parseInt(grade)); i++) {
        gradeLetters += letter;
    }
    if (grade.toString().length > 1) {
        gradeLetters += "+";
    }
    return gradeLetters;
}

bindEntryItemEvents = function(entryItems) {
    entryItems.hover(
        function() {
            $(this).addClass("hover");
        },
        function() {
            $(this).removeClass("hover");
        }
    );
    entryItems.click(function(event) {
        event.stopPropagation();
        document.location.href = $(this).find("h4 a").attr("href");
    });
}

step = function(keyCode) {
    var selectedIndex = $("div#humanySuggestResult div.entry-item").index($("div#humanySuggestResult div.hover"));
    selectedIndex = (keyCode == 38) ? (selectedIndex - 1) : (selectedIndex + 1);
    if (selectedIndex < -1) { selectedIndex = ($("div#humanySuggestResult div.entry-item").length - 1); }
    else if (selectedIndex > $("div#humanySuggestResult div.entry-item").length) { selectedIndex = -1; }
    $("div#humanySuggestResult div.entry-item").removeClass("hover");
    if (selectedIndex >= 0) {
        $("div#humanySuggestResult div.entry-item").eq(selectedIndex).addClass("hover");
    }
}

browseToLargeSearch = function() {
    var entryValue = $.trim($("input#humanySuggestSearchInput").val());
    if (entryValue == "" || entryValue == "undefined" || typeof (entryValue) == "undefined") {
        $("#humanySuggestSearchInput").removeClass("searching");
        return;
    }
    if (entryValue != initialTextValue) {
        document.location.href = WebGuideStrings.showAllLinkUrl + "?humanyEntry=" + entryValue + "&view=" + Math.ceil(999999 * Math.random());
    }
    else {
        // For notfound page
        var notFoundEntryValue = $("input#search-field").val();
        if (notFoundEntryValue != initialTextValue) {
            document.location.href = WebGuideStrings.showAllLinkUrl + "?humanyEntry=" + notFoundEntryValue + "&view=" + Math.ceil(999999 * Math.random());
        }
    }
}

browseToItem = function(itemIndex) {
    $("div#humanySuggestResult div.entry-item").eq(itemIndex).trigger("click");
}

jQuery.fn.extend({
    setNumberOfHitsCssClass: function(numberOfHits) {
        if (numberOfHits == 0) {
            $(this).addClass("disabled");
        } else {
            $(this).removeClass("disabled");
        }
        return $(this);
    },
    addPaging: function(numberOfHits, searchType) {
        var itemContainer = $(this);
        if (numberOfHits <= itemsPerPage) {
            itemContainer.find("div.section-header span.item-count b").hide();
        } else {
            itemContainer.find("div.section-header span.item-count b").show();
        }
        var pagingContainer = $(this).prev("div.section-paging");
        pagingContainer.children("ul.paging-items").html("");
        var numberOfPages = Number(numberOfHits / itemsPerPage);
        if ((numberOfHits % itemsPerPage) > 0) {
            numberOfPages++;
        }
        if (numberOfPages < 2) {
            return;
        }
        var listItemsHTML = "";
        for (i = 1; i <= numberOfPages; i++) {
            listItemsHTML += "<li class=\"" + ((i == 1) ? "selected " : "") + ((i > 9) ? "two-digits " : "") + ((i > itemsPerPage) ? "overflow " : "") + "digit\"><span>" + i.toString() + "</span></li>";
        }
        var listItems = $("<li class=\"prev disabled\">&#171;&#171;</li>" + listItemsHTML + "<li class=\"next\">&#187;&#187;</li>");
        listItems.filter(".overflow:first").addClass("dotted");
        pagingContainer.show().children("ul.paging-items").append(listItems);
        listItems.filter(".digit").click(function() {
            pagingContainer.find("ul.paging-items li.digit").removeClass("selected");
            $(this).addClass("selected");
            var selectedIndex = pagingContainer.find("ul.paging-items li.digit").index($(this));
            pagingContainer.find("ul.paging-items li.prev, ul.paging-items li.next").removeClass("disabled");
            if (selectedIndex == 0) {
                pagingContainer.find("ul.paging-items li.prev").addClass("disabled");
            } else if (selectedIndex >= (pagingContainer.find("ul.paging-items li.digit").length - 1)) {
                pagingContainer.find("ul.paging-items li.next").addClass("disabled");
            }
            if ($(this).hasClass("dotted")) {
                var dir = (!$(this).prev("li.digit").hasClass("overflow")) ? (selectedIndex - 1) : (selectedIndex - itemsPerPage);
                var listItemsNext = null;
                if (dir > 0) {
                    listItemsNext = listItems.filter(".digit").removeClass("dotted").addClass("overflow").filter(":gt(" + (dir) + "):lt(" + (itemsPerPage) + ")").removeClass("overflow");
                } else {
                    listItemsNext = listItems.filter(".digit").removeClass("dotted").addClass("overflow").filter(":lt(" + (itemsPerPage) + ")").removeClass("overflow");
                }
                listItemsNext.filter(":first").prev("li.digit").addClass("dotted");
                listItemsNext.filter(":last").next("li.digit").addClass("dotted");
            }
            itemContainer.find("div.section-content").children("div").html("").addClass("searching");
            if (searchType == "countries") {
                getPagedCountries(itemContainer.find("div.section-content").children("div"), selectedIndex + 1);
            } else if (searchType == "destinations") {
                getPagedDestinations(itemContainer.find("div.section-content").children("div"), selectedIndex + 1);
            } else if (searchType == "hotels") {
                getPagedHotels(itemContainer.find("div.section-content").children("div"), selectedIndex + 1);
            } else if (searchType == "excursions") {
                getPagedExcursions(itemContainer.find("div.section-content").children("div"), selectedIndex + 1);
            }
        });
        listItems.filter(function() { return ($(this).hasClass("prev") || $(this).hasClass("next")); }).click(function() {
            if ($(this).hasClass("disabled")) {
                return;
            }
            var dir = (($(this).hasClass("next")) ? 1 : -1);
            var selectedIndex = (pagingContainer.find("ul.paging-items li.digit").index(pagingContainer.find("ul.paging-items li.digit.selected"))) + dir;
            pagingContainer.find("ul.paging-items li.digit").eq(selectedIndex).trigger("click");
        });
        return $(this);
    },
    removePaging: function() {
        var pagingContainer = $(this).prev("div.section-paging");
        pagingContainer.hide();
        pagingContainer.find("ul.paging-items li").unbind("click");
        return $(this);
    }
});

getPagedCountries = function(countryContainer, pageNum) {
    var countriesResultElem = countryContainer;
    countriesResultElem[0].itemsPerPage = itemsPerPage;
    $("div.tab-content div.section-container").eq(1).removeClass("disabled").find("div.section-header span.item-count").hide();
    if (pageNum == 1) {
        $("div.tab-content div.section-container").eq(1).children("div.section-content").html("").append(countriesResultElem);
    }
    $.getJSON("http://fritidsresor.humany.com/" + WebGuideStrings.countryCode + "/json_flat.asp?entry=" + escape(currentSearchText) + "&type=country&pageSize=" + itemsPerPage + "&pageNumber=" + pageNum + "&callback=?", function(data) {
        var entryHTML = "";
        var entryCounter = 0;
        if (data.country != null) {
            $.each(data.country, function(ientry, entry) {
                if (entryCounter < itemsPerPage) {
                    entryHTML += getItemHTML(entryCounter, entry, "", data.catalogue);
                }
                entryCounter++;
            });
        }

        humanyEventTracker.SetCountryResult(data.numberOfHits);

        $("div.tab-content div.section-container").eq(1).setNumberOfHitsCssClass(data.numberOfHits).find("div.section-header span.item-count").show().children("span").html(String.format(WebGuideStrings.textNumberOfHits, getFirstPos(pageNum), getLastPos(pageNum, data.numberOfHits), data.numberOfHits));
        $("ul.tabs-large li").eq(2).setNumberOfHitsCssClass(data.numberOfHits).find("span b").text("(" + data.numberOfHits + ")");
        $("div.right-column ul.tab-links li").eq(2).setNumberOfHitsCssClass(data.numberOfHits).find("b").text("(" + data.numberOfHits + ")");
        countriesResultElem[0].numberOfHits = data.numberOfHits;
        countriesResultElem.append(entryHTML);
        if (countriesResultElem.children("div.entry-item").length > 0) {
            countriesResultElem.removeClass("searching");
            bindEntryItemEvents(countriesResultElem.children("div.entry-item"));
            if (pageNum == 1) {
                $("div.tab-content div.section-container.countries").removePaging().addPaging(data.numberOfHits, "countries");
            }
        } else { $("div.tab-content div.section-container.countries").removePaging(); countriesResultElem.removeClass("searching").addClass("empty").html(WebGuideStrings.searchNoResult); }
        if (($("div.tab-content div.section-container.disabled").length == 4) && ($("div.tab-content div.section-container.number-of-hits-0").length == 1)) { $("div.tab-content div.all-empty").show(); humanyEventTracker.SendEvent(pageNum); }
        else if ($("div.tab-content div.section-container .searching").length == 0) { humanyEventTracker.SendEvent(pageNum); }
        $("#humanySearchInput").removeClass("searching");
        initCheckForLoadingContainers();
    });
}

getPagedDestinations = function(destinationContainer, pageNum) {
    var destinationsResultElem = destinationContainer;
    destinationsResultElem[0].itemsPerPage = itemsPerPage;
    $("div.tab-content div.section-container").eq(2).removeClass("disabled").find("div.section-header span.item-count").hide();
    if (pageNum == 1) {
        $("div.tab-content div.section-container").eq(2).children("div.section-content").html("").append(destinationsResultElem);
    }
    $.getJSON("http://fritidsresor.humany.com/" + WebGuideStrings.countryCode + "/json_flat.asp?entry=" + escape(currentSearchText) + "&type=destination&pageSize=" + itemsPerPage + "&pageNumber=" + pageNum + "&callback=?", function(data) {
        var destinationHTML = "";
        var destinationCounter = 0;
        if (data.destination != null) {
            $.each(data.destination, function(idestination, destination) {
                var cssClass = (typeof (destination.destination) != "undefined") ? "city-item" : "destination-item";
                if (typeof (destination.name) != "undefined") {
                    if (destinationCounter < itemsPerPage) {
                        destinationHTML += getItemHTML(destinationCounter, destination, cssClass, data.catalogue);
                    }
                    destinationCounter++;
                }
            });
        }

        humanyEventTracker.SetDestinationResult(data.numberOfHits);

        $("div.tab-content div.section-container").eq(2).setNumberOfHitsCssClass(data.numberOfHits).find("div.section-header span.item-count").show().children("span").html(String.format(WebGuideStrings.textNumberOfHits, getFirstPos(pageNum), getLastPos(pageNum, data.numberOfHits), data.numberOfHits));
        $("ul.tabs-large li").eq(3).setNumberOfHitsCssClass(data.numberOfHits).find("span b").text("(" + data.numberOfHits + ")");
        $("div.right-column ul.tab-links li").eq(3).setNumberOfHitsCssClass(data.numberOfHits).find("b").text("(" + data.numberOfHits + ")");
        destinationsResultElem[0].numberOfHits = data.numberOfHits;
        destinationsResultElem.append(destinationHTML);
        if (destinationsResultElem.children("div.entry-item").length > 0) {
            destinationsResultElem.removeClass("searching");
            bindEntryItemEvents(destinationsResultElem.children("div.entry-item"));
            if (pageNum == 1) {
                $("div.tab-content div.section-container.destinations").removePaging().addPaging(data.numberOfHits, "destinations");
            }
        } else { $("div.tab-content div.section-container.destinations").removePaging(); destinationsResultElem.removeClass("searching").addClass("empty").html(WebGuideStrings.searchNoResult); }
        if (($("div.tab-content div.section-container.disabled").length == 4) && ($("div.tab-content div.section-container.number-of-hits-0").length == 1)) { $("div.tab-content div.all-empty").show(); humanyEventTracker.SendEvent(pageNum); }
        else if ($("div.tab-content div.section-container .searching").length == 0) { humanyEventTracker.SendEvent(pageNum); }
        $("#humanySearchInput").removeClass("searching");
        initCheckForLoadingContainers();
    });
}

getPagedHotels = function(hotelContainer, pageNum) {
    var hotelResultElem = hotelContainer;
    hotelResultElem[0].itemsPerPage = itemsPerPage;
    $("div.tab-content div.section-container").eq(3).removeClass("disabled").find("div.section-header span.item-count").hide();
    if (pageNum == 1) {
        $("div.tab-content div.section-container").eq(3).children("div.section-content").html("").append(hotelResultElem);
    }
    $.getJSON("http://fritidsresor.humany.com/" + WebGuideStrings.countryCode + "/json_flat.asp?entry=" + escape(currentSearchText) + "&type=hotel&pageSize=" + itemsPerPage + "&pageNumber=" + pageNum + "&callback=?", function(data) {
        var hotelHTML = "";
        var hotelCounter = 0;
        if (data.hotel != null) {
            $.each(data.hotel, function(ihotel, hotel) {
                if (hotelCounter < itemsPerPage) {
                    hotelHTML += getHotelHTML(hotelCounter, hotel, "", data.catalogue, hotel.priceexample);
                }
                hotelCounter++;
            });
        }

        humanyEventTracker.SetHotelResult(data.numberOfHits);

        $("div.tab-content div.section-container").eq(3).setNumberOfHitsCssClass(data.numberOfHits).find("div.section-header span.item-count").show().children("span").html(String.format(WebGuideStrings.textNumberOfHits, getFirstPos(pageNum), getLastPos(pageNum, data.numberOfHits), data.numberOfHits));
        $("ul.tabs-large li").eq(4).setNumberOfHitsCssClass(data.numberOfHits).find("span b").text("(" + data.numberOfHits + ")");
        $("div.right-column ul.tab-links li").eq(4).setNumberOfHitsCssClass(data.numberOfHits).find("b").text("(" + data.numberOfHits + ")");
        hotelResultElem[0].numberOfHits = data.numberOfHits;
        hotelResultElem.append(hotelHTML);
        if (hotelResultElem.children("div.entry-item").length > 0) {
            hotelResultElem.removeClass("searching");
            bindEntryItemEvents(hotelResultElem.children("div.entry-item")); // remove
            if (pageNum == 1) {
                $("div.tab-content div.section-container.hotels").removePaging().addPaging(data.numberOfHits, "hotels");
            }
        } else { $("div.tab-content div.section-container.hotels").removePaging(); hotelResultElem.removeClass("searching").addClass("empty").html(WebGuideStrings.searchNoResult); }
        if (($("div.tab-content div.section-container.disabled").length == 4) && ($("div.tab-content div.section-container.number-of-hits-0").length == 1)) { $("div.tab-content div.all-empty").show(); humanyEventTracker.SendEvent(pageNum); }
        else if ($("div.tab-content div.section-container .searching").length == 0) { humanyEventTracker.SendEvent(pageNum); }
        $("#humanySearchInput").removeClass("searching");
        initCheckForLoadingContainers();
    });
}

getPagedExcursions = function(excursionContainer, pageNum) {
    var excursionsResultElem = excursionContainer;
    excursionsResultElem[0].itemsPerPage = itemsPerPage;
    $("div.tab-content div.section-container").eq(4).removeClass("disabled").find("div.section-header span.item-count").hide();
    if (pageNum == 1) {
        $("div.tab-content div.section-container").eq(4).children("div.section-content").html("").append(excursionsResultElem);
    }
    $.getJSON("http://fritidsresor.humany.com/" + WebGuideStrings.countryCode + "/json_flat.asp?entry=" + escape(currentSearchText) + "&type=excursion&pageSize=" + itemsPerPage + "&pageNumber=" + pageNum + "&callback=?", function(data) {
        var excursionHTML = "";
        var excursionCounter = 0;
        if (data.excursion != null) {
            $.each(data.excursion, function(i, excursion) {
                if (excursionCounter < itemsPerPage) {
                    excursionHTML += getExcursionHTML(excursionCounter, excursion);
                }
                excursionCounter++;
            });
        }

        humanyEventTracker.SetExcursionResult(data.numberOfHits);
        
        $("div.tab-content div.section-container").eq(4).setNumberOfHitsCssClass(data.numberOfHits).find("div.section-header span.item-count").show().children("span").html(String.format(WebGuideStrings.textNumberOfHits, getFirstPos(pageNum), getLastPos(pageNum, data.numberOfHits), data.numberOfHits));
        $("ul.tabs-large li").eq(5).setNumberOfHitsCssClass(data.numberOfHits).find("span b").text("(" + data.numberOfHits + ")");
        $("div.right-column ul.tab-links li").eq(5).setNumberOfHitsCssClass(data.numberOfHits).find("b").text("(" + data.numberOfHits + ")");
        excursionsResultElem[0].numberOfHits = data.numberOfHits;
        excursionsResultElem.append(excursionHTML);
        if (excursionsResultElem.children("div.entry-item").length > 0) {
            excursionsResultElem.removeClass("searching");
            bindEntryItemEvents(excursionsResultElem.children("div.entry-item"));
            if (pageNum == 1) {
                $("div.tab-content div.section-container.excursions").removePaging().addPaging(data.numberOfHits, "excursions");
            }
        } else { $("div.tab-content div.section-container.excursions").removePaging(); excursionsResultElem.removeClass("searching").addClass("empty").html(WebGuideStrings.searchNoResult); }
        if (($("div.tab-content div.section-container.disabled").length == 4) && ($("div.tab-content div.section-container.number-of-hits-0").length == 1)) { $("div.tab-content div.all-empty").show(); humanyEventTracker.SendEvent(pageNum); }
        else if ($("div.tab-content div.section-container .searching").length == 0) { humanyEventTracker.SendEvent(pageNum); }
        $("#humanySearchInput").removeClass("searching");
        initCheckForLoadingContainers();
    });
}

getFirstPos = function(pageNum) {
    return (((pageNum - 1) * itemsPerPage) + 1).toString();
}

getLastPos = function(pageNum, numberOfHits) {
    var lastPos = (pageNum * itemsPerPage);
    return ((lastPos > numberOfHits) ? numberOfHits : lastPos);
}

/// <reference name="MicrosoftAjax.js"/>



Type.registerNamespace("TUI.Web.UI.WebControls");



TUI.Web.UI.WebControls.DialogPosition = function() {}
TUI.Web.UI.WebControls.DialogPosition.prototype =
{
    centerClient: 0,
    centerBelowTarget: 1,
    centerAboveTarget: 2,
    nearTargetInsideClient: 3,
    custom: 4
}
TUI.Web.UI.WebControls.DialogPosition.registerEnum('TUI.Web.UI.WebControls.DialogPosition');



TUI.Web.UI.WebControls.Dialog = function(element) {
    TUI.Web.UI.WebControls.Dialog.initializeBase(this, [element]);

    this._$element = $(element);
    this._$overlay = null;
    this._targetControl = null;
    this._customCloseControl = null;
    this._showAtStartup = false;
    this._isDraggable = false;
    this._isModal = false;
    this._clearInputsOnDisplay = false;
    this._showOverlay = false;
    this._dynamicServiceFullPath = null;
    this._dynamicServiceArguments = null;
    this._dialogPosition = TUI.Web.UI.WebControls.DialogPosition.centerClient;
    this._callBackFunction = null;

    if (this._$element.children().length == 0) {
        // Clientside creation
        if (element.tagName.toLowerCase() != 'div') {
            throw Error.argument('element', 'An error occured during clientside creation of a Dialog control. The top element must be of type DIV.');
        }

        this._$element.addClass('dialog');
        this._$element.append("<div class='dialog-top'><div class='dialog-top-outer'><div class='dialog-top-inner'><div class='dialog-top-text'></div><a class='dialog-top-close-link' href='javascript:void(0)' title=''></a></div></div></div>"); // Caption
        this._$element.append("<div class='dialog-center'><div class='dialog-center-outer'><div class='dialog-center-inner'></div></div></div>"); // Content
        this._$element.append("<div class='dialog-bottom'><div class='dialog-bottom-outer'><div class='dialog-bottom-inner'></div></div></div>"); // Bottom

        if ($.browser.msie) {
            this._$element.addClass('dialog-ie');

            if ($.browser.version <= 6) {
                // Insert invisible image for correct IE6 collapse behaviour
                var invisibleImgStr = "<img src='"+oBaseAppSettings.IncludeSiteDirectory+"/images/clear.gif' />";
                this._$element.find('div.dialog-top-text, div.dialog-bottom-inner').html(invisibleImgStr);
            }
        }
    }
}
TUI.Web.UI.WebControls.Dialog.prototype =
{
    initialize: function() {
        TUI.Web.UI.WebControls.Dialog.callBaseMethod(this, 'initialize');

        Sys.UI.DomElement.setVisibilityMode(this.get_element(), Sys.UI.VisibilityMode.hide);
        this._$element.find('a.dialog-top-close-link').click(Function.createDelegate(this, this.hide));

        if (this.get_showAtStartup()) {
            this.show();
        }
    },
    dispose: function() {
        TUI.Web.UI.WebControls.Dialog.callBaseMethod(this, 'dispose');

        if (this._$overlay != null) {
            this.get_$overlay().remove();
        }

        if (this.get_targetControl() != null) {
            $clearHandlers(this.get_targetControl());
        }
    },
    updated: function() {
        TUI.Web.UI.WebControls.Dialog.callBaseMethod(this, 'updated');

        if (this.get_isDraggable()) {
            if (!this._$element.hasClass('ui-draggable')) {
                this._$element.draggable({ handle: 'div.dialog-top' });
            }
        }
        else if (this._$element.hasClass('ui-draggable')) {
            this._$element.draggable('destroy');
        }

        if (Sys.UI.DomElement.getVisible(this.get_element())) {
            this.updatePosition();

            if (this.get_dynamicServiceFullPath() != null) {
                this.performDynamicPopulation();
            }
        }
    },
    show: function() {
        if (!Sys.UI.DomElement.getVisible(this.get_element())) {
            if ((this.get_showOverlay() || this.get_isModal()) && !($.browser.msie && $.browser.version <= 6)) {
                this.get_$overlay().show();
            }

            if (this.get_clearInputsOnDisplay()) {
                this._$element.find('input:text, textarea').val('');
                this._$element.find('select').each(function() { this.selectedIndex = 0; });
                this._$element.find(':checked').attr('checked', false);
            }

            Sys.UI.DomElement.setVisible(this.get_element(), true);
            this.updatePosition();

            if (this.get_dynamicServiceFullPath() != null) {
                this.performDynamicPopulation();
            }
        }
    },
    hide: function() {
        if ((this.get_showOverlay() || this.get_isModal()) && !($.browser.msie && $.browser.version <= 6)) {
            this.get_$overlay().hide();
        }

        Sys.UI.DomElement.setVisible(this.get_element(), false);
    },
    updatePosition: function() {
        this._$element.css('position', ''); // Reset to default css specification

        var DialogPositionEnum = TUI.Web.UI.WebControls.DialogPosition;

        if (this.get_dialogPosition() != DialogPositionEnum.custom) {
            if (this.get_targetControl() == null && this.get_dialogPosition() != DialogPositionEnum.centerClient) {
                throw Error.invalidOperation(String.format("DialogPosition was set to {0} but no target control has been specified, which is not allowed", this.get_dialogPosition()));
            }

            var 
                dialogLeft,
                dialogTop,
                clientWidth = document.documentElement ? document.documentElement.clientWidth : 600,
                clientHeight = document.documentElement ? document.documentElement.clientHeight : 400,
                $targetControl = this.get_targetControl() ? $(this.get_targetControl()) : null;

            switch (this.get_dialogPosition()) {
                case DialogPositionEnum.centerClient:
                    this._$element.css('position', $.browser.msie && $.browser.version <= 6 ? 'absolute' : 'fixed');
                    dialogLeft = clientWidth / 2 - this._$element.width() / 2;
                    dialogTop = clientHeight / 2 - this._$element.height() / 2;
                    break;
                case DialogPositionEnum.centerBelowTarget:
                    dialogLeft = $targetControl.position().left + $targetControl.width() / 2 - this._$element.width() / 2;
                    dialogTop = $targetControl.position().top + $targetControl.height() + 5;
                    break;
                case DialogPositionEnum.centerAboveTarget:
                    dialogLeft = $targetControl.position().left + $targetControl.width() / 2 - this._$element.width() / 2;
                    dialogTop = $targetControl.position().top - this._$element.height() - 5;
                    break;
                case DialogPositionEnum.nearTargetInsideClient:
                    if ($targetControl.offset().left < clientWidth / 2) {
                        // Align left
                        dialogLeft = $targetControl.position().left;

                        if ($targetControl.offset().top < clientHeight / 2) {
                            // From top left towards center
                            dialogTop = $targetControl.position().top + $targetControl.height() + 5;
                        }
                        else {
                            // From bottom left towards center
                            dialogTop = $targetControl.position().top - this._$element.height() - 5;
                        }
                    }
                    else {
                        // Align right
                        dialogLeft = $targetControl.position().left + $targetControl.width() - this._$element.width();

                        if ($targetControl.offset().top < clientHeight / 2) {
                            // From top right towards center
                            dialogTop = $targetControl.position().top + $targetControl.height() + 5;
                        }
                        else {
                            // From bottom right towards center
                            dialogTop = $targetControl.position().top - this._$element.height() - 5;
                        }
                    }
                    break;
            }

            // Set position and ensure within browser upper-left bounds
            this._$element.css('left', dialogLeft < 10 ? 10 : dialogLeft);
            this._$element.css('top', dialogTop < 10 ? 10 : dialogTop);
        }
    },
    performDynamicPopulation: function() {
        var 
            isProxyAjaxMethod,
            $dialogCenterInner = this._$element.find('div.dialog-center-inner');

        $dialogCenterInner.html("<img class='ajax-loader' src='" + oBaseAppSettings.IncludeSiteDirectory + "/images/clear.gif' />");

        try {
            isProxyAjaxMethod = (typeof eval(this.get_dynamicServiceFullPath())).toLowerCase() == 'function';
        }
        catch (e) {
            isProxyAjaxMethod = false;
        }

        if (isProxyAjaxMethod) {
            // The handler is a clientside MS AJAX javascript proxy method
            var 
                dynamicServiceInvocationExpression = this.get_dynamicServiceFullPath(),
                dynamicServiceArguments = this.get_dynamicServiceArguments();

            dynamicServiceInvocationExpression += "(";

            for (key in dynamicServiceArguments) {
                dynamicServiceInvocationExpression += "dynamicServiceArguments['" + key + "']";
                dynamicServiceInvocationExpression += ",";
            }

            dynamicServiceInvocationExpression += "Function.createDelegate(this, function(content) { $dialogCenterInner.html(content); this.updatePosition(); })";
            dynamicServiceInvocationExpression += ")";
            eval(dynamicServiceInvocationExpression);
        }
        else {
            // The handler is an ordinary page
            $dialogCenterInner.load(this.get_dynamicServiceFullPath(), this.get_dynamicServiceArguments(), Function.createDelegate(this, function() { this.updatePosition(); if (typeof (this.get_callBackFunction()) != "undefined") { eval(this.get_callBackFunction()); } }));
        }
    },
    get_$overlay: function() {
        if (this._$overlay == null) {
            this._$overlay = $("<div class='dialog-overlay'></div>").prependTo(this._$element.parent());

            if (this.get_showOverlay()) {
                // Apply background color css class to make the overlay become visible
                this._$overlay.addClass('dialog-overlay-background');
            }
            else {
                this._$overlay.removeClass('dialog-overlay-background');
            }

            if (!this.get_isModal()) {
                // Clicking on a non-modal overlay should simply close the dialog
                this._$overlay.click(Function.createDelegate(this, this.hide));
            }
        }

        return this._$overlay;
    },
    get_targetControl: function() { return this._targetControl; },
    set_targetControl: function(element) {
        if (this._targetControl != null) {
            $clearHandlers(this._targetControl);
        }

        this._targetControl = element;

        if (element != null) {
            $addHandler(element, 'click', Function.createDelegate(this, function(e) { e.preventDefault(); if (Sys.UI.DomElement.getVisible(this.get_element())) { this.hide(); } else { this.show(); } }));
        }
    },
    get_customCloseControl: function() { return this._customCloseControl; },
    set_customCloseControl: function(element) {
        if (this._customCloseControl != null) {
            $clearHandlers(this._customCloseControl);
        }

        this._customCloseControl = element;

        if (element != null) {
            $addHandler(element, 'click', Function.createDelegate(this, function(e) { e.preventDefault(); this.hide(); }));
        }
    },
    get_showAtStartup: function() { return this._showAtStartup; },
    set_showAtStartup: function(value) { this._showAtStartup = value; },
    get_isDraggable: function() { return this._isDraggable; },
    set_isDraggable: function(value) { this._isDraggable = value; },
    get_isModal: function() { return this._isModal; },
    set_isModal: function(value) { this._isModal = value; },
    get_clearInputsOnDisplay: function() { return this._clearInputsOnDisplay; },
    set_clearInputsOnDisplay: function(value) { this._clearInputsOnDisplay = value; },
    get_showOverlay: function() { return this._showOverlay; },
    set_showOverlay: function(value) { this._showOverlay = value; },
    get_dialogPosition: function() { return this._dialogPosition; },
    set_dialogPosition: function(value) { this._dialogPosition = value; },
    get_dynamicServiceFullPath: function() { return this._dynamicServiceFullPath; },
    set_dynamicServiceFullPath: function(value) { this._dynamicServiceFullPath = value; },
    get_dynamicServiceArguments: function() { return this._dynamicServiceArguments; },
    set_dynamicServiceArguments: function(value) { this._dynamicServiceArguments = value; },
    get_callBackFunction: function() { return this._callBackFunction; },
    set_callBackFunction: function(value) { this._callBackFunction = value; },
    get_innerHtmlTop: function(value) {
        this._$element.find('div.dialog-top-text').html();
    },
    set_innerHtmlTop: function(value) {
        this._$element.find('div.dialog-top-text').html(value);
    },
    get_innerHtmlCenter: function(value) {
        this._$element.find('div.dialog-center-text').html();
    },
    set_innerHtmlCenter: function(value) {
        this._$element.find('div.dialog-center-inner').html(value);
    },
    get_innerHtmlBottom: function(value) {
        this._$element.find('div.dialog-bottom-text').html();
    },
    set_innerHtmlBottom: function(value) {
        this._$element.find('div.dialog-bottom-inner').html(value);
    }
}

TUI.Web.UI.WebControls.Dialog._globalDialogControl = null;

// Gets the current global dialog, or null if no global dialog has been created
TUI.Web.UI.WebControls.Dialog.getCurrentGlobalDialog = function()
{
    return TUI.Web.UI.WebControls.Dialog._globalDialogControl;
}

// Hides and destroys the last global dialog that was created, then creates a new global dialog based on the given properties.
TUI.Web.UI.WebControls.Dialog.createNewGlobalDialog = function(properties, extraCssClasses)
{
    var
        globalDialogControl = TUI.Web.UI.WebControls.Dialog._globalDialogControl,
        globalDialogElement;
    
    if (globalDialogControl != null)
    {
        globalDialogElement = globalDialogControl.get_element();
        globalDialogControl.hide();
        globalDialogControl.dispose();
        $(globalDialogElement).remove();
    }
    
    globalDialogElement = $("<div id='global-dialog'></div>").appendTo("form").get(0);
    
    if (extraCssClasses)
    {
        $(globalDialogElement).addClass(extraCssClasses);
    }
    
    return globalDialogControl = TUI.Web.UI.WebControls.Dialog._globalDialogControl = $create
    (
        TUI.Web.UI.WebControls.Dialog, 
        properties,
        null, 
        null, 
        globalDialogElement
    );
}

TUI.Web.UI.WebControls.Dialog.registerClass('TUI.Web.UI.WebControls.Dialog', Sys.UI.Control);

/// <reference name="MicrosoftAjax.js"/>

Type.registerNamespace("TUI.Web.UI.ExtenderControls");

TUI.Web.UI.ExtenderControls.InitialTextExtender = function(element) {
    TUI.Web.UI.ExtenderControls.InitialTextExtender.initializeBase(this, [element]);
    this._savedValue = null;
}

TUI.Web.UI.ExtenderControls.InitialTextExtender.prototype = {
    initialize: function() {
        TUI.Web.UI.ExtenderControls.InitialTextExtender.callBaseMethod(this, 'initialize');
        $addHandlers(this.get_element(), { "focus" : this.targetOnFocus, "blur" : this.targetOnBlur }, this);
    },
    dispose: function() {        
        //Add custom dispose actions here
        TUI.Web.UI.ExtenderControls.InitialTextExtender.callBaseMethod(this, 'dispose');
    },
    targetOnFocus: function(e) {
        if (this.get_element().value == this.get_savedValue()) {
            this.get_element().value = '';
        }
    },
    targetOnBlur: function(e) {
        if (this.get_element().value == '')  {
            this.get_element().value = this.get_savedValue();
        }
    },
    set_savedValue: function(value) {
        this._savedValue = value;
    },
    get_savedValue: function() {
        return this._savedValue;
    }    
}
TUI.Web.UI.ExtenderControls.InitialTextExtender.registerClass('TUI.Web.UI.ExtenderControls.InitialTextExtender', Sys.UI.Behavior);

if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();

/*
* CrossSlide jQuery plugin v0.5
*
* Copyright 2007-2010 by Tobia Conforto <tobia.conforto@gmail.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
(function() { var d = jQuery, a = (d.fn.startAnimation ? "startAnimation" : "animate"), c = "pause plugin missing."; function e(h) { for (var g = 1; g < arguments.length; g++) { h = h.replace(new RegExp("\\{" + (g - 1) + "}", "g"), arguments[g]) } return h } function f() { arguments[0] = "CrossSlide: " + arguments[0]; throw new Error(e.apply(null, arguments)) } function b(i) { var g = 1; var h = i.replace(/^\s*|\s*$/g, "").split(/\s+/); if (h.length > 3) { throw new Error() } if (h[0] == "center") { if (h.length == 1) { h = ["center", "center"] } else { if (h.length == 2 && h[1].match(/^[\d.]+x$/i)) { h = ["center", "center", h[1]] } } } if (h.length == 3) { g = parseFloat(h[2].match(/^([\d.]+)x$/i)[1]) } var j = h[0] + " " + h[1]; if (j == "left top" || j == "top left") { return { xrel: 0, yrel: 0, zoom: g} } if (j == "left center" || j == "center left") { return { xrel: 0, yrel: 0.5, zoom: g} } if (j == "left bottom" || j == "bottom left") { return { xrel: 0, yrel: 1, zoom: g} } if (j == "center top" || j == "top center") { return { xrel: 0.5, yrel: 0, zoom: g} } if (j == "center center") { return { xrel: 0.5, yrel: 0.5, zoom: g} } if (j == "center bottom" || j == "bottom center") { return { xrel: 0.5, yrel: 1, zoom: g} } if (j == "right top" || j == "top right") { return { xrel: 1, yrel: 0, zoom: g} } if (j == "right center" || j == "center right") { return { xrel: 1, yrel: 0.5, zoom: g} } if (j == "right bottom" || j == "bottom right") { return { xrel: 1, yrel: 1, zoom: g} } return { xrel: parseInt(h[0].match(/^(\d+)%$/)[1]) / 100, yrel: parseInt(h[1].match(/^(\d+)%$/)[1]) / 100, zoom: g} } d.fn.crossSlide = function(i, k, l) { var g = this, j = this.width(), h = this.height(); g.get(0).crossSlideArgs = [i, k, l]; k = d.map(k, function(m) { return d.extend({}, m) }); if (!l) { l = function() { } } (function(o) { var m = 0; function n(q, p) { p.onload = function(r) { m++; k[q].width = p.width; k[q].height = p.height; if (m == k.length) { o() } }; p.src = k[q].src; if (q + 1 < k.length) { n(q + 1, new Image()) } } n(0, new Image()) })(function() { if (!i.fade) { f("missing fade parameter.") } if (i.speed && i.sleep) { f("you cannot set both speed and sleep at the same time.") } var z = Math.round(i.fade * 1000); if (i.sleep) { var y = Math.round(i.sleep * 1000) } if (i.speed) { var o = i.speed / 1000, u = Math.round(z * o) } g.empty().css({ overflow: "hidden", padding: 0 }); if (!/^(absolute|relative|fixed)$/.test(g.css("position"))) { g.css({ position: "relative" }) } if (!g.width() || !g.height()) { f("container element does not have its own width and height") } if (i.shuffle) { k.sort(function() { return Math.random() - 0.5 }) } for (var s = 0; s < k.length; ++s) { var m = k[s]; if (!m.src) { f("missing src parameter in picture {0}.", s + 1) } if (o) { switch (m.dir) { case "up": m.from = { xrel: 0.5, yrel: 0, zoom: 1 }; m.to = { xrel: 0.5, yrel: 1, zoom: 1 }; var w = m.height - h - 2 * u; break; case "down": m.from = { xrel: 0.5, yrel: 1, zoom: 1 }; m.to = { xrel: 0.5, yrel: 0, zoom: 1 }; var w = m.height - h - 2 * u; break; case "left": m.from = { xrel: 0, yrel: 0.5, zoom: 1 }; m.to = { xrel: 1, yrel: 0.5, zoom: 1 }; var w = m.width - j - 2 * u; break; case "right": m.from = { xrel: 1, yrel: 0.5, zoom: 1 }; m.to = { xrel: 0, yrel: 0.5, zoom: 1 }; var w = m.width - j - 2 * u; break; default: f("missing or malformed dir parameter in picture {0}.", s + 1) } if (w <= 0) { f("impossible animation: either picture {0} is too small or div is too large or fade duration too long.", s + 1) } m.time_ms = Math.round(w / o) } else { if (!y) { if (!m.from || !m.to || !m.time) { f("missing either speed/sleep option, or from/to/time params in picture {0}.", s + 1) } try { m.from = b(m.from) } catch (v) { f('malformed "from" parameter in picture {0}.', s + 1) } try { m.to = b(m.to) } catch (v) { f('malformed "to" parameter in picture {0}.', s + 1) } if (!m.time) { f('missing "time" parameter in picture {0}.', s + 1) } m.time_ms = Math.round(m.time * 1000) } } if (m.from) { d.each([m.from, m.to], function(p, B) { B.width = Math.round(m.width * B.zoom); B.height = Math.round(m.height * B.zoom); B.left = Math.round((j - B.width) * B.xrel); B.top = Math.round((h - B.height) * B.yrel) }) } var x; if (m.href) { x = d(e('<a href="{0}"><img src="{1}"/></a>', m.href, m.src)) } else { x = d(e('<img src="{0}"/>', m.src)) } if (m.onclick) { x.click(m.onclick) } if (m.alt) { x.find("img").attr("alt", m.alt) } if (m.href && m.target) { x.attr("target", m.target) } x.appendTo(g) } delete o; function n(C, B) { var D = [0, z / (C.time_ms + 2 * z), 1 - z / (C.time_ms + 2 * z), 1][B]; return { left: Math.round(C.from.left + D * (C.to.left - C.from.left)), top: Math.round(C.from.top + D * (C.to.top - C.from.top)), width: Math.round(C.from.width + D * (C.to.width - C.from.width)), height: Math.round(C.from.height + D * (C.to.height - C.from.height))} } var t = g.find("img").css({ position: "absolute", visibility: "hidden", top: 0, left: 0, border: 0 }); t.eq(0).css({ visibility: "visible" }); if (!y) { t.eq(0).css(n(k[0], 1)) } var A = i.loop; function q(N, p) { if (N % 2 == 0) { if (y) { var D = N / 2, R = (D - 1 + k.length) % k.length, O = t.eq(D), L = t.eq(R); var K = function() { l(D, O); L.css("visibility", "hidden"); setTimeout(p, y) } } else { var G = N / 2, R = (G - 1 + k.length) % k.length, Q = t.eq(G), L = t.eq(R), E = k[G].time_ms, M = n(k[G], 2); var K = function() { l(G, Q); L.css("visibility", "hidden"); Q[a](M, E, "linear", p) } } } else { var C = Math.floor(N / 2), F = Math.ceil(N / 2) % k.length, P = t.eq(C), B = t.eq(F), S = {}, J = { visibility: "visible" }, I = {}; if (F > C) { J.opacity = 0; I.opacity = 1; if (i.doubleFade) { S.opacity = 0 } } else { S.opacity = 0; if (i.doubleFade) { J.opacity = 0; I.opacity = 1 } } if (!y) { d.extend(S, n(k[C], 3)); d.extend(J, n(k[F], 0)); d.extend(I, n(k[F], 1)) } if (d.isEmptyObject(I)) { var K = function() { l(F, B, C, P); B.css(J); P[a](S, z, "linear", p) } } else { if (d.isEmptyObject(S)) { var K = function() { l(F, B, C, P); B.css(J); B[a](I, z, "linear", p) } } else { var K = function() { l(F, B, C, P); B.css(J); B[a](I, z, "linear"); P[a](S, z, "linear", p) } } } } if (i.loop && N == k.length * 2 - 2) { var H = K; K = function() { if (--A) { H() } } } if (N > 0) { return q(N - 1, K) } else { return K } } var r = q(k.length * 2 - 1, function() { return r() }); r() }); return g }; d.fn.crossSlideFreeze = function() { this.find("img").stop() }; d.fn.crossSlideStop = function() { this.find("img").stop().remove() }; d.fn.crossSlideRestart = function() { this.find("img").stop().remove(); d.fn.crossSlide.apply(this, this.get(0).crossSlideArgs) }; d.fn.crossSlidePause = function() { if (!d.fn.pause) { f(c) } this.find("img").pause() }; d.fn.crossSlideResume = function() { if (!d.fn.pause) { f(c) } this.find("img").resume() } })();

var Cufon = (function() { var K = function() { return K.replace.apply(null, arguments) }; var U = K.DOM = { ready: (function() { var Z = false, b = { loaded: 1, complete: 1 }; var Y = [], a = function() { if (Z) { return } Z = true; for (var c; c = Y.shift(); c()) { } }; if (document.addEventListener) { document.addEventListener("DOMContentLoaded", a, false); window.addEventListener("pageshow", a, false) } if (!window.opera && document.readyState) { (function() { b[document.readyState] ? a() : setTimeout(arguments.callee, 10) })() } if (document.readyState && document.createStyleSheet) { (function() { try { document.body.doScroll("left"); a() } catch (c) { setTimeout(arguments.callee, 1) } })() } O(window, "load", a); return function(c) { if (!arguments.length) { a() } else { Z ? c() : Y.push(c) } } })() }; var L = K.CSS = { Size: function(Z, Y) { this.value = parseFloat(Z); this.unit = String(Z).match(/[a-z%]*$/)[0] || "px"; this.convert = function(a) { return a / Y * this.value }; this.convertFrom = function(a) { return a / this.value * Y }; this.toString = function() { return this.value + this.unit } }, getStyle: function(Z) { var Y = document.defaultView; if (Y && Y.getComputedStyle) { return new A(Y.getComputedStyle(Z, null)) } if (Z.currentStyle) { return new A(Z.currentStyle) } return new A(Z.style) }, ready: (function() { var a = false; var Z = [], b = function() { a = true; for (var d; d = Z.shift(); d()) { } }; var Y = Object.prototype.propertyIsEnumerable ? F("style") : { length: 0 }; var c = F("link"); U.ready(function() { var g = 0, f; for (var e = 0, d = c.length; f = c[e], e < d; ++e) { if (!f.disabled && f.rel.toLowerCase() == "stylesheet") { ++g } } if (document.styleSheets.length >= Y.length + g) { b() } else { setTimeout(arguments.callee, 10) } }); return function(d) { if (a) { d() } else { Z.push(d) } } })(), supports: function(a, Z) { var Y = document.createElement("span").style; if (Y[a] === undefined) { return false } Y[a] = Z; return Y[a] === Z }, textAlign: function(b, a, Y, Z) { if (a.get("textAlign") == "right") { if (Y > 0) { b = " " + b } } else { if (Y < Z - 1) { b += " " } } return b }, textDecoration: function(d, c) { if (!c) { c = this.getStyle(d) } var Z = { underline: null, overline: null, "line-through": null }; for (var Y = d; Y.parentNode && Y.parentNode.nodeType == 1; ) { var b = true; for (var a in Z) { if (Z[a]) { continue } if (c.get("textDecoration").indexOf(a) != -1) { Z[a] = c.get("color") } b = false } if (b) { break } c = this.getStyle(Y = Y.parentNode) } return Z }, textShadow: I(function(c) { if (c == "none") { return null } var b = [], d = {}, Y, Z = 0; var a = /(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig; while (Y = a.exec(c)) { if (Y[0] == ",") { b.push(d); d = {}, Z = 0 } else { if (Y[1]) { d.color = Y[1] } else { d[["offX", "offY", "blur"][Z++]] = Y[2] } } } b.push(d); return b }), color: I(function(Z) { var Y = {}; Y.color = Z.replace(/^rgba\((.*?),\s*([\d.]+)\)/, function(b, a, c) { Y.opacity = parseFloat(c); return "rgb(" + a + ")" }); return Y }), textTransform: function(Z, Y) { return Z[{ uppercase: "toUpperCase", lowercase: "toLowerCase"}[Y.get("textTransform")] || "toString"]() } }; function Q(Z) { var Y = this.face = Z.face; this.glyphs = Z.glyphs; this.w = Z.w; this.baseSize = parseInt(Y["units-per-em"], 10); this.family = Y["font-family"].toLowerCase(); this.weight = Y["font-weight"]; this.style = Y["font-style"] || "normal"; this.viewBox = (function() { var b = Y.bbox.split(/\s+/); var a = { minX: parseInt(b[0], 10), minY: parseInt(b[1], 10), maxX: parseInt(b[2], 10), maxY: parseInt(b[3], 10) }; a.width = a.maxX - a.minX, a.height = a.maxY - a.minY; a.toString = function() { return [this.minX, this.minY, this.width, this.height].join(" ") }; return a })(); this.ascent = -parseInt(Y.ascent, 10); this.descent = -parseInt(Y.descent, 10); this.height = -this.ascent + this.descent } function E() { var Z = {}, Y = { oblique: "italic", italic: "oblique" }; this.add = function(a) { (Z[a.style] || (Z[a.style] = {}))[a.weight] = a }; this.get = function(e, f) { var d = Z[e] || Z[Y[e]] || Z.normal || Z.italic || Z.oblique; if (!d) { return null } f = { normal: 400, bold: 700}[f] || parseInt(f, 10); if (d[f]) { return d[f] } var b = { 1: 1, 99: 0}[f % 100], h = [], c, a; if (b === undefined) { b = f > 400 } if (f == 500) { f = 400 } for (var g in d) { g = parseInt(g, 10); if (!c || g < c) { c = g } if (!a || g > a) { a = g } h.push(g) } if (f < c) { f = c } if (f > a) { f = a } h.sort(function(j, i) { return (b ? (j > f && i > f) ? j < i : j > i : (j < f && i < f) ? j > i : j < i) ? -1 : 1 }); return d[h[0]] } } function P() { function a(c, d) { if (c.contains) { return c.contains(d) } return c.compareDocumentPosition(d) & 16 } function Y(d) { var c = d.relatedTarget; if (!c || a(this, c)) { return } Z(this) } function b(c) { Z(this) } function Z(c) { setTimeout(function() { K.replace(c, D.get(c).options, true) }, 10) } this.attach = function(c) { if (c.onmouseenter === undefined) { O(c, "mouseover", Y); O(c, "mouseout", Y) } else { O(c, "mouseenter", b); O(c, "mouseleave", b) } } } function X() { var a = {}, Y = 0; function Z(b) { return b.cufid || (b.cufid = ++Y) } this.get = function(b) { var c = Z(b); return a[c] || (a[c] = {}) } } function A(Y) { var a = {}, Z = {}; this.get = function(b) { return a[b] != undefined ? a[b] : Y[b] }; this.getSize = function(c, b) { return Z[c] || (Z[c] = new L.Size(this.get(c), b)) }; this.extend = function(b) { for (var c in b) { a[c] = b[c] } return this } } function O(Z, Y, a) { if (Z.addEventListener) { Z.addEventListener(Y, a, false) } else { if (Z.attachEvent) { Z.attachEvent("on" + Y, function() { return a.call(Z, window.event) }) } } } function R(Z, Y) { var a = D.get(Z); if (a.options) { return Z } if (Y.hover && Y.hoverables[Z.nodeName.toLowerCase()]) { B.attach(Z) } a.options = Y; return Z } function I(Y) { var Z = {}; return function(a) { if (!Z.hasOwnProperty(a)) { Z[a] = Y.apply(null, arguments) } return Z[a] } } function C(d, c) { if (!c) { c = L.getStyle(d) } var Z = c.get("fontFamily").split(/\s*,\s*/), b; for (var a = 0, Y = Z.length; a < Y; ++a) { b = Z[a].replace(/^(["'])(.*?)\1$/, "$2").toLowerCase(); if (H[b]) { return H[b].get(c.get("fontStyle"), c.get("fontWeight")) } } return null } function F(Y) { return document.getElementsByTagName(Y) } function G() { var Y = {}, b; for (var a = 0, Z = arguments.length; a < Z; ++a) { for (b in arguments[a]) { Y[b] = arguments[a][b] } } return Y } function M(b, k, Z, m, c, a) { var j = m.separate; if (j == "none") { return W[m.engine].apply(null, arguments) } var h = document.createDocumentFragment(), e; var f = k.split(N[j]), Y = (j == "words"); if (Y && S) { if (/^\s/.test(k)) { f.unshift("") } if (/\s$/.test(k)) { f.push("") } } for (var g = 0, d = f.length; g < d; ++g) { e = W[m.engine](b, Y ? L.textAlign(f[g], Z, g, d) : f[g], Z, m, c, a, g < d - 1); if (e) { h.appendChild(e) } } return h } function J(Z, g) { var a, Y, d, f; for (var b = R(Z, g).firstChild; b; b = d) { d = b.nextSibling; f = false; if (b.nodeType == 1) { if (!b.firstChild) { continue } if (!/cufon/.test(b.className)) { arguments.callee(b, g); continue } else { f = true } } if (!Y) { Y = L.getStyle(Z).extend(g) } if (!a) { a = C(Z, Y) } if (!a) { continue } if (f) { W[g.engine](a, null, Y, g, b, Z); continue } var e = b.data; if (e === "") { continue } var c = M(a, e, Y, g, b, Z); if (c) { b.parentNode.replaceChild(c, b) } else { b.parentNode.removeChild(b) } } } var S = " ".split(/\s+/).length == 0; var D = new X(); var B = new P(); var V = []; var W = {}, H = {}, T = { enableTextDecoration: false, engine: null, hover: false, hoverables: { a: true }, printable: true, selector: (window.Sizzle || window.jQuery || (window.dojo && dojo.query) || (window.$$ && function(Y) { return $$(Y) }) || (window.$ && function(Y) { return $(Y) }) || (document.querySelectorAll && function(Y) { return document.querySelectorAll(Y) }) || F), separate: "words", textShadow: "none" }; var N = { words: /\s+/, characters: "" }; K.now = function() { U.ready(); return K }; K.refresh = function() { var a = V.splice(0, V.length); for (var Z = 0, Y = a.length; Z < Y; ++Z) { K.replace.apply(null, a[Z]) } return K }; K.registerEngine = function(Z, Y) { if (!Y) { return K } W[Z] = Y; return K.set("engine", Z) }; K.registerFont = function(a) { var Y = new Q(a), Z = Y.family; if (!H[Z]) { H[Z] = new E() } H[Z].add(Y); return K.set("fontFamily", Z) }; K.replace = function(a, Z, Y) { Z = G(T, Z); if (!Z.engine) { return K } if (typeof Z.textShadow == "string") { Z.textShadow = L.textShadow(Z.textShadow) } if (!Y) { V.push(arguments) } if (a.nodeType || typeof a == "string") { a = [a] } L.ready(function() { for (var c = 0, b = a.length; c < b; ++c) { var d = a[c]; if (typeof d == "string") { K.replace(Z.selector(d), Z, true) } else { J(d, Z) } } }); return K }; K.set = function(Y, Z) { T[Y] = Z; return K }; return K })(); Cufon.registerEngine("canvas", (function() { var B = document.createElement("canvas"); if (!B || !B.getContext || !B.getContext.apply) { return null } B = null; var A = Cufon.CSS.supports("display", "inline-block"); var E = !A && (document.compatMode == "BackCompat" || /frameset|transitional/i.test(document.doctype.publicId)); var F = document.createElement("style"); F.type = "text/css"; F.appendChild(document.createTextNode("@media screen,projection{.cufon-canvas{display:inline;display:inline-block;position:relative;vertical-align:middle" + (E ? "" : ";font-size:1px;line-height:1px") + "}.cufon-canvas .cufon-alt{position:absolute;left:-10000in;font-size:1px}" + (A ? ".cufon-canvas canvas{position:relative}" : ".cufon-canvas canvas{position:absolute}") + "}@media print{.cufon-canvas{padding:0 !important}.cufon-canvas canvas{display:none}.cufon-canvas .cufon-alt{display:inline}}")); document.getElementsByTagName("head")[0].appendChild(F); function D(O, H) { var M = 0, L = 0; var G = [], N = /([mrvxe])([^a-z]*)/g, J; generate: for (var I = 0; J = N.exec(O); ++I) { var K = J[2].split(","); switch (J[1]) { case "v": G[I] = { m: "bezierCurveTo", a: [M + ~ ~K[0], L + ~ ~K[1], M + ~ ~K[2], L + ~ ~K[3], M += ~ ~K[4], L += ~ ~K[5]] }; break; case "r": G[I] = { m: "lineTo", a: [M += ~ ~K[0], L += ~ ~K[1]] }; break; case "m": G[I] = { m: "moveTo", a: [M = ~ ~K[0], L = ~ ~K[1]] }; break; case "x": G[I] = { m: "closePath" }; break; case "e": break generate } H[G[I].m].apply(H, G[I].a) } return G } function C(K, J) { for (var I = 0, H = K.length; I < H; ++I) { var G = K[I]; J[G.m].apply(J, G.a) } } return function(q, T, k, P, X, r) { var I = (T === null); var V = q.viewBox; var J = k.getSize("fontSize", q.baseSize); var h = k.get("letterSpacing"); h = (h == "normal") ? 0 : J.convertFrom(parseInt(h, 10)); var W = 0, j = 0, f = 0, R = 0; var U = P.textShadow, d = []; if (U) { for (var p = 0, m = U.length; p < m; ++p) { var Z = U[p]; var c = J.convertFrom(parseFloat(Z.offX)); var b = J.convertFrom(parseFloat(Z.offY)); d[p] = [c, b]; if (b < W) { W = b } if (c > j) { j = c } if (b > f) { f = b } if (c < R) { R = c } } } var u = Cufon.CSS.textTransform(I ? X.alt : T, k).split(""); var G = 0, S = null; for (var p = 0, m = u.length; p < m; ++p) { var Q = q.glyphs[u[p]] || q.missingGlyph; if (!Q) { continue } G += S = Number(Q.w || q.w) + h } if (S === null) { return null } j += (V.width - S); R += V.minX; var O, K; if (I) { O = X; K = X.firstChild } else { O = document.createElement("span"); O.className = "cufon cufon-canvas"; O.alt = T; K = document.createElement("canvas"); O.appendChild(K); if (P.printable) { var n = document.createElement("span"); n.className = "cufon-alt"; n.appendChild(document.createTextNode(T)); O.appendChild(n) } } var v = O.style; var a = K.style; var H = J.convert(V.height - W + f); var t = Math.ceil(H); var e = t / H; K.width = Math.ceil(J.convert(G + j - R) * e); K.height = t; W += V.minY; a.top = Math.round(J.convert(W - q.ascent)) + "px"; a.left = Math.round(J.convert(R)) + "px"; var N = Math.ceil(J.convert(G * e)) + "px"; if (A) { v.width = N; v.height = J.convert(q.height) + "px" } else { v.paddingLeft = N; v.paddingBottom = (J.convert(q.height) - 1) + "px" } var s = K.getContext("2d"), Y = t / V.height; s.scale(Y, Y); s.translate(-R, -W); s.lineWidth = q.face["underline-thickness"]; s.save(); function L(i, g) { s.strokeStyle = g; s.beginPath(); s.moveTo(0, i); s.lineTo(G, i); s.stroke() } var M = P.enableTextDecoration ? Cufon.CSS.textDecoration(r, k) : {}; if (M.underline) { L(-q.face["underline-position"], M.underline) } if (M.overline) { L(q.ascent, M.overline) } s.fillStyle = k.get("color"); function o() { for (var w = 0, g = u.length; w < g; ++w) { var x = q.glyphs[u[w]] || q.missingGlyph; if (!x) { continue } s.beginPath(); if (x.d) { if (x.code) { C(x.code, s) } else { x.code = D("m" + x.d, s) } } s.fill(); s.translate(Number(x.w || q.w) + h, 0) } } if (U) { for (var p = 0, m = U.length; p < m; ++p) { var Z = U[p]; s.save(); s.fillStyle = Z.color; s.translate.apply(s, d[p]); o(); s.restore() } } o(); s.restore(); if (M["line-through"]) { L(-q.descent, M["line-through"]) } return O } })()); Cufon.registerEngine("vml", (function() { if (!document.namespaces) { return } document.write('<!--[if vml]><script type="text/javascript">Cufon.vmlEnabled=true;<\/script><![endif]-->'); if (!Cufon.vmlEnabled) { return } if (document.namespaces.cvml == null) { document.namespaces.add("cvml", "urn:schemas-microsoft-com:vml"); document.write('<style type="text/css">@media screen{cvml\\:shape,cvml\\:group,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute}.cufon-vml-canvas{position:absolute;text-align:left}.cufon-vml{display:inline-block;position:relative;vertical-align:middle}.cufon-vml .cufon-alt{position:absolute;left:-10000in;font-size:1px}a .cufon-vml{cursor:pointer}}@media print{.cufon-vml *{display:none}.cufon-vml .cufon-alt{display:inline}}</style>') } function B(C, D) { return A(C, /(?:em|ex|%)$/i.test(D) ? "1em" : D) } function A(F, G) { if (/px$/i.test(G)) { return parseFloat(G) } var E = F.style.left, D = F.runtimeStyle.left; F.runtimeStyle.left = F.currentStyle.left; F.style.left = G; var C = F.style.pixelLeft; F.style.left = E; F.runtimeStyle.left = D; return C } return function(r, U, m, R, Y, s, h) { var F = (U === null); if (F) { U = Y.alt } var W = r.viewBox; var G = m.computedFontSize || (m.computedFontSize = new Cufon.CSS.Size(B(s, m.get("fontSize")) + "px", r.baseSize)); var g = m.computedLSpacing; if (g == undefined) { g = m.get("letterSpacing"); m.computedLSpacing = g = (g == "normal") ? 0 : ~ ~G.convertFrom(A(s, g)) } var O, H; if (F) { O = Y; H = Y.firstChild } else { O = document.createElement("span"); O.className = "cufon cufon-vml"; O.alt = U; H = document.createElement("span"); H.className = "cufon-vml-canvas"; O.appendChild(H); if (R.printable) { var p = document.createElement("span"); p.className = "cufon-alt"; p.appendChild(document.createTextNode(U)); O.appendChild(p) } if (!h) { O.appendChild(document.createElement("cvml:group")) } } var x = O.style; var b = H.style; var D = G.convert(W.height), u = Math.ceil(D); var f = u / D; var e = W.minX, d = W.minY; b.height = u; b.top = Math.round(G.convert(d - r.ascent)); b.left = Math.round(G.convert(e)); x.height = G.convert(r.height) + "px"; var K = R.enableTextDecoration ? Cufon.CSS.textDecoration(s, m) : {}; var T = m.get("color"); var v = Cufon.CSS.textTransform(U, m).split(""); var C = 0, c = 0, L = null; var S, M, V = R.textShadow; for (var q = 0, o = 0, n = v.length; q < n; ++q) { S = r.glyphs[v[q]] || r.missingGlyph; if (S) { C += L = ~ ~(S.w || r.w) + g } } if (L === null) { return null } var N = -e + C + (W.width - L); var w = G.convert(N * f), j = Math.round(w); var a = N + "," + W.height, E; var X = "r" + a + "nsnf"; for (q = 0; q < n; ++q) { S = r.glyphs[v[q]] || r.missingGlyph; if (!S) { continue } if (F) { M = H.childNodes[o]; if (M.firstChild) { M.removeChild(M.firstChild) } } else { M = document.createElement("cvml:shape"); H.appendChild(M) } M.stroked = "f"; M.coordsize = a; M.coordorigin = E = (e - c) + "," + d; M.path = (S.d ? "m" + S.d + "xe" : "") + "m" + E + X; M.fillcolor = T; var t = M.style; t.width = j; t.height = u; if (V) { var J = V[0], I = V[1]; var Q = Cufon.CSS.color(J.color), P; var Z = document.createElement("cvml:shadow"); Z.on = "t"; Z.color = Q.color; Z.offset = J.offX + "," + J.offY; if (I) { P = Cufon.CSS.color(I.color); Z.type = "double"; Z.color2 = P.color; Z.offset2 = I.offX + "," + I.offY } Z.opacity = Q.opacity || (P && P.opacity) || 1; M.appendChild(Z) } c += ~ ~(S.w || r.w) + g; ++o } x.width = Math.max(Math.ceil(G.convert(C * f)), 0); return O } })()); Cufon.registerFont({ "w": 171, "face": { "font-family": "TUIType", "font-weight": 400, "font-stretch": "normal", "units-per-em": "360", "panose-1": "2 12 6 4 4 2 2 2 2 3", "ascent": "288", "descent": "-72", "x-height": "4", "bbox": "-34.849 -323 306 71.45", "underline-thickness": "17.9297", "underline-position": "-50.8008", "unicode-range": "U+0020-U+00FF" }, "glyphs": { " ": { "w": 90 }, "!": { "d": "36,-40v27,0,27,43,0,43v-26,0,-27,-43,0,-43xm21,-234v0,-12,32,-13,31,0r-2,168v-10,1,-30,8,-29,-7r0,-161", "w": 73 }, "\"": { "d": "24,-242v10,0,29,-4,28,8v-2,24,1,51,-4,72v-10,1,-31,7,-28,-7r-2,-65v0,-6,2,-6,6,-8xm105,-169v1,9,-6,9,-15,9v-11,-1,-14,1,-15,-9v0,-23,-3,-48,-1,-70v6,-5,35,-8,33,5", "w": 124 }, "#": { "d": "11,-68v-9,-2,-6,-22,4,-21r35,0r13,-49v-17,0,-49,6,-35,-19v10,-5,28,-1,41,-2v7,-22,10,-48,20,-67v10,-2,25,-4,21,12r-15,55r39,0v7,-22,10,-48,20,-67v10,-3,29,-1,20,12r-15,55v13,1,29,-2,39,2v4,26,-22,18,-44,19r-13,49v16,1,49,-7,35,19v-9,5,-28,1,-41,2r-17,61v-1,6,-4,7,-13,7v-11,0,-14,-3,-11,-13r15,-55r-39,0v-7,22,-10,48,-20,67v-9,3,-29,1,-20,-12r14,-55r-33,0xm76,-89r39,0r13,-49r-39,0", "w": 207 }, "$": { "d": "106,2v-2,12,6,30,-11,28v-17,2,-11,-14,-12,-27v-28,-1,-56,-9,-68,-26v9,-37,40,6,68,1r0,-81v-33,-10,-65,-20,-65,-61v0,-40,29,-60,65,-62v1,-12,-4,-28,12,-24v16,-3,10,13,11,24v24,3,42,5,53,18r-10,19v-15,-4,-24,-11,-43,-12r0,75v36,10,65,21,66,63v0,41,-25,62,-66,65xm106,-23v35,1,52,-51,19,-66v-6,-2,-12,-5,-19,-7r0,73xm83,-201v-31,0,-49,36,-27,56v6,5,15,10,27,13r0,-69", "w": 188 }, "%": { "d": "271,-54v-1,37,-21,57,-56,59v-37,-1,-56,-22,-57,-59v1,-37,20,-58,57,-59v35,0,56,24,56,59xm187,-240v4,-11,42,-8,25,7r-119,230v-4,12,-40,9,-26,-7xm185,-54v1,20,7,38,30,37v19,0,30,-17,29,-37v1,-21,-10,-37,-29,-37v-20,0,-30,18,-30,37xm122,-187v-1,37,-21,57,-56,59v-37,-2,-56,-22,-57,-59v1,-37,20,-58,57,-59v35,0,56,24,56,59xm36,-187v1,22,9,36,30,37v19,-1,30,-17,29,-37v1,-21,-10,-37,-29,-38v-21,0,-30,17,-30,38", "w": 280 }, "&": { "d": "217,-140v0,20,-12,22,-32,20v6,76,-17,124,-87,124v-50,-2,-81,-23,-83,-73v0,-32,19,-55,41,-64v-52,-21,-32,-122,34,-113v18,1,44,2,50,16v0,7,-4,19,-11,19v-25,-15,-77,-12,-73,30v5,56,98,34,153,34v7,0,8,0,8,7xm50,-69v0,32,18,44,50,45v51,2,56,-43,53,-96v-53,-3,-107,-2,-103,51", "w": 220 }, "'": { "d": "24,-242v10,0,29,-4,28,8v-2,24,1,51,-4,72v-10,1,-31,7,-28,-7r-2,-65v0,-6,2,-6,6,-8", "w": 69 }, "(": { "d": "108,-216v-78,35,-78,231,3,264v0,7,-5,23,-14,23v-110,-33,-108,-279,0,-313v4,0,21,21,11,26", "w": 116 }, ")": { "d": "5,50v80,-37,85,-231,1,-268v-3,-6,7,-23,14,-24v107,35,109,280,0,313v-8,3,-13,-17,-15,-21", "w": 116 }, "*": { "d": "123,-134v-1,3,-19,22,-25,12r-22,-35v-10,12,-16,29,-29,38v-5,-2,-25,-11,-17,-20r25,-32v-15,-5,-32,-6,-45,-13v1,-9,4,-28,14,-24r39,14v1,-20,-14,-57,20,-48v13,6,2,33,4,48v16,-2,39,-24,49,-8v2,8,7,18,-2,20r-39,11v9,13,20,23,28,37", "w": 150 }, "+": { "d": "156,-123v5,7,5,28,-7,26r-49,0v-1,20,2,44,-2,60v-10,2,-29,5,-27,-8r0,-52r-55,-1v-6,-6,-7,-30,6,-28r49,0v4,-24,-15,-71,23,-62v13,9,3,43,6,62v18,1,43,-4,56,3" }, ",": { "d": "22,-32v4,-14,44,-11,32,7v-8,20,-13,42,-23,60v-11,3,-32,1,-22,-14", "w": 69 }, "-": { "d": "108,-85v0,11,-1,23,-12,23r-74,0v-6,0,-9,-1,-8,-8v0,-10,0,-24,12,-23r74,0v6,0,9,0,8,8", "w": 121 }, "\u00ad": { "d": "108,-85v0,11,-1,23,-12,23r-74,0v-6,0,-9,-1,-8,-8v0,-10,0,-24,12,-23r74,0v6,0,9,0,8,8", "w": 121 }, ".": { "d": "35,-40v25,0,27,43,0,43v-11,0,-22,-9,-21,-21v0,-13,9,-22,21,-22", "w": 69 }, "\/": { "d": "84,-234v1,-10,26,-10,28,-1r-87,234v-11,3,-30,1,-21,-14", "w": 113 }, "0": { "d": "162,-111v-1,62,-19,111,-76,115v-58,-3,-76,-54,-77,-115v1,-62,18,-113,77,-116v57,4,75,53,76,116xm42,-111v0,46,8,87,44,87v35,0,43,-42,43,-87v0,-45,-8,-84,-43,-89v-38,4,-43,46,-44,89" }, "1": { "d": "86,-220v6,-8,28,-12,26,4r-2,215v-6,2,-29,7,-29,-7r0,-175v-15,12,-26,29,-45,37v-11,-3,-20,-19,-6,-26" }, "2": { "d": "151,-21v0,10,-1,22,-13,21r-112,0v-15,3,-12,-20,-8,-27v33,-43,90,-68,97,-136v0,-23,-14,-35,-35,-36v-26,-2,-29,17,-47,23v-8,-1,-15,-12,-16,-16v21,-54,140,-44,130,30v-6,67,-55,95,-89,134r85,0v7,0,7,1,8,7" }, "3": { "d": "53,-110v-5,-10,-2,-32,15,-27v26,0,44,-10,44,-35v-3,-43,-62,-27,-82,-9v-7,0,-13,-12,-14,-16v21,-44,131,-42,127,23v-1,28,-15,41,-35,49v22,7,39,25,39,54v-2,58,-46,81,-103,83v-23,2,-26,-5,-24,-23v4,-8,14,-5,25,-5v36,-2,68,-15,69,-53v0,-34,-25,-43,-61,-41" }, "4": { "d": "132,2v2,14,-18,11,-28,8v-5,-18,-1,-46,-2,-68v-30,-2,-68,4,-94,-2v1,-7,-1,-15,4,-19r93,-141v6,-7,29,-12,27,4r0,133v11,1,30,-5,30,7v0,18,-12,20,-30,18r0,60xm45,-83r57,0r0,-89" }, "5": { "d": "14,-2v-1,-17,12,-15,27,-14v38,-1,71,-16,72,-55v0,-43,-46,-48,-89,-45r6,-107r112,0v4,10,3,30,-11,29r-76,0r-2,51v55,0,93,20,93,70v0,59,-49,84,-106,85v-19,-1,-25,1,-26,-14" }, "6": { "d": "162,-74v-2,47,-28,76,-75,78v-96,1,-83,-137,-39,-188v19,-24,26,-35,48,-50v14,-3,42,-1,23,14v-26,23,-52,51,-65,86v41,-38,115,2,108,60xm43,-73v1,29,15,50,44,51v28,0,43,-25,43,-51v0,-30,-15,-51,-43,-51v-28,0,-44,23,-44,51" }, "7": { "d": "143,-223v15,-1,10,18,7,29r-71,203v-8,6,-37,4,-27,-10r69,-193r-109,0v-5,-9,-2,-31,11,-29r120,0" }, "8": { "d": "85,4v-75,8,-100,-101,-39,-125v-16,-9,-28,-24,-28,-48v1,-39,28,-56,67,-58v65,-8,92,82,39,106v22,9,36,29,36,57v-1,45,-31,66,-75,68xm41,-64v1,27,16,41,44,42v26,1,44,-17,44,-42v0,-27,-18,-41,-44,-42v-27,0,-44,17,-44,42xm47,-166v2,21,14,34,38,34v23,0,38,-12,38,-34v1,-24,-16,-35,-38,-36v-23,1,-37,13,-38,36" }, "9": { "d": "85,-227v95,-2,83,137,38,186v-21,26,-25,47,-60,53v-17,1,-22,-6,-10,-15v26,-25,51,-51,65,-87v-40,37,-116,0,-108,-60v2,-47,28,-75,75,-77xm41,-150v1,29,15,49,44,51v27,-1,43,-22,43,-51v0,-30,-15,-50,-43,-51v-29,1,-43,22,-44,51" }, ":": { "d": "35,-40v25,0,27,43,0,43v-11,0,-22,-9,-21,-21v0,-13,9,-22,21,-22xm35,-157v25,0,27,43,0,43v-11,0,-22,-10,-21,-21v0,-12,9,-22,21,-22", "w": 69 }, ";": { "d": "22,-32v4,-14,44,-11,32,7v-8,20,-13,42,-23,60v-11,3,-32,1,-22,-14xm59,-135v-1,13,-9,20,-21,21v-11,0,-21,-10,-21,-21v1,-11,9,-22,21,-22v11,0,21,10,21,22", "w": 69 }, "\u037e": { "d": "22,-32v4,-14,44,-11,32,7v-8,20,-13,42,-23,60v-11,3,-32,1,-22,-14xm59,-135v-1,13,-9,20,-21,21v-11,0,-21,-10,-21,-21v1,-11,9,-22,21,-22v11,0,21,10,21,22", "w": 69 }, "<": { "d": "151,-70v12,4,11,43,-7,28r-123,-52v-13,-2,-13,-32,0,-34r132,-56v9,2,8,30,-2,31r-99,42" }, "=": { "d": "158,-86v2,9,1,24,-9,23v-43,-2,-93,3,-133,-2v-6,-5,-8,-27,6,-27r127,0v5,0,8,1,9,6xm158,-153v2,8,2,25,-9,22r-127,0v-12,2,-10,-14,-9,-22v1,-5,4,-6,9,-6r127,0v5,0,8,1,9,6" }, ">": { "d": "20,-153v-14,-3,-11,-43,7,-28r123,53v13,2,12,29,0,34r-132,55v-9,-2,-10,-31,2,-31r99,-41" }, "?": { "d": "84,-18v-1,13,-9,20,-21,21v-11,-1,-21,-9,-21,-21v1,-11,9,-22,21,-22v11,0,21,10,21,22xm78,-108v1,25,6,56,-28,42v0,-18,-14,-66,13,-65v24,-7,40,-19,40,-47v3,-41,-53,-43,-78,-30v-9,-1,-10,-12,-12,-19v6,-14,29,-14,49,-16v44,0,71,23,72,64v0,41,-25,62,-56,71", "w": 156 }, "@": { "d": "43,-80v-8,104,118,125,191,81v7,0,12,12,13,17v-19,21,-59,30,-99,31v-84,0,-128,-48,-133,-129v3,-77,53,-127,130,-130v71,2,116,38,119,108v-1,51,-25,89,-74,92v-18,0,-28,-6,-29,-21v-24,35,-99,25,-92,-31v-7,-74,82,-113,136,-73v-2,31,-15,59,-17,92v0,6,3,10,10,9v28,-3,40,-38,40,-68v-2,-55,-37,-80,-93,-82v-63,2,-101,41,-102,104xm97,-64v3,51,58,25,66,-2v7,-18,11,-35,15,-55v-42,-19,-83,11,-81,57", "w": 279 }, "A": { "d": "82,-237v2,-10,34,-9,36,0r80,232v-2,10,-34,10,-34,-4r-19,-58r-92,0r-22,65v-7,5,-38,7,-27,-10xm62,-93r74,0r-37,-111", "w": 199 }, "B": { "d": "43,0v-11,0,-15,0,-16,-10r0,-221v1,-9,3,-10,16,-10v65,-1,140,-6,140,56v1,27,-14,46,-31,54v25,8,44,29,43,62v0,73,-76,72,-152,69xm161,-71v2,-50,-53,-45,-102,-44r0,88v50,1,102,4,102,-44xm149,-181v1,-41,-50,-32,-90,-33r0,71v43,-1,94,7,90,-38", "w": 210 }, "C": { "d": "192,-17v-11,14,-44,22,-72,22v-72,-3,-102,-52,-105,-125v2,-73,35,-123,106,-126v32,0,54,4,68,20v-3,11,-7,27,-20,22v-10,-8,-27,-13,-48,-12v-52,2,-69,43,-70,96v-7,78,60,116,126,81v7,1,15,18,15,22", "w": 195 }, "D": { "d": "43,0v-11,0,-15,0,-16,-10r0,-221v1,-9,3,-10,16,-10r66,0v72,2,105,46,107,120v-2,73,-35,120,-108,121r-65,0xm181,-121v2,-74,-41,-101,-121,-92r0,185r49,0v53,-1,71,-40,72,-93", "w": 231 }, "E": { "d": "175,-27v2,10,2,27,-12,27r-120,0v-11,0,-15,0,-16,-10r0,-221v1,-9,3,-10,16,-10r130,1v2,11,2,27,-12,27r-101,0r0,68r97,1v2,11,2,27,-12,27r-85,0r0,89", "w": 180 }, "F": { "d": "171,-234v0,10,-1,21,-13,21r-98,0r0,71r87,0v14,0,7,24,1,28v-27,3,-59,0,-88,1r-1,111v-7,4,-36,8,-32,-7r0,-222v0,-9,6,-10,16,-10r120,0v7,0,8,1,8,7", "w": 172 }, "G": { "d": "119,-98v-3,-11,-2,-29,12,-26r56,0v12,0,15,1,16,10r0,93v-8,25,-47,24,-79,26v-74,-3,-107,-49,-109,-125v-8,-101,91,-155,179,-110v3,12,-4,24,-13,27v-16,-7,-30,-15,-57,-13v-55,1,-72,41,-73,96v2,54,22,94,75,96v21,0,32,-2,45,-7r0,-65v-17,-1,-39,3,-52,-2", "w": 222 }, "H": { "d": "177,-242v11,-1,27,-4,27,10r-1,230v-8,4,-36,8,-32,-7r0,-108r-111,0r-1,115v-7,4,-36,8,-32,-7r0,-223v-1,-11,7,-11,16,-11v11,0,18,1,17,11r0,87r111,0r0,-87v0,-7,1,-8,6,-10", "w": 230 }, "I": { "d": "27,-232v-3,-15,21,-11,31,-8r0,239v-8,2,-35,7,-31,-8r0,-223", "w": 86 }, "J": { "d": "136,-238v-8,99,35,243,-72,243v-30,0,-53,-5,-62,-23v1,-4,7,-21,15,-20v16,6,21,17,44,15v34,2,44,-26,43,-59r1,-157v4,-6,28,-5,31,1", "w": 161 }, "K": { "d": "33,-242v10,-1,27,-4,27,10r0,98r97,-104v7,-8,48,-7,32,8r-97,103r106,116v7,11,0,13,-16,12v-9,0,-15,0,-19,-4r-103,-115r-1,116v-7,4,-36,8,-32,-7r0,-223v0,-7,1,-8,6,-10", "w": 203 }, "L": { "d": "168,-28v7,7,4,31,-10,28r-115,0v-11,0,-15,0,-16,-10r0,-222v-1,-11,7,-11,16,-11v11,0,18,1,17,11r0,204r108,0", "w": 172 }, "M": { "d": "235,-9v3,14,-19,11,-30,8v-6,-55,0,-124,-2,-183r-58,96v-7,5,-30,4,-33,-4r-53,-87r-2,178v-7,2,-30,8,-30,-8r0,-207v-3,-6,-10,-14,-11,-21v6,-9,35,-8,40,1r76,118r71,-118v3,-10,32,-11,32,4r0,223", "w": 262 }, "N": { "d": "164,-239v7,-6,31,-8,31,7r-1,230v-5,4,-26,6,-29,-2r-107,-169r-2,172v-7,2,-32,7,-29,-8r0,-206v-8,-11,-20,-31,9,-28v10,1,15,2,19,9r108,173", "w": 221 }, "O": { "d": "224,-120v-2,74,-32,122,-104,125v-72,-3,-103,-51,-105,-125v2,-74,33,-123,105,-126v72,2,102,53,104,126xm51,-120v0,55,17,94,69,96v52,-2,68,-43,69,-96v-1,-53,-17,-95,-69,-97v-53,2,-69,42,-69,97", "w": 239 }, "P": { "d": "185,-174v0,64,-59,78,-126,72r-1,101v-8,2,-35,7,-31,-8r0,-222v1,-9,3,-10,16,-10v71,-2,143,-2,142,67xm151,-174v1,-42,-47,-41,-92,-40r0,85v44,4,93,0,92,-45", "w": 194 }, "Q": { "d": "120,-246v126,-9,135,209,41,243v16,18,45,30,54,51v-42,19,-67,-27,-90,-43v-76,-1,-108,-49,-110,-125v2,-74,33,-123,105,-126xm51,-120v0,55,17,94,69,96v52,-2,68,-43,69,-96v-1,-53,-17,-95,-69,-97v-53,2,-69,42,-69,97", "w": 239 }, "R": { "d": "199,-8v3,9,-7,9,-19,9v-7,0,-15,0,-17,-4r-68,-98v-7,0,-19,0,-36,-1r-1,101v-8,2,-35,7,-31,-8r0,-222v1,-9,3,-10,16,-10v72,-2,143,-3,140,67v0,38,-23,61,-53,69xm149,-174v2,-45,-46,-40,-90,-40r0,85v44,3,93,1,90,-45", "w": 203 }, "S": { "d": "152,-204v-34,-22,-126,-21,-104,38v33,41,131,19,130,98v8,86,-130,90,-169,44v3,-12,15,-29,25,-15v34,29,138,15,105,-45v-35,-38,-127,-16,-126,-94v-8,-75,109,-84,151,-48v-3,8,-4,20,-12,22", "w": 188 }, "T": { "d": "187,-241v6,8,4,31,-10,28r-64,0r-2,212v-7,2,-34,7,-31,-8r0,-204r-76,-2v-4,-8,-2,-29,11,-26r172,0", "w": 192 }, "U": { "d": "204,-76v0,57,-32,80,-89,81v-57,0,-89,-26,-90,-81r2,-164v8,-3,31,-8,31,8r0,160v1,33,22,48,57,49v34,-1,55,-17,57,-49r1,-167v5,-5,36,-8,31,7r0,156", "w": 229 }, "V": { "d": "114,-4v-1,9,-29,9,-32,0r-80,-233v5,-10,33,-7,34,5r63,182r65,-189v7,-6,38,-8,29,10", "w": 196 }, "W": { "d": "213,-4v-2,9,-31,9,-33,0r-40,-144r-38,144v-2,9,-33,9,-35,0r-64,-236v10,-4,34,-6,34,8r48,182r40,-148v-8,-22,-18,-57,22,-42r49,190r49,-182v-2,-15,29,-14,34,-5", "w": 279 }, "X": { "d": "187,-10v5,11,-6,11,-16,11v-9,0,-16,-1,-18,-6r-59,-93v-22,32,-39,69,-65,98v-11,0,-33,5,-25,-10r73,-112v-20,-39,-57,-79,-69,-118v8,-5,29,-4,32,4r56,88v21,-30,38,-66,62,-93v9,-5,35,-1,23,11r-68,106", "w": 190 }, "Y": { "d": "110,-1v-9,3,-34,6,-31,-8r0,-94r-77,-136v8,-6,29,-6,33,3r62,104r67,-109v8,-4,37,-2,24,11r-76,127v-1,33,3,72,-2,102", "w": 192 }, "Z": { "d": "165,-28v7,7,3,32,-10,28r-142,0v-14,2,-12,-20,-7,-27r120,-186r-120,-2v-4,-8,-3,-26,11,-26r137,0v14,-2,12,20,7,27r-120,186r124,0", "w": 169 }, "[": { "d": "97,50v1,8,3,20,-9,19v-19,-3,-58,9,-61,-10r0,-290v2,-19,42,-6,61,-10v12,-1,10,11,9,19v-3,11,-26,4,-39,6r0,260v13,2,36,-5,39,6", "w": 103 }, "\\": { "d": "110,-15v8,14,-8,17,-19,14v-4,0,-5,-3,-6,-6r-83,-228v1,-10,27,-7,28,1", "w": 113 }, "]": { "d": "76,59v-4,20,-48,8,-68,8v-4,-6,-6,-23,7,-23r30,0r0,-260v-19,0,-51,5,-37,-23v12,-5,36,-1,52,-2v13,0,15,1,16,10r0,290", "w": 103 }, "^": { "d": "147,-111v8,15,-7,15,-22,14v-20,-23,-26,-58,-40,-86v-13,28,-21,60,-37,85v-12,1,-34,4,-23,-13v17,-36,28,-79,50,-111v11,-2,24,-2,28,8" }, "_": { "d": "0,60r0,-18r180,0r0,18r-180,0", "w": 180 }, "`": { "d": "115,-191v8,11,-2,15,-16,13v-16,-13,-33,-34,-43,-54v4,-10,33,-8,36,3", "w": 180 }, "a": { "d": "122,2v-9,-2,-8,-10,-12,-20v-26,32,-105,31,-101,-26v0,-52,51,-55,100,-57v2,-46,-58,-36,-84,-21v-6,-2,-10,-13,-11,-18v34,-36,136,-26,124,44v1,29,-4,68,5,88v2,6,-15,11,-21,10xm38,-46v0,16,10,24,24,25v30,-1,50,-20,47,-56v-29,5,-70,-2,-71,31", "w": 158 }, "b": { "d": "167,-81v9,72,-75,111,-117,63v3,17,-5,21,-23,19v-5,-1,-6,-3,-6,-9r0,-220v-1,-15,17,-15,29,-14v5,30,0,70,2,103v10,-13,26,-21,48,-21v45,0,67,35,67,79xm50,-80v0,31,12,56,42,57v31,-2,42,-26,43,-57v-1,-31,-13,-52,-43,-53v-30,0,-40,24,-42,53", "w": 180 }, "c": { "d": "122,-122v-8,-2,-24,-12,-37,-11v-54,1,-55,108,0,108v18,1,23,-8,37,-11v3,-2,14,15,13,19v-7,15,-30,21,-51,21v-48,0,-70,-33,-71,-82v2,-49,25,-80,73,-82v21,0,42,5,48,18v0,2,-7,22,-12,20", "w": 139 }, "d": { "d": "130,-18v-10,14,-28,21,-50,22v-46,-3,-66,-34,-67,-82v1,-48,22,-81,69,-82v23,-1,36,10,46,21r0,-89v-2,-15,18,-15,29,-14v6,72,0,158,2,234v1,12,-12,8,-23,9v-7,-2,-6,-10,-6,-19xm45,-78v0,31,13,54,43,55v31,0,41,-28,42,-57v-1,-28,-13,-53,-42,-53v-31,0,-43,24,-43,55", "w": 180 }, "e": { "d": "144,-17v-8,16,-34,19,-56,21v-50,-2,-73,-33,-75,-83v2,-47,23,-80,71,-81v48,0,69,34,69,80v0,10,-6,10,-16,11r-93,0v1,44,55,53,87,33v7,0,12,14,13,19xm121,-94v3,-36,-40,-55,-63,-31v-7,8,-11,18,-13,31r76,0", "w": 164 }, "f": { "d": "108,-150v0,26,-27,16,-48,18r-2,131v-7,3,-29,7,-28,-7r0,-124v-10,-2,-28,6,-28,-7v-2,-18,11,-19,28,-18v-4,-51,10,-87,56,-86v17,2,37,2,42,15v0,25,-21,15,-39,11v-31,-1,-30,30,-29,60r40,0v7,0,8,0,8,7", "w": 109 }, "g": { "d": "134,-17v55,36,5,94,-53,88v-38,-4,-70,-11,-72,-46v0,-21,14,-35,29,-40v-19,-9,-19,-39,1,-47v-47,-24,-21,-96,40,-96v17,0,27,2,38,8v11,-15,39,-34,44,-6v-1,11,-23,12,-26,19v27,45,-14,97,-73,81v-4,3,-8,5,-8,12v9,22,61,13,80,27xm58,-7v-39,19,-12,59,25,55v29,4,55,-19,35,-40v-14,-9,-43,-8,-60,-15xm43,-105v0,20,17,30,37,30v20,0,34,-11,34,-30v0,-21,-14,-31,-34,-31v-21,0,-37,9,-37,31", "w": 158 }, "h": { "d": "92,-134v-57,1,-34,81,-42,133v-7,2,-29,7,-29,-7r0,-220v-2,-15,15,-15,29,-14v5,30,0,71,2,105v26,-41,114,-24,105,36v-1,33,3,71,-2,100v-7,2,-31,7,-29,-7v-5,-48,20,-127,-34,-126", "w": 176 }, "i": { "d": "44,-159v7,0,7,1,8,8r-2,150v-7,2,-29,7,-29,-7r1,-142v0,-7,14,-8,22,-9xm36,-234v21,-1,25,29,9,37v-13,5,-28,-3,-27,-18v0,-10,8,-19,18,-19", "w": 73 }, "j": { "d": "51,5v9,54,-45,82,-85,57v-5,-17,13,-24,30,-16v19,-2,25,-15,24,-38r1,-158v0,-7,13,-8,22,-9v7,0,7,1,8,8r0,156xm35,-234v27,0,23,40,0,39v-10,-1,-19,-8,-18,-20v0,-10,8,-19,18,-19", "w": 71 }, "k": { "d": "155,-11v7,11,0,13,-15,12v-7,-1,-16,-1,-20,-5r-68,-75v-1,26,2,56,-2,78v-7,2,-29,7,-29,-7r0,-220v-2,-15,15,-15,29,-14v6,43,0,98,2,145r66,-60v10,-3,40,-2,25,11r-62,57", "w": 158 }, "l": { "d": "21,-228v-2,-15,15,-15,29,-14v5,73,3,167,0,241v-7,2,-29,7,-29,-7r0,-220", "w": 73 }, "m": { "d": "89,-134v-54,4,-31,82,-39,133v-7,2,-29,7,-29,-7r1,-142v0,-7,14,-8,22,-9v12,-2,7,12,8,21v15,-29,79,-30,90,4v11,-14,28,-26,51,-26v72,-4,51,94,50,159v-7,2,-31,7,-29,-7v-6,-45,20,-124,-28,-126v-54,3,-32,82,-40,133v-6,2,-31,7,-28,-7v-6,-46,20,-123,-29,-126", "w": 264 }, "n": { "d": "92,-134v-57,1,-34,81,-42,133v-7,2,-29,7,-29,-7r1,-142v0,-7,14,-8,22,-9v12,-2,7,13,8,22v26,-41,114,-24,105,36v-1,33,3,71,-2,100v-7,2,-31,7,-29,-7v-5,-48,20,-127,-34,-126", "w": 176 }, "o": { "d": "163,-78v-1,50,-27,79,-75,82v-48,-3,-73,-34,-75,-82v2,-49,26,-81,75,-82v47,0,75,35,75,82xm44,-78v1,31,13,54,44,55v30,0,44,-26,44,-55v0,-32,-14,-56,-44,-56v-31,1,-43,25,-44,56", "w": 176 }, "p": { "d": "52,59v1,14,-19,10,-29,8v-5,-66,-2,-149,-1,-217v0,-7,14,-8,22,-9v11,-2,7,11,8,20v10,-13,26,-21,48,-21v45,0,67,35,67,79v9,70,-72,110,-115,65r0,75xm50,-80v0,31,12,56,42,57v31,-2,42,-26,43,-57v-1,-31,-13,-52,-43,-53v-30,0,-40,24,-42,53", "w": 180 }, "q": { "d": "130,-156v9,-3,31,-6,29,7r-2,216v-10,2,-27,6,-27,-8r0,-77v-10,14,-28,21,-50,22v-46,-3,-66,-34,-67,-82v1,-48,22,-81,69,-82v23,-1,36,10,46,21v0,-6,0,-15,2,-17xm45,-78v0,31,13,54,43,55v31,0,41,-28,42,-57v-1,-28,-13,-53,-42,-53v-31,0,-43,24,-43,55", "w": 180 }, "r": { "d": "108,-126v-30,-17,-57,10,-56,43v-1,27,2,58,-2,82v-7,2,-29,7,-29,-7r1,-142v0,-7,14,-8,22,-9v13,-2,6,15,8,25v7,-23,54,-35,68,-12v0,3,-8,22,-12,20", "w": 119 }, "s": { "d": "103,-87v57,22,20,100,-34,91v-25,-1,-45,-7,-61,-17v-5,-15,12,-30,25,-18v23,17,90,6,61,-27v-29,-14,-85,-8,-85,-55v-3,-51,85,-61,113,-31v0,42,-77,-19,-83,29v3,24,44,19,64,28", "w": 138 }, "t": { "d": "60,-42v-2,26,29,22,42,12v4,-1,12,12,12,17v-21,30,-95,20,-84,-32r0,-87v-10,-2,-28,6,-28,-7v-2,-18,11,-19,28,-18v0,-29,-7,-59,28,-51v5,12,1,35,2,51r40,0v7,0,8,0,8,7v0,26,-27,16,-48,18r0,90", "w": 114 }, "u": { "d": "127,-23v-24,44,-115,30,-107,-33v1,-33,-3,-71,2,-100v6,-2,31,-7,29,7v5,48,-19,126,33,126v58,-1,35,-81,43,-133v7,-3,31,-6,29,7v-2,48,5,105,-3,148v-6,3,-29,7,-26,-8r0,-14", "w": 176 }, "v": { "d": "119,-150v3,-13,42,-12,29,6r-56,139v-3,10,-29,10,-32,0r-58,-147v1,-9,30,-8,33,0r42,112", "w": 152 }, "w": { "d": "102,-119v-7,-19,-19,-47,15,-38v3,1,4,2,5,5r36,111v15,-38,25,-81,44,-116v10,-2,31,-4,23,13v-22,46,-33,101,-57,145v-9,1,-26,3,-26,-6r-29,-81v-13,28,-21,62,-37,87v-9,1,-23,3,-26,-6r-48,-147v1,-9,29,-9,31,0r35,116", "w": 229 }, "x": { "d": "109,-153v7,-9,46,-7,27,9r-45,62r56,78v0,4,-6,5,-16,5v-10,0,-16,0,-19,-5r-39,-55v-15,19,-25,43,-44,59v-12,3,-38,1,-22,-13r49,-68r-49,-72v3,-8,30,-7,34,0r34,49", "w": 148 }, "y": { "d": "5,-144v-8,-10,2,-15,14,-14v9,0,13,1,16,6r48,102v17,-35,29,-76,50,-107v12,-3,35,-2,23,13r-91,207v-4,13,-43,11,-29,-6r31,-72", "w": 160 }, "z": { "d": "9,-133v-5,-8,-2,-27,11,-24r99,0v14,-2,11,17,7,25r-82,107r88,1v2,10,1,26,-12,24v-37,-2,-81,4,-114,-2v-4,-7,-3,-18,3,-25r80,-105", "w": 136 }, "{": { "d": "108,41v8,1,9,26,0,27v-60,7,-77,-32,-69,-92v0,-25,-5,-47,-29,-48v-13,-6,-2,-34,11,-30v21,-10,19,-47,17,-79v1,-41,24,-62,70,-57v7,0,6,6,6,12v-1,16,-1,14,-20,14v-48,5,5,116,-48,127v30,12,28,55,27,96v-1,23,13,31,35,30", "w": 116 }, "|": { "d": "21,-233v-2,-14,20,-10,29,-7v5,90,3,202,0,293v-9,1,-30,8,-29,-7r0,-279", "w": 73 }, "}": { "d": "12,42v66,11,2,-113,59,-127v-55,-8,7,-134,-63,-126v-7,-2,-8,-25,0,-27v67,-8,77,40,70,108v2,18,9,31,29,32v12,7,2,34,-11,30v-21,9,-19,45,-18,79v2,41,-31,66,-74,55v-4,-8,-4,-26,8,-24", "w": 116 }, "~": { "d": "117,-107v-26,-1,-71,-40,-79,-1v-3,6,-27,8,-26,-3v2,-24,17,-45,42,-46v24,-1,37,18,56,20v23,3,12,-32,47,-22v0,29,-11,52,-40,52" }, "\u00a0": { "w": 90 }, "\u00a1": { "d": "50,-6v0,9,-6,9,-15,9v-12,0,-15,0,-15,-9r2,-167v6,-4,29,-6,28,6r0,161xm35,-243v26,0,27,43,0,43v-11,0,-22,-10,-21,-21v0,-13,10,-22,21,-22", "w": 69 }, "\u00a2": { "d": "95,-37v-2,14,8,37,-11,35v-19,3,-10,-21,-12,-35v-38,-6,-58,-36,-59,-81v0,-44,23,-74,59,-81v2,-14,-7,-36,12,-34v19,-2,9,20,11,33v9,2,36,7,39,18v0,4,-7,21,-12,20r-27,-10r0,106v14,-1,17,-8,27,-10v3,-2,14,16,13,19v-5,13,-24,17,-40,20xm72,-170v-36,13,-37,91,0,103r0,-103", "w": 139 }, "\u00a3": { "d": "25,-111v5,-21,5,-25,27,-24v10,-53,26,-101,88,-100v20,1,44,4,50,19v0,7,-6,18,-12,19v-26,-14,-78,-13,-83,20v-7,15,-8,27,-12,42r75,1v1,12,-2,27,-16,26r-65,0r-19,80r107,0v7,0,7,1,8,7v0,10,-2,22,-13,21r-152,-2v-3,-8,1,-31,18,-26r19,-80v-7,-1,-19,2,-20,-3", "w": 195 }, "\u00a4": { "d": "197,-51v9,8,-7,21,-16,21v-9,-6,-15,-16,-23,-23v-24,22,-79,23,-101,0v-9,7,-15,20,-27,23v-8,-2,-20,-13,-13,-21r21,-20v-21,-24,-22,-77,0,-101v-8,-9,-18,-15,-24,-26v2,-6,14,-23,22,-13r20,20v23,-20,78,-21,101,0v9,-7,17,-20,27,-23v7,2,21,14,13,21r-21,21v22,24,21,77,0,101xm49,-122v1,36,24,56,58,59v32,-1,58,-26,58,-59v-1,-32,-26,-57,-58,-58v-34,2,-57,23,-58,58", "w": 213 }, "\u00a5": { "d": "164,-125v5,27,-24,22,-48,22v-6,5,-7,15,-6,27v18,1,43,-4,55,3v2,29,-31,18,-55,20v-2,24,12,67,-31,52v-5,-12,-1,-36,-2,-52v-18,-1,-38,1,-54,-1v0,-10,2,-22,15,-22r39,0v1,-12,0,-22,-6,-27v-16,-1,-34,1,-48,-1v-3,-19,11,-26,33,-23v-15,-31,-47,-62,-54,-94v8,-3,26,-4,31,4r62,95v23,-33,42,-70,68,-100v10,-2,34,-2,24,12r-55,83v10,1,25,-2,32,2", "w": 188 }, "\u00a6": { "d": "52,45v1,15,-20,11,-30,7v-3,-39,0,-83,-1,-124v0,-10,26,-8,31,-2r0,119xm21,-233v-2,-14,20,-10,29,-7v4,38,3,93,0,131v-5,3,-28,5,-29,-4r0,-120", "w": 73 }, "\u00a7": { "d": "40,-72v-34,-8,-37,-71,0,-80v-53,-25,-22,-103,39,-94v22,1,47,3,57,17v0,7,-3,18,-9,19v-28,-20,-113,-12,-76,33v33,20,97,8,97,60v1,23,-13,36,-28,44v18,8,28,19,28,44v4,66,-109,68,-139,31v6,-36,42,1,68,-2v30,4,52,-25,32,-47v-15,-12,-50,-15,-69,-25xm118,-113v1,-33,-75,-40,-76,-2v2,34,77,43,76,2", "w": 157 }, "\u00a8": { "d": "82,-197v1,11,-7,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19xm131,-197v0,11,-8,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19", "w": 180 }, "\u00a9": { "d": "277,-123v0,76,-52,126,-130,128v-79,-4,-123,-51,-129,-128v3,-77,53,-124,129,-129v79,6,130,51,130,129xm49,-123v4,60,38,99,98,102v60,-4,99,-42,99,-102v0,-60,-38,-99,-99,-102v-61,2,-94,43,-98,102xm195,-69v-6,14,-27,14,-46,15v-42,-1,-63,-26,-64,-69v-1,-43,24,-70,64,-70v28,-4,62,15,35,32v-28,-16,-76,-7,-69,38v-3,40,36,54,69,38v3,-1,11,11,11,16", "w": 294 }, "\u00aa": { "d": "19,-97v1,-29,54,-12,82,-15v4,7,-1,24,-11,23r-63,0v-8,-1,-7,-1,-8,-8xm99,-188v-5,24,14,59,-12,59v-6,0,-7,-6,-9,-10v-19,19,-62,13,-61,-19v0,-31,31,-34,60,-35v-4,-35,-55,11,-56,-20v19,-25,85,-18,78,25xm40,-159v0,8,5,10,12,11v14,-1,27,-9,25,-26v-15,2,-37,-2,-37,15", "w": 124 }, "\u00ab": { "d": "70,-157v8,-8,17,-4,15,10v-2,28,-22,36,-32,56v11,19,36,30,31,63v-3,6,-14,3,-16,-4v-13,-24,-60,-44,-35,-77xm126,-157v7,-8,16,-3,14,10v-1,28,-22,36,-32,56v11,19,36,30,31,63v-4,6,-13,2,-17,-4v-13,-22,-59,-48,-34,-77", "w": 168 }, "\u00ac": { "d": "159,-73v2,12,-20,11,-26,6v-7,-13,-1,-40,-3,-59r-108,0v-12,2,-12,-19,-7,-26v37,-9,91,0,134,-3v8,0,10,6,10,14r0,68" }, "\u00ae": { "d": "277,-123v0,76,-52,126,-130,128v-79,-4,-123,-51,-129,-128v3,-77,53,-124,129,-129v79,6,130,51,130,129xm49,-123v4,60,38,99,98,102v60,-4,99,-42,99,-102v0,-60,-38,-99,-99,-102v-61,2,-94,43,-98,102xm205,-72v11,10,2,14,-11,14v-29,-1,-28,-34,-44,-49r-28,0v-4,20,13,56,-20,49v-4,-2,-6,-2,-6,-8r0,-115v0,-18,35,-5,53,-9v52,-9,67,60,28,77xm172,-150v0,-22,-28,-18,-50,-18r0,38v23,0,51,3,50,-20", "w": 294 }, "\u00af": { "d": "50,-192v-1,-34,48,-14,79,-19v4,10,2,28,-11,27r-60,0v-7,0,-7,-1,-8,-8", "w": 180 }, "\u02c9": { "d": "50,-192v-1,-34,48,-14,79,-19v4,10,2,28,-11,27r-60,0v-7,0,-7,-1,-8,-8", "w": 180 }, "\u00b0": { "d": "135,-195v-3,29,-19,49,-49,50v-31,-1,-47,-20,-50,-50v1,-30,20,-51,50,-51v30,1,48,23,49,51xm61,-195v0,15,10,27,25,27v33,0,29,-55,0,-55v-16,0,-25,12,-25,28" }, "\u00b1": { "d": "159,-15v-1,11,-1,14,-10,15r-127,0v-12,2,-12,-19,-7,-26v39,-6,91,0,134,-2v9,0,10,4,10,13xm94,-46v-11,0,-24,2,-23,-10r0,-52v-24,-2,-72,11,-56,-26v14,-5,38,-1,56,-2v1,-20,-2,-45,2,-61v7,-3,29,-7,27,7r0,54v22,4,66,-14,58,22v-8,13,-40,3,-58,6v-3,20,7,52,-6,62" }, "\u00b2": { "d": "69,-195v13,-38,-31,-29,-43,-15v-6,-1,-13,-8,-13,-13v4,-15,21,-23,41,-23v59,-3,47,74,14,94r-19,19r42,0v8,-1,9,6,8,14v-9,20,-53,4,-77,9v-24,-7,3,-32,11,-40v19,-18,28,-27,36,-45", "w": 115 }, "\u00b3": { "d": "11,-226v34,-54,119,10,66,41v12,5,18,16,19,31v-2,36,-30,50,-65,51v-21,5,-25,-24,-6,-23v42,11,65,-51,14,-47v-11,1,-7,-16,-2,-22v16,0,30,-1,31,-16v-2,-23,-36,-10,-45,-2v-5,0,-12,-10,-12,-13", "w": 115 }, "\u00b4": { "d": "116,-225v-17,16,-29,57,-60,43v5,-18,19,-31,26,-47v5,-11,31,-13,36,-3v0,2,-1,4,-2,7", "w": 180 }, "\u00b5": { "d": "51,59v1,14,-19,10,-29,8v-4,-68,-3,-155,0,-223v6,-2,31,-7,29,7v5,48,-20,127,35,125v58,-1,32,-81,41,-132v7,-3,31,-6,29,7v-2,48,5,105,-3,148v-11,6,-33,3,-26,-20v-9,27,-63,34,-76,7r0,73", "w": 176 }, "\u00b6": { "d": "174,59v-9,1,-25,3,-23,-9r0,-270r-40,0r0,270v0,9,-6,9,-16,10v-9,0,-13,-2,-13,-10r0,-126v-45,-6,-70,-34,-71,-84v-5,-85,84,-98,167,-84v7,92,-1,198,2,294v0,6,-1,8,-6,9", "w": 207 }, "\u00b7": { "d": "55,-115v-1,13,-9,20,-21,21v-26,-1,-27,-44,0,-43v13,1,21,10,21,22", "w": 69 }, "\u00b8": { "d": "85,70v-9,2,-25,3,-18,-13v7,-20,5,-58,40,-43v-1,20,-13,40,-22,56", "w": 180 }, "\u00b9": { "d": "79,-116v0,6,-4,6,-12,6v-8,0,-12,1,-12,-6r0,-92v-11,9,-29,24,-34,1v14,-16,30,-30,51,-39v4,0,7,1,7,6r0,124", "w": 115 }, "\u00ba": { "d": "103,-112v3,9,-1,25,-12,23r-69,-1v-4,-7,-1,-23,11,-23xm111,-178v0,31,-19,50,-47,50v-30,0,-47,-20,-48,-50v1,-29,17,-48,48,-49v27,1,48,20,47,49xm40,-178v0,17,8,29,24,29v16,0,23,-14,24,-29v-1,-16,-10,-28,-24,-29v-17,1,-24,13,-24,29", "w": 127 }, "\u00bb": { "d": "60,-91v-10,-19,-43,-41,-26,-70v25,14,37,43,55,64v0,32,-34,48,-49,71v-9,4,-12,-3,-11,-12v2,-28,21,-34,31,-53xm115,-91v-10,-19,-43,-41,-26,-70v3,0,7,1,9,4v15,23,36,39,47,66v-10,28,-34,44,-50,65v-13,6,-12,-10,-10,-21v6,-18,21,-29,30,-44", "w": 168 }, "\u00bc": { "d": "173,-240v4,-11,41,-8,26,7r-119,230v-4,12,-40,9,-26,-7xm258,-50v12,9,2,24,-14,20v0,18,6,46,-21,35v-7,-5,-1,-24,-3,-35r-57,0v-11,2,-9,-11,-5,-16r69,-89v7,-2,17,-2,17,8r0,77r14,0xm185,-50r35,0r0,-47xm66,-116v0,6,-4,6,-12,6v-8,0,-12,1,-12,-6r0,-92v-11,9,-29,24,-34,1v14,-16,30,-30,51,-39v4,0,7,1,7,6r0,124", "w": 280 }, "\u00bd": { "d": "174,-240v4,-11,41,-8,26,7r-119,230v-4,11,-40,9,-26,-7xm67,-116v0,6,-4,6,-12,6v-8,0,-12,1,-12,-6r0,-92v-11,9,-29,24,-34,1v14,-16,30,-30,51,-39v4,0,7,1,7,6r0,124xm227,-85v13,-38,-31,-29,-43,-15v-6,-1,-13,-8,-13,-13v4,-15,21,-23,41,-23v59,-3,47,74,14,94r-19,19r42,0v8,-1,9,6,8,14v-9,20,-53,4,-77,9v-24,-7,3,-32,11,-40v19,-18,28,-27,36,-45", "w": 280 }, "\u00be": { "d": "184,-240v4,-11,41,-8,26,7r-119,230v-5,12,-40,9,-26,-7xm273,-49v4,11,-2,22,-18,19v0,0,6,46,-22,35v-5,-7,-1,-24,-2,-35r-58,0v-9,2,-8,-12,-4,-16r69,-89v7,-2,17,-2,17,8r0,77v6,0,13,-1,18,1xm195,-50r36,0r0,-47xm7,-226v34,-54,119,10,66,41v12,5,18,16,19,31v-2,36,-30,50,-65,51v-21,5,-25,-24,-6,-23v42,11,65,-51,14,-47v-11,1,-7,-16,-2,-22v16,0,30,-1,31,-16v-2,-23,-36,-10,-45,-2v-5,0,-12,-10,-12,-13", "w": 280 }, "\u00bf": { "d": "40,-79v-17,51,43,66,76,47v7,-1,12,14,11,19v-6,16,-29,14,-49,16v-42,-1,-70,-22,-71,-63v1,-42,22,-61,55,-71v-1,-22,-5,-57,29,-42v1,18,13,64,-13,65v-19,5,-32,14,-38,29xm78,-243v25,0,27,43,0,43v-11,0,-22,-10,-21,-21v0,-13,10,-22,21,-22", "w": 128 }, "\u00c0": { "d": "82,-237v2,-10,34,-9,36,0r80,232v-2,10,-34,10,-34,-4r-19,-58r-92,0r-22,65v-7,5,-38,7,-27,-10xm62,-93r74,0r-37,-111xm115,-270v8,11,-2,15,-16,13v-16,-13,-33,-34,-43,-54v4,-10,33,-8,36,3", "w": 199 }, "\u00c1": { "d": "82,-237v2,-10,34,-9,36,0r80,232v-2,10,-34,10,-34,-4r-19,-58r-92,0r-22,65v-7,5,-38,7,-27,-10xm62,-93r74,0r-37,-111xm141,-304v-17,16,-29,57,-60,43v5,-18,19,-31,26,-47v5,-11,31,-13,36,-3v0,2,-1,4,-2,7", "w": 199 }, "\u00c2": { "d": "101,-290v-16,12,-22,38,-52,32v-6,-4,-3,-10,3,-15v17,-16,38,-62,66,-35v14,13,30,28,38,46v-25,17,-43,-17,-55,-28xm82,-237v2,-10,34,-9,36,0r80,232v-2,10,-34,10,-34,-4r-19,-58r-92,0r-22,65v-7,5,-38,7,-27,-10xm62,-93r74,0r-37,-111", "w": 199 }, "\u00c3": { "d": "75,-272v-6,0,-15,24,-32,13v-1,-22,11,-40,33,-40v16,-1,30,15,41,15v11,-3,15,-27,35,-14v-1,23,-13,39,-35,41v-17,1,-31,-15,-42,-15xm82,-237v2,-10,34,-9,36,0r80,232v-2,10,-34,10,-34,-4r-19,-58r-92,0r-22,65v-7,5,-38,7,-27,-10xm62,-93r74,0r-37,-111", "w": 199 }, "\u00c4": { "d": "82,-237v2,-10,34,-9,36,0r80,232v-2,10,-34,10,-34,-4r-19,-58r-92,0r-22,65v-7,5,-38,7,-27,-10xm62,-93r74,0r-37,-111xm93,-276v1,11,-7,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19xm142,-276v0,11,-8,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19", "w": 199 }, "\u00c5": { "d": "130,-290v0,19,-15,33,-33,33v-18,-1,-32,-15,-32,-33v1,-20,14,-33,32,-33v20,0,32,14,33,33xm97,-307v-20,0,-20,34,0,33v22,0,21,-33,0,-33xm82,-237v2,-10,34,-9,36,0r80,232v-2,10,-34,10,-34,-4r-19,-58r-92,0r-22,65v-7,5,-38,7,-27,-10xm62,-93r74,0r-37,-111", "w": 199 }, "\u00c6": { "d": "306,-21v0,10,-1,23,-13,21v-44,-2,-94,3,-134,-3v-5,-20,-1,-49,-2,-73r-81,0r-46,73v-5,8,-40,6,-28,-9r142,-227v46,-6,103,0,153,-2v6,0,6,2,7,7v-1,10,0,21,-13,21r-102,0r0,68r97,1v4,9,3,30,-11,27r-86,0r0,89r109,0v7,0,8,1,8,7xm92,-102r65,0r0,-107", "w": 309 }, "\u00c7": { "d": "192,-17v-11,14,-44,22,-72,22v-72,-3,-102,-52,-105,-125v2,-73,35,-123,106,-126v32,0,54,4,68,20v-3,11,-7,27,-20,22v-10,-8,-27,-13,-48,-12v-52,2,-69,43,-70,96v-7,78,60,116,126,81v7,1,15,18,15,22xm107,70v-9,2,-25,3,-18,-13v7,-20,5,-58,40,-43v-1,20,-13,40,-22,56", "w": 195 }, "\u00c8": { "d": "175,-27v2,10,2,27,-12,27r-120,0v-11,0,-15,0,-16,-10r0,-221v1,-9,3,-10,16,-10r130,1v2,11,2,27,-12,27r-101,0r0,68r97,1v2,11,2,27,-12,27r-85,0r0,89xm119,-270v8,11,-2,15,-16,13v-16,-13,-33,-34,-43,-54v4,-10,33,-8,36,3", "w": 180 }, "\u00c9": { "d": "175,-27v2,10,2,27,-12,27r-120,0v-11,0,-15,0,-16,-10r0,-221v1,-9,3,-10,16,-10r130,1v2,11,2,27,-12,27r-101,0r0,68r97,1v2,11,2,27,-12,27r-85,0r0,89xm145,-304v-17,16,-29,57,-60,43v5,-18,19,-31,26,-47v5,-11,31,-13,36,-3v0,2,-1,4,-2,7", "w": 180 }, "\u00ca": { "d": "101,-290v-16,12,-22,38,-52,32v-6,-4,-3,-10,3,-15v17,-16,38,-62,66,-35v14,13,30,28,38,46v-25,17,-43,-17,-55,-28xm175,-27v2,10,2,27,-12,27r-120,0v-11,0,-15,0,-16,-10r0,-221v1,-9,3,-10,16,-10r130,1v2,11,2,27,-12,27r-101,0r0,68r97,1v2,11,2,27,-12,27r-85,0r0,89", "w": 180 }, "\u00cb": { "d": "175,-27v2,10,2,27,-12,27r-120,0v-11,0,-15,0,-16,-10r0,-221v1,-9,3,-10,16,-10r130,1v2,11,2,27,-12,27r-101,0r0,68r97,1v2,11,2,27,-12,27r-85,0r0,89xm95,-276v1,11,-7,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19xm144,-276v0,11,-8,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19", "w": 180 }, "\u00cc": { "d": "27,-232v-3,-15,21,-11,31,-8r0,239v-8,2,-35,7,-31,-8r0,-223xm58,-270v8,11,-2,15,-16,13v-16,-13,-33,-34,-43,-54v4,-10,33,-8,36,3", "w": 86 }, "\u00cd": { "d": "27,-232v-3,-15,21,-11,31,-8r0,239v-8,2,-35,7,-31,-8r0,-223xm91,-304v-17,16,-29,57,-60,43v5,-18,19,-31,26,-47v5,-11,31,-13,36,-3v0,2,-1,4,-2,7", "w": 86 }, "\u00ce": { "d": "43,-290v-16,12,-21,38,-52,32v-6,-4,-3,-10,3,-15v17,-16,38,-60,67,-35v10,16,37,30,35,50v-31,6,-37,-20,-53,-32xm27,-232v-3,-15,21,-11,31,-8r0,239v-8,2,-35,7,-31,-8r0,-223", "w": 86 }, "\u00cf": { "d": "27,-232v-3,-15,21,-11,31,-8r0,239v-8,2,-35,7,-31,-8r0,-223xm37,-276v1,11,-7,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19xm86,-276v0,11,-8,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19", "w": 86 }, "\u00d0": { "d": "43,0v-11,0,-15,0,-16,-10r0,-101v-9,-2,-27,5,-25,-7v-1,-18,7,-23,25,-21r0,-92v1,-9,3,-10,16,-10r66,0v72,2,105,46,107,120v-2,73,-35,120,-108,121r-65,0xm60,-139v21,2,62,-10,47,24v-9,8,-32,2,-47,4r0,83r49,0v53,-1,71,-40,72,-93v2,-74,-41,-101,-121,-92r0,74", "w": 231 }, "\u00d1": { "d": "127,-284v11,-3,15,-27,35,-14v-2,22,-13,40,-36,41v-15,1,-31,-15,-41,-15v-7,1,-15,24,-32,13v-1,-21,10,-40,32,-40v17,-1,31,15,42,15xm164,-239v7,-6,31,-8,31,7r-1,230v-5,4,-26,6,-29,-2r-107,-169r-2,172v-7,2,-32,7,-29,-8r0,-206v-8,-11,-20,-31,9,-28v10,1,15,2,19,9r108,173", "w": 221 }, "\u00d2": { "d": "224,-120v-2,74,-32,122,-104,125v-72,-3,-103,-51,-105,-125v2,-74,33,-123,105,-126v72,2,102,53,104,126xm51,-120v0,55,17,94,69,96v52,-2,68,-43,69,-96v-1,-53,-17,-95,-69,-97v-53,2,-69,42,-69,97xm137,-270v8,11,-2,15,-16,13v-16,-13,-33,-34,-43,-54v4,-10,33,-8,36,3", "w": 239 }, "\u00d3": { "d": "224,-120v-2,74,-32,122,-104,125v-72,-3,-103,-51,-105,-125v2,-74,33,-123,105,-126v72,2,102,53,104,126xm51,-120v0,55,17,94,69,96v52,-2,68,-43,69,-96v-1,-53,-17,-95,-69,-97v-53,2,-69,42,-69,97xm156,-304v-17,16,-29,57,-60,43v5,-18,19,-31,26,-47v5,-11,31,-13,36,-3v0,2,-1,4,-2,7", "w": 239 }, "\u00d4": { "d": "122,-290v-16,12,-21,38,-52,32v-6,-4,-3,-10,3,-15v17,-16,38,-60,67,-35v10,16,37,30,35,50v-31,6,-37,-20,-53,-32xm224,-120v-2,74,-32,122,-104,125v-72,-3,-103,-51,-105,-125v2,-74,33,-123,105,-126v72,2,102,53,104,126xm51,-120v0,55,17,94,69,96v52,-2,68,-43,69,-96v-1,-53,-17,-95,-69,-97v-53,2,-69,42,-69,97", "w": 239 }, "\u00d5": { "d": "138,-284v11,-3,15,-27,35,-14v-2,22,-13,40,-36,41v-15,1,-31,-15,-41,-15v-7,1,-15,24,-32,13v-1,-22,10,-40,33,-40v16,-1,31,14,41,15xm224,-120v-2,74,-32,122,-104,125v-72,-3,-103,-51,-105,-125v2,-74,33,-123,105,-126v72,2,102,53,104,126xm51,-120v0,55,17,94,69,96v52,-2,68,-43,69,-96v-1,-53,-17,-95,-69,-97v-53,2,-69,42,-69,97", "w": 239 }, "\u00d6": { "d": "224,-120v-2,74,-32,122,-104,125v-72,-3,-103,-51,-105,-125v2,-74,33,-123,105,-126v72,2,102,53,104,126xm51,-120v0,55,17,94,69,96v52,-2,68,-43,69,-96v-1,-53,-17,-95,-69,-97v-53,2,-69,42,-69,97xm113,-276v1,11,-7,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19xm162,-276v0,11,-8,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19", "w": 239 }, "\u00d7": { "d": "121,-166v8,-11,21,6,23,13v-9,16,-26,28,-38,42v11,15,35,25,37,45v-6,5,-14,19,-23,9r-34,-34v-17,13,-43,59,-59,21v9,-16,27,-27,39,-41v-14,-17,-59,-43,-22,-59v17,9,28,27,42,39" }, "\u00d8": { "d": "120,5v-28,0,-49,-9,-66,-23v-6,13,-27,33,-44,18v6,-14,19,-24,27,-37v-45,-73,-21,-216,83,-209v28,1,48,8,65,23v7,-12,27,-34,44,-18v-6,14,-19,24,-27,37v13,21,22,48,22,84v-2,74,-32,122,-104,125xm120,-24v71,2,80,-94,59,-152r-105,133v11,13,27,19,46,19xm120,-217v-71,-2,-79,92,-60,151r106,-132v-11,-11,-24,-20,-46,-19", "w": 239 }, "\u00d9": { "d": "204,-76v0,57,-32,80,-89,81v-57,0,-89,-26,-90,-81r2,-164v8,-3,31,-8,31,8r0,160v1,33,22,48,57,49v34,-1,55,-17,57,-49r1,-167v5,-5,36,-8,31,7r0,156xm133,-270v8,11,-2,15,-16,13v-16,-13,-33,-34,-43,-54v4,-10,33,-8,36,3", "w": 229 }, "\u00da": { "d": "204,-76v0,57,-32,80,-89,81v-57,0,-89,-26,-90,-81r2,-164v8,-3,31,-8,31,8r0,160v1,33,22,48,57,49v34,-1,55,-17,57,-49r1,-167v5,-5,36,-8,31,7r0,156xm156,-304v-17,16,-29,57,-60,43v5,-18,19,-31,26,-47v5,-11,31,-13,36,-3v0,2,-1,4,-2,7", "w": 229 }, "\u00db": { "d": "119,-290v-15,12,-22,38,-52,32v-6,-4,-2,-9,3,-15v18,-14,39,-62,66,-35v14,13,30,28,38,46v-25,17,-43,-17,-55,-28xm204,-76v0,57,-32,80,-89,81v-57,0,-89,-26,-90,-81r2,-164v8,-3,31,-8,31,8r0,160v1,33,22,48,57,49v34,-1,55,-17,57,-49r1,-167v5,-5,36,-8,31,7r0,156", "w": 229 }, "\u00dc": { "d": "204,-76v0,57,-32,80,-89,81v-57,0,-89,-26,-90,-81r2,-164v8,-3,31,-8,31,8r0,160v1,33,22,48,57,49v34,-1,55,-17,57,-49r1,-167v5,-5,36,-8,31,7r0,156xm106,-276v1,11,-7,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19xm155,-276v0,11,-8,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19", "w": 229 }, "\u00dd": { "d": "110,-1v-9,3,-34,6,-31,-8r0,-94r-77,-136v8,-6,29,-6,33,3r62,104r67,-109v8,-4,37,-2,24,11r-76,127v-1,33,3,72,-2,102xm141,-304v-17,16,-29,57,-60,43v5,-18,19,-31,26,-47v5,-11,31,-13,36,-3v0,2,-1,4,-2,7", "w": 192 }, "\u00de": { "d": "185,-131v1,64,-59,79,-126,72r-1,58v-8,2,-35,7,-31,-8r0,-223v-3,-15,21,-11,31,-8v2,11,0,29,1,42v67,-3,125,3,126,67xm151,-131v0,-41,-47,-42,-92,-40r0,85v44,5,93,-1,92,-45", "w": 194 }, "\u00df": { "d": "189,-53v5,60,-74,69,-111,41v-7,-7,2,-22,10,-24v19,12,72,25,70,-15v-5,-43,-72,-26,-73,-73v3,-31,29,-39,30,-69v0,-14,-10,-24,-24,-24v-23,0,-31,14,-31,37r0,171v2,15,-13,9,-25,10v-4,-2,-5,-4,-5,-9r0,-175v-1,-39,23,-60,59,-60v64,-5,68,75,30,105v-2,3,-4,7,-4,11v20,29,76,24,74,74", "w": 201 }, "\u00e0": { "d": "122,2v-9,-2,-8,-10,-12,-20v-26,32,-105,31,-101,-26v0,-52,51,-55,100,-57v2,-46,-58,-36,-84,-21v-6,-2,-10,-13,-11,-18v34,-36,136,-26,124,44v1,29,-4,68,5,88v2,6,-15,11,-21,10xm38,-46v0,16,10,24,24,25v30,-1,50,-20,47,-56v-29,5,-70,-2,-71,31xm90,-191v8,11,-2,15,-16,13v-16,-13,-33,-34,-43,-54v4,-10,33,-8,36,3", "w": 158 }, "\u00e1": { "d": "122,2v-9,-2,-8,-10,-12,-20v-26,32,-105,31,-101,-26v0,-52,51,-55,100,-57v2,-46,-58,-36,-84,-21v-6,-2,-10,-13,-11,-18v34,-36,136,-26,124,44v1,29,-4,68,5,88v2,6,-15,11,-21,10xm38,-46v0,16,10,24,24,25v30,-1,50,-20,47,-56v-29,5,-70,-2,-71,31xm108,-225v-17,16,-29,57,-60,43v5,-18,19,-31,26,-47v5,-11,31,-13,36,-3v0,2,-1,4,-2,7", "w": 158 }, "\u00e2": { "d": "126,-194v7,9,8,17,-6,16v-25,-1,-28,-22,-44,-32v-14,11,-19,31,-43,32v-14,1,-15,-8,-6,-16v18,-15,37,-60,67,-35xm122,2v-9,-2,-8,-10,-12,-20v-26,32,-105,31,-101,-26v0,-52,51,-55,100,-57v2,-46,-58,-36,-84,-21v-6,-2,-10,-13,-11,-18v34,-36,136,-26,124,44v1,29,-4,68,5,88v2,6,-15,11,-21,10xm38,-46v0,16,10,24,24,25v30,-1,50,-20,47,-56v-29,5,-70,-2,-71,31", "w": 158 }, "\u00e3": { "d": "51,-193v-5,0,-16,24,-32,13v-1,-21,11,-40,33,-40v16,-1,30,15,41,15v11,-2,17,-28,35,-13v-2,22,-12,39,-35,40v-17,1,-31,-15,-42,-15xm122,2v-9,-2,-8,-10,-12,-20v-26,32,-105,31,-101,-26v0,-52,51,-55,100,-57v2,-46,-58,-36,-84,-21v-6,-2,-10,-13,-11,-18v34,-36,136,-26,124,44v1,29,-4,68,5,88v2,6,-15,11,-21,10xm38,-46v0,16,10,24,24,25v30,-1,50,-20,47,-56v-29,5,-70,-2,-71,31", "w": 158 }, "\u00e4": { "d": "122,2v-9,-2,-8,-10,-12,-20v-26,32,-105,31,-101,-26v0,-52,51,-55,100,-57v2,-46,-58,-36,-84,-21v-6,-2,-10,-13,-11,-18v34,-36,136,-26,124,44v1,29,-4,68,5,88v2,6,-15,11,-21,10xm38,-46v0,16,10,24,24,25v30,-1,50,-20,47,-56v-29,5,-70,-2,-71,31xm71,-197v1,11,-7,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19xm120,-197v0,11,-8,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19", "w": 158 }, "\u00e5": { "d": "105,-211v0,19,-15,33,-33,33v-19,-1,-32,-14,-32,-33v1,-18,14,-33,32,-33v19,1,32,14,33,33xm72,-227v-21,1,-19,32,0,33v21,0,23,-34,0,-33xm122,2v-9,-2,-8,-10,-12,-20v-26,32,-105,31,-101,-26v0,-52,51,-55,100,-57v2,-46,-58,-36,-84,-21v-6,-2,-10,-13,-11,-18v34,-36,136,-26,124,44v1,29,-4,68,5,88v2,6,-15,11,-21,10xm38,-46v0,16,10,24,24,25v30,-1,50,-20,47,-56v-29,5,-70,-2,-71,31", "w": 158 }, "\u00e6": { "d": "14,-140v21,-27,100,-29,113,4v10,-14,29,-25,53,-24v45,0,67,35,67,80v0,9,-6,10,-16,11r-93,0v0,44,55,54,86,33v8,-1,13,15,14,19v-22,32,-99,25,-116,-8v-20,38,-116,44,-113,-19v0,-52,51,-55,100,-57v2,-46,-58,-36,-84,-21v-6,-2,-10,-13,-11,-18xm38,-46v1,16,12,25,28,25v29,-2,46,-22,43,-56v-29,5,-70,-2,-71,31xm215,-94v1,-36,-41,-55,-64,-31v-7,7,-10,18,-12,31r76,0", "w": 258 }, "\u00e7": { "d": "122,-122v-8,-2,-24,-12,-37,-11v-54,1,-55,108,0,108v18,1,23,-8,37,-11v3,-2,14,15,13,19v-7,15,-30,21,-51,21v-48,0,-70,-33,-71,-82v2,-49,25,-80,73,-82v21,0,42,5,48,18v0,2,-7,22,-12,20xm71,70v-9,2,-25,3,-18,-13v7,-20,5,-58,40,-43v-1,20,-13,40,-22,56", "w": 139 }, "\u00e8": { "d": "144,-17v-8,16,-34,19,-56,21v-50,-2,-73,-33,-75,-83v2,-47,23,-80,71,-81v48,0,69,34,69,80v0,10,-6,10,-16,11r-93,0v1,44,55,53,87,33v7,0,12,14,13,19xm121,-94v3,-36,-40,-55,-63,-31v-7,8,-11,18,-13,31r76,0xm104,-191v8,11,-2,15,-16,13v-16,-13,-33,-34,-43,-54v4,-10,33,-8,36,3", "w": 164 }, "\u00e9": { "d": "144,-17v-8,16,-34,19,-56,21v-50,-2,-73,-33,-75,-83v2,-47,23,-80,71,-81v48,0,69,34,69,80v0,10,-6,10,-16,11r-93,0v1,44,55,53,87,33v7,0,12,14,13,19xm121,-94v3,-36,-40,-55,-63,-31v-7,8,-11,18,-13,31r76,0xm127,-225v-17,16,-29,57,-60,43v5,-18,19,-31,26,-47v5,-11,31,-13,36,-3v0,2,-1,4,-2,7", "w": 164 }, "\u00ea": { "d": "136,-194v8,9,9,17,-6,16v-25,0,-28,-22,-43,-32v-15,10,-19,31,-44,32v-14,1,-13,-8,-5,-16v18,-16,36,-60,66,-35xm144,-17v-8,16,-34,19,-56,21v-50,-2,-73,-33,-75,-83v2,-47,23,-80,71,-81v48,0,69,34,69,80v0,10,-6,10,-16,11r-93,0v1,44,55,53,87,33v7,0,12,14,13,19xm121,-94v3,-36,-40,-55,-63,-31v-7,8,-11,18,-13,31r76,0", "w": 164 }, "\u00eb": { "d": "144,-17v-8,16,-34,19,-56,21v-50,-2,-73,-33,-75,-83v2,-47,23,-80,71,-81v48,0,69,34,69,80v0,10,-6,10,-16,11r-93,0v1,44,55,53,87,33v7,0,12,14,13,19xm121,-94v3,-36,-40,-55,-63,-31v-7,8,-11,18,-13,31r76,0xm82,-197v1,11,-7,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19xm131,-197v0,11,-8,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19", "w": 164 }, "\u00ec": { "d": "44,-159v7,0,7,1,8,8r-2,150v-7,2,-29,7,-29,-7r1,-142v0,-7,14,-8,22,-9xm50,-191v8,11,-2,15,-16,13v-16,-13,-33,-34,-43,-54v4,-10,33,-8,36,3", "w": 73 }, "\u00ed": { "d": "44,-159v7,0,7,1,8,8r-2,150v-7,2,-29,7,-29,-7r1,-142v0,-7,14,-8,22,-9xm82,-225v-17,16,-29,57,-60,43v5,-18,19,-31,26,-47v5,-11,31,-13,36,-3v0,2,-1,4,-2,7", "w": 73 }, "\u00ee": { "d": "89,-194v8,9,9,17,-6,16v-25,0,-28,-22,-43,-32v-15,10,-19,31,-44,32v-15,1,-13,-8,-5,-16v18,-16,36,-60,66,-35xm44,-159v7,0,7,1,8,8r-2,150v-7,2,-29,7,-29,-7r1,-142v0,-7,14,-8,22,-9", "w": 73 }, "\u00ef": { "d": "44,-159v7,0,7,1,8,8r-2,150v-7,2,-29,7,-29,-7r1,-142v0,-7,14,-8,22,-9xm32,-197v1,11,-7,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19xm81,-197v0,11,-8,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19", "w": 73 }, "\u00f0": { "d": "70,-225v8,-34,39,-6,52,10v13,-7,38,-20,39,5v-2,11,-18,9,-25,15v38,57,46,201,-48,199v-48,-3,-73,-34,-75,-82v-6,-64,62,-105,110,-66v-2,-16,-9,-30,-16,-40v-15,5,-41,24,-42,-4v2,-11,19,-9,27,-15v-6,-10,-17,-13,-22,-22xm44,-78v1,31,13,54,44,55v30,0,44,-26,44,-55v0,-32,-14,-56,-44,-56v-31,1,-43,25,-44,56", "w": 176 }, "\u00f1": { "d": "67,-193v-5,0,-16,24,-32,13v-1,-21,11,-40,33,-40v16,-1,30,15,41,15v11,-2,17,-28,35,-13v-2,22,-12,39,-35,40v-17,1,-31,-15,-42,-15xm92,-134v-57,1,-34,81,-42,133v-7,2,-29,7,-29,-7r1,-142v0,-7,14,-8,22,-9v12,-2,7,13,8,22v26,-41,114,-24,105,36v-1,33,3,71,-2,100v-7,2,-31,7,-29,-7v-5,-48,20,-127,-34,-126", "w": 176 }, "\u00f2": { "d": "163,-78v-1,50,-27,79,-75,82v-48,-3,-73,-34,-75,-82v2,-49,26,-81,75,-82v47,0,75,35,75,82xm44,-78v1,31,13,54,44,55v30,0,44,-26,44,-55v0,-32,-14,-56,-44,-56v-31,1,-43,25,-44,56xm108,-191v8,11,-2,15,-16,13v-16,-13,-33,-34,-43,-54v4,-10,33,-8,36,3", "w": 176 }, "\u00f3": { "d": "163,-78v-1,50,-27,79,-75,82v-48,-3,-73,-34,-75,-82v2,-49,26,-81,75,-82v47,0,75,35,75,82xm44,-78v1,31,13,54,44,55v30,0,44,-26,44,-55v0,-32,-14,-56,-44,-56v-31,1,-43,25,-44,56xm127,-225v-17,16,-29,57,-60,43v5,-18,19,-31,26,-47v5,-11,31,-13,36,-3v0,2,-1,4,-2,7", "w": 176 }, "\u00f4": { "d": "139,-194v9,7,9,17,-6,16v-24,0,-28,-22,-43,-32v-13,12,-31,44,-55,27v10,-20,31,-36,45,-53v32,-7,41,28,59,42xm163,-78v-1,50,-27,79,-75,82v-48,-3,-73,-34,-75,-82v2,-49,26,-81,75,-82v47,0,75,35,75,82xm44,-78v1,31,13,54,44,55v30,0,44,-26,44,-55v0,-32,-14,-56,-44,-56v-31,1,-43,25,-44,56", "w": 176 }, "\u00f5": { "d": "64,-193v-6,0,-15,24,-32,13v-1,-21,10,-40,33,-40v22,-1,43,30,53,3v1,-7,21,-8,23,-1v-3,21,-12,40,-36,40v-15,1,-31,-15,-41,-15xm163,-78v-1,50,-27,79,-75,82v-48,-3,-73,-34,-75,-82v2,-49,26,-81,75,-82v47,0,75,35,75,82xm44,-78v1,31,13,54,44,55v30,0,44,-26,44,-55v0,-32,-14,-56,-44,-56v-31,1,-43,25,-44,56", "w": 176 }, "\u00f6": { "d": "163,-78v-1,50,-27,79,-75,82v-48,-3,-73,-34,-75,-82v2,-49,26,-81,75,-82v47,0,75,35,75,82xm44,-78v1,31,13,54,44,55v30,0,44,-26,44,-55v0,-32,-14,-56,-44,-56v-31,1,-43,25,-44,56xm84,-197v1,11,-7,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19xm133,-197v0,11,-8,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19", "w": 176 }, "\u00f7": { "d": "86,-75v25,0,27,44,0,43v-13,0,-20,-9,-21,-21v0,-13,10,-21,21,-22xm156,-123v5,7,5,26,-7,26r-133,-1v-6,-6,-7,-30,6,-28v44,2,96,-5,134,3xm107,-169v0,11,-10,21,-21,21v-12,0,-20,-9,-21,-21v0,-12,9,-21,21,-21v11,1,21,9,21,21" }, "\u00f8": { "d": "147,-133v35,49,11,142,-59,137v-18,-1,-34,-6,-45,-15v-2,8,-25,17,-30,6v2,-8,11,-15,15,-22v-32,-47,-9,-139,60,-133v17,0,31,4,43,13v3,-10,23,-19,32,-9v-1,9,-11,16,-16,23xm62,-33v34,29,83,-10,69,-61v-1,-6,-3,-10,-5,-15xm113,-126v-43,-28,-85,24,-64,75", "w": 176 }, "\u00f9": { "d": "127,-23v-24,44,-115,30,-107,-33v1,-33,-3,-71,2,-100v6,-2,31,-7,29,7v5,48,-19,126,33,126v58,-1,35,-81,43,-133v7,-3,31,-6,29,7v-2,48,5,105,-3,148v-6,3,-29,7,-26,-8r0,-14xm108,-191v8,11,-2,15,-16,13v-16,-13,-33,-34,-43,-54v4,-10,33,-8,36,3", "w": 176 }, "\u00fa": { "d": "127,-23v-24,44,-115,30,-107,-33v1,-33,-3,-71,2,-100v6,-2,31,-7,29,7v5,48,-19,126,33,126v58,-1,35,-81,43,-133v7,-3,31,-6,29,7v-2,48,5,105,-3,148v-6,3,-29,7,-26,-8r0,-14xm130,-225v-17,16,-29,57,-60,43v5,-18,19,-31,26,-47v5,-11,31,-13,36,-3v0,2,-1,4,-2,7", "w": 176 }, "\u00fb": { "d": "139,-194v9,7,9,17,-6,16v-24,0,-28,-22,-43,-32v-13,12,-31,44,-55,27v10,-20,31,-36,45,-53v32,-7,41,28,59,42xm127,-23v-24,44,-115,30,-107,-33v1,-33,-3,-71,2,-100v6,-2,31,-7,29,7v5,48,-19,126,33,126v58,-1,35,-81,43,-133v7,-3,31,-6,29,7v-2,48,5,105,-3,148v-6,3,-29,7,-26,-8r0,-14", "w": 176 }, "\u00fc": { "d": "127,-23v-24,44,-115,30,-107,-33v1,-33,-3,-71,2,-100v6,-2,31,-7,29,7v5,48,-19,126,33,126v58,-1,35,-81,43,-133v7,-3,31,-6,29,7v-2,48,5,105,-3,148v-6,3,-29,7,-26,-8r0,-14xm82,-197v1,11,-7,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19xm131,-197v0,11,-8,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19", "w": 176 }, "\u00fd": { "d": "5,-144v-8,-10,2,-15,14,-14v9,0,13,1,16,6r48,102v17,-35,29,-76,50,-107v12,-3,35,-2,23,13r-91,207v-4,13,-43,11,-29,-6r31,-72xm130,-225v-17,16,-29,57,-60,43v5,-18,19,-31,26,-47v5,-11,31,-13,36,-3v0,2,-1,4,-2,7", "w": 160 }, "\u00fe": { "d": "52,59v1,14,-19,10,-29,8v-7,-92,0,-199,-2,-295v-2,-15,15,-15,29,-14v5,29,0,70,2,103v10,-13,26,-21,48,-21v45,0,67,35,67,79v9,70,-72,110,-115,65r0,75xm50,-80v0,31,12,56,42,57v31,-2,42,-26,43,-57v-1,-31,-13,-52,-43,-53v-30,0,-40,24,-42,53", "w": 180 }, "\u00ff": { "d": "5,-144v-8,-10,2,-15,14,-14v9,0,13,1,16,6r48,102v17,-35,29,-76,50,-107v12,-3,35,-2,23,13r-91,207v-4,13,-43,11,-29,-6r31,-72xm71,-197v1,11,-7,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19xm120,-197v0,11,-8,19,-18,19v-11,-1,-19,-8,-19,-19v0,-10,8,-19,19,-19v10,0,18,9,18,19", "w": 160}} });
/*
Filename : /TUI.Web.Includes/Js/booking.js
Description :
Contains common logic to the booking procedure.
*/
var CallBacks = new Array();
var temaStr = "";
if ($("body").hasClass("is-tema") || $("body").hasClass("brand-id-18") || $("body").hasClass("brand-id-19") || $("body").hasClass("brand-id-20") || $("body").hasClass("brand-id-23")) {
    temaStr = "-tema";
}
$(document).ready(
    function() {
        registerHelpTextPopupHandlers(document);

        $("div#draggable div.ui-handle a").click(function() { $("div#draggable").hide().removeClass("popup-666").removeAttr("style").find("div.ui-content:first").removeClass("no-padding").removeAttr("style"); if ($.browser.msie && $.browser.version < 7) { $("select").show(); } });
        $("a.print-icon, a.print").click(function(event) { killDefault(event); window.print(); });

        TUIWebSession = function() {
            this.ID = ($("input#TUIWebSessionID").length > 0) ? $("input#TUIWebSessionID").val() : "";
            this.UrlPart = "?" + oBaseAppSettings.SessionParameterName + "=" + this.ID + oBaseAppSettings.DEBUG;
            this.Reload = function() { this.ID = ($("input#TUIWebSessionID").length > 0) ? $("input#TUIWebSessionID").val() : ""; this.UrlPart = "?" + oBaseAppSettings.SessionParameterName + "=" + this.ID };
        }
        oTUIWebSession = new TUIWebSession();

        Logger = function() {
            this.Count = 1;
            this.Init = function() {
                $("form:first").append("<div id=\"logger\"></div>");
                $("div#logger").css({ position: "fixed", left: "50px", top: "50px", width: "200px", height: "400px", background: "#FFF", border: "1px solid #000", overflow: "scroll", fontSize: "10px" });
            }
            this.Write = function(logText) {
                if ($("div#logger").length == 0) { this.Init(); }
                $("div#logger").html(this.Count.toString() + ". " + logText + "<br/>" + $("div#logger").html());
                this.Count++;
            };
        }
        oLogger = new Logger();

        //List boxes
        Array.prototype.GetFunction = function(s) { for (i = 0; i < this.length; i++) { if (this[i].indexOf(s + "|") == 0) { return (this[i].replace(s + "|", "")); } } return (""); }
        Status = "ready"; ActiveListBox = null;
        jQuery.fn.extend({
            ListContainer: function() { return $(this).parents("div.list-box:first"); },
            ValueHolder: function() { return $(this).ListContainer().children("input:first"); },
            TextHolder: function() { return $(this).ListContainer().children("span"); },
            ListHolder: function() { return $(this).children("dl:first"); },
            ListItems: function(s) { return $(this).ListHolder().children("dd" + ((s != null) ? "." + s : "")); },
            ValueItems: function(s) { return $(this).ListHolder().children("dt" + ((s != null) ? "." + s : "")); },
            Open: function() { Status = "processing"; if (ActiveListBox != null) { ActiveListBox.Close("processing"); } $(this).addClass("active-box"); ActiveListBox = $(this); $(this).ListHolder().show(); setTimeout("Status=\"open\"", 300); },
            Close: function(s) { $(this).removeClass("active-box"); $(this).ListHolder().hide(); ActiveListBox = null; if (s != null) { Status = s; } else { Status = "ready"; } },
            ItemText: function() { return ($(this).find(".text").length > 0) ? $(this).find(".text").text() : $(this).text(); },
            SetSelected: function() { $(this).TextHolder().text($(this).ItemText()); $(this).ValueHolder().val(((($(this).prev("dt").attr("class") != null) && ($(this).prev("dt").attr("class") != "")) ? $(this).prev("dt").attr("class") + "|" : "") + $(this).prev("dt").text()); $(this).parent("dl").children("dd.selected").removeClass("selected"); $(this).addClass("selected"); },
            Call: function() { if (typeof CallBacks == "undefined") { return; } s = CallBacks.GetFunction($(this).ListContainer().attr("id")); if (s == "") { return; } eval(s + "(\"" + $(this).prev("dt").text() + "\")"); },
            SetHeight: function() { if ($(this).length > 12) { $(this).parent("dl").addClass("overflow"); if ($.browser.opera) { $(this).parent("dl").css("overflow", "scroll"); $(this).css("width", ($(this).parent("dl").width() - 24) + "px"); } } else { $(this).parent("dl").removeClass("overflow"); if ($.browser.opera) { $(this).parent("dl").css("overflow", "visible"); $(this).css("width", "auto"); } } },
            ClickItem: function() { if (($(this).hasClass("disabled")) || ($(this).hasClass("non-clickable"))) { Status = "processing"; setTimeout("Status=\"open\"", 100); return; } $(this).SetSelected(); $(this).Call(); },
            InitEvents: function() { $(this).mousedown(function() { return false; }); $(this).hover(function() { $(this).addClass("hover"); }, function() { $(this).removeClass("hover"); }); $(this).click($(this).ClickItem); $(this).SetHeight(); },
            Scroll: function() { if (($(this).ListItems("selected").length > 0) && ($(this).ListItems().index($(this).ListItems("selected:first").get(0)) > 11)) { $(this).ListHolder().scrollTo($(this).ListItems("selected")); } else { $(this).ListHolder().scrollTo(0); } },
            MoveLabelItem: function() { $(this).TextHolder().text($(this).text()); $(this).prev("dt").remove(); $(this).remove(); },
            SelectFirstItem: function() { $(this).children("dd:first").SetSelected(); },
            SetLoadStatus: function() { $(this).addClass("list-box-loading"); if ($(this).children("span").html() == "") { $(this).children("span").html("&#160;"); } return $(this); },
            RemoveLoadStatus: function() { $(this).removeClass("list-box-loading"); }
        });
        InitListBoxes = function(o) {
            o.find("div.list-box").each(function(i) {
                $(this).children("span").mousedown(function() { return false; }).click(function() { $(this).parent("div").trigger("click"); return false; });
                $(this).hover(function() { $(this).addClass("list-box-hover"); }, function() { $(this).removeClass("list-box-hover"); });
                $(this).click(function() { if (Status == "processing") { return; } else if (($(this).ListHolder().is(":visible")) && (Status == "open")) { $(this).Close(); return; } $(this).Open(); $(this).Scroll(); });
                //$(this).focus(function(){if(Status=="processing"){return;}else if(($(this).ListHolder().is(":visible"))&&(Status=="open")){$(this).Close();return;}$(this).Open();$(this).Scroll();});
                $(this).ListItems().InitEvents();
                if ($(this).ListItems("label").length > 0) { $(this).ListItems("label").MoveLabelItem(); if ($(this).ListItems("selected").length > 0) { $(this).ListItems("selected").SetSelected(); } } else if ($(this).ListItems("selected").length > 0) { $(this).ListItems("selected").SetSelected(); } else { $(this).ListItems().eq(0).SetSelected(); }
            });
        }
        $(document).click(function() { if (Status == "open" && ActiveListBox != null) { ActiveListBox.Close(); } });
        var nCurrPos = 0;
        $(document).keydown(function(event) {
            if ((Status == "open") && (typeof (ActiveListBox) != "undefined")) {
                arrList = ActiveListBox.find("dd");
                oSelected = arrList.filter(".selected:first");
                if (event.keyCode == 9 || event.keyCode == 13) { oSelected.trigger("click"); ActiveListBox.Close(); return (true); }
                else if (event.keyCode == 40) {
                    o = (oSelected.length > 0) ? oSelected : null;
                    if (o != null) { o.removeClass("selected"); o.nextAll("dd:first").addClass("selected"); }
                    else { arrList.eq(0).addClass("selected"); }
                    ActiveListBox.Scroll();
                    return (false);
                } else if (event.keyCode == 38) {
                    o = (oSelected.length > 0) ? oSelected : null;
                    if (o != null) { o.removeClass("selected"); o.prevAll("dd:first").addClass("selected"); }
                    else { arrList.filter(":last").addClass("selected"); }
                    ActiveListBox.Scroll();
                    return (false);
                } else {
                    s = "";
                    if (event.keyCode >= 65 && event.keyCode <= 90) { n = (event.keyCode - 65); s = oTUIStrings.sLetters.substring(n, (n + 1)); }
                    else if (event.keyCode >= 48 && event.keyCode <= 57) { s = (event.keyCode - 48).toString(); }
                    else if (event.keyCode >= 96 && event.keyCode <= 105) { s = (event.keyCode - 96).toString(); }
                    else {
                        switch (event.keyCode) {
                            case 192: s = oTUIStrings.arrCharacters[2]; break;
                            case 221: s = oTUIStrings.arrCharacters[0]; break;
                            case 222: s = oTUIStrings.arrCharacters[1]; break;
                        }
                    } if (s == "") { return (false); }
                    sFirstLetter = (oSelected.length > 0) ? oSelected.text().substring(0, 1) : "";
                    nCurrPos = (sFirstLetter.toLowerCase() == s.toLowerCase()) ? (nCurrPos + 1) : 0;
                    arrList.removeClass("selected");
                    o = arrList.filter(function(nPos) { return ($(this).text().substring(0, 1).toLowerCase() == s && nPos >= nCurrPos); }).eq(0);
                    nCurrPos = arrList.index(o);
                    o.addClass("selected");
                    ActiveListBox.Scroll();
                    return (false);
                }
            }
        });

        var $pageCombinations = $('div.page-combinations');
        
        $pageCombinations.find("div.hotel-description a.about, #combination-periods a.about").click
        (
            function(e) {
                var 
                    iframe = String.format("<img src=\""+oBaseAppSettings.IncludeSiteDirectory+"/Images/Layout/HotelItem/icon-load-66x66{0}.gif\" class=\"icon-load\" /><iframe scrolling='auto' frameborder='0' src='{1}HotelAbout.aspx{2}&period={3}&remote=true'></iframe>", temaStr, oBaseAjaxUrls.BookingSite, oTUIWebSession.UrlPart, this.periodIndex),
                    dialogControl = TUI.Web.UI.WebControls.Dialog.createNewGlobalDialog({ 'innerHtmlTop': this.hotelName, 'innerHtmlCenter': iframe, 'isDraggable': true, 'showOverlay': true }, 'dialog-hotel-description');

                dialogControl.show();
            }
        );

        $pageCombinations.find('div.hotel-description a.remove, #combination-periods a.remove').click
        (
            function(e) {
                var nCurrentPeriodIndex = $pageCombinations.find('div.hotel-description a.remove, #combination-periods a.remove').filter(":visible").length,
                    nPeriodIndex = Number(this.periodIndex);
                if ((nCurrentPeriodIndex - 1) <= nPeriodIndex) { document.location.href = String.format("{0}SearchResult.aspx{1}&period={2}", oBaseAjaxUrls.BookingSite, oTUIWebSession.UrlPart, nPeriodIndex); return; }
                var 
                    html = String.format("<p>{0}</p><p>{1}</p><p class=\"button-holder\"><a href=\"javascript:void(0)\" class=\"dialog-change-hotel-cancel\"><img src=\"{2}/Images/Buttons/{3}/cancel.gif\" /></a><a href=\"javascript:void(0)\" class=\"dialog-change-hotel-ok\"><img src=\"/{2}/Images/Buttons/{3}/change-hotel.gif\" /></a></p>", this.resQuestion, this.resWarning, oBaseAppSettings.IncludeSiteDirectory, oBaseAppSettings.BrandID),
                    dialogControl = TUI.Web.UI.WebControls.Dialog.createNewGlobalDialog({ 'innerHtmlTop': $(this).text(), 'innerHtmlCenter': html, 'showOverlay': true }, 'dialog-change-hotel');

                $(dialogControl.get_element()).find('a.dialog-change-hotel-ok').click(function(e) {
                    $(this).parents("div.dialog-center-inner:first").html(String.format("<img src=\""+oBaseAppSettings.IncludeSiteDirectory+"/Images/Layout/HotelItem/icon-load-66x66{0}.gif\" class=\"icon-load\" />", temaStr));
                    document.location.href = String.format("{0}SearchResult.aspx{1}&period={2}", oBaseAjaxUrls.BookingSite, oTUIWebSession.UrlPart, nPeriodIndex);
                });
                $(dialogControl.get_element()).find('a.dialog-change-hotel-cancel').click(function(e) {
                    dialogControl.hide();
                });

                dialogControl.show();
            }
        );

        $pageCombinations.find('a.price-spec-details').click
        (
            function(e) {
                var 
                    urlPriceSpecHandler = String.format("{0}PriceSpecCombi.aspx{1}", oBaseAjaxUrls.DynamicContent, oTUIWebSession.UrlPart),
                    dialogControl = TUI.Web.UI.WebControls.Dialog.createNewGlobalDialog({ 'innerHtmlTop': oTUIStrings.sPriceSpecificationTitle, 'dynamicServiceFullPath': urlPriceSpecHandler, 'showOverlay': true }, 'dialog-price-specification');

                dialogControl.show();
            }
        );

        $("div.secure-page a.price-spec-details").click
        (
            function() {
                if (this.isCombination == "true") {
                    s = oBaseAjaxUrls.DynamicContent + "PriceSpecCombi.aspx" + oTUIWebSession.UrlPart;
                }
                else {
                    s = oBaseAjaxUrls.DynamicContent + "PriceSpec.aspx" + oTUIWebSession.UrlPart;
                }
                //displayDialog(this, oTUIStrings.sPriceSpecificationTitle, s, 670);
                dialogControl = TUI.Web.UI.WebControls.Dialog.createNewGlobalDialog({ 'innerHtmlTop': oTUIStrings.sPriceSpecificationTitle, 'dynamicServiceFullPath': s, 'showOverlay': true }, 'dialog-price-specification');
                dialogControl.show();
            }
        );
    }
);
addDays=function(yyyy,mm,dd,n){mm=parseInt(mm,10)-1;d=new Date();d.setFullYear(yyyy,mm,dd);d.setDate(d.getDate()+n);return d;}
killDefault=function(e){e.returnValue=false;if(e.preventDefault)e.preventDefault();}

String.prototype.appendSessionID=function(){
    sURI=oBaseAppSettings.SessionParameterName+"="
    if((this.indexOf("?"+sURI)!=-1)||(this.indexOf("&"+sURI)!=-1)||(this.indexOf(" ")!=-1)){return(this);}
    sURI=(this.indexOf("?")==-1)?"?"+sURI:"&"+sURI;
    return((oTUIWebSession.ID!="")?this+sURI+oTUIWebSession.ID:this);
};

String.prototype.trim=function(){
    var objRegExp=/^(\s*)$/,strValue=this;
    if(objRegExp.test(strValue)){
        strValue=strValue.replace(objRegExp, '');
        if(strValue.length==0){return(strValue)}
    }
    objRegExp=/^(\s*)([\W\w]*)(\b\s*$)/;
    if(objRegExp.test(strValue)){strValue=strValue.replace(objRegExp,'$2');}
    return(strValue);
};

EventTracker=function(){
    this.Category="";
    this.Action="";
    this.Label="";
    this.SendEvent=function(){
        try{
            _gaq.push(['_trackEvent', this.Category, this.Action, this.Label]);
        }catch(err){}
    };
}
oEventTracker=new EventTracker();

var 
    globalCommonHelpPopupDialogElement,
    globalCommonHelpPopupDialogControl;
    
// TODO: The 'TUI.Web.UI.WebControls.Dialog.createNewGlobalDialog' function uses a better pattern than 'registerHelpTextPopupHandlers' and 'displayDialog' - consider major refactoring
function registerHelpTextPopupHandlers(container)
{
    $(container ? container : document).find('a.help-text-popup,img.help-text-popup').click
    (
        function (e)
        {
            e.stopPropagation();
            
            var
                $this = $(this),
                helpSection = $this.attr('rel').split("|")[0],
                helpPage = $this.attr('rel').split("|")[1],
                targetControlCssClass = $this.attr('class').replace("help-text-popup", "");
            
            if (globalCommonHelpPopupDialogControl != null)
            {
                if (globalCommonHelpPopupDialogControl.get_targetControl() == this)
                {
                    return; // A dialog is already attached to the help link - let it take care of hiding and showing or whatever
                }
                else
                {
                    Sys.Application.removeComponent(globalCommonHelpPopupDialogControl);
                    $(globalCommonHelpPopupDialogElement).remove();
                }
            }
            
            globalCommonHelpPopupDialogElement = $("<div id='help-text-dialog'></div>").appendTo($(this).parent()).get(0);
            globalCommonHelpPopupDialogControl = new TUI.Web.UI.WebControls.Dialog(globalCommonHelpPopupDialogElement);
            
            if (targetControlCssClass != null && targetControlCssClass != "")
            {
                $(globalCommonHelpPopupDialogElement).addClass(targetControlCssClass);
            }

            globalCommonHelpPopupDialogControl.beginUpdate();
            globalCommonHelpPopupDialogControl.set_innerHtmlTop(this.title);
            globalCommonHelpPopupDialogControl.set_dynamicServiceFullPath(oBaseAjaxUrls.DynamicContent + 'GetEPiHelpPage.aspx?helpSection=' + helpSection + '&helpPage=' + helpPage);
            globalCommonHelpPopupDialogControl.set_isDraggable(true);
            globalCommonHelpPopupDialogControl.set_targetControl(this);
            globalCommonHelpPopupDialogControl.set_dialogPosition(TUI.Web.UI.WebControls.DialogPosition.nearTargetInsideClient);
            globalCommonHelpPopupDialogControl.endUpdate();
            
            globalCommonHelpPopupDialogControl.show();
            
            Sys.Application.addComponent(globalCommonHelpPopupDialogControl);
            return(false);
        }
    );
    $("a.help-text-dialog").unbind("click").bind("click", function(e){
        e.stopPropagation();
        displayDialog(this, this.title, oBaseAjaxUrls.DynamicContent + "GetEPiHelpPage.aspx?helpSection="+this.rel.split("|")[0]+"&helpPage="+this.rel.split("|")[1]);
        return(false);
    });
}

// TODO: The 'TUI.Web.UI.WebControls.Dialog.createNewGlobalDialog' function uses a better pattern than 'registerHelpTextPopupHandlers' and 'displayDialog' - consider major refactoring
function displayDialog(oTriggeringElement, sTitle, sUrl, nWidth, sClass, sCallBack)
{
    if (globalCommonHelpPopupDialogControl != null) {
        if (globalCommonHelpPopupDialogControl.get_targetControl() == oTriggeringElement) {
            //return; // A dialog is already attached to the help link - let it take care of hiding and showing or whatever
        }
        else {
            //Sys.Application.removeComponent(globalCommonHelpPopupDialogControl);
            //$(globalCommonHelpPopupDialogElement).remove();
        }
        Sys.Application.removeComponent(globalCommonHelpPopupDialogControl);
        $(globalCommonHelpPopupDialogElement).remove();
    }else{
        //globalCommonHelpPopupDialogElement = $("<div id='help-text-dialog'></div>").appendTo("body").get(0);
        //globalCommonHelpPopupDialogControl = new TUI.Web.UI.WebControls.Dialog(globalCommonHelpPopupDialogElement);
        //Sys.Application.addComponent(globalCommonHelpPopupDialogControl);
    }
    globalCommonHelpPopupDialogElement = $("<div id='help-text-dialog'></div>").appendTo("body").get(0);
    globalCommonHelpPopupDialogControl = new TUI.Web.UI.WebControls.Dialog(globalCommonHelpPopupDialogElement);
    Sys.Application.addComponent(globalCommonHelpPopupDialogControl);
    globalCommonHelpPopupDialogControl.beginUpdate();
    globalCommonHelpPopupDialogControl.set_innerHtmlTop(sTitle);
    if(sUrl){globalCommonHelpPopupDialogControl.set_dynamicServiceFullPath(sUrl);}
    globalCommonHelpPopupDialogControl.set_isDraggable(true);
    globalCommonHelpPopupDialogControl.set_targetControl(oTriggeringElement);
    globalCommonHelpPopupDialogControl.set_dialogPosition(TUI.Web.UI.WebControls.DialogPosition.custom);
    if (sCallBack) { globalCommonHelpPopupDialogControl.set_callBackFunction(sCallBack); }
    globalCommonHelpPopupDialogControl.endUpdate();
    
    if(nWidth){
        $(globalCommonHelpPopupDialogElement).addClass((sClass)?sClass:"").css("width","auto").find("div.dialog-center-inner").css("width",nWidth.toString()+"px");
        $(globalCommonHelpPopupDialogElement).find("div.dialog-top-inner, div.dialog-bottom-inner").css("width",(nWidth-18).toString()+"px");
    }
    globalCommonHelpPopupDialogControl.show();
    
    return $(globalCommonHelpPopupDialogElement).css({left:($(oTriggeringElement).offset().left-400)+"px",top:($(oTriggeringElement).offset().top+20)+"px",background:"none"});
}

function displayDraggable(triggeringElement, width)
{
    var
        $triggeringElement = $(triggeringElement),
        $targetDraggable = $("div#draggable");
    width=(width)?width:500;
    //width=(width>500)?666:500;
    if(width>800){width=900;$targetDraggable.addClass("popup-900");}
    else if(width>500){width=666;$targetDraggable.addClass("popup-666");}
    else{$targetDraggable.removeClass("popup-666").removeClass("popup-900");}
    $targetDraggable.find("div.ui-content:first").html("<img class=\"icon-load\" src=\"" + oBaseAppSettings.IncludeSiteDirectory + "/Images/Layout/HotelItem/icon-load-66x66" + temaStr + ".gif\"/>");
    nPosLeft=($triggeringElement.offset().left-(width-300));if(nPosLeft<50){nPosLeft=50;}
    if($triggeringElement.parents("div#content-start:first").length>0){$targetDraggable.css({width:width,top:"465px",left:(($(document).width()/2)-250)+"px"});}
    else{$targetDraggable.css({width:width,top:($triggeringElement.offset().top-100)+"px",left:nPosLeft+"px"});}
    if($.browser.msie&&$.browser.version<7){$("select").hide();}
    if(!$targetDraggable.hasClass("ui-draggable")){
        if($.browser.msie&&$.browser.version<8){$targetDraggable.draggable({handle:'div.ui-handle',cursor:'move'}).show();}else{$targetDraggable.draggable({handle:'div.ui-handle',cursor:'move',opacity:0.5}).show();}
        $targetDraggable.find("div.ui-handle a").click(function(){$targetDraggable.hide().removeAttr("style").find("div.ui-content:first").removeClass("no-padding").removeAttr("style");});
    }else{$targetDraggable.show();}
    return $targetDraggable;
}

formatNumber=function(n){
    if(isNaN(n)){return("0");}
    s=n.toString();nStart = s.indexOf(" ");
	if(nStart<0){nStart=s.length;}nStart-=3;
	while(nStart>= 1){s=s.substring(0,nStart)+" "+s.substring(nStart,s.length);nStart-=3;}
	return((s.indexOf(oTUIStrings.sCurrencySign)!=-1)?s:s+oTUIStrings.sCurrencySign);
}

//Calendar
var oDate=new Date();
TUICalendar = function() {
    jQuery.fn.extend({ Display: function(o) { var temaStr = (oFormHelper.Type == "TEMA") ? "-tema" : ""; oTUICalendar.WeekHolder.html("<img src=\""+oBaseAppSettings.IncludeSiteDirectory+"/Images/Layout/HotelItem/icon-load-66x66" + temaStr + ".gif\" />"); oTUICalendar.CalendarObject.css({ top: o.offset().top + 17, left: o.offset().left - 113 }); oTUICalendar.CalendarObject.show(); } });
    Number.prototype.toDatePartString = function() { return (this < 10) ? "0" + this.toString() : this.toString(); };
    this.Init = function() { this.CalendarObject = $("div#calendar"); this.WeekHolder = this.CalendarObject.find("div.content div.week-holder:first"); this.InfoTextHolder = this.CalendarObject.find("div.content span.info:first"); this.MonthList = this.CalendarObject.find("div.head div#month-list"); /*this.CalendarObject.draggable({handle:'div.head',cursor:'move'});*/this.CalendarObject.find("div.head a.close").click(function() { oTUICalendar.Close(); }); this.CalendarObject.find("div.head a.prev").click(function() { oTUICalendar.SelectPrevMonth(); }); this.CalendarObject.find("div.head a.next").click(function() { oTUICalendar.SelectNextMonth(); }); }
    this.InitWeekEvents = function() { this.WeekHolder.find("li a").click(function() { oTUICalendar.Day = parseInt($(this).text(), 10); oTUICalendar.SetInputDate(); if (typeof (SetReturnDate) == "function" && oTUICalendar.DateHolder != null && oTUICalendar.DateHolder.hasClass("departure-date")) { SetReturnDate(); } oTUICalendar.Close(); }); };
    this.CalendarObject = null;
    this.WeekHolder = null;
    this.InfoTextHolder = null;
    this.MonthList = null;
    this.MonthListIndex = 0;
    this.UpdateMonthListIndex = function() { this.MonthListIndex = this.MonthList.ListItems().index(this.MonthList.ListItems("selected").get(0)); };
    this.DateHolder = null;
    this.Year = oDate.getFullYear();
    this.Month = (oDate.getMonth() + 1);
    this.ActiveMonth = this.Month;
    this.FirstActiveMonth = null;
    this.Day = oDate.getDate();
    this.SetDate = function() { this.Year = this.DateHolder.children("span.year").text(); this.Month = parseInt(this.DateHolder.children("span.month").text(), 10); this.Day = parseInt(this.DateHolder.children("span.day").text(), 10); this.UpdateMonthListIndex(); };
    this.GetDateString = function() { return this.Year.toString() + "-" + this.Month.toDatePartString() + "-" + this.Day.toDatePartString(); };
    this.SetInputDate = function() { this.DateHolder.children("span.year").text(this.Year.toString()); this.DateHolder.children("span.month").text(this.Month.toDatePartString()); this.DateHolder.children("span.day").text(this.Day.toDatePartString()); };
    this.HotelIdUrlPart = function() { return ($("input#enokhotelid").length > 0) ? "&hotelid=" + $("input#enokhotelid").val() : ""; };
    this.LoadMonthList = function() { sDestCode = ((oFormHelper.GetResortCodeCRS() != "") ? oFormHelper.GetResortCodeCRS() : oFormHelper.GetDestinationCodeCRS()); s = oBaseAjaxUrls.DynamicContent + "Calendar.aspx?year=" + this.Year.toString() + "&month=" + this.Month.toString() + "&mode=months&depcode=" + oFormHelper.GetDepartureCodeCRS() + "&destcode=" + sDestCode + "&type=" + oFormHelper.Type + this.HotelIdUrlPart(); this.MonthList.ListHolder().load(s, function() { oTUICalendar.MonthList.RemoveLoadStatus(); oTUICalendar.MonthList.ListItems().InitEvents(); oSelectedMonth = oTUICalendar.MonthList.ListItems("selected:first"); oFirstActiveMonth = oTUICalendar.MonthList.ListItems().filter(function() { return (!$(this).hasClass("disabled")); }).eq(0); if (oFirstActiveMonth.length == 0) { oFirstActiveMonth = oTUICalendar.MonthList.ListItems().eq(0).addClass("selected"); } oTUICalendar.FirstActiveMonth = oFirstActiveMonth.prev("dt:first").text().split(",")[0]; if (oSelectedMonth.length == 0) { oFirstActiveMonth.SetSelected(); oFirstActiveMonth.Call(); } else { oSelectedMonth.SetSelected(); oSelectedMonth.Call(); }; registerHelpTextPopupHandlers($(this)); }); return this.MonthList; };
    this.SelectMonth = function(s) { a = s.split(","); this.Year = parseInt(a[1], 10); this.Month = parseInt(a[0], 10); /*this.SetInputDate();*/this.LoadWeeks(); this.UpdateMonthListIndex(); };
    this.SelectNextMonth = function() {
        oDD = this.MonthList.find("dd.selected:first").nextAll("dd:first");
        if (oDD.length == 0) { return; }
        oDD.SetSelected();
        a = oDD.prev("dt").text().split(",");
        this.Year = parseInt(a[1], 10); this.Month = parseInt(a[0], 10); this.LoadWeeks(); this.UpdateMonthListIndex();
    };
    this.SelectPrevMonth = function() {
        oDD = this.MonthList.find("dd.selected:first").prevAll("dd:first");
        if (oDD.length == 0) { return; }
        oDD.SetSelected();
        a = oDD.prev("dt").text().split(",");
        this.Year = parseInt(a[1], 10); this.Month = parseInt(a[0], 10); this.LoadWeeks(); this.UpdateMonthListIndex();
    };
    this.LoadWeeks = function() {
        sDestCode = ((oFormHelper.GetResortCodeCRS() != "") ? oFormHelper.GetResortCodeCRS() : oFormHelper.GetDestinationCodeCRS());
        this.WeekHolder.load(oBaseAjaxUrls.DynamicContent + "Calendar.aspx?year=" + this.Year.toString()
            + "&month=" + this.Month.toString()
            + "&day=" + this.Day.toString() + "&depcode=" + oFormHelper.GetDepartureCodeCRS()
            + "&destcode=" + sDestCode
            + "&selmonth=" + this.Month.toString()
            + "&selday=" + this.Day.toString()
            + "&type=" + oFormHelper.Type
            + ((this.DateHolder.hasClass("return-date")) ? "&depdate=" + oFormHelper.DepartureDate() : "")
            + "&icon=true" + this.HotelIdUrlPart(),
    	function() {
    	    oTUICalendar.InitWeekEvents();
    	    oTUICalendar.UpdateMonthListIndex();
    	    if (oTUICalendar.WeekHolder.find("a").length == 0) { oTUICalendar.SetStatusText(oTUIStrings.sCalendarMonthNoDepartures); } else {
    	        if (parseInt(oTUICalendar.FirstActiveMonth) == oTUICalendar.Month) { oTUICalendar.SetStatusText(oTUIStrings.sCalendarEarliestDepartureDate + ": " + oTUICalendar.WeekHolder.find("a:first").text() + "/" + oTUICalendar.Month.toString()); } else { oTUICalendar.SetStatusText(""); }
    	    }
    	});
    };
    this.Open = function(o) {
        CalendarStatus = "ready"; setTimeout("CalendarStatus=\"open\";", 100);
        this.DateHolder = o.prevAll("span.calendar-dates:first");
        this.SetDate();
        if ($.browser.msie && $.browser.version < 7) { this.AllSelectLists.hide(); }
        this.CalendarObject.Display(o);
        this.LoadMonthList().SetLoadStatus();
    };
    this.Close = function() { this.CalendarObject.hide(); if ($.browser.msie && $.browser.version < 7) { this.AllSelectLists.show(); } };
    this.SetStatusText = function(s) { if (s == "") { s = "&#160;"; } this.InfoTextHolder.html(s); };
    this.AllSelectLists = null;
}
var oTUICalendar = new TUICalendar();
//
CallBacks.push("charter-departure|departureClick");
CallBacks.push("charter-departure-ow|departureOWClick");
CallBacks.push("charter-destination|destinationClick");
CallBacks.push("charter-destination-ow|destinationOWClick");
CallBacks.push("charter-resort|resortClick");
CallBacks.push("no-of-rooms|addRoomAllocationContainer");
CallBacks.push("period|periodClick");
CallBacks.push("adults1|adultsClick1");
CallBacks.push("adults2|adultsClick2");
CallBacks.push("adults3|adultsClick3");
CallBacks.push("children1|childrenClick1");
CallBacks.push("children2|childrenClick2");
CallBacks.push("children3|childrenClick3");
var oFormHelper = null;
var setDestinationSelected = false;
var typeForCurrentPeriodCall = "CHARTER";
$(document).ready(
    function() {
        InitPage = function() {
            jQuery.fn.extend({ toggle2: function() { if ($(this).is(":visible")) { $(this).css("display", "none"); } else { $(this).css("display", "block"); } } });
            RoomHelper = function(o) {
                this.Container = o.children("div.no-of-rooms-holder:first");
                this.Template = this.Container.find("div.room-allocation:first");
                this.AllocationContainer = function(s) { return this.Container.find("div.room-allocation" + ((s != null) ? s : "")); };
            }
            oRoomHelper = new RoomHelper($("div.bp-content:first"));
            ListHelper = function() {
                this.PageContainer = $("div.page-container");
                this.StartPageContainer = $("div#search-form");
                this.BookingPanelContainer = this.StartPageContainer;
                this.CharterContainer = this.StartPageContainer.find("div#charter");
                this.CharterToggleChoices = this.StartPageContainer.find("span.toggle");
                this.DepartureContainer = this.BookingPanelContainer.find("div#charter-departure");
                this.DepartureList = this.DepartureContainer.children("dl:first");
                this.DepartureContainerOW = this.BookingPanelContainer.find("div#charter-departure-ow");
                this.DepartureListOW = this.DepartureContainerOW.children("dl:first");
                this.DestinationContainer = this.BookingPanelContainer.find("div#charter-destination");
                this.DestinationList = this.DestinationContainer.children("dl:first");
                this.DestinationContainerOW = this.BookingPanelContainer.find("div#charter-destination-ow");
                this.DestinationListOW = this.DestinationContainerOW.children("dl:first");
                this.ResortContainer = this.BookingPanelContainer.find("div#charter-resort");
                this.ResortList = this.ResortContainer.children("dl:first");
                this.PeriodContainer = this.BookingPanelContainer.find("div#period");
                this.PeriodList = this.PeriodContainer.children("dl:first");
                this.NumberOfRoomList = this.BookingPanelContainer.find("div#no-of-rooms");
                this.AdultsList = this.BookingPanelContainer.find("div#adults1,div#adults2,div#adults3");
                this.ChildrenList = this.BookingPanelContainer.find("div#children1,div#children2,div#children3");
                this.ChildrenAgesHolder = this.BookingPanelContainer.find("div.children-ages");
                this.DepartureDateHolder = this.BookingPanelContainer.find("span.departure-date");
                this.ReturnDateHolder = this.BookingPanelContainer.find("span.return-date");
                this.HotelCodeHolder = this.BookingPanelContainer.find("input#hotel-code");
                this.BookingCodeHolder = this.BookingPanelContainer.find("input#booking-code");
            }
            oListHelper = new ListHelper();
            Validator = function() {
                this.TotalPax = oRoomHelper.AllocationContainer(":eq(2)").find("span.pax-overflow-error");
                this.ValidateTotalPax = function() { n = 0; oListHelper.AdultsList.children("input").each(function() { n += parseInt($(this).val()); }); oListHelper.ChildrenList.children("input").each(function() { n += parseInt($(this).val()); }); if (n > 15) { this.TotalPax.css("display", "block"); return (false); } else { this.TotalPax.css("display", "none"); return (true); } };
                this.ChildrenAges = function(arr) { return (arr.parents("div.room-allocation").find("span.children-ages-error")); };
                this.ValidateChildrenAges = function() {
                    arrIncorrectInputs = oListHelper.ChildrenAgesHolder.filter(function() { return ($(this).is(":visible")); }).find("span:visible input").filter(function() { return ($(this).val().length == 0); });
                    oListHelper.ChildrenAgesHolder.find("span input").css("border", "1px solid #999");
                    arrIncorrectInputs.css("border", "1px solid #EF0000");
                    this.ChildrenAges(oListHelper.ChildrenAgesHolder).css("display", "none");
                    this.ChildrenAges(arrIncorrectInputs).css("display", (arrIncorrectInputs.length > 0) ? "block" : "none");
                    return (arrIncorrectInputs.length == 0);
                };
                this.Period = oListHelper.CharterContainer.find("span.period-error");
                this.ValidatePeriod = function() {
                    s = oListHelper.PeriodContainer.children("span").text();
                    b = oListHelper.PeriodList.children("dd").filter(function() { return ($(this).text() == s); }).hasClass("disabled");
                    if (b) { oListHelper.PeriodContainer.css("border", "1px solid #EF0000"); this.Period.css("display", "block"); }
                    else { this.ResetPeriod(); }
                    return (!b);
                };
                this.ResetPeriod = function() { oListHelper.PeriodContainer.css("border", "1px solid #999"); this.Period.css("display", "none"); };
                this.CharterDestination = oListHelper.CharterContainer.find("span.charter-destination-error");
                this.ResetCharterDestination = function() { oListHelper.DestinationContainer.css("border", "1px solid #999"); this.CharterDestination.css("display", "none"); };
                this.ValidateCharterDestination = function() {
                    s = $.trim(oFormHelper.GetDestinationCodeCRS());
                    b = (s.length == 0) ? false : (s.substring(s.length - 1) == "d");
                    if (!b) { oListHelper.DestinationContainer.css("border", "1px solid #EF0000"); this.CharterDestination.css("display", "block"); }
                    else { this.ResetCharterDestination(); }
                    return (b);
                };
                this.Validate = function() {
                    b1 = this.ValidateChildrenAges();
                    b2 = ((oFormHelper.Type == "TEMA") || (oFormHelper.Type == "FLEX_HTL") || (oFormHelper.Type == "CHARTER_FLT" && oFormHelper.OneWay == "1")) ? true : this.ValidatePeriod();
                    b3 = (oFormHelper.Type == "COMBINATION") ? this.ValidateCharterDestination() : true;
                    return (b1 && b2 && b3);
                };
            }
            oValidator = new Validator();
            InitListBoxes(oListHelper.CharterContainer);
            Array.prototype.trim = function() { s = ""; for (i = 0; i < this.length; i++) { s += (this[i] != "" && this[i] != ";") ? ((i > 0) ? "|" + this[i] : this[i]) : ""; } return s; }
            FormHelper = function() {
                if ($("input#isBookableOnline").val()) {
                    if (oListHelper.DepartureContainer.length === 0 || $("input#isBookableOnline").val().toLowerCase() != "true") {
                        $("#search-form h3").text(oTUIStrings.sEnokNotBookableOnlineHeader);
                        return;
                    }
                }
                else {
                    if (oListHelper.DepartureContainer.length === 0) {
                        $("#search-form h3").text(oTUIStrings.sEnokNotBookableOnlineHeader);
                        return;
                    }
                }
                this.Status = "Ready";
                this.TabIndex = "1";
                this.HotelIdUrlPart = function() { return ($("input#enokhotelid").length > 0) ? "&hotelid=" + $("input#enokhotelid").val() : ""; };
                this.Type = "CHARTER";
                this.SetType = function() {
                    switch (this.TabIndex) {
                        case "1":
                            if (oBaseAppSettings.IsTemaSite)
                                this.Type = "TEMA";
                            else if (oListHelper.BookingPanelContainer.find("span.choice:visible input:visible:checked").length != 0)
                                this.Type = oListHelper.BookingPanelContainer.find("span.choice:visible input:visible:checked").val();
                            else
                                this.Type = "CHARTER";
                            break;
                        case "2": this.Type = "CHARTER_FLT";
                            break;
                        case "3": this.Type = "FLEX_HTL";
                            break;
                    }
                };
                this.OneWay = ($("span.sub-choice input:checked").length == 0) ? "0" : $("span.sub-choice input:checked").val();
                this.SetOneWay = function(o) { this.OneWay = o.val(); this.SetDepartureCodes((o.val() == "1") ? oListHelper.DepartureContainerOW : oListHelper.DepartureContainer); this.SetDestinationCodes((o.val() == "1") ? oListHelper.DestinationContainerOW : oListHelper.DestinationContainer); };
                this.DepartureCodes = oListHelper.DepartureContainer.children("input:first").val().split("|");
                this.DestinationCodes = oListHelper.DestinationContainer.children("input:first").val().split("|");
                this.ResortCodes = oListHelper.ResortContainer.children("input:first").val().split("|");
                this.SetDepartureCodes = function(o) { this.DepartureCodes = o.children("input:first").val().split("|"); };
                this.SetDestinationCodes = function(o) { this.ResortCodes = [""]; this.DestinationCodes = o.children("input:first").val().split("|"); };
                this.SetResortCodes = function() { this.ResortCodes = oListHelper.ResortContainer.children("input:first").val().split("|"); };
                this.GetDepartureCodeOWCRS = function() { s = this.DepartureCodes[0].replace(/CRS-/gi, ""); return ((s == "0") ? "" : s); };
                this.GetDepartureCodeCRS = function() { if (this.OneWay.toString() == "1" && this.DepartureCodes[1].substring(0, 1) == "d") { return this.GetDepartureCodeOWCRS(); } s = this.DepartureCodes[1].substring(2); return ((s == "0") ? "" : s); };
                this.GetDestinationCodeCRS = function() { s = this.DestinationCodes[0].replace(/CRS-/gi, ""); return ((s == "0") ? "" : s); };
                this.GetResortCodeCRS = function() { s = this.ResortCodes[0].replace(/CRS-/gi, ""); return ((s == "0") ? "" : s); };
                this.Period = oListHelper.PeriodContainer.children("input:first").val();
                //this.GetPeriod=function(){if(typeof(oSearchParams.period)!="undefined"&&oSearchParams.period!=null&&oSearchParams.period!="") return oSearchParams.period;return this.Period;}
                this.DepartureDate = function() { return oListHelper.DepartureDateHolder.children("span.year").text() + "-" + oListHelper.DepartureDateHolder.children("span.month").text() + "-" + oListHelper.DepartureDateHolder.children("span.day").text(); };
                this.ReturnDate = function() { return oListHelper.ReturnDateHolder.children("span.year").text() + "-" + oListHelper.ReturnDateHolder.children("span.month").text() + "-" + oListHelper.ReturnDateHolder.children("span.day").text(); };
                this.Pax = [";", ";", ";"];
                this.SetPax = function() {
                    oListHelper.ChildrenAgesHolder.each(function(i) {
                        a = ["", ""]; if ($(this).parent("div.room-allocation").is(":visible")) { a[0] = oListHelper.AdultsList.eq(i).children("input:first").val(); }
                        if ($(this).is(":visible")) { $(this).find("span:visible input").each(function(j) { a[1] += (j > 0) ? "," + $(this).val() : $(this).val(); }); }
                        oFormHelper.Pax[i] = a.join(";");
                    });
                };
                this.GetLmsCode = function() { if (typeof (oSearchParams) != "undefined" && oSearchParams != null && typeof (oSearchParams.lmscode) != "undefined" && oSearchParams.lmscode != null) return oSearchParams.lmscode; return ""; }
                this.GetSource = function() { if (typeof (oSearchParams) != "undefined" && oSearchParams != null && typeof (oSearchParams.source) != "undefined" && oSearchParams.source != null) return oSearchParams.source; return ""; }
                this.GetHotelCodeCrs = function() { if (typeof (oSearchParams) != "undefined" && oSearchParams != null && typeof (oSearchParams.hotel) != "undefined" && oSearchParams.hotel != null) return oSearchParams.hotel; return ""; }
                this.GetHotelCode = function() { var hotelParams = ""; if (typeof (oSearchParams) != "undefined" && oSearchParams != null) { var webcode = oListHelper.HotelCodeHolder.val(); if (webcode != "") { hotelParams = webcode; } else if (typeof (oSearchParams.hotelcode) != "undefined" && oSearchParams.hotelcode != null) { hotelParams = oSearchParams.hotelcode; } } return hotelParams; }
                this.GetBookingCode = function() { return oListHelper.BookingCodeHolder.val(); };
                this.GetQuerystringParam = function(k, v, d) { return v != "" ? "&" + k + "=" + v : ""; }
            }
            oFormHelper = new FormHelper();
            if (oFormHelper.Status !== "Ready") { return; }
            if (oListHelper.StartPageContainer.hasClass("bp-tab2")) { oFormHelper.TabIndex = "2"; }
            else if (oListHelper.StartPageContainer.hasClass("bp-tab3")) { oFormHelper.TabIndex = "3"; }
            oFormHelper.SetType();
            $("a.search-button").click(function() { performSearch(); return; });
            jQuery.fn.extend({
                ResetPeriodList: function() {
                    if ($(this).children("dt").filter(function() { return ($(this).text() == oListHelper.PeriodContainer.children("input:hidden").val()); }).length == 0) {
                        $(this).children("dd.selected:first").trigger("click");
                    }
                }
            });
            LoadPanel = function() {
                s = oFormHelper.Type;
                if (s == "COMBINATION") { oListHelper.BookingPanelContainer.addClass("bp-combinations"); }
                else { oListHelper.BookingPanelContainer.removeClass("bp-combinations"); }
                oListHelper.ResortContainer.hide();
                oListHelper.DepartureContainer.SetLoadStatus(); oListHelper.DestinationContainer.SetLoadStatus();
                if (s == "FLEX_HTL") {
                    oListHelper.DestinationList.load(oBaseAjaxUrls.DynamicContent + "Destinations/GetDestinations.aspx?code=f_&type=" + s, function() {
                        oListHelper.DestinationContainer.RemoveLoadStatus();
                        oListHelper.DestinationContainer.ListItems().InitEvents();
                        oListHelper.DestinationContainer.ListItems().eq(0).ClickItem();
                    });
                }
                else {
                    oListHelper.DepartureList.load(oBaseAjaxUrls.DynamicContent + "Destinations/GetDestinations.aspx?code=b_&type=" + s + "&hotelcode=" + getEnokHotelId(), function() {
                        oListHelper.DepartureContainer.RemoveLoadStatus();
                        oListHelper.DepartureContainer.ListItems().InitEvents();
                        oListHelper.DepartureContainer.ListItems().eq(0).ClickItem();
                    });
                }
            }
            oListHelper.StartPageContainer.find("ul.tabs li").click(function() { s = $(this).attr("id"); oFormHelper.TabIndex = s.replace(/tab/gi, ""); $(this).parent("ul").attr("class", "tabs " + s); bIsInner = oListHelper.BookingPanelContainer.hasClass("inner-booking-panel"); oListHelper.BookingPanelContainer.attr("class", ((bIsInner) ? "inner-booking-panel" : "booking-panel") + " bp-" + s + ((s == "tab2") ? " bp-" + s + "-" + oFormHelper.OneWay : "")); oFormHelper.SetType(); LoadPanel(); if (!$(this).hasClass("selected")) { $(this).parent("ul").find("li").toggleClass("selected") } });
            oListHelper.StartPageContainer.find("a.calendar-icon").click(function() { oTUICalendar.Open($(this)); });
            oListHelper.StartPageContainer.find("span.calendar-dates").click(function() { oTUICalendar.Open($(this).nextAll("a.calendar-icon:first")); });
            oListHelper.StartPageContainer.find("a.toggle-choices").click(function() { $(this).children("span").toggle(); oListHelper.CharterToggleChoices.toggleClass("toggle"); if (($(this).children("span:visible").hasClass("show")) && (oFormHelper.Type == "TRAIN" || oFormHelper.Type == "CRUISE" || oFormHelper.Type == "CAR")) { oListHelper.StartPageContainer.find("span.choice:first input").attr("checked", "checked"); oListHelper.StartPageContainer.find("span.choice:first input").trigger("click"); } });
            oListHelper.StartPageContainer.find("span.choice input").click(function() { if ($(this).parent("span").hasClass("sub-choice")) { return; } oFormHelper.SetType(); LoadPanel(); });
            oListHelper.StartPageContainer.find("span.sub-choice input").click(function() {
                oFormHelper.SetOneWay($(this)); bIsInner = oListHelper.BookingPanelContainer.hasClass("inner-booking-panel"); oListHelper.BookingPanelContainer.attr("class", ((bIsInner) ? "inner-booking-panel" : "booking-panel") + " bp-tab2 bp-tab2-" + oFormHelper.OneWay);
                oListHelper.DestinationContainer.ListItems().eq(0).SetSelected(); oListHelper.ResortContainer.hide();
                if ((oListHelper.DepartureContainerOW.hasClass("list-box-loading")) && (oFormHelper.OneWay == "1")) {
                    oListHelper.DepartureListOW.load(oBaseAjaxUrls.DynamicContent + "Destinations/GetDestinations.aspx?code=o_&type=CHARTER", function() {
                        oListHelper.DepartureContainerOW.removeClass("list-box-loading");
                        oListHelper.DepartureContainerOW.ListItems().InitEvents();
                        oListHelper.DepartureContainerOW.ListItems().eq(0).ClickItem();
                    });
                } else if (oListHelper.DepartureContainer.ListItems().length == 0) {
                    LoadPanel();
                }
            });
            oListHelper.StartPageContainer.find("a.hotel-code-link, a.booking-code-link").click(function() { $(this).hide(); $(this).next("span").css("display", "block"); });
            oListHelper.StartPageContainer.find("input#hotel-code, input#booking-code").blur(function() { if ($(this).val() != "") { return; } $(this).parent("span").hide(); $(this).parent("span").prev("a").css("display", "block"); });
            //resetDestinations=function(){if(oFormHelper.DestinationCodes[0]!=""){if(oListHelper.DestinationContainer.ValueItems(oFormHelper.DestinationCodes[0]).length==0){oListHelper.DestinationList.children("dd:first").ClickItem();}}}
            resetDestinations = function() {
                if (oFormHelper.DestinationCodes[0] != "") {
                    if (oListHelper.DestinationContainer.ValueItems(oFormHelper.DestinationCodes[0]).length == 0) {
                        oListHelper.DestinationList.children("dd:first").ClickItem();
                    }
                    else {
                        oListHelper.DestinationList.find("dd").filter(function() { return ($(this).text() == oListHelper.DestinationContainer.children("span:first").text()); }).ClickItem();
                    }
                } else { oListHelper.DestinationContainer.ListItems().eq(0).SetSelected(); }
            }
            addRoomAllocationContainer = function(s) { oRoomHelper.AllocationContainer(":gt(" + (parseInt(s) - 1).toString() + ")").addClass("toggle"); oRoomHelper.AllocationContainer(":lt(" + s + "):gt(0)").removeClass("toggle"); }
            departureClick = function(s) {
                oFormHelper.SetDepartureCodes(oListHelper.DepartureContainer);
                oListHelper.DestinationContainer.SetLoadStatus();
                oListHelper.DestinationList.load(oBaseAjaxUrls.DynamicContent + "Destinations/GetDestinations.aspx?code=" + s + "&type=" + oFormHelper.Type, function() {
                    oListHelper.DestinationContainer.RemoveLoadStatus();
                    oListHelper.DestinationContainer.ListItems().InitEvents();
                    setTimeout("resetDestinations()", 100);
                });
            }
            departureOWClick = function(s) {
                oFormHelper.SetDepartureCodes(oListHelper.DepartureContainerOW);
                oListHelper.ResortContainer.hide();
                oListHelper.DestinationContainerOW.SetLoadStatus();
                oListHelper.DestinationListOW.load(oBaseAjaxUrls.DynamicContent + "Destinations/GetDestinations.aspx?code=" + s + "&type=CHARTER&oneway=1", function() {
                    oListHelper.DestinationContainerOW.RemoveLoadStatus();
                    oListHelper.DestinationContainerOW.ListItems().InitEvents();
                    if ((setDestinationSelected) && (typeof (oSearchParams) != "undefined") && (oFormHelper.Type == "CHARTER_FLT") && (oSearchParams.type == "ONEWAY")) {
                        oListHelper.DestinationListOW.children("dt").filter(function() { return ($(this).attr("class").indexOf(oSearchParams.destcode) > -1); }).filter(":last").next("dd").ClickItem();
                    } else {
                        oListHelper.DestinationContainerOW.ListItems().eq(0).SetSelected();
                    }
                });
            }
            destinationClick = function(s) {
                oValidator.ResetCharterDestination();
                oFormHelper.SetDestinationCodes(oListHelper.DestinationContainer);
                if (oFormHelper.Type != "FLEX_HTL") {
                    oListHelper.PeriodContainer.SetLoadStatus();
                    oListHelper.PeriodList.load(oBaseAjaxUrls.DynamicContent + "GetPeriods.aspx?type=" + oFormHelper.Type + "&depcode=" + oFormHelper.GetDepartureCodeCRS() + "&destcode=" + oFormHelper.GetDestinationCodeCRS() + ((typeForCurrentPeriodCall == oFormHelper.Type) ? "&period=" + oFormHelper.Period : "") + oFormHelper.HotelIdUrlPart(), function() {
                        oListHelper.PeriodContainer.RemoveLoadStatus();
                        oListHelper.PeriodContainer.ListItems().InitEvents();
                        if (oListHelper.PeriodContainer.ListItems(".selected:first").hasClass("disabled")) {
                            oListHelper.PeriodContainer.ListItems().filter(function() { return (!$(this).hasClass("disabled")); }).eq(0).ClickItem();
                        } else if (oListHelper.PeriodContainer.ListItems(".selected").length == 0) {
                            oListHelper.PeriodContainer.ListItems().eq(0).ClickItem();
                        } else {
                            oListHelper.PeriodContainer.ListItems(".selected:first").ClickItem();
                        }
                        oValidator.ValidatePeriod();
                        typeForCurrentPeriodCall = oFormHelper.Type;
                    });
                }
                if (s == "" || s == "0") { oListHelper.ResortContainer.hide(); oListHelper.PeriodList.children("dd").removeClass("disabled"); return; }
                oListHelper.ResortContainer.SetLoadStatus().show(); oListHelper.NumberOfRoomList.addClass("ie6-bug-fix");
                oListHelper.ResortList.load(oBaseAjaxUrls.DynamicContent + "Destinations/GetDestinations.aspx?code=" + s + "&type=" + oFormHelper.Type + "&depcode=" + oFormHelper.GetDepartureCodeCRS(), function() {
                    $(this).SelectFirstItem();
                    oListHelper.ResortContainer.RemoveLoadStatus();
                    oListHelper.ResortContainer.ListItems().InitEvents();
                });
            }
            destinationOWClick = function(s) {
                oFormHelper.SetDestinationCodes(oListHelper.DestinationContainerOW);
                if (s == "" || s == "0" || (oFormHelper.DepartureCodes[0].replace(/CRS-/gi, "") != "")) { oListHelper.ResortContainer.hide(); return; }
                oListHelper.ResortContainer.SetLoadStatus().show();
                oListHelper.ResortList.load(oBaseAjaxUrls.DynamicContent + "Destinations/GetDestinations.aspx?code=" + s + "&type=CHARTER", function() {
                    $(this).SelectFirstItem();
                    oListHelper.ResortContainer.RemoveLoadStatus();
                    oListHelper.ResortContainer.ListItems().InitEvents();
                });
            }
            resortClick = function(s) {
                if (s == "0") { if (oListHelper.DestinationContainerOW.is(":visible")) { oFormHelper.SetDestinationCodes(oListHelper.DestinationContainerOW); } else { oFormHelper.SetDestinationCodes(oListHelper.DestinationContainer); } }
                else { oFormHelper.SetResortCodes(); }
                if (s.substring(0, 2) == "d_") {
                    oListHelper.PeriodContainer.SetLoadStatus();
                    sDestCode = ((oFormHelper.GetResortCodeCRS() != "") ? oFormHelper.GetResortCodeCRS() : oFormHelper.GetDestinationCodeCRS());
                    if (oFormHelper.Type != "FLEX_HTL") {
                        oListHelper.PeriodList.load(oBaseAjaxUrls.DynamicContent + "GetPeriods.aspx?type=" + oFormHelper.Type + "&depcode=" + oFormHelper.GetDepartureCodeCRS() + "&destcode=" + sDestCode + ((typeForCurrentPeriodCall == oFormHelper.Type) ? "&period=" + oFormHelper.Period : "") + oFormHelper.HotelIdUrlPart(), function() {
                            oListHelper.PeriodContainer.RemoveLoadStatus();
                            oListHelper.PeriodContainer.ListItems().InitEvents();
                            if (oListHelper.PeriodContainer.ListItems(".selected:first").hasClass("disabled")) {
                                oListHelper.PeriodContainer.ListItems().filter(function() { return (!$(this).hasClass("disabled")); }).eq(0).ClickItem();
                            } else if (oListHelper.PeriodContainer.ListItems(".selected").length == 0) {
                                oListHelper.PeriodContainer.ListItems().eq(0).ClickItem();
                            } else {
                                oListHelper.PeriodContainer.ListItems(".selected:first").ClickItem();
                            }
                            oValidator.ValidatePeriod();
                            typeForCurrentPeriodCall = oFormHelper.Type;
                        });
                    }
                }
            }
            periodClick = function(s) { oFormHelper.Period = s; oValidator.ResetPeriod(); }
            adultsClick1 = function(s) { oListHelper.ChildrenList.eq(0).ListItems().removeClass("disabled"); oListHelper.ChildrenList.eq(0).ListItems().filter(function() { return (parseInt($(this).text()) > (oBaseAppSettings.MaxPax - parseInt(s))); }).addClass("disabled"); oValidator.ValidateTotalPax(); }
            adultsClick2 = function(s) { oListHelper.ChildrenList.eq(1).ListItems().removeClass("disabled"); oListHelper.ChildrenList.eq(1).ListItems().filter(function() { return (parseInt($(this).text()) > (oBaseAppSettings.MaxPax - parseInt(s))); }).addClass("disabled"); oValidator.ValidateTotalPax(); }
            adultsClick3 = function(s) { oListHelper.ChildrenList.eq(2).ListItems().removeClass("disabled"); oListHelper.ChildrenList.eq(2).ListItems().filter(function() { return (parseInt($(this).text()) > (oBaseAppSettings.MaxPax - parseInt(s))); }).addClass("disabled"); oValidator.ValidateTotalPax(); }
            childrenClick1 = function(s) { oListHelper.ChildrenAgesHolder.eq(0).attr("class", "children-ages number-" + s); oValidator.ValidateTotalPax(); if (s == "0") { oValidator.ValidateChildrenAges(); } }
            childrenClick2 = function(s) { oListHelper.ChildrenAgesHolder.eq(1).attr("class", "children-ages number-" + s); oValidator.ValidateTotalPax(); if (s == "0") { oValidator.ValidateChildrenAges(); } }
            childrenClick3 = function(s) { oListHelper.ChildrenAgesHolder.eq(2).attr("class", "children-ages number-" + s); oValidator.ValidateTotalPax(); if (s == "0") { oValidator.ValidateChildrenAges(); } }
            handleKeyDown = function(o, n) {
                if ((n == 9) || (n == 37) || (n == 39) || (n == 8) || (n == 46)) { return true; }
                else { return ((n >= 48 && n <= 57) || (n >= 96 && n <= 105)); }
            }
            handleKeyUp = function(o) {
                if (o.val() > 17) { o.val(o.val().substring(0, (o.val().length - 1))) }
            }
            $("span.child input").keydown(function(event) { return handleKeyDown($(this), event.keyCode); });
            $("span.child input").keyup(function() { return handleKeyUp($(this)); });
            if (typeof overRide != "undefined") { overRide(); }
        }
        LoadBookingPanel = function() {
            sUrlParams = "";
            if (typeof (oSearchParams) == "undefined" && $.cookie("tui.searchparams") != null) { oSearchParams = JSON.parse($.cookie("tui.searchparams")); }
            else if ((typeof (oSearchParams) != "undefined") && (oSearchParams.source != "") && (oSearchParams.source != "lms")) { oSearchParams.type = "CHARTER"; }
            if ((typeof (oSearchParams) != "undefined") && ($("div.enok-hotel-level").length == 0)) {
                sInnerBookingPanelClass = ($("body:first").hasClass("searchresult")) ? "booking-panel inner-booking-panel" : "inner-booking-panel";
                if (oSearchParams.type == "COMBINATION" || oSearchParams.type == "TRAIN" || oSearchParams.type == "CRUISE" || oSearchParams.type == "CAR") { if (oSearchParams.type == "COMBINATION") { $("div#search-form").addClass("bp-combinations"); } $("div#search-form span.choice input").filter(function() { return ($(this).val() == oSearchParams.type); }).attr("checked", "checked"); }
                else if (oSearchParams.type == "CHARTER_FLT") {
                    sBPClass = ($("div#search-form").hasClass("inner-booking-panel")) ? sInnerBookingPanelClass : "booking-panel";
                    $("div#search-form").attr("class", sBPClass + " bp-tab2 bp-tab2-0").children("ul.tabs:first").attr("class", "tabs tab2");
                }
                else if (oSearchParams.type == "ONEWAY") {
                    sBPClass = ($("div#search-form").hasClass("inner-booking-panel")) ? sInnerBookingPanelClass : "booking-panel";
                    $("input#tab2_4").attr("checked", "checked");
                    $("div#search-form").attr("class", sBPClass + " bp-tab2 bp-tab2-1").children("ul.tabs:first").attr("class", "tabs tab2");
                }
                else if (oSearchParams.type == "FLEX_HTL") {
                    sBPClass = ($("div#search-form").hasClass("inner-booking-panel")) ? sInnerBookingPanelClass : "booking-panel";
                    $("div#search-form").attr("class", sBPClass + " bp-tab3").children("ul.tabs:first").attr("class", "tabs tab3");
                }
                sUrlParams = oSearchParams.urlparams;
                typeForCurrentPeriodCall = oSearchParams.type;
            }
            else if ((typeof (oSearchParams) != "undefined") && ($("div.enok-hotel-level").length > 0)) { sUrlParams = oSearchParams.urlparams; }
            var bookableString = "";
            if ($("input#isBookableOnline").val()) {
                bookableString = "&bookableonline=" + $("input#isBookableOnline").val().toLowerCase();
            }
            $("div#charter").load(oBaseAjaxUrls.DynamicContent + "BookingPanel/BookingPanel.aspx?bid=" + oBaseAppSettings.BrandID + sUrlParams + "&hotelcode=" + getEnokHotelId() + bookableString, function() {

                // TODO: Timing issue: DreamVacation already loaded and displayed on top of the booking panel at this point. Booking panel elements "shine through" and causes white stripes to be displayed in the campaign Flash video. This code prevents this, but maybe there's a better solution.
                var hasQuery = (getQueryStringParameter("showCampaignPage") != "") ? true : false;
                var hasPageQuery = (getQueryStringParameter("page") != "") ? true : false;
                if (typeof Sys !== 'undefined' && typeof Tui !== 'undefined' && ($.cookie("CampaignHasBeenShown") == null || hasQuery))
                //if (typeof Sys !== 'undefined' && typeof Tui !== 'undefined')
                {
                    Tui.Web.DreamVacation.hideProblematicBookingPanelElements();
                }
                else if (hasPageQuery) {
                    if ($.browser.mozilla) {
                        $('.bp-content:first').find('.list-box span, .list-box-large span').hide();
                    }
                }

                $(this).removeClass("bp-content-loading"); InitPage();
                registerHelpTextPopupHandlers($(this));
                if (typeof (oSearchParams) != "undefined") {
                    if ((oFormHelper.Type == "CHARTER_FLT") && (oSearchParams.type == "ONEWAY") && (oSearchParams.destcode != "")) {
                        setDestinationSelected = true;
                        oListHelper.DepartureListOW.children("dd.selected").ClickItem();
                    }
                    else if (((oFormHelper.Type == "CHARTER_FLT") || (oSearchParams.source == "lms" || oSearchParams.source == "dynamictable")) && (oSearchParams.destcode != "")) {
                        oListHelper.DestinationList.children("dt").filter(function() { return ($(this).attr("class").indexOf(oSearchParams.destcode) > -1); }).filter(":last").next("dd").ClickItem();
                    }
                    if (($("div#search-form a.toggle-choices:visible").length > 0) && (oSearchParams.type == "TRAIN" || oSearchParams.type == "CRUISE" || oSearchParams.type == "CAR")) { $("div#search-form a.toggle-choices:visible").trigger("click"); }
                }
            });
        }
        SetReturnDate = function() {
            o = oTUICalendar.DateHolder;
            if (o.parents("div.column:first").find("span.return-date").length == 0) { return; }
            d = addDays(o.children("span.year").text(), o.children("span.month").text(), o.children("span.day").text(), 3);
            oTUICalendar.DateHolder = o.parents("div.column:first").find("span.return-date");
            oTUICalendar.Year = d.getFullYear();
            oTUICalendar.Month = d.getMonth() + 1;
            oTUICalendar.Day = d.getDate();
            oTUICalendar.SetInputDate();
        }
        if (!$("div#search-form").hasClass("inner-booking-panel")) { LoadBookingPanel(); }
        $("a.display-bp").click(function() { $("div#search-form").toggle(); if ($("div#search-form").is(":visible")) { LoadBookingPanel(); } });
        $("a.search-all").click(function() {
            s = $(this).attr("lang");
            if ((s == "") && (typeof (oSearchParams) == "undefined" && $.cookie("tui.searchparams") != null)) {
                oSearchParams = JSON.parse($.cookie("tui.searchparams"));
                var searchtype = (oSearchParams.type == "COMBINATION") ? "CHARTER" : oSearchParams.type;
                var returndateparam = ((oSearchParams.type == "FLEX_HTL") ? "&returndate=" + oSearchParams.returndate[0] + "-" + oSearchParams.returndate[1] + "-" + oSearchParams.returndate[2] : "");
                var combiparam = (oSearchParams.type == "COMBINATION") ? "&combi=true" : "";
                s = oBaseAjaxUrls.BookingSite + "SearchProduct.aspx?depcode=" + oSearchParams.depcode + "&destcode=" + ((oSearchParams.resortcode != "") ? oSearchParams.resortcode : oSearchParams.destcode) + "&period=" + oSearchParams.period + "&type=" + searchtype + "&depdate=" + oSearchParams.depdate[0] + "-" + oSearchParams.depdate[1] + "-" + oSearchParams.depdate[2] + returndateparam + "&PaxInRooms=" + oSearchParams.paxinrooms + "&alt=true" + combiparam;
            }
            else if (s == "") { document.location.href = oBaseAjaxUrls.BookingSite + "SearchForm" + (oBaseAppSettings.IsTemaSite ? "Tema" : "") + ".aspx"; return; }
            if ($("div.page-container").find("div#searching img").length == 0) {
                var imgtag = "<img src=\"" + oBaseAppSettings.IncludeSiteDirectory + "/Images/Layout/BookingPanel/searching" + (oBaseAppSettings.IsTemaSite ? "-tema" : "") + ".jpg\" alt=\"\" />"
                $("div.page-container").find("div#searching").append(imgtag);
            }
            $("div.page-container").addClass("searching");
            $.get(s, function(data) {
                sStatus = $(data).find("Status").text();
                if (sStatus == "OK") {
                    s = $(data).find("Url").text(); /*sHits = $(data).find("SearchHits").text();*/
                    $.cookie("tui.searchresult", null, { path: "/" });
                    document.location.href = s;
                } else {
                    $("input#searchurl").val(s);
                    var code = $(data).find("Code").text();
                    var producttype = $(data).find("ProductType").text();
                    $("input#errorcode").val(code);
                    $("input#producttype").val(producttype);
                    document.forms["errorform"].submit();
                }
            });
        });
        //Calendar
        CalendarStatus = "ready";
        oTUICalendar.Init();
        CallBacks.push("month-list|oTUICalendar.SelectMonth");
        InitListBoxes(oTUICalendar.CalendarObject);
        $(document).click(function() { if (CalendarStatus == "open") { oTUICalendar.Close(); } });
        $("div#calendar").click(function() { CalendarStatus = "ready"; setTimeout("CalendarStatus=\"open\";", 100); });
        if ($.browser.msie && $.browser.version < 7) { oTUICalendar.AllSelectLists = $("select"); }
        //
    }
);

getCountryName=function(){
    if($("div.enok-hotel-level").length>0 && $("div.breadcrumbs a").length>0){
        return $("div.breadcrumbs a:eq(0)").text();
    }else if(oListHelper.DestinationContainer.children("input:hidden").val()=="" || oListHelper.DestinationContainer.children("input:hidden").val()=="0"){
        return "-";
    }else if(oListHelper.DestinationContainer.children("input:hidden").val().split("|")[1].substring(0,1) == "c"){
        return oListHelper.DestinationContainer.children("span").text();
    }else{
        return oListHelper.DestinationContainer.find("dd.selected").prevAll("dd.parent:first").text();
    }
}
getDestinationName=function(){
    if($("div.enok-hotel-level").length>0 && $("div.breadcrumbs a").length>1){
        return $("div.breadcrumbs a:eq(1)").text();
    }else if(oListHelper.DestinationContainer.children("input:hidden").val()=="" || oListHelper.DestinationContainer.children("input:hidden").val()=="0"){
        return "-";
    }else if(oListHelper.DestinationContainer.children("input:hidden").val().split("|")[1].substring(0,1) == "c"){
        if(oListHelper.ResortContainer.children("input:hidden").val()=="" || oListHelper.ResortContainer.children("input:hidden").val()=="0"){
            return "-";
        }else if(oListHelper.ResortContainer.children("input:hidden").val().split("|")[1].substring(0,1) == "d"){
            return oListHelper.ResortContainer.children("span").text();
        }else{
            return oListHelper.ResortContainer.find("dd.selected").prevAll("dd.parent:first").text();
        }
    }else if(oListHelper.DestinationContainer.children("input:hidden").val().split("|")[1].substring(0,1) == "d"){
        return oListHelper.DestinationContainer.children("span").text();
    }else{
        return oListHelper.ResortContainer.find("dd.selected").prevAll("dd.parent:first").text();
    }
}
getResortName=function(){
    if($("div.enok-hotel-level").length>0 && $("div.breadcrumbs a").length>2){
        return $("div.breadcrumbs a:eq(2)").text();
    }else if(oListHelper.ResortContainer.filter(":visible").length>0 && oListHelper.ResortContainer.children("input:hidden").val()!="" && oListHelper.ResortContainer.children("input:hidden").val()!="0" && oListHelper.ResortContainer.children("input:hidden").val().split("|")[1].substring(0,1) == "r"){
        return oListHelper.ResortContainer.children("span").text();
    }else{
        return "-";
    }
}
getHotelName=function(){
    if($("div.enok-hotel-level div#main-header h1").length>0){
        return $("div.enok-hotel-level div#main-header h1").text();
    }else{
        return "-";
    }
}
getEnokHotelId=function(){
    if($("input#enokhotelid").length>0){
        return $("input#enokhotelid").val();
    }else if(typeof(oListHelper)=="object" && oListHelper.HotelCodeHolder.filter(":visible").length>0){
        return oListHelper.HotelCodeHolder.val();
    }else{
        return "-";
    }
}
getPaxPerRoom=function(roomIndex){
    allPax=(oFormHelper.Pax.trim() + "|;|;").split("|");
    if(allPax[roomIndex]==";"){
        return "-";
    }else{
        adults=allPax[roomIndex].split(";")[0];
        children = (allPax[roomIndex].split(";").length < 2 || allPax[roomIndex].split(";")[1] == "") ? "0+0+0" : getChildrenPerRoom(allPax[roomIndex].split(";")[1].split(","));
        return String.format("{0}+{1}", adults, children);
    }
}
getChildrenPerRoom = function(childAges) {
    var teens = 0,
        children = 0,
        infants = 0;
    for (i = 0; i < childAges.length; i++) {
        if (childAges[i] < 2) {
            infants++;
        }
        else if (childAges[i] < 12) {
            children++;
        }
        else {
            teens++;
        }
    }
    return String.format("{0}+{1}+{2}", teens, children, infants);
}
getPanelLocation=function(){
    if($("div#content-start").length>0){
        return "front page";
    }else if($("div.enok-hotel-level").length>0){
        return "hotel page";
    }else if($("div#page-content.message-page-container").length>0){
        return "general message page";
    }else if($("div.serp-holder").length>0){
        return "search result page";
    }else{
        return "booking tab";
    }
}
journeyDurationInDays=function(){
    if(oListHelper.ReturnDateHolder.filter(":visible").length>0){
        var date1 = new Date();
        date1.setFullYear(Number(oListHelper.ReturnDateHolder.children("span.year").text()), Number(oListHelper.ReturnDateHolder.children("span.month").text())-1, Number(oListHelper.ReturnDateHolder.children("span.day").text()));
        var date2 = new Date();
        date2.setFullYear(Number(oListHelper.DepartureDateHolder.children("span.year").text()), Number(oListHelper.DepartureDateHolder.children("span.month").text())-1, Number(oListHelper.DepartureDateHolder.children("span.day").text()));
        return Math.floor((date1.getTime() - date2.getTime()) / 86400000)+1;
    }else{
        return oFormHelper.Period;
    }
}
prepareEventTracking = function(bookingType) {
    var eventLabel = "";
    eventLabel = String.format("{0}|{1}|{2}|{3}|{4}|{5}|{6}|{7}|{8}|{9}|{10}|{11}|{12}|{13}",
        (bookingType == "FLEX_HTL") ? "HOTELONLY" : bookingType,
        oListHelper.DepartureContainer.children("span").text(),
        getCountryName(),
        getDestinationName(),
        getResortName(),
        getHotelName(),
        oListHelper.DepartureDateHolder.text(),
        journeyDurationInDays(),
        (oListHelper.NumberOfRoomList.filter(":visible").length > 0) ? oListHelper.NumberOfRoomList.children("input:hidden").val() : "-",
        getPaxPerRoom(0),
        getPaxPerRoom(1),
        getPaxPerRoom(2),
        getEnokHotelId(),
        (oListHelper.BookingCodeHolder.filter(":visible").length > 0) ? oListHelper.BookingCodeHolder.val() : "-"
    );
    oEventTracker.Category = "booking search";
    oEventTracker.Action = getPanelLocation();
    oEventTracker.Label = eventLabel;
}

performSearch = function() {
    if (!oValidator.Validate()) { return; }
    $("div#light-box,div#light-box-content").hide();
    oFormHelper.SetPax();
    var imgtag = "<img src=\""+oBaseAppSettings.IncludeSiteDirectory+"/Images/Layout/BookingPanel/searching" + (oBaseAppSettings.IsTemaSite ? "-tema" : "") + ".jpg\" alt=\"\" />"
    if (oListHelper.PageContainer.find("div#searching img").length == 0) { oListHelper.PageContainer.find("div#searching").append(imgtag); }
    oListHelper.PageContainer.addClass("searching");

    $.cookie("tui.searchparams", null, { path: "/" });
    if (typeof (oSearchParams) == "undefined" || oSearchParams == null) oSearchParams = new Object();
    oSearchParams.type = (((oFormHelper.Type == "CHARTER_FLT") && (oFormHelper.OneWay == "1")) ? "ONEWAY" : oFormHelper.Type);
    oSearchParams.depcode = oFormHelper.GetDepartureCodeCRS();
    oSearchParams.destcode = oFormHelper.GetDestinationCodeCRS();
    oSearchParams.resortcode = oFormHelper.GetResortCodeCRS();
    oSearchParams.period = oFormHelper.Period;
    oSearchParams.paxinrooms = oFormHelper.Pax.trim();
    oSearchParams.depdate = [oListHelper.DepartureDateHolder.children("span.year").text(), oListHelper.DepartureDateHolder.children("span.month").text(), oListHelper.DepartureDateHolder.children("span.day").text()];
    oSearchParams.returndate = [oListHelper.ReturnDateHolder.children("span.year").text(), oListHelper.ReturnDateHolder.children("span.month").text(), oListHelper.ReturnDateHolder.children("span.day").text()];
    //oSearchParams.urlparams="&bookingtype="+oSearchParams.type+"&depcode="+oFormHelper.DepartureCodes[1]+"&destcode="+oFormHelper.DestinationCodes[1]+"&destcodecrs="+((oSearchParams.resortcode!="")?oSearchParams.resortcode:oSearchParams.destcode)+"&resortcode="+((typeof(oFormHelper.ResortCodes[1])!="undefined")?oFormHelper.ResortCodes[1]:"")+"&depyear="+oSearchParams.depdate[0]+"&depmonth="+oSearchParams.depdate[1]+"&depday="+oSearchParams.depdate[2]+"&period="+oSearchParams.period+"&pax="+oSearchParams.paxinrooms;
    oSearchParams.urlparams = "&bookingtype=" + oSearchParams.type + "&depcode=" + oSearchParams.depcode.replace(/-d/gi, "").replace(/-/gi, "") + "&destcode=" + ((typeof (oFormHelper.DestinationCodes[1]) != "undefined") ? oFormHelper.DestinationCodes[1] : "") + "&destcodecrs=" + oSearchParams.destcode + "&resortcode=" + ((typeof (oFormHelper.ResortCodes[1]) != "undefined") ? oFormHelper.ResortCodes[1] : "") + "&depyear=" + oSearchParams.depdate[0] + "&depmonth=" + oSearchParams.depdate[1] + "&depday=" + oSearchParams.depdate[2] + "&period=" + oSearchParams.period + "&pax=" + oSearchParams.paxinrooms;

    var trackSearchEvent = true;
    try {
        prepareEventTracking(oSearchParams.type);
    }
    catch (err) { trackSearchEvent = false; }

    var returndateparam = ((oFormHelper.Type == "FLEX_HTL") ? oFormHelper.GetQuerystringParam("returndate", oFormHelper.ReturnDate()) : "");
    var hotelcodeparam = oFormHelper.GetQuerystringParam("hotelcode", oFormHelper.GetHotelCode());
    var sourceparam = oFormHelper.GetQuerystringParam("source", oFormHelper.GetSource());
    var hotelcodecrsparam = oFormHelper.GetQuerystringParam("hotel", oFormHelper.GetHotelCodeCrs());
    var lmscodeparam = oFormHelper.GetQuerystringParam("lmscode", oFormHelper.GetLmsCode());
    var bookingcodeparam = oFormHelper.GetQuerystringParam("BookingCode", oFormHelper.GetBookingCode());
    var searchtype = (oSearchParams.type == "COMBINATION") ? "CHARTER" : oSearchParams.type;
    var combiparam = (oSearchParams.type == "COMBINATION") ? oFormHelper.GetQuerystringParam("combi", "true") : "";
    var rndparam = oFormHelper.GetQuerystringParam("rnd", Math.ceil(10000 * Math.random()));
    oSearchParams.hotelcode = null;
    oSearchParams.hotel = null;
    oSearchParams.source = null;
    oSearchParams.lmscode = null;
    var hotelUrlPart = ($("input#enokhotelid").length > 0 && $("input#enokhotelid").val() != "" && hotelcodeparam == "") ? "&hotelcode=" + $("input#enokhotelid").val() : "";
    $.cookie("tui.searchparams", JSON.serialize(oSearchParams), { path: "/" });
    s = oBaseAjaxUrls.BookingSite + "SearchProduct.aspx?depcode=" + oSearchParams.depcode + "&destcode=" + ((oSearchParams.resortcode != "") ? oSearchParams.resortcode : oSearchParams.destcode) + "&period=" + oSearchParams.period + "&type=" + searchtype + "&depdate=" + oFormHelper.DepartureDate() + returndateparam + "&PaxInRooms=" + oSearchParams.paxinrooms + bookingcodeparam + hotelcodeparam + sourceparam + hotelcodecrsparam + lmscodeparam + hotelUrlPart + combiparam + rndparam;
    $.get(s, function(data) {
        sStatus = $(data).find("Status").text();
        if (sStatus == "OK") {
            s = $(data).find("Url").text(); /*sHits = $(data).find("SearchHits").text();*/
            $.cookie("tui.searchresult", null, { path: "/" });
            if (trackSearchEvent) {
                oEventTracker.Label = (oEventTracker.Label + "|" + "SUCCESS");
                oEventTracker.SendEvent();
            }
            document.location.href = s;
        } else {
            $("input#searchurl").val(s);
            var code = $(data).find("Code").text();
            var producttype = $(data).find("ProductType").text();
            $("input#errorcode").val(code);
            $("input#producttype").val(producttype);
            if (trackSearchEvent) {
                oEventTracker.Label = String.format((oEventTracker.Label + "|" + "FAILURE (CODE:{0})"), code)
                oEventTracker.SendEvent();
            }
            document.forms["errorform"].submit();
        }
    });
}


  function getQueryStringParameter(name) {
        name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
        var regexS = "[\\?&]" + name + "=([^&#]*)";
        var regex = new RegExp(regexS);
        var results = regex.exec(window.location.href);
        if (results == null) {
            return "";
        }
        else {
            return results[1];
        }
    }

if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();