﻿if(typeof(Sys)=="undefined"){Function.__typeName="Function";Function.__class=true;Function.createCallback=function(c,d){return function(){var b=arguments.length;if(b>0){var a=[];for(var f=0;f<b;f++){a[f]=arguments[f]}a[b]=d;return c.apply(this,a)}return c.call(this,d)}};Function.createDelegate=function(d,c){return function(){return c.apply(d,arguments)}};Function.emptyFunction=Function.emptyMethod=function(){};Function._validateParams=function(k,m){var n;n=Function._validateParameterCount(k,m);if(n){n.popStackFrame();return n}for(var l=0;l<k.length;l++){var g=m[Math.min(l,m.length-1)],o=g.name;if(g.parameterArray){o+="["+(l-m.length+1)+"]"}n=Function._validateParameter(k[l],g,o);if(n){n.popStackFrame();return n}}return null};Function._validateParameterCount=function(k,n){var m=n.length,g=0;for(var l=0;l<n.length;l++){if(n[l].parameterArray){m=Number.MAX_VALUE}else{if(!n[l].optional){g++}}}if(k.length<g||k.length>m){var o=Error.parameterCount();o.popStackFrame();return o}return null};Function._validateParameter=function(B,C,r){var A,E=C.type,v=!!C.integer,q=!!C.domElement,z=!!C.mayBeNull;A=Function._validateParameterType(B,E,v,q,z,r);if(A){A.popStackFrame();return A}var o=C.elementType,D=!!C.elementMayBeNull;if(E===Array&&typeof B!=="undefined"&&B!==null&&(o||!D)){var p=!!C.elementInteger,s=!!C.elementDomElement;for(var F=0;F<B.length;F++){var u=B[F];A=Function._validateParameterType(u,o,p,s,D,r+"["+F+"]");if(A){A.popStackFrame();return A}}}return null};Function._validateParameterType=function(C,B,u,z,q,F){var A;if(typeof C==="undefined"){if(q){return null}else{A=Error.argumentUndefined(F);A.popStackFrame();return A}}if(C===null){if(q){return null}else{A=Error.argumentNull(F);A.popStackFrame();return A}}if(B&&B.__enum){if(typeof C!=="number"){A=Error.argumentType(F,Object.getType(C),B);A.popStackFrame();return A}if(C%1===0){var o=B.prototype;if(!B.__flags||C===0){for(var s in o){if(o[s]===C){return null}}}else{var v=C;for(var s in o){var D=o[s];if(D===0){continue}if((D&C)===D){v-=D}if(v===0){return null}}}}A=Error.argumentOutOfRange(F,C,String.format(Sys.Res.enumInvalidValue,C,B.getName()));A.popStackFrame();return A}if(z){var r;if(typeof C.nodeType!=="number"){var E=C.ownerDocument||C.document||C;if(E!=C){var p=E.defaultView||E.parentWindow;r=p!=C&&!(p.document&&C.document&&p.document===C.document)}else{r=typeof E.body==="undefined"}}else{r=C.nodeType===3}if(r){A=Error.argument(F,Sys.Res.argumentDomElement);A.popStackFrame();return A}}if(B&&!B.isInstanceOfType(C)){A=Error.argumentType(F,Object.getType(C),B);A.popStackFrame();return A}if(B===Number&&u){if(C%1!==0){A=Error.argumentOutOfRange(F,C,Sys.Res.argumentInteger);A.popStackFrame();return A}}return null};Error.__typeName="Error";Error.__class=true;Error.create=function(e,f){var k=new Error(e);k.message=e;if(f){for(var g in f){k[g]=f[g]}}k.popStackFrame();return k};Error.argument=function(k,g){var f="Sys.ArgumentException: "+(g?g:Sys.Res.argument);if(k){f+="\n"+String.format(Sys.Res.paramName,k)}var e=Error.create(f,{name:"Sys.ArgumentException",paramName:k});e.popStackFrame();return e};Error.argumentNull=function(k,g){var f="Sys.ArgumentNullException: "+(g?g:Sys.Res.argumentNull);if(k){f+="\n"+String.format(Sys.Res.paramName,k)}var e=Error.create(f,{name:"Sys.ArgumentNullException",paramName:k});e.popStackFrame();return e};Error.argumentOutOfRange=function(l,m,f){var k="Sys.ArgumentOutOfRangeException: "+(f?f:Sys.Res.argumentOutOfRange);if(l){k+="\n"+String.format(Sys.Res.paramName,l)}if(typeof m!=="undefined"&&m!==null){k+="\n"+String.format(Sys.Res.actualValue,m)}var g=Error.create(k,{name:"Sys.ArgumentOutOfRangeException",paramName:l,actualValue:m});g.popStackFrame();return g};Error.argumentType=function(g,m,l,k){var n="Sys.ArgumentTypeException: ";if(k){n+=k}else{if(m&&l){n+=String.format(Sys.Res.argumentTypeWithTypes,m.getName(),l.getName())}else{n+=Sys.Res.argumentType}}if(g){n+="\n"+String.format(Sys.Res.paramName,g)}var o=Error.create(n,{name:"Sys.ArgumentTypeException",paramName:g,actualType:m,expectedType:l});o.popStackFrame();return o};Error.argumentUndefined=function(k,g){var f="Sys.ArgumentUndefinedException: "+(g?g:Sys.Res.argumentUndefined);if(k){f+="\n"+String.format(Sys.Res.paramName,k)}var e=Error.create(f,{name:"Sys.ArgumentUndefinedException",paramName:k});e.popStackFrame();return e};Error.format=function(f){var e="Sys.FormatException: "+(f?f:Sys.Res.format),d=Error.create(e,{name:"Sys.FormatException"});d.popStackFrame();return d};Error.invalidOperation=function(f){var e="Sys.InvalidOperationException: "+(f?f:Sys.Res.invalidOperation),d=Error.create(e,{name:"Sys.InvalidOperationException"});d.popStackFrame();return d};Error.notImplemented=function(f){var e="Sys.NotImplementedException: "+(f?f:Sys.Res.notImplemented),d=Error.create(e,{name:"Sys.NotImplementedException"});d.popStackFrame();return d};Error.parameterCount=function(f){var e="Sys.ParameterCountException: "+(f?f:Sys.Res.parameterCount),d=Error.create(e,{name:"Sys.ParameterCountException"});d.popStackFrame();return d};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 m=this.stack.split("\n"),l=m[0],g=this.fileName+":"+this.lineNumber;while(typeof l!=="undefined"&&l!==null&&l.indexOf(g)===-1){m.shift();l=m[0]}var f=m[1];if(typeof f==="undefined"||f===null){return}var k=f.match(/@(.*):(\d+)$/);if(typeof k==="undefined"||k===null){return}this.fileName=k[1];this.lineNumber=parseInt(k[2]);m.shift();this.stack=m.join("\n")};Object.__typeName="Object";Object.__class=true;Object.getType=function(c){var d=c.constructor;if(!d||typeof d!=="function"||!d.__typeName||d.__typeName==="Object"){return Object}return d};Object.getTypeName=function(b){return Object.getType(b).getName()};String.__typeName="String";String.__class=true;String.prototype.endsWith=function(b){return this.substr(this.length-b.length)===b};String.prototype.startsWith=function(b){return this.substr(0,b.length)===b};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(r,n){var u="",m=n[0];for(var v=0;true;){var z=m.indexOf("{",v),B=m.indexOf("}",v);if(z<0&&B<0){u+=m.slice(v);break}if(B>0&&(B<z||z<0)){u+=m.slice(v,B+1);v=B+2;continue}u+=m.slice(v,z);v=z+1;if(m.charAt(v)==="{"){u+="{";v++;continue}if(B<0){break}var p=m.substring(v,B),A=p.indexOf(":"),o=parseInt(A<0?p:p.substring(0,A),10)+1,q=A<0?"":p.substring(A+1),s=n[o];if(typeof s==="undefined"||s===null){s=""}if(s.toFormattedString){u+=s.toFormattedString(q)}else{if(r&&s.localeFormat){u+=s.localeFormat(q)}else{if(s.format){u+=s.format(q)}else{u+=s.toString()}}}v=B+1}return u};Boolean.__typeName="Boolean";Boolean.__class=true;Boolean.parse=function(c){var d=c.trim().toLowerCase();if(d==="false"){return false}if(d==="true"){return true}};Date.__typeName="Date";Date.__class=true;Date._appendPreOrPostMatch=function(m,n){var l=0,p=false;for(var o=0,k=m.length;o<k;o++){var q=m.charAt(o);switch(q){case"'":if(p){n.append("'")}else{l++}p=false;break;case"\\":if(p){n.append("\\")}p=!p;break;default:n.append(q);p=false}}return l};Date._expandFormat=function(d,c){if(!c){c="F"}if(c.length===1){switch(c){case"d":return d.ShortDatePattern;case"D":return d.LongDatePattern;case"t":return d.ShortTimePattern;case"T":return d.LongTimePattern;case"F":return d.FullDateTimePattern;case"M":case"m":return d.MonthDayPattern;case"s":return d.SortableDateTimePattern;case"Y":case"y":return d.YearMonthPattern;default:throw Error.format(Sys.Res.formatInvalidString)}}return c};Date._expandYear=function(e,f){if(f<100){var d=(new Date).getFullYear();f+=d-d%100;if(f>e.Calendar.TwoDigitYearMax){return f-100}}return f};Date._getParseRegExp=function(s,m){if(!s._parseRegExp){s._parseRegExp={}}else{if(s._parseRegExp[m]){return s._parseRegExp[m]}}var u=Date._expandFormat(s,m);u=u.replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1");var v=new Sys.StringBuilder("^"),n=[],z=0,q=0,p=Date._getTokenRegExp(),B;while((B=p.exec(u))!==null){var r=u.slice(z,B.index);z=p.lastIndex;q+=Date._appendPreOrPostMatch(r,v);if(q%2===1){v.append(B[0]);continue}switch(B[0]){case"dddd":case"ddd":case"MMMM":case"MMM":v.append("(\\D+)");break;case"tt":case"t":v.append("(\\D*)");break;case"yyyy":v.append("(\\d{4})");break;case"fff":v.append("(\\d{3})");break;case"ff":v.append("(\\d{2})");break;case"f":v.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":v.append("(\\d\\d?)");break;case"zzz":v.append("([+-]?\\d\\d?:\\d{2})");break;case"zz":case"z":v.append("([+-]?\\d\\d?)")}Array.add(n,B[0])}Date._appendPreOrPostMatch(u.slice(z),v);v.append("$");var o=v.toString().replace(/\s+/g,"\\s+"),A={regExp:o,groups:n};s._parseRegExp[m]=A;return A};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(b){return Date._parse(b,Sys.CultureInfo.CurrentCulture,arguments)};Date.parseInvariant=function(b){return Date._parse(b,Sys.CultureInfo.InvariantCulture,arguments)};Date._parse=function(r,o,l){var k=false;for(var p=1,m=l.length;p<m;p++){var q=l[p];if(q){k=true;var n=Date._parseExact(r,q,o);if(n){return n}}}if(!k){var s=o._getDateTimeFormats();for(var p=0,m=s.length;p<m;p++){var n=Date._parseExact(r,s[p],o);if(n){return n}}}return null};Date._parseExact=function(B,Z,I){B=B.trim();var P=I.dateTimeFormat,E=Date._getParseRegExp(P,Z),Y=(new RegExp(E.regExp)).exec(B);if(Y===null){return null}var F=E.groups,T=null,R=null,K=null,U=null,V=0,M=0,N=0,W=0,J=null,A=false;for(var C=0,X=F.length;C<X;C++){var S=Y[C+1];if(S){switch(F[C]){case"dd":case"d":K=parseInt(S,10);if(K<1||K>31){return null}break;case"MMMM":R=I._getMonthIndex(S);if(R<0||R>11){return null}break;case"MMM":R=I._getAbbrMonthIndex(S);if(R<0||R>11){return null}break;case"M":case"MM":var R=parseInt(S,10)-1;if(R<0||R>11){return null}break;case"y":case"yy":T=Date._expandYear(P,parseInt(S,10));if(T<0||T>9999){return null}break;case"yyyy":T=parseInt(S,10);if(T<0||T>9999){return null}break;case"h":case"hh":V=parseInt(S,10);if(V===12){V=0}if(V<0||V>11){return null}break;case"H":case"HH":V=parseInt(S,10);if(V<0||V>23){return null}break;case"m":case"mm":M=parseInt(S,10);if(M<0||M>59){return null}break;case"s":case"ss":N=parseInt(S,10);if(N<0||N>59){return null}break;case"tt":case"t":var H=S.toUpperCase();A=H===P.PMDesignator.toUpperCase();if(!A&&H!==P.AMDesignator.toUpperCase()){return null}break;case"f":W=parseInt(S,10)*100;if(W<0||W>999){return null}break;case"ff":W=parseInt(S,10)*10;if(W<0||W>999){return null}break;case"fff":W=parseInt(S,10);if(W<0||W>999){return null}break;case"dddd":U=I._getDayIndex(S);if(U<0||U>6){return null}break;case"ddd":U=I._getAbbrDayIndex(S);if(U<0||U>6){return null}break;case"zzz":var D=S.split(/:/);if(D.length!==2){return null}var L=parseInt(D[0],10);if(L<-12||L>13){return null}var O=parseInt(D[1],10);if(O<0||O>59){return null}J=L*60+(S.startsWith("-")?-O:O);break;case"z":case"zz":var L=parseInt(S,10);if(L<-12||L>13){return null}J=L*60}}}var Q=new Date;if(T===null){T=Q.getFullYear()}if(R===null){R=Q.getMonth()}if(K===null){K=Q.getDate()}Q.setFullYear(T,R,K);if(Q.getDate()!==K){return null}if(U!==null&&Q.getDay()!==U){return null}if(A&&V<12){V+=12}Q.setHours(V,M,N,W);if(J!==null){var G=Q.getMinutes()-(J+Q.getTimezoneOffset());Q.setHours(Q.getHours()+parseInt(G/60,10),G%60)}return Q};Date.prototype.format=function(b){return this._toFormattedString(b,Sys.CultureInfo.InvariantCulture)};Date.prototype.localeFormat=function(b){return this._toFormattedString(b,Sys.CultureInfo.CurrentCulture)};Date.prototype._toFormattedString=function(m,p){if(!m||m.length===0||m==="i"){if(p&&p.name.length>0){return this.toLocaleString()}else{return this.toString()}}var B=p.dateTimeFormat;m=Date._expandFormat(B,m);var v=new Sys.StringBuilder,s;function u(b){if(b<10){return"0"+b}return b.toString()}function A(b){if(b<10){return"00"+b}if(b<100){return"0"+b}return b.toString()}var n=0,q=Date._getTokenRegExp();for(;true;){var r=q.lastIndex,z=q.exec(m),o=m.slice(r,z?z.index:m.length);n+=Date._appendPreOrPostMatch(o,v);if(!z){break}if(n%2===1){v.append(z[0]);continue}switch(z[0]){case"dddd":v.append(B.DayNames[this.getDay()]);break;case"ddd":v.append(B.AbbreviatedDayNames[this.getDay()]);break;case"dd":v.append(u(this.getDate()));break;case"d":v.append(this.getDate());break;case"MMMM":v.append(B.MonthNames[this.getMonth()]);break;case"MMM":v.append(B.AbbreviatedMonthNames[this.getMonth()]);break;case"MM":v.append(u(this.getMonth()+1));break;case"M":v.append(this.getMonth()+1);break;case"yyyy":v.append(this.getFullYear());break;case"yy":v.append(u(this.getFullYear()%100));break;case"y":v.append(this.getFullYear()%100);break;case"hh":s=this.getHours()%12;if(s===0){s=12}v.append(u(s));break;case"h":s=this.getHours()%12;if(s===0){s=12}v.append(s);break;case"HH":v.append(u(this.getHours()));break;case"H":v.append(this.getHours());break;case"mm":v.append(u(this.getMinutes()));break;case"m":v.append(this.getMinutes());break;case"ss":v.append(u(this.getSeconds()));break;case"s":v.append(this.getSeconds());break;case"tt":v.append(this.getHours()<12?B.AMDesignator:B.PMDesignator);break;case"t":v.append((this.getHours()<12?B.AMDesignator:B.PMDesignator).charAt(0));break;case"f":v.append(A(this.getMilliseconds()).charAt(0));break;case"ff":v.append(A(this.getMilliseconds()).substr(0,2));break;case"fff":v.append(A(this.getMilliseconds()));break;case"z":s=this.getTimezoneOffset()/60;v.append((s<=0?"+":"-")+Math.floor(Math.abs(s)));break;case"zz":s=this.getTimezoneOffset()/60;v.append((s<=0?"+":"-")+u(Math.floor(Math.abs(s))));break;case"zzz":s=this.getTimezoneOffset()/60;v.append((s<=0?"+":"-")+u(Math.floor(Math.abs(s)))+B.TimeSeparator+u(Math.abs(this.getTimezoneOffset()%60)))}}return v.toString()};Number.__typeName="Number";Number.__class=true;Number.parseLocale=function(b){return Number._parse(b,Sys.CultureInfo.CurrentCulture)};Number.parseInvariant=function(b){return Number._parse(b,Sys.CultureInfo.InvariantCulture)};Number._parse=function(A,u){A=A.trim();if(A.match(/^[+-]?infinity$/i)){return parseFloat(A)}if(A.match(/^0x[a-f0-9]+$/i)){return parseInt(A)}var C=u.numberFormat,D=Number._parseNumberNegativePattern(A,C,C.NumberNegativePattern),r=D[0],F=D[1];if(r===""&&C.NumberNegativePattern!==1){D=Number._parseNumberNegativePattern(A,C,1);r=D[0];F=D[1]}if(r===""){r="+"}var p,B,o=F.indexOf("e");if(o<0){o=F.indexOf("E")}if(o<0){B=F;p=null}else{B=F.substr(0,o);p=F.substr(o+1)}var E,q,z=B.indexOf(C.NumberDecimalSeparator);if(z<0){E=B;q=null}else{E=B.substr(0,z);q=B.substr(z+C.NumberDecimalSeparator.length)}E=E.split(C.NumberGroupSeparator).join("");var v=r+E;if(q!==null){v+="."+q}if(p!==null){var s=Number._parseNumberNegativePattern(p,C,1);if(s[0]===""){s[0]="+"}v+="e"+s[0]+s[1]}if(v.match(/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/)){return parseFloat(v)}return Number.NaN};Number._parseNumberNegativePattern=function(m,f,g){var k=f.NegativeSign,l=f.PositiveSign;switch(g){case 4:k=" "+k;l=" "+l;case 3:if(m.endsWith(k)){return["-",m.substr(0,m.length-k.length)]}else{if(m.endsWith(l)){return["+",m.substr(0,m.length-l.length)]}}break;case 2:k+=" ";l+=" ";case 1:if(m.startsWith(k)){return["-",m.substr(k.length)]}else{if(m.startsWith(l)){return["+",m.substr(l.length)]}}break;case 0:if(m.startsWith("(")&&m.endsWith(")")){return["-",m.substr(1,m.length-2)]}}return["",m]};Number.prototype.format=function(b){return this._toFormattedString(b,Sys.CultureInfo.InvariantCulture)};Number.prototype.localeFormat=function(b){return this._toFormattedString(b,Sys.CultureInfo.CurrentCulture)};Number.prototype._toFormattedString=function(O,B){if(!O||O.length===0||O==="i"){if(B&&B.name.length>0){return this.toLocaleString()}else{return this.toString()}}var A=["n %","n%","%n"],z=["-n %","-n%","-%n"],u=["(n)","-n","- n","n-","n -"],G=["$n","n$","$ n","n $"],F=["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"];function E(r,Q,s,V,U){var q=s[0],ab=1,Y=r.toString(),Z="",W="",S=Y.split(".");if(S.length>1){Y=S[0];Z=S[1];var R=Z.split(/e/i);if(R.length>1){Z=R[0];W="e"+R[1]}}if(Q>0){var aa=Z.length-Q;if(aa>0){Z=Z.slice(0,Q)}else{if(aa<0){for(var T=0;T<Math.abs(aa);T++){Z+="0"}}}Z=U+Z}else{Z=""}Z+=W;var X=Y.length-1,ac="";while(X>=0){if(q===0||q>X){if(ac.length>0){return Y.slice(0,X+1)+V+ac+Z}else{return Y.slice(0,X+1)+Z}}if(ac.length>0){ac=Y.slice(X-q+1,X+1)+V+ac}else{ac=Y.slice(X-q+1,X+1)}X-=q;if(ab<s.length){q=s[ab];ab++}}return Y.slice(0,X+1)+V+ac+Z}var L=B.numberFormat,P=Math.abs(this);if(!O){O="D"}var J=-1;if(O.length>1){J=parseInt(O.slice(1),10)}var K;switch(O.charAt(0)){case"d":case"D":K="n";if(J!==-1){var N=""+P,C=J-N.length;if(C>0){for(var I=0;I<C;I++){N="0"+N}}P=N}if(this<0){P=-P}break;case"c":case"C":if(this<0){K=F[L.CurrencyNegativePattern]}else{K=G[L.CurrencyPositivePattern]}if(J===-1){J=L.CurrencyDecimalDigits}P=E(Math.abs(this),J,L.CurrencyGroupSizes,L.CurrencyGroupSeparator,L.CurrencyDecimalSeparator);break;case"n":case"N":if(this<0){K=u[L.NumberNegativePattern]}else{K="n"}if(J===-1){J=L.NumberDecimalDigits}P=E(Math.abs(this),J,L.NumberGroupSizes,L.NumberGroupSeparator,L.NumberDecimalSeparator);break;case"p":case"P":if(this<0){K=z[L.PercentNegativePattern]}else{K=A[L.PercentPositivePattern]}if(J===-1){J=L.PercentDecimalDigits}P=E(Math.abs(this),J,L.PercentGroupSizes,L.PercentGroupSeparator,L.PercentDecimalSeparator);break;default:throw Error.format(Sys.Res.formatBadFormatSpecifier)}var H=/n|\$|-|%/g,M="";for(;true;){var v=H.lastIndex,D=H.exec(K);M+=K.slice(v,D?D.index:K.length);if(!D){break}switch(D[0]){case"n":M+=P;break;case"$":M+=L.CurrencySymbol;break;case"-":M+=L.NegativeSign;break;case"%":M+=L.PercentSymbol}}return M};RegExp.__typeName="RegExp";RegExp.__class=true;Array.__typeName="Array";Array.__class=true;Array.add=Array.enqueue=function(d,c){d[d.length]=c};Array.addRange=function(d,c){d.push.apply(d,c)};Array.clear=function(b){b.length=0};Array.clone=function(b){if(b.length===1){return[b[0]]}else{return Array.apply(null,b)}};Array.contains=function(d,c){return Array.indexOf(d,c)>=0};Array.dequeue=function(b){return b.shift()};Array.forEach=function(l,k,g){for(var n=0,o=l.length;n<o;n++){var m=l[n];if(typeof m!=="undefined"){k.call(g,m,n,l)}}};Array.indexOf=function(f,g,m){if(typeof g==="undefined"){return -1}var l=f.length;if(l!==0){m=m-0;if(isNaN(m)){m=0}else{if(isFinite(m)){m=m-m%1}if(m<0){m=Math.max(0,l+m)}}for(var k=m;k<l;k++){if(typeof f[k]!=="undefined"&&f[k]===g){return k}}}return -1};Array.insert=function(f,d,e){f.splice(d,0,e)};Array.parse=function(value){if(!value){return[]}return eval(value)};Array.remove=function(d,e){var f=Array.indexOf(d,e);if(f>=0){d.splice(f,1)}return f>=0};Array.removeAt=function(d,c){d.splice(c,1)};if(!window){this.window=this}window.Type=Function;Type.prototype.callBaseMethod=function(k,e,f){var g=this.getBaseMethod(k,e);if(!f){return g.apply(k)}else{return g.apply(k,f)}};Type.prototype.getBaseMethod=function(e,g){var f=this.getBaseType();if(f){var k=f.prototype[g];return k instanceof Function?k:null}return null};Type.prototype.getBaseType=function(){return typeof this.__baseType==="undefined"?null:this.__baseType};Type.prototype.getInterfaces=function(){var n=[],l=this;while(l){var m=l.__interfaces;if(m){for(var g=0,o=m.length;g<o;g++){var k=m[g];if(!Array.contains(n,k)){n[n.length]=k}}}l=l.__baseType}return n};Type.prototype.getName=function(){return typeof this.__typeName==="undefined"?"":this.__typeName};Type.prototype.implementsInterface=function(g){this.resolveInheritance();var m=g.getName(),n=this.__interfaceCache;if(n){var k=n[m];if(typeof k!=="undefined"){return k}}else{n=this.__interfaceCache={}}var l=this;while(l){var o=l.__interfaces;if(o){if(Array.indexOf(o,g)!==-1){return n[m]=true}}l=l.__baseType}return n[m]=false};Type.prototype.inheritsFrom=function(c){this.resolveInheritance();var d=this.__baseType;while(d){if(d===c){return true}d=d.__baseType}return false};Type.prototype.initializeBase=function(d,c){this.resolveInheritance();if(this.__baseType){if(!c){this.__baseType.apply(d)}else{this.__baseType.apply(d,c)}}return d};Type.prototype.isImplementedBy=function(d){if(typeof d==="undefined"||d===null){return false}var c=Object.getType(d);return !!(c.implementsInterface&&c.implementsInterface(this))};Type.prototype.isInstanceOfType=function(c){if(typeof c==="undefined"||c===null){return false}if(c instanceof this){return true}var d=Object.getType(c);return !!(d===this)||d.inheritsFrom&&d.inheritsFrom(this)||d.implementsInterface&&d.implementsInterface(this)};Type.prototype.registerClass=function(m,l,g){this.prototype.constructor=this;this.__typeName=m;this.__class=true;if(l){this.__baseType=l;this.__basePrototypePending=true}Sys.__upperCaseTypes[m.toUpperCase()]=this;if(g){this.__interfaces=[];for(var n=2,o=arguments.length;n<o;n++){var k=arguments[n];this.__interfaces.push(k)}}return this};Type.prototype.registerInterface=function(b){Sys.__upperCaseTypes[b.toUpperCase()]=this;this.prototype.constructor=this;this.__typeName=b;this.__interface=true;return this};Type.prototype.resolveInheritance=function(){if(this.__basePrototypePending){var d=this.__baseType;d.resolveInheritance();for(var f in d.prototype){var e=d.prototype[f];if(!this.prototype[f]){this.prototype[f]=e}}delete this.__basePrototypePending}};Type.getRootNamespaces=function(){return Array.clone(Sys.__rootNamespaces)};Type.isClass=function(b){if(typeof b==="undefined"||b===null){return false}return !!b.__class};Type.isInterface=function(b){if(typeof b==="undefined"||b===null){return false}return !!b.__interface};Type.isNamespace=function(b){if(typeof b==="undefined"||b===null){return false}return !!b.__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(o){var g=window,m=o.split(".");for(var l=0;l<m.length;l++){var k=m[l],n=g[k];if(!n){n=g[k]={__namespace:true,__typeName:m.slice(0,l+1).join(".")};if(l===0){Sys.__rootNamespaces[Sys.__rootNamespaces.length]=n}n.getName=function(){return this.__typeName}}g=n}};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(b){this._parts=typeof b!=="undefined"&&b!==null&&b!==""?[b.toString()]:[];this._value={};this._len=0};Sys.StringBuilder.prototype={append:function(b){this._parts[this._parts.length]=b},appendLine:function(b){this._parts[this._parts.length]=typeof b==="undefined"||b===null||b===""?"\r\n":b+"\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(k){k=k||"";var f=this._parts;if(this._len!==f.length){this._value={};this._len=f.length}var e=this._value;if(typeof e[k]==="undefined"){if(k!==""){for(var g=0;g<f.length;){if(typeof f[g]==="undefined"||f[g]===""||f[g]===null){f.splice(g,1)}else{g++}}}e[k]=this._parts.join(k)}return e[k]}};Sys.StringBuilder.registerClass("Sys.StringBuilder");if(!window.XMLHttpRequest){window.XMLHttpRequest=function(){var f=["Mxsml2.XMLHTTP.3.0","Msxml2.XMLHTTP"];for(var k=0,g=f.length;k<g;k++){try{return new ActiveXObject(f[k])}catch(e){}}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);if(navigator.userAgent.indexOf(" MSIE ")>-1){Sys.Browser.agent=Sys.Browser.InternetExplorer;Sys.Browser.version=parseFloat(navigator.userAgent.match(/MSIE (\d+\.\d+)/)[1]);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(" Safari/")>-1){Sys.Browser.agent=Sys.Browser.Safari;Sys.Browser.version=parseFloat(navigator.userAgent.match(/Safari\/(\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(b){if(typeof Debug!=="undefined"&&Debug.writeln){Debug.writeln(b)}if(window.console&&window.console.log){window.console.log(b)}if(window.opera){window.opera.postError(b)}if(window.debugService){window.debugService.trace(b)}},_appendTrace:function(c){var d=document.getElementById("TraceConsole");if(d&&d.tagName.toUpperCase()==="TEXTAREA"){d.value+=c+"\n"}},assert:function(e,f,d){if(!e){f=d&&this.assert.caller?String.format(Sys.Res.assertFailedCaller,f,this.assert.caller):String.format(Sys.Res.assertFailed,f);if(confirm(String.format(Sys.Res.breakIntoDebugger,f))){this.fail(f)}}},clearTrace:function(){var b=document.getElementById("TraceConsole");if(b&&b.tagName.toUpperCase()==="TEXTAREA"){b.value=""}},fail:function(message){this._appendConsole(message);if(Sys.Browser.hasDebuggerStatement){eval("debugger")}},trace:function(b){this._appendConsole(b);this._appendTrace(b)},traceDump:function(f,d){var e=this._traceDump(f,d,true)},_traceDump:function(v,u,z,s,B){u=u?u:"traceDump";s=s?s:"";if(v===null){this.trace(s+u+": null");return}switch(typeof v){case"undefined":this.trace(s+u+": Undefined");break;case"number":case"string":case"boolean":this.trace(s+u+": "+v);break;default:if(Date.isInstanceOfType(v)||RegExp.isInstanceOfType(v)){this.trace(s+u+": "+v.toString());break}if(!B){B=[]}else{if(Array.contains(B,v)){this.trace(s+u+": ...");return}}Array.add(B,v);if(v==window||v===document||window.HTMLElement&&v instanceof HTMLElement||typeof v.nodeName==="string"){var o=v.tagName?v.tagName:"DomElement";if(v.id){o+=" - "+v.id}this.trace(s+u+" {"+o+"}")}else{var q=Object.getTypeName(v);this.trace(s+u+(typeof q==="string"?" {"+q+"}":""));if(s===""||z){s+="    ";var m,n,r,A,p;if(Array.isInstanceOfType(v)){n=v.length;for(m=0;m<n;m++){this._traceDump(v[m],"["+m+"]",z,s,B)}}else{for(A in v){p=v[A];if(!Function.isInstanceOfType(p)){this._traceDump(p,A,z,s,B)}}}}}Array.remove(B,v)}}};Sys._Debug.registerClass("Sys._Debug");Sys.Debug=new Sys._Debug;Sys.Debug.isDebug=false;function Sys$Enum$parse(r,l){var s,q,p;if(l){s=this.__lowerCaseValues;if(!s){this.__lowerCaseValues=s={};var v=this.prototype;for(var u in v){s[u.toLowerCase()]=v[u]}}}else{s=this.prototype}if(!this.__flags){p=l?r.toLowerCase():r;q=s[p.trim()];if(typeof q!=="number"){throw Error.argument("value",String.format(Sys.Res.enumInvalidValue,r,this.__typeName))}return q}else{var o=(l?r.toLowerCase():r).split(","),m=0;for(var z=o.length-1;z>=0;z--){var n=o[z].trim();q=s[n];if(typeof q!=="number"){throw Error.argument("value",String.format(Sys.Res.enumInvalidValue,r.split(",")[z].trim(),this.__typeName))}m|=q}return m}}function Sys$Enum$toString(n){if(typeof n==="undefined"||n===null){return this.__string}var r=this.prototype,o;if(!this.__flags||n===0){for(o in r){if(r[o]===n){return o}}}else{var m=this.__sortedValues;if(!m){m=[];for(o in r){m[m.length]={key:o,value:r[o]}}m.sort(function(d,c){return d.value-c.value});this.__sortedValues=m}var k=[],q=n;for(o=m.length-1;o>=0;o--){var l=m[o],p=l.value;if(p===0){continue}if((p&n)===p){k[k.length]=l.key;q-=p;if(q===0){break}}}if(k.length&&q===0){return k.reverse().join(", ")}}return""}Type.prototype.registerEnum=function(d,e){Sys.__upperCaseTypes[d.toUpperCase()]=this;for(var f in this.prototype){this[f]=this.prototype[f]}this.__typeName=d;this.parse=Sys$Enum$parse;this.__string=this.toString();this.toString=Sys$Enum$toString;this.__flags=e;this.__enum=true};Type.isEnum=function(b){if(typeof b==="undefined"||b===null){return false}return !!b.__enum};Type.isFlags=function(b){if(typeof b==="undefined"||b===null){return false}return !!b.__flags};Sys.EventHandlerList=function(){this._list={}};Sys.EventHandlerList.prototype={addHandler:function(c,d){Array.add(this._getEvent(c,true),d)},removeHandler:function(e,d){var f=this._getEvent(e);if(!f){return}Array.remove(f,d)},getHandler:function(c){var d=this._getEvent(c);if(!d||d.length===0){return null}d=Array.clone(d);return function(k,a){for(var g=0,f=d.length;g<f;g++){d[g](k,a)}}},_getEvent:function(d,c){if(!this._list[d]){if(!c){return null}this._list[d]=[]}return this._list[d]}};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(b){this._cancel=b}};Sys.CancelEventArgs.registerClass("Sys.CancelEventArgs",Sys.EventArgs);Sys.INotifyPropertyChange=function(){};Sys.INotifyPropertyChange.prototype={};Sys.INotifyPropertyChange.registerInterface("Sys.INotifyPropertyChange");Sys.PropertyChangedEventArgs=function(b){Sys.PropertyChangedEventArgs.initializeBase(this);this._propertyName=b};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(b){this._id=b},get_isInitialized:function(){return this._initialized},get_isUpdating:function(){return this._updating},add_disposing:function(b){this.get_events().addHandler("disposing",b)},remove_disposing:function(b){this.get_events().removeHandler("disposing",b)},add_propertyChanged:function(b){this.get_events().addHandler("propertyChanged",b)},remove_propertyChanged:function(b){this.get_events().removeHandler("propertyChanged",b)},beginUpdate:function(){this._updating=true},dispose:function(){if(this._events){var b=this._events.getHandler("disposing");if(b){b(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(c){if(!this._events){return}var d=this._events.getHandler("propertyChanged");if(d){d(this,new Sys.PropertyChangedEventArgs(c))}},updated:function(){}};Sys.Component.registerClass("Sys.Component",null,Sys.IDisposable,Sys.INotifyPropertyChange,Sys.INotifyDisposing);function Sys$Component$_setProperties(C,s){var F,p=Object.getType(C),o=p===Object||p===Sys.UI.DomElement,r=Sys.Component.isInstanceOfType(C)&&!C.get_isUpdating();if(r){C.beginUpdate()}for(var B in s){var A=s[B],D=o?null:C["get_"+B];if(o||typeof D!=="function"){var q=C[B];if(!A||typeof A!=="object"||o&&!q){C[B]=A}else{Sys$Component$_setProperties(q,A)}}else{var v=C["set_"+B];if(typeof v==="function"){v.apply(C,[A])}else{if(A instanceof Array){F=D.apply(C);for(var E=0,z=F.length,u=A.length;E<u;E++,z++){F[z]=A[E]}}else{if(typeof A==="object"&&Object.getType(A)===Object){F=D.apply(C);Sys$Component$_setProperties(F,A)}}}}}if(r){C.endUpdate()}}function Sys$Component$_setReferences(l,k){for(var m in k){var g=l["set_"+m],f=$find(k[m]);g.apply(l,[f])}}var $create=Sys.Component.create=function(l,q,s,o,r){var p=r?new l(r):new l,n=Sys.Application,m=n.get_isCreatingComponents();p.beginUpdate();if(q){Sys$Component$_setProperties(p,q)}if(s){for(var k in s){p["add_"+k](s[k])}}if(p.get_id()){n.addComponent(p)}if(m){n._createdComponents[n._createdComponents.length]=p;if(o){n._addComponentToSecondPass(p,o)}else{p.endUpdate()}}else{if(o){Sys$Component$_setReferences(p,o)}p.endUpdate()}return p};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(d,c){this.x=d;this.y=c};Sys.UI.Point.registerClass("Sys.UI.Point");Sys.UI.Bounds=function(g,e,f,k){this.x=g;this.y=e;this.height=k;this.width=f};Sys.UI.Bounds.registerClass("Sys.UI.Bounds");Sys.UI.DomEvent=function(e){var k=e;this.rawEvent=k;this.altKey=k.altKey;if(typeof k.button!=="undefined"){this.button=typeof k.which!=="undefined"?k.button:k.button===4?Sys.UI.MouseButton.middleButton:k.button===2?Sys.UI.MouseButton.rightButton:Sys.UI.MouseButton.leftButton}if(k.type==="keypress"){this.charCode=k.charCode||k.keyCode}else{if(k.keyCode&&k.keyCode===46){this.keyCode=127}else{this.keyCode=k.keyCode}}this.clientX=k.clientX;this.clientY=k.clientY;this.ctrlKey=k.ctrlKey;this.target=k.target?k.target:k.srcElement;if(typeof k.offsetX!=="undefined"&&typeof k.offsetY!=="undefined"){this.offsetX=k.offsetX;this.offsetY=k.offsetY}else{if(this.target&&this.target.nodeType!==3&&typeof k.clientX==="number"){var f=Sys.UI.DomElement.getLocation(this.target),g=Sys.UI.DomElement._getWindow(this.target);this.offsetX=(g.pageXOffset||0)+k.clientX-f.x;this.offsetY=(g.pageYOffset||0)+k.clientY-f.y}}this.screenX=k.screenX;this.screenY=k.screenY;this.shiftKey=k.shiftKey;this.type=k.type};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(m,f,g){if(!m._events){m._events={}}var l=m._events[f];if(!l){m._events[f]=l=[]}var k;if(m.addEventListener){k=function(a){return g.call(m,new Sys.UI.DomEvent(a))};m.addEventListener(f,k,false)}else{if(m.attachEvent){k=function(){var a={};try{a=Sys.UI.DomElement._getWindow(m).event}catch(d){}return g.call(m,new Sys.UI.DomEvent(a))};m.attachEvent("on"+f,k)}}l[l.length]={handler:g,browserHandler:k}},$addHandlers=Sys.UI.DomEvent.addHandlers=function(g,f,l){for(var k in f){var m=f[k];if(l){m=Function.createDelegate(l,m)}$addHandler(g,k,m)}},$clearHandlers=Sys.UI.DomEvent.clearHandlers=function(m){if(m._events){var g=m._events;for(var k in g){var f=g[k];for(var l=f.length-1;l>=0;l--){$removeHandler(m,k,f[l].handler)}}m._events=null}},$removeHandler=Sys.UI.DomEvent.removeHandler=function(p,m,q){var l=null,o=p._events[m];for(var n=0,k=o.length;n<k;n++){if(o[n].handler===q){l=o[n].browserHandler;break}}if(p.removeEventListener){p.removeEventListener(m,l,false)}else{if(p.detachEvent){p.detachEvent("on"+m,l)}}o.splice(n,1)};Sys.UI.DomElement=function(){};Sys.UI.DomElement.registerClass("Sys.UI.DomElement");Sys.UI.DomElement.addCssClass=function(d,c){if(!Sys.UI.DomElement.containsCssClass(d,c)){if(d.className===""){d.className=c}else{d.className+=" "+c}}};Sys.UI.DomElement.containsCssClass=function(c,d){return Array.contains(c.className.split(" "),d)};Sys.UI.DomElement.getBounds=function(d){var c=Sys.UI.DomElement.getLocation(d);return new Sys.UI.Bounds(c.x,c.y,d.offsetWidth||0,d.offsetHeight||0)};var $get=Sys.UI.DomElement.getElementById=function(o,k){if(!k){return document.getElementById(o)}if(k.getElementById){return k.getElementById(o)}var m=[],g=k.childNodes;for(var l=0;l<g.length;l++){var n=g[l];if(n.nodeType==1){m[m.length]=n}}while(m.length){n=m.shift();if(n.id==o){return n}g=n.childNodes;for(l=0;l<g.length;l++){n=g[l];if(n.nodeType==1){m[m.length]=n}}}return null};switch(Sys.Browser.agent){case Sys.Browser.InternetExplorer:Sys.UI.DomElement.getLocation=function(o){if(o.self||o.nodeType===9){return new Sys.UI.Point(0,0)}var m=o.getBoundingClientRect();if(!m){return new Sys.UI.Point(0,0)}var r=o.ownerDocument.documentElement,k=m.left-2+r.scrollLeft,p=m.top-2+r.scrollTop;try{var n=o.ownerDocument.parentWindow.frameElement||null;if(n){var q=n.frameBorder==="0"||n.frameBorder==="no"?2:0;k+=q;p+=q}}catch(l){}return new Sys.UI.Point(k,p)};break;case Sys.Browser.Safari:Sys.UI.DomElement.getLocation=function(p){if(p.window&&p.window===p||p.nodeType===9){return new Sys.UI.Point(0,0)}var r=0,s=0,l=null,k=null,o;for(var q=p;q;l=q,(k=o,q=q.offsetParent)){o=Sys.UI.DomElement._getCurrentStyle(q);var u=q.tagName;if((q.offsetLeft||q.offsetTop)&&(u!=="BODY"||(!k||k.position!=="absolute"))){r+=q.offsetLeft;s+=q.offsetTop}}o=Sys.UI.DomElement._getCurrentStyle(p);var m=o?o.position:null;if(!m||m!=="absolute"){for(var q=p.parentNode;q;q=q.parentNode){u=q.tagName;if(u!=="BODY"&&u!=="HTML"&&(q.scrollLeft||q.scrollTop)){r-=q.scrollLeft||0;s-=q.scrollTop||0}o=Sys.UI.DomElement._getCurrentStyle(q);var n=o?o.position:null;if(n&&n==="absolute"){break}}}return new Sys.UI.Point(r,s)};break;case Sys.Browser.Opera:Sys.UI.DomElement.getLocation=function(n){if(n.window&&n.window===n||n.nodeType===9){return new Sys.UI.Point(0,0)}var s=0,k=0,m=null;for(var p=n;p;m=p,p=p.offsetParent){var q=p.tagName;s+=p.offsetLeft||0;k+=p.offsetTop||0}var r=n.style.position,o=r&&r!=="static";for(var p=n.parentNode;p;p=p.parentNode){q=p.tagName;if(q!=="BODY"&&q!=="HTML"&&(p.scrollLeft||p.scrollTop)&&(o&&(p.style.overflow==="scroll"||p.style.overflow==="auto"))){s-=p.scrollLeft||0;k-=p.scrollTop||0}var l=p&&p.style?p.style.position:null;o=o||l&&l!=="static"}return new Sys.UI.Point(s,k)};break;default:Sys.UI.DomElement.getLocation=function(s){if(s.window&&s.window===s||s.nodeType===9){return new Sys.UI.Point(0,0)}var k=0,q=0,m=null,r=null,n=null;for(var p=s;p;m=p,(r=n,p=p.offsetParent)){var o=p.tagName;n=Sys.UI.DomElement._getCurrentStyle(p);if((p.offsetLeft||p.offsetTop)&&!(o==="BODY"&&(!r||r.position!=="absolute"))){k+=p.offsetLeft;q+=p.offsetTop}if(m!==null&&n){if(o!=="TABLE"&&o!=="TD"&&o!=="HTML"){k+=parseInt(n.borderLeftWidth)||0;q+=parseInt(n.borderTopWidth)||0}if(o==="TABLE"&&(n.position==="relative"||n.position==="absolute")){k+=parseInt(n.marginLeft)||0;q+=parseInt(n.marginTop)||0}}}n=Sys.UI.DomElement._getCurrentStyle(s);var l=n?n.position:null;if(!l||l!=="absolute"){for(var p=s.parentNode;p;p=p.parentNode){o=p.tagName;if(o!=="BODY"&&o!=="HTML"&&(p.scrollLeft||p.scrollTop)){k-=p.scrollLeft||0;q-=p.scrollTop||0;n=Sys.UI.DomElement._getCurrentStyle(p);if(n){k+=parseInt(n.borderLeftWidth)||0;q+=parseInt(n.borderTopWidth)||0}}}}return new Sys.UI.Point(k,q)}}Sys.UI.DomElement.removeCssClass=function(e,g){var k=" "+e.className+" ",f=k.indexOf(" "+g+" ");if(f>=0){e.className=(k.substr(0,f)+" "+k.substring(f+g.length+1,k.length)).trim()}};Sys.UI.DomElement.setLocation=function(f,g,e){var k=f.style;k.position="absolute";k.left=g+"px";k.top=e+"px"};Sys.UI.DomElement.toggleCssClass=function(c,d){if(Sys.UI.DomElement.containsCssClass(c,d)){Sys.UI.DomElement.removeCssClass(c,d)}else{Sys.UI.DomElement.addCssClass(c,d)}};Sys.UI.DomElement.getVisibilityMode=function(b){return b._visibilityMode===Sys.UI.VisibilityMode.hide?Sys.UI.VisibilityMode.hide:Sys.UI.VisibilityMode.collapse};Sys.UI.DomElement.setVisibilityMode=function(d,c){Sys.UI.DomElement._ensureOldDisplayMode(d);if(d._visibilityMode!==c){d._visibilityMode=c;if(Sys.UI.DomElement.getVisible(d)===false){if(d._visibilityMode===Sys.UI.VisibilityMode.hide){d.style.display=d._oldDisplayMode}else{d.style.display="none"}}d._visibilityMode=c}};Sys.UI.DomElement.getVisible=function(c){var d=c.currentStyle||Sys.UI.DomElement._getCurrentStyle(c);if(!d){return true}return d.visibility!=="hidden"&&d.display!=="none"};Sys.UI.DomElement.setVisible=function(d,c){if(c!==Sys.UI.DomElement.getVisible(d)){Sys.UI.DomElement._ensureOldDisplayMode(d);d.style.visibility=c?"visible":"hidden";if(c||d._visibilityMode===Sys.UI.VisibilityMode.hide){d.style.display=d._oldDisplayMode}else{d.style.display="none"}}};Sys.UI.DomElement._ensureOldDisplayMode=function(d){if(!d._oldDisplayMode){var c=d.currentStyle||Sys.UI.DomElement._getCurrentStyle(d);d._oldDisplayMode=c?c.display:null;if(!d._oldDisplayMode||d._oldDisplayMode==="none"){switch(d.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":d._oldDisplayMode="block";break;case"LI":d._oldDisplayMode="list-item";break;default:d._oldDisplayMode="inline"}}}};Sys.UI.DomElement._getWindow=function(d){var c=d.ownerDocument||d.document||d;return c.defaultView||c.parentWindow};Sys.UI.DomElement._getCurrentStyle=function(p){if(p.nodeType===3){return null}var o=Sys.UI.DomElement._getWindow(p);if(p.documentElement){p=p.documentElement}var n=o&&p!==o&&o.getComputedStyle?o.getComputedStyle(p,null):p.currentStyle||p.style;if(!n&&Sys.Browser.agent===Sys.Browser.Safari&&p.style){var k=p.style.display,q=p.style.position;p.style.position="absolute";p.style.display="block";var m=o.getComputedStyle(p,null);p.style.display=k;p.style.position=q;n={};for(var l in m){n[l]=m[l]}n.display="none"}return n};Sys.IContainer=function(){};Sys.IContainer.prototype={};Sys.IContainer.registerInterface("Sys.IContainer");Sys._ScriptLoader=function(){this._scriptsToLoad=null;this._scriptLoadedDelegate=Function.createDelegate(this,this._scriptLoadedHandler)};Sys._ScriptLoader.prototype={dispose:function(){this._stopLoading();if(this._events){delete this._events}this._scriptLoadedDelegate=null},loadScripts:function(k,g,e,f){this._loading=true;this._allScriptsLoadedCallback=g;this._scriptLoadFailedCallback=e;this._scriptLoadTimeoutCallback=f;if(k>0){this._timeoutCookie=window.setTimeout(Function.createDelegate(this,this._scriptLoadTimeoutHandler),k*1000)}this._loadScriptsInternal()},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(b){if(!this._scriptsToLoad){this._scriptsToLoad=[]}Array.add(this._scriptsToLoad,b)},queueScriptBlock:function(b){if(!this._scriptsToLoad){this._scriptsToLoad=[]}Array.add(this._scriptsToLoad,{text:b})},queueScriptReference:function(b){if(!this._scriptsToLoad){this._scriptsToLoad=[]}Array.add(this._scriptsToLoad,{src:b})},_createScriptElement:function(e){var f=document.createElement("SCRIPT");f.type="text/javascript";for(var d in e){f[d]=e[d]}return f},_loadScriptsInternal:function(){if(this._scriptsToLoad&&this._scriptsToLoad.length>0){var f=Array.dequeue(this._scriptsToLoad),k=this._createScriptElement(f);if(k.text&&Sys.Browser.agent===Sys.Browser.Safari){k.innerHTML=k.text;delete k.text}if(typeof f.src==="string"){this._currentTask=new Sys._ScriptLoaderTask(k,this._scriptLoadedDelegate);this._currentTask.execute()}else{document.getElementsByTagName("HEAD")[0].appendChild(k);var e=this;window.setTimeout(function(){Sys._ScriptLoader._clearScript(k);e._loadScriptsInternal()},0)}}else{var g=this._allScriptsLoadedCallback;this._stopLoading();if(g){g(this)}}},_raiseError:function(f){var e=this._scriptLoadFailedCallback,d=this._currentTask.get_scriptElement();this._stopLoading();if(e){e(this,d,f)}else{throw Sys._ScriptLoader._errorScriptLoadFailed(d.src,f)}},_scriptLoadedHandler:function(d,c){if(c&&this._currentTask._notified){if(this._currentTask._notified>1){this._raiseError(true)}else{Array.add(Sys._ScriptLoader._getLoadedScripts(),d.src);this._currentTask.dispose();this._currentTask=null;this._loadScriptsInternal()}}else{this._raiseError(false)}},_scriptLoadTimeoutHandler:function(){var b=this._scriptLoadTimeoutCallback;this._stopLoading();if(b){b(this)}},_stopLoading:function(){if(this._timeoutCookie){window.clearTimeout(this._timeoutCookie);this._timeoutCookie=null}if(this._currentTask){this._currentTask.dispose();this._currentTask=null}this._scriptsToLoad=null;this._loading=null;this._allScriptsLoadedCallback=null;this._scriptLoadFailedCallback=null;this._scriptLoadTimeoutCallback=null}};Sys._ScriptLoader.registerClass("Sys._ScriptLoader",null,Sys.IDisposable);Sys._ScriptLoader.getInstance=function(){var b=Sys._ScriptLoader._activeInstance;if(!b){b=Sys._ScriptLoader._activeInstance=new Sys._ScriptLoader}return b};Sys._ScriptLoader.isScriptLoaded=function(c){var d=document.createElement("script");d.src=c;return Array.contains(Sys._ScriptLoader._getLoadedScripts(),d.src)};Sys._ScriptLoader.readLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts){var f=Sys._ScriptLoader._referencedScripts=[],g=document.getElementsByTagName("SCRIPT");for(i=g.length-1;i>=0;i--){var e=g[i],k=e.src;if(k.length){if(!Array.contains(f,k)){Array.add(f,k)}}}}};Sys._ScriptLoader._clearScript=function(b){if(!Sys.Debug.isDebug){b.parentNode.removeChild(b)}};Sys._ScriptLoader._errorScriptLoadFailed=function(k,f){var m;if(f){m=Sys.Res.scriptLoadMultipleCallbacks}else{m=Sys.Res.scriptLoadFailed}var g="Sys.ScriptLoadFailedException: "+String.format(m,k),l=Error.create(g,{name:"Sys.ScriptLoadFailedException",scriptUrl:k});l.popStackFrame();return l};Sys._ScriptLoader._getLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts){Sys._ScriptLoader._referencedScripts=[];Sys._ScriptLoader.readLoadedScripts()}return Sys._ScriptLoader._referencedScripts};Sys._ScriptLoaderTask=function(c,d){this._scriptElement=c;this._completedCallback=d;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 b=this.get_scriptElement();if(Sys.Browser.agent!==Sys.Browser.InternetExplorer){$removeHandler(b,"load",this._scriptLoadDelegate)}else{$removeHandler(b,"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 d=this.get_scriptElement();if(d.readyState!=="loaded"&&d.readyState!=="complete"){return}var c=this;window.setTimeout(function(){c._completedCallback(d,true)},0)}};Sys._ScriptLoaderTask.registerClass("Sys._ScriptLoaderTask",null,Sys.IDisposable);Sys.ApplicationLoadEventArgs=function(c,d){Sys.ApplicationLoadEventArgs.initializeBase(this);this._components=c;this._isPartialLoad=d};Sys.ApplicationLoadEventArgs.prototype={get_components:function(){return this._components},get_isPartialLoad:function(){return this._isPartialLoad}};Sys.ApplicationLoadEventArgs.registerClass("Sys.ApplicationLoadEventArgs",Sys.EventArgs);Sys._Application=function(){Sys._Application.initializeBase(this);this._disposableObjects=[];this._components={};this._createdComponents=[];this._secondPassComponents=[];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},add_load:function(b){this.get_events().addHandler("load",b)},remove_load:function(b){this.get_events().removeHandler("load",b)},add_init:function(b){if(this._initialized){b(this,Sys.EventArgs.Empty)}else{this.get_events().addHandler("init",b)}},remove_init:function(b){this.get_events().removeHandler("init",b)},add_unload:function(b){this.get_events().addHandler("unload",b)},remove_unload:function(b){this.get_events().removeHandler("unload",b)},addComponent:function(b){this._components[b.get_id()]=b},beginCreateComponents:function(){this._creatingComponents=true},dispose:function(){if(!this._disposing){this._disposing=true;if(window.pageUnload){window.pageUnload(this,Sys.EventArgs.Empty)}var l=this.get_events().getHandler("unload");if(l){l(this,Sys.EventArgs.Empty)}var k=Array.clone(this._disposableObjects);for(var m=0,g=k.length;m<g;m++){k[m].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 f=Sys._ScriptLoader.getInstance();if(f){f.dispose()}Sys._Application.callBaseMethod(this,"dispose")}},endCreateComponents:function(){var f=this._secondPassComponents;for(var k=0,e=f.length;k<e;k++){var g=f[k].component;Sys$Component$_setReferences(g,f[k].references);g.endUpdate()}this._secondPassComponents=[];this._creatingComponents=false},findComponent:function(c,d){return d?Sys.IContainer.isInstanceOfType(d)?d.findComponent(c):d[c]||null:Sys.Application._components[c]||null},getComponents:function(){var f=[],d=this._components;for(var e in d){f[f.length]=d[e]}return f},initialize:function(){if(!this._initialized&&!this._initializing){this._initializing=true;window.setTimeout(Function.createDelegate(this,this._doInitialize),0)}},notifyScriptLoaded:function(){var b=Sys._ScriptLoader.getInstance();if(b){b.notifyScriptLoaded()}},registerDisposableObject:function(b){if(!this._disposing){this._disposableObjects[this._disposableObjects.length]=b}},raiseLoad:function(){var c=this.get_events().getHandler("load"),d=new Sys.ApplicationLoadEventArgs(Array.clone(this._createdComponents),!this._initializing);if(c){c(this,d)}if(window.pageLoad){window.pageLoad(this,d)}this._createdComponents=[]},removeComponent:function(c){var d=c.get_id();if(d){delete this._components[d]}},unregisterDisposableObject:function(b){if(!this._disposing){Array.remove(this._disposableObjects,b)}},_addComponentToSecondPass:function(c,d){this._secondPassComponents[this._secondPassComponents.length]={component:c,references:d}},_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()}this.raiseLoad();this._initializing=false},_loadHandler:function(){if(this._loadHandlerDelegate){Sys.UI.DomEvent.removeHandler(window,"load",this._loadHandlerDelegate);this._loadHandlerDelegate=null}this.initialize()},_unloadHandler:function(){this.dispose()}};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(b){this._webRequest=b},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(l){if(!window.DOMParser){var o=["Msxml2.DOMDocument.3.0","Msxml2.DOMDocument"];for(var n=0,q=o.length;n<q;n++){try{var p=new ActiveXObject(o[n]);p.async=false;p.loadXML(l);p.setProperty("SelectionLanguage","XPath");return p}catch(k){}}}else{try{var m=new window.DOMParser;return m.parseFromString(l,"text/xml")}catch(k){}}return null};Sys.Net.XMLHttpExecutor=function(){Sys.Net.XMLHttpExecutor.initializeBase(this);var b=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(b._xmlHttpRequest.readyState===4){try{if(typeof b._xmlHttpRequest.status==="undefined"){return}}catch(a){return}b._clearTimer();b._responseAvailable=true;b._webRequest.completed(Sys.EventArgs.Empty);if(b._xmlHttpRequest!=null){b._xmlHttpRequest.onreadystatechange=Function.emptyMethod;b._xmlHttpRequest=null}}};this._clearTimer=function(){if(b._timer!=null){window.clearTimeout(b._timer);b._timer=null}};this._onTimeout=function(){if(!b._responseAvailable){b._clearTimer();b._timedOut=true;b._xmlHttpRequest.onreadystatechange=Function.emptyMethod;b._xmlHttpRequest.abort();b._webRequest.completed(Sys.EventArgs.Empty);b._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 m=this._webRequest.get_body(),n=this._webRequest.get_headers();this._xmlHttpRequest=new XMLHttpRequest;this._xmlHttpRequest.onreadystatechange=this._onReadyStateChange;var k=this._webRequest.get_httpVerb();this._xmlHttpRequest.open(k,this._webRequest.getResolvedUrl(),true);if(n){for(var l in n){var o=n[l];if(typeof o!=="function"){this._xmlHttpRequest.setRequestHeader(l,o)}}}if(k.toLowerCase()==="post"){if(n===null||!n["Content-Type"]){this._xmlHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8")}if(!m){m=""}}var g=this._webRequest.get_timeout();if(g>0){this._timer=window.setTimeout(Function.createDelegate(this,this._onTimeout),g)}this._xmlHttpRequest.send(m);this._started=true},getResponseHeader:function(d){var f;try{f=this._xmlHttpRequest.getResponseHeader(d)}catch(e){}if(!f){f=""}return f},getAllResponseHeaders:function(){return this._xmlHttpRequest.getAllResponseHeaders()},get_responseData:function(){return this._xmlHttpRequest.responseText},get_statusCode:function(){var d=0;try{d=this._xmlHttpRequest.status}catch(c){}return d},get_statusText:function(){return this._xmlHttpRequest.statusText},get_xml:function(){var b=this._xmlHttpRequest.responseXML;if(!b||!b.documentElement){b=Sys.Net.XMLDOM(this._xmlHttpRequest.responseText);if(!b||!b.documentElement){return null}}else{if(navigator.userAgent.indexOf("MSIE")!==-1){b.setProperty("SelectionLanguage","XPath")}}if(b.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml"&&b.documentElement.tagName==="parsererror"){return null}if(b.documentElement.firstChild&&b.documentElement.firstChild.tagName==="parsererror"){return null}return b},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._this=this;this._defaultTimeout=0;this._defaultExecutorType="Sys.Net.XMLHttpExecutor"};Sys.Net._WebRequestManager.prototype={add_invokingRequest:function(b){this._get_eventHandlerList().addHandler("invokingRequest",b)},remove_invokingRequest:function(b){this._get_eventHandlerList().removeHandler("invokingRequest",b)},add_completedRequest:function(b){this._get_eventHandlerList().addHandler("completedRequest",b)},remove_completedRequest:function(b){this._get_eventHandlerList().removeHandler("completedRequest",b)},_get_eventHandlerList:function(){if(!this._events){this._events=new Sys.EventHandlerList}return this._events},get_defaultTimeout:function(){return this._defaultTimeout},set_defaultTimeout:function(b){this._defaultTimeout=b},get_defaultExecutorType:function(){return this._defaultExecutorType},set_defaultExecutorType:function(b){this._defaultExecutorType=b},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(b){Sys.Net.NetworkRequestEventArgs.initializeBase(this);this._webRequest=b};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(b){this._get_eventHandlerList().addHandler("completed",b)},remove_completed:function(b){this._get_eventHandlerList().removeHandler("completed",b)},completed:function(c){var d=Sys.Net.WebRequestManager._get_eventHandlerList().getHandler("completedRequest");if(d){d(this._executor,c)}d=this._get_eventHandlerList().getHandler("completed");if(d){d(this._executor,c)}},_get_eventHandlerList:function(){if(!this._events){this._events=new Sys.EventHandlerList}return this._events},get_url:function(){return this._url},set_url:function(b){this._url=b},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(b){this._httpVerb=b},get_body:function(){return this._body},set_body:function(b){this._body=b},get_userContext:function(){return this._userContext},set_userContext:function(b){this._userContext=b},get_executor:function(){return this._executor},set_executor:function(b){this._executor=b;this._executor._set_webRequest(this)},get_timeout:function(){if(this._timeout===0){return Sys.Net.WebRequestManager.get_defaultTimeout()}return this._timeout},set_timeout:function(b){this._timeout=b},getResolvedUrl:function(){return Sys.Net.WebRequest._resolveUrl(this._url)},invoke:function(){Sys.Net.WebRequestManager.executeRequest(this);this._invokeCalled=true}};Sys.Net.WebRequest._resolveUrl=function(n,p){if(n&&n.indexOf("://")!==-1){return n}if(!p||p.length===0){var o=document.getElementsByTagName("base")[0];if(o&&o.href&&o.href.length>0){p=o.href}else{p=document.URL}}var l=p.indexOf("?");if(l!==-1){p=p.substr(0,l)}p=p.substr(0,p.lastIndexOf("/")+1);if(!n||n.length===0){return p}if(n.charAt(0)==="/"){var m=p.indexOf("://"),k=p.indexOf("/",m+3);return p.substr(0,k)+n}else{var q=p.lastIndexOf("/");return p.substr(0,q+1)+n}};Sys.Net.WebRequest._createQueryString=function(l,n){if(!n){n=encodeURIComponent}var p=new Sys.StringBuilder,q=0;for(var o in l){var m=l[o];if(typeof m==="function"){continue}var k=Sys.Serialization.JavaScriptSerializer.serialize(m);if(q!==0){p.append("&")}p.append(o);p.append("=");p.append(n(k));q++}return p.toString()};Sys.Net.WebRequest._createUrl=function(k,f){if(!f){return k}var e=Sys.Net.WebRequest._createQueryString(f);if(e.length>0){var g="?";if(k&&k.indexOf("?")!==-1){g="&"}return k+g+e}else{return k}};Sys.Net.WebRequest.registerClass("Sys.Net.WebRequest");Sys.Net.WebServiceProxy=function(){};Sys.Net.WebServiceProxy.prototype={get_timeout:function(){return this._timeout},set_timeout:function(b){if(b<0){throw Error.argumentOutOfRange("value",b,Sys.Res.invalidTimeout)}this._timeout=b},get_defaultUserContext:function(){return this._userContext},set_defaultUserContext:function(b){this._userContext=b},get_defaultSucceededCallback:function(){return this._succeeded},set_defaultSucceededCallback:function(b){this._succeeded=b},get_defaultFailedCallback:function(){return this._failed},set_defaultFailedCallback:function(b){this._failed=b},get_path:function(){return this._path},set_path:function(b){this._path=b},_invoke:function(l,m,k,q,o,n,p){if(o===null||typeof o==="undefined"){o=this.get_defaultSucceededCallback()}if(n===null||typeof n==="undefined"){n=this.get_defaultFailedCallback()}if(p===null||typeof p==="undefined"){p=this.get_defaultUserContext()}return Sys.Net.WebServiceProxy.invoke(l,m,k,q,o,n,p,this.get_timeout())}};Sys.Net.WebServiceProxy.registerClass("Sys.Net.WebServiceProxy");Sys.Net.WebServiceProxy.invoke=function(o,v,n,B,q,u,z,p){var s=new Sys.Net.WebRequest;s.get_headers()["Content-Type"]="application/json; charset=utf-8";if(!B){B={}}var A=B;if(!n||!A){A={}}s.set_url(Sys.Net.WebRequest._createUrl(o+"/"+encodeURIComponent(v),A));var m=null;if(!n){m=Sys.Serialization.JavaScriptSerializer.serialize(B);if(m==="{}"){m=""}}s.set_body(m);s.add_completed(r);if(p&&p>0){s.set_timeout(p)}s.invoke();function r(F){if(F.get_responseAvailable()){var E=F.get_statusCode(),D=null;try{var a=F.getResponseHeader("Content-Type");if(a.startsWith("application/json")){D=F.get_object()}else{if(a.startsWith("text/xml")){D=F.get_xml()}else{D=F.get_responseData()}}}catch(C){}var f=F.getResponseHeader("jsonerror"),l=f==="true";if(l){if(D){D=new Sys.Net.WebServiceError(false,D.Message,D.StackTrace,D.ExceptionType)}}else{if(a.startsWith("application/json")){D=D.d}}if(E<200||E>=300||l){if(u){if(!D||!l){D=new Sys.Net.WebServiceError(false,String.format(Sys.Res.webServiceFailedNoMsg,v),"","")}D._statusCode=E;u(D,z,v)}}else{if(q){q(D,z,v)}}}else{var c;if(F.get_timedOut()){c=String.format(Sys.Res.webServiceTimedOut,v)}else{c=String.format(Sys.Res.webServiceFailedNoMsg,v)}if(u){u(new Sys.Net.WebServiceError(F.get_timedOut(),c,"",""),z,v)}}}return s};Sys.Net.WebServiceProxy._generateTypedConstructor=function(b){return function(a){if(a){for(var d in a){this[d]=a[d]}}this.__type=b}};Sys.Net.WebServiceError=function(g,e,f,k){this._timedOut=g;this._message=e;this._stackTrace=f;this._exceptionType=k;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(b){this._defaultLoadCompletedCallback=b},get_defaultSaveCompletedCallback:function(){return this._defaultSaveCompletedCallback},set_defaultSaveCompletedCallback:function(b){this._defaultSaveCompletedCallback=b},get_path:function(){return this._path||""},load:function(m,g,k,o){var l,n;if(!m){n="GetAllPropertiesForCurrentUser";l={authenticatedUserOnly:false}}else{n="GetPropertiesForCurrentUser";l={properties:this._clonePropertyNames(m),authenticatedUserOnly:false}}this._invoke(this._get_path(),n,false,l,Function.createDelegate(this,this._onLoadComplete),Function.createDelegate(this,this._onLoadFailed),[g,k,o])},save:function(f,k,l,g){var m=this._flattenProperties(f,this.properties);this._invoke(this._get_path(),"SetPropertiesForCurrentUser",false,{values:m.value,authenticatedUserOnly:false},Function.createDelegate(this,this._onSaveComplete),Function.createDelegate(this,this._onSaveFailed),[k,l,g,m.count])},_clonePropertyNames:function(g){var l=[],f={};for(var k=0;k<g.length;k++){var m=g[k];if(!f[m]){Array.add(l,m);f[m]=true}}return l},_flattenProperties:function(v,q,n){var s={},m,B,A=0;if(v&&v.length===0){return{value:s,count:0}}for(var u in q){m=q[u];B=n?n+"."+u:u;if(Sys.Services.ProfileGroup.isInstanceOfType(m)){var o=this._flattenProperties(v,m,B),p=o.value;A+=o.count;for(var z in p){var r=p[z];s[z]=r}}else{if(!v||Array.indexOf(v,B)!==-1){s[B]=m;A++}}}return{value:s,count:A}},_get_path:function(){var b=this.get_path();if(!b.length){b=Sys.Services._ProfileService.DefaultWebServicePath}if(!b||!b.length){throw Error.invalidOperation(Sys.Res.servicePathNotSet)}return b},_onLoadComplete:function(p,m,k){if(typeof p!=="object"){throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,k,"Object"))}var o=this._unflattenProperties(p);for(var n in o){this.properties[n]=o[n]}var l=m[0]||this.get_defaultLoadCompletedCallback()||this.get_defaultSucceededCallback();if(l){var q=m[2]||this.get_defaultUserContext();l(p.length,q,"Sys.Services.ProfileService.load")}},_onLoadFailed:function(e,f){var k=f[1]||this.get_defaultFailedCallback();if(k){var g=f[2]||this.get_defaultUserContext();k(e,g,"Sys.Services.ProfileService.load")}},_onSaveComplete:function(n,l,o){var m=l[3];if(n!==null){if(n instanceof Array){m-=n.length}else{if(typeof n==="number"){m=n}else{throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,o,"Array"))}}}var g=l[0]||this.get_defaultSaveCompletedCallback()||this.get_defaultSucceededCallback();if(g){var k=l[2]||this.get_defaultUserContext();g(m,k,"Sys.Services.ProfileService.save")}},_onSaveFailed:function(e,f){var k=f[1]||this.get_defaultFailedCallback();if(k){var g=f[2]||this.get_defaultUserContext();k(e,g,"Sys.Services.ProfileService.save")}},_unflattenProperties:function(k){var n={},r,p,l=0;for(var o in k){l++;p=k[o];r=o.indexOf(".");if(r!==-1){var q=o.substr(0,r);o=o.substr(r+1);var m=n[q];if(!m||!Sys.Services.ProfileGroup.isInstanceOfType(m)){m=new Sys.Services.ProfileGroup;n[q]=m}m[o]=p}else{n[o]=p}}k.length=l;return n}};Sys.Services._ProfileService.registerClass("Sys.Services._ProfileService",Sys.Net.WebServiceProxy);Sys.Services.ProfileService=new Sys.Services._ProfileService;Sys.Services.ProfileGroup=function(d){if(d){for(var c in d){this[c]=d[c]}}};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(b){this._defaultLoginCompletedCallback=b},get_defaultLogoutCompletedCallback:function(){return this._defaultLogoutCompletedCallback},set_defaultLogoutCompletedCallback:function(b){this._defaultLogoutCompletedCallback=b},get_isLoggedIn:function(){return this._authenticated},get_path:function(){return this._path||""},login:function(n,m,o,l,p,r,k,q){this._invoke(this._get_path(),"Login",false,{userName:n,password:m,createPersistentCookie:o},Function.createDelegate(this,this._onLoginComplete),Function.createDelegate(this,this._onLoginFailed),[n,m,o,l,p,r,k,q])},logout:function(g,k,f,e){this._invoke(this._get_path(),"Logout",false,{},Function.createDelegate(this,this._onLogoutComplete),Function.createDelegate(this,this._onLogoutFailed),[g,k,f,e])},_get_path:function(){var b=this.get_path();if(!b.length){b=Sys.Services._AuthenticationService.DefaultWebServicePath}if(!b||!b.length){throw Error.invalidOperation(Sys.Res.servicePathNotSet)}return b},_onLoginComplete:function(k,m,o){if(typeof k!=="boolean"){throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,o,"Boolean"))}var l=m[4],g=m[7]||this.get_defaultUserContext(),n=m[5]||this.get_defaultLoginCompletedCallback()||this.get_defaultSucceededCallback();if(k){this._authenticated=true;if(n){n(true,g,"Sys.Services.AuthenticationService.login")}if(typeof l!=="undefined"&&l!==null){window.location.href=l}}else{if(n){n(false,g,"Sys.Services.AuthenticationService.login")}}},_onLoginFailed:function(e,f){var k=f[6]||this.get_defaultFailedCallback();if(k){var g=f[7]||this.get_defaultUserContext();k(e,g,"Sys.Services.AuthenticationService.login")}},_onLogoutComplete:function(o,n,k){if(o!==null){throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,k,"null"))}var l=n[0],g=n[3]||this.get_defaultUserContext(),m=n[1]||this.get_defaultLogoutCompletedCallback()||this.get_defaultSucceededCallback();this._authenticated=false;if(m){m(null,g,"Sys.Services.AuthenticationService.logout")}if(!l){window.location.reload()}else{window.location.href=l}},_onLogoutFailed:function(e,d){var f=d[2]||this.get_defaultFailedCallback();if(f){f(e,d[3],"Sys.Services.AuthenticationService.logout")}},_setAuthenticated:function(b){this._authenticated=b}};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(b){this._defaultLoadCompletedCallback=b},get_path:function(){return this._path||""},get_roles:function(){return Array.clone(this._roles)},isUserInRole:function(d){var c=this._get_rolesIndex()[d.trim().toLowerCase()];return !!c},load:function(f,d,e){Sys.Net.WebServiceProxy.invoke(this._get_path(),"GetRolesForCurrentUser",false,{},Function.createDelegate(this,this._onLoadComplete),Function.createDelegate(this,this._onLoadFailed),[f,d,e],this.get_timeout())},_get_path:function(){var b=this.get_path();if(!b||!b.length){b=Sys.Services._RoleService.DefaultWebServicePath}if(!b||!b.length){throw Error.invalidOperation(Sys.Res.servicePathNotSet)}return b},_get_rolesIndex:function(){if(!this._rolesIndex){var c={};for(var d=0;d<this._roles.length;d++){c[this._roles[d].toLowerCase()]=true}this._rolesIndex=c}return this._rolesIndex},_onLoadComplete:function(n,m,o){if(n&&!(n instanceof Array)){throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,o,"Array"))}this._roles=n;this._rolesIndex=null;var l=m[0]||this.get_defaultLoadCompletedCallback()||this.get_defaultSucceededCallback();if(l){var k=m[2]||this.get_defaultUserContext(),g=Array.clone(n);l(g,k,"Sys.Services.RoleService.load")}},_onLoadFailed:function(e,f){var k=f[1]||this.get_defaultFailedCallback();if(k){var g=f[2]||this.get_defaultUserContext();k(e,g,"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._serverTypeFieldName="__type";Sys.Serialization.JavaScriptSerializer._stringRegEx=new RegExp('["\\b\\f\\n\\r\\t\\\\\\x00-\\x1F]',"i");Sys.Serialization.JavaScriptSerializer._dateRegEx=new RegExp('(^|[^\\\\])\\"\\\\/Date\\((-?[0-9]+)(?:[a-zA-Z]|(?:\\+|-)[0-9]{4})?\\)\\\\/\\"',"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._serializeBooleanWithBuilder=function(c,d){d.append(c.toString())};Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder=function(d,c){if(isFinite(d)){c.append(String(d))}else{throw Error.invalidOperation(Sys.Res.cannotSerializeNonFiniteNumbers)}};Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder=function(g,k){k.append('"');if(Sys.Serialization.JavaScriptSerializer._stringRegEx.test(g)){var e=g.length;for(i=0;i<e;++i){var f=g.charAt(i);if(f>=" "){if(f==="\\"||f==='"'){k.append("\\")}k.append(f)}else{switch(f){case"\b":k.append("\\b");break;case"\f":k.append("\\f");break;case"\n":k.append("\\n");break;case"\r":k.append("\\r");break;case"\t":k.append("\\t");break;default:k.append("\\u00");if(f.charCodeAt()<16){k.append("0")}k.append(f.charCodeAt().toString(16))}}}}else{k.append(g)}k.append('"')};Sys.Serialization.JavaScriptSerializer._serializeWithBuilder=function(o,q,n,s){var p;switch(typeof o){case"object":if(o){if(Number.isInstanceOfType(o)){Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder(o,q)}else{if(Boolean.isInstanceOfType(o)){Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder(o,q)}else{if(String.isInstanceOfType(o)){Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder(o,q)}else{if(Array.isInstanceOfType(o)){q.append("[");for(p=0;p<o.length;++p){if(p>0){q.append(",")}Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(o[p],q,false,s)}q.append("]")}else{if(Date.isInstanceOfType(o)){q.append('"\\/Date(');q.append(o.getTime());q.append(')\\/"');break}var u=[],r=0;for(var k in o){if(k.startsWith("$")){continue}if(k===Sys.Serialization.JavaScriptSerializer._serverTypeFieldName&&r!==0){u[r++]=u[0];u[0]=k}else{u[r++]=k}}if(n){u.sort()}q.append("{");var l=false;for(p=0;p<r;p++){var m=o[u[p]];if(typeof m!=="undefined"&&typeof m!=="function"){if(l){q.append(",")}else{l=true}Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(u[p],q,n,s);q.append(":");Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(m,q,n,s)}}q.append("}")}}}}}else{q.append("null")}break;case"number":Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder(o,q);break;case"string":Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder(o,q);break;case"boolean":Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder(o,q);break;default:q.append("null")}};Sys.Serialization.JavaScriptSerializer.serialize=function(c){var d=new Sys.StringBuilder;Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(c,d,false);return d.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(e,d,f){this.name=e;this.numberFormat=d;this.dateTimeFormat=f};Sys.CultureInfo.prototype={_getDateTimeFormats:function(){if(!this._dateTimeFormats){var b=this.dateTimeFormat;this._dateTimeFormats=[b.MonthDayPattern,b.YearMonthPattern,b.ShortDatePattern,b.ShortTimePattern,b.LongDatePattern,b.LongTimePattern,b.FullDateTimePattern,b.RFC1123Pattern,b.SortableDateTimePattern,b.UniversalSortableDateTimePattern]}return this._dateTimeFormats},_getMonthIndex:function(b){if(!this._upperMonths){this._upperMonths=this._toUpperArray(this.dateTimeFormat.MonthNames)}return Array.indexOf(this._upperMonths,this._toUpper(b))},_getAbbrMonthIndex:function(b){if(!this._upperAbbrMonths){this._upperAbbrMonths=this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames)}return Array.indexOf(this._upperAbbrMonths,this._toUpper(b))},_getDayIndex:function(b){if(!this._upperDays){this._upperDays=this._toUpperArray(this.dateTimeFormat.DayNames)}return Array.indexOf(this._upperDays,this._toUpper(b))},_getAbbrDayIndex:function(b){if(!this._upperAbbrDays){this._upperAbbrDays=this._toUpperArray(this.dateTimeFormat.AbbreviatedDayNames)}return Array.indexOf(this._upperAbbrDays,this._toUpper(b))},_toUpperArray:function(g){var f=[];for(var k=0,e=g.length;k<e;k++){f[k]=this._toUpper(g[k])}return f},_toUpper:function(b){return b.split("\u00a0").join(" ").toUpperCase()}};Sys.CultureInfo._parse=function(c){var d=Sys.Serialization.JavaScriptSerializer.deserialize(c);return new Sys.CultureInfo(d.name,d.numberFormat,d.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(c){Sys.UI.Behavior.initializeBase(this);this._element=c;var d=c._behaviors;if(!d){c._behaviors=[this]}else{d[d.length]=this}};Sys.UI.Behavior.prototype={_name:null,get_element:function(){return this._element},get_id:function(){var b=Sys.UI.Behavior.callBaseMethod(this,"get_id");if(b){return b}if(!this._element||!this._element.id){return""}return this._element.id+"$"+this.get_name()},get_name:function(){if(this._name){return this._name}var d=Object.getTypeName(this),c=d.lastIndexOf(".");if(c!=-1){d=d.substr(c+1)}if(!this.get_isInitialized()){this._name=d}return d},set_name:function(b){this._name=b},initialize:function(){Sys.UI.Behavior.callBaseMethod(this,"initialize");var b=this.get_name();if(b){this._element[b]=this}},dispose:function(){Sys.UI.Behavior.callBaseMethod(this,"dispose");if(this._element){var b=this.get_name();if(b){this._element[b]=null}Array.remove(this._element._behaviors,this);delete this._element}}};Sys.UI.Behavior.registerClass("Sys.UI.Behavior",Sys.Component);Sys.UI.Behavior.getBehaviorByName=function(d,e){var f=d[e];return f&&Sys.UI.Behavior.isInstanceOfType(f)?f:null};Sys.UI.Behavior.getBehaviors=function(b){if(!b._behaviors){return[]}return Array.clone(b._behaviors)};Sys.UI.Behavior.getBehaviorsByType=function(g,k){var n=g._behaviors,m=[];if(n){for(var l=0,o=n.length;l<o;l++){if(k.isInstanceOfType(n[l])){m[m.length]=n[l]}}}return m};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(b){Sys.UI.Control.initializeBase(this);this._element=b;b.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 b=this._element.parentNode;while(b){if(b.control){return b.control}b=b.parentNode}return null},set_parent:function(b){this._parent=b},get_visibilityMode:function(){return Sys.UI.DomElement.getVisibilityMode(this._element)},set_visibilityMode:function(b){Sys.UI.DomElement.setVisibilityMode(this._element,b)},get_visible:function(){return Sys.UI.DomElement.getVisible(this._element)},set_visible:function(b){Sys.UI.DomElement.setVisible(this._element,b)},addCssClass:function(b){Sys.UI.DomElement.addCssClass(this._element,b)},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(d,e){var f=this.get_parent();while(f){if(f.onBubbleEvent(d,e)){return}f=f.get_parent()}},removeCssClass:function(b){Sys.UI.DomElement.removeCssClass(this._element,b)},toggleCssClass:function(b){Sys.UI.DomElement.toggleCssClass(this._element,b)}};Sys.UI.Control.registerClass("Sys.UI.Control",Sys.Component);Type.registerNamespace("Sys");Sys.Res={argumentInteger:"Value must be an integer.",scriptLoadMultipleCallbacks:"The script '{0}' contains multiple calls to Sys.Application.notifyScriptLoaded(). Only one is allowed.",invokeCalledTwice:"Cannot call invoke more than once.",webServiceFailed:"The server method '{0}' failed with the following error: {1}",webServiceInvalidJsonWrapper:"The server method '{0}' returned invalid data. The 'd' 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't be set on a control.",formatBadFormatSpecifier:"Format specifier was invalid.",webServiceFailedNoMsg:"The server method '{0}' 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:"'{0}' is not a valid value for enum {1}.",scriptLoadFailed:"The script '{0}' 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 '{0}' returned an invalid type. Expected type: {1}",servicePathNotSet:"The path to the web service has not been set.",argumentTypeWithTypes:"Object of type '{0}' cannot be converted to type '{1}'.",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 '{0}' 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?"};if(typeof(Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()}}Type.registerNamespace("TripzoomLib");TripzoomLib._Constants=function(){};TripzoomLib._Constants.prototype={USERID:"53ce8d09-337d-45a1-be55-570a9832c840",COPYRIGHT:"&copy; Locatienet, PTV, NAVTEQ",COPYRIGHT_EUROSENSE:"&copy; Locatienet, PTV, NAVTEQ, Eurosense DKLN-2006",MAP_PROFILE:"",LANGUAGE:"fr",MIN_SCALE:100,MAX_SCALE:1000000,TILE_SIZE:256,IMAGE_URL:"http://www.routenet.nl/images/",BASE_URL:"http://dev.routenet.nl/",STATIC_URL:"http://static.routenet.eu/",EXTERN_URL:"",USE_STATIC_SERVER:true,NAVIGATIONTOOL:31,DEBUG:false,TRACE:false,TRACEALERT:false};TripzoomLib.Constants=new TripzoomLib._Constants();Type.registerNamespace("TripzoomLib.Resources");TripzoomLib.Resources._Resource=function(){};TripzoomLib.Resources._Resource.prototype={zoom_out:"Zoom arrière",zoom_in:"Zoom avant",zoom_in_to_expand:"{0} sites trouvés. Zoom avant pour répandre",zoom:"Zoom arrière/avant",country:"",province:"",region:"",city:"Ville",neighbourhood:"",block:"",street:"",overviewmap:"Vue générale",pan:"Glisser la carte",map:"Carte",show_map:"Visualiser",hybrid:"Hybrid",aerophoto:"Aerophoto",next:"suivant",previous:"précédent",help:"Aide",show_address_info:"Afficher l'adresse",info:"info"};TripzoomLib.Resources.Resource=new TripzoomLib.Resources._Resource();internalMoveAnimatorObj=null;cMoveAnimator=function(b){this._elem=b;this._steptime=100;this._stepcount=5;this._startpos=null;this._stoppos=null;this._type="";internalMoveAnimatorObj=this};cMoveAnimator.prototype={dispose:function(){},MoveIn:function(){this._type="movein";this.Run()},MoveOut:function(){this._type="moveout";this.Run()},Run:function(f,d,e){switch(this._type){case"movein":if(arguments.length==0){f=1;this._elem.style.left=this._startpos.x+"px";this._elem.style.top=this._startpos.y+"px";this._elem.style.display="block";d=(this._stoppos.x-this._startpos.x)/this._stepcount;e=(this._stoppos.y-this._startpos.y)/this._stepcount}else{this._elem.style.left=(parseInt(this._elem.style.left)+d)+"px";this._elem.style.top=(parseInt(this._elem.style.top)+e)+"px";f++}if(f<this._stepcount){window.setTimeout("internalMoveAnimatorObj.Run("+f+","+d+","+e+")",this._steptime)}break;case"moveout":if(arguments.length==0){f=1;this._elem.style.left=this._stoppos.x+"px";this._elem.style.top=this._stoppos.y+"px";this._elem.style.display="block";d=(this._startpos.x-this._stoppos.x)/this._stepcount;e=(this._startpos.y-this._stoppos.y)/this._stepcount}else{this._elem.style.left=(parseInt(this._elem.style.left)+d)+"px";this._elem.style.top=(parseInt(this._elem.style.top)+e)+"px";f++}if(f<this._stepcount){window.setTimeout("internalMoveAnimatorObj.Run("+f+","+d+","+e+")",this._steptime)}else{this._elem.style.filter="";this._elem.style.opacity=0;this._elem.style.display="none"}break}Trace(this._elem.style.left+" , "+this._elem.style.top)},set_stepcount:function(b){this._stepcount=b},set_steptime:function(b){this._steptime=b},set_startpos:function(b){this._startpos=b},set_stoppos:function(b){this._stoppos=b}};internalFadeAnimatorObj=null;cFadeAnimator=function(d,c){this.elem=d;this.maxopacity=c||80;this.steptime=100;this.stepcount=5;this.type="";internalFadeAnimatorObj=this};cFadeAnimator.prototype={dispose:function(){},FadeIn:function(){this.type="fadein";this.Run()},FadeOut:function(){this.type="fadeout";this.Run()},Run:function(){switch(this.type){case"fadein":step=0;if(arguments.length==0){step=1;this.elem.style.display="block"}else{step=arguments[0]+1}if(Sys.Browser.agent==Sys.Browser.InternetExplorer){this.elem.style.filter="Alpha(Opacity="+Math.round(this.maxopacity*(step)/this.stepcount)+")"}else{this.elem.style.opacity=Math.round(this.maxopacity*(step)/this.stepcount)/100}if(step<this.stepcount){window.setTimeout("internalFadeAnimatorObj.Run("+step+")",this.steptime)}else{this.elem.style.filter="";this.elem.style.opacity=100}break;case"fadeout":step=(arguments.length==0)?1:arguments[0]+1;if(Sys.Browser.agent==Sys.Browser.InternetExplorer){this.elem.style.filter="Alpha(Opacity="+Math.round(100*(this.stepcount-step)/this.stepcount)+")"}else{this.elem.style.opacity=Math.round(100*(this.stepcount-step)/this.stepcount)/100}if(step<this.stepcount){window.setTimeout("internalFadeAnimatorObj.Run("+step+")",this.steptime)}else{this.elem.style.filter="";this.elem.style.opacity=0;this.elem.style.display="none"}break}}};internalSlideAnimator=null;cSlideAnimator=function(b){this.elem=b;this.steptime=100;this.stepcount=5;internalSlideAnimator=this};cSlideAnimator.prototype={dispose:function(){},Vertical:function(c,d){this.Run(c,d)},Run:function(){starttop=arguments[0];stoptop=arguments[1];step=0;if(arguments.length==2){step=1}else{step=arguments[2]+1}this.elem.style.top=(starttop+Math.round((stoptop-starttop)*step/this.stepcount))+"px";if(step<this.stepcount){debug.write((starttop+Math.round((stoptop-starttop)*step/this.stepcount))+"px");window.setTimeout("internalSlideAnimator.Run("+starttop+","+stoptop+","+step+")",this.steptime)}}};var _Map=null;Trace=function(c,d){if(TripzoomLib.Constants.TRACE){traceStr=c;if(d){traceStr+=" :\n"+d}if(TripzoomLib.Constants.TRACEALERT){alert(traceStr)}Sys.Debug.trace(traceStr)}};TraceDump=function(f,e){if(TripzoomLib.Constants.TRACE){var d=(e)?e+" : \n":"";traceStr=d+=Object.getType(f).getName();if(TripzoomLib.Constants.TRACEALERT){alert(traceStr)}if(e){Sys.Debug.trace(e)}Sys.Debug.traceDump(f)}};Serialize=function(b){return Sys.Serialization.JavaScriptSerializer.serialize(b)};var timeA=null;StartTimer=function(){timeA=new Date()};StopTimer=function(){var b=new Date();return(b-timeA)};Type.registerNamespace("TripzoomLib");TripzoomLib.MapAction=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};TripzoomLib.MapAction.prototype={NONE:0,ZOOMING:1,MOVING:2,EDITING:4};TripzoomLib.MapAction.registerEnum("TripzoomLib.MapAction");TripzoomLib.Unit=function(){};TripzoomLib.Unit.prototype={GEO:0,PIXEL:1};TripzoomLib.Unit.registerEnum("TripzoomLib.Unit");TripzoomLib.Toolbar=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};TripzoomLib.Toolbar.prototype={Navigate:0,Maptype:1,Overview:2};TripzoomLib.Toolbar.registerEnum("TripzoomLib.Toolbar");TripzoomLib.NavigationTool=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};TripzoomLib.NavigationTool.prototype={None:0,ZoomOut:1,ZoomIn:2,ScaleBar:4,Panning:8,Zooming:16,Edit:32};TripzoomLib.NavigationTool.registerEnum("TripzoomLib.NavigationTool");TripzoomLib.MapViewMode=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};TripzoomLib.MapViewMode.prototype={MAP:0,AERIAL:1,HYBRID:2};TripzoomLib.MapViewMode.registerEnum("TripzoomLib.MapViewMode");TripzoomLib.NavigationMode=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};TripzoomLib.NavigationMode.prototype={NONE:0,ZOOMING:1,MOVING:2,EDITING:3};TripzoomLib.NavigationMode.registerEnum("TripzoomLib.NavigationMode");TripzoomLib.NavigationAction=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};TripzoomLib.NavigationAction.prototype={NONE:0,ZOOMIN:1,ZOOMOUT:2,SCALEBAR_1:3,SCALEBAR_2:4,SCALEBAR_3:5,SCALEBAR_4:6,SCALEBAR_5:7,SCALEBAR_6:8,SCALEBAR_7:9,NAVMODE_ZOOM:10,NAVMODE_MOVE:11,NAVMODE_EDIT:12,OVERVIEW:13,LAYERS:14,VIEWMODE_MAP:15,VIEWMODE_SAT:16,VIEWMODE_HYB:17};TripzoomLib.NavigationAction.registerEnum("TripzoomLib.NavigationAction");function showMapSpinner(b){_Map.get_spinner().set_visible(b)}var stepTotal=10;var timerID=null;function showTooltip(c){obj=_Map._tooltiplayer;obj.style.display="block";textObj=$get("tooltiptextDIV");textObj.innerHTML=c;var d=new cSlideAnimator(obj);d.Vertical(-45,0);timerID=setTimeout("hideTooltip()",4000)}function hideTooltip(){obj=_Map._tooltiplayer;var b=new cSlideAnimator(obj);b.Vertical(0,-45)}Type.registerNamespace("TripzoomLib.Utils");TripzoomLib.Utils.lastSeqID=0;TripzoomLib.Utils.createUniqueID=function(b){if(b==null){b="id_"}TripzoomLib.Utils.lastSeqID+=1;return b+TripzoomLib.Utils.lastSeqID};TripzoomLib.Utils.Distance=function(g,k,e,f){dx=g-k;dy=e-f;return Math.sqrt(dx*dx+dy*dy)};TripzoomLib.Utils.ZoomToScale=function(b){found=false;prevt=t=1;scale=TripzoomLib.Constants.MIN_SCALE;dif=Math.abs(b-scale);while(!found){prevt=t;scale=TripzoomLib.Constants.MIN_SCALE*Math.pow(2,t);if(dif>=Math.abs(b-scale)){t++}dif=Math.abs(b-scale);if(prevt==t){found=true}}scale=TripzoomLib.Constants.MIN_SCALE*Math.pow(2,prevt-1);return scale};TripzoomLib.Utils.getScrollXY=function(){var d=0,c=0;if(typeof(window.pageYOffset)=="number"){c=window.pageYOffset;d=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){c=document.body.scrollTop;d=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){c=document.documentElement.scrollTop;d=document.documentElement.scrollLeft}}}return[d,c]};TripzoomLib.Utils.isArray=function(b){return b.constructor==Array};Type.registerNamespace("TripzoomLib.Collections");TripzoomLib.Collections.Collection=function(){TripzoomLib.Collections.Collection.initializeBase(this)};TripzoomLib.Collections.Collection.prototype={items:[],lsize:0,initialize:function(){TripzoomLib.Collections.Collection.callBaseMethod(this,"initialize")},add:function(b){if(b==null){return}this.lsize++;this.items[(this.lsize-1)]=b},remove:function(c){if(c<0||c>this.items.length-1){return}this.items[c]=null;for(var d=c;d<=this.lsize;d++){this.items[d]=this.items[d+1]}this.lsize--},size:function(){return this.lsize},clear:function(){for(var b=0;b<this.lsize;b++){this.items[b]=null}this.lsize=0},clone:function(){var c=new TripzoomLib.Collections.Collection();for(var d=0;d<this.lsize;d++){c.add(this.items[d])}return c}};TripzoomLib.Collections.Collection.registerClass("TripzoomLib.Collections.Collection",Sys.Component);Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.Element");TripzoomLib.Element.Address=function(b){TripzoomLib.Element.Address.initializeBase(this);this.XCoord=0;this.YCoord=0;this.Name="";this.Street="";this.HouseNr="";this.Postcode="";this.City="";this.District="";this.Country="";this.DetailLevel=9;this.LinkType="";this._address=b;if(this._address){this._update()}};TripzoomLib.Element.Address.prototype={initialize:function(){TripzoomLib.Element.Address.callBaseMethod(this,"initialize")},dispose:function(){TripzoomLib.Element.Address.callBaseMethod(this,"dispose")},set_address:function(b){if(this._address!=b){this._address=b;this._update()}},set_xcoord:function(b){this.XCoord=b},get_xcoord:function(){return this.XCoord},set_ycoord:function(b){this.YCoord=b},get_ycoord:function(){return this.YCoord},set_street:function(b){this.Street=b},get_street:function(){return this.Street},set_postcode:function(b){this.Postcode=b},get_postcode:function(){return this.Postcode},set_city:function(b){this.City=b},get_city:function(){return this.City},set_country:function(b){this.Country=b},get_country:function(){return this.Country},get_address:function(){return this.XCoord+"_"+this.YCoord+"_"+this.Street+"_"+this.HouseNr+"_"+this.Postcode+"_"+this.City+"_"+this.District+"_"+this.Country+"_"+this.DetailLevel+"_"+this.Name},toString:function(){return this.get_address()},_update:function(){var d=this._address.split("#");var c=d[0].split("_");this.XCoord=parseFloat(c[0]);this.YCoord=parseFloat(c[1]);this.Street=c[2];this.HouseNr=c[3];this.Postcode=c[4];this.City=c[5];this.District=c[6];this.Country=c[7];if(c.length>8){this.DetailLevel=c[8]}if(c.length>9){this.Name=c[9]}if(d.length>1){this.LinkType=d[1]}},Description:function(){return this.Name+", "+this.Street+" "+this.HouseNr+" "+this.City+" ("+this.Country+", "+this.Postcode+")"},ShortDescription:function(){return this.Name+", "+this.Street+" "+this.HouseNr+" "+this.City},HTML:function(){var b="";if(this.Name.length>0){b+="<strong>"+this.Name+"</strong><br/>"}if(this.Street!=""){b+=this.Street+",<br/>"}if(this.Postcode!=""){b+=this.Postcode+" "}if(this.City!=""){b+=this.City}b+=" ("+this.Country+")";return b}};TripzoomLib.Element.Address.registerClass("TripzoomLib.Element.Address",Sys.Component);TripzoomLib.Element.Geometry=function(b){this._type=b;this._unit=TripzoomLib.Unit.GEO};TripzoomLib.Element.Geometry.prototype={get_type:function(){return this._type},get_unit:function(){return this._unit},set_unit:function(b){this._unit=b},TransformCoordinates:function(p,r,z){var o=null;switch(this.get_type()){case"Point":var v=this;var q,u;q=Math.round((parseInt(v.x)-p.left)*r/p.get_width());u=Math.round((p.top-parseInt(v.y))*z/p.get_height());o=new TripzoomLib.Element.Point(q,u);o.set_unit(TripzoomLib.Unit.PIXEL);break;case"Rect":var A=this;var D=this.TransformCoordinates(new TripzoomLib.Element.Point(A.left,A.top));var E=this.TransformCoordinates(new TripzoomLib.Element.Point(A.right,A.bottom));o=new TripzoomLib.Element.Rect(D.x,D.y,E.x,E.y);o.set_unit(TripzoomLib.Unit.PIXEL);break;case"Polygon":var B=this;var s=B.get_exteriorring();for(var C=0;C<s.length;C++){s[C]=this.TransformCoordinates(new TripzoomLib.Element.Point(s[C].x,s[C].y))}o=$create(TripzoomLib.Element.Polygon,{exteriorring:s,unit:TripzoomLib.Unit.PIXEL})}return o}};TripzoomLib.Element.Geometry.registerClass("TripzoomLib.Element.Geometry",Sys.Component);TripzoomLib.Element.Rect=function(f,g,k,e){TripzoomLib.Element.Rect.initializeBase(this,["Rect"]);this.left=(f)?f:Number.POSITIVE_INFINITY;this.top=(g)?g:Number.NEGATIVE_INFINITY;this.right=(k)?k:Number.NEGATIVE_INFINITY;this.bottom=(e)?e:Number.POSITIVE_INFINITY};TripzoomLib.Element.Rect.prototype={isWithin:function(b){switch(this.get_unit()){case TripzoomLib.Unit.GEO:if(TripzoomLib.Element.Rect.isInstanceOfType(b)){if(this.top<b.top||this.bottom>b.bottom){return false}}if(TripzoomLib.Element.Point.isInstanceOfType(b)){if(this.top<b.y||this.bottom>b.y){return false}}break;case TripzoomLib.Unit.PIXEL:if(TripzoomLib.Element.Rect.isInstanceOfType(b)){if(this.top>b.top||this.bottom<b.bottom){return false}}if(TripzoomLib.Element.Point.isInstanceOfType(b)){if(this.top>b.y||this.bottom<b.y){return false}}break}if(TripzoomLib.Element.Rect.isInstanceOfType(b)){if(this.left>b.left||this.right<b.right){return false}}if(TripzoomLib.Element.Point.isInstanceOfType(b)){if(this.left>b.x||this.right<b.x){return false}}return true},isBigger:function(b){if(TripzoomLib.Element.Rect.isInstanceOfType(b)){if(this.get_width()>b.get_width()||this.get_height()<b.get_height()){return false}}return true},Equals:function(d){var c=false;if(d.left==this.left&&d.top==this.top&&d.right==this.right&&d.bottom==this.bottom){c=true}return c},isSmaller:function(b){return !this.isBigger(b)},Expand:function(g){if(TripzoomLib.Element.Rect.isInstanceOfType(g)){var l=g;this.left=Math.min(this.left,l.left);this.top=(this._unit!=TripzoomLib.Unit.PIXEL)?Math.max(this.top,l.top):Math.min(this.top,l.top);this.right=Math.max(this.right,l.right);this.bottom=(this._unit!=TripzoomLib.Unit.PIXEL)?Math.min(this.bottom,l.bottom):Math.max(this.bottom,l.bottom)}else{if(TripzoomLib.Element.Point.isInstanceOfType(g)){var k=g;this.left=Math.min(this.left,k.x);this.right=Math.max(this.right,k.x);this.top=Math.max(this.top,k.y);this.bottom=Math.min(this.bottom,k.y)}else{var m=g*this.get_width();var f=g*this.get_height();this.left-=m;this.right+=m;this.top+=f;this.bottom-=f}}},set_rect:function(c){var d=c.split("_");this.left=parseFloat(d[0]);this.top=parseFloat(d[1]);this.right=parseFloat(d[2]);this.bottom=parseFloat(d[3]);return this},get_rect:function(){return Math.round(this.left)+"_"+Math.round(this.top)+"_"+Math.round(this.right)+"_"+Math.round(this.bottom)},get_bounds:function(){return{x:this.left,y:this.top,width:this.right-this.left,height:Math.abs(this.top-this.bottom)}},set_bounds:function(b){this.left=b.x;this.top=b.y;this.right=b.x+b.width;this.bottom=b.y+b.height},Zoom2Scale:function(b){return TripzoomLib.Constants.MIN_SCALE*Math.pow(2,b)},centerx:function(){return(this.right+this.left)/2},centery:function(){return(this.bottom+this.top)/2},get_width:function(){return Math.abs(this.right-this.left)},set_width:function(b){if(this.get_width()!=b){this.right=this.left+b}},get_height:function(){return Math.abs(this.bottom-this.top)},set_height:function(b){if(this.get_height()!=b){this.bottom=this.top+b}},Width:function(){return this.get_width()},Height:function(){return this.get_height()},toString:function(){return Math.round(this.left)+"_"+Math.round(this.top)+"_"+Math.round(this.right)+"_"+Math.round(this.bottom)}};TripzoomLib.Element.Rect.registerClass("TripzoomLib.Element.Rect",TripzoomLib.Element.Geometry);TripzoomLib.Element.Point=function(d,e,f){TripzoomLib.Element.Point.initializeBase(this,["Point"]);this.x=d;this.y=e};TripzoomLib.Element.Point.prototype={toString:function(){return this.x+"_"+this.y}};TripzoomLib.Element.Point.registerClass("TripzoomLib.Element.Point",TripzoomLib.Element.Geometry);TripzoomLib.Element.Polygon=function(){TripzoomLib.Element.Polygon.initializeBase(this,["Polygon"]);this._exteriorring=[];this._extents=new TripzoomLib.Element.Rect()};TripzoomLib.Element.Polygon.prototype={get_exteriorring:function(){return this._exteriorring},set_exteriorring:function(b){if(this._exteriorring!=b){this._exteriorring=b;this._extents=this._calcExtents()}},isWithin:function(m){var k=false;if(TripzoomLib.Element.Point.isInstanceOfType(m)){var l=m;if(this.get_extents().isWithin(l)){var n,o=0;var g=this._exteriorring.length;for(n=0,o=g-1;n<g;o=n++){if((((this._exteriorring[n].y<=l.y)&&(l.y<this._exteriorring[o].y))||((this._exteriorring[o].y<=l.y)&&(l.y<this._exteriorring[n].y)))&&(l.x<(this._exteriorring[o].x-this._exteriorring[n].x)*(l.y-this._exteriorring[n].y)/(this._exteriorring[o].y-this._exteriorring[n].y)+this._exteriorring[n].x)){k=!k}}}}return k},_calcExtents:function(){var c=new TripzoomLib.Element.Rect();if(this._exteriorring){for(var d=0;d<this._exteriorring.length;d++){c.left=Math.min(c.left,this._exteriorring[d].x);c.top=Math.max(c.top,this._exteriorring[d].y);c.right=Math.max(c.right,this._exteriorring[d].x);c.bottom=Math.min(c.bottom,this._exteriorring[d].y)}}return c},get_extents:function(){return this._extents}};TripzoomLib.Element.Polygon.registerClass("TripzoomLib.Element.Polygon",TripzoomLib.Element.Geometry);TripzoomLib.Element.LayerObject=function(){TripzoomLib.Element.LayerObject.initializeBase(this);this._refid=null;this._async=false;this._geometry=null;this._bitmap="standard.gif";this._title="";this._text="";this._url="";this._layer=null;this._counter};TripzoomLib.Element.LayerObject.prototype={set_async:function(b){this._async=b},get_async:function(){return this._async},set_bitmap:function(b){this._bitmap=b},get_bitmap:function(){return this._bitmap},set_geometry:function(b){this._geometry=b},get_geometry:function(){return this._geometry},set_title:function(b){this._title=b},get_title:function(){return this._title},set_text:function(b){this._text=b},get_text:function(){return this._text},set_url:function(b){this._url=b},get_url:function(){return this._url},set_layer:function(b){this._layer=b},get_layer:function(){return this._layer},set_counter:function(b){this._counter=b},get_counter:function(){return this._counter},get_refid:function(){return this._refid},set_refid:function(b){this._refid=b}};TripzoomLib.Element.LayerObject.registerClass("TripzoomLib.Element.LayerObject",Sys.Component);Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.Gis");TripzoomLib.Gis.CoordinateTypeEnum=function(){};TripzoomLib.Gis.CoordinateTypeEnum.prototype={Default:0,Mercator:0,EuroConform:1,SuperConform:1,GeoMinSec:2,GeoDecimal:3,GaussKrueger:4,UTM:5,Conform:6,None:-1};TripzoomLib.Gis.CoordinateTypeEnum.registerEnum("TripzoomLib.Gis.CoordinateTypeEnum");TripzoomLib.Gis._Utils=function(){};TripzoomLib.Gis._Utils.prototype={TransformRect:function(f,e,d){if(!TripzoomLib.Element.Rect.isInstanceOfType(f)){throw Error.argumentType(f,typeof(f),"Not of type TripzoomLib.Element.Rect");return}topleft=this.TransformPoint(new TripzoomLib.Element.Point(f.left,f.top),e,d);bottomright=this.TransformPoint(new TripzoomLib.Element.Point(f.right,f.bottom),e,d);return new TripzoomLib.Element.Rect(topleft.x,topleft.y,bottomright.x,bottomright.y)},TransformPoint:function(k,g,f){var e=k;switch(g){case 0:switch(f){case 3:e=this._Mercator2Geodecimal(k.x,k.y);break}break;case 3:switch(f){case 0:e=this._Geodecimal2Mercator(k.x,k.y);break}break}return e},_Geodecimal2Mercator:function(f,g){var e,k;e=f;k=g;xArg=6371000*((Math.PI/180)*((e)-0));yArg=6371000*Math.log(Math.tan((Math.PI/4)+(Math.PI/180)*k*0.5));return new TripzoomLib.Element.Point(xArg,yArg)},_Mercator2Geodecimal:function(f,g){var e,k;e=(180/Math.PI)*(f/6371000+0);k=(180/Math.PI)*(Math.atan(Math.exp(g/6371000))-(Math.PI/4))/0.5;f=e;g=k;return new TripzoomLib.Element.Point(f,g)}};TripzoomLib.Gis._Utils.registerClass("TripzoomLib.Gis._Utils");TripzoomLib.Gis.Utils=new TripzoomLib.Gis._Utils();function UTMRefToLatLng(O,P){var Q=new RefEll(O,P);var S=0.9996;var c=Q.maj;var G=Q.ecc;var M=G/(1-G);var n=(1-Math.sqrt(1-G))/(1+Math.sqrt(1-G));var O=this.easting-500000;var P=this.northing;var m=this.lngZone;var R=this.latZone;var N=(m-1)*6-180+3;if((ord(R)-ord("N"))<0){P-=10000000}var J=P/S;var K=J/(c*(1-G/4-3*G*G/64-5*Math.pow(G,3)/256));var d=K+(3*n/2-27*Math.pow(n,3)/32)*Math.sin(2*K)+(21*n*n/16-55*Math.pow(n,4)/32)*Math.sin(4*K)+(151*Math.pow(n,3)/96)*Math.sin(6*K);var H=c/Math.sqrt(1-G*Math.sin(d)*Math.sin(d));var L=Math.tan(d)*Math.tan(d);var I=M*Math.cos(d)*Math.cos(d);var r=c*(1-G)/Math.pow(1-G*Math.sin(d)*Math.sin(d),1.5);var a=O/(H*S);var E=(d-(H*Math.tan(d)/r)*(a*a/2-(5+(3*L)+(10*I)-(4*I*I)-(9*M))*Math.pow(a,4)/24+(61+(90*L)+(298*I)+(45*L*L)-(252*M)-(3*I*I))*Math.pow(a,6)/720))*(180/Math.PI);var F=N+((a-(1+2*L+I)*Math.pow(a,3)/6+(5-(2*I)+(28*L)-(3*I*I)+(8*M)+(24*L*L))*Math.pow(a,5)/120)/Math.cos(d))*(180/Math.PI);return new LatLng(E,F)}Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.Net");TripzoomLib.Net.GeoJSONRequest=function(f,d,e){TripzoomLib.Net.GeoJSONRequest.initializeBase(this);this._requestid=0;this._url=f;this._onCompletedCallback=d;this._onErrorCallback=e;this._responseData=null;this._sender=null;this._jsonRequestObj=null};TripzoomLib.Net.GeoJSONRequest.prototype={initialize:function(){TripzoomLib.Net.GeoJSONRequest.callBaseMethod(this,"initialize");TripzoomLib.Net.RequestManager.Add(this);url=TripzoomLib.Constants.BASE_URL+"GeoXmlHandlerService.ashx?id="+this._requestid+"&url="+escape(this._url);this._jsonRequestObj=new JSONScriptRequest();this._jsonRequestObj.open("GET",url,false);this._jsonRequestObj.send(null)},dispose:function(){TripzoomLib.Net.GeoJSONRequest.callBaseMethod(this,"dispose")},abort:function(){if(this._jsonRequestObj){this._jsonRequestObj.abort()}this._jsonRequestObj=null},get_sender:function(){return this._sender},set_sender:function(b){this._sender=b},get_requestid:function(){return this._requestid},set_requestid:function(b){this._requestid=b},get_responseData:function(){return this._responseData},_onCompleted:function(){if(this._onCompletedCallback){this._onCompletedCallback(this._sender,Sys.EventArgs.Empty)}this._jsonRequestObj=null},_onError:function(){if(this._onErrorCallback){this._onErrorCallback(this._sender,Sys.EventArts.Empty)}this._jsonRequestObj=null}};TripzoomLib.Net.GeoJSONRequest.registerClass("TripzoomLib.Net.GeoJSONRequest",Sys.Component);TripzoomLib.Net.RequestSettings=function(){TripzoomLib.Net.RequestSettings.initializeBase(this);this._xcoord=null;this._ycoord=null;this._rect=null;this._width=null;this._height=null;this._layers=null;this._language=null;this._coordformat=0;this._transparent=false;this._name=null;this._profile=null;this._parameters=[]};TripzoomLib.Net.RequestSettings.prototype={set_xcoord:function(b){this._xcoord=b},get_xcoord:function(){return this._xcoord},set_ycoord:function(b){this._ycoord=b},get_ycoord:function(){return this._ycoord},set_rect:function(b){this._rect=b},get_rect:function(){return this._rect},set_width:function(b){this._width=b},get_width:function(){return this._width},set_height:function(b){this._height=b},get_height:function(){return this._height},set_layers:function(b){this._layers=b},get_layers:function(){return this._layers},set_language:function(b){this._language=b},get_language:function(){return this._language},set_coordformat:function(b){this._coordformat=b},get_coordformat:function(){return this._coordformat},set_transparent:function(b){this._transparent=b},get_transparent:function(){return this._transparent},set_name:function(b){this._name=b},get_name:function(){return this._name},set_parameters:function(b){this._parameters=b},get_parameters:function(){return this._parameters},set_profile:function(b){this._profile=b},get_profile:function(){return this._profile},_Parameters:function(){var b="";if(this.get_profile()){b+="&profile="+escape(this.get_profile())}if(this.get_name()){b+="&name="+this.get_name()}if(this.get_parameters()){b+="&parameters="+this.get_parameters().join("|")}if(this.get_width()){b+="&width="+this.get_width()}if(this.get_height()){b+="&height="+this.get_height()}if(this.get_xcoord()){b+="&x="+this.get_xcoord().toString()}if(this.get_ycoord()){b+="&y="+this.get_ycoord().toString()}if(this.get_rect()){b+="&rect="+this.get_rect().toString()}if(this.get_layers()){b+="&layers="+escape(this.get_layers())}if(this.get_language()){b+="&uiCulture="+this.get_language()}b+="&coordformat="+this.get_coordformat();b+="&transparent="+this.get_transparent();return b}};TripzoomLib.Net.RequestSettings.registerClass("TripzoomLib.Net.RequestSettings",Sys.Component);TripzoomLib.Net.LocateRequestSettings=function(){TripzoomLib.Net.LocateRequestSettings.initializeBase(this);this._location=null;this._language=null;this._coordformat=null;this._maxresults=null};TripzoomLib.Net.LocateRequestSettings.prototype={set_location:function(b){if(!TripzoomLib.Element.Address.isInstanceOfType(b)){throw Error.argumentType("value",Object.getType(b),TripzoomLib.Element.Address,"TripzoomLib.Element.Address is required!")}this._location=b},get_location:function(){return this._location},set_language:function(b){this._language=b},get_language:function(){return this._language},set_coordformat:function(b){this._coordformat=b},get_coordformat:function(){return this._coordformat},set_maxresults:function(b){this._maxresults=b},get_maxresults:function(){return this._maxresults},_Parameters:function(){var b="";if(this.get_location()!=null){b+="&address="+this.get_location().get_address()}if(this.get_language()!=null){b+="&uiCulture="+this.get_language()}if(this.get_coordformat()!=null){b+="&coordformat="+this.get_coordformat()}if(this.get_maxresults()!=null){b+="&maxresults="+this.get_maxresults()}return b}};TripzoomLib.Net.LocateRequestSettings.registerClass("TripzoomLib.Net.LocateRequestSettings",Sys.Component);TripzoomLib.Net.RouteRequestSettings=function(){TripzoomLib.Net.RouteRequestSettings.initializeBase(this);this._language="nl";this._stations="";this._template="";this._isstart=true;this._starttime="";this._optimisation=null;this._detail=null;this._vehicle=null;this._avoid=null;this._display=null};TripzoomLib.Net.RouteRequestSettings.prototype={set_language:function(b){this._language=b},get_language:function(){return this._language},set_stations:function(b){this._stations=b},get_stations:function(){return this._stations},set_template:function(b){this._template=b},get_template:function(){return this._template},set_isstart:function(b){this._isstart=b},get_isstart:function(){return this._isstart},set_starttime:function(b){this._starttime=b},get_starttime:function(){return this._starttime},set_optimisation:function(b){this._optimisation=b},get_optimisation:function(){return this._optimisation},set_detail:function(b){this._detail=b},get_detail:function(){return this._detail},set_vehicle:function(b){this._vehicle=b},get_vehicle:function(){return this._vehicle},set_avoid:function(b){this._avoid=b},get_avoid:function(){return this._avoid},set_display:function(b){this._avoid=b},get_display:function(){return this._display},_Parameters:function(){var b="";if(this.get_language()!=null){b+="&language="+this.get_language()}if(this.get_stations()!=null){b+="&stations="+this.get_stations()}if(this.get_template()!=null){b+="&template="+this.get_template()}if(this.get_isstart()!=null){b+="&isstart="+this.get_isstart()}if(this._starttime!=null){b+="&starttime="+this._starttime}if(this.get_optimisation()!=null){b+="&optimisation="+this.get_optimisation()}if(this.get_detail()!=null){b+="&detail="+this.get_detail()}if(this.get_vehicle()!=null){b+="&vehicle="+this.get_vehicle()}if(this.get_avoid()!=null){b+="&avoid="+this.get_avoid()}if(this.get_display()!=null){b+="&display="+this.get_display()}return b}};TripzoomLib.Net.RouteRequestSettings.registerClass("TripzoomLib.Net.RouteRequestSettings",Sys.Component);TripzoomLib.Net.Request=function(d,c){TripzoomLib.Net.Request.initializeBase(this);this._url=TripzoomLib.Constants.BASE_URL+"RequestHandler.ashx";this._settings=null;this._requestid=0;this._onCompletedCallback=d;this._onErrorCallback=c;this._responseData=null;this._sender=null};TripzoomLib.Net.Request.prototype={initialize:function(){TripzoomLib.Net.Request.callBaseMethod(this,"initialize")},CreateMap:function(b){if(!TripzoomLib.Net.RequestSettings.isInstanceOfType(b)){throw Error.argumentType("settings",Object.getType(b),TripzoomLib.Net.RequestSettings,"TripzoomLib.Net.RequestSettings is required!")}this.Create("CreateMap",b)},GetLayer:function(b){if(!TripzoomLib.Net.RequestSettings.isInstanceOfType(b)){throw Error.argumentType("settings",Object.getType(b),TripzoomLib.Net.RequestSettings,"TripzoomLib.Net.RequestSettings is required!")}this.Create("GetLayer",b)},GetLayerObject:function(b){if(!TripzoomLib.Net.RequestSettings.isInstanceOfType(b)){throw Error.argumentType("settings",Object.getType(b),TripzoomLib.Net.RequestSettings,"TripzoomLib.Net.RequestSettings is required!")}this.Create("GetLayerObject",b)},Locate:function(b){if(!TripzoomLib.Net.LocateRequestSettings.isInstanceOfType(b)){throw Error.argumentType("settings",Object.getType(b),TripzoomLib.Net.LocateRequestSettings,"TripzoomLib.Net.LocateRequestSettings is required!")}this.Create("Locate",b)},RevLocate:function(b){if(!TripzoomLib.Net.LocateRequestSettings.isInstanceOfType(b)){throw Error.argumentType("settings",Object.getType(b),TripzoomLib.Net.LocateRequestSettings,"TripzoomLib.Net.LocateRequestSettings is required!")}this.Create("RevLocate",b)},RevLocateLayer:function(b){if(!TripzoomLib.Net.LocateRequestSettings.isInstanceOfType(b)){throw Error.argumentType("settings",Object.getType(b),TripzoomLib.Net.LocateRequestSettings,"TripzoomLib.Net.LocateRequestSettings is required!")}this.Create("RevLocateLayer",b)},GetSharpMapLayer:function(b){this.Create("GetSharpMapLayer",b)},TraveltimeForecast:function(b){if(!TripzoomLib.Net.RouteRequestSettings.isInstanceOfType(b)){throw Error.argumentType("settings",Object.getType(b),TripzoomLib.Net.RouteRequestSettings,"TripzoomLib.Net.RouteRequestSettings is required!")}this.Create("TravelTimeForecast",b)},LoadLastView:function(){this.Create("LoadLastView")},RemoveRoute:function(){this.Create("RemoveRoute")},RouteSummary:function(b){if(!TripzoomLib.Net.RouteRequestSettings.isInstanceOfType(b)){throw Error.argumentType("settings",Object.getType(b),TripzoomLib.Net.RouteRequestSettings,"TripzoomLib.Net.RouteRequestSettings is required!")}this.Create("RouteSummary",b)},RouteDescription:function(b){if(!TripzoomLib.Net.RouteRequestSettings.isInstanceOfType(b)){throw Error.argumentType("settings",Object.getType(b),TripzoomLib.Net.RouteRequestSettings,"TripzoomLib.Net.RouteRequestSettings is required!")}this.Create("RouteDescription",b)},Create:function(e,g){this._settings=g;TripzoomLib.Net.RequestManager.Add(this);var k=this._url+"?function="+e;k+="&userid="+TripzoomLib.Constants.USERID;k+="&requestid="+this.get_requestid();if(this._settings){k+=this._settings._Parameters()}var f=new JSONScriptRequest();f.open("GET",k,false);f.onreadystatechange=function(){if(f.readyState==4){alert(f.responseJSON)}};f.send(null)},dispose:function(){TripzoomLib.Net.Request.callBaseMethod(this,"dispose")},get_sender:function(){return this._sender},set_sender:function(b){this._sender=b},get_requestid:function(){return this._requestid},set_requestid:function(b){this._requestid=b},get_url:function(){return this._url},set_url:function(b){this._url=b},get_responseData:function(){return this._responseData},clear:function(){this._responseData=null},_onCompleted:function(b){if(this._onCompletedCallback){this._onCompletedCallback((this._sender)?this._sender:this,b,Sys.EventArgs.Empty)}},_onError:function(b){if(this._onErrorCallback){this._onErrorCallback((this._sender)?this._sender:this,b,Sys.EventArgs.Empty)}}};TripzoomLib.Net.Request.registerClass("TripzoomLib.Net.Request",Sys.Component);TripzoomLib.Net._RequestManager=function(){this._RequestObjs=new Object();this._requestCount=0};TripzoomLib.Net._RequestManager.prototype={Abort:function(){this._RequestObjs=new Object()},Add:function(b){b.set_requestid(this._requestCount);this._RequestObjs[this._requestCount++]=b;return b},LoadData:function(f,d,e){if(!this._RequestObjs[f]){return}this._RequestObjs[f]._responseData=e;this._RequestObjs[f]._onCompleted(d)},LoadError:function(f,d,e){if(!this._RequestObjs[f]){return}this._RequestObjs[f]._responseData=e;this._RequestObjs[f]._onError(d)}};TripzoomLib.Net._RequestManager.registerClass("TripzoomLib.Net._RequestManager");TripzoomLib.Net.RequestManager=new TripzoomLib.Net._RequestManager();Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.Web");TripzoomLib.Web._Request=function(){};TripzoomLib.Web._Request.prototype={item:function(k,f){if(f==null){f=""}k=k.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e=new RegExp("[\\?&]"+k+"=([^&#]*)");var g=e.exec(window.location.href);if(g==null){return f}else{return g[1]}}};TripzoomLib.Web._Request.registerClass("TripzoomLib.Web._Request");TripzoomLib.Web.Request=new TripzoomLib.Web._Request();Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.GUI");TripzoomLib.GUI.ContextMenu=function(b){TripzoomLib.GUI.ContextMenu.initializeBase(this,[b]);this._control=null;this._items=[];this._control=this.get_element().appendChild(document.createElement("ul"));this._control.className="contextMenu";this._activeContextMenuItem=false;this._clickDelegate=null;this._x;this._y};TripzoomLib.GUI.ContextMenu.prototype={initialize:function(){TripzoomLib.GUI.ContextMenu.callBaseMethod(this,"initialize");this._control.style.display="block";for(var d=0;d<this._items.length;d++){var c=this._control.appendChild(this._items[d].get_element())}this._control.style.display="none";if(!this._clickDelegate){this._clickDelegate=Function.createDelegate(this,this.hide);$addHandler(this.get_element(),"click",this._clickDelegate)}},dispose:function(){TripzoomLib.GUI.ContextMenu.callBaseMethod(this,"dispose")},show:function(k){contextMenuSource=this;if(this._activeContextMenuItem){this._activeContextMenuItem.className=""}if(document.all&&!k){k=event}var m=TripzoomLib.Utils.getScrollXY();var e=Sys.UI.DomElement.getBounds(this.get_element());var l=k.clientX-e.x+m[0];var b=k.clientY-e.y+m[1];this._control.style.left=(l)+"px";this._control.style.top=(b)+"px";this._control.style.display="block";return false},showAt:function(k,l){this._x=k;this._y=l;contextMenuSource=this;if(this._activeContextMenuItem){this._activeContextMenuItem.className=""}var m=TripzoomLib.Utils.getScrollXY();var o=Sys.UI.DomElement.getBounds(this.get_element());var n=k-o.x+m[0];var b=l-o.y+m[1];this._control.style.left=(n)+"px";this._control.style.top=(b)+"px";this._control.style.display="block";return false},isHidden:function(){return(this._control.style.display!="block")},get_x:function(){return this._x},get_y:function(){return this._y},hide:function(b){if(b.button==0&&Sys.Browser.agent!=Sys.Browser.InternetExplorer){}else{this._control.style.display="none"}b.stopPropagation();b.preventDefault()},get_items:function(){return this._items},set_items:function(b){this._items=b},get_control:function(){return this._control}};TripzoomLib.GUI.ContextMenu.registerClass("TripzoomLib.GUI.ContextMenu",Sys.UI.Behavior);TripzoomLib.GUI.ContextMenuItem=function(){TripzoomLib.GUI.ContextMenuItem.initializeBase(this);this._contextmenu=null;this._text=null;this._url=null;this._listitem=null;this._anchor=null;this._element=null;this._clickDelegate=null};TripzoomLib.GUI.ContextMenuItem.prototype={initialize:function(){TripzoomLib.GUI.ContextMenuItem.callBaseMethod(this,"initialize");this._element=document.createElement("li");this._element.innerHTML=this.get_text();this._element.onmouseover=function(){this.className="contextMenuHighlighted"};this._element.onmouseout=function(){this.className=""};this._clickDelegate=Function.createDelegate(this,this._mouseClick);$addHandler(this._element,"click",this._clickDelegate)},dispose:function(){$clearHandlers(this._element);this._clickDelegate=null;this._element=null;TripzoomLib.GUI.ContextMenuItem.callBaseMethod(this,"dispose")},set_text:function(b){this._text=b},get_text:function(){return this._text},set_url:function(b){this._url=b},get_url:function(){return this._url},set_element:function(b){this._element=b},get_element:function(){return this._element},add_click:function(b){this.get_events().addHandler("click",b)},remove_click:function(b){this.get_events().removeHandler("click",b)},_mouseClick:function(d){var c=this.get_events().getHandler("click");if(c){c(this,d)}}};TripzoomLib.GUI.ContextMenuItem.registerClass("TripzoomLib.GUI.ContextMenuItem",Sys.Component);TripzoomLib.GUI.ContextMenuSeparator=function(){TripzoomLib.GUI.ContextMenuSeparator.initializeBase(this);this._element=null};TripzoomLib.GUI.ContextMenuSeparator.prototype={initialize:function(){TripzoomLib.GUI.ContextMenuSeparator.callBaseMethod(this,"initialize");this._element=document.createElement("div");this._element.className="contextMenuSeparator"},dispose:function(){this._element=null;TripzoomLib.GUI.ContextMenuSeparator.callBaseMethod(this,"dispose")},set_element:function(b){this._element=b},get_element:function(){return this._element}};TripzoomLib.GUI.ContextMenuSeparator.registerClass("TripzoomLib.GUI.ContextMenuSeparator",Sys.Component);Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.GUI");Type.registerNamespace("TripzoomLib.GUI.Map");TripzoomLib.GUI.Map.Map=function(b){TripzoomLib.GUI.Map.Map.initializeBase(this);this._parent=b;this._element=null;this._mapview=null;this.isBusy=false;this.route=null;this.currentMapLayer=1;this.eventsEnabled=false;this._resize=true;this._viewmode=TripzoomLib.MapViewMode.MAP;this._showTraffic=false;this._showRoadwork=false;this._showRoute=false;this._showSatellite=false;this._showStreets=false;this._showRadar=false;this._showP2000=false;this._showLabelLayer=false;this._media="screen";this._ScrollWheel=false;this._language=TripzoomLib.Constants.LANGUAGE;this._navaction=null;this._tooltip=null;this._scalebar=null;this._spinner=null;this._copyright=null;this._navigation=null;this._tileview=null;this._navigationtool=TripzoomLib.Constants.NAVIGATIONTOOL;this._staticimagelayer=null;this._toolbar=null;this._overviewtoolbar=null;this._mapstyletoolbar=null;this._overviewmap=null;this._layermanager=null;this._mouseOutDelegate=null;this._mouseClickDelegate=null;this._resizeDelegate=null;this._isLoaded=false;this._layers=[];this.zoomsteps=1;this.timeOut=20;this._left=0;this._top=0;this._width=null;this._height=null;this._service=null;this._request=null;this._tiled=true};TripzoomLib.GUI.Map.Map.prototype={initialize:function(){TripzoomLib.GUI.Map.Map.callBaseMethod(this,"initialize");_Map=this;this._element=document.createElement("DIV");this._element.id=TripzoomLib.Utils.createUniqueID("map");this._element.className="mapControl";this._element.style.position="relative";this._element.style.overflow="hidden";this._element.style.left="0px";this._element.style.top="0px";this._element.style.width="100%";this._element.style.height="100%";this._parent.innerHTML="";this._parent.className+=" mapControl";this._parent.appendChild(this._element);if(typeof(LocatienetLibService)!=="undefined"){this._service=new LocatienetLibService();this._service.set_defaultUserContext(this);this._service.set_defaultSucceededCallback(this.ServiceCallbackSucceeded);this._service.set_defaultFailedCallback(this.ServiceCallbackFailed);this._service.set_timeout(10000)}this._request=new TripzoomLib.Net.Request(this._RequestCompleted);this._request.set_sender(this);this._request.initialize();if(this.get_tiled()){this._tileview=$create(TripzoomLib.GUI.Map.TileView,{mapcontrol:this})}this._staticimagelayer=$create(TripzoomLib.GUI.Map.StaticImageLayer,{mapcontrol:this});this._navigation=$create(TripzoomLib.GUI.Map.Navigation,{mapcontrol:this,zindex:101});this._layermanager=$create(TripzoomLib.GUI.Map.LayerManager,{mapcontrol:this._navigation});this._mapview=$create(TripzoomLib.GUI.Map.MapView,{control:this,scale:5000,tiled:this._tiled});this._toolbar=$create(TripzoomLib.GUI.Map.ToolBar,{mapcontrol:this,left:10,top:10,zindex:1000});if((this.get_navigationtool()&TripzoomLib.NavigationTool.ZoomOut)==TripzoomLib.NavigationTool.ZoomOut){this._toolbar.createImageButton(TripzoomLib.NavigationAction.ZOOMOUT,TripzoomLib.Constants.IMAGE_URL+"map/button_zoom_out.gif",TripzoomLib.Resources.Resource.zoom_out,0,21)}if((this.get_navigationtool()&TripzoomLib.NavigationTool.ScaleBar)==TripzoomLib.NavigationTool.ScaleBar){this._toolbar.createImageButton(TripzoomLib.NavigationAction.SCALEBAR_1,TripzoomLib.Constants.IMAGE_URL+"map/scalebar-1.gif",TripzoomLib.Resources.Resource.country,19,21);this._toolbar.createImageButton(TripzoomLib.NavigationAction.SCALEBAR_2,TripzoomLib.Constants.IMAGE_URL+"map/scalebar-2.gif",TripzoomLib.Resources.Resource.province,29,21);this._toolbar.createImageButton(TripzoomLib.NavigationAction.SCALEBAR_3,TripzoomLib.Constants.IMAGE_URL+"map/scalebar-3.gif",TripzoomLib.Resources.Resource.region,39,21);this._toolbar.createImageButton(TripzoomLib.NavigationAction.SCALEBAR_4,TripzoomLib.Constants.IMAGE_URL+"map/scalebar-4.gif",TripzoomLib.Resources.Resource.city,49,21);this._toolbar.createImageButton(TripzoomLib.NavigationAction.SCALEBAR_5,TripzoomLib.Constants.IMAGE_URL+"map/scalebar-5.gif",TripzoomLib.Resources.Resource.neighbourhood,59,21);this._toolbar.createImageButton(TripzoomLib.NavigationAction.SCALEBAR_6,TripzoomLib.Constants.IMAGE_URL+"map/scalebar-6.gif",TripzoomLib.Resources.Resource.block,69,21);this._toolbar.createImageButton(TripzoomLib.NavigationAction.SCALEBAR_7,TripzoomLib.Constants.IMAGE_URL+"map/scalebar-7.gif",TripzoomLib.Resources.Resource.street,79,21)}if((this.get_navigationtool()&TripzoomLib.NavigationTool.ZoomIn)==TripzoomLib.NavigationTool.ZoomIn){this._toolbar.createImageButton(TripzoomLib.NavigationAction.ZOOMIN,TripzoomLib.Constants.IMAGE_URL+"map/button_zoom_in.gif",TripzoomLib.Resources.Resource.zoom_in,90,21)}if((this.get_navigationtool()&TripzoomLib.NavigationTool.Panning)==TripzoomLib.NavigationTool.Panning){this._toolbar.createImageButton(TripzoomLib.NavigationAction.NAVMODE_MOVE,TripzoomLib.Constants.IMAGE_URL+"map/button_move_mode.gif",TripzoomLib.Resources.Resource.pan,111,21)}if((this.get_navigationtool()&TripzoomLib.NavigationTool.Zooming)==TripzoomLib.NavigationTool.Zooming){this._toolbar.createImageButton(TripzoomLib.NavigationAction.NAVMODE_ZOOM,TripzoomLib.Constants.IMAGE_URL+"map/button_zoom_mode.png",TripzoomLib.Resources.Resource.zoom,132,21)}if((this.get_navigationtool()&TripzoomLib.NavigationTool.Edit)==TripzoomLib.NavigationTool.Edit){this._toolbar.createImageButton(TripzoomLib.NavigationAction.NAVMODE_EDIT,TripzoomLib.Constants.IMAGE_URL+"map/button_info_mode.gif",TripzoomLib.Resources.Resource.info,153,21,true)}this._mapstyletoolbar=$create(TripzoomLib.GUI.Map.ToolBar,{mapcontrol:this,top:10,right:40,zindex:101,classNameNonActive:"textButton",classNameActive:"textButton_Active"});mapbtn=this._mapstyletoolbar.createTextButton(TripzoomLib.NavigationAction.VIEWMODE_MAP,TripzoomLib.Resources.Resource.map,"",0,48);satbtn=this._mapstyletoolbar.createTextButton(TripzoomLib.NavigationAction.VIEWMODE_SAT,TripzoomLib.Resources.Resource.aerophoto,"",50,60);hybbtn=this._mapstyletoolbar.createTextButton(TripzoomLib.NavigationAction.VIEWMODE_HYB,TripzoomLib.Resources.Resource.hybrid,"",112,56);switch(this._viewmode){case TripzoomLib.MapViewMode.MAP:mapbtn.set_enabled(true);mapbtn.get_control().className="textButton_Active";break;case TripzoomLib.MapViewMode.AERIAL:satbtn.set_enabled(true);satbtn.get_control().className="textButton_Active";break;case TripzoomLib.MapViewMode.HYBRID:hybbtn.set_enabled(true);hybbtn.get_control().className="textButton_Active";break}var b=Sys.UI.DomElement.getBounds(this._mapstyletoolbar.get_element());this._mapstyletoolbar.get_element().style.width=(b.width+2)+"px";this._overviewtoolbar=$create(TripzoomLib.GUI.Map.ToolBar,{mapcontrol:this,top:10,right:10,zindex:102});this._overviewtoolbar.createImageButton(TripzoomLib.NavigationAction.OVERVIEW,TripzoomLib.Constants.IMAGE_URL+"map/button_overview.gif",TripzoomLib.Resources.Resource.overviewmap,0,21);this._overviewmap=$create(TripzoomLib.GUI.Map.OverviewMap,{mapcontrol:this,zindex:101});this._overviewmap.set_visible(false);if(this.get_mapview().get_tiled()){this._copyright=$create(TripzoomLib.GUI.Map.Copyright,{mapcontrol:this,zindex:100})}this._scalebar=$create(TripzoomLib.GUI.Map.Scalebar,{mapcontrol:this,zindex:100});this._spinner=$create(TripzoomLib.GUI.Map.Spinner,{mapcontrol:this,zindex:100});this._spinner.set_visible(false);this._tooltip=$create(TripzoomLib.GUI.Map.ToolTip,{mapcontrol:this,zindex:100});if(!this._mouseClickDelegate){this._mouseClickDelegate=Function.createDelegate(this,this._mouseClick)}$addHandler(this._element,"click",this._mouseClickDelegate);if(!this._mouseOutDelegate){this._mouseOutDelegate=Function.createDelegate(this,this._mouseOut)}$addHandler(this._element,"mouseout",this._mouseOutDelegate);if(!this._resizeDelegate){this._resizeDelegate=Function.createDelegate(this,this._raiseResize)}$addHandler(window,"resize",this._resizeDelegate);$addHandler(document.body,"resize",this._resizeDelegate);var b=Sys.UI.DomElement.getBounds(this.get_parent());this.set_left(b.x);this.set_top(b.y);this.set_width(b.width);this.set_height(b.height)},_mouseClick:function(b){this._raiseClickEvent()},_mouseOut:function(b){document.body.style.cursor="default";this.isDragging=false},_raiseResize:function(f){this._raiseResizeEvent();if(this._isLoaded&&this._resize){var b=Sys.UI.DomElement.getBounds(this.get_element());if(Math.abs(this.get_width()-b.width)>100||Math.abs(this.get_height()-b.height)>100){if(this.get_mapview().get_tiled()){this.get_mapview().createMap(this.get_mapview().get_viewrect().centerx(),this.get_mapview().get_viewrect().centery());this.get_layermanager().Update(this.get_mapview().get_viewrect());this.currentMapLayer=-this.currentMapLayer;var e=this.getTileLayer();e.innerHTML="";this.currentMapLayer=-this.currentMapLayer;this.Update()}else{this.set_rect(this.get_mapview().get_viewrect())}}}},dispose:function(){if(this._mouseClickDelegate){$removeHandler(this.get_element(),"click",this._mouseClickDelegate)}this._mouseClickDelegate=null;if(this._mouseOutDelegate){$removeHandler(this.get_element(),"mouseout",this._mouseOutDelegate)}this._mouseOutDelegate=null;if(this._resizeDelegate){$removeHandler(window,"resize",this._resizeDelegate);$removeHandler(document.body,"resize",this._resizeDelegate)}this._resizeDelegate=null;TripzoomLib.GUI.Map.Map.callBaseMethod(this,"dispose")},Resize:function(){this._raiseResize()},set_rect:function(b){rect=b;var e=Sys.UI.DomElement.getBounds(this.get_parent());this.set_left(e.x);this.set_top(e.y);this.set_width(e.width);this.set_height(e.height);if(!this.get_mapview()){this._mapview=$create(TripzoomLib.GUI.Map.MapView,{control:this})}else{this.get_mapview().isUpdated=false}if(this.get_tiled()){var e=Sys.UI.DomElement.getBounds(this.get_element());mppix=Math.max(rect.Width()/e.width,rect.Height()/e.height);this.s=TripzoomLib.Utils.ZoomToScale(mppix*TripzoomLib.Constants.TILE_SIZE)*2;this.startx=e.width/2;this.starty=e.height/2;centerx=rect.centerx();centery=rect.centery();this.get_mapview().set_center(new TripzoomLib.Element.Point(centerx,centery));this.get_mapview().set_scale(this.s);this.get_mapview().update();this.currentMapLayer=-this.currentMapLayer;var f=this.getTileLayer();f.innerHTML="";this.currentMapLayer=-this.currentMapLayer}else{this.get_mapview().set_viewrect(rect)}this.Update();this.isPressed=false;this.isDragging=false;this._raiseLoadEvent()},set_center:function(f,e){var d=this._staticimagelayer;d.set_visible(false);if(e!=null){this.s=TripzoomLib.Utils.ZoomToScale(e);this.get_mapview().set_scale(this.s)}this.get_mapview().createMap(f.x,f.y);if(this.get_mapview().get_tiled()){this.currentMapLayer=-this.currentMapLayer;var d=this.getTileLayer();d.innerHTML="";this.currentMapLayer=-this.currentMapLayer}this.Update();this._raiseLoadEvent()},get_parent:function(){return this._parent},set_parent:function(b){this._parent=b},get_element:function(){return this._element},get_spinner:function(){return this._spinner},get_navigation:function(){return this._navigation},get_toolbar:function(){return this._toolbar},get_mapstyletoolbar:function(){return this._mapstyletoolbar},get_overviewtoolbar:function(){return this._overviewtoolbar},get_overviewmap:function(){return this._overviewmap},get_layermanager:function(){return this._layermanager},get_staticimagelayer:function(){return this._staticimagelayer},get_media:function(){return this._media},set_media:function(b){this._media=b},get_language:function(){return this._language},set_language:function(b){this._language=b},set_ScrollWheel:function(b){this._ScrollWheel=b},get_mapview:function(){return this._mapview},get_top:function(){return this._top},set_top:function(b){this._top=b},get_left:function(){return this._left},set_left:function(b){this._left=b},get_tiled:function(){return this._tiled},set_tiled:function(b){this._tiled=b},get_layers:function(){return this._layers},showRoute:function(b){if(arguments.length>0){if(this._showRoute!=b){this._showRoute=b;if(this._showRoute){if(this.get_layermanager()){this.get_layermanager().base.Clear();this.get_layermanager().AddLayer("ROUTE")}}else{if(this.get_layermanager()){this.get_layermanager().Remove("ROUTE")}}}}else{return this._showRoute}},showTraffic:function(b){if(this.showTraffic.arguments.length>0){if(this._showTraffic!=b){this._showTraffic=b;if(this._showTraffic){if(this.get_layermanager()){this.get_layermanager().AddLayer("TRAFFIC")}}else{if(this.get_layermanager()){this.get_layermanager().Remove("TRAFFIC")}}}}else{return this._showTraffic}},showRoadwork:function(b){if(this.showRoadwork.arguments.length>0){if(this._showRoadwork!=b){this._showRoadwork=b;if(this._showRoadwork){if(this.get_layermanager()){this.get_layermanager().AddLayer("ROADWORK")}}else{if(this.get_layermanager()){this.get_layermanager().Remove("ROADWORK")}}}}else{return this._showRoadwork}},showRadar:function(b){if(this.showRadar.arguments.length>0){if(this._showRadar!=b){this._showRadar=b}}else{return this._showRadar}},showP2000:function(b){if(this.showP2000.arguments.length>0){if(this._showP2000!=b){this._showP2000=b}}else{return this._showP2000}},showSatellite:function(e,f){this.get_mapview().isSatellite=e;this._showStreets=f;var b=Sys.UI.DomElement.getBounds(this.get_element());this.Zoom(1)},getTileLayer:function(){return $get(this._element.id+"_tileLayer"+this.currentMapLayer)},showLabelLayer:function(b){if(this.showLabelLayer.arguments.length>0){if(this._showLabelLayer!=b){this._showLabelLayer=b}}else{return this._showLabelLayer}},Update:function(d){this._staticimagelayer.set_left(0);this._staticimagelayer.set_top(0);this._staticimagelayer.clear();if(this.get_mapview().get_tiled()){var c=this.createLayer("LABELS",4,true);c.style.opacity="0.8";if(this._showRoute){c=this.createLayer("ROUTE",3);c.style.opacity="0.7"}if(this._showTraffic){c=this.createLayer("TRAFFIC",2);c.style.opacity="0.9"}if(this._showRoadwork){c=this.createLayer("ROADWORK",2);c.style.opacity="0.9"}if(this._showStreets){this.createLayer("STREET",1)}if(this._showRadar){if(this._service){this._service.GetBuienradarUrl()}}this._staticimagelayer.set_visible(true);if(this.get_layermanager()){this.get_layermanager().set_visible(true);this.get_layermanager().Update((!d)?this.get_mapview().get_viewrect():null)}if(this.get_overviewmap()){if(d){}else{this.get_overviewmap().Update(this.get_mapview().get_viewrect().centerx(),this.get_mapview().get_viewrect().centery())}}this.updateScalebar();this._raiseChangedEvent()}else{layers=[];if(this._showRoute){Array.add(layers,"ROUTE")}if(this._showTraffic){Array.add(layers,"TRAFFIC")}if(this._showRoadwork){Array.add(layers,"ROADWORK")}if(this._showP2000){Array.add(layers,"P2000")}if(this._showStreets){Array.add(layers,"STREET")}Array.addRange(layers,this._layers);if(this.get_mapview().isSatellite){Array.add(layers,"SATELLITE")}if(this._showLabelLayer){var c=this.createLayer("LABELS",2,true);c.style.opacity="0.8"}this.get_layermanager().set_visible(false);this._request.CreateMap($create(TripzoomLib.Net.RequestSettings,{profile:(typeof(TripzoomLib.Constants.MAP_PROFILE)!="undefined")?TripzoomLib.Constants.MAP_PROFILE:"",rect:(!d)?this.get_mapview().get_viewrect():null,width:this.get_width(),height:this.get_height(),layers:layers.join(","),language:this.get_language()}));if(this._showRadar){if(this._service){this._service.GetBuienradarUrl()}}}},setLocation:function(d,e){this.get_spinner().set_visible(true);var f=TripzoomLib.Utils.getScrollXY();if(!d){d=this.get_width()/2+this.get_left()}if(!e){e=this.get_height()/2+this.get_top()}d=d-this.get_left()+f[0];e=e-this.get_top()+f[1];xcoord=Math.round(this.get_mapview().get_viewrect().left+this.get_mapview().get_viewrect().Width()*(d/this.get_width()));ycoord=Math.round(this.get_mapview().get_viewrect().top-this.get_mapview().get_viewrect().Height()*(e/this.get_height()));this._request.RevLocateLayer($create(TripzoomLib.Net.LocateRequestSettings,{location:$create(TripzoomLib.Element.Address,{xcoord:xcoord,ycoord:ycoord}),language:this.get_language()}))},_RequestCompleted:function(v,n,q){if(!n){return}switch(n.toLowerCase()){case"createmap":var r=v._request.get_responseData();if(r){if(r.RectString){v.get_mapview().set_viewrect(new TripzoomLib.Element.Rect().set_rect(r.RectString))}if(r.ImageUrl){var o=$create(TripzoomLib.GUI.Map.StaticImage,{mapcontrol:v,url:r.ImageUrl,zindex:1,left:0,top:0,width:v.get_width(),height:v.get_height()});v._staticimagelayer.add_staticimage(o);v._staticimagelayer.set_visible(true);if(v.get_layermanager()){v.get_layermanager().Remove("locations");if(r.LayerObjects){var p=v.get_layermanager().AddLayer("locations");p.set_static(true);for(var u=0;u<r.LayerObjects.length;u++){var s=r.LayerObjects[u];p.Add($create(TripzoomLib.Element.LayerObject,{layer:p,geometry:new TripzoomLib.Element.Point(s.Location.point.x,s.Location.point.y),title:s.Title,text:s.Description,bitmap:s.Marker,url:s.Link}))}}v.get_layermanager().set_visible(true);v.get_layermanager().Update(v.get_mapview().get_viewrect())}if(v.get_overviewmap()){v.get_overviewmap().Update(v.get_mapview().get_viewrect())}v.updateScalebar()}}v._raiseChangedEvent();break;case"revlocatelayer":var r=v._request.get_responseData();if(r!=null&&r.LayerObjects!=null){var p=v.get_layermanager().Find("revlocate");if(!p){p=v.get_layermanager().AddLayer("revlocate")}else{p.Clear()}var z=null;p.set_static(true);for(var u=0;u<r.LayerObjects.length;u++){var s=r.LayerObjects[u];z=p.Add($create(TripzoomLib.Element.LayerObject,{layer:p,geometry:new TripzoomLib.Element.Point(s.Location.point.x,s.Location.point.y),title:s.Title,text:s.Description,bitmap:s.Marker,url:s.Link}))}v.get_layermanager().set_visible(true);v.get_layermanager().Update(v.get_mapview().get_viewrect());if(z){p.get_popup().show(z)}v.get_spinner().set_visible(false)}break;case"error":var r=v._request.get_responseData();var m=Error.create(r.StatusDescription,{name:"TripzoomLib.GUI.Map.Map._RequestCompleted"});v._raiseErrorEvent(m);break}},ServiceCallbackSucceeded:function(f,e,d){switch(d){case"GetBuienradarUrl":img=e.createLayer("RADAR",5,false,f);break}},ServiceCallbackFailed:function(d,e,f){alert(d.message)},createLayer:function(f,k,g,m){x=0;y=0;w=this.get_width();h=this.get_height();switch(f){case"RADAR":var l=new TripzoomLib.Element.Rect(0,7544789,1207132,6250062);w=l.get_width()/this.get_mapview().get_mppixX();h=l.get_height()/this.get_mapview().get_mppixY();x=Math.round((-this.get_mapview().get_viewrect().left+l.left)/this.get_mapview().get_mppixX());y=Math.round((this.get_mapview().get_viewrect().top-l.top)/this.get_mapview().get_mppixY());break;case"STREET":m=TripzoomLib.Constants.EXTERN_URL+"image.ashx?rect="+this.get_mapview().get_viewrect().get_rect()+"&width="+this.get_width()+"&height="+this.get_height();if(f.length>0){m+="&layers="+f}m+="&transparent=true";m+="&caching=false";m+="&language="+this._language;break;default:m=TripzoomLib.Constants.EXTERN_URL+"image.ashx?rect="+this.get_mapview().get_viewrect().get_rect()+"&width="+this.get_width()+"&height="+this.get_height();if(f.length>0){m+="&layers="+f}m+="&transparent=true";if(g){m+="&caching=true&cachingtype=private"}else{m+="&caching=false"}m+="&language="+this._language;break}staticimage=$create(TripzoomLib.GUI.Map.StaticImage,{mapcontrol:this,url:m,zindex:k,left:x,top:y,width:w,height:h});this._staticimagelayer.add_staticimage(staticimage);return staticimage.get_image()},updateScalebar:function(){var b=this.get_mapview().get_mppixX();this._scalebar.update(b)},Pan:function(g,e){step=(arguments.length==2)?1:arguments[2]+1;if(step==1){this.isBusy=true;if(this.get_mapview().get_tiled()){this.currentMapLayer=-this.currentMapLayer;var k=this.getTileLayer();k.innerHTML="";this.currentMapLayer=-this.currentMapLayer}if(this._staticimagelayer){this._staticimagelayer.set_visible(false)}if(this.get_layermanager()){this.get_layermanager().set_visible(false)}}if(this.get_mapview().get_tiled()){var k=this.getTileLayer();k.style.left=this.get_mapview().dx+(g*(step/this.zoomsteps))+"px";k.style.top=this.get_mapview().dy+(e*(step/this.zoomsteps))+"px"}if(step<this.zoomsteps){window.setTimeout("_Map.Pan("+g+","+e+","+step+")",this.timeOut)}else{try{if(this.get_mapview().get_tiled()){this.get_mapview().updateMap(g,e);this.Update()}else{var m=this.get_mapview().get_viewrect();m.left-=(g)*m.get_width()/this.get_width();m.top+=(e)*m.get_height()/this.get_height();m.right-=(g)*m.get_width()/this.get_width();m.bottom+=(e)*m.get_height()/this.get_height();this.set_rect(m)}}catch(l){alert(l.message)}this.isBusy=false}},Drag:function(e){var f=e.clientX-this.startx;var k=e.clientY-this.starty;if(this.get_mapview().get_tiled()){var g=this.getTileLayer();g.style.left=(this.get_mapview().dx+f)+"px";g.style.top=(this.get_mapview().dy+k)+"px"}var g=this._staticimagelayer;g.set_left(f);g.set_top(k);if(this.get_layermanager()){this.get_layermanager().get_element().style.left=(f)+"px";this.get_layermanager().get_element().style.top=(k)+"px"}if(this.get_tiled()&&this.get_overviewmap()){this.get_overviewmap().Update()}},stopDrag:function(m,g,k){if(g){this.startx=g}if(k){this.starty=k}var l=m.clientX-this.startx;var n=m.clientY-this.starty;if(this.get_mapview().get_tiled()){this.get_mapview().updateMap(l,n);this.Update()}else{var o=this.get_mapview().get_viewrect();o.left-=(l)*o.get_width()/this.get_width();o.top+=(n)*o.get_height()/this.get_height();o.right-=(l)*o.get_width()/this.get_width();o.bottom+=(n)*o.get_height()/this.get_height();this.set_rect(o)}this.isBusy=false},ZoomTo:function(g){if(this.get_mapview().get_tiled()){var n=this._staticimagelayer;n.set_visible(false);this.get_mapview().set_scale(g);this.get_mapview().createMap(this.get_mapview().get_viewrect().centerx(),this.get_mapview().get_viewrect().centery());this.Update()}else{var l=this.get_mapview().get_viewrect();var m=l.centerx();var k=l.centery();var o=new TripzoomLib.Element.Rect();o.left=Math.round(m-g);o.top=Math.round(k+g);o.right=Math.round(m+g);o.bottom=Math.round(k-g);this.set_rect(o)}},Zoom:function(n,l,m){this.isBusy=true;var o=TripzoomLib.Utils.getScrollXY();if(!l){l=this.get_width()/2+this.get_left()}if(!m){m=this.get_height()/2+this.get_top()}l=l-this.get_left()+o[0];m=m-this.get_top()+o[1];if(this.get_mapview().get_tiled()){if(this.get_mapview().get_scale()/n<TripzoomLib.Constants.MIN_SCALE){this.isBusy=false;return}else{this.get_mapview().set_scale(this.get_mapview().get_scale()/n)}this._mapviewTmp={left:this.get_mapview().get_viewrect().left,top:this.get_mapview().get_viewrect().top,x0:this.get_mapview().x0,y0:this.get_mapview().y0,dx:this.get_mapview().dx,dy:this.get_mapview().dy,mppix:this.get_mapview().mppix};this.get_mapview().createMap(this.get_mapview().get_viewrect().left+l*this.get_mapview().mppix,this.get_mapview().get_viewrect().top-m*this.get_mapview().mppix);if(this.get_layermanager()){this.get_layermanager().set_visible(false)}var p=this._staticimagelayer;p.set_visible(false);p=this.getTileLayer();p.style.zIndex=0;this.currentMapLayer=-this.currentMapLayer;p=this.getTileLayer();p.style.zIndex=1;xcoord=this._mapviewTmp.left+l*this._mapviewTmp.mppix;ycoord=this._mapviewTmp.top-m*this._mapviewTmp.mppix;dx=this.get_width()/2-n*((xcoord-this._mapviewTmp.x0)/this._mapviewTmp.mppix);dy=this.get_height()/2-n*((this._mapviewTmp.y0-ycoord)/this._mapviewTmp.mppix);var p=this.getTileLayer();p.innerHTML="";p.style.zIndex=0;this.currentMapLayer=-this.currentMapLayer;p=this.getTileLayer();p.style.zIndex=1;this.Update()}else{var k=this.get_mapview().get_viewrect();var q=new TripzoomLib.Element.Rect();l=k.left+(l)*k.get_width()/this.get_width();m=k.bottom+(this.get_height()-m)*k.get_height()/this.get_height();q.left=Math.round(l-0.5*k.get_width()/n);q.top=Math.round(m+0.5*k.get_height()/n);q.right=Math.round(l+0.5*k.get_width()/n);q.bottom=Math.round(m-0.5*k.get_height()/n);this.set_rect(q)}this.isBusy=false},get_navigationtool:function(){return this._navigationtool},set_navigationtool:function(b){this._navigationtool=b},get_tiled:function(){return this._tiled},set_tiled:function(b){this._tiled=b},get_width:function(){return this._width},set_width:function(b){this._width=b},get_height:function(){return this._height},set_height:function(b){this._height=b},get_viewmode:function(){return this._viewmode},set_viewmode:function(b){if(this._viewmode!=b){this._viewmode=b;switch(this._viewmode){case TripzoomLib.MapViewMode.MAP:this.set_navaction(TripzoomLib.NavigationAction.VIEWMODE_MAP);break;case TripzoomLib.MapViewMode.AERIAL:this.set_navaction(TripzoomLib.NavigationAction.VIEWMODE_SAT);break;case TripzoomLib.MapViewMode.HYBRID:this.set_navaction(TripzoomLib.NavigationAction.VIEWMODE_HYB);break}}},get_navaction:function(){return this._navaction},set_navaction:function(b){TripzoomLib.Net.RequestManager.Abort();this._navaction=b;switch(this._navaction){case TripzoomLib.NavigationAction.ZOOMOUT:this.Zoom(0.5);break;case TripzoomLib.NavigationAction.SCALEBAR_7:this.ZoomTo(500);break;case TripzoomLib.NavigationAction.SCALEBAR_6:this.ZoomTo(1000);break;case TripzoomLib.NavigationAction.SCALEBAR_5:this.ZoomTo(5000);break;case TripzoomLib.NavigationAction.SCALEBAR_4:this.ZoomTo(10000);break;case TripzoomLib.NavigationAction.SCALEBAR_3:this.ZoomTo(50000);break;case TripzoomLib.NavigationAction.SCALEBAR_2:this.ZoomTo(100000);break;case TripzoomLib.NavigationAction.SCALEBAR_1:this.ZoomTo(200000);break;case TripzoomLib.NavigationAction.ZOOMIN:this.Zoom(2);break;case TripzoomLib.NavigationAction.NAVMODE_ZOOM:this._navigation.get_zoombox().set_enabled(true);this._navigation.set_mode(TripzoomLib.NavigationMode.ZOOMING);break;case TripzoomLib.NavigationAction.NAVMODE_MOVE:this._navigation.get_zoombox().set_enabled(false);this._navigation.set_mode(TripzoomLib.NavigationMode.MOVING);break;case TripzoomLib.NavigationAction.NAVMODE_EDIT:this._navigation.get_zoombox().set_enabled(false);this._navigation.set_mode(TripzoomLib.NavigationMode.EDITING);break;case TripzoomLib.NavigationAction.OVERVIEW:this.get_overviewmap().setVisible(!this.get_overviewmap().isVisible);break;case TripzoomLib.NavigationAction.VIEWMODE_MAP:if(this.get_mapview().get_tiled()){this._copyright.set_text(TripzoomLib.Constants.COPYRIGHT)}this.showSatellite(false,false);break;case TripzoomLib.NavigationAction.VIEWMODE_SAT:if(this.get_mapview().get_tiled()){this._copyright.set_text(TripzoomLib.Constants.COPYRIGHT_EUROSENSE)}this.showSatellite(true,false);break;case TripzoomLib.NavigationAction.VIEWMODE_HYB:if(this.get_mapview().get_tiled()){this._copyright.set_text(TripzoomLib.Constants.COPYRIGHT_EUROSENSE)}this.showSatellite(true,true);break}switch(this._navigation.get_mode()){case TripzoomLib.NavigationMode.ZOOMING:document.body.style.cursor="url('"+TripzoomLib.Constants.IMAGE_URL+"cursors/magnify.cur'), auto";break;case TripzoomLib.NavigationMode.MOVING:document.body.style.cursor="url('"+TripzoomLib.Constants.IMAGE_URL+"cursors/openhand.cur'), auto";break;case TripzoomLib.NavigationMode.EDITING:document.body.style.cursor="url('"+TripzoomLib.Constants.IMAGE_URL+"cursors/pin.cur'), auto";break}},add_changed:function(b){this.get_events().addHandler("changed",b)},remove_changed:function(b){this.get_events().removeHandler("changed",b)},_raiseChangedEvent:function(){handler=this.get_events().getHandler("changed");if(handler){handler(this,Sys.EventArgs.Empty)}},add_load:function(b){this.get_events().addHandler("load",b)},remove_load:function(b){this.get_events().removeHandler("load",b)},_raiseLoadEvent:function(){if(!this._isLoaded){this._isLoaded=true;handler=this.get_events().getHandler("load");if(handler){handler(this,Sys.EventArgs.Empty)}}},add_resize:function(b){this.get_events().addHandler("resize",b)},remove_resize:function(b){this.get_events().removeHandler("resize",b)},_raiseResizeEvent:function(){if(!this._isLoaded){this._isLoaded=true;handler=this.get_events().getHandler("resize");if(handler){handler(this,Sys.EventArgs.Empty)}}},add_click:function(b){this.get_events().addHandler("click",b)},remove_click:function(b){this.get_events().removeHandler("click",b)},_raiseClickEvent:function(){handler=this.get_events().getHandler("click");if(handler){handler(this,Sys.EventArgs.Empty)}},add_error:function(b){this.get_events().addHandler("error",b)},remove_error:function(b){this.get_events().removeHandler("error",b)},_raiseErrorEvent:function(b){handler=this.get_events().getHandler("error");if(handler){handler(this,b)}}};TripzoomLib.GUI.Map.Map.registerClass("TripzoomLib.GUI.Map.Map",Sys.Component);Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.GUI");Type.registerNamespace("TripzoomLib.GUI.Map");TripzoomLib.GUI.Map.BaseControl=function(b){TripzoomLib.GUI.Map.BaseControl.initializeBase(this);this._mapcontrol=b;this._element=null;this._visible=true;this._zindex=0;this._parent=null};TripzoomLib.GUI.Map.BaseControl.prototype={initialize:function(){TripzoomLib.GUI.Map.BaseControl.callBaseMethod(this,"initialize");this._element=document.createElement("DIV");if(this._zindex>0){this._element.style.zIndex=this._zindex}if(!this._parent){this._parent=this._mapcontrol.get_element()}this._parent.appendChild(this._element);this.add_propertyChanged(this._onPropertyChanged)},dispose:function(){this._raiseUnload();this.remove_propertyChanged(this._onPropertyChanged);TripzoomLib.GUI.Map.BaseControl.callBaseMethod(this,"dispose")},_onPropertyChanged:function(d,c){switch(c.get_propertyName()){case"visible":d.get_element().style.display=(d.get_visible())?"block":"none";break}},get_element:function(){return this._element},set_parent:function(b){this._parent=b},get_parent:function(){return this._parent},get_mapcontrol:function(){return this._mapcontrol},set_mapcontrol:function(b){this._mapcontrol=b},get_zindex:function(){return this._zindex},set_zindex:function(b){this._zindex=b},set_visible:function(b){if(this._visible!=b){this._visible=b;this.raisePropertyChanged("visible")}},get_visible:function(){return this._visible},Update:function(){this._raiseUpdated()},_raiseUpdated:function(){handler=this.get_events().getHandler("updated");if(handler){handler(this,Sys.EventArgs.Empty)}},add_updated:function(b){this.get_events().addHandler("updated",b)},remove_updated:function(b){this.get_events().removeHandler("updated",b)},_raiseUnload:function(){handler=this.get_events().getHandler("unload");if(handler){handler(this,Sys.EventArgs.Empty)}},add_unload:function(b){this.get_events().addHandler("unload",b)},remove_unload:function(b){this.get_events().removeHandler("unload",b)}};TripzoomLib.GUI.Map.BaseControl.registerClass("TripzoomLib.GUI.Map.BaseControl",Sys.Component);Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.GUI");Type.registerNamespace("TripzoomLib.GUI.Map");TripzoomLib.GUI.Map.Scalebar=function(b){TripzoomLib.GUI.Map.Scalebar.initializeBase(this,[b]);this._scalevalue=null;this._scaleimg=null};TripzoomLib.GUI.Map.Scalebar.prototype={initialize:function(){TripzoomLib.GUI.Map.Scalebar.callBaseMethod(this,"initialize");element=this.get_element();element.className="scalebarLayer";img=document.createElement("IMG");img.src=TripzoomLib.Constants.IMAGE_URL+"map/scaletick.gif";img.style.verticalAlign="middle";element.appendChild(img);this._scaleimg=document.createElement("IMG");this._scaleimg.src=TripzoomLib.Constants.IMAGE_URL+"map/scalepixel.gif";this._scaleimg.style.height="1px";this._scaleimg.style.verticalAlign="middle";element.appendChild(this._scaleimg);img=document.createElement("IMG");img.src=TripzoomLib.Constants.IMAGE_URL+"map/scaletick.gif";img.style.verticalAlign="middle";element.appendChild(img);this._scalevalue=document.createElement("SPAN");this._scalevalue.style.marginLeft="4px";element.appendChild(this._scalevalue)},dispose:function(){TripzoomLib.GUI.Map.Scalebar.callBaseMethod(this,"dispose")},update:function(g){var f=0;var k=0;var l=new Array(10,50,100,200,500,1000,5000,10000,20000,50000,100000,200000,5000000,1000000,2000000,3000000,4000000,9999000);for(var m=0;m<l.length;m++){k=l[m]/g;f=l[m];if(k>30&&k<250){break}}this._scaleimg.style.width=k+"px";this._scalevalue.innerHTML=(f<1000)?f+" m":f/1000+" km";if(this.get_mapcontrol().get_toolbar()){if(f<=100){this.get_mapcontrol().get_toolbar().set_activeAction(TripzoomLib.NavigationAction.SCALEBAR_7)}else{if(f<=200){this.get_mapcontrol().get_toolbar().set_activeAction(TripzoomLib.NavigationAction.SCALEBAR_6)}else{if(f<=1000){this.get_mapcontrol().get_toolbar().set_activeAction(TripzoomLib.NavigationAction.SCALEBAR_5)}else{if(f<=5000){this.get_mapcontrol().get_toolbar().set_activeAction(TripzoomLib.NavigationAction.SCALEBAR_4)}else{if(f<=10000){this.get_mapcontrol().get_toolbar().set_activeAction(TripzoomLib.NavigationAction.SCALEBAR_3)}else{if(f<=20000){this.get_mapcontrol().get_toolbar().set_activeAction(TripzoomLib.NavigationAction.SCALEBAR_2)}else{this.get_mapcontrol().get_toolbar().set_activeAction(TripzoomLib.NavigationAction.SCALEBAR_1)}}}}}}}}};TripzoomLib.GUI.Map.Scalebar.registerClass("TripzoomLib.GUI.Map.Scalebar",TripzoomLib.GUI.Map.BaseControl);Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.GUI");Type.registerNamespace("TripzoomLib.GUI.Map");TripzoomLib.GUI.Map.Copyright=function(b){TripzoomLib.GUI.Map.Copyright.initializeBase(this,[b]);this._text=TripzoomLib.Constants.COPYRIGHT};TripzoomLib.GUI.Map.Copyright.prototype={initialize:function(){TripzoomLib.GUI.Map.Copyright.callBaseMethod(this,"initialize");element=this.get_element();element.className="copyrightLayer";element.innerHTML=this.get_text()},dispose:function(){TripzoomLib.GUI.Map.Copyright.callBaseMethod(this,"dispose")},get_text:function(){return this._text},set_text:function(b){if(this._text!=b){this._text=b;this.get_element().innerHTML=this._text}}};TripzoomLib.GUI.Map.Copyright.registerClass("TripzoomLib.GUI.Map.Copyright",TripzoomLib.GUI.Map.BaseControl);TripzoomLib.GUI.Map.Zoombox=function(b){TripzoomLib.GUI.Map.Zoombox.initializeBase(this,[b]);this._rect=null;this._enabled=false;this._isDragging=false;this._mouseDownDelegate=Function.createDelegate(this,this._mouseDownHandler);this._mouseMoveDelegate=Function.createDelegate(this,this._mouseMoveHandler);this._mouseUpDelegate=Function.createDelegate(this,this._mouseUpHandler);this._mouseClickDelegate=Function.createDelegate(this,this._mouseClickHandler)};TripzoomLib.GUI.Map.Zoombox.prototype={initialize:function(){TripzoomLib.GUI.Map.Zoombox.callBaseMethod(this,"initialize");this.get_element().className="Zoombox";if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7){this.get_element().style.backgroundColor="transparent"}this._rect=new TripzoomLib.Element.Rect();$addHandler(this.get_mapcontrol().get_element(),"mousedown",this._mouseDownDelegate);$addHandler(this.get_mapcontrol().get_element(),"mouseup",this._mouseUpDelegate);$addHandler(this.get_mapcontrol().get_element(),"mousemove",this._mouseMoveDelegate);$addHandler(this.get_mapcontrol().get_element(),"click",this._mouseClickDelegate)},dispose:function(){$removeHandler(this.get_mapcontrol().get_element(),"mousedown",this._mouseDownDelegate);$removeHandler(this.get_mapcontrol().get_element(),"mouseup",this._mouseUpDelegate);$removeHandler(this.get_mapcontrol().get_element(),"mousemove",this._mouseMoveDelegate);$removeHandler(this.get_mapcontrol().get_element(),"click",this._mouseClickDelegate);TripzoomLib.GUI.Map.Zoombox.callBaseMethod(this,"dispose")},get_enabled:function(){return this._enabled},set_enabled:function(b){this._enabled=b},get_rect:function(){return this._rect},_mouseClickHandler:function(b){if(!this._enabled){return}this.Start(b);this.Stop(b)},_mouseDownHandler:function(b){if(!this._enabled){return}if(b.button==Sys.UI.MouseButton.leftButton){this.Start(b)}},_mouseMoveHandler:function(b){if(!this._enabled){return}this.Move(b)},_mouseUpHandler:function(d){if(!this._enabled){return}if(this.Stop(d)){var c=this.get_events().getHandler(d.type);if(c){c(this,d)}}},Start:function(d){var c=TripzoomLib.Utils.getScrollXY();this._rect.left=d.clientX+c[0];this._rect.top=d.clientY+c[1];this._rect.right=d.clientX+c[0];this._rect.bottom=d.clientY+c[1];this._isDragging=true},Move:function(f){if(!this._isDragging){return}this.get_mapcontrol().get_mapcontrol().get_layermanager().get_popup().hide();var e=this.get_mapcontrol().get_mapcontrol();var d=TripzoomLib.Utils.getScrollXY();this._rect.right=f.clientX+d[0];this._rect.bottom=f.clientY+d[1];this.get_element().style.visibility="visible";if(this._rect.right>this._rect.left){this.get_element().style.left=(this._rect.left-e.get_left())+"px"}else{this.get_element().style.left=(this._rect.right-e.get_left())+"px";this.get_element().style.right=(this._rect.left-e.get_left())+"px"}if(this._rect.top<this._rect.bottom){this.get_element().style.top=(this._rect.top-e.get_top())+"px"}else{this.get_element().style.top=(this._rect.bottom-e.get_top())+"px";this.get_element().style.bottom=(this._rect.top-e.get_top())+"px"}this.get_element().style.width=this._rect.Width()+"px";this.get_element().style.height=this._rect.Height()+"px"},Stop:function(d){if(this._isDragging){var c=TripzoomLib.Utils.getScrollXY();this._rect.right=d.clientX+c[0];this._rect.bottom=d.clientY+c[1];this.get_element().style.width="0px";this.get_element().style.height="0px";this.get_element().style.visibility="hidden";this._isDragging=false;return true}return false},add_mousedown:function(b){this.get_events().addHandler("mousedown",b)},remove_mousedown:function(b){this.get_events().removeHandler("mousedown",b)},add_mousemove:function(b){this.get_events().addHandler("mousemove",b)},remove_mousemove:function(b){this.get_events().removeHandler("mousemove",b)},add_mouseup:function(b){this.get_events().addHandler("mouseup",b)},remove_mouseup:function(b){this.get_events().removeHandler("mouseup",b)}};TripzoomLib.GUI.Map.Zoombox.registerClass("TripzoomLib.GUI.Map.Zoombox",TripzoomLib.GUI.Map.BaseControl);Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.GUI");Type.registerNamespace("TripzoomLib.GUI.Map");TripzoomLib.GUI.Map.ToolTip=function(b){TripzoomLib.GUI.Map.ToolTip.initializeBase(this,[b])};TripzoomLib.GUI.Map.ToolTip.prototype={initialize:function(){TripzoomLib.GUI.Map.ToolTip.callBaseMethod(this,"initialize");element=this.get_element();element.className="tooltipLayer";element.innerHTML='<table cellpadding="2" cellspacing="0" border="0"><tr><td><img src="'+TripzoomLib.Constants.IMAGE_URL+'map/tooltip.gif" alt=""/></td><td style="padding-left:10px;vertical-align:top;"><div id="tooltiptextDIV" name="tooltiptextDIV"></div></td></tr></table>';element.style.zIndex=200;element.style.width="250px"},dispose:function(){TripzoomLib.GUI.Map.ToolTip.callBaseMethod(this,"dispose")}};TripzoomLib.GUI.Map.ToolTip.registerClass("TripzoomLib.GUI.Map.ToolTip",TripzoomLib.GUI.Map.BaseControl);Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.GUI");Type.registerNamespace("TripzoomLib.GUI.Map");TripzoomLib.GUI.Map.Navigation=function(b){TripzoomLib.GUI.Map.Navigation.initializeBase(this,[b]);this._mode=TripzoomLib.NavigationMode.MOVING;this._zoombox=null;this._contextmenu=null;this._navigationbehavior=null;this._getInfoDelegate=null;this._zoomInDelegate=null;this._zoomOutDelegate=null};TripzoomLib.GUI.Map.Navigation.prototype={initialize:function(){TripzoomLib.GUI.Map.Navigation.callBaseMethod(this,"initialize");var c=this.get_element();c.className="layer";c.innerHTML='<img src="'+TripzoomLib.Constants.IMAGE_URL+'trans.gif" width="100%" height="100%" />';this._navigationbehavior=$create(TripzoomLib.GUI.Map.NavigationBehavior,{control:this},null,null,c);this._zoombox=$create(TripzoomLib.GUI.Map.Zoombox,{mapcontrol:this,enabled:true});this._getInfoDelegate=Function.createDelegate(this,this._getInfo);this._zoomInDelegate=Function.createDelegate(this,this._zoomIn);this._zoomOutDelegate=Function.createDelegate(this,this._zoomOut);var d=[];Array.add(d,$create(TripzoomLib.GUI.ContextMenuItem,{text:TripzoomLib.Resources.Resource.zoom_in},{click:this._zoomInDelegate}));Array.add(d,$create(TripzoomLib.GUI.ContextMenuItem,{text:TripzoomLib.Resources.Resource.zoom_out},{click:this._zoomOutDelegate}));if((this.get_mapcontrol().get_navigationtool()&TripzoomLib.NavigationTool.Edit)==TripzoomLib.NavigationTool.Edit){Array.add(d,$create(TripzoomLib.GUI.ContextMenuSeparator));Array.add(d,$create(TripzoomLib.GUI.ContextMenuItem,{text:TripzoomLib.Resources.Resource.show_address_info},{click:this._getInfoDelegate}))}this._contextmenu=$create(TripzoomLib.GUI.ContextMenu,{items:d},null,null,c);this.set_mode(TripzoomLib.NavigationMode.ZOOMING)},dispose:function(){TripzoomLib.GUI.Map.Navigation.callBaseMethod(this,"dispose")},get_zoombox:function(){return this._zoombox},get_contextmenu:function(){return this._contextmenu},get_mode:function(){return this._mode},set_mode:function(b){if(this._mode!=b){this._mode=b}},_getInfo:function(b){this.get_mapcontrol().setLocation(this.get_contextmenu().get_x(),this.get_contextmenu().get_y())},_zoomIn:function(b){this.get_mapcontrol().Zoom(2,this.get_contextmenu().get_x(),this.get_contextmenu().get_y())},_zoomOut:function(b){this.get_mapcontrol().Zoom(0.5,this.get_contextmenu().get_x(),this.get_contextmenu().get_y())}};TripzoomLib.GUI.Map.Navigation.registerClass("TripzoomLib.GUI.Map.Navigation",TripzoomLib.GUI.Map.BaseControl);TripzoomLib.GUI.Map.NavigationBehavior=function(b){TripzoomLib.GUI.Map.NavigationBehavior.initializeBase(this,[b]);this._timer=null;this._control=null;this._currentNavigationAction=null;this._lastAction=null;this._CommonEventDelegate=Function.createDelegate(this,this._CommonEventHandler);this._DisableEventDelegate=Function.createDelegate(this,this._DisableEventHandler)};TripzoomLib.GUI.Map.NavigationBehavior.prototype={initialize:function(){TripzoomLib.GUI.Map.NavigationBehavior.callBaseMethod(this,"initialize");$addHandler(this.get_element(),"mousedown",this._CommonEventDelegate);$addHandler(this.get_element(),"mouseover",this._CommonEventDelegate);$addHandler(this.get_element(),"mouseup",this._CommonEventDelegate);$addHandler(this.get_element(),"mousemove",this._CommonEventDelegate);$addHandler(this.get_element(),"mouseout",this._CommonEventDelegate);$addHandler(this.get_element(),"click",this._CommonEventDelegate);$addHandler(this.get_element(),"selectstart",this._DisableEventDelegate);$addHandler(this.get_element(),"contextmenu",this._DisableEventDelegate)},dispose:function(){$removeHandler(this.get_element(),"mouseup",this._CommonEventDelegate);$removeHandler(this.get_element(),"mousedown",this._CommonEventDelegate);$removeHandler(this.get_element(),"mousemove",this._CommonEventDelegate);$removeHandler(this.get_element(),"mouseout",this._CommonEventDelegate);$removeHandler(this.get_element(),"click",this._CommonEventDelegate);$removeHandler(this.get_element(),"selectstart",this._DisableEventDelegate);$removeHandler(this.get_element(),"contextmenu",this._DisableEventDelegate);TripzoomLib.GUI.Map.NavigationBehavior.callBaseMethod(this,"dispose")},get_control:function(){return this._control},set_control:function(b){this._control=b},get_lastAction:function(){return this._lastAction},_DisableEventHandler:function(b){b.preventDefault();b.stopPropagation();return false},_CommonEventHandler:function(k){var f=this._control.get_mapcontrol();if(f.isBusy){return}var g=Sys.UI.DomElement.getBounds(f.get_element());f.set_left(g.x);f.set_top(g.y);f.set_width(g.width);f.set_height(g.height);if(!this.get_control().get_contextmenu().isHidden()){return}switch(k.type){case"mousedown":this._mouseDown(this,k);break;case"mousemove":this._mouseMove(this,k);break;case"mouseover":this._mouseOver(this,k);break;case"mouseup":TripzoomLib.Net.RequestManager.Abort();this._mouseUp(this,k);break;case"dblclick":TripzoomLib.Net.RequestManager.Abort();this._doubleClick(this,k);break;case"click":this._mouseClick(this,k);break}var b=this.get_events().getHandler(k.type);if(b){b(this,k)}k.preventDefault()},add_mousedown:function(b){this.get_events().addHandler("mousedown",b)},remove_mousedown:function(b){this.get_events().removeHandler("mousedown",b)},add_mousemove:function(b){this.get_events().addHandler("mousemove",b)},remove_mousemove:function(b){this.get_events().removeHandler("mousemove",b)},add_mouseup:function(b){this.get_events().addHandler("mouseup",b)},remove_mouseup:function(b){this.get_events().removeHandler("mouseup",b)},add_mouseover:function(b){this.get_events().addHandler("mouseover",b)},remove_mouseover:function(b){this.get_events().removeHandler("mouseover",b)},add_mouseout:function(b){this.get_events().addHandler("mouseout",b)},remove_mouseout:function(b){this.get_events().removeHandler("mouseout",b)},add_click:function(b){this.get_events().addHandler("click",b)},remove_click:function(b){this.get_events().removeHandler("click",b)},add_dblclick:function(b){this.get_events().addHandler("dblclick",b)},remove_dblclick:function(b){this.get_events().removeHandler("dblclick",b)},_mouseDown:function(d,c){if(!this.get_control().get_mode()||this.get_control().get_mode()==TripzoomLib.NavigationMode.MOVING){document.body.style.cursor="url('"+TripzoomLib.Constants.IMAGE_URL+"cursors/closedhand.cur'), auto";this.get_control().set_mode(TripzoomLib.NavigationMode.MOVING)}else{if(this.get_control().get_mode()==TripzoomLib.NavigationMode.ZOOMING){}}this.get_control().get_mapcontrol().startx=c.clientX;this.get_control().get_mapcontrol().starty=c.clientY;this.get_control().get_mapcontrol().isPressed=true;if(c.button==Sys.UI.MouseButton.rightButton){this._timer=window.setTimeout(Function.createDelegate(this,this._showContext),500)}},_showContext:function(){this.get_control().get_mapcontrol().isPressed=false;this.get_control().get_contextmenu().showAt(this.get_control().get_mapcontrol().startx,this.get_control().get_mapcontrol().starty);this._timer=null},_mouseMove:function(d,c){if(this.get_control().get_mapcontrol().isPressed){if(!this.get_control().get_mapcontrol().isDragging){if(this.get_control().get_mode()==TripzoomLib.NavigationMode.MOVING){dist=TripzoomLib.Utils.Distance(this.get_control().get_mapcontrol().startx,c.clientX,this.get_control().get_mapcontrol().starty,c.clientY);if(dist>6){this.get_control().get_mapcontrol().isDragging=true;window.clearTimeout(this._timer);this._timer=null}}}if(this.get_control().get_mapcontrol().isDragging){this.get_control().get_mapcontrol().get_layermanager().get_popup().hide();this.get_control().get_mapcontrol().Drag(c)}}else{if(!this.get_control().get_mapcontrol().get_layermanager().get_activeAreaHotspot()&&document.body.style.cursor=="pointer"){switch(this.get_control().get_mode()){case TripzoomLib.NavigationMode.ZOOMING:document.body.style.cursor="url('"+TripzoomLib.Constants.IMAGE_URL+"cursors/magnify.cur'), auto";break;case TripzoomLib.NavigationMode.MOVING:document.body.style.cursor="url('"+TripzoomLib.Constants.IMAGE_URL+"cursors/openhand.cur'), auto";break;case TripzoomLib.NavigationMode.EDITING:document.body.style.cursor="crosshair";break}}}},_mouseOver:function(d,c){switch(this.get_control().get_mode()){case TripzoomLib.NavigationMode.ZOOMING:document.body.style.cursor="url('"+TripzoomLib.Constants.IMAGE_URL+"cursors/magnify.cur'), auto";break;case TripzoomLib.NavigationMode.MOVING:document.body.style.cursor="url('"+TripzoomLib.Constants.IMAGE_URL+"cursors/openhand.cur'), auto";break;case TripzoomLib.NavigationMode.EDITING:document.body.style.cursor="crosshair";break}},_mouseUp:function(l,o){var p=this.get_control().get_mapcontrol();if(!p.isPressed){return}window.clearTimeout(this._timer);this._timer=null;var r=p.isDragging;p.isDragging=false;p.isPressed=false;if(o.button!=Sys.UI.MouseButton.rightButton&&!r&&(this.get_control().get_zoombox().get_rect().Width()<=10&&this.get_control().get_zoombox().get_rect().Height()<=10)){if(this.get_control().get_mapcontrol().get_layermanager().get_activeAreaHotspot()){var n=this.get_control().get_mapcontrol().get_layermanager().get_activeAreaHotspot();var q=this.get_control().get_mapcontrol();n.set_position(new TripzoomLib.Element.Point(o.clientX-q.get_left(),o.clientY-q.get_top()));n.get_layer().get_popup().show(n);this.get_control().get_mapcontrol().get_layermanager().set_activeAreaHotspot(null);return}}switch(this.get_control().get_mode()){case TripzoomLib.NavigationMode.ZOOMING:document.body.style.cursor="url('"+TripzoomLib.Constants.IMAGE_URL+"cursors/magnify.cur'), auto";break;case TripzoomLib.NavigationMode.MOVING:document.body.style.cursor="url('"+TripzoomLib.Constants.IMAGE_URL+"cursors/openhand.cur'), auto";break;case TripzoomLib.NavigationMode.EDITING:document.body.style.cursor="crosshair";break}switch(this.get_control().get_mode()){case TripzoomLib.NavigationMode.EDITING:p.setLocation(o.clientX,o.clientY);break;case TripzoomLib.NavigationMode.ZOOMING:if(o.button==Sys.UI.MouseButton.rightButton){p.Zoom(0.5,o.clientX,o.clientY)}else{if(o.button==Sys.UI.MouseButton.leftButton){if(this.get_control().get_zoombox().get_rect().Width()>10&&this.get_control().get_zoombox().get_rect().Height()>10){rect=this.get_control().get_zoombox().get_rect();if(p.get_mapview().get_tiled()){scale=TripzoomLib.Utils.ZoomToScale((Math.min(rect.Width(),rect.Height())/p.get_width())*TripzoomLib.Constants.TILE_SIZE*p.get_mapview().mppix);p.Zoom(p.get_mapview().get_scale()/scale,rect.centerx(),rect.centery())}else{var k=p.get_mapview().get_viewrect();var m=new TripzoomLib.Element.Rect();m.left=k.left+(rect.left-p.get_left())*k.get_width()/p.get_width();m.top=k.bottom+(p.get_height()-(rect.top-p.get_top()))*k.get_height()/p.get_height();m.right=k.left+(rect.right-p.get_left())*k.get_width()/p.get_width();m.bottom=k.bottom+(p.get_height()-(rect.bottom-p.get_top()))*k.get_height()/p.get_height();p.set_rect(m)}}else{rect=this.get_control().get_zoombox().get_rect();dx=-rect.centerx()+p.get_width()/2+p.get_left();dy=-rect.centery()+p.get_height()/2+p.get_top();p.Pan(dx,dy)}}}break;case TripzoomLib.NavigationMode.MOVING:if(r){p.stopDrag(o)}else{if(o.button==Sys.UI.MouseButton.rightButton){p.Zoom(0.5,o.clientX,o.clientY)}else{if((o.button==Sys.UI.MouseButton.leftButton)){p.Zoom(2,o.clientX,o.clientY)}}}break}this._lastAction=this.get_control().get_mode()},_doubleClick:function(d,c){d.Zoom(2,this.get_control().get_mapcontrol().get_width()/2,this.get_control().get_mapcontrol().get_height()/2,false);this._lastAction=TripzoomLib.NavigationMode.ZOOMING},_mouseClick:function(d){sender=this.get_control();if(!sender.isPressed){return}window.clearTimeout(this._timer);this._timer=null;var c=TripzoomLib.Utils.getScrollXY();dx=-(d.clientX+c[0]-this.get_control().get_mapcontrol().offsetX-this.get_control().get_mapcontrol().get_width()/2)*this.get_control().get_mapcontrol().get_mapview().mppix/this.get_control().get_mapcontrol().get_mapview().mppix;dy=-(d.clientY+c[1]-this.get_control().get_mapcontrol().offsetY-this.get_control().get_mapcontrol().get_height()/2)*this.get_control().get_mapcontrol().get_mapview().mppix/this.get_control().get_mapcontrol().get_mapview().mppix;this.get_control().get_mapcontrol().Zoom(dx,dy);this.get_control().get_mapcontrol().isPressed=false;this.get_control().get_mapcontrol().isDragging=false;this._lastAction=TripzoomLib.NavigationMode.ZOOMING},_mouseWheel:function(f,d){var e=true;if(this.get_control().get_mapcontrol()._ScrollWheel){if(this.get_control().get_mapcontrol().eventsEnabled){if(this.get_control().get_mapcontrol().wheelDelta>0){this.get_control().get_mapcontrol().Zoom(2,this.get_control().get_mapcontrol().get_width()/2,this.get_control().get_mapcontrol().get_height()/2,false)}else{this.get_control().get_mapcontrol().Zoom(0.5,this.get_control().get_mapcontrol().get_width()/2,this.get_control().get_mapcontrol().get_height()/2,false)}}e=false}return e}};TripzoomLib.GUI.Map.NavigationBehavior.registerClass("TripzoomLib.GUI.Map.NavigationBehavior",Sys.UI.Behavior);Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.GUI");Type.registerNamespace("TripzoomLib.GUI.Map");TripzoomLib.GUI.Map.StaticImageLayer=function(b){TripzoomLib.GUI.Map.StaticImageLayer.initializeBase(this,[b]);this._images=[]};TripzoomLib.GUI.Map.StaticImageLayer.prototype={initialize:function(){TripzoomLib.GUI.Map.StaticImageLayer.callBaseMethod(this,"initialize");this.get_element().className="layer";this.get_element().style.overflow="visible"},clear:function(){for(var b=0;b<this._images.length;b++){this._images[b].get_element().parentNode.removeChild(this._images[b].get_element())}Array.clear(this._images)},add_staticimage:function(b){Array.add(this._images,b);this.get_element().appendChild(b.get_element())},remove_staticimage:function(b){Array.remove(this._images,b);if(b&&b.get_element()&&b.get_element().parentNode){b.get_element().parentNode.removeChild(b.get_element())}},set_left:function(b){this.get_element().style.left=b+"px"},set_top:function(b){this.get_element().style.top=b+"px"},update:function(){for(var b=0;b<this._images.length;b++){this._images[b].reload()}}};TripzoomLib.GUI.Map.StaticImageLayer.registerClass("TripzoomLib.GUI.Map.StaticImageLayer",TripzoomLib.GUI.Map.BaseControl);TripzoomLib.GUI.Map.StaticImage=function(b){TripzoomLib.GUI.Map.StaticImage.initializeBase(this,[b]);this._url=null;this._left=0;this._top=0;this._width=null;this._height=null;this._image=null};TripzoomLib.GUI.Map.StaticImage.prototype={initialize:function(){TripzoomLib.GUI.Map.StaticImage.callBaseMethod(this,"initialize");element=this.get_element();element.className="layer";element.style.zIndex=this._zindex;element.style.left=this._left+"px";element.style.top=this._top+"px";if(this._width){element.style.width=this._width+"px"}if(this._height){element.style.height=this._height+"px"}if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<4){this._image=element.appendChild(document.createElement("DIV"));this._image.style.position="absolute";var b=Sys.UI.DomElement.getBounds(element);img=new Image();img.src=this._url;this._image.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+img.src+"', sizingMethod='scale')";this._image.style.width="100%";this._image.style.height="100%"}else{this._image=element.appendChild(document.createElement("IMG"));this._image.src=this._url;var b=Sys.UI.DomElement.getBounds(this.get_element());this._image.style.width=b.width+"px";if(b.height>50){this._image.style.height=b.height+"px"}else{this._image.style.height="100%"}}},dispose:function(){TripzoomLib.GUI.Map.StaticImage.callBaseMethod(this,"dispose")},get_left:function(){return this._left},set_left:function(b){this._left=b},get_top:function(){return this._top},set_top:function(b){this._top=b},get_width:function(){return this._width},set_width:function(b){this._width=b},get_height:function(){return this._height},set_height:function(b){this._height=b},get_url:function(){return this._url},set_url:function(b){if(this._url!=b){this._url=b}},reload:function(){element=this.get_element();element.innerHTML="";if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<4){this._image=element.appendChild(document.createElement("DIV"));this._image.style.position="absolute";var b=Sys.UI.DomElement.getBounds(element);img=new Image();img.src=this._url;this._image.style.width="100%";this._image.style.height="100%"}else{this._image=element.appendChild(document.createElement("IMG"));this._image.src=this._url;var b=Sys.UI.DomElement.getBounds(this.get_element());this._image.style.width=b.width+"px";this._image.style.height=b.height+"px"}},get_image:function(){return this._image}};TripzoomLib.GUI.Map.StaticImage.registerClass("TripzoomLib.GUI.Map.StaticImage",TripzoomLib.GUI.Map.BaseControl);Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.GUI");Type.registerNamespace("TripzoomLib.GUI.Map");TripzoomLib.GUI.Map.ToolBar=function(b){TripzoomLib.GUI.Map.ToolBar.initializeBase(this,[b]);this._top=NaN;this._left=NaN;this._right=NaN;this._bottom=NaN;this._classNameActive="";this._classNameNonActive="";this._tools=[];this._mouseClickDelegate=Function.createDelegate(this,this._mouseClick)};TripzoomLib.GUI.Map.ToolBar.prototype={initialize:function(){TripzoomLib.GUI.Map.ToolBar.callBaseMethod(this,"initialize");var b=this.get_element();b.style.position="absolute";b.style.border="1px solid gray";b.style.backgroundColor="white";if(!isNaN(this._left)){b.style.left=this._left+"px"}if(!isNaN(this._top)){b.style.top=this._top+"px"}if(!isNaN(this._right)){b.style.right=this._right+"px"}if(!isNaN(this._bottom)){b.style.bottom=this._bottom+"px"}b.style.width="0px";b.style.height="21px";b.style.opacity="0.7";b.style.filter="Alpha(Opacity=70)"},dispose:function(){this._mouseClickDelegate=null;TripzoomLib.GUI.Map.ToolBar.callBaseMethod(this,"dispose")},createImageButton:function(p,q,m,n,l){this.get_element().style.width=(n+l)+"px";var k=document.createElement("IMG");k.src=q;k.title=m;var o=$create(TripzoomLib.GUI.Map.ToolBarButton,{parent:this.get_element(),action:p,control:k,title:m,offsetx:n,width:l},{click:this._mouseClickDelegate});Array.add(this._tools,o);return o},createTextButton:function(p,m,r,q,n,o){this.get_element().style.width=(q+n+((o)?2:0))+"px";var l=document.createElement("DIV");l.className=this._classNameNonActive;l.innerHTML=m;l.title=r;var k=$create(TripzoomLib.GUI.Map.ToolBarButton,{parent:this.get_element(),action:p,control:l,title:r,offsetx:q,width:n},{click:this._mouseClickDelegate});Array.add(this._tools,k);return k},get_classNameActive:function(){return this._classNameActive},set_classNameActive:function(b){this._classNameActive=b},get_classNameNonActive:function(){return this._classNameNonActive},set_classNameNonActive:function(b){this._classNameNonActive=b},get_left:function(){return this._left},set_left:function(b){this._left=b},get_top:function(){return this._top},set_top:function(b){this._top=b},get_right:function(){return this._right},set_right:function(b){this._right=b},get_bottom:function(){return this._bottom},set_bottom:function(b){this._bottom=b},_mouseDown:function(b){b.stopPropagation()},get_tools:function(){return this._tools},set_activeAction:function(b){for(i=0;i<this._tools.length;i++){tool=this._tools[i];if(tool.get_action()==b){tool.get_element().style.filter="Alpha(Opacity=100)";tool.get_element().style.opacity="1.0"}else{tool.get_element().style.filter="Alpha(Opacity=50)";tool.get_element().style.opacity="0.5"}}},_mouseClick:function(d,c){for(i=0;i<this._tools.length;i++){tool=this._tools[i];tool.set_enabled(false);tool.get_control().className=this._classNameNonActive}d.set_enabled(true);d.get_control().className=this._classNameActive;this.get_mapcontrol().set_navaction(d.get_action())}};TripzoomLib.GUI.Map.ToolBar.registerClass("TripzoomLib.GUI.Map.ToolBar",TripzoomLib.GUI.Map.BaseControl);TripzoomLib.GUI.Map.ToolBarButton=function(b){TripzoomLib.GUI.Map.ToolBarButton.initializeBase(this);this._parent=b;this._element=null;this._control=null;this._title=null;this._action=0;this._offsetx=0;this._action=0;this._width=0;this._enabled=false;this._mouseOverDelegate=Function.createDelegate(this,this._raiseMouseOver);this._mouseOutDelegate=Function.createDelegate(this,this._raiseMouseOut);this._mouseClickDelegate=Function.createDelegate(this,this._raiseMouseClick)};TripzoomLib.GUI.Map.ToolBarButton.prototype={initialize:function(){TripzoomLib.GUI.Map.ToolBarButton.callBaseMethod(this,"initialize");this._element=this._parent.appendChild(document.createElement("DIV"));element=this._element;element.style.position="absolute";element.style.opacity="0.50";element.style.filter="Alpha(Opacity=50)";element.style.width=this._width+"px";element.style.left=this._offsetx+"px";element.style.margin="2px";element.appendChild(this._control);$addHandler(this._control,"mouseover",this._mouseOverDelegate);$addHandler(this._control,"mouseout",this._mouseOutDelegate);$addHandler(this._control,"click",this._mouseClickDelegate)},dispose:function(){$clearHandlers(this._control);TripzoomLib.GUI.Map.ToolBarButton.callBaseMethod(this,"dispose")},set_active:function(b){this._element.style.filter="Alpha(Opacity=100)"},get_parent:function(){return this._parent},set_parent:function(b){this._parent=b},get_element:function(){return this._element},get_action:function(){return this._action},set_action:function(b){if(this._action!=b){this._action=b}},get_control:function(){return this._control},set_control:function(b){if(this._control!=b){this._control=b}},get_title:function(){return this._title},set_title:function(b){if(this._title!=b){this._title=b}},get_offsetx:function(){return this._offsetx},set_offsetx:function(b){if(this._offsetx!=b){this._offsetx=b}},get_width:function(){return this._width},set_width:function(b){if(this._width!=b){this._width=b}},get_enabled:function(){return this._enabled},set_enabled:function(b){if(this._enabled!=b){this._enabled=b}},add_mouseover:function(b){this.get_events().addHandler("mouseover",b)},remove_mouseover:function(b){this.get_events().removeHandler("mouseover",b)},_raiseMouseOver:function(b){this.get_element().style.cursor="pointer";this.get_element().style.filter="Alpha(Opacity=100)";this.get_element().style.opacity="1.0";handler=this.get_events().getHandler("mouseover");if(handler){handler(this,b)}},add_mouseout:function(b){this.get_events().addHandler("mouseout",b)},remove_mouseout:function(b){this.get_events().removeHandler("mouseout",b)},_raiseMouseOut:function(b){this.get_element().style.filter="Alpha(Opacity=50)";this.get_element().style.opacity="0.5";handler=this.get_events().getHandler("mouseout");if(handler){handler(this,b)}},add_click:function(b){this.get_events().addHandler("click",b)},remove_click:function(b){this.get_events().removeHandler("click",b)},_raiseMouseClick:function(b){handler=this.get_events().getHandler("click");if(handler){handler(this,b)}}};TripzoomLib.GUI.Map.ToolBarButton.registerClass("TripzoomLib.GUI.Map.ToolBarButton",Sys.Component);Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.GUI");Type.registerNamespace("TripzoomLib.GUI.Map");TripzoomLib.GUI.Map.OverviewTool=function(b){TripzoomLib.GUI.Map.OverviewTool.initializeBase(this,[b])};TripzoomLib.GUI.Map.OverviewTool.prototype={initialize:function(){TripzoomLib.GUI.Map.OverviewTool.callBaseMethod(this,"initialize");element=this.get_element();element.className="navToolMenu2";this.createNavtoolButton(TripzoomLib.NavigationAction.OVERVIEW,TripzoomLib.Constants.IMAGE_URL+"map/button_overview.gif","Overzichtskaart",2,19)}};TripzoomLib.GUI.Map.OverviewTool.registerClass("TripzoomLib.GUI.Map.OverviewTool",TripzoomLib.GUI.Map.ToolBar);TripzoomLib.GUI.Map.MapView=function(){TripzoomLib.GUI.Map.MapView.initializeBase(this);this.isSatellite=false;this._control=null;this._scale=0;this._center=null;this.tileRect=null;this._viewrect=null;this.isUpdated=false;this.dx=0;this.dy=0;this.currentTileX=0;this.currentTileY=0;this._tiled=true;this.mppix=0};TripzoomLib.GUI.Map.MapView.prototype={initialize:function(){TripzoomLib.GUI.Map.MapView.callBaseMethod(this,"initialize");if(this._center){this.createMap(this._center.x,this._center.y)}},get_service:function(){return this._service},set_service:function(b){this._service=b},get_tiled:function(){return this._tiled},set_tiled:function(b){this._tiled=b},get_control:function(){return this._control},set_control:function(b){this._control=b},get_center:function(){return this._center},set_center:function(b){this._center=b},get_scale:function(){return this._scale},set_scale:function(b){this._scale=b},get_viewrect:function(){return this._viewrect},set_viewrect:function(b){Sys.Debug.assert(typeof(b)!="TripzoomLib.Element.Rect","viewrect must be of type TripzoomLib.Element.Rect");if(!this._viewrect||!this._viewrect.Equals(b)){this._viewrect=b}},get_mppixX:function(){var b=0;if(this.get_tiled()){b=this.mppix}else{b=this._viewrect.get_width()/this.get_control().get_width()}return b},get_mppixY:function(){var b=0;if(this.get_tiled()){b=this.mppix}else{b=this._viewrect.get_height()/this.get_control().get_height()}return b},update:function(){if(this.get_tiled()){this.createMap(this._center.x,this._center.y)}},tileCreated:function(d,c){d.dispose()},createTile:function(k,f){var g="";var e="static"+(((k+f)/this._scale)%4);if(TripzoomLib.Constants.USE_STATIC_SERVER){if(this.isSatellite){g="http://"+e+".routenet.eu/xmap/sat_"+k+"_"+f+"_"+this._scale+".jpg"}else{g="http://"+e+".routenet.eu/xmap/map_"+k+"_"+f+"_"+this._scale+".gif"}}else{if(this.isSatellite){g=TripzoomLib.Constants.EXTERN_URL+"image.ashx?x="+k+"&y="+f+"&d="+this._scale+"&width="+TripzoomLib.Constants.TILE_SIZE+"&height="+TripzoomLib.Constants.TILE_SIZE+"&layers=SATELLITE&format=JPG"}else{g=TripzoomLib.Constants.EXTERN_URL+"image.ashx?x="+k+"&y="+f+"&d="+this._scale+"&width="+TripzoomLib.Constants.TILE_SIZE+"&height="+TripzoomLib.Constants.TILE_SIZE}}$create(TripzoomLib.GUI.Map.Tile,{parent:this.get_control().getTileLayer(),left:TripzoomLib.Constants.TILE_SIZE*((k-this.x0)/this._scale),top:TripzoomLib.Constants.TILE_SIZE*((this.y0-f)/this._scale),url:g},{load:this.tileCreated})},createMap:function(o,n){if(!o&&!n){return}this.mppix=this._scale/TripzoomLib.Constants.TILE_SIZE;this._viewrect=new TripzoomLib.Element.Rect(o-0.5*this.get_control().get_width()*this.mppix,n+0.5*this.get_control().get_height()*this.mppix,o+0.5*this.get_control().get_width()*this.mppix,n-0.5*this.get_control().get_height()*this.mppix);if(this.get_control().get_tiled()){var k=this._scale;bufferTiles=0;var l=this.get_control().getTileLayer();l.style.zIndex=0;this.get_control().currentMapLayer=-this.get_control().currentMapLayer;l=this.get_control().getTileLayer();l.style.zIndex=1;l.style.width=this.get_control().get_width()+"px";l.style.height=this.get_control().get_height()+"px";this.x0=(this._viewrect.left>0)?Math.floor(this._viewrect.left/k)*k-bufferTiles*k:Math.floor(this._viewrect.left/k)*k-(bufferTiles+1)*k;this.y0=(this._viewrect.top>0)?Math.floor(this._viewrect.top/k)*k+(bufferTiles+1)*k:Math.floor(this._viewrect.top/k)*k+bufferTiles*k;this.dx=parseInt(0.5*this.get_control().get_width())-(o-this.x0)/this.mppix;this.dy=parseInt(0.5*this.get_control().get_height())-(this.y0-n)/this.mppix;this.dx0=this.dx;this.dy0=this.dy;this.tilesH=Math.ceil(((o-this.x0)/this.mppix+this.get_control().get_width()/2)/TripzoomLib.Constants.TILE_SIZE)+bufferTiles;this.tilesV=Math.ceil(((this.y0-n)/this.mppix+this.get_control().get_height()/2)/TripzoomLib.Constants.TILE_SIZE)+bufferTiles;var m=0;var g=0;for(i=0;i<this.tilesH;i++){for(j=0;j<this.tilesV;j++){m=this.x0+parseInt(i)*this._scale;g=this.y0-parseInt(j)*this._scale;this.createTile(Math.round(m),Math.round(g))}}this.tileRect=new TripzoomLib.Element.Rect(this.x0,this.y0,m,g);l.style.left=(this.dx)+"px";l.style.top=(this.dy)+"px"}},updateDimensions:function(d,c){this._viewrect.left-=d*this.mppix;this._viewrect.right-=d*this.mppix;this._viewrect.top+=c*this.mppix;this._viewrect.bottom+=c*this.mppix;if(this.get_control().get_tiled()){if(this._viewrect.left<this.tileRect.left){this.tileRect.left-=Math.ceil((this.tileRect.left-this._viewrect.left)/this._scale)*this._scale}if(this._viewrect.right>this.tileRect.right){this.tileRect.right-=Math.ceil((this.tileRect.right-this._viewrect.right)/this._scale)*this._scale}if(this._viewrect.top>this.tileRect.top){this.tileRect.top+=Math.ceil((this._viewrect.top-this.tileRect.top)/this._scale)*this._scale}if(this._viewrect.bottom<this.tileRect.bottom){this.tileRect.bottom+=Math.ceil((this._viewrect.bottom-this.tileRect.bottom)/this._scale)*this._scale}}this.isUpdated=true},updateMap:function(){if(!this.get_control().get_tiled()){this.set_viewrect(arguments[0])}else{var f=arguments[0];var d=arguments[1];if(!this.isUpdated){this.updateDimensions(f,d)}x=this.tileRect.left;do{y=this.tileRect.bottom;var e=0;while(y<this.tileRect.top+this._scale){if(x>this._viewrect.left-this._scale&&x<this._viewrect.right){if(y<this._viewrect.top+this._scale&&y>this._viewrect.bottom){this.createTile(Math.round(x),Math.round(y))}}y+=this._scale}x+=this._scale}while(x<this.tileRect.right+this._scale);this.dx+=f;this.dy+=d}this.isUpdated=false}};TripzoomLib.GUI.Map.MapView.registerClass("TripzoomLib.GUI.Map.MapView",Sys.Component);TripzoomLib.GUI.Map.Tile=function(){TripzoomLib.GUI.Map.Tile.initializeBase(this);this._image;this._left;this._top;this._url;this._parent;this._loadedDelegate=Function.createDelegate(this,this._raiseLoad)};TripzoomLib.GUI.Map.Tile.prototype={initialize:function(){TripzoomLib.GUI.Map.Tile.callBaseMethod(this,"initialize");this._image=document.createElement("img");$addHandler(this._image,"load",this._loadedDelegate);this._image.style.position="absolute";this._image.style.display="none";if(TripzoomLib.Constants.DEBUG){this._image.style.border="1px dotted #efefef"}this._image.style.left=this._left+"px";this._image.style.top=this._top+"px";this._image.style.width=TripzoomLib.Constants.TILE_SIZE+"px";this._image.style.height=TripzoomLib.Constants.TILE_SIZE+"px";this._image.src=this._url;this._parent.appendChild(this._image)},dispose:function(){$removeHandler(this._image,"load",this._loadedDelegate);this._loadedDelegate=null;TripzoomLib.GUI.Map.Tile.callBaseMethod(this,"dispose")},get_parent:function(){return this._parent},set_parent:function(b){this._parent=b},get_url:function(){return this._url},set_url:function(b){this._url=b},get_left:function(){return this._left},set_left:function(b){this._left=b},get_top:function(){return this._parent},set_top:function(b){this._top=b},add_load:function(b){this.get_events().addHandler("load",b)},remove_load:function(b){this.get_events().removeHandler("load",b)},_raiseLoad:function(){this._image.style.display="block";handler=this.get_events().getHandler("load");if(handler){handler(this,Sys.EventArgs.Empty)}}};TripzoomLib.GUI.Map.Tile.registerClass("TripzoomLib.GUI.Map.Tile",Sys.Component);TripzoomLib.GUI.Map.Layer=function(b){TripzoomLib.GUI.Map.Layer.initializeBase(this,[b]);this._id=null;this._bitmap=null;this._objects=null;this._objectcount=0;this._positions=null;this._static=false;this._rect=null;this._type=null;this._layermanager=null;this._searchquery="";this._mouseClickDelegate=Function.createDelegate(this,this._mouseClick);this._popup=null;this._canvas=null;this._style=null;this._request=null;this._disposed=false;this._partialloading=true};TripzoomLib.GUI.Map.Layer.prototype={initialize:function(){TripzoomLib.GUI.Map.Layer.callBaseMethod(this,"initialize");this._layermanager=this.get_mapcontrol();this._rect=new TripzoomLib.Element.Rect();this._objects=[];this._positions=[];element=this.get_element();element.className="layer";if(TripzoomLib.Constants.DEBUG){element.id=TripzoomLib.Utils.createUniqueID("layer_"+this.get_id()+"_")}this._request=new TripzoomLib.Net.Request(this._RequestCompleted);this._request.set_sender(this);this._request.initialize()},get_layermanager:function(){return this._layermanager},dispose:function(){var c=this.get_element();if(c){c.innerHTML="";c.parentNode.removeChild(c)}this.Clear();this._objects=null;this._positions=null;this._mouseClickDelegate=null;this._mouseOverDelegate=null;if(typeof(this._staticimage)!="undefined"){var d=this.get_mapcontrol().get_mapcontrol().get_mapcontrol();d.get_staticimagelayer().remove_staticimage(this._staticimage)}this._disposed=true;TripzoomLib.GUI.Map.Layer.callBaseMethod(this,"dispose")},get_id:function(){return this._id},set_id:function(b){this._id=b},get_partialloading:function(){return this._partialloading},set_partialloading:function(b){this._partialloading=b},get_requestHandler:function(b){return this._request},get_popup:function(){return this._popup},set_popup:function(b){this._popup=b},get_bitmap:function(){return this._bitmap},set_bitmap:function(b){this._bitmap=b},get_static:function(){return this._static},set_static:function(b){this._static=b},get_type:function(){return this._type},set_type:function(b){this._type=b},get_style:function(){return this._style},set_style:function(b){this._style=b},get_searchquery:function(){return this._searchquery},set_searchquery:function(b){this._searchquery=b},isLoading:function(b){if(this._static){return}showMapSpinner(b)},Add:function(o){var m=null;switch(o.get_geometry().get_type()){case"Point":var l=this.get_mapcontrol().get_mapcontrol().get_mapcontrol();var p=o.get_geometry();this._rect.Expand(p);m=$create(TripzoomLib.GUI.Map.Controls.MarkerHotspot,{parent:this.get_element(),layerobject:o,position:o.get_geometry().TransformCoordinates(l.get_mapview().get_viewrect(),l.get_width(),l.get_height()),type:this.get_type()},{click:this._mouseClickDelegate});if(m){var k=false;if(Array.contains(this._positions,m.get_position().x+"_"+m.get_position().y)){if(this._objects){for(var n=0;n<this._objects.length;n++){if(this._objects[n].get_type()==TripzoomLib.GUI.Map.Controls.ShapeType.POINT&&this._objects[n].get_position().x==m.get_position().x&&this._objects[n].get_position().y==m.get_position().y){this._objects[n].add_hotspot(m);this._objects[n].update();k=true;break}}}}else{Array.add(this._positions,m.get_position().x+"_"+m.get_position().y)}if(!k){m.show();Array.add(this._objects,m)}this._objectcount++}break;case"Polygon":var q=o.get_geometry();this._rect.Expand(q.get_extents());m=$create(TripzoomLib.GUI.Map.Controls.AreaHotspot,{layer:this,layerobject:o,type:this.get_type()});Array.add(this._objects,m);this._objectcount++;break}return m},AddShape:function(m,l,f){switch(m){case LocatienetLib.MapShapeType.POINT:m=TripzoomLib.GUI.Map.Controls.ShapeType.POINT;this._rect.Expand(new TripzoomLib.Element.Point(l.x,l.y));break;case LocatienetLib.MapShapeType.RECT:m=TripzoomLib.GUI.Map.Controls.ShapeType.RECT;for(var k=0;k<l.length;k++){this._rect.Expand(new TripzoomLib.Element.Point(l[k].x,l[k].y))}break;case LocatienetLib.MapShapeType.POLYGON:m=TripzoomLib.GUI.Map.Controls.ShapeType.POLYGON;for(var k=0;k<l.length;k++){this._rect.Expand(new TripzoomLib.Element.Point(l[k].x,l[k].y))}break;case LocatienetLib.MapShapeType.LINE:m=TripzoomLib.GUI.Map.Controls.ShapeType.LINE;for(var k=0;k<l.length;k++){this._rect.Expand(new TripzoomLib.Element.Point(l[k].x,l[k].y))}break;case LocatienetLib.MapShapeType.CIRCLE:if(!TripzoomLib.GUI.Map.Controls.CircleShapeStyle.isInstanceOfType(f)){throw new Sys.ArgumentTypeException("")}this._rect.Expand(new TripzoomLib.Element.Point(l.x-f.radius,l.y+f.radius));this._rect.Expand(new TripzoomLib.Element.Point(l.x+f.radius,l.y-f.radius));break}var g=$create(TripzoomLib.GUI.Map.Controls.Shape,{canvas:this._canvas,coords:l,type:m,style:(f)?f:this._style},{click:this._mouseClickDelegate});if(g){Array.add(this._objects,g);this._objectcount++}return g},AddLine:function(d,c){return this.AddShape(LocatienetLib.MapShapeType.LINE,d,c)},_mouseClick:function(f,d){var e=this.get_mapcontrol().get_mapcontrol().get_mapcontrol();switch(this.get_type()){case TripzoomLib.GUI.Map.Controls.HotspotType.INFO:case LocatienetLib.MapLayerStyle.INFO:if(f.get_layerobject().get_counter()>1){e.Zoom(4,d.clientX,d.clientY)}else{if(this.get_popup()){this.get_popup().show(f)}}break;case TripzoomLib.GUI.Map.Controls.HotspotType.LINK:case LocatienetLib.MapLayerStyle.LINK:if(f.get_url()){window.open(f.get_url(),"","")}break}},get_rect:function(){return this._rect},set_rect:function(b){this._rect=b},get_objectcount:function(){return this._objectcount},Clear:function(){if(this._objects){for(var b=0;b<this._objects.length;b++){if(this._objects[b]){this._objects[b].dispose();this._objects[b]=null}}Array.clear(this._objects)}this._objectcount=0;if(this._positions){Array.clear(this._positions)}this._rect=new TripzoomLib.Element.Rect()},_RequestCompleted:function(o,l,q){if(o._disposed){return}var k=o._request.get_responseData();if(k){var m=o.get_mapcontrol().get_mapcontrol().get_mapcontrol();switch(l.toLowerCase()){case"getlayer":if(k.ImageUrl){o._staticimage=$create(TripzoomLib.GUI.Map.StaticImage,{mapcontrol:m,url:k.ImageUrl,zindex:1,left:0,top:0,width:m.get_width(),height:m.get_height()});m.get_staticimagelayer().add_staticimage(o._staticimage);m.get_staticimagelayer().set_visible(true)}if(k.LayerObjects){for(i=0;i<k.LayerObjects.length;i++){o.Add($create(TripzoomLib.Element.LayerObject,{layer:o,geometry:new TripzoomLib.Element.Point(k.LayerObjects[i].Location.point.x,k.LayerObjects[i].Location.point.y),title:k.LayerObjects[i].Title,text:k.LayerObjects[i].Description,bitmap:k.LayerObjects[i].Marker}))}}if(k.MarkerObjects){for(i=0;i<k.MarkerObjects.length;i++){var p=$find(k.MarkerObjects[i].Id);if(p){p.dispose()}var n=$create(TripzoomLib.Element.LayerObject,{layer:o,refid:k.MarkerObjects[i].Id,geometry:new TripzoomLib.Element.Point(k.MarkerObjects[i].Location.point.x,k.MarkerObjects[i].Location.point.y),bitmap:k.MarkerObjects[i].Marker,async:true});if(k.MarkerObjects[i].Count&&k.MarkerObjects[i].Count>1){n.set_counter(k.MarkerObjects[i].Count)}o.Add(n)}}if(k.Hotspots){o.Clear();for(i=0;i<k.Hotspots.length;i++){switch(k.Hotspots[i].Type){case"Polygon":o.Add($create(TripzoomLib.Element.LayerObject,{layer:o,async:true,refid:k.Hotspots[i].Id,geometry:$create(TripzoomLib.Element.Polygon,{exteriorring:k.Hotspots[i].Coords})}));break}}}break;case"getlayerobject":if(o.get_popup()){o.get_popup().show(o)}break}}o.isLoading(false);TripzoomLib.GUI.Map.Layer.callBaseMethod(o,"Update")},LoadLayer:function(o){var l=this.get_mapcontrol().get_mapcontrol().get_mapcontrol();this.Clear();if(this._partialloading){var p=2;var q=o.get_width()/p;var k=o.get_height()/p;for(var r=0;r<p;r++){for(var n=0;n<p;n++){var m=new TripzoomLib.Element.Rect(o.left+r*q,o.top-(n)*k-1,o.left+(r+1)*q-1,o.top-(n+1)*k);this._request.GetLayer($create(TripzoomLib.Net.RequestSettings,{width:l.get_width()/p,height:l.get_height()/p,name:this.get_id(),language:l.get_language(),rect:m,parameters:[this._searchquery]}))}}}else{this._request.GetLayer($create(TripzoomLib.Net.RequestSettings,{width:l.get_width(),height:l.get_height(),name:this.get_id(),language:l.get_language(),rect:o,parameters:[this._searchquery]}))}l._raiseChangedEvent()},get_language:function(){var b=this.get_mapcontrol().get_mapcontrol().get_mapcontrol();return b.get_language()},_CreateCanvas:function(){if(this.get_element().getElementsByTagName("CANVAS").length>0){return}this._canvas=this.get_element().appendChild(document.createElement("CANVAS"));this._canvas.className="layer";this._canvas.width=this.get_mapcontrol().get_mapcontrol().get_mapcontrol().get_width();this._canvas.height=this.get_mapcontrol().get_mapcontrol().get_mapcontrol().get_height();if(typeof G_vmlCanvasManager!="undefined"){this._canvas=G_vmlCanvasManager.initElement(this._canvas)}},Update:function(l){if(!this._static){if(l&&this._rect.Equals(l)){return}else{this._rect=l}}if(this._canvas&&this._canvas.parentNode){this._canvas.parentNode.removeChild(this._canvas)}this._CreateCanvas();if(this._static){if(this._objects){for(var m=0;m<this._objects.length;m++){var k=this._objects[m];if(TripzoomLib.GUI.Map.Controls.Shape.isInstanceOfType(k)){k.set_canvas(this._canvas);k.update()}else{if(TripzoomLib.GUI.Map.Controls.MarkerHotspot.isInstanceOfType(k)){var g=this.get_mapcontrol().get_mapcontrol().get_mapcontrol();var f=k.get_layerobject().get_geometry().TransformCoordinates(g.get_mapview().get_viewrect(),g.get_width(),g.get_height());k.set_position(f);if(this.get_popup()&&this.get_popup().get_visible()){this.get_popup().show(k)}}}}}TripzoomLib.GUI.Map.Layer.callBaseMethod(this,"Update")}else{if(this.get_popup()){this.get_popup().hide()}this.isLoading(true);if(l){this.LoadLayer(l)}}},_raiseClick:function(){handler=this.get_events().getHandler("click");if(handler){handler(this,Sys.EventArgs.Empty)}},add_click:function(b){this.get_events().addHandler("click",b)},remove_click:function(b){this.get_events().removeHandler("click",b)}};TripzoomLib.GUI.Map.Layer.registerClass("TripzoomLib.GUI.Map.Layer",TripzoomLib.GUI.Map.BaseControl);Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.GUI");Type.registerNamespace("TripzoomLib.GUI.Map");TripzoomLib.GUI.Map.TileView=function(b){TripzoomLib.GUI.Map.TileView.initializeBase(this,[b])};TripzoomLib.GUI.Map.TileView.prototype={initialize:function(){TripzoomLib.GUI.Map.TileView.callBaseMethod(this,"initialize");element=this.get_element();element.className="layer";var b=document.createElement("DIV");b.id=this.get_mapcontrol().get_element().id+"_tileLayer-1";b.className="layer";element.appendChild(b);b=document.createElement("DIV");b.id=this.get_mapcontrol().get_element().id+"_tileLayer1";b.className="layer";element.appendChild(b)},dispose:function(){TripzoomLib.GUI.Map.TileView.callBaseMethod(this,"dispose")}};TripzoomLib.GUI.Map.TileView.registerClass("TripzoomLib.GUI.Map.TileView",TripzoomLib.GUI.Map.BaseControl);TripzoomLib.GUI.Map.LayerManager=function(b){TripzoomLib.GUI.Map.LayerManager.initializeBase(this,[b]);this._objects=new Array();this.base=null;this._activeAreaHotspot=null;this._popup=null};TripzoomLib.GUI.Map.LayerManager.prototype={initialize:function(){TripzoomLib.GUI.Map.LayerManager.callBaseMethod(this,"initialize");element=this.get_element();element.style.position="absolute";element.style.width="100%";element.style.height="100%";element.style.top="0px";element.style.left="0px";element.onmousedown=function(){return false};this._objects=new Array();this._popup=$create(TripzoomLib.GUI.Map.Controls.Popup,{mapcontrol:this,parent:this.get_mapcontrol().get_mapcontrol().get_parent()});this._popup.set_visible(false);this.base=$create(TripzoomLib.GUI.Map.Layer,{mapcontrol:this,id:"base",type:TripzoomLib.GUI.Map.Controls.HotspotType.INFO,popup:this._popup,"static":true})},get_activeAreaHotspot:function(){return this._activeAreaHotspot},set_activeAreaHotspot:function(b){this._activeAreaHotspot=b},dispose:function(){if(this._objects){for(var b=0;b<this._objects.length;b++){if(this._objects[b]){this._objects[b].dispose()}}}this._objects=null;if(this.base){this.base.dispose()}this.base=null;this._popup=null;TripzoomLib.GUI.Map.LayerManager.callBaseMethod(this,"dispose")},AddLayer:function(d){var e=null;if(TripzoomLib.GUI.Map.Layer.isInstanceOfType(d)){e=this.Find(d.get_id());if(!e){e=d;e.set_popup(this._popup);Array.add(this._objects,e)}}else{var f=d;e=this.Find(f);if(!e){e=$create(TripzoomLib.GUI.Map.Layer,{mapcontrol:this,id:f,type:TripzoomLib.GUI.Map.Controls.HotspotType.INFO,popup:this._popup});Array.add(this._objects,e)}}return e},Add:function(g,f,k){var e=this.Find(g);if(!e){e=new TripzoomLib.GUI.Map.Layer(this);e.set_id(g);e.set_static(true);e.set_bitmap(f);if(!k){k=TripzoomLib.GUI.Map.Controls.HotspotType.INFO}e.set_type(k);if(k==TripzoomLib.GUI.Map.Controls.HotspotType.INFO){e.set_popup(this._popup)}e.initialize();Array.add(this._objects,e)}return e},Remove:function(c){var d=this.Find(c);if(d){d.dispose();Array.remove(this._objects,d)}},Find:function(d){var e=null;if(this._objects){for(var f=0;f<this._objects.length;f++){if(this._objects[f].get_id()==d){e=this._objects[f];break}}}return e},Update:function(c){this.get_element().style.top="0px";this.get_element().style.left="0px";this.base.Update(c);if(this._objects){for(var d=0;d<this._objects.length;d++){layerObj=this._objects[d];layerObj.Update(c)}}},get_layers:function(){return this._objects},get_popup:function(){return this._popup}};TripzoomLib.GUI.Map.LayerManager.registerClass("TripzoomLib.GUI.Map.LayerManager",TripzoomLib.GUI.Map.BaseControl);Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.GUI");Type.registerNamespace("TripzoomLib.GUI.Map");TripzoomLib.GUI.Map.OverviewMap=function(b){TripzoomLib.GUI.Map.OverviewMap.initializeBase(this,[b]);this._viewframe=null;this._view=null;this._maplayer=null;this._mapview=null;this._width=0;this._height=0;this.isPressed=false;this.isDragging=false;this.isVisible=false;this.startX=0;this.startY=0;this._tiled=true;this._mouseOutDelegate=null;this._mouseOverDelegate=null;this._mouseDownDelegate=null;this._mouseMoveDelegate=null;this._mouseUpDelegate=null;this._request=null;this._staticimagelayer=null};TripzoomLib.GUI.Map.OverviewMap.prototype={initialize:function(){TripzoomLib.GUI.Map.OverviewMap.callBaseMethod(this,"initialize");element=this.get_element();element.style.position="absolute";element.style.overflow="hidden";element.style.opacity="0.9";element.style.filter="Alpha(Opacity=90)";element.style.border="1px solid black";element.style.backgroundColor="white";element.style.width="150px";element.style.height="150px";element.style.top="34px";element.style.right="10px";this._view=document.createElement("DIV");if(this.get_mapcontrol().get_tiled()){this._maplayer=document.createElement("DIV");this._maplayer.style.position="absolute";this._maplayer.width="100%";this._maplayer.height="100%";this._maplayer.style.zIndex=1;this._view.appendChild(this._maplayer)}this._viewframe=document.createElement("IMG");this._viewframe.style.position="absolute";this._viewframe.style.zIndex=2;this._viewframe.width="0px";this._viewframe.height="0px";this._viewframe.src=TripzoomLib.Constants.IMAGE_URL+"trans.gif";this._view.appendChild(this._viewframe);element.appendChild(this._view);this._width=parseInt(element.style.width);this._height=parseInt(element.style.height);this._staticimagelayer=$create(TripzoomLib.GUI.Map.StaticImageLayer,{mapcontrol:this});this._request=new TripzoomLib.Net.Request(this._RequestCompleted);this._request.set_sender(this);this._request.initialize();this._mapview=$create(TripzoomLib.GUI.Map.MapView,{control:this,scale:this.get_mapcontrol().get_mapview().get_scale()*16,tiled:this.get_mapcontrol().get_tiled()})},dispose:function(){TripzoomLib.GUI.Map.OverviewMap.callBaseMethod(this,"dispose")},_RequestCompleted:function(f,k,l){var g=f._request.get_responseData();if(g){f.get_mapview().set_viewrect(new TripzoomLib.Element.Rect().set_rect(g.RectString));var m=$create(TripzoomLib.GUI.Map.StaticImage,{mapcontrol:f,url:g.ImageUrl,zindex:1,left:0,top:0,width:f.get_width(),height:f.get_height()});f._staticimagelayer.clear();f._staticimagelayer.add_staticimage(m);f._staticimagelayer.set_visible(true)}},get_width:function(){return this._width},set_width:function(b){this._width=b},get_height:function(){return this._height},set_height:function(b){this._height=b},get_tiled:function(){return this._tiled},set_tiled:function(b){this._tiled=b},get_mapview:function(){return this._mapview},setCenter:function(c,d){if(this.isVisible){this.centerx=c;this.centery=d;this.Update(this.centerx,this.centery)}},Update:function(){if(this.isVisible){if(this.get_mapcontrol().get_mapview().get_tiled()){this.get_mapview().set_scale(this.get_mapcontrol().get_mapview().get_scale()*8);this.get_mapview().createMap(this.get_mapcontrol().get_mapview().get_viewrect().centerx(),this.get_mapcontrol().get_mapview().get_viewrect().centery())}else{var f=new TripzoomLib.Element.Rect();f.set_rect(this.get_mapcontrol().get_mapview().get_viewrect().toString());f.Expand(1);this.get_mapview().set_viewrect(f)}var k=this.get_mapcontrol().get_mapview().get_mppixX()/this.get_mapview().get_mppixX();var e=this.get_mapcontrol().get_mapview().get_mppixY()/this.get_mapview().get_mppixY();var g=this._viewframe;g.style.border="1px solid blue";g.style.width=Math.round(this.get_mapcontrol().get_mapview().get_viewrect().Width()/this.get_mapview().get_mppixX())+"px";g.style.height=Math.round(this.get_mapcontrol().get_mapview().get_viewrect().Height()/this.get_mapview().get_mppixY())+"px";g.style.left=(this.get_mapcontrol().get_mapview().get_viewrect().left-this.get_mapview().get_viewrect().left)/this.get_mapview().get_mppixX()+k+"px";g.style.top=(this.get_mapview().get_viewrect().top-this.get_mapcontrol().get_mapview().get_viewrect().top)/this.get_mapview().get_mppixY()+e+"px";this._request.CreateMap($create(TripzoomLib.Net.RequestSettings,{rect:this.get_mapview().get_viewrect(),width:this.get_width(),height:this.get_height()}))}},getTileLayer:function(){return this._maplayer},setVisible:function(b){if(this.isVisible!=b){this.isVisible=b;animator=new cFadeAnimator(this.get_element(),90);if(this.isVisible){animator.FadeIn()}else{animator.FadeOut()}this.Update(this.get_mapcontrol().get_mapview().get_viewrect().centerx(),this.get_mapcontrol().get_mapview().get_viewrect().centery())}},_mouseOver:function(b){document.body.style.cursor="url('"+TripzoomLib.Constants.IMAGE_URL+"cursors/openhand.cur'), auto"},_mouseOut:function(b){document.body.style.cursor="pointer"},_mouseDown:function(b){document.body.style.cursor="url('"+TripzoomLib.Constants.IMAGE_URL+"cursors/closedhand.cur'), auto";this.startX=b.clientX;this.startY=b.clientY;this.isPressed=true},_mouseMove:function(e){if(!this.isPressed){return}dx=this.startX-e.clientX;dy=this.startY-e.clientY;if(Math.abs(dx)>10||Math.abs(dy)>10){var d=this._viewframe;var f=Sys.UI.DomElement.getLocation(this._viewframe);Sys.UI.DomElement.setLocation(this._viewframe,f.x-dx,f.y-dy);this.startX=e.clientX;this.startY=e.clientY;this.isDragging=true}},_mouseUp:function(b){if(!this.isPressed){return}if(this.isDragging){this.isDragging=false}this.isPressed=false;document.body.style.cursor="url('"+TripzoomLib.Constants.IMAGE_URL+"cursors/openhand.cur'), auto"}};TripzoomLib.GUI.Map.OverviewMap.registerClass("TripzoomLib.GUI.Map.OverviewMap",TripzoomLib.GUI.Map.BaseControl);Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.GUI");Type.registerNamespace("TripzoomLib.GUI.Map");Type.registerNamespace("TripzoomLib.GUI.Map.Controls");TripzoomLib.GUI.Map.Controls.AreaHotspot=function(){TripzoomLib.GUI.Map.Controls.AreaHotspot.initializeBase(this);this._type=TripzoomLib.GUI.Map.Controls.HotspotType.INFO;this._layer=null;this._layerobject=null;this._mouseMoveDelegate=null;this._position=null;this._clickEventEnabled=false};TripzoomLib.GUI.Map.Controls.AreaHotspot.prototype={initialize:function(){TripzoomLib.GUI.Map.Controls.AreaHotspot.callBaseMethod(this,"initialize");var b=this._layer.get_mapcontrol().get_mapcontrol().get_mapcontrol();if(!this._mouseMoveDelegate){this._mouseMoveDelegate=Function.createDelegate(this,this._mouseMove);$addHandler(b.get_navigation().get_element(),"mousemove",this._mouseMoveDelegate)}},dispose:function(){if(this._layerobject){this._layerobject.dispose()}var b=this._layer.get_mapcontrol().get_mapcontrol().get_mapcontrol();if(this._mouseMoveDelegate){$removeHandler(b.get_navigation().get_element(),"mousemove",this._mouseMoveDelegate);this._mouseMoveDelegate=null}TripzoomLib.GUI.Map.Controls.AreaHotspot.callBaseMethod(this,"dispose")},_mouseMove:function(d){var c=this._layer.get_mapcontrol().get_mapcontrol().get_mapcontrol();if(this._layerobject.get_geometry().isWithin(new TripzoomLib.Element.Point(d.clientX-c.get_left(),d.clientY-c.get_top()))){document.body.style.cursor="pointer";this._layer.get_layermanager().set_activeAreaHotspot(this)}else{if(this._layer.get_layermanager().get_activeAreaHotspot()==this){this._layer.get_layermanager().set_activeAreaHotspot(null)}}},get_position:function(){return this._position},set_position:function(b){this._position=b},get_layerobject:function(){return this._layerobject},set_layerobject:function(b){this._layerobject=b},get_type:function(){return this._type},set_type:function(b){this._type=b},get_layer:function(){return this._layer},set_layer:function(b){this._layer=b}};TripzoomLib.GUI.Map.Controls.AreaHotspot.registerClass("TripzoomLib.GUI.Map.Controls.AreaHotspot",Sys.Component);TripzoomLib.GUI.Map.Controls.HotspotType=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};TripzoomLib.GUI.Map.Controls.HotspotType.prototype={NONE:-1,INFO:0,PIN:1,LINK:2};TripzoomLib.GUI.Map.Controls.HotspotType.registerEnum("TripzoomLib.GUI.Map.Controls.HotspotType");TripzoomLib.GUI.Map.Controls.MarkerHotspot=function(){TripzoomLib.GUI.Map.Controls.MarkerHotspot.initializeBase(this);this._type=TripzoomLib.GUI.Map.Controls.HotspotType.INFO;this._position=null;this._marker=null;this._layerobject=null;this._parent=null;this._element=null;this._hotspotbrowser=null;this._mouseClickDelegate=null;this.onclick=null;this._mouseOverDelegate=null;this._mouseOutDelegate=null;this._mouseDownDelegate=null;this._zoomDelegate=null};TripzoomLib.GUI.Map.Controls.MarkerHotspot.prototype={initialize:function(){TripzoomLib.GUI.Map.Controls.MarkerHotspot.callBaseMethod(this,"initialize");this.add_propertyChanged(this._onPropertyChanged);this._element=document.createElement("DIV");this._element.style.position="absolute";this._element.style.textAlign="center";this._element.style.zIndex=2;this._marker=document.createElement("IMG");this._marker.src=(this.get_layerobject().get_bitmap().toLowerCase().indexOf("http://")!=-1)?this.get_layerobject().get_bitmap():TripzoomLib.Constants.IMAGE_URL+"markers/"+this.get_layerobject().get_bitmap();this._marker.alt="";this._marker.style.verticalAlign="middle";this._element.appendChild(this._marker);if((this.get_layerobject().get_text())&&parseInt(this._type)==parseInt(TripzoomLib.GUI.Map.Controls.HotspotType.PIN)){markertext=this._element.appendChild(document.createElement("DIV"));markertext.className="markertext";markertext.innerHTML=this.get_layerobject().get_text()}if(this.get_layerobject().get_counter()){counter=this._element.appendChild(document.createElement("span"));counter.className="counter";counter.innerHTML=this.get_layerobject().get_counter();this._element.title=String.format(TripzoomLib.Resources.Resource.zoom_in_to_expand,this.get_layerobject().get_counter());this._element.style.padding="2px";this._element.style.backgroundColor="#ffffff";this._element.style.border="1px solid #adadad"}this._hotspotbrowser=$create(TripzoomLib.GUI.Map.Controls.MarkerHotspotBrowser,{},{},null,this._element);this._hotspotbrowser.add(this);this._element.onmouseup=function(){return false};if(!this._mouseClickDelegate){this._mouseClickDelegate=Function.createDelegate(this,this._mouseClick);$addHandler(this._element,"click",this._mouseClickDelegate)}if(this.onclick){this.add_click(this.onclick)}if(!this._mouseOverDelegate){this._mouseOverDelegate=Function.createDelegate(this,this._mouseOver);$addHandler(this._element,"mouseover",this._mouseOverDelegate)}if(!this._mouseOutDelegate){this._mouseOutDelegate=Function.createDelegate(this,this._mouseOut);$addHandler(this._element,"mouseout",this._mouseOutDelegate)}if(!this._mouseDownDelegate){this._mouseDownDelegate=Function.createDelegate(this,this._mouseDown);$addHandler(this._element,"mousedown",this._mouseDownDelegate)}},dispose:function(){if(this.get_element()&&this.get_element().parentNode){this.get_element().parentNode.removeChild(this.get_element())}this._layerobject.dispose();if(this._hotspotbrowser){this._hotspotbrowser.dispose()}$clearHandlers(this._element);this._mouseClickDelegate=null;this._mouseOverDelegate=null;this._mouseOutDelegate=null;this._mouseDownDelegate=null;this._zoomDelegate=null;TripzoomLib.GUI.Map.Controls.MarkerHotspot.callBaseMethod(this,"dispose")},show:function(){this._parent.appendChild(this._element);this.update()},update:function(){this._hotspotbrowser.show();Sys.UI.DomElement.setLocation(this._element,Math.round(this._position.x-(this.get_element().offsetWidth/2)),Math.round(this._position.y-(this._marker.offsetHeight/2)))},_onPropertyChanged:function(d,c){switch(c.get_propertyName()){case"position":if(d.get_element()&&d.get_element().parentNode){Sys.UI.DomElement.setLocation(d._element,Math.round(d._position.x-(d.get_element().offsetWidth/2)),Math.round(d._position.y-(d._marker.offsetHeight/2)))}break}},_mouseDown:function(b){b.stopPropagation()},_mouseClick:function(d){var c=this.get_events().getHandler("click");if(c){c(this,d)}d.stopPropagation()},_mouseOver:function(d){this.get_element().style.cursor="pointer";var c=this.get_events().getHandler("mouseover");if(c){c(this,d)}return false},_mouseOut:function(d){var c=this.get_events().getHandler("mouseout");if(c){c(this,Sys.EventArgs.Empty)}},add_click:function(b){this.get_events().addHandler("click",b)},remove_click:function(b){this.get_events().removeHandler("click",b)},add_mouseover:function(b){this.get_events().addHandler("mouseover",b)},remove_mouseover:function(b){this.get_events().removeHandler("mouseover",b)},add_mouseout:function(b){this.get_events().addHandler("mouseout",b)},remove_mouseout:function(b){this.get_events().removeHandler("mouseout",b)},add_hotspot:function(b){this._hotspotbrowser.add(b)},get_hotspots:function(){return this._hotspotbrowser.get_hotspots()},get_element:function(){return this._element},set_element:function(b){this._element=b},get_position:function(){return this._position},set_position:function(b){if(this._position!=b){this._position=b;this.raisePropertyChanged("position")}},get_layerobject:function(){return this._layerobject},set_layerobject:function(b){this._layerobject=b},get_parent:function(){return this._parent},set_parent:function(b){this._parent=b},get_type:function(){return this._type},set_type:function(b){if(this._type!=b){this._type=b}},get_marker:function(){return this._marker}};TripzoomLib.GUI.Map.Controls.MarkerHotspot.registerClass("TripzoomLib.GUI.Map.Controls.MarkerHotspot",Sys.Component);TripzoomLib.GUI.Map.Controls.MarkerHotspotBrowser=function(b){TripzoomLib.GUI.Map.Controls.MarkerHotspotBrowser.initializeBase(this,[b]);this._browser=null;this._display=null;this._hotspots=[]};TripzoomLib.GUI.Map.Controls.MarkerHotspotBrowser.prototype={initialize:function(){TripzoomLib.GUI.Map.Controls.MarkerHotspotBrowser.callBaseMethod(this,"initialize");this._browser=this._element.appendChild(document.createElement("DIV"));this._browser.className="hotspot_browser";this._browser.style.display="none";this._display=this._browser.appendChild(document.createElement("span"))},dispose:function(){if(this._hotpots){for(var b=0;b<this._hotspots.length;b++){if(this._hotspots[b]){this._hotspots[b].dispose();this._hotspots[b]=null}}}this._hotspots=null;TripzoomLib.GUI.Map.Controls.MarkerHotspotBrowser.callBaseMethod(this,"dispose")},add:function(b){Array.add(this._hotspots,b)},clear:function(){Array.clear(this._hotspots)},get_hotspots:function(){return this._hotspots},show:function(){if(this._hotspots.length>1){this._display.innerHTML=this._hotspots.length;this._browser.style.display="block"}},hide:function(){this._browser.style.display="none"}};TripzoomLib.GUI.Map.Controls.MarkerHotspotBrowser.registerClass("TripzoomLib.GUI.Map.Controls.MarkerHotspotBrowser",Sys.UI.Behavior);TripzoomLib.GUI.Map.Controls.Popup=function(b){TripzoomLib.GUI.Map.Controls.Popup.initializeBase(this,[b]);this._width=300;this._caption=null;this._content=null;this._close=null;this._prev=null;this._next=null;this._title=null;this._mouseOverDelegate=null;this._mouseOutDelegate=null;this._closePopupDelegate=null;this._nextClickDelegate=null;this._prevClickDelegate=null;this._pointers=new Object();this._sides=new Object();this._browser=null;this._request=null};TripzoomLib.GUI.Map.Controls.Popup.prototype={initialize:function(){TripzoomLib.GUI.Map.Controls.Popup.callBaseMethod(this,"initialize");var d=this.get_element();d.className="popup";d.style.position="absolute";d.style.zIndex=1000;d.onselect=function(){return false};var c=null;elem=d.appendChild(document.createElement("DIV"));elem.className="tl";this._sides.tl=elem;if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7){c=elem.appendChild(document.createElement("DIV"));c.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+TripzoomLib.Constants.IMAGE_URL+"/map/popup_blank.png', sizingMethod='scale');"}else{c=elem.appendChild(document.createElement("IMG"));c.src=TripzoomLib.Constants.IMAGE_URL+"/map/popup_blank.png"}c.style.position="absolute";c.style.left="0px";c.style.top="0px";c.style.width="600px";c.style.height="600px";elem=d.appendChild(document.createElement("DIV"));elem.className="tr";this._sides.tr=elem;if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7){c=elem.appendChild(document.createElement("DIV"));c.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+TripzoomLib.Constants.IMAGE_URL+"/map/popup_blank.png', sizingMethod='scale');"}else{c=elem.appendChild(document.createElement("IMG"));c.src=TripzoomLib.Constants.IMAGE_URL+"/map/popup_blank.png"}c.style.position="absolute";c.style.top="0px";c.style.right="0px";c.style.width="600px";c.style.height="600px";elem=d.appendChild(document.createElement("DIV"));elem.className="bl";this._sides.bl=elem;if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7){c=elem.appendChild(document.createElement("DIV"));c.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+TripzoomLib.Constants.IMAGE_URL+"/map/popup_blank.png', sizingMethod='scale');"}else{c=elem.appendChild(document.createElement("IMG"));c.src=TripzoomLib.Constants.IMAGE_URL+"/map/popup_blank.png"}c.style.position="absolute";c.style.left="0px";c.style.bottom="0px";c.style.width="600px";c.style.height="600px";elem=d.appendChild(document.createElement("DIV"));elem.className="br";this._sides.br=elem;if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7){c=elem.appendChild(document.createElement("DIV"));c.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+TripzoomLib.Constants.IMAGE_URL+"/map/popup_blank.png', sizingMethod='scale');"}else{c=elem.appendChild(document.createElement("IMG"));c.src=TripzoomLib.Constants.IMAGE_URL+"/map/popup_blank.png"}c.style.position="absolute";c.style.right="0px";c.style.bottom="0px";c.style.width="600px";c.style.height="600px";elem=d.appendChild(document.createElement("DIV"));elem.className="pointer-left";if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7){c=elem.appendChild(document.createElement("DIV"));c.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+TripzoomLib.Constants.IMAGE_URL+"/map/popup_pointer_left.png', sizingMethod='scale');"}else{c=elem.appendChild(document.createElement("IMG"));c.src=TripzoomLib.Constants.IMAGE_URL+"/map/popup_pointer_left.png"}c.style.position="absolute";c.style.top="0px";c.style.left="0px";c.style.width="16px";c.style.height="16px";this._pointers.left=elem;elem=d.appendChild(document.createElement("DIV"));elem.className="pointer-top";if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7){c=elem.appendChild(document.createElement("DIV"));c.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+TripzoomLib.Constants.IMAGE_URL+"/map/popup_pointer_top.png', sizingMethod='scale');"}else{c=elem.appendChild(document.createElement("IMG"));c.src=TripzoomLib.Constants.IMAGE_URL+"/map/popup_pointer_top.png"}c.style.position="absolute";c.style.top="0px";c.style.left="0px";c.style.width="16px";c.style.height="16px";this._pointers.top=elem;elem=d.appendChild(document.createElement("DIV"));elem.className="pointer-right";if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7){c=elem.appendChild(document.createElement("DIV"));c.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+TripzoomLib.Constants.IMAGE_URL+"/map/popup_pointer_right.png', sizingMethod='scale');"}else{c=elem.appendChild(document.createElement("IMG"));c.src=TripzoomLib.Constants.IMAGE_URL+"/map/popup_pointer_right.png"}c.style.position="absolute";c.style.top="0px";c.style.left="0px";c.style.width="16px";c.style.height="16px";this._pointers.right=elem;elem=d.appendChild(document.createElement("DIV"));elem.className="pointer-bottom";if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7){c=elem.appendChild(document.createElement("DIV"));c.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+TripzoomLib.Constants.IMAGE_URL+"/map/popup_pointer_bottom.png', sizingMethod='scale');"}else{c=elem.appendChild(document.createElement("IMG"));c.src=TripzoomLib.Constants.IMAGE_URL+"/map/popup_pointer_bottom.png"}c.style.position="absolute";c.style.top="0px";c.style.left="0px";c.style.width="16px";c.style.height="16px";this._pointers.bottom=elem;this._caption=d.appendChild(document.createElement("DIV"));this._caption.className="caption";this._browser=this._caption.appendChild(document.createElement("span"));this._browser.style.visibility="hidden";this._counter=this._browser.appendChild(document.createElement("span"));this._counter.style.marginRight="5px";this._prev=this._browser.appendChild(document.createElement("span"));this._prev.innerHTML=TripzoomLib.Resources.Resource.previous;this._prev.className="link";sep=this._browser.appendChild(document.createElement("span"));sep.innerHTML="|";sep.style.marginRight="4px";this._next=this._browser.appendChild(document.createElement("span"));this._next.innerHTML=TripzoomLib.Resources.Resource.next;this._next.className="link";this._close=this._caption.appendChild(document.createElement("span"));this._close.innerHTML="[x]";this._close.className="link";this._title=this._caption.appendChild(document.createElement("DIV"));this._title.className="title";this._content=d.appendChild(document.createElement("DIV"));this._content.className="content";this._content.style.backgroundColor="white";if(!this._mouseOverDelegate){this._mouseOverDelegate=Function.createDelegate(this,this._mouseOver)}$addHandler(this._element,"mouseover",this._mouseOverDelegate);if(!this._mouseOutDelegate){this._mouseOutDelegate=Function.createDelegate(this,this._mouseOut)}$addHandler(this._element,"mouseout",this._mouseOutDelegate);$addHandler(this._element,"click",this._mouseClick);$addHandler(this._element,"mousedown",this._mouseDown);$addHandler(this._element,"mouseup",this._mouseUp);$addHandler(this._element,"dblclick",this._mouseDown);if(!this._closePopupDelegate){this._closePopupDelegate=Function.createDelegate(this,this._closePopup)}$addHandler(this._close,"click",this._closePopupDelegate);if(!this._nextClickDelegate){this._nextClickDelegate=Function.createDelegate(this,this._nextClick)}$addHandler(this._next,"click",this._nextClickDelegate);if(!this._prevClickDelegate){this._prevClickDelegate=Function.createDelegate(this,this._prevClick)}$addHandler(this._prev,"click",this._prevClickDelegate);this.set_visible(false);this._request=new TripzoomLib.Net.Request(this._RequestCompleted);this._request.set_sender(this);this._request.initialize()},dispose:function(){if(this._mouseOverDelegate){$removeHandler(this._element,"mouseover",this._mouseOverDelegate)}this._mouseOverDelegate=null;if(this._mouseOutDelegate){$removeHandler(this._element,"mouseout",this._mouseOutDelegate)}this._mouseOutDelegate=null;if(!this._nextClickDelegate){$removeHandler(this._next,"click",this._nextClickDelegate)}this._nextClickDelegate=null;if(!this._prevClickDelegate){$removeHandler(this._prev,"click",this._prevClickDelegate)}this._prevClickDelegate=null;$removeHandler(this._element,"click",this._mouseClick);$removeHandler(this._element,"mousedown",this._mouseDown);$removeHandler(this._element,"mouseup",this._mouseUp);$removeHandler(this._element,"dblclick",this._mouseDown);$addHandler(this._close,"click",this._closePopupDelegate);TripzoomLib.GUI.Map.Controls.Popup.callBaseMethod(this,"dispose")},_reset:function(c){this._title.innerHTML="";this._content.innerHTML="";if(c){var d=document.createElement("img");d.src=TripzoomLib.Constants.IMAGE_URL+"spinner.gif";d.alt="";this._content.appendChild(d)}},show:function(b){this.set_visible(false);this._hotspot=b;if(TripzoomLib.GUI.Map.Controls.MarkerHotspot.isInstanceOfType(b)){this._currentHotspotIndex=0;if(this._hotspot.get_hotspots().length>1){this._browser.style.visibility="visible";this._counter.innerHTML="1/"+this._hotspot.get_hotspots().length}else{this._browser.style.visibility="hidden"}}if(this._hotspot.get_layerobject().get_async()){this._reset(true);this._request.GetLayerObject($create(TripzoomLib.Net.RequestSettings,{parameters:[this._hotspot.get_layerobject().get_refid()],name:this._hotspot.get_layerobject().get_layer().get_id(),language:this._hotspot.get_layerobject().get_layer().get_language()}))}else{this._RequestCompleted(this,"getlayerobject");this.set_visible(true)}},get_requestHandler:function(b){return this._request},_RequestCompleted:function(e,m,n){try{var p=e._request.get_responseData();if(p){switch(m.toLowerCase()){case"getlayerobject":var l=e._hotspot.get_layerobject();if(TripzoomLib.GUI.Map.Controls.MarkerHotspot.isInstanceOfType(e._hotspot)){l=e._hotspot.get_hotspots()[e._currentHotspotIndex].get_layerobject()}l.set_title(p.Title);l.set_text(p.Description);l.set_url(p.Link);l.set_async(false);e._request.clear();break}}}catch(o){}var q=e._hotspot;if(TripzoomLib.GUI.Map.Controls.MarkerHotspot.isInstanceOfType(q)){q=q.get_hotspots()[e._currentHotspotIndex]}if(q.get_layerobject().get_title()){e._title.style.display="block";e._title.innerHTML=q.get_layerobject().get_title()}else{e._title.style.display="none"}e._content.innerHTML="";e.set_visible(true);e._content.innerHTML=q.get_layerobject().get_text();var b=Sys.UI.DomElement.getBounds(e._content);var r=b.height;b=Sys.UI.DomElement.getBounds(e._caption);r+=b.height+30;e._sides.bl.style.height=r+"px";e._sides.br.style.height=r+"px";e.get_element().style.height=r+"px";e._reposition()},hide:function(){this._title.innerHTML="";this._content.innerHTML="";this.set_visible(false)},_reposition:function(){var b=Sys.UI.DomElement.getBounds(this.get_element());var l=Sys.UI.DomElement.getBounds(this.get_element().parentNode);this._pointers.left.style.display=this._pointers.top.style.display=this._pointers.right.style.display=this._pointers.bottom.style.display="none";var g=this._hotspot.get_position().x;var m=this._hotspot.get_position().y;var k=20;if(g+b.width>l.width){k=g;k-=(b.width+20)}if(m<parseInt(l.height)-parseInt(b.height)){this._pointers.top.style.display="block";this._pointers.top.style.left=20+"px";if(g+b.width>l.width){g=g-b.width+50;this._pointers.top.style.left=(b.width-30)+"px"}}else{if(m-b.height+60>0){m-=(b.height+60);this._pointers.bottom.style.display="block";this._pointers.bottom.style.left=20+"px";if(g+b.width>l.width){g=g-b.width+50;this._pointers.bottom.style.left=(b.width-30)+"px"}}else{if(g+b.width<l.width-20){this._pointers.left.style.display="block";this._pointers.left.style.top=(m-30)+"px";m=0;g+=2*k}else{this._pointers.right.style.display="block";this._pointers.right.style.top=(m-30)+"px";m=0;g=k}}}if(Sys.Browser.agent==Sys.Browser.InternetExplorer){Sys.UI.DomElement.setLocation(this.get_element(),g,m+30)}else{Sys.UI.DomElement.setLocation(this.get_element(),g-10,m+30)}},get_width:function(){return this._width},set_width:function(b){if(this._width!=b){this._width=b;this.get_element().style.width=this._width+"px"}},show_close:function(b){this._close.style.display=(b)?"block":"none"},set_title:function(b){if(this._title.innerHTML!=b){this._title.innerHTML=b;this._title.display=(b)?"block":"none"}},get_caption:function(){return this._caption},_nextClick:function(d){if(this._currentHotspotIndex<this._hotspot.get_hotspots().length-1){this._currentHotspotIndex++}else{this._currentHotspotIndex=0}this._counter.innerHTML=(this._currentHotspotIndex+1)+"/"+this._hotspot.get_hotspots().length;var c=this._hotspot.get_hotspots()[this._currentHotspotIndex];this._hotspot.get_marker().src=(c.get_layerobject().get_bitmap().toLowerCase().indexOf("http://")!=-1)?c.get_layerobject().get_bitmap():TripzoomLib.Constants.IMAGE_URL+"markers/"+c.get_layerobject().get_bitmap();if(c.get_layerobject().get_async()){this._reset(true);this._request.GetLayerObject($create(TripzoomLib.Net.RequestSettings,{parameters:[c.get_layerobject().get_refid()],name:c.get_layerobject().get_layer().get_id(),language:c.get_layerobject().get_layer().get_language()}))}else{this._RequestCompleted(this,"getlayerobject")}},_prevClick:function(f){var e=0;if(this._currentHotspotIndex==0){this._currentHotspotIndex=this._hotspot.get_hotspots().length-1}else{--this._currentHotspotIndex}this._counter.innerHTML=(this._currentHotspotIndex+1)+"/"+this._hotspot.get_hotspots().length;var d=this._hotspot.get_hotspots()[this._currentHotspotIndex];this._hotspot.get_marker().src=(d.get_layerobject().get_bitmap().toLowerCase().indexOf("http://")!=-1)?d.get_layerobject().get_bitmap():TripzoomLib.Constants.IMAGE_URL+"markers/"+d.get_layerobject().get_bitmap();if(d.get_layerobject().get_async()){this._reset(true);this._request.GetLayerObject($create(TripzoomLib.Net.RequestSettings,{parameters:[d.get_layerobject().get_refid()],name:d.get_layerobject().get_layer().get_id(),language:d.get_layerobject().get_layer().get_language()}))}else{this._RequestCompleted(this,"getlayerobject")}},_closePopup:function(b){this.hide()},_mouseDown:function(b){b.stopPropagation()},_mouseUp:function(b){},_mouseClick:function(b){if(b.target.tagName.toLowerCase()!="a"){b.preventDefault()}b.stopPropagation()},_mouseOver:function(d){this.set_visible(true);var c=this.get_events().getHandler("mouseover");if(c){c(this,Sys.EventArgs.Empty)}d.stopPropagation()},_mouseOut:function(d){var c=this.get_events().getHandler("mouseout");if(c){c(this,Sys.EventArgs.Empty)}d.stopPropagation()},add_mouseover:function(b){this.get_events().addHandler("mouseover",b)},remove_mouseover:function(b){this.get_events().removeHandler("mouseover",b)},add_mouseout:function(b){this.get_events().addHandler("mouseout",b)},remove_mouseout:function(b){this.get_events().removeHandler("mouseout",b)}};TripzoomLib.GUI.Map.Controls.Popup.registerClass("TripzoomLib.GUI.Map.Controls.Popup",TripzoomLib.GUI.Map.BaseControl);TripzoomLib.GUI.Map.Controls.ShapeType=function(){if(arguments.length!==0){throw Error.parameterCount()}throw Error.notImplemented()};TripzoomLib.GUI.Map.Controls.ShapeType.prototype={POINT:0,LINE:1,RECT:2,POLYGON:3,CIRCLE:4,UNKNOWN:-1};TripzoomLib.GUI.Map.Controls.ShapeType.registerEnum("TripzoomLib.GUI.Map.Controls.ShapeType");TripzoomLib.GUI.Map.Controls.ShapeStyle=function(){this.lineWidth=5;this.strokeStyle="blue";this.fillStyle="green";this.fill=false};TripzoomLib.GUI.Map.Controls.ShapeStyle.registerClass("TripzoomLib.GUI.Map.Controls.ShapeStyle");TripzoomLib.GUI.Map.Controls.CircleShapeStyle=function(){this.radius=10};TripzoomLib.GUI.Map.Controls.CircleShapeStyle.registerClass("TripzoomLib.GUI.Map.Controls.CircleShapeStyle",TripzoomLib.GUI.Map.Controls.ShapeStyle);TripzoomLib.GUI.Map.Controls.Shape=function(){TripzoomLib.GUI.Map.Controls.Shape.initializeBase(this);this._type=TripzoomLib.GUI.Map.Controls.ShapeType.UNKNOWN;this._position=null;this._coords=null;this._canvas=null;this._style=null;this._type=null};TripzoomLib.GUI.Map.Controls.Shape.prototype={initialize:function(){TripzoomLib.GUI.Map.Controls.Shape.callBaseMethod(this,"initialize")},dispose:function(){TripzoomLib.GUI.Map.Controls.Shape.callBaseMethod(this,"dispose")},CoordsToPosition:function(e,k){var f,g;f=Math.round((parseInt(e)-_Map.get_mapview().get_viewrect().left)/_Map.get_mapview().get_mppixX());g=Math.round((_Map.get_mapview().get_viewrect().top-parseInt(k))/_Map.get_mapview().get_mppixY());return new TripzoomLib.Element.Point(f,g)},update:function(){var k=this._canvas.getContext("2d");if(this._style){k.strokeStyle=this._style.strokeStyle;k.lineWidth=this._style.lineWidth}else{k.strokeStyle="blue";k.lineWidth=5}switch(this._type){case TripzoomLib.GUI.Map.Controls.ShapeType.POINT:var o=this.CoordsToPosition(this._coords.x,this._coords.y);k.rect(o.x,o.y,3,3);if(this._style.fill){k.fill()}else{k.stroke()}break;case TripzoomLib.GUI.Map.Controls.ShapeType.LINE:k.beginPath();var o=this.CoordsToPosition(this._coords[0].x,this._coords[0].y);k.moveTo(o.x,o.y);for(var p=1;p<this._coords.length;p++){o=this.CoordsToPosition(this._coords[p].x,this._coords[p].y);k.lineTo(o.x,o.y)}k.stroke();break;case TripzoomLib.GUI.Map.Controls.ShapeType.POLYGON:k.beginPath();var o=this.CoordsToPosition(this._coords[0].x,this._coords[0].y);k.moveTo(o.x,o.y);for(var p=1;p<this._coords.length;p++){o=this.CoordsToPosition(this._coords[p].x,this._coords[p].y);k.lineTo(o.x,o.y)}k.closePath();if(this._style.fill){k.fill()}else{k.stroke()}break;case TripzoomLib.GUI.Map.Controls.ShapeType.RECT:var q=this.CoordsToPosition(this._coords[0].x,this._coords[0].y);var l=this.CoordsToPosition(this._coords[1].x,this._coords[1].y);k.fillStyle=this._style.fillStyle;k.fillRect(q.x,q.y,l.x-q.x,l.y-q.y);k.fill();break;case TripzoomLib.GUI.Map.Controls.ShapeType.CIRCLE:k.beginPath();var o=this.CoordsToPosition(this._coords.x,this._coords.y);var n=this.CoordsToPosition(this._coords.x,this._coords.y+this._style.radius);var m=Math.abs(n.y-o.y);k.arc(o.x,o.y,m,0,2*Math.PI,true);if(this._style.fill){k.fill()}else{k.stroke()}break}},_mouseClick:function(d){var c=this.get_events().getHandler("click");if(c){c(this,d)}d.stopPropagation()},_mouseOver:function(d){var c=this.get_events().getHandler("mouseover");if(c){c(this,d)}return false},_mouseOut:function(d){var c=this.get_events().getHandler("mouseout");if(c){c(this,Sys.EventArgs.Empty)}},add_click:function(b){this.get_events().addHandler("click",b)},remove_click:function(b){this.get_events().removeHandler("click",b)},add_mouseover:function(b){this.get_events().addHandler("mouseover",b)},remove_mouseover:function(b){this.get_events().removeHandler("mouseover",b)},add_mouseout:function(b){this.get_events().addHandler("mouseout",b)},remove_mouseout:function(b){this.get_events().removeHandler("mouseout",b)},get_coords:function(){return this._coords},set_coords:function(b){this._coords=b},get_canvas:function(){return this._canvas},set_canvas:function(b){this._canvas=b},get_style:function(){return this._style},set_style:function(b){this._style=b},get_type:function(){return this._type},set_type:function(b){if(this._type!=b){this._type=b}}};TripzoomLib.GUI.Map.Controls.Shape.registerClass("TripzoomLib.GUI.Map.Controls.Shape",Sys.Component);Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.GUI");Type.registerNamespace("TripzoomLib.GUI.Map");TripzoomLib.GUI.Map.Spinner=function(b){TripzoomLib.GUI.Map.Spinner.initializeBase(this,[b])};TripzoomLib.GUI.Map.Spinner.prototype={initialize:function(){TripzoomLib.GUI.Map.Spinner.callBaseMethod(this,"initialize");element=this.get_element();element.className="spinnerLayer";var b=element.appendChild(document.createElement("IMG"));b.src=TripzoomLib.Constants.IMAGE_URL+"map/spinner.gif"},dispose:function(){TripzoomLib.GUI.Map.Spinner.callBaseMethod(this,"dispose")}};TripzoomLib.GUI.Map.Spinner.registerClass("TripzoomLib.GUI.Map.Spinner",TripzoomLib.GUI.Map.BaseControl);Type.registerNamespace("LocatienetLib");LocatienetLib.MapEvent=function(){};LocatienetLib.MapEvent.prototype={zoom:0,pan:1,other:2};LocatienetLib.MapEvent.registerEnum("LocatienetLib.MapEvent");LocatienetLib.MapToolbar=function(){};LocatienetLib.MapToolbar.prototype={mapstyle:0,navigation:1,overview:2};LocatienetLib.MapToolbar.registerEnum("LocatienetLib.MapToolbar");LocatienetLib.MapZoomLevel=function(){};LocatienetLib.MapZoomLevel.prototype={street:500,block:1000,neighbourhood:5000,city:10000,region:20000,province:50000,state:100000,country:500000,continent:2000000};LocatienetLib.MapZoomLevel.registerEnum("LocatienetLib.MapZoomLevel");LocatienetLib.MapViewMode=function(){};LocatienetLib.MapViewMode.prototype={MAP:0,AERIAL:1,HYBRID:2};LocatienetLib.MapViewMode.registerEnum("LocatienetLib.MapViewMode");LocatienetLib.MapLayerStyle=function(){};LocatienetLib.MapLayerStyle.prototype={PIN:1,INFO:2,LINK:3};LocatienetLib.MapLayerStyle.registerEnum("LocatienetLib.MapLayerStyle");LocatienetLib.MapShapeType=function(){};LocatienetLib.MapShapeType.prototype={POINT:0,LINE:1,RECT:2,POLYGON:3,CIRCLE:4,UNKNOWN:-1};LocatienetLib.MapShapeType.registerEnum("LocatienetLib.MapShapeType");LocatienetLib.CoordFormat=function(){};LocatienetLib.CoordFormat.prototype={MERCATOR:0,GEODECIMAL:3};LocatienetLib.CoordFormat.registerEnum("LocatienetLib.CoordFormat");var g_map=null;LocatienetLib.MapControl=function(f,g,k){LocatienetLib.MapControl.initializeBase(this,[f]);this._coordformat=LocatienetLib.CoordFormat.GEODECIMAL;this._viewmode=LocatienetLib.MapViewMode.MAP;var b=Sys.UI.DomElement.getBounds(this.get_element());this._width=b.width;this._height=b.height;this._tiled=(null!=g)?g:false;this._kickstart=(null!=k)?k:true;this._rect=new TripzoomLib.Element.Rect(319871,7061126,1014271,6669126);this._changedDelegate=Function.createDelegate(this,this._raiseChanged);this.onchanged=null;this._loadDelegate=Function.createDelegate(this,this._raiseLoad);this.onload=null;this._resizeDelegate=Function.createDelegate(this,this._raiseResize);this.onresize=null;this._errorDelegate=Function.createDelegate(this,this._raiseError);this.onerror=null};LocatienetLib.MapControl.prototype={initialize:function(){LocatienetLib.MapControl.callBaseMethod(this,"initialize");date=new Date();this._includeCSS(TripzoomLib.Constants.BASE_URL+"css/Locatienetlib.css?d="+date.toUTCString());if(this.onchanged){this.add_changed(this.onchanged)}if(this.onload){this.add_load(this.onload)}if(this.onresize){this.add_resize(this.onresize)}if(this.onerror){this.add_error(this.onerror)}g_map=$create(TripzoomLib.GUI.Map.Map,{parent:this.get_element(),tiled:this._tiled,viewmode:this._viewmode},{changed:this._changedDelegate,load:this._loadDelegate,resize:this._resizeDelegate,error:this._errorDelegate});if(this._kickstart){g_map.set_rect(this._rect)}},dispose:function(){LocatienetLib.MapControl.callBaseMethod(this,"dispose")},CreateLayer:function(d,f,e){layer=$create(LocatienetLib.MapLayer,{mapcontrol:this,title:d,type:f,style:e});return layer},getMapObject:function(){return g_map},set_coordformat:function(b){this._coordformat=b},get_coordformat:function(b){return this._coordformat},get_width:function(){return this._width},set_width:function(b){this._width=b},get_height:function(){return this._height},set_height:function(b){this._height=b},get_viewmode:function(){return this._viewmode},set_viewmode:function(b){this._viewmode=b},set_kickstart:function(b){this._kickstart=b},get_rect:function(){return TripzoomLib.Gis.Utils.TransformRect(g_map.get_mapview().get_viewrect(),LocatienetLib.CoordFormat.MERCATOR,this.get_coordformat())},set_rect:function(b){if(!TripzoomLib.Element.Rect.isInstanceOfType(b)){throw Error.argumentType("value",Object.getType(b),TripzoomLib.Element.Rect,"set_rect")}if(this._rect!=b){this._rect=b;if(this._coordformat!=LocatienetLib.CoordFormat.MERCATOR){this._rect=TripzoomLib.Gis.Utils.TransformRect(this._rect,this.get_coordformat(),LocatienetLib.CoordFormat.MERCATOR)}g_map.set_rect(this._rect);g_map.Update()}},get_language:function(){return g_map.get_language()},set_language:function(b){g_map.set_language(b)},set_center:function(c,d){if(!TripzoomLib.Element.Point.isInstanceOfType(c)){throw Error.argumentType("point",Object.getType(c),TripzoomLib.Element.Point,"set_center")}if(this.get_coordformat()!=LocatienetLib.CoordFormat.MERCATOR){c=TripzoomLib.Gis.Utils.TransformPoint(c,this.get_coordformat(),LocatienetLib.CoordFormat.MERCATOR)}g_map.set_center(c,(null!=d)?parseInt(d):null)},show_toolbar:function(b){switch(b){case LocatienetLib.MapToolbar.mapstyle:g_map.get_mapstyletoolbar().set_visible(true);break;case LocatienetLib.MapToolbar.navigation:g_map.get_toolbar().set_visible(true);break;case LocatienetLib.MapToolbar.overview:g_map.get_overviewtoolbar().set_visible(true);break}},hide_toolbar:function(b){switch(b){case LocatienetLib.MapToolbar.mapstyle:g_map.get_mapstyletoolbar().set_visible(false);break;case LocatienetLib.MapToolbar.navigation:g_map.get_toolbar().set_visible(false);break;case LocatienetLib.MapToolbar.overview:g_map.get_overviewtoolbar().set_visible(false);break}},update:function(){g_map.Update()},_raiseChanged:function(d,c){handler=this.get_events().getHandler("changed");if(handler){handler(this,Sys.EventArgs.Empty)}},add_changed:function(b){this.get_events().addHandler("changed",b)},remove_changed:function(b){this.get_events().removeHandler("changed",b)},_raiseLoad:function(d,c){handler=this.get_events().getHandler("load");if(handler){handler(this,Sys.EventArgs.Empty)}},add_load:function(b){this.get_events().addHandler("load",b)},remove_load:function(b){this.get_events().removeHandler("load",b)},_raiseResize:function(d,c){handler=this.get_events().getHandler("resize");if(handler){handler(this,Sys.EventArgs.Empty)}},add_resize:function(b){this.get_events().addHandler("resize",b)},remove_resize:function(b){this.get_events().removeHandler("resize",b)},_raiseError:function(d,c){handler=this.get_events().getHandler("error");if(handler){handler(d,c)}},add_error:function(b){this.get_events().addHandler("error",b)},remove_error:function(b){this.get_events().removeHandler("error",b)},_includeCSS:function(c){var d=document.createElement("link");d.rel="stylesheet";d.type="text/css";d.href=c;document.getElementsByTagName("head")[0].appendChild(d)}};LocatienetLib.MapControl.registerClass("LocatienetLib.MapControl",Sys.UI.Control);LocatienetLib.MapLayer=function(){LocatienetLib.MapLayer.initializeBase(this);this._title;this._type=LocatienetLib.MapLayerStyle.INFO;this._style=null;this._mapcontrol=null;this._control=null;this.onclick=null};LocatienetLib.MapLayer.prototype={initialize:function(){LocatienetLib.MapLayer.callBaseMethod(this,"initialize");layermanager=g_map.get_layermanager();this._control=layermanager.Add(this._title);this._control.set_static(true);this._control.set_type(this._type);this._control.set_style(this._style);if(this.onclick){this.add_click(this.onclick)}this._control.add_click(this._raiseClick)},dispose:function(){g_map.get_layermanager().Remove(this._title);LocatienetLib.MapLayer.callBaseMethod(this,"dispose")},Add:function(b){point=TripzoomLib.Gis.Utils.TransformPoint(b._point,this.get_mapcontrol().get_coordformat(),LocatienetLib.CoordFormat.MERCATOR);return this._control.Add($create(TripzoomLib.Element.LayerObject,{layer:this._control,geometry:point,title:b._title,text:b._text,bitmap:b._bitmap}))},AddShape:function(f,d,e){var d=this._TransformCoords(d);return this._control.AddShape(f,d,e)},_TransformCoords:function(k){var g=k;var f=this.get_mapcontrol().get_coordformat();if(f!=LocatienetLib.CoordFormat.MERCATOR){if(TripzoomLib.Utils.isArray(k)){for(var m=0;m<k.length;m++){var l=TripzoomLib.Gis.Utils.TransformPoint(k[m],f,LocatienetLib.CoordFormat.MERCATOR);g[m]=l}}else{var l=TripzoomLib.Gis.Utils.TransformPoint(k,f,LocatienetLib.CoordFormat.MERCATOR);g=l}}return g},get_title:function(){return this._title},set_title:function(b){if(this._title!=b){this._title=b}},get_type:function(){return this._type},set_type:function(b){if(b&&this._type!=b){this._type=b;if(this.get_control()){this.get_control().set_type(this._type)}}},get_style:function(){return this._style},set_style:function(b){if(this._style!=b){this._style=b;if(this.get_control()){this.get_control().set_style(this._style)}}},set_mapcontrol:function(b){this._mapcontrol=b},get_mapcontrol:function(){return this._mapcontrol},get_control:function(){return this._control},get_rect:function(){return TripzoomLib.Gis.Utils.TransformRect(this.get_control().get_rect(),LocatienetLib.CoordFormat.MERCATOR,this.get_mapcontrol().get_coordformat())},_raiseClick:function(d,c){handler=this.get_events().getHandler("click");if(handler){handler(this,Sys.EventArgs.Empty)}},add_click:function(b){this.get_events().addHandler("click",b)},remove_click:function(b){this.get_events().removeHandler("click",b)}};LocatienetLib.MapLayer.registerClass("LocatienetLib.MapLayer",Sys.Component);LocatienetLib.MapLayerObject=function(g,e,f,k){this._point=new TripzoomLib.Element.Point(g,e);this._bitmap=(k)?k:"standard.gif";this._text=f;this._type=null;this._url=null};LocatienetLib.MapLayerObject.prototype={get_url:function(){return this._url},set_url:function(b){this._url=b},get_bitmap:function(){return this._bitmap},set_bitmap:function(b){this._bitmap=b},get_text:function(){return this._text},set_text:function(b){if(this._text!=b){this._text=b}},get_type:function(){return this._type},set_type:function(b){this._type=b}};LocatienetLib.MapLayerObject.registerClass("LocatienetLib.MapLayerObject");LocatienetLib.GeoXml=function(c,d){LocatienetLib.GeoXml.initializeBase(this);this._layer=c;this._url=d;this._json=null;this._completeDelegate=Function.createDelegate(this,this._onComplete);this.oncomplete=null};LocatienetLib.GeoXml.prototype={initialize:function(){LocatienetLib.GeoXml.callBaseMethod(this,"initialize");if(this.oncomplete){this.add_complete(this.oncomplete)}this._update()},dispose:function(){LocatienetLib.GeoXml.callBaseMethod(this,"dispose")},_update:function(){showMapSpinner(true);this._json=new TripzoomLib.Net.GeoJSONRequest(this._url,this._completeDelegate);this._json.set_sender(this);this._json.initialize()},get_url:function(){return this._url},set_url:function(b){if(this._url!=b){this._url=b;this._update()}},_onComplete:function(k,l){showMapSpinner(true);var f=k._layer.get_control();f.Clear();data=this._json.get_responseData();if(data){for(var m=0;m<data.length;m++){text=(data[m].Description)?data[m].Description:"";bitmap=(data[m].Marker)?data[m].Marker:"standard.gif";switch(data[m].Type){case LocatienetLib.MapShapeType.POINT:f.Add($create(TripzoomLib.Element.LayerObject,{layer:f,geometry:new TripzoomLib.Element.Point(data[m].Point.point.x,data[m].Point.point.y),title:data[m].Title,text:text,bitmap:bitmap,url:data[m].Link}));break;case LocatienetLib.MapShapeType.CIRCLE:var g=new LocatienetLib.MapCircleShapeStyle();g.radius=data[m].Style.Radius;g.fill=data[m].Style.Fill;g.fillColor=data[m].Style.FillColor;g.strokeStyle=data[m].Style.StrokeStyle;g.lineWidth=data[m].Style.LineWidth;f.AddShape(data[m].Type,{x:data[m].Point.point.x,y:data[m].Point.point.y},g);break;case LocatienetLib.MapShapeType.POLYGON:case LocatienetLib.MapShapeType.LINE:f.AddShape(data[m].Type,data[m].LineString.lineString.wrappedPoints);break}}}showMapSpinner(false);this._raiseComplete(l)},_raiseComplete:function(b){handler=this.get_events().getHandler("complete");if(handler){handler(this,b)}},add_complete:function(b){this.get_events().addHandler("complete",b)},remove_complete:function(b){this.get_events().removeHandler("complete",b)}};LocatienetLib.GeoXml.registerClass("LocatienetLib.GeoXml",Sys.Component);Type.registerNamespace("LocatienetLib.Element");LocatienetLib.Element.Point=function(d,c){LocatienetLib.Element.Point.initializeBase(this,[d,c])};LocatienetLib.Element.Point.registerClass("LocatienetLib.Element.Point",TripzoomLib.Element.Point);LocatienetLib.Element.Rect=function(f,g,k,e){LocatienetLib.Element.Rect.initializeBase(this,[f,g,k,e])};LocatienetLib.Element.Rect.prototype={toString:function(){return this.left+"_"+this.top+"_"+this.right+"_"+this.bottom}};LocatienetLib.Element.Rect.registerClass("LocatienetLib.Element.Rect",TripzoomLib.Element.Rect);LocatienetLib.MapShapeStyle=function(){this.lineWidth=5;this.strokeStyle="blue"};LocatienetLib.MapShapeStyle.registerClass("LocatienetLib.MapShapeStyle",TripzoomLib.GUI.Map.Controls.ShapeStyle);LocatienetLib.MapCircleShapeStyle=function(){this.radius=1000};LocatienetLib.MapCircleShapeStyle.registerClass("LocatienetLib.MapCircleShapeStyle",TripzoomLib.GUI.Map.Controls.CircleShapeStyle);if(/MSIE/.test(navigator.userAgent)&&!window.CanvasRenderingContext2D){(function(){var J=Math,L=J.round,m=J.sin,z=J.cos,M=10,E=M/2,O={init:function(b){var a=b||document;if(/MSIE/.test(navigator.userAgent)&&!window.opera){var c=this;a.attachEvent("onreadystatechange",function(){c.r(a)})}},r:function(c){if(c.readyState=="complete"){if(!c.namespaces.s){c.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml")}var d=c.createStyleSheet();d.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}";var b=c.getElementsByTagName("canvas");for(var a=0;a<b.length;a++){if(!b[a].getContext){this.initElement(b[a])}}}},q:function(b){var c=b.outerHTML,d=b.ownerDocument.createElement(c);if(c.slice(-2)!="/>"){var a="/"+b.tagName,e;while((e=b.nextSibling)&&e.tagName!=a){e.removeNode()}if(e){e.removeNode()}}b.parentNode.replaceChild(d,b);return d},initElement:function(b){b=this.q(b);b.getContext=function(){if(this.l){return this.l}return this.l=new K(this)};b.attachEvent("onpropertychange",P);b.attachEvent("onresize",H);var a=b.attributes;if(a.width&&a.width.specified){b.style.width=a.width.nodeValue+"px"}else{b.width=b.clientWidth}if(a.height&&a.height.specified){b.style.height=a.height.nodeValue+"px"}else{b.height=b.clientHeight}return b}};function P(b){var a=b.srcElement;switch(b.propertyName){case"width":a.style.width=a.attributes.width.nodeValue+"px";a.getContext().clearRect();break;case"height":a.style.height=a.attributes.height.nodeValue+"px";a.getContext().clearRect();break}}function H(b){var a=b.srcElement;if(a.firstChild){a.firstChild.style.width=a.clientWidth+"px";a.firstChild.style.height=a.clientHeight+"px"}}O.init();var S=[];for(var D=0;D<16;D++){for(var F=0;F<16;F++){S[D*16+F]=D.toString(16)+F.toString(16)}}function G(){return[[1,0,0],[0,1,0],[0,0,1]]}function C(d,b){var g=G();for(var f=0;f<3;f++){for(var c=0;c<3;c++){var a=0;for(var e=0;e<3;e++){a+=d[f][e]*b[e][c]}g[f][c]=a}}return g}function A(b,a){a.fillStyle=b.fillStyle;a.lineCap=b.lineCap;a.lineJoin=b.lineJoin;a.lineWidth=b.lineWidth;a.miterLimit=b.miterLimit;a.shadowBlur=b.shadowBlur;a.shadowColor=b.shadowColor;a.shadowOffsetX=b.shadowOffsetX;a.shadowOffsetY=b.shadowOffsetY;a.strokeStyle=b.strokeStyle;a.d=b.d;a.e=b.e}function B(d){var b,g=1;d=String(d);if(d.substring(0,3)=="rgb"){var f=d.indexOf("(",3),c=d.indexOf(")",f+1),a=d.substring(f+1,c).split(",");b="#";for(var e=0;e<3;e++){b+=S[Number(a[e])]}if(a.length==4&&d.substr(3,1)=="a"){g=a[3]}}else{b=d}return[b,g]}function Q(a){switch(a){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function K(b){this.a=G();this.m=[];this.k=[];this.c=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=M*1;this.globalAlpha=1;this.canvas=b;var a=b.ownerDocument.createElement("div");a.style.width=b.clientWidth+"px";a.style.height=b.clientHeight+"px";a.style.overflow="hidden";a.style.position="absolute";b.appendChild(a);this.j=a;this.d=1;this.e=1}var N=K.prototype;N.clearRect=function(){this.j.innerHTML="";this.c=[]};N.beginPath=function(){this.c=[]};N.moveTo=function(b,a){this.c.push({type:"moveTo",x:b,y:a});this.f=b;this.g=a};N.lineTo=function(b,a){this.c.push({type:"lineTo",x:b,y:a});this.f=b;this.g=a};N.bezierCurveTo=function(f,d,b,e,c,a){this.c.push({type:"bezierCurveTo",cp1x:f,cp1y:d,cp2x:b,cp2y:e,x:c,y:a});this.f=c;this.g=a};N.quadraticCurveTo=function(c,g,f,d){var e=this.f+0.666666666666667*(c-this.f),a=this.g+0.666666666666667*(g-this.g),b=e+(f-this.f)/3,k=a+(d-this.g)/3;this.bezierCurveTo(e,a,b,k,f,d)};N.arc=function(d,c,a,n,k,f){a*=M;var b=f?"at":"wa",g=d+z(n)*a-E,l=c+m(n)*a-E,o=d+z(k)*a-E,e=c+m(k)*a-E;if(g==o&&!f){g+=0.125}this.c.push({type:b,x:d,y:c,radius:a,xStart:g,yStart:l,xEnd:o,yEnd:e})};N.rect=function(c,d,b,a){this.moveTo(c,d);this.lineTo(c+b,d);this.lineTo(c+b,d+a);this.lineTo(c,d+a);this.closePath()};N.strokeRect=function(c,d,b,a){this.beginPath();this.moveTo(c,d);this.lineTo(c+b,d);this.lineTo(c+b,d+a);this.lineTo(c,d+a);this.closePath();this.stroke()};N.fillRect=function(c,d,b,a){this.beginPath();this.moveTo(c,d);this.lineTo(c+b,d);this.lineTo(c+b,d+a);this.lineTo(c,d+a);this.closePath();this.fill()};N.createLinearGradient=function(b,c,d,a){var e=new I("gradient");return e};N.createRadialGradient=function(d,b,g,f,c,a){var e=new I("gradientradial");e.n=g;e.o=a;e.i.x=d;e.i.y=b;return e};N.drawImage=function(u,n){var s,e,f,r,X,l,o,p,q=u.runtimeStyle.width,W=u.runtimeStyle.height;u.runtimeStyle.width="auto";u.runtimeStyle.height="auto";var V=u.width,b=u.height;u.runtimeStyle.width=q;u.runtimeStyle.height=W;if(arguments.length==3){s=arguments[1];e=arguments[2];X=(l=0);o=(f=V);p=(r=b)}else{if(arguments.length==5){s=arguments[1];e=arguments[2];f=arguments[3];r=arguments[4];X=(l=0);o=V;p=b}else{if(arguments.length==9){X=arguments[1];l=arguments[2];o=arguments[3];p=arguments[4];s=arguments[5];e=arguments[6];f=arguments[7];r=arguments[8]}else{throw"Invalid number of arguments"}}}var a=this.b(s,e),Z=[],v=10,Y=10;Z.push(" <g_vml_:group",' coordsize="',M*v,",",M*Y,'"',' coordorigin="0,0"',' style="width:',v,";height:",Y,";position:absolute;");if(this.a[0][0]!=1||this.a[0][1]){var g=[];g.push("M11='",this.a[0][0],"',","M12='",this.a[1][0],"',","M21='",this.a[0][1],"',","M22='",this.a[1][1],"',","Dx='",L(a.x/M),"',","Dy='",L(a.y/M),"'");var c=a,k=this.b(s+f,e),d=this.b(s,e+r),aa=this.b(s+f,e+r);c.x=Math.max(c.x,k.x,d.x,aa.x);c.y=Math.max(c.y,k.y,d.y,aa.y);Z.push("padding:0 ",L(c.x/M),"px ",L(c.y/M),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",g.join(""),", sizingmethod='clip');")}else{Z.push("top:",L(a.y/M),"px;left:",L(a.x/M),"px;")}Z.push(' ">','<g_vml_:image src="',u.src,'"',' style="width:',M*f,";"," height:",M*r,';"',' cropleft="',X/V,'"',' croptop="',l/b,'"',' cropright="',(V-X-o)/V,'"',' cropbottom="',(b-l-p)/b,'"'," />","</g_vml_:group>");this.j.insertAdjacentHTML("BeforeEnd",Z.join(""))};N.stroke=function(k){var aa=[],ab=B(k?this.fillStyle:this.strokeStyle),g=ab[0],p=ab[1]*this.globalAlpha,f=10,r=10;aa.push("<g_vml_:shape",' fillcolor="',g,'"',' filled="',Boolean(k),'"',' style="position:absolute;width:',f,";height:",r,';"',' coordorigin="0 0" coordsize="',M*f," ",M*r,'"',' stroked="',!k,'"',' strokeweight="',this.lineWidth,'"',' strokecolor="',g,'"',' path="');var ad={x:null,y:null},s={x:null,y:null};for(var ac=0;ac<this.c.length;ac++){var l=this.c[ac];if(l.type=="moveTo"){aa.push(" m ");var v=this.b(l.x,l.y);aa.push(L(v.x),",",L(v.y))}else{if(l.type=="lineTo"){aa.push(" l ");var v=this.b(l.x,l.y);aa.push(L(v.x),",",L(v.y))}else{if(l.type=="close"){aa.push(" x ")}else{if(l.type=="bezierCurveTo"){aa.push(" c ");var v=this.b(l.x,l.y),ae=this.b(l.cp1x,l.cp1y),e=this.b(l.cp2x,l.cp2y);aa.push(L(ae.x),",",L(ae.y),",",L(e.x),",",L(e.y),",",L(v.x),",",L(v.y))}else{if(l.type=="at"||l.type=="wa"){aa.push(" ",l.type," ");var v=this.b(l.x,l.y),b=this.b(l.xStart,l.yStart),ag=this.b(l.xEnd,l.yEnd);aa.push(L(v.x-this.d*l.radius),",",L(v.y-this.e*l.radius)," ",L(v.x+this.d*l.radius),",",L(v.y+this.e*l.radius)," ",L(b.x),",",L(b.y)," ",L(ag.x),",",L(ag.y))}}}}}if(v){if(ad.x==null||v.x<ad.x){ad.x=v.x}if(s.x==null||v.x>s.x){s.x=v.x}if(ad.y==null||v.y<ad.y){ad.y=v.y}if(s.y==null||v.y>s.y){s.y=v.y}}}aa.push(' ">');if(typeof this.fillStyle=="object"){var ah={x:"50%",y:"50%"},af=s.x-ad.x,d=s.y-ad.y,ai=af>d?af:d;ah.x=L(this.fillStyle.i.x/af*100+50)+"%";ah.y=L(this.fillStyle.i.y/d*100+50)+"%";var a=[];if(this.fillStyle.p=="gradientradial"){var c=this.fillStyle.n/ai*100,q=this.fillStyle.o/ai*100-c}else{var c=0,q=100}var n={offset:null,color:null},o={offset:null,color:null};this.fillStyle.h.sort(function(U,T){return U.offset-T.offset});for(var ac=0;ac<this.fillStyle.h.length;ac++){var u=this.fillStyle.h[ac];a.push(u.offset*q+c,"% ",u.color,",");if(u.offset>n.offset||n.offset==null){n.offset=u.offset;n.color=u.color}if(u.offset<o.offset||o.offset==null){o.offset=u.offset;o.color=u.color}}a.pop();aa.push("<g_vml_:fill",' color="',o.color,'"',' color2="',n.color,'"',' type="',this.fillStyle.p,'"',' focusposition="',ah.x,", ",ah.y,'"',' colors="',a.join(""),'"',' opacity="',p,'" />')}else{if(k){aa.push('<g_vml_:fill color="',g,'" opacity="',p,'" />')}else{aa.push("<g_vml_:stroke",' opacity="',p,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',Q(this.lineCap),'"',' weight="',this.lineWidth,'px"',' color="',g,'" />')}}aa.push("</g_vml_:shape>");this.j.insertAdjacentHTML("beforeEnd",aa.join(""));this.c=[]};N.fill=function(){this.stroke(true)};N.closePath=function(){this.c.push({type:"close"})};N.b=function(b,a){return{x:M*(b*this.a[0][0]+a*this.a[1][0]+this.a[2][0])-E,y:M*(b*this.a[0][1]+a*this.a[1][1]+this.a[2][1])-E}};N.save=function(){var a={};A(this,a);this.k.push(a);this.m.push(this.a);this.a=C(G(),this.a)};N.restore=function(){A(this.k.pop(),this);this.a=this.m.pop()};N.translate=function(b,a){var c=[[1,0,0],[0,1,0],[b,a,1]];this.a=C(c,this.a)};N.rotate=function(c){var d=z(c),b=m(c),a=[[d,b,0],[-b,d,0],[0,0,1]];this.a=C(a,this.a)};N.scale=function(b,a){this.d*=b;this.e*=a;var c=[[b,0,0],[0,a,0],[0,0,1]];this.a=C(c,this.a)};N.clip=function(){};N.arcTo=function(){};N.createPattern=function(){return new R};function I(a){this.p=a;this.n=0;this.o=0;this.h=[];this.i={x:0,y:0}}I.prototype.addColorStop=function(b,a){a=B(a);this.h.push({offset:1-b,color:a})};function R(){}G_vmlCanvasManager=O;CanvasRenderingContext2D=K;CanvasGradient=I;CanvasPattern=R})()}function JSONScriptRequest(b){this._initialize_all();if(typeof b!="undefined"){if(typeof b.callback_param!="undefined"){this._callback_param=b.callback_param}}}JSONScriptRequest.VERSION=0.03;JSONScriptRequest._extends=function(q,n,p){if(typeof p=="undefined"||p==null){p={}}if(q.prototype.constructor==Object.prototype.constructor){q.prototype.constructor=q}var k=function(){};k.prototype=q.prototype;n.prototype=new k();for(var l in p){n.prototype[l]=p[l]}var m=["constructor","hasOwnProperty","isPrototypeOf","toLocaleString","toString","valueOf"];for(var o=0;o<m.length;o++){var l=m[o];if(p.hasOwnProperty(l)){n.prototype[l]=p[l]}}n.prototype.constructor=n;n.prototype.base=q;return n};JSONScriptRequest._Exception=JSONScriptRequest._extends(Object,function(d,c){this.name=d;this.message=c},{toString:function(){return this.name+": "+this.message+" [JSONScriptRequest]"}});JSONScriptRequest.SYNTAX_ERR=JSONScriptRequest._extends(JSONScriptRequest._Exception,function(b){this.base("SYNTAX_ERR",b)});JSONScriptRequest.SECURITY_ERR=JSONScriptRequest._extends(JSONScriptRequest._Exception,function(b){this.base("SECURITY_ERR",b)});JSONScriptRequest.INVALID_STATE_ERR=JSONScriptRequest._extends(JSONScriptRequest._Exception,function(b){this.base("INVALID_STATE_ERR",b)});JSONScriptRequest._RE={method:/^(?:OPTIONS|GET|HEAD|POST|PUT|DELETE|TRACE|CONNECT|[\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7A\x7C\x7E]+)$/,"field-name":/^[\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7A\x7C\x7E]+$/,"http_URL-custom":/^.+$/,userinfo:/^([A-Za-z0-9\-\._~]|%[0-9A-F][0-9A-F]|[!$&\x27\(\)\*\+,;=]|:)*$/,"username-value":/^\x22(?:[\x20\x21\x23-\x7E\x80-\xFF]|(?:\x0D\x0A)?[\x20\x09]+|\\[\x00-\x7F])*\x22$/,"username-value-custom":/^(?:[\x20\x21\x23-\x7E\x80-\xFF]|(?:\x0D\x0A)?[\x20\x09]+|\\[\x00-\x7F])*$/,"field-value":/^(?:(?:(?:[\x20\x21\x23-\x7E\x80-\xFF]|(?:\x0D\x0A)?[\x20\x09]+)*|(?:[\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7A\x7C\x7E]+|[\x22\x28\x29\x2C\x2F\x3A-\x40\x5B-\x5D\x7B\x7D]| (?:\x22(?:[\x20\x21\x23-\x7E\x80-\xFF]|(?:\x0D\x0A)?[\x20\x09]+|\\[\x00-\x7F])*\x22))*)|(?:\x0D\x0A)?[\x20\x09]+)*$/};JSONScriptRequest._toSourceHelper=function(e){if(typeof e=="undefined"){return"undefined"}else{if(e==null){return"null"}else{if(e.constructor==String){return'"'+e+'"'}else{if(e.constructor==Number){return e}else{if(e.constructor==Array){var k=[];for(var f=0,g=e.length;f<g;f++){k.push(JSONScriptRequest._toSourceHelper(e[f]))}return"["+k.join(", ")+"]"}else{if(e.constructor==Object){var k=[];for(var f in e){k.push(f+":"+JSONScriptRequest._toSourceHelper(e[f]))}return"{"+k.join(", ")+"}"}}}}}}};JSONScriptRequest._toSource=function(b){if(b&&b.constructor==Object){return"("+JSONScriptRequest._toSourceHelper(b)+")"}else{return JSONScriptRequest._toSourceHelper(b)}};JSONScriptRequest._dispatchers=[];JSONScriptRequest.prototype={addEventListener:function(){throw new JSONScriptRequest.SYNTAX_ERR("addEventListener is not implemented");return},removeEventListener:function(){throw new JSONScriptRequest.SYNTAX_ERR("removeEventListener is not implemented");return},dispatchEvent:function(){throw new JSONScriptRequest.SYNTAX_ERR("dispatchEvent is not implemented");return false},addEventListenerNS:function(){throw new JSONScriptRequest.SYNTAX_ERR("addEventListenerNS is not implemented");return},removeEventListenerNS:function(){throw new JSONScriptRequest.SYNTAX_ERR("removeEventListenerNS is not implemented");return},open:function(m,n,q,k,p){if(this.readyState==4){this._initialize_all()}if(typeof m=="undefined"||m==null||!m.match(JSONScriptRequest._RE.method)){throw new JSONScriptRequest.SYNTAX_ERR("method: "+m)}var o=m.toUpperCase();if(o!="GET"&&(o=="POST"||o=="HEAD"||o=="PUT"||o=="DELETE"||o=="PROPFIND"||o=="PROPPATCH"||o=="MKCOL"||o=="COPY"||o=="MOVE"||o=="LOCK"||o=="UNLOCK"||o=="VERSION-CONTROL"||o=="REPORT"||o=="CHECKOUT"||o=="CHECKIN"||o=="UNCHECKOUT"||o=="MKWORKSPACE"||o=="UPDATE"||o=="LABEL"||o=="MERGE"||o=="BASELINE-CONTROL"||o=="MKACTIVITY"||o=="ORDERPATCH"||o=="ACL")){throw new JSONScriptRequest.SYNTAX_ERR(m+" is not supported")}if(o!="GET"){throw new JSONScriptRequest.SYNTAX_ERR(m+" is not supported")}if(o=="GET"||o=="POST"||o=="HEAD"||o=="PUT"||o=="DELETE"){m=o}if(typeof n=="undefined"||n==null||!n.match(JSONScriptRequest._RE["http_URL-custom"])){throw new JSONScriptRequest.SYNTAX_ERR("url: "+n)}if(0){throw new JSONScriptRequest.SECURITY_ERR("url: "+n+" is cross-site")}if(n.match(new RegExp("^[^:]+://([^@]*)@[^/]+"))){throw new JSONScriptRequest.SYNTAX_ERR(RegExp.$1+" is not supported");var l=RegExp.$1;if(!l.match(JSONScriptRequest._RE.userinfo)){throw new JSONScriptRequest.SYNTAX_ERR("userinfo: "+l)}l=(l.indexOf(":")!=-1)?l.split(/:/):[l];if(2<l.length){throw new JSONScriptRequest.SYNTAX_ERR("userinfo: "+l)}if(typeof k=="undefined"){k=l[0]}if(typeof p=="undefined"){p=l[1]}}if(k!=null&&typeof k!="undefined"&&!k.match(JSONScriptRequest._RE["username-value-custom"])){throw new JSONScriptRequest.SYNTAX_ERR("user: "+k)}this._method=m;this._url=n;this._async=typeof q=="undefined"?true:q;this._user=typeof k=="undefined"?null:k;this._password=typeof p=="undefined"?null:p;this.responseText=null;this.responseXML=null;this.status=0;this.statusText="";this._requestHeaders={};this._readystatechange(1);return},setRequestHeader:function(f,d){if(this.readyState!=1){throw new JSONScriptRequest.INVALID_STATE_ERR("readyState: "+this.readyState+" is other than 1")}if(typeof f=="undefined"||f==null||!f.match(JSONScriptRequest._RE["field-name"])){throw new JSONScriptRequest.SYNTAX_ERR("header: "+f)}if(!d.match(JSONScriptRequest._RE["field-value"])){throw new JSONScriptRequest.SYNTAX_ERR("value: "+d)}if(f.match(new RegExp("Accept-Charset|Accept-Encoding|Content-Length|Expect|Date|Host|Keep-Alive|Referer|TE|Trailer|Transfer-Encoding|Upgrade","i"))){return}if(f.match(new RegExp("Authorization|Content-Base|Content-Location|Content-MD5|Content-Range|Content-Type|Content-Version|Delta-Base|Depth|Destination|ETag|Expect|From|If-Modified-Since|If-Range|If-Unmodified-Since|Max-Forwards|MIME-Version|Overwrite|Proxy-Authorization|SOAPAction|Timeout","i"))){this._requestHeaders[f]=d}else{if(f in this._requestHeaders){if(typeof this._requestHeaders[f]=="string"){var e=this._requestHeaders[f];this._requestHeaders[f]=[];this._requestHeaders[f].push(e);this._requestHeaders[f].push(d)}else{this._requestHeaders[f].push(d)}}else{this._requestHeaders[f]=d}}return},send:function(e){if(this.readyState!=1){throw new JSONScriptRequest.INVALID_STATE_ERR("readyState: "+this.readyState+" is other than 1")}var k=this._url;if(k.indexOf("http://")==-1){if(typeof window.document.baseURI!="undefined"&&window.document.baseURI.match(new RegExp("(.*/)[^/]*$"))){k=RegExp.$1+k}else{}}this._create_dispatcher();k+=(k.indexOf("?")==-1?"?":"&")+this._callback_param+"="+encodeURIComponent("JSONScriptRequest._dispatchers["+this._id+"]");if(typeof e=="undefined"){e=null}if(e!=null){if(typeof e=="string"){}else{if(typeof e=="object"&&"nodeType" in e&&e.nodeType==9){if("xmlEncoding" in e){}else{}}else{e=e.toString()}}k+="&"+e}if(this._user!=null||this._password!=null){var f=(this._user!=null?this._user:"")+":"+(this._password!=null?this._password:"");k.replace(new RegExp("(https?://)(.+)","i"),RegExp.$1+f+"@"+RegExp.$2)}var g=document.createElement("script");g.src=k;g.type="text/javascript";g.charset="UTF-8";this._readystatechange(2);document.documentElement.appendChild(g);return},abort:function(){var b=this._id;this._initialize_all();if(b!=null){JSONScriptRequest._dispatchers[b]=function(a){delete JSONScriptRequest._dispatchers[b]}}return},getAllResponseHeaders:function(){if(this.readyState!=3&&this.readyState!=4){throw new JSONScriptRequest.INVALID_STATE_ERR("readyState: "+this.readyState+" is other than 3 or 4")}var c="";for(var d in this._responseHeaders){c+=d+": "+this._responseHeaders[d].toString()+"\x0D\x0A"}return c},getResponseHeader:function(d){if(!d.match(JSONScriptRequest._RE["field-name"])){throw new JSONScriptRequest.SYNTAX_ERR("header: "+d)}if(this.readyState!=3&&this.readyState!=4){throw new JSONScriptRequest.INVALID_STATE_ERR("readyState: "+this.readyState+" is other than 3 or 4")}d=d.toUpperCase();var e=[];for(var f in this._responseHeaders){if(f.toUpperCase()==d){e.push(this._responseHeaders[f])}}if(e.length==0){return null}else{return e.join(", ")}},_initialize:function(){this.onreadystatechange=null;this.readyState=0;this.responseText=null;this.responseJSON=null;this.status=0;this.statusText="";this._readystatechange(0)},_initialize_dispatcher:function(){if(this._id!=null){delete JSONScriptRequest._dispatchers[this._id];this._id=null}},_initialize_all:function(){this._initialize();this._initialize_dispatcher();this._callback_param="callback";this._method=null;this._url=null;this._async=true;this._user=null;this._password=null;this._requestHeaders={};this._responseHeaders={}},_readystatechange:function(b){if(this.readyState==b){}this.readyState=b;if(this.readyState!=4&&this.responseJSON!=null){throw new JSONScriptRequest.INVALID_STATE_ERR("readyState: "+this.readyState+" is other than 4, butresponseJSON: "+this.responseJSON+" has a value")}if(this.readyState!=3&&this.readyState!=4&&this.responseText!=null){throw new JSONScriptRequest.INVALID_STATE_ERR("readyState: "+this.readyState+" is other than 3 or 4, butresponseText: "+this.responseText+" has a value")}if((this.readyState==3||this.readyState==4)&&(this.status==0||this.statusText=="")){throw new JSONScriptRequest.INVALID_STATE_ERR("status and statusText must be available when readyState is 3 or 4")}if(this.onreadystatechange){this.onreadystatechange()}return},_create_dispatcher:function(){this._initialize_dispatcher();for(this._id=0;this._id<JSONScriptRequest._dispatchers.length;this._id++){if(!this.id in JSONScriptRequest._dispatchers){break}}var b=this;JSONScriptRequest._dispatchers[this._id]=(function(){return function(a){b._initialize_dispatcher();b._dispatcher(a)}})();return},_dispatcher:function(b){if(typeof b=="undefined"||b==null){this.status=400;this.statusText="Bad Request"}else{this.status=200;this.statusText="OK"}this.responseText="";this._readystatechange(3);if(this._method=="HEAD"){this._readystatechange(4)}else{this.responseText=JSONScriptRequest._toSource(b).replace(/^\(/,"").replace(/\)$/,"");this._readystatechange(3);this.responseJSON=b;this._readystatechange(4)}return}};