﻿if(typeof(Sys)=="undefined"){Function.__typeName="Function";Function.__class=true;Function.createCallback=function(d,c){return function(){var f=arguments.length;if(f>0){var b=[];for(var a=0;a<f;a++){b[a]=arguments[a]}b[f]=c;return d.apply(this,b)}return d.call(this,c)}};Function.createDelegate=function(c,d){return function(){return d.apply(c,arguments)}};Function.emptyFunction=Function.emptyMethod=function(){};Function._validateParams=function(n,l){var g;g=Function._validateParameterCount(n,l);if(g){g.popStackFrame();return g}for(var k=0;k<n.length;k++){var m=l[Math.min(k,l.length-1)],o=m.name;if(m.parameterArray){o+="["+(k-l.length+1)+"]"}g=Function._validateParameter(n[k],m,o);if(g){g.popStackFrame();return g}}return null};Function._validateParameterCount=function(n,g){var l=g.length,m=0;for(var k=0;k<g.length;k++){if(g[k].parameterArray){l=Number.MAX_VALUE}else{if(!g[k].optional){m++}}}if(n.length<m||n.length>l){var o=Error.parameterCount();o.popStackFrame();return o}return null};Function._validateParameter=function(A,v,F){var z,E=v.type,r=!!v.integer,q=!!v.domElement,s=!!v.mayBeNull;z=Function._validateParameterType(A,E,r,q,s,F);if(z){z.popStackFrame();return z}var C=v.elementType,D=!!v.elementMayBeNull;if(E===Array&&typeof A!=="undefined"&&A!==null&&(C||!D)){var p=!!v.elementInteger,o=!!v.elementDomElement;for(var B=0;B<A.length;B++){var u=A[B];z=Function._validateParameterType(u,C,p,o,D,F+"["+B+"]");if(z){z.popStackFrame();return z}}}return null};Function._validateParameterType=function(v,A,u,s,q,B){var z;if(typeof v==="undefined"){if(q){return null}else{z=Error.argumentUndefined(B);z.popStackFrame();return z}}if(v===null){if(q){return null}else{z=Error.argumentNull(B);z.popStackFrame();return z}}if(A&&A.__enum){if(typeof v!=="number"){z=Error.argumentType(B,Object.getType(v),A);z.popStackFrame();return z}if(v%1===0){var C=A.prototype;if(!A.__flags||v===0){for(var o in C){if(C[o]===v){return null}}}else{var r=v;for(var o in C){var D=C[o];if(D===0){continue}if((D&v)===D){r-=D}if(r===0){return null}}}}z=Error.argumentOutOfRange(B,v,String.format(Sys.Res.enumInvalidValue,v,A.getName()));z.popStackFrame();return z}if(s){var F;if(typeof v.nodeType!=="number"){var E=v.ownerDocument||v.document||v;if(E!=v){var p=E.defaultView||E.parentWindow;F=p!=v&&!(p.document&&v.document&&p.document===v.document)}else{F=typeof E.body==="undefined"}}else{F=v.nodeType===3}if(F){z=Error.argument(B,Sys.Res.argumentDomElement);z.popStackFrame();return z}}if(A&&!A.isInstanceOfType(v)){z=Error.argumentType(B,Object.getType(v),A);z.popStackFrame();return z}if(A===Number&&u){if(v%1!==0){z=Error.argumentOutOfRange(B,v,Sys.Res.argumentInteger);z.popStackFrame();return z}}return null};Error.__typeName="Error";Error.__class=true;Error.create=function(k,f){var e=new Error(k);e.message=k;if(f){for(var g in f){e[g]=f[g]}}e.popStackFrame();return e};Error.argument=function(e,g){var f="Sys.ArgumentException: "+(g?g:Sys.Res.argument);if(e){f+="\n"+String.format(Sys.Res.paramName,e)}var k=Error.create(f,{name:"Sys.ArgumentException",paramName:e});k.popStackFrame();return k};Error.argumentNull=function(e,g){var f="Sys.ArgumentNullException: "+(g?g:Sys.Res.argumentNull);if(e){f+="\n"+String.format(Sys.Res.paramName,e)}var k=Error.create(f,{name:"Sys.ArgumentNullException",paramName:e});k.popStackFrame();return k};Error.argumentOutOfRange=function(k,f,l){var g="Sys.ArgumentOutOfRangeException: "+(l?l:Sys.Res.argumentOutOfRange);if(k){g+="\n"+String.format(Sys.Res.paramName,k)}if(typeof f!=="undefined"&&f!==null){g+="\n"+String.format(Sys.Res.actualValue,f)}var m=Error.create(g,{name:"Sys.ArgumentOutOfRangeException",paramName:k,actualValue:f});m.popStackFrame();return m};Error.argumentType=function(m,l,k,n){var g="Sys.ArgumentTypeException: ";if(n){g+=n}else{if(l&&k){g+=String.format(Sys.Res.argumentTypeWithTypes,l.getName(),k.getName())}else{g+=Sys.Res.argumentType}}if(m){g+="\n"+String.format(Sys.Res.paramName,m)}var o=Error.create(g,{name:"Sys.ArgumentTypeException",paramName:m,actualType:l,expectedType:k});o.popStackFrame();return o};Error.argumentUndefined=function(e,g){var f="Sys.ArgumentUndefinedException: "+(g?g:Sys.Res.argumentUndefined);if(e){f+="\n"+String.format(Sys.Res.paramName,e)}var k=Error.create(f,{name:"Sys.ArgumentUndefinedException",paramName:e});k.popStackFrame();return k};Error.format=function(d){var f="Sys.FormatException: "+(d?d:Sys.Res.format),e=Error.create(f,{name:"Sys.FormatException"});e.popStackFrame();return e};Error.invalidOperation=function(d){var f="Sys.InvalidOperationException: "+(d?d:Sys.Res.invalidOperation),e=Error.create(f,{name:"Sys.InvalidOperationException"});e.popStackFrame();return e};Error.notImplemented=function(d){var f="Sys.NotImplementedException: "+(d?d:Sys.Res.notImplemented),e=Error.create(f,{name:"Sys.NotImplementedException"});e.popStackFrame();return e};Error.parameterCount=function(d){var f="Sys.ParameterCountException: "+(d?d:Sys.Res.parameterCount),e=Error.create(f,{name:"Sys.ParameterCountException"});e.popStackFrame();return e};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 f=this.stack.split("\n"),k=f[0],m=this.fileName+":"+this.lineNumber;while(typeof k!=="undefined"&&k!==null&&k.indexOf(m)===-1){f.shift();k=f[0]}var l=f[1];if(typeof l==="undefined"||l===null){return}var g=l.match(/@(.*):(\d+)$/);if(typeof g==="undefined"||g===null){return}this.fileName=g[1];this.lineNumber=parseInt(g[2]);f.shift();this.stack=f.join("\n")};Object.__typeName="Object";Object.__class=true;Object.getType=function(d){var c=d.constructor;if(!c||typeof c!=="function"||!c.__typeName||c.__typeName==="Object"){return Object}return c};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(p,n){var s="",v=n[0];for(var q=0;true;){var z=v.indexOf("{",q),u=v.indexOf("}",q);if(z<0&&u<0){s+=v.slice(q);break}if(u>0&&(u<z||z<0)){s+=v.slice(q,u+1);q=u+2;continue}s+=v.slice(q,z);q=z+1;if(v.charAt(q)==="{"){s+="{";q++;continue}if(u<0){break}var B=v.substring(q,u),A=B.indexOf(":"),o=parseInt(A<0?B:B.substring(0,A),10)+1,m=A<0?"":B.substring(A+1),r=n[o];if(typeof r==="undefined"||r===null){r=""}if(r.toFormattedString){s+=r.toFormattedString(m)}else{if(p&&r.localeFormat){s+=r.localeFormat(m)}else{if(r.format){s+=r.format(m)}else{s+=r.toString()}}}q=u+1}return s};Boolean.__typeName="Boolean";Boolean.__class=true;Boolean.parse=function(d){var c=d.trim().toLowerCase();if(c==="false"){return false}if(c==="true"){return true}};Date.__typeName="Date";Date.__class=true;Date._appendPreOrPostMatch=function(o,l){var n=0,k=false;for(var m=0,q=o.length;m<q;m++){var p=o.charAt(m);switch(p){case"'":if(k){l.append("'")}else{n++}k=false;break;case"\\":if(k){l.append("\\")}k=!k;break;default:l.append(p);k=false}}return n};Date._expandFormat=function(c,d){if(!d){d="F"}if(d.length===1){switch(d){case"d":return c.ShortDatePattern;case"D":return c.LongDatePattern;case"t":return c.ShortTimePattern;case"T":return c.LongTimePattern;case"F":return c.FullDateTimePattern;case"M":case"m":return c.MonthDayPattern;case"s":return c.SortableDateTimePattern;case"Y":case"y":return c.YearMonthPattern;default:throw Error.format(Sys.Res.formatInvalidString)}}return d};Date._expandYear=function(f,d){if(d<100){var e=(new Date).getFullYear();d+=e-e%100;if(d>f.Calendar.TwoDigitYearMax){return d-100}}return d};Date._getParseRegExp=function(r,v){if(!r._parseRegExp){r._parseRegExp={}}else{if(r._parseRegExp[v]){return r._parseRegExp[v]}}var s=Date._expandFormat(r,v);s=s.replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1");var q=new Sys.StringBuilder("^"),n=[],z=0,m=0,B=Date._getTokenRegExp(),u;while((u=B.exec(s))!==null){var p=s.slice(z,u.index);z=B.lastIndex;m+=Date._appendPreOrPostMatch(p,q);if(m%2===1){q.append(u[0]);continue}switch(u[0]){case"dddd":case"ddd":case"MMMM":case"MMM":q.append("(\\D+)");break;case"tt":case"t":q.append("(\\D*)");break;case"yyyy":q.append("(\\d{4})");break;case"fff":q.append("(\\d{3})");break;case"ff":q.append("(\\d{2})");break;case"f":q.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":q.append("(\\d\\d?)");break;case"zzz":q.append("([+-]?\\d\\d?:\\d{2})");break;case"zz":case"z":q.append("([+-]?\\d\\d?)")}Array.add(n,u[0])}Date._appendPreOrPostMatch(s.slice(z),q);q.append("$");var o=q.toString().replace(/\s+/g,"\\s+"),A={regExp:o,groups:n};r._parseRegExp[v]=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,n,s){var p=false;for(var l=1,k=s.length;l<k;l++){var q=s[l];if(q){p=true;var m=Date._parseExact(r,q,n);if(m){return m}}}if(!p){var o=n._getDateTimeFormats();for(var l=0,k=o.length;l<k;l++){var m=Date._parseExact(r,o[l],n);if(m){return m}}}return null};Date._parseExact=function(F,A,M){F=F.trim();var P=M.dateTimeFormat,I=Date._getParseRegExp(P,A),Z=(new RegExp(I.regExp)).exec(F);if(Z===null){return null}var J=I.groups,X=null,U=null,K=null,Y=null,V=0,Q=0,R=0,W=0,N=null,E=false;for(var C=0,B=J.length;C<B;C++){var S=Z[C+1];if(S){switch(J[C]){case"dd":case"d":K=parseInt(S,10);if(K<1||K>31){return null}break;case"MMMM":U=M._getMonthIndex(S);if(U<0||U>11){return null}break;case"MMM":U=M._getAbbrMonthIndex(S);if(U<0||U>11){return null}break;case"M":case"MM":var U=parseInt(S,10)-1;if(U<0||U>11){return null}break;case"y":case"yy":X=Date._expandYear(P,parseInt(S,10));if(X<0||X>9999){return null}break;case"yyyy":X=parseInt(S,10);if(X<0||X>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":Q=parseInt(S,10);if(Q<0||Q>59){return null}break;case"s":case"ss":R=parseInt(S,10);if(R<0||R>59){return null}break;case"tt":case"t":var H=S.toUpperCase();E=H===P.PMDesignator.toUpperCase();if(!E&&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":Y=M._getDayIndex(S);if(Y<0||Y>6){return null}break;case"ddd":Y=M._getAbbrDayIndex(S);if(Y<0||Y>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}N=L*60+(S.startsWith("-")?-O:O);break;case"z":case"zz":var L=parseInt(S,10);if(L<-12||L>13){return null}N=L*60}}}var T=new Date;if(X===null){X=T.getFullYear()}if(U===null){U=T.getMonth()}if(K===null){K=T.getDate()}T.setFullYear(X,U,K);if(T.getDate()!==K){return null}if(Y!==null&&T.getDay()!==Y){return null}if(E&&V<12){V+=12}T.setHours(V,Q,R,W);if(N!==null){var G=T.getMinutes()-(N+T.getTimezoneOffset());T.setHours(T.getHours()+parseInt(G/60,10),G%60)}return T};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(v,B){if(!v||v.length===0||v==="i"){if(B&&B.name.length>0){return this.toLocaleString()}else{return this.toString()}}var u=B.dateTimeFormat;v=Date._expandFormat(u,v);var q=new Sys.StringBuilder,r;function s(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,m=Date._getTokenRegExp();for(;true;){var p=m.lastIndex,z=m.exec(v),o=v.slice(p,z?z.index:v.length);n+=Date._appendPreOrPostMatch(o,q);if(!z){break}if(n%2===1){q.append(z[0]);continue}switch(z[0]){case"dddd":q.append(u.DayNames[this.getDay()]);break;case"ddd":q.append(u.AbbreviatedDayNames[this.getDay()]);break;case"dd":q.append(s(this.getDate()));break;case"d":q.append(this.getDate());break;case"MMMM":q.append(u.MonthNames[this.getMonth()]);break;case"MMM":q.append(u.AbbreviatedMonthNames[this.getMonth()]);break;case"MM":q.append(s(this.getMonth()+1));break;case"M":q.append(this.getMonth()+1);break;case"yyyy":q.append(this.getFullYear());break;case"yy":q.append(s(this.getFullYear()%100));break;case"y":q.append(this.getFullYear()%100);break;case"hh":r=this.getHours()%12;if(r===0){r=12}q.append(s(r));break;case"h":r=this.getHours()%12;if(r===0){r=12}q.append(r);break;case"HH":q.append(s(this.getHours()));break;case"H":q.append(this.getHours());break;case"mm":q.append(s(this.getMinutes()));break;case"m":q.append(this.getMinutes());break;case"ss":q.append(s(this.getSeconds()));break;case"s":q.append(this.getSeconds());break;case"tt":q.append(this.getHours()<12?u.AMDesignator:u.PMDesignator);break;case"t":q.append((this.getHours()<12?u.AMDesignator:u.PMDesignator).charAt(0));break;case"f":q.append(A(this.getMilliseconds()).charAt(0));break;case"ff":q.append(A(this.getMilliseconds()).substr(0,2));break;case"fff":q.append(A(this.getMilliseconds()));break;case"z":r=this.getTimezoneOffset()/60;q.append((r<=0?"+":"-")+Math.floor(Math.abs(r)));break;case"zz":r=this.getTimezoneOffset()/60;q.append((r<=0?"+":"-")+s(Math.floor(Math.abs(r))));break;case"zzz":r=this.getTimezoneOffset()/60;q.append((r<=0?"+":"-")+s(Math.floor(Math.abs(r)))+u.TimeSeparator+s(Math.abs(this.getTimezoneOffset()%60)))}}return q.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(z,u){z=z.trim();if(z.match(/^[+-]?infinity$/i)){return parseFloat(z)}if(z.match(/^0x[a-f0-9]+$/i)){return parseInt(z)}var v=u.numberFormat,D=Number._parseNumberNegativePattern(z,v,v.NumberNegativePattern),F=D[0],B=D[1];if(F===""&&v.NumberNegativePattern!==1){D=Number._parseNumberNegativePattern(z,v,1);F=D[0];B=D[1]}if(F===""){F="+"}var p,A,C=B.indexOf("e");if(C<0){C=B.indexOf("E")}if(C<0){A=B;p=null}else{A=B.substr(0,C);p=B.substr(C+1)}var E,q,s=A.indexOf(v.NumberDecimalSeparator);if(s<0){E=A;q=null}else{E=A.substr(0,s);q=A.substr(s+v.NumberDecimalSeparator.length)}E=E.split(v.NumberGroupSeparator).join("");var r=F+E;if(q!==null){r+="."+q}if(p!==null){var o=Number._parseNumberNegativePattern(p,v,1);if(o[0]===""){o[0]="+"}r+="e"+o[0]+o[1]}if(r.match(/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/)){return parseFloat(r)}return Number.NaN};Number._parseNumberNegativePattern=function(f,l,m){var g=l.NegativeSign,k=l.PositiveSign;switch(m){case 4:g=" "+g;k=" "+k;case 3:if(f.endsWith(g)){return["-",f.substr(0,f.length-g.length)]}else{if(f.endsWith(k)){return["+",f.substr(0,f.length-k.length)]}}break;case 2:g+=" ";k+=" ";case 1:if(f.startsWith(g)){return["-",f.substr(g.length)]}else{if(f.startsWith(k)){return["+",f.substr(k.length)]}}break;case 0:if(f.startsWith("(")&&f.endsWith(")")){return["-",f.substr(1,f.length-2)]}}return["",f]};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(M,D){if(!M||M.length===0||M==="i"){if(D&&D.name.length>0){return this.toLocaleString()}else{return this.toString()}}var v=["n %","n%","%n"],u=["-n %","-n%","-%n"],z=["(n)","-n","- n","n-","n -"],I=["$n","n$","$ n","n $"],H=["($n)","-$n","$-n","$n-","(n$)","-n$","n-$","n$-","-n $","-$ n","n $-","$ n-","$ -n","n- $","($ n)","(n $)"];function C(aa,s,r,Q,T){var Y=r[0],V=1,W=aa.toString(),U="",R="",q=W.split(".");if(q.length>1){W=q[0];U=q[1];var ac=U.split(/e/i);if(ac.length>1){U=ac[0];R="e"+ac[1]}}if(s>0){var Z=U.length-s;if(Z>0){U=U.slice(0,s)}else{if(Z<0){for(var S=0;S<Math.abs(Z);S++){U+="0"}}}U=T+U}else{U=""}U+=R;var ab=W.length-1,X="";while(ab>=0){if(Y===0||Y>ab){if(X.length>0){return W.slice(0,ab+1)+Q+X+U}else{return W.slice(0,ab+1)+U}}if(X.length>0){X=W.slice(ab-Y+1,ab+1)+Q+X}else{X=W.slice(ab-Y+1,ab+1)}ab-=Y;if(V<r.length){Y=r[V];V++}}return W.slice(0,ab+1)+Q+X+U}var J=D.numberFormat,N=Math.abs(this);if(!M){M="D"}var K=-1;if(M.length>1){K=parseInt(M.slice(1),10)}var L;switch(M.charAt(0)){case"d":case"D":L="n";if(K!==-1){var P=""+N,E=K-P.length;if(E>0){for(var G=0;G<E;G++){P="0"+P}}N=P}if(this<0){N=-N}break;case"c":case"C":if(this<0){L=H[J.CurrencyNegativePattern]}else{L=I[J.CurrencyPositivePattern]}if(K===-1){K=J.CurrencyDecimalDigits}N=C(Math.abs(this),K,J.CurrencyGroupSizes,J.CurrencyGroupSeparator,J.CurrencyDecimalSeparator);break;case"n":case"N":if(this<0){L=z[J.NumberNegativePattern]}else{L="n"}if(K===-1){K=J.NumberDecimalDigits}N=C(Math.abs(this),K,J.NumberGroupSizes,J.NumberGroupSeparator,J.NumberDecimalSeparator);break;case"p":case"P":if(this<0){L=u[J.PercentNegativePattern]}else{L=v[J.PercentPositivePattern]}if(K===-1){K=J.PercentDecimalDigits}N=C(Math.abs(this),K,J.PercentGroupSizes,J.PercentGroupSeparator,J.PercentDecimalSeparator);break;default:throw Error.format(Sys.Res.formatBadFormatSpecifier)}var F=/n|\$|-|%/g,O="";for(;true;){var A=F.lastIndex,B=F.exec(L);O+=L.slice(A,B?B.index:L.length);if(!B){break}switch(B[0]){case"n":O+=N;break;case"$":O+=J.CurrencySymbol;break;case"-":O+=J.NegativeSign;break;case"%":O+=J.PercentSymbol}}return O};RegExp.__typeName="RegExp";RegExp.__class=true;Array.__typeName="Array";Array.__class=true;Array.add=Array.enqueue=function(c,d){c[c.length]=d};Array.addRange=function(c,d){c.push.apply(c,d)};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(c,d){return Array.indexOf(c,d)>=0};Array.dequeue=function(b){return b.shift()};Array.forEach=function(k,n,m){for(var g=0,o=k.length;g<o;g++){var l=k[g];if(typeof l!=="undefined"){n.call(m,l,g,k)}}};Array.indexOf=function(l,m,f){if(typeof m==="undefined"){return -1}var k=l.length;if(k!==0){f=f-0;if(isNaN(f)){f=0}else{if(isFinite(f)){f=f-f%1}if(f<0){f=Math.max(0,k+f)}}for(var g=f;g<k;g++){if(typeof l[g]!=="undefined"&&l[g]===m){return g}}}return -1};Array.insert=function(d,e,f){d.splice(e,0,f)};Array.parse=function(value){if(!value){return[]}return eval(value)};Array.remove=function(e,f){var d=Array.indexOf(e,f);if(d>=0){e.splice(d,1)}return d>=0};Array.removeAt=function(c,d){c.splice(d,1)};if(!window){this.window=this}window.Type=Function;Type.prototype.callBaseMethod=function(e,k,f){var g=this.getBaseMethod(e,k);if(!f){return g.apply(e)}else{return g.apply(e,f)}};Type.prototype.getBaseMethod=function(k,g){var f=this.getBaseType();if(f){var e=f.prototype[g];return e instanceof Function?e:null}return null};Type.prototype.getBaseType=function(){return typeof this.__baseType==="undefined"?null:this.__baseType};Type.prototype.getInterfaces=function(){var g=[],k=this;while(k){var l=k.__interfaces;if(l){for(var m=0,o=l.length;m<o;m++){var n=l[m];if(!Array.contains(g,n)){g[g.length]=n}}}k=k.__baseType}return g};Type.prototype.getName=function(){return typeof this.__typeName==="undefined"?"":this.__typeName};Type.prototype.implementsInterface=function(m){this.resolveInheritance();var l=m.getName(),g=this.__interfaceCache;if(g){var n=g[l];if(typeof n!=="undefined"){return n}}else{g=this.__interfaceCache={}}var k=this;while(k){var o=k.__interfaces;if(o){if(Array.indexOf(o,m)!==-1){return g[l]=true}}k=k.__baseType}return g[l]=false};Type.prototype.inheritsFrom=function(d){this.resolveInheritance();var c=this.__baseType;while(c){if(c===d){return true}c=c.__baseType}return false};Type.prototype.initializeBase=function(c,d){this.resolveInheritance();if(this.__baseType){if(!d){this.__baseType.apply(c)}else{this.__baseType.apply(c,d)}}return c};Type.prototype.isImplementedBy=function(c){if(typeof c==="undefined"||c===null){return false}var d=Object.getType(c);return !!(d.implementsInterface&&d.implementsInterface(this))};Type.prototype.isInstanceOfType=function(d){if(typeof d==="undefined"||d===null){return false}if(d instanceof this){return true}var c=Object.getType(d);return !!(c===this)||c.inheritsFrom&&c.inheritsFrom(this)||c.implementsInterface&&c.implementsInterface(this)};Type.prototype.registerClass=function(l,k,m){this.prototype.constructor=this;this.__typeName=l;this.__class=true;if(k){this.__baseType=k;this.__basePrototypePending=true}Sys.__upperCaseTypes[l.toUpperCase()]=this;if(m){this.__interfaces=[];for(var g=2,o=arguments.length;g<o;g++){var n=arguments[g];this.__interfaces.push(n)}}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 e=this.__baseType;e.resolveInheritance();for(var d in e.prototype){var f=e.prototype[d];if(!this.prototype[d]){this.prototype[d]=f}}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 m=window,l=o.split(".");for(var k=0;k<l.length;k++){var n=l[k],g=m[n];if(!g){g=m[n]={__namespace:true,__typeName:l.slice(0,k+1).join(".")};if(k===0){Sys.__rootNamespaces[Sys.__rootNamespaces.length]=g}g.getName=function(){return this.__typeName}}m=g}};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(e){e=e||"";var f=this._parts;if(this._len!==f.length){this._value={};this._len=f.length}var k=this._value;if(typeof k[e]==="undefined"){if(e!==""){for(var g=0;g<f.length;){if(typeof f[g]==="undefined"||f[g]===""||f[g]===null){f.splice(g,1)}else{g++}}}k[e]=this._parts.join(e)}return k[e]}};Sys.StringBuilder.registerClass("Sys.StringBuilder");if(!window.XMLHttpRequest){window.XMLHttpRequest=function(){var f=["Mxsml2.XMLHTTP.3.0","Msxml2.XMLHTTP"];for(var e=0,g=f.length;e<g;e++){try{return new ActiveXObject(f[e])}catch(k){}}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(d){var c=document.getElementById("TraceConsole");if(c&&c.tagName.toUpperCase()==="TEXTAREA"){c.value+=d+"\n"}},assert:function(f,d,e){if(!f){d=e&&this.assert.caller?String.format(Sys.Res.assertFailedCaller,d,this.assert.caller):String.format(Sys.Res.assertFailed,d);if(confirm(String.format(Sys.Res.breakIntoDebugger,d))){this.fail(d)}}},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(d,e){var f=this._traceDump(d,e,true)},_traceDump:function(q,s,z,r,u){s=s?s:"traceDump";r=r?r:"";if(q===null){this.trace(r+s+": null");return}switch(typeof q){case"undefined":this.trace(r+s+": Undefined");break;case"number":case"string":case"boolean":this.trace(r+s+": "+q);break;default:if(Date.isInstanceOfType(q)||RegExp.isInstanceOfType(q)){this.trace(r+s+": "+q.toString());break}if(!u){u=[]}else{if(Array.contains(u,q)){this.trace(r+s+": ...");return}}Array.add(u,q);if(q==window||q===document||window.HTMLElement&&q instanceof HTMLElement||typeof q.nodeName==="string"){var o=q.tagName?q.tagName:"DomElement";if(q.id){o+=" - "+q.id}this.trace(r+s+" {"+o+"}")}else{var m=Object.getTypeName(q);this.trace(r+s+(typeof m==="string"?" {"+m+"}":""));if(r===""||z){r+="    ";var v,n,p,A,B;if(Array.isInstanceOfType(q)){n=q.length;for(v=0;v<n;v++){this._traceDump(q[v],"["+v+"]",z,r,u)}}else{for(A in q){B=q[A];if(!Function.isInstanceOfType(B)){this._traceDump(B,A,z,r,u)}}}}}Array.remove(u,q)}}};Sys._Debug.registerClass("Sys._Debug");Sys.Debug=new Sys._Debug;Sys.Debug.isDebug=false;function Sys$Enum$parse(q,s){var o,p,l;if(s){o=this.__lowerCaseValues;if(!o){this.__lowerCaseValues=o={};var v=this.prototype;for(var u in v){o[u.toLowerCase()]=v[u]}}}else{o=this.prototype}if(!this.__flags){l=s?q.toLowerCase():q;p=o[l.trim()];if(typeof p!=="number"){throw Error.argument("value",String.format(Sys.Res.enumInvalidValue,q,this.__typeName))}return p}else{var z=(s?q.toLowerCase():q).split(","),m=0;for(var r=z.length-1;r>=0;r--){var n=z[r].trim();p=o[n];if(typeof p!=="number"){throw Error.argument("value",String.format(Sys.Res.enumInvalidValue,q.split(",")[r].trim(),this.__typeName))}m|=p}return m}}function Sys$Enum$toString(m){if(typeof m==="undefined"||m===null){return this.__string}var n=this.prototype,k;if(!this.__flags||m===0){for(k in n){if(n[k]===m){return k}}}else{var l=this.__sortedValues;if(!l){l=[];for(k in n){l[l.length]={key:k,value:n[k]}}l.sort(function(c,d){return c.value-d.value});this.__sortedValues=l}var o=[],q=m;for(k=l.length-1;k>=0;k--){var r=l[k],p=r.value;if(p===0){continue}if((p&m)===p){o[o.length]=r.key;q-=p;if(q===0){break}}}if(o.length&&q===0){return o.reverse().join(", ")}}return""}Type.prototype.registerEnum=function(e,f){Sys.__upperCaseTypes[e.toUpperCase()]=this;for(var d in this.prototype){this[d]=this.prototype[d]}this.__typeName=e;this.parse=Sys$Enum$parse;this.__string=this.toString();this.toString=Sys$Enum$toString;this.__flags=f;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(d,c){Array.add(this._getEvent(d,true),c)},removeHandler:function(f,e){var d=this._getEvent(f);if(!d){return}Array.remove(d,e)},getHandler:function(d){var c=this._getEvent(d);if(!c||c.length===0){return null}c=Array.clone(c);return function(f,g){for(var a=0,k=c.length;a<k;a++){c[a](f,g)}}},_getEvent:function(c,d){if(!this._list[c]){if(!d){return null}this._list[c]=[]}return this._list[c]}};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(d){if(!this._events){return}var c=this._events.getHandler("propertyChanged");if(c){c(this,new Sys.PropertyChangedEventArgs(d))}},updated:function(){}};Sys.Component.registerClass("Sys.Component",null,Sys.IDisposable,Sys.INotifyPropertyChange,Sys.INotifyDisposing);function Sys$Component$_setProperties(v,o){var B,p=Object.getType(v),C=p===Object||p===Sys.UI.DomElement,F=Sys.Component.isInstanceOfType(v)&&!v.get_isUpdating();if(F){v.beginUpdate()}for(var A in o){var z=o[A],D=C?null:v["get_"+A];if(C||typeof D!=="function"){var q=v[A];if(!z||typeof z!=="object"||C&&!q){v[A]=z}else{Sys$Component$_setProperties(q,z)}}else{var r=v["set_"+A];if(typeof r==="function"){r.apply(v,[z])}else{if(z instanceof Array){B=D.apply(v);for(var E=0,s=B.length,u=z.length;E<u;E++,s++){B[s]=z[E]}}else{if(typeof z==="object"&&Object.getType(z)===Object){B=D.apply(v);Sys$Component$_setProperties(B,z)}}}}}if(F){v.endUpdate()}}function Sys$Component$_setReferences(k,g){for(var f in g){var m=k["set_"+f],l=$find(g[f]);m.apply(k,[l])}}var $create=Sys.Component.create=function(s,q,o,n,r){var l=r?new s(r):new s,m=Sys.Application,k=m.get_isCreatingComponents();l.beginUpdate();if(q){Sys$Component$_setProperties(l,q)}if(o){for(var p in o){l["add_"+p](o[p])}}if(l.get_id()){m.addComponent(l)}if(k){m._createdComponents[m._createdComponents.length]=l;if(n){m._addComponentToSecondPass(l,n)}else{l.endUpdate()}}else{if(n){Sys$Component$_setReferences(l,n)}l.endUpdate()}return l};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(c,d){this.x=c;this.y=d};Sys.UI.Point.registerClass("Sys.UI.Point");Sys.UI.Bounds=function(g,k,f,e){this.x=g;this.y=k;this.height=e;this.width=f};Sys.UI.Bounds.registerClass("Sys.UI.Bounds");Sys.UI.DomEvent=function(k){var e=k;this.rawEvent=e;this.altKey=e.altKey;if(typeof e.button!=="undefined"){this.button=typeof e.which!=="undefined"?e.button:e.button===4?Sys.UI.MouseButton.middleButton:e.button===2?Sys.UI.MouseButton.rightButton:Sys.UI.MouseButton.leftButton}if(e.type==="keypress"){this.charCode=e.charCode||e.keyCode}else{if(e.keyCode&&e.keyCode===46){this.keyCode=127}else{this.keyCode=e.keyCode}}this.clientX=e.clientX;this.clientY=e.clientY;this.ctrlKey=e.ctrlKey;this.target=e.target?e.target:e.srcElement;if(typeof e.offsetX!=="undefined"&&typeof e.offsetY!=="undefined"){this.offsetX=e.offsetX;this.offsetY=e.offsetY}else{if(this.target&&this.target.nodeType!==3&&typeof e.clientX==="number"){var f=Sys.UI.DomElement.getLocation(this.target),g=Sys.UI.DomElement._getWindow(this.target);this.offsetX=(g.pageXOffset||0)+e.clientX-f.x;this.offsetY=(g.pageYOffset||0)+e.clientY-f.y}}this.screenX=e.screenX;this.screenY=e.screenY;this.shiftKey=e.shiftKey;this.type=e.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(f,l,m){if(!f._events){f._events={}}var k=f._events[l];if(!k){f._events[l]=k=[]}var g;if(f.addEventListener){g=function(a){return m.call(f,new Sys.UI.DomEvent(a))};f.addEventListener(l,g,false)}else{if(f.attachEvent){g=function(){var a={};try{a=Sys.UI.DomElement._getWindow(f).event}catch(d){}return m.call(f,new Sys.UI.DomEvent(a))};f.attachEvent("on"+l,g)}}k[k.length]={handler:m,browserHandler:g}},$addHandlers=Sys.UI.DomEvent.addHandlers=function(m,l,k){for(var g in l){var f=l[g];if(k){f=Function.createDelegate(k,f)}$addHandler(m,g,f)}},$clearHandlers=Sys.UI.DomEvent.clearHandlers=function(f){if(f._events){var m=f._events;for(var g in m){var l=m[g];for(var k=l.length-1;k>=0;k--){$removeHandler(f,g,l[k].handler)}}f._events=null}},$removeHandler=Sys.UI.DomEvent.removeHandler=function(k,o,p){var n=null,m=k._events[o];for(var l=0,q=m.length;l<q;l++){if(m[l].handler===p){n=m[l].browserHandler;break}}if(k.removeEventListener){k.removeEventListener(o,n,false)}else{if(k.detachEvent){k.detachEvent("on"+o,n)}}m.splice(l,1)};Sys.UI.DomElement=function(){};Sys.UI.DomElement.registerClass("Sys.UI.DomElement");Sys.UI.DomElement.addCssClass=function(c,d){if(!Sys.UI.DomElement.containsCssClass(c,d)){if(c.className===""){c.className=d}else{c.className+=" "+d}}};Sys.UI.DomElement.containsCssClass=function(d,c){return Array.contains(d.className.split(" "),c)};Sys.UI.DomElement.getBounds=function(c){var d=Sys.UI.DomElement.getLocation(c);return new Sys.UI.Bounds(d.x,d.y,c.offsetWidth||0,c.offsetHeight||0)};var $get=Sys.UI.DomElement.getElementById=function(o,n){if(!n){return document.getElementById(o)}if(n.getElementById){return n.getElementById(o)}var l=[],m=n.childNodes;for(var k=0;k<m.length;k++){var g=m[k];if(g.nodeType==1){l[l.length]=g}}while(l.length){g=l.shift();if(g.id==o){return g}m=g.childNodes;for(k=0;k<m.length;k++){g=m[k];if(g.nodeType==1){l[l.length]=g}}}return null};switch(Sys.Browser.agent){case Sys.Browser.InternetExplorer:Sys.UI.DomElement.getLocation=function(k){if(k.self||k.nodeType===9){return new Sys.UI.Point(0,0)}var l=k.getBoundingClientRect();if(!l){return new Sys.UI.Point(0,0)}var n=k.ownerDocument.documentElement,o=l.left-2+n.scrollLeft,p=l.top-2+n.scrollTop;try{var m=k.ownerDocument.parentWindow.frameElement||null;if(m){var q=m.frameBorder==="0"||m.frameBorder==="no"?2:0;o+=q;p+=q}}catch(r){}return new Sys.UI.Point(o,p)};break;case Sys.Browser.Safari:Sys.UI.DomElement.getLocation=function(o){if(o.window&&o.window===o||o.nodeType===9){return new Sys.UI.Point(0,0)}var r=0,s=0,l=null,q=null,n;for(var m=o;m;l=m,(q=n,m=m.offsetParent)){n=Sys.UI.DomElement._getCurrentStyle(m);var p=m.tagName;if((m.offsetLeft||m.offsetTop)&&(p!=="BODY"||(!q||q.position!=="absolute"))){r+=m.offsetLeft;s+=m.offsetTop}}n=Sys.UI.DomElement._getCurrentStyle(o);var u=n?n.position:null;if(!u||u!=="absolute"){for(var m=o.parentNode;m;m=m.parentNode){p=m.tagName;if(p!=="BODY"&&p!=="HTML"&&(m.scrollLeft||m.scrollTop)){r-=m.scrollLeft||0;s-=m.scrollTop||0}n=Sys.UI.DomElement._getCurrentStyle(m);var k=n?n.position:null;if(k&&k==="absolute"){break}}}return new Sys.UI.Point(r,s)};break;case Sys.Browser.Opera:Sys.UI.DomElement.getLocation=function(m){if(m.window&&m.window===m||m.nodeType===9){return new Sys.UI.Point(0,0)}var o=0,p=0,k=null;for(var l=m;l;k=l,l=l.offsetParent){var q=l.tagName;o+=l.offsetLeft||0;p+=l.offsetTop||0}var r=m.style.position,n=r&&r!=="static";for(var l=m.parentNode;l;l=l.parentNode){q=l.tagName;if(q!=="BODY"&&q!=="HTML"&&(l.scrollLeft||l.scrollTop)&&(n&&(l.style.overflow==="scroll"||l.style.overflow==="auto"))){o-=l.scrollLeft||0;p-=l.scrollTop||0}var s=l&&l.style?l.style.position:null;n=n||s&&s!=="static"}return new Sys.UI.Point(o,p)};break;default:Sys.UI.DomElement.getLocation=function(o){if(o.window&&o.window===o||o.nodeType===9){return new Sys.UI.Point(0,0)}var p=0,q=0,k=null,r=null,m=null;for(var l=o;l;k=l,(r=m,l=l.offsetParent)){var n=l.tagName;m=Sys.UI.DomElement._getCurrentStyle(l);if((l.offsetLeft||l.offsetTop)&&!(n==="BODY"&&(!r||r.position!=="absolute"))){p+=l.offsetLeft;q+=l.offsetTop}if(k!==null&&m){if(n!=="TABLE"&&n!=="TD"&&n!=="HTML"){p+=parseInt(m.borderLeftWidth)||0;q+=parseInt(m.borderTopWidth)||0}if(n==="TABLE"&&(m.position==="relative"||m.position==="absolute")){p+=parseInt(m.marginLeft)||0;q+=parseInt(m.marginTop)||0}}}m=Sys.UI.DomElement._getCurrentStyle(o);var s=m?m.position:null;if(!s||s!=="absolute"){for(var l=o.parentNode;l;l=l.parentNode){n=l.tagName;if(n!=="BODY"&&n!=="HTML"&&(l.scrollLeft||l.scrollTop)){p-=l.scrollLeft||0;q-=l.scrollTop||0;m=Sys.UI.DomElement._getCurrentStyle(l);if(m){p+=parseInt(m.borderLeftWidth)||0;q+=parseInt(m.borderTopWidth)||0}}}}return new Sys.UI.Point(p,q)}}Sys.UI.DomElement.removeCssClass=function(k,g){var e=" "+k.className+" ",f=e.indexOf(" "+g+" ");if(f>=0){k.className=(e.substr(0,f)+" "+e.substring(f+g.length+1,e.length)).trim()}};Sys.UI.DomElement.setLocation=function(f,g,k){var e=f.style;e.position="absolute";e.left=g+"px";e.top=k+"px"};Sys.UI.DomElement.toggleCssClass=function(d,c){if(Sys.UI.DomElement.containsCssClass(d,c)){Sys.UI.DomElement.removeCssClass(d,c)}else{Sys.UI.DomElement.addCssClass(d,c)}};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(c,d){Sys.UI.DomElement._ensureOldDisplayMode(c);if(c._visibilityMode!==d){c._visibilityMode=d;if(Sys.UI.DomElement.getVisible(c)===false){if(c._visibilityMode===Sys.UI.VisibilityMode.hide){c.style.display=c._oldDisplayMode}else{c.style.display="none"}}c._visibilityMode=d}};Sys.UI.DomElement.getVisible=function(d){var c=d.currentStyle||Sys.UI.DomElement._getCurrentStyle(d);if(!c){return true}return c.visibility!=="hidden"&&c.display!=="none"};Sys.UI.DomElement.setVisible=function(c,d){if(d!==Sys.UI.DomElement.getVisible(c)){Sys.UI.DomElement._ensureOldDisplayMode(c);c.style.visibility=d?"visible":"hidden";if(d||c._visibilityMode===Sys.UI.VisibilityMode.hide){c.style.display=c._oldDisplayMode}else{c.style.display="none"}}};Sys.UI.DomElement._ensureOldDisplayMode=function(c){if(!c._oldDisplayMode){var d=c.currentStyle||Sys.UI.DomElement._getCurrentStyle(c);c._oldDisplayMode=d?d.display:null;if(!c._oldDisplayMode||c._oldDisplayMode==="none"){switch(c.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":c._oldDisplayMode="block";break;case"LI":c._oldDisplayMode="list-item";break;default:c._oldDisplayMode="inline"}}}};Sys.UI.DomElement._getWindow=function(c){var d=c.ownerDocument||c.document||c;return d.defaultView||d.parentWindow};Sys.UI.DomElement._getCurrentStyle=function(k){if(k.nodeType===3){return null}var m=Sys.UI.DomElement._getWindow(k);if(k.documentElement){k=k.documentElement}var l=m&&k!==m&&m.getComputedStyle?m.getComputedStyle(k,null):k.currentStyle||k.style;if(!l&&Sys.Browser.agent===Sys.Browser.Safari&&k.style){var q=k.style.display,p=k.style.position;k.style.position="absolute";k.style.display="block";var o=m.getComputedStyle(k,null);k.style.display=q;k.style.position=p;l={};for(var n in o){l[n]=o[n]}l.display="none"}return l};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(e,g,k,f){this._loading=true;this._allScriptsLoadedCallback=g;this._scriptLoadFailedCallback=k;this._scriptLoadTimeoutCallback=f;if(e>0){this._timeoutCookie=window.setTimeout(Function.createDelegate(this,this._scriptLoadTimeoutHandler),e*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(f){var d=document.createElement("SCRIPT");d.type="text/javascript";for(var e in f){d[e]=f[e]}return d},_loadScriptsInternal:function(){if(this._scriptsToLoad&&this._scriptsToLoad.length>0){var f=Array.dequeue(this._scriptsToLoad),e=this._createScriptElement(f);if(e.text&&Sys.Browser.agent===Sys.Browser.Safari){e.innerHTML=e.text;delete e.text}if(typeof f.src==="string"){this._currentTask=new Sys._ScriptLoaderTask(e,this._scriptLoadedDelegate);this._currentTask.execute()}else{document.getElementsByTagName("HEAD")[0].appendChild(e);var k=this;window.setTimeout(function(){Sys._ScriptLoader._clearScript(e);k._loadScriptsInternal()},0)}}else{var g=this._allScriptsLoadedCallback;this._stopLoading();if(g){g(this)}}},_raiseError:function(d){var f=this._scriptLoadFailedCallback,e=this._currentTask.get_scriptElement();this._stopLoading();if(f){f(this,e,d)}else{throw Sys._ScriptLoader._errorScriptLoadFailed(e.src,d)}},_scriptLoadedHandler:function(c,d){if(d&&this._currentTask._notified){if(this._currentTask._notified>1){this._raiseError(true)}else{Array.add(Sys._ScriptLoader._getLoadedScripts(),c.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(d){var c=document.createElement("script");c.src=d;return Array.contains(Sys._ScriptLoader._getLoadedScripts(),c.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 k=g[i],e=k.src;if(e.length){if(!Array.contains(f,e)){Array.add(f,e)}}}}};Sys._ScriptLoader._clearScript=function(b){if(!Sys.Debug.isDebug){b.parentNode.removeChild(b)}};Sys._ScriptLoader._errorScriptLoadFailed=function(g,l){var f;if(l){f=Sys.Res.scriptLoadMultipleCallbacks}else{f=Sys.Res.scriptLoadFailed}var m="Sys.ScriptLoadFailedException: "+String.format(f,g),k=Error.create(m,{name:"Sys.ScriptLoadFailedException",scriptUrl:g});k.popStackFrame();return k};Sys._ScriptLoader._getLoadedScripts=function(){if(!Sys._ScriptLoader._referencedScripts){Sys._ScriptLoader._referencedScripts=[];Sys._ScriptLoader.readLoadedScripts()}return Sys._ScriptLoader._referencedScripts};Sys._ScriptLoaderTask=function(d,c){this._scriptElement=d;this._completedCallback=c;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 c=this.get_scriptElement();if(c.readyState!=="loaded"&&c.readyState!=="complete"){return}var d=this;window.setTimeout(function(){d._completedCallback(c,true)},0)}};Sys._ScriptLoaderTask.registerClass("Sys._ScriptLoaderTask",null,Sys.IDisposable);Sys.ApplicationLoadEventArgs=function(d,c){Sys.ApplicationLoadEventArgs.initializeBase(this);this._components=d;this._isPartialLoad=c};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 k=this.get_events().getHandler("unload");if(k){k(this,Sys.EventArgs.Empty)}var g=Array.clone(this._disposableObjects);for(var f=0,m=g.length;f<m;f++){g[f].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 l=Sys._ScriptLoader.getInstance();if(l){l.dispose()}Sys._Application.callBaseMethod(this,"dispose")}},endCreateComponents:function(){var f=this._secondPassComponents;for(var e=0,k=f.length;e<k;e++){var g=f[e].component;Sys$Component$_setReferences(g,f[e].references);g.endUpdate()}this._secondPassComponents=[];this._creatingComponents=false},findComponent:function(d,c){return c?Sys.IContainer.isInstanceOfType(c)?c.findComponent(d):c[d]||null:Sys.Application._components[d]||null},getComponents:function(){var d=[],e=this._components;for(var f in e){d[d.length]=e[f]}return d},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 d=this.get_events().getHandler("load"),c=new Sys.ApplicationLoadEventArgs(Array.clone(this._createdComponents),!this._initializing);if(d){d(this,c)}if(window.pageLoad){window.pageLoad(this,c)}this._createdComponents=[]},removeComponent:function(d){var c=d.get_id();if(c){delete this._components[c]}},unregisterDisposableObject:function(b){if(!this._disposing){Array.remove(this._disposableObjects,b)}},_addComponentToSecondPass:function(d,c){this._secondPassComponents[this._secondPassComponents.length]={component:d,references:c}},_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(n){if(!window.DOMParser){var m=["Msxml2.DOMDocument.3.0","Msxml2.DOMDocument"];for(var l=0,p=m.length;l<p;l++){try{var k=new ActiveXObject(m[l]);k.async=false;k.loadXML(n);k.setProperty("SelectionLanguage","XPath");return k}catch(q){}}}else{try{var o=new window.DOMParser;return o.parseFromString(n,"text/xml")}catch(q){}}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 l=this._webRequest.get_body(),g=this._webRequest.get_headers();this._xmlHttpRequest=new XMLHttpRequest;this._xmlHttpRequest.onreadystatechange=this._onReadyStateChange;var n=this._webRequest.get_httpVerb();this._xmlHttpRequest.open(n,this._webRequest.getResolvedUrl(),true);if(g){for(var k in g){var o=g[k];if(typeof o!=="function"){this._xmlHttpRequest.setRequestHeader(k,o)}}}if(n.toLowerCase()==="post"){if(g===null||!g["Content-Type"]){this._xmlHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8")}if(!l){l=""}}var m=this._webRequest.get_timeout();if(m>0){this._timer=window.setTimeout(Function.createDelegate(this,this._onTimeout),m)}this._xmlHttpRequest.send(l);this._started=true},getResponseHeader:function(e){var d;try{d=this._xmlHttpRequest.getResponseHeader(e)}catch(f){}if(!d){d=""}return d},getAllResponseHeaders:function(){return this._xmlHttpRequest.getAllResponseHeaders()},get_responseData:function(){return this._xmlHttpRequest.responseText},get_statusCode:function(){var c=0;try{c=this._xmlHttpRequest.status}catch(d){}return c},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(d){var c=Sys.Net.WebRequestManager._get_eventHandlerList().getHandler("completedRequest");if(c){c(this._executor,d)}c=this._get_eventHandlerList().getHandler("completed");if(c){c(this._executor,d)}},_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(l,k){if(l&&l.indexOf("://")!==-1){return l}if(!k||k.length===0){var m=document.getElementsByTagName("base")[0];if(m&&m.href&&m.href.length>0){k=m.href}else{k=document.URL}}var n=k.indexOf("?");if(n!==-1){k=k.substr(0,n)}k=k.substr(0,k.lastIndexOf("/")+1);if(!l||l.length===0){return k}if(l.charAt(0)==="/"){var o=k.indexOf("://"),q=k.indexOf("/",o+3);return k.substr(0,q)+l}else{var p=k.lastIndexOf("/");return k.substr(0,p+1)+l}};Sys.Net.WebRequest._createQueryString=function(n,l){if(!l){l=encodeURIComponent}var k=new Sys.StringBuilder,p=0;for(var m in n){var o=n[m];if(typeof o==="function"){continue}var q=Sys.Serialization.JavaScriptSerializer.serialize(o);if(p!==0){k.append("&")}k.append(m);k.append("=");k.append(l(q));p++}return k.toString()};Sys.Net.WebRequest._createUrl=function(e,f){if(!f){return e}var k=Sys.Net.WebRequest._createQueryString(f);if(k.length>0){var g="?";if(e&&e.indexOf("?")!==-1){g="&"}return e+g+k}else{return e}};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(n,o,q,p,m,l,k){if(m===null||typeof m==="undefined"){m=this.get_defaultSucceededCallback()}if(l===null||typeof l==="undefined"){l=this.get_defaultFailedCallback()}if(k===null||typeof k==="undefined"){k=this.get_defaultUserContext()}return Sys.Net.WebServiceProxy.invoke(n,o,q,p,m,l,k,this.get_timeout())}};Sys.Net.WebServiceProxy.registerClass("Sys.Net.WebServiceProxy");Sys.Net.WebServiceProxy.invoke=function(o,q,n,u,m,s,z,B){var r=new Sys.Net.WebRequest;r.get_headers()["Content-Type"]="application/json; charset=utf-8";if(!u){u={}}var A=u;if(!n||!A){A={}}r.set_url(Sys.Net.WebRequest._createUrl(o+"/"+encodeURIComponent(q),A));var v=null;if(!n){v=Sys.Serialization.JavaScriptSerializer.serialize(u);if(v==="{}"){v=""}}r.set_body(v);r.add_completed(p);if(B&&B>0){r.set_timeout(B)}r.invoke();function p(C){if(C.get_responseAvailable()){var E=C.get_statusCode(),l=null;try{var D=C.getResponseHeader("Content-Type");if(D.startsWith("application/json")){l=C.get_object()}else{if(D.startsWith("text/xml")){l=C.get_xml()}else{l=C.get_responseData()}}}catch(f){}var c=C.getResponseHeader("jsonerror"),F=c==="true";if(F){if(l){l=new Sys.Net.WebServiceError(false,l.Message,l.StackTrace,l.ExceptionType)}}else{if(D.startsWith("application/json")){l=l.d}}if(E<200||E>=300||F){if(s){if(!l||!F){l=new Sys.Net.WebServiceError(false,String.format(Sys.Res.webServiceFailedNoMsg,q),"","")}l._statusCode=E;s(l,z,q)}}else{if(m){m(l,z,q)}}}else{var a;if(C.get_timedOut()){a=String.format(Sys.Res.webServiceTimedOut,q)}else{a=String.format(Sys.Res.webServiceFailedNoMsg,q)}if(s){s(new Sys.Net.WebServiceError(C.get_timedOut(),a,"",""),z,q)}}}return r};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,k,f,e){this._timedOut=g;this._message=k;this._stackTrace=f;this._exceptionType=e;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(l,m,n,o){var k,g;if(!l){g="GetAllPropertiesForCurrentUser";k={authenticatedUserOnly:false}}else{g="GetPropertiesForCurrentUser";k={properties:this._clonePropertyNames(l),authenticatedUserOnly:false}}this._invoke(this._get_path(),g,false,k,Function.createDelegate(this,this._onLoadComplete),Function.createDelegate(this,this._onLoadFailed),[m,n,o])},save:function(l,g,k,m){var f=this._flattenProperties(l,this.properties);this._invoke(this._get_path(),"SetPropertiesForCurrentUser",false,{values:f.value,authenticatedUserOnly:false},Function.createDelegate(this,this._onSaveComplete),Function.createDelegate(this,this._onSaveFailed),[g,k,m,f.count])},_clonePropertyNames:function(m){var k=[],l={};for(var g=0;g<m.length;g++){var f=m[g];if(!l[f]){Array.add(k,f);l[f]=true}}return k},_flattenProperties:function(q,m,n){var r={},v,u,A=0;if(q&&q.length===0){return{value:r,count:0}}for(var s in m){v=m[s];u=n?n+"."+s:s;if(Sys.Services.ProfileGroup.isInstanceOfType(v)){var o=this._flattenProperties(q,v,u),B=o.value;A+=o.count;for(var z in B){var p=B[z];r[z]=p}}else{if(!q||Array.indexOf(q,u)!==-1){r[u]=v;A++}}}return{value:r,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(k,o,q){if(typeof k!=="object"){throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,q,"Object"))}var m=this._unflattenProperties(k);for(var l in m){this.properties[l]=m[l]}var n=o[0]||this.get_defaultLoadCompletedCallback()||this.get_defaultSucceededCallback();if(n){var p=o[2]||this.get_defaultUserContext();n(k.length,p,"Sys.Services.ProfileService.load")}},_onLoadFailed:function(k,f){var e=f[1]||this.get_defaultFailedCallback();if(e){var g=f[2]||this.get_defaultUserContext();e(k,g,"Sys.Services.ProfileService.load")}},_onSaveComplete:function(g,k,o){var l=k[3];if(g!==null){if(g instanceof Array){l-=g.length}else{if(typeof g==="number"){l=g}else{throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,o,"Array"))}}}var m=k[0]||this.get_defaultSaveCompletedCallback()||this.get_defaultSucceededCallback();if(m){var n=k[2]||this.get_defaultUserContext();m(l,n,"Sys.Services.ProfileService.save")}},_onSaveFailed:function(k,f){var e=f[1]||this.get_defaultFailedCallback();if(e){var g=f[2]||this.get_defaultUserContext();e(k,g,"Sys.Services.ProfileService.save")}},_unflattenProperties:function(o){var m={},n,p,r=0;for(var k in o){r++;p=o[k];n=k.indexOf(".");if(n!==-1){var q=k.substr(0,n);k=k.substr(n+1);var l=m[q];if(!l||!Sys.Services.ProfileGroup.isInstanceOfType(l)){l=new Sys.Services.ProfileGroup;m[q]=l}l[k]=p}else{m[k]=p}}o.length=r;return m}};Sys.Services._ProfileService.registerClass("Sys.Services._ProfileService",Sys.Net.WebServiceProxy);Sys.Services.ProfileService=new Sys.Services._ProfileService;Sys.Services.ProfileGroup=function(c){if(c){for(var d in c){this[d]=c[d]}}};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(m,l,k,r,p,n,o,q){this._invoke(this._get_path(),"Login",false,{userName:m,password:l,createPersistentCookie:k},Function.createDelegate(this,this._onLoginComplete),Function.createDelegate(this,this._onLoginFailed),[m,l,k,r,p,n,o,q])},logout:function(g,e,f,k){this._invoke(this._get_path(),"Logout",false,{},Function.createDelegate(this,this._onLogoutComplete),Function.createDelegate(this,this._onLogoutFailed),[g,e,f,k])},_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(n,l,o){if(typeof n!=="boolean"){throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,o,"Boolean"))}var k=l[4],m=l[7]||this.get_defaultUserContext(),g=l[5]||this.get_defaultLoginCompletedCallback()||this.get_defaultSucceededCallback();if(n){this._authenticated=true;if(g){g(true,m,"Sys.Services.AuthenticationService.login")}if(typeof k!=="undefined"&&k!==null){window.location.href=k}}else{if(g){g(false,m,"Sys.Services.AuthenticationService.login")}}},_onLoginFailed:function(k,f){var e=f[6]||this.get_defaultFailedCallback();if(e){var g=f[7]||this.get_defaultUserContext();e(k,g,"Sys.Services.AuthenticationService.login")}},_onLogoutComplete:function(o,g,n){if(o!==null){throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,n,"null"))}var k=g[0],m=g[3]||this.get_defaultUserContext(),l=g[1]||this.get_defaultLogoutCompletedCallback()||this.get_defaultSucceededCallback();this._authenticated=false;if(l){l(null,m,"Sys.Services.AuthenticationService.logout")}if(!k){window.location.reload()}else{window.location.href=k}},_onLogoutFailed:function(f,e){var d=e[2]||this.get_defaultFailedCallback();if(d){d(f,e[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(c){var d=this._get_rolesIndex()[c.trim().toLowerCase()];return !!d},load:function(d,e,f){Sys.Net.WebServiceProxy.invoke(this._get_path(),"GetRolesForCurrentUser",false,{},Function.createDelegate(this,this._onLoadComplete),Function.createDelegate(this,this._onLoadFailed),[d,e,f],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 d={};for(var c=0;c<this._roles.length;c++){d[this._roles[c].toLowerCase()]=true}this._rolesIndex=d}return this._rolesIndex},_onLoadComplete:function(g,l,o){if(g&&!(g instanceof Array)){throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType,o,"Array"))}this._roles=g;this._rolesIndex=null;var k=l[0]||this.get_defaultLoadCompletedCallback()||this.get_defaultSucceededCallback();if(k){var n=l[2]||this.get_defaultUserContext(),m=Array.clone(g);k(m,n,"Sys.Services.RoleService.load")}},_onLoadFailed:function(k,f){var e=f[1]||this.get_defaultFailedCallback();if(e){var g=f[2]||this.get_defaultUserContext();e(k,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(d,c){c.append(d.toString())};Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder=function(c,d){if(isFinite(c)){d.append(String(c))}else{throw Error.invalidOperation(Sys.Res.cannotSerializeNonFiniteNumbers)}};Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder=function(g,e){e.append('"');if(Sys.Serialization.JavaScriptSerializer._stringRegEx.test(g)){var k=g.length;for(i=0;i<k;++i){var f=g.charAt(i);if(f>=" "){if(f==="\\"||f==='"'){e.append("\\")}e.append(f)}else{switch(f){case"\b":e.append("\\b");break;case"\f":e.append("\\f");break;case"\n":e.append("\\n");break;case"\r":e.append("\\r");break;case"\t":e.append("\\t");break;default:e.append("\\u00");if(f.charCodeAt()<16){e.append("0")}e.append(f.charCodeAt().toString(16))}}}}else{e.append(g)}e.append('"')};Sys.Serialization.JavaScriptSerializer._serializeWithBuilder=function(n,m,k,s){var o;switch(typeof n){case"object":if(n){if(Number.isInstanceOfType(n)){Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder(n,m)}else{if(Boolean.isInstanceOfType(n)){Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder(n,m)}else{if(String.isInstanceOfType(n)){Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder(n,m)}else{if(Array.isInstanceOfType(n)){m.append("[");for(o=0;o<n.length;++o){if(o>0){m.append(",")}Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(n[o],m,false,s)}m.append("]")}else{if(Date.isInstanceOfType(n)){m.append('"\\/Date(');m.append(n.getTime());m.append(')\\/"');break}var p=[],r=0;for(var q in n){if(q.startsWith("$")){continue}if(q===Sys.Serialization.JavaScriptSerializer._serverTypeFieldName&&r!==0){p[r++]=p[0];p[0]=q}else{p[r++]=q}}if(k){p.sort()}m.append("{");var l=false;for(o=0;o<r;o++){var u=n[p[o]];if(typeof u!=="undefined"&&typeof u!=="function"){if(l){m.append(",")}else{l=true}Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(p[o],m,k,s);m.append(":");Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(u,m,k,s)}}m.append("}")}}}}}else{m.append("null")}break;case"number":Sys.Serialization.JavaScriptSerializer._serializeNumberWithBuilder(n,m);break;case"string":Sys.Serialization.JavaScriptSerializer._serializeStringWithBuilder(n,m);break;case"boolean":Sys.Serialization.JavaScriptSerializer._serializeBooleanWithBuilder(n,m);break;default:m.append("null")}};Sys.Serialization.JavaScriptSerializer.serialize=function(d){var c=new Sys.StringBuilder;Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(d,c,false);return c.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(f,e,d){this.name=f;this.numberFormat=e;this.dateTimeFormat=d};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 e=0,k=g.length;e<k;e++){f[e]=this._toUpper(g[e])}return f},_toUpper:function(b){return b.split("\u00a0").join(" ").toUpperCase()}};Sys.CultureInfo._parse=function(d){var c=Sys.Serialization.JavaScriptSerializer.deserialize(d);return new Sys.CultureInfo(c.name,c.numberFormat,c.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(d){Sys.UI.Behavior.initializeBase(this);this._element=d;var c=d._behaviors;if(!c){d._behaviors=[this]}else{c[c.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 c=Object.getTypeName(this),d=c.lastIndexOf(".");if(d!=-1){c=c.substr(d+1)}if(!this.get_isInitialized()){this._name=c}return c},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(e,f){var d=e[f];return d&&Sys.UI.Behavior.isInstanceOfType(d)?d:null};Sys.UI.Behavior.getBehaviors=function(b){if(!b._behaviors){return[]}return Array.clone(b._behaviors)};Sys.UI.Behavior.getBehaviorsByType=function(m,n){var g=m._behaviors,l=[];if(g){for(var k=0,o=g.length;k<o;k++){if(n.isInstanceOfType(g[k])){l[l.length]=g[k]}}}return l};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(e,f){var d=this.get_parent();while(d){if(d.onBubbleEvent(e,f)){return}d=d.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:"8bec0705-9e3b-497a-9c51-d0854200a08d",COPYRIGHT:"&copy; Locatienet, PTV, NAVTEQ",COPYRIGHT_EUROSENSE:"&copy; Locatienet, PTV, NAVTEQ, Eurosense DKLN-2006",LANGUAGE:"nl",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:63,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:"Uitzoomen",zoom_in:"Inzoomen",zoom_in_to_expand:"{0} locaties gevonden. Zoom in om uit te spreiden.",zoom:"In- /uitzoomen",country:"Land",province:"Provincie",region:"Regio",city:"Plaats",neighbourhood:"Buurt",block:"Blok",street:"Straat",overviewmap:"Overzichtskaart",pan:"Schuiven",map:"Kaart",show_map:"toon kaart",hybrid:"Hybride",aerophoto:"Luchtfoto",next:"volgende",previous:"vorige",help:"Help",show_address_info:"Toon adres",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(d,f,e){switch(this._type){case"movein":if(arguments.length==0){d=1;this._elem.style.left=this._startpos.x+"px";this._elem.style.top=this._startpos.y+"px";this._elem.style.display="block";f=(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)+f)+"px";this._elem.style.top=(parseInt(this._elem.style.top)+e)+"px";d++}if(d<this._stepcount){window.setTimeout("internalMoveAnimatorObj.Run("+d+","+f+","+e+")",this._steptime)}break;case"moveout":if(arguments.length==0){d=1;this._elem.style.left=this._stoppos.x+"px";this._elem.style.top=this._stoppos.y+"px";this._elem.style.display="block";f=(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)+f)+"px";this._elem.style.top=(parseInt(this._elem.style.top)+e)+"px";d++}if(d<this._stepcount){window.setTimeout("internalMoveAnimatorObj.Run("+d+","+f+","+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(d,c){this.Run(d,c)},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(d,c){if(TripzoomLib.Constants.TRACE){traceStr=d;if(c){traceStr+=" :\n"+c}if(TripzoomLib.Constants.TRACEALERT){alert(traceStr)}Sys.Debug.trace(traceStr)}};TraceDump=function(e,d){if(TripzoomLib.Constants.TRACE){var f=(d)?d+" : \n":"";traceStr=f+=Object.getType(e).getName();if(TripzoomLib.Constants.TRACEALERT){alert(traceStr)}if(d){Sys.Debug.trace(d)}Sys.Debug.traceDump(e)}};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(d){obj=_Map._tooltiplayer;obj.style.display="block";textObj=$get("tooltiptextDIV");textObj.innerHTML=d;var c=new cSlideAnimator(obj);c.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(e,g,f,k){dx=e-g;dy=f-k;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(d){if(d<0||d>this.items.length-1){return}this.items[d]=null;for(var c=d;c<=this.lsize;c++){this.items[c]=this.items[c+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=parseInt(c[0]);this.YCoord=parseInt(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.Street+" "+this.HouseNr+" "+this.City+" ("+this.Country+", "+this.Postcode+")"},ShortDescription:function(){return 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(C,z,D){var s=null;switch(this.get_type()){case"Point":var o=this;var B,v;B=Math.round((parseInt(o.x)-C.left)*z/C.get_width());v=Math.round((C.top-parseInt(o.y))*D/C.get_height());s=new TripzoomLib.Element.Point(B,v);s.set_unit(TripzoomLib.Unit.PIXEL);break;case"Rect":var A=this;var p=this.TransformCoordinates(new TripzoomLib.Element.Point(A.left,A.top));var q=this.TransformCoordinates(new TripzoomLib.Element.Point(A.right,A.bottom));s=new TripzoomLib.Element.Rect(p.x,p.y,q.x,q.y);s.set_unit(TripzoomLib.Unit.PIXEL);break;case"Polygon":var E=this;var r=E.get_exteriorring();for(var u=0;u<r.length;u++){r[u]=this.TransformCoordinates(new TripzoomLib.Element.Point(r[u].x,r[u].y))}s=$create(TripzoomLib.Element.Polygon,{exteriorring:r,unit:TripzoomLib.Unit.PIXEL})}return s}};TripzoomLib.Element.Geometry.registerClass("TripzoomLib.Element.Geometry",Sys.Component);TripzoomLib.Element.Rect=function(g,f,k,e){TripzoomLib.Element.Rect.initializeBase(this,["Rect"]);this.left=g|Number.POSITIVE_INFINITY;this.top=f|Number.NEGATIVE_INFINITY;this.right=k|Number.NEGATIVE_INFINITY;this.bottom=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(c){var d=false;if(c.left==this.left&&c.top==this.top&&c.right==this.right&&c.bottom==this.bottom){d=true}return d},isSmaller:function(b){return !this.isBigger(b)},Expand:function(f){if(TripzoomLib.Element.Rect.isInstanceOfType(f)){var g=f;this.left=Math.min(this.left,g.left);this.top=(this._unit!=TripzoomLib.Unit.PIXEL)?Math.max(this.top,g.top):Math.min(this.top,g.top);this.right=Math.max(this.right,g.right);this.bottom=(this._unit!=TripzoomLib.Unit.PIXEL)?Math.min(this.bottom,g.bottom):Math.max(this.bottom,g.bottom)}else{if(TripzoomLib.Element.Point.isInstanceOfType(f)){var m=f;this.left=Math.min(this.left,m.x);this.right=Math.max(this.right,m.x);this.top=Math.max(this.top,m.y);this.bottom=Math.min(this.bottom,m.y)}else{var l=f*this.get_width();var k=f*this.get_height();this.left-=l;this.right+=l;this.top+=k;this.bottom-=k}}},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(g){var l=false;if(TripzoomLib.Element.Point.isInstanceOfType(g)){var o=g;if(this.get_extents().isWithin(o)){var m,n=0;var k=this._exteriorring.length;for(m=0,n=k-1;m<k;n=m++){if((((this._exteriorring[m].y<=o.y)&&(o.y<this._exteriorring[n].y))||((this._exteriorring[n].y<=o.y)&&(o.y<this._exteriorring[m].y)))&&(o.x<(this._exteriorring[n].x-this._exteriorring[m].x)*(o.y-this._exteriorring[m].y)/(this._exteriorring[n].y-this._exteriorring[m].y)+this._exteriorring[m].x)){l=!l}}}}return l},_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(d,f,e){if(!TripzoomLib.Element.Rect.isInstanceOfType(d)){throw Error.argumentType(d,typeof(d),"Not of type TripzoomLib.Element.Rect");return}topleft=this.TransformPoint(new TripzoomLib.Element.Point(d.left,d.top),f,e);bottomright=this.TransformPoint(new TripzoomLib.Element.Point(d.right,d.bottom),f,e);return new TripzoomLib.Element.Rect(topleft.x,topleft.y,bottomright.x,bottomright.y)},TransformPoint:function(k,e,g){var f=k;switch(e){case 0:switch(g){case 3:f=this._Mercator2Geodecimal(k.x,k.y);break}break;case 3:switch(g){case 0:f=this._Geodecimal2Mercator(k.x,k.y);break}break}return f},_Geodecimal2Mercator:function(e,k){var f,g;f=e;g=k;xArg=6371000*((Math.PI/180)*((f)-0));yArg=6371000*Math.log(Math.tan((Math.PI/4)+(Math.PI/180)*g*0.5));return new TripzoomLib.Element.Point(xArg,yArg)},_Mercator2Geodecimal:function(e,f){var k,g;k=(180/Math.PI)*(e/6371000+0);g=(180/Math.PI)*(Math.atan(Math.exp(f/6371000))-(Math.PI/4))/0.5;e=k;f=g;return new TripzoomLib.Element.Point(e,f)}};TripzoomLib.Gis._Utils.registerClass("TripzoomLib.Gis._Utils");TripzoomLib.Gis.Utils=new TripzoomLib.Gis._Utils();function UTMRefToLatLng(S,L){var E=new RefEll(S,L);var O=0.9996;var m=E.maj;var M=E.ecc;var n=M/(1-M);var N=(1-Math.sqrt(1-M))/(1+Math.sqrt(1-M));var S=this.easting-500000;var L=this.northing;var K=this.lngZone;var Q=this.latZone;var J=(K-1)*6-180+3;if((ord(Q)-ord("N"))<0){L-=10000000}var I=L/O;var R=I/(m*(1-M/4-3*M*M/64-5*Math.pow(M,3)/256));var F=R+(3*N/2-27*Math.pow(N,3)/32)*Math.sin(2*R)+(21*N*N/16-55*Math.pow(N,4)/32)*Math.sin(4*R)+(151*Math.pow(N,3)/96)*Math.sin(6*R);var c=m/Math.sqrt(1-M*Math.sin(F)*Math.sin(F));var G=Math.tan(F)*Math.tan(F);var r=n*Math.cos(F)*Math.cos(F);var H=m*(1-M)/Math.pow(1-M*Math.sin(F)*Math.sin(F),1.5);var d=S/(c*O);var P=(F-(c*Math.tan(F)/H)*(d*d/2-(5+(3*G)+(10*r)-(4*r*r)-(9*n))*Math.pow(d,4)/24+(61+(90*G)+(298*r)+(45*G*G)-(252*n)-(3*r*r))*Math.pow(d,6)/720))*(180/Math.PI);var a=J+((d-(1+2*G+r)*Math.pow(d,3)/6+(5-(2*r)+(28*G)-(3*r*r)+(8*n)+(24*G*G))*Math.pow(d,5)/120)/Math.cos(F))*(180/Math.PI);return new LatLng(P,a)}Type.registerNamespace("TripzoomLib");Type.registerNamespace("TripzoomLib.Net");TripzoomLib.Net.GeoJSONRequest=function(e,f,d){TripzoomLib.Net.GeoJSONRequest.initializeBase(this);this._requestid=0;this._url=e;this._onCompletedCallback=f;this._onErrorCallback=d;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._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},_Parameters:function(){var b="";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(d,e,f){if(!this._RequestObjs[d]){return}this._RequestObjs[d]._responseData=f;this._RequestObjs[d]._onCompleted(e)},LoadError:function(d,e,f){if(!this._RequestObjs[d]){return}this._RequestObjs[d]._responseData=f;this._RequestObjs[d]._onError(e)}};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(f,g){if(g==null){g=""}f=f.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var k=new RegExp("[\\?&]"+f+"=([^&#]*)");var e=k.exec(window.location.href);if(e==null){return g}else{return e[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 c=0;c<this._items.length;c++){var d=this._control.appendChild(this._items[c].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(m){contextMenuSource=this;if(this._activeContextMenuItem){this._activeContextMenuItem.className=""}if(document.all&&!m){m=event}var l=TripzoomLib.Utils.getScrollXY();var k=Sys.UI.DomElement.getBounds(this.get_element());var b=m.clientX-k.x+l[0];var e=m.clientY-k.y+l[1];this._control.style.left=(b)+"px";this._control.style.top=(e)+"px";this._control.style.display="block";return false},showAt:function(b,k){this._x=b;this._y=k;contextMenuSource=this;if(this._activeContextMenuItem){this._activeContextMenuItem.className=""}var o=TripzoomLib.Utils.getScrollXY();var n=Sys.UI.DomElement.getBounds(this.get_element());var l=b-n.x+o[0];var m=k-n.y+o[1];this._control.style.left=(l)+"px";this._control.style.top=(m)+"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._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(e){this._raiseResizeEvent();if(this._isLoaded&&this._resize){var f=Sys.UI.DomElement.getBounds(this.get_element());if(Math.abs(this.get_width()-f.width)>100||Math.abs(this.get_height()-f.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 b=this.getTileLayer();b.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(e){rect=e;var f=Sys.UI.DomElement.getBounds(this.get_parent());this.set_left(f.x);this.set_top(f.y);this.set_width(f.width);this.set_height(f.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 f=Sys.UI.DomElement.getBounds(this.get_element());mppix=Math.max(rect.Width()/f.width,rect.Height()/f.height);this.s=TripzoomLib.Utils.ZoomToScale(mppix*TripzoomLib.Constants.TILE_SIZE)*2;this.startx=f.width/2;this.starty=f.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 b=this.getTileLayer();b.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)},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=["STANDARD"];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")}this.get_layermanager().set_visible(false);this._request.CreateMap($create(TripzoomLib.Net.RequestSettings,{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(s,o,q){if(!o){return}switch(o.toLowerCase()){case"createmap":var u=s._request.get_responseData();if(u){if(u.RectString){s.get_mapview().set_viewrect(new TripzoomLib.Element.Rect().set_rect(u.RectString))}if(u.ImageUrl){var m=$create(TripzoomLib.GUI.Map.StaticImage,{mapcontrol:s,url:u.ImageUrl,zindex:1,left:0,top:0,width:s.get_width(),height:s.get_height()});s._staticimagelayer.add_staticimage(m);s._staticimagelayer.set_visible(true);if(s.get_layermanager()){s.get_layermanager().Remove("locations");if(u.LayerObjects){var r=s.get_layermanager().AddLayer("locations");r.set_static(true);for(var p=0;p<u.LayerObjects.length;p++){var z=u.LayerObjects[p];r.Add($create(TripzoomLib.Element.LayerObject,{layer:r,geometry:new TripzoomLib.Element.Point(z.Location.point.x,z.Location.point.y),title:z.Title,text:z.Description,bitmap:z.Marker,url:z.Link}))}}s.get_layermanager().set_visible(true);s.get_layermanager().Update(s.get_mapview().get_viewrect())}if(s.get_overviewmap()){s.get_overviewmap().Update(s.get_mapview().get_viewrect())}s.updateScalebar()}}s._raiseChangedEvent();break;case"revlocatelayer":var u=s._request.get_responseData();if(u!=null&&u.LayerObjects!=null){var r=s.get_layermanager().Find("revlocate");if(!r){r=s.get_layermanager().AddLayer("revlocate")}else{r.Clear()}var v=null;r.set_static(true);for(var p=0;p<u.LayerObjects.length;p++){var z=u.LayerObjects[p];v=r.Add($create(TripzoomLib.Element.LayerObject,{layer:r,geometry:new TripzoomLib.Element.Point(z.Location.point.x,z.Location.point.y),title:z.Title,text:z.Description,bitmap:z.Marker,url:z.Link}))}s.get_layermanager().set_visible(true);s.get_layermanager().Update(s.get_mapview().get_viewrect());if(v){r.get_popup().show(v)}s.get_spinner().set_visible(false)}break;case"error":var u=s._request.get_responseData();var n=Error.create(u.StatusDescription,{name:"TripzoomLib.GUI.Map.Map._RequestCompleted"});s._raiseErrorEvent(n);break}},ServiceCallbackSucceeded:function(e,d,f){switch(f){case"GetBuienradarUrl":img=d.createLayer("RADAR",5,false,e);break}},ServiceCallbackFailed:function(f,d,e){alert(f.message)},createLayer:function(m,g,f,k){x=0;y=0;w=this.get_width();h=this.get_height();switch(m){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":k=TripzoomLib.Constants.EXTERN_URL+"image.ashx?rect="+this.get_mapview().get_viewrect().get_rect()+"&width="+this.get_width()+"&height="+this.get_height();if(m.length>0){k+="&layers="+m}k+="&transparent=true";k+="&caching=false";k+="&language="+this._language;break;default:k=TripzoomLib.Constants.EXTERN_URL+"image.ashx?rect="+this.get_mapview().get_viewrect().get_rect()+"&width="+this.get_width()+"&height="+this.get_height();if(m.length>0){k+="&layers="+m}k+="&transparent=true";if(f){k+="&caching=true&cachingtype=private"}else{k+="&caching=false"}k+="&language="+this._language;break}staticimage=$create(TripzoomLib.GUI.Map.StaticImage,{mapcontrol:this,url:k,zindex:g,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(m,k){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 e=this.getTileLayer();e.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 e=this.getTileLayer();e.style.left=this.get_mapview().dx+(m*(step/this.zoomsteps))+"px";e.style.top=this.get_mapview().dy+(k*(step/this.zoomsteps))+"px"}if(step<this.zoomsteps){window.setTimeout("_Map.Pan("+m+","+k+","+step+")",this.timeOut)}else{try{if(this.get_mapview().get_tiled()){this.get_mapview().updateMap(m,k);this.Update()}else{var g=this.get_mapview().get_viewrect();g.left-=(m)*g.get_width()/this.get_width();g.top+=(k)*g.get_height()/this.get_height();g.right-=(m)*g.get_width()/this.get_width();g.bottom+=(k)*g.get_height()/this.get_height();this.set_rect(g)}}catch(l){alert(l.message)}this.isBusy=false}},Drag:function(f){var k=f.clientX-this.startx;var g=f.clientY-this.starty;if(this.get_mapview().get_tiled()){var e=this.getTileLayer();e.style.left=(this.get_mapview().dx+k)+"px";e.style.top=(this.get_mapview().dy+g)+"px"}var e=this._staticimagelayer;e.set_left(k);e.set_top(g);if(this.get_layermanager()){this.get_layermanager().get_element().style.left=(k)+"px";this.get_layermanager().get_element().style.top=(g)+"px"}if(this.get_tiled()&&this.get_overviewmap()){this.get_overviewmap().Update()}},stopDrag:function(l,g,k){if(g){this.startx=g}if(k){this.starty=k}var o=l.clientX-this.startx;var n=l.clientY-this.starty;if(this.get_mapview().get_tiled()){this.get_mapview().updateMap(o,n);this.Update()}else{var m=this.get_mapview().get_viewrect();m.left-=(o)*m.get_width()/this.get_width();m.top+=(n)*m.get_height()/this.get_height();m.right-=(o)*m.get_width()/this.get_width();m.bottom+=(n)*m.get_height()/this.get_height();this.set_rect(m)}this.isBusy=false},ZoomTo:function(o){if(this.get_mapview().get_tiled()){var g=this._staticimagelayer;g.set_visible(false);this.get_mapview().set_scale(o);this.get_mapview().createMap(this.get_mapview().get_viewrect().centerx(),this.get_mapview().get_viewrect().centery());this.Update()}else{var n=this.get_mapview().get_viewrect();var k=n.centerx();var l=n.centery();var m=new TripzoomLib.Element.Rect();m.left=Math.round(k-o);m.top=Math.round(l+o);m.right=Math.round(k+o);m.bottom=Math.round(l-o);this.set_rect(m)}},Zoom:function(p,l,m){this.isBusy=true;var q=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()+q[0];m=m-this.get_top()+q[1];if(this.get_mapview().get_tiled()){if(this.get_mapview().get_scale()/p<TripzoomLib.Constants.MIN_SCALE){this.isBusy=false;return}else{this.get_mapview().set_scale(this.get_mapview().get_scale()/p)}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 k=this._staticimagelayer;k.set_visible(false);k=this.getTileLayer();k.style.zIndex=0;this.currentMapLayer=-this.currentMapLayer;k=this.getTileLayer();k.style.zIndex=1;xcoord=this._mapviewTmp.left+l*this._mapviewTmp.mppix;ycoord=this._mapviewTmp.top-m*this._mapviewTmp.mppix;dx=this.get_width()/2-p*((xcoord-this._mapviewTmp.x0)/this._mapviewTmp.mppix);dy=this.get_height()/2-p*((this._mapviewTmp.y0-ycoord)/this._mapviewTmp.mppix);var k=this.getTileLayer();k.innerHTML="";k.style.zIndex=0;this.currentMapLayer=-this.currentMapLayer;k=this.getTileLayer();k.style.zIndex=1;this.Update()}else{var o=this.get_mapview().get_viewrect();var n=new TripzoomLib.Element.Rect();l=o.left+(l)*o.get_width()/this.get_width();m=o.bottom+(this.get_height()-m)*o.get_height()/this.get_height();n.left=Math.round(l-0.5*o.get_width()/p);n.top=Math.round(m+0.5*o.get_height()/p);n.right=Math.round(l+0.5*o.get_width()/p);n.bottom=Math.round(m-0.5*o.get_height()/p);this.set_rect(n)}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(500000);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(c,d){switch(d.get_propertyName()){case"visible":c.get_element().style.display=(c.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(b){scalebar=new Array(10,50,100,200,500,1000,5000,10000,20000,50000,100000,200000,5000000,1000000,2000000,3000000,4000000,9999000);for(i=0;i<scalebar.length;i++){pixels=scalebar[i]/b;barscale=scalebar[i];if(pixels>30&&pixels<250){break}}this._scaleimg.style.width=pixels+"px";this._scalevalue.innerHTML=(barscale<1000)?barscale+" m":barscale/1000+" km"}};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(c){var d=TripzoomLib.Utils.getScrollXY();this._rect.left=c.clientX+d[0];this._rect.top=c.clientY+d[1];this._rect.right=c.clientX+d[0];this._rect.bottom=c.clientY+d[1];this._isDragging=true},Move:function(e){if(!this._isDragging){return}this.get_mapcontrol().get_mapcontrol().get_layermanager().get_popup().hide();var d=this.get_mapcontrol().get_mapcontrol();var f=TripzoomLib.Utils.getScrollXY();this._rect.right=e.clientX+f[0];this._rect.bottom=e.clientY+f[1];this.get_element().style.visibility="visible";if(this._rect.right>this._rect.left){this.get_element().style.left=(this._rect.left-d.get_left())+"px"}else{this.get_element().style.left=(this._rect.right-d.get_left())+"px";this.get_element().style.right=(this._rect.left-d.get_left())+"px"}if(this._rect.top<this._rect.bottom){this.get_element().style.top=(this._rect.top-d.get_top())+"px"}else{this.get_element().style.top=(this._rect.bottom-d.get_top())+"px";this.get_element().style.bottom=(this._rect.top-d.get_top())+"px"}this.get_element().style.width=this._rect.Width()+"px";this.get_element().style.height=this._rect.Height()+"px"},Stop:function(c){if(this._isDragging){var d=TripzoomLib.Utils.getScrollXY();this._rect.right=c.clientX+d[0];this._rect.bottom=c.clientY+d[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 d=this.get_element();d.className="layer";d.innerHTML='<table width="100%" height="100%" cellpadding="0" cellspacing="0"><tr><td>&nbsp;</td></tr></table>';this._navigationbehavior=$create(TripzoomLib.GUI.Map.NavigationBehavior,{control:this},null,null,d);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 c=[];Array.add(c,$create(TripzoomLib.GUI.ContextMenuItem,{text:TripzoomLib.Resources.Resource.zoom_in},{click:this._zoomInDelegate}));Array.add(c,$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(c,$create(TripzoomLib.GUI.ContextMenuSeparator));Array.add(c,$create(TripzoomLib.GUI.ContextMenuItem,{text:TripzoomLib.Resources.Resource.show_address_info},{click:this._getInfoDelegate}))}this._contextmenu=$create(TripzoomLib.GUI.ContextMenu,{items:c},null,null,d);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(f){var b=this._control.get_mapcontrol();if(b.isBusy){return}var g=Sys.UI.DomElement.getBounds(b.get_element());b.set_left(g.x);b.set_top(g.y);b.set_width(g.width);b.set_height(g.height);if(!this.get_control().get_contextmenu().isHidden()){return}switch(f.type){case"mousedown":this._mouseDown(this,f);break;case"mousemove":this._mouseMove(this,f);break;case"mouseover":this._mouseOver(this,f);break;case"mouseup":TripzoomLib.Net.RequestManager.Abort();this._mouseUp(this,f);break;case"dblclick":TripzoomLib.Net.RequestManager.Abort();this._doubleClick(this,f);break;case"click":this._mouseClick(this,f);break}var k=this.get_events().getHandler(f.type);if(k){k(this,f)}f.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(c,d){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=d.clientX;this.get_control().get_mapcontrol().starty=d.clientY;this.get_control().get_mapcontrol().isPressed=true;if(d.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(c,d){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,d.clientX,this.get_control().get_mapcontrol().starty,d.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(d)}}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(c,d){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(r,l){var q=this.get_control().get_mapcontrol();if(!q.isPressed){return}window.clearTimeout(this._timer);this._timer=null;var k=q.isDragging;q.isDragging=false;q.isPressed=false;if(l.button!=Sys.UI.MouseButton.rightButton&&!k&&(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 p=this.get_control().get_mapcontrol().get_layermanager().get_activeAreaHotspot();var m=this.get_control().get_mapcontrol();p.set_position(new TripzoomLib.Element.Point(l.clientX-m.get_left(),l.clientY-m.get_top()));p.get_layer().get_popup().show(p);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:q.setLocation(l.clientX,l.clientY);break;case TripzoomLib.NavigationMode.ZOOMING:if(l.button==Sys.UI.MouseButton.rightButton){q.Zoom(0.5,l.clientX,l.clientY)}else{if(l.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(q.get_mapview().get_tiled()){scale=TripzoomLib.Utils.ZoomToScale((Math.min(rect.Width(),rect.Height())/q.get_width())*TripzoomLib.Constants.TILE_SIZE*q.get_mapview().mppix);q.Zoom(q.get_mapview().get_scale()/scale,rect.centerx(),rect.centery())}else{var n=q.get_mapview().get_viewrect();var o=new TripzoomLib.Element.Rect();o.left=n.left+(rect.left-q.get_left())*n.get_width()/q.get_width();o.top=n.bottom+(q.get_height()-(rect.top-q.get_top()))*n.get_height()/q.get_height();o.right=n.left+(rect.right-q.get_left())*n.get_width()/q.get_width();o.bottom=n.bottom+(q.get_height()-(rect.bottom-q.get_top()))*n.get_height()/q.get_height();q.set_rect(o)}}else{rect=this.get_control().get_zoombox().get_rect();dx=-rect.centerx()+q.get_width()/2+q.get_left();dy=-rect.centery()+q.get_height()/2+q.get_top();q.Pan(dx,dy)}}}break;case TripzoomLib.NavigationMode.MOVING:if(k){q.stopDrag(l)}else{if(l.button==Sys.UI.MouseButton.rightButton){q.Zoom(0.5,l.clientX,l.clientY)}else{if((l.button==Sys.UI.MouseButton.leftButton)){q.Zoom(2,l.clientX,l.clientY)}}}break}this._lastAction=this.get_control().get_mode()},_doubleClick:function(c,d){c.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(c){sender=this.get_control();if(!sender.isPressed){return}window.clearTimeout(this._timer);this._timer=null;var d=TripzoomLib.Utils.getScrollXY();dx=-(c.clientX+d[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=-(c.clientY+d[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(d,e){var f=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)}}f=false}return f}};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");element=this.get_element();element.style.position="absolute";element.style.border="1px solid gray";element.style.backgroundColor="white";if(!isNaN(this._left)){element.style.left=this._left+"px"}if(!isNaN(this._top)){element.style.top=this._top+"px"}if(!isNaN(this._right)){element.style.right=this._right+"px"}if(!isNaN(this._bottom)){element.style.bottom=this._bottom+"px"}element.style.width="0px";element.style.height="21px";element.style.opacity="0.7";element.style.filter="Alpha(Opacity=70)"},dispose:function(){this._mouseClickDelegate=null;TripzoomLib.GUI.Map.ToolBar.callBaseMethod(this,"dispose")},createImageButton:function(g,m,f,k,l){this.get_element().style.width=(k+l)+"px";img=document.createElement("IMG");img.src=m;img.title=f;tool=$create(TripzoomLib.GUI.Map.ToolBarButton,{parent:this.get_element(),action:g,control:img,title:f,offsetx:k,width:l},{click:this._mouseClickDelegate});Array.add(this._tools,tool);return tool},createTextButton:function(l,o,k,m,n,g){this.get_element().style.width=(m+n+((g)?2:0))+"px";div=document.createElement("DIV");div.className=this._classNameNonActive;div.innerHTML=o;div.title=k;tool=$create(TripzoomLib.GUI.Map.ToolBarButton,{parent:this.get_element(),action:l,control:div,title:k,offsetx:m,width:n},{click:this._mouseClickDelegate});Array.add(this._tools,tool);return tool},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()},_mouseClick:function(c,d){for(i=0;i<this._tools.length;i++){tool=this._tools[i];tool.set_enabled(false);tool.get_control().className=this._classNameNonActive}c.set_enabled(true);c.get_control().className=this._classNameActive;this.get_mapcontrol().set_navaction(c.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")},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(c,d){c.dispose()},createTile:function(e,f){var k="";var g="static"+(((e+f)/this._scale)%4);if(TripzoomLib.Constants.USE_STATIC_SERVER){if(this.isSatellite){k="http://"+g+".routenet.eu/xmap/sat_"+e+"_"+f+"_"+this._scale+".jpg"}else{k="http://"+g+".routenet.eu/xmap/map_"+e+"_"+f+"_"+this._scale+".gif"}}else{if(this.isSatellite){k=TripzoomLib.Constants.EXTERN_URL+"image.ashx?x="+e+"&y="+f+"&d="+this._scale+"&width="+TripzoomLib.Constants.TILE_SIZE+"&height="+TripzoomLib.Constants.TILE_SIZE+"&layers=SATELLITE&format=JPG"}else{k=TripzoomLib.Constants.EXTERN_URL+"image.ashx?x="+e+"&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*((e-this.x0)/this._scale),top:TripzoomLib.Constants.TILE_SIZE*((this.y0-f)/this._scale),url:k},{load:this.tileCreated})},createMap:function(k,m){this.mppix=this._scale/TripzoomLib.Constants.TILE_SIZE;this._viewrect=new TripzoomLib.Element.Rect(k-0.5*this.get_control().get_width()*this.mppix,m+0.5*this.get_control().get_height()*this.mppix,k+0.5*this.get_control().get_width()*this.mppix,m-0.5*this.get_control().get_height()*this.mppix);if(this.get_control().get_tiled()){var o=this._scale;bufferTiles=0;var g=this.get_control().getTileLayer();g.style.zIndex=0;this.get_control().currentMapLayer=-this.get_control().currentMapLayer;g=this.get_control().getTileLayer();g.style.zIndex=1;g.style.width=this.get_control().get_width()+"px";g.style.height=this.get_control().get_height()+"px";this.x0=(this._viewrect.left>0)?Math.floor(this._viewrect.left/o)*o-bufferTiles*o:Math.floor(this._viewrect.left/o)*o-(bufferTiles+1)*o;this.y0=(this._viewrect.top>0)?Math.floor(this._viewrect.top/o)*o+(bufferTiles+1)*o:Math.floor(this._viewrect.top/o)*o+bufferTiles*o;this.dx=parseInt(0.5*this.get_control().get_width())-(k-this.x0)/this.mppix;this.dy=parseInt(0.5*this.get_control().get_height())-(this.y0-m)/this.mppix;this.dx0=this.dx;this.dy0=this.dy;this.tilesH=Math.ceil(((k-this.x0)/this.mppix+this.get_control().get_width()/2)/TripzoomLib.Constants.TILE_SIZE)+bufferTiles;this.tilesV=Math.ceil(((this.y0-m)/this.mppix+this.get_control().get_height()/2)/TripzoomLib.Constants.TILE_SIZE)+bufferTiles;var n=0;var l=0;for(i=0;i<this.tilesH;i++){for(j=0;j<this.tilesV;j++){n=this.x0+parseInt(i)*this._scale;l=this.y0-parseInt(j)*this._scale;this.createTile(Math.round(n),Math.round(l))}}this.tileRect=new TripzoomLib.Element.Rect(this.x0,this.y0,n,l);g.style.left=(this.dx)+"px";g.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(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY);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 d=this.get_element();if(d){d.innerHTML="";d.parentNode.removeChild(d)}this.Clear();this._objects=null;this._positions=null;this._mouseClickDelegate=null;this._mouseOverDelegate=null;if(typeof(this._staticimage)!="undefined"){var c=this.get_mapcontrol().get_mapcontrol().get_mapcontrol();c.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(l){var n=null;switch(l.get_geometry().get_type()){case"Point":var k=this.get_mapcontrol().get_mapcontrol().get_mapcontrol();var q=l.get_geometry();this._rect.Expand(q);n=$create(TripzoomLib.GUI.Map.Controls.MarkerHotspot,{parent:this.get_element(),layerobject:l,position:l.get_geometry().TransformCoordinates(k.get_mapview().get_viewrect(),k.get_width(),k.get_height()),type:this.get_type()},{click:this._mouseClickDelegate});if(n){var p=false;if(Array.contains(this._positions,n.get_position().x+"_"+n.get_position().y)){if(this._objects){for(var m=0;m<this._objects.length;m++){if(this._objects[m].get_type()==TripzoomLib.GUI.Map.Controls.ShapeType.POINT&&this._objects[m].get_position().x==n.get_position().x&&this._objects[m].get_position().y==n.get_position().y){this._objects[m].add_hotspot(n);this._objects[m].update();p=true;break}}}}else{Array.add(this._positions,n.get_position().x+"_"+n.get_position().y)}if(!p){n.show();Array.add(this._objects,n)}this._objectcount++}break;case"Polygon":var o=l.get_geometry();this._rect.Expand(o.get_extents());n=$create(TripzoomLib.GUI.Map.Controls.AreaHotspot,{layer:this,layerobject:l,type:this.get_type()});Array.add(this._objects,n);this._objectcount++;break}return n},AddShape:function(k,f,g){switch(k){case LocatienetLib.MapShapeType.POINT:k=TripzoomLib.GUI.Map.Controls.ShapeType.POINT;this._rect.Expand(new TripzoomLib.Element.Point(f.x,f.y));break;case LocatienetLib.MapShapeType.RECT:k=TripzoomLib.GUI.Map.Controls.ShapeType.RECT;for(var m=0;m<f.length;m++){this._rect.Expand(new TripzoomLib.Element.Point(f[m].x,f[m].y))}break;case LocatienetLib.MapShapeType.POLYGON:k=TripzoomLib.GUI.Map.Controls.ShapeType.POLYGON;for(var m=0;m<f.length;m++){this._rect.Expand(new TripzoomLib.Element.Point(f[m].x,f[m].y))}break;case LocatienetLib.MapShapeType.LINE:k=TripzoomLib.GUI.Map.Controls.ShapeType.LINE;for(var m=0;m<f.length;m++){this._rect.Expand(new TripzoomLib.Element.Point(f[m].x,f[m].y))}break;case LocatienetLib.MapShapeType.CIRCLE:if(!TripzoomLib.GUI.Map.Controls.CircleShapeStyle.isInstanceOfType(g)){throw new Sys.ArgumentTypeException("")}this._rect.Expand(new TripzoomLib.Element.Point(f.x-g.radius,f.y+g.radius));this._rect.Expand(new TripzoomLib.Element.Point(f.x+g.radius,f.y-g.radius));break}var l=$create(TripzoomLib.GUI.Map.Controls.Shape,{canvas:this._canvas,coords:f,type:k,style:(g)?g:this._style},{click:this._mouseClickDelegate});if(l){Array.add(this._objects,l);this._objectcount++}return l},AddLine:function(c,d){return this.AddShape(LocatienetLib.MapShapeType.LINE,c,d)},_mouseClick:function(d,f){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(d.get_layerobject().get_counter()>1){e.Zoom(4,f.clientX,f.clientY)}else{if(this.get_popup()){this.get_popup().show(d)}}break;case TripzoomLib.GUI.Map.Controls.HotspotType.LINK:case LocatienetLib.MapLayerStyle.LINK:if(d.get_url()){window.open(d.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(k,m,n){if(k._disposed){return}var q=k._request.get_responseData();if(q){var p=k.get_mapcontrol().get_mapcontrol().get_mapcontrol();switch(m.toLowerCase()){case"getlayer":if(q.ImageUrl){k._staticimage=$create(TripzoomLib.GUI.Map.StaticImage,{mapcontrol:p,url:q.ImageUrl,zindex:1,left:0,top:0,width:p.get_width(),height:p.get_height()});p.get_staticimagelayer().add_staticimage(k._staticimage);p.get_staticimagelayer().set_visible(true)}if(q.LayerObjects){for(i=0;i<q.LayerObjects.length;i++){k.Add($create(TripzoomLib.Element.LayerObject,{layer:k,geometry:new TripzoomLib.Element.Point(q.LayerObjects[i].Location.point.x,q.LayerObjects[i].Location.point.y),title:q.LayerObjects[i].Title,text:q.LayerObjects[i].Description,bitmap:q.LayerObjects[i].Marker}))}}if(q.MarkerObjects){for(i=0;i<q.MarkerObjects.length;i++){var o=$find(q.MarkerObjects[i].Id);if(o){o.dispose()}var l=$create(TripzoomLib.Element.LayerObject,{layer:k,refid:q.MarkerObjects[i].Id,geometry:new TripzoomLib.Element.Point(q.MarkerObjects[i].Location.point.x,q.MarkerObjects[i].Location.point.y),bitmap:q.MarkerObjects[i].Marker,async:true});if(q.MarkerObjects[i].Count&&q.MarkerObjects[i].Count>1){l.set_counter(q.MarkerObjects[i].Count)}k.Add(l)}}if(q.Hotspots){k.Clear();for(i=0;i<q.Hotspots.length;i++){switch(q.Hotspots[i].Type){case"Polygon":k.Add($create(TripzoomLib.Element.LayerObject,{layer:k,async:true,refid:q.Hotspots[i].Id,geometry:$create(TripzoomLib.Element.Polygon,{exteriorring:q.Hotspots[i].Coords})}));break}}}break;case"getlayerobject":if(k.get_popup()){k.get_popup().show(k)}break}}k.isLoading(false);TripzoomLib.GUI.Map.Layer.callBaseMethod(k,"Update")},LoadLayer:function(m){var n=this.get_mapcontrol().get_mapcontrol().get_mapcontrol();this.Clear();if(this._partialloading){var p=2;var q=m.get_width()/p;var r=m.get_height()/p;for(var k=0;k<p;k++){for(var l=0;l<p;l++){var o=new TripzoomLib.Element.Rect(m.left+k*q,m.top-(l)*r-1,m.left+(k+1)*q-1,m.top-(l+1)*r);this._request.GetLayer($create(TripzoomLib.Net.RequestSettings,{width:n.get_width()/p,height:n.get_height()/p,name:this.get_id(),language:n.get_language(),rect:o,parameters:[this._searchquery]}))}}}else{this._request.GetLayer($create(TripzoomLib.Net.RequestSettings,{width:n.get_width(),height:n.get_height(),name:this.get_id(),language:n.get_language(),rect:m,parameters:[this._searchquery]}))}n._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(g){if(!this._static){if(g&&this._rect.Equals(g)){return}else{this._rect=g}}if(this._canvas&&this._canvas.parentNode){this._canvas.parentNode.removeChild(this._canvas)}this._CreateCanvas();if(this._static){if(this._objects){for(var k=0;k<this._objects.length;k++){var m=this._objects[k];if(TripzoomLib.GUI.Map.Controls.Shape.isInstanceOfType(m)){m.set_canvas(this._canvas);m.update()}else{if(TripzoomLib.GUI.Map.Controls.MarkerHotspot.isInstanceOfType(m)){var f=this.get_mapcontrol().get_mapcontrol().get_mapcontrol();var l=m.get_layerobject().get_geometry().TransformCoordinates(f.get_mapview().get_viewrect(),f.get_width(),f.get_height());m.set_position(l);if(this.get_popup()&&this.get_popup().get_visible()){this.get_popup().show(m)}}}}}TripzoomLib.GUI.Map.Layer.callBaseMethod(this,"Update")}else{if(this.get_popup()){this.get_popup().hide()}this.isLoading(true);if(g){this.LoadLayer(g)}}},_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(e,k,g){var f=this.Find(e);if(!f){f=new TripzoomLib.GUI.Map.Layer(this);f.set_id(e);f.set_static(true);f.set_bitmap(k);if(!g){g=TripzoomLib.GUI.Map.Controls.HotspotType.INFO}f.set_type(g);if(g==TripzoomLib.GUI.Map.Controls.HotspotType.INFO){f.set_popup(this._popup)}f.initialize();Array.add(this._objects,f)}return f},Remove:function(d){var c=this.Find(d);if(c){c.dispose();Array.remove(this._objects,c)}},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(g,k,l){var m=g._request.get_responseData();if(m){g.get_mapview().set_viewrect(new TripzoomLib.Element.Rect().set_rect(m.RectString));var f=$create(TripzoomLib.GUI.Map.StaticImage,{mapcontrol:g,url:m.ImageUrl,zindex:1,left:0,top:0,width:g.get_width(),height:g.get_height()});g._staticimagelayer.clear();g._staticimagelayer.add_staticimage(f);g._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 g=this.get_mapcontrol().get_mapview().get_mppixY()/this.get_mapview().get_mppixY();var e=this._viewframe;e.style.border="1px solid blue";e.style.width=Math.round(this.get_mapcontrol().get_mapview().get_viewrect().Width()/this.get_mapview().get_mppixX())+"px";e.style.height=Math.round(this.get_mapcontrol().get_mapview().get_viewrect().Height()/this.get_mapview().get_mppixY())+"px";e.style.left=(this.get_mapcontrol().get_mapview().get_viewrect().left-this.get_mapview().get_viewrect().left)/this.get_mapview().get_mppixX()+k+"px";e.style.top=(this.get_mapview().get_viewrect().top-this.get_mapcontrol().get_mapview().get_viewrect().top)/this.get_mapview().get_mppixY()+g+"px";this._request.CreateMap($create(TripzoomLib.Net.RequestSettings,{rect:this.get_mapview().get_viewrect(),width:this.get_width(),height:this.get_height(),layers:"STANDARD"}))}},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(c,d){switch(d.get_propertyName()){case"position":if(c.get_element()&&c.get_element().parentNode){Sys.UI.DomElement.setLocation(c._element,Math.round(c._position.x-(c.get_element().offsetWidth/2)),Math.round(c._position.y-(c._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(d){this._title.innerHTML="";this._content.innerHTML="";if(d){var c=document.createElement("img");c.src=TripzoomLib.Constants.IMAGE_URL+"spinner.gif";c.alt="";this._content.appendChild(c)}},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(p,l,m){try{var q=p._request.get_responseData();if(q){switch(l.toLowerCase()){case"getlayerobject":var o=p._hotspot.get_layerobject();if(TripzoomLib.GUI.Map.Controls.MarkerHotspot.isInstanceOfType(p._hotspot)){o=p._hotspot.get_hotspots()[p._currentHotspotIndex].get_layerobject()}o.set_title(q.Title);o.set_text(q.Description);o.set_url(q.Link);o.set_async(false);p._request.clear();break}}}catch(e){}var r=p._hotspot;if(TripzoomLib.GUI.Map.Controls.MarkerHotspot.isInstanceOfType(r)){r=r.get_hotspots()[p._currentHotspotIndex]}if(r.get_layerobject().get_title()){p._title.style.display="block";p._title.innerHTML=r.get_layerobject().get_title()}else{p._title.style.display="none"}p._content.innerHTML="";p.set_visible(true);p._content.innerHTML=r.get_layerobject().get_text();var n=Sys.UI.DomElement.getBounds(p._content);var b=n.height;n=Sys.UI.DomElement.getBounds(p._caption);b+=n.height+30;p._sides.bl.style.height=b+"px";p._sides.br.style.height=b+"px";p.get_element().style.height=b+"px";p._reposition()},hide:function(){this._title.innerHTML="";this._content.innerHTML="";this.set_visible(false)},_reposition:function(){var l=Sys.UI.DomElement.getBounds(this.get_element());var m=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 k=this._hotspot.get_position().y;var b=20;if(g+l.width>m.width){b=g;b-=(l.width+20)}if(k<parseInt(m.height)-parseInt(l.height)){this._pointers.top.style.display="block";this._pointers.top.style.left=20+"px";if(g+l.width>m.width){g=g-l.width+50;this._pointers.top.style.left=(l.width-30)+"px"}}else{if(k-l.height+60>0){k-=(l.height+60);this._pointers.bottom.style.display="block";this._pointers.bottom.style.left=20+"px";if(g+l.width>m.width){g=g-l.width+50;this._pointers.bottom.style.left=(l.width-30)+"px"}}else{if(g+l.width<m.width-20){this._pointers.left.style.display="block";this._pointers.left.style.top=(k-30)+"px";k=0;g+=2*b}else{this._pointers.right.style.display="block";this._pointers.right.style.top=(k-30)+"px";k=0;g=b}}}if(Sys.Browser.agent==Sys.Browser.InternetExplorer){Sys.UI.DomElement.setLocation(this.get_element(),g,k+30)}else{Sys.UI.DomElement.setLocation(this.get_element(),g-10,k+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(c){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 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")}},_prevClick:function(d){var f=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 e=this._hotspot.get_hotspots()[this._currentHotspotIndex];this._hotspot.get_marker().src=(e.get_layerobject().get_bitmap().toLowerCase().indexOf("http://")!=-1)?e.get_layerobject().get_bitmap():TripzoomLib.Constants.IMAGE_URL+"markers/"+e.get_layerobject().get_bitmap();if(e.get_layerobject().get_async()){this._reset(true);this._request.GetLayerObject($create(TripzoomLib.Net.RequestSettings,{parameters:[e.get_layerobject().get_refid()],name:e.get_layerobject().get_layer().get_id(),language:e.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,g){var k,f;k=Math.round((parseInt(e)-_Map.get_mapview().get_viewrect().left)/_Map.get_mapview().get_mppixX());f=Math.round((_Map.get_mapview().get_viewrect().top-parseInt(g))/_Map.get_mapview().get_mppixY());return new TripzoomLib.Element.Point(k,f)},update:function(){var o=this._canvas.getContext("2d");if(this._style){o.strokeStyle=this._style.strokeStyle;o.lineWidth=this._style.lineWidth}else{o.strokeStyle="blue";o.lineWidth=5}switch(this._type){case TripzoomLib.GUI.Map.Controls.ShapeType.POINT:var q=this.CoordsToPosition(this._coords.x,this._coords.y);o.rect(q.x,q.y,3,3);if(this._style.fill){o.fill()}else{o.stroke()}break;case TripzoomLib.GUI.Map.Controls.ShapeType.LINE:o.beginPath();var q=this.CoordsToPosition(this._coords[0].x,this._coords[0].y);o.moveTo(q.x,q.y);for(var n=1;n<this._coords.length;n++){q=this.CoordsToPosition(this._coords[n].x,this._coords[n].y);o.lineTo(q.x,q.y)}o.stroke();break;case TripzoomLib.GUI.Map.Controls.ShapeType.POLYGON:o.beginPath();var q=this.CoordsToPosition(this._coords[0].x,this._coords[0].y);o.moveTo(q.x,q.y);for(var n=1;n<this._coords.length;n++){q=this.CoordsToPosition(this._coords[n].x,this._coords[n].y);o.lineTo(q.x,q.y)}o.closePath();if(this._style.fill){o.fill()}else{o.stroke()}break;case TripzoomLib.GUI.Map.Controls.ShapeType.RECT:var p=this.CoordsToPosition(this._coords[0].x,this._coords[0].y);var m=this.CoordsToPosition(this._coords[1].x,this._coords[1].y);o.fillStyle=this._style.fillStyle;o.fillRect(p.x,p.y,m.x-p.x,m.y-p.y);o.fill();break;case TripzoomLib.GUI.Map.Controls.ShapeType.CIRCLE:o.beginPath();var q=this.CoordsToPosition(this._coords.x,this._coords.y);var k=this.CoordsToPosition(this._coords.x,this._coords.y+this._style.radius);var l=Math.abs(k.y-q.y);o.arc(q.x,q.y,l,0,2*Math.PI,true);if(this._style.fill){o.fill()}else{o.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(d,c){if(!TripzoomLib.Element.Point.isInstanceOfType(d)){throw Error.argumentType("point",Object.getType(d),TripzoomLib.Element.Point,"set_center")}if(this.get_coordformat()!=LocatienetLib.CoordFormat.MERCATOR){d=TripzoomLib.Gis.Utils.TransformPoint(d,this.get_coordformat(),LocatienetLib.CoordFormat.MERCATOR)}g_map.set_center(d,(null!=c)?parseInt(c):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(c,d){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(c,d){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(c,d){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(c,d){handler=this.get_events().getHandler("error");if(handler){handler(c,d)}},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(f){var k=f;var g=this.get_mapcontrol().get_coordformat();if(g!=LocatienetLib.CoordFormat.MERCATOR){if(TripzoomLib.Utils.isArray(f)){for(var l=0;l<f.length;l++){var m=TripzoomLib.Gis.Utils.TransformPoint(f[l],g,LocatienetLib.CoordFormat.MERCATOR);k[l]=m}}else{var m=TripzoomLib.Gis.Utils.TransformPoint(f,g,LocatienetLib.CoordFormat.MERCATOR);k=m}}return k},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(c,d){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(e,f,k,g){this._point=new TripzoomLib.Element.Point(e,f);this._bitmap=(g)?g:"standard.gif";this._text=k;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(f,k){showMapSpinner(true);var m=f._layer.get_control();m.Clear();data=this._json.get_responseData();if(data){for(var l=0;l<data.length;l++){text=(data[l].Description)?data[l].Description:"";bitmap=(data[l].Marker)?data[l].Marker:"standard.gif";switch(data[l].Type){case LocatienetLib.MapShapeType.POINT:Sys.Debug.fail("");m.Add($create(TripzoomLib.Element.LayerObject,{layer:m,geometry:new TripzoomLib.Element.Point(data[l].Point.point.x,data[l].Point.point.y),title:data[l].Title,text:text,bitmap:bitmap,url:data[l].Link}));break;case LocatienetLib.MapShapeType.CIRCLE:var g=new LocatienetLib.MapCircleShapeStyle();g.radius=data[l].Style.Radius;g.fill=data[l].Style.Fill;g.fillColor=data[l].Style.FillColor;g.strokeStyle=data[l].Style.StrokeStyle;g.lineWidth=data[l].Style.LineWidth;m.AddShape(data[l].Type,{x:data[l].Point.point.x,y:data[l].Point.point.y},g);break;case LocatienetLib.MapShapeType.POLYGON:case LocatienetLib.MapShapeType.LINE:m.AddShape(data[l].Type,data[l].LineString.lineString.wrappedPoints);break}}}showMapSpinner(false);this._raiseComplete(k)},_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(c,d){LocatienetLib.Element.Point.initializeBase(this,[c,d])};LocatienetLib.Element.Point.registerClass("LocatienetLib.Element.Point",TripzoomLib.Element.Point);LocatienetLib.Element.Rect=function(g,f,k,e){LocatienetLib.Element.Rect.initializeBase(this,[g,f,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,z=J.sin,A=J.cos,N=10,D=N/2,P={init:function(b){var c=b||document;if(/MSIE/.test(navigator.userAgent)&&!window.opera){var a=this;c.attachEvent("onreadystatechange",function(){a.r(c)})}},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 a=c.getElementsByTagName("canvas");for(var b=0;b<a.length;b++){if(!a[b].getContext){this.initElement(a[b])}}}},q:function(d){var e=d.outerHTML,a=d.ownerDocument.createElement(e);if(e.slice(-2)!="/>"){var b="/"+d.tagName,c;while((c=d.nextSibling)&&c.tagName!=b){c.removeNode()}if(c){c.removeNode()}}d.parentNode.replaceChild(a,d);return a},initElement:function(a){a=this.q(a);a.getContext=function(){if(this.l){return this.l}return this.l=new m(this)};a.attachEvent("onpropertychange",G);a.attachEvent("onresize",H);var b=a.attributes;if(b.width&&b.width.specified){a.style.width=b.width.nodeValue+"px"}else{a.width=a.clientWidth}if(b.height&&b.height.specified){a.style.height=b.height.nodeValue+"px"}else{a.height=a.clientHeight}return a}};function G(a){var b=a.srcElement;switch(a.propertyName){case"width":b.style.width=b.attributes.width.nodeValue+"px";b.getContext().clearRect();break;case"height":b.style.height=b.attributes.height.nodeValue+"px";b.getContext().clearRect();break}}function H(a){var b=a.srcElement;if(b.firstChild){b.firstChild.style.width=b.clientWidth+"px";b.firstChild.style.height=b.clientHeight+"px"}}P.init();var Q=[];for(var E=0;E<16;E++){for(var F=0;F<16;F++){Q[E*16+F]=E.toString(16)+F.toString(16)}}function K(){return[[1,0,0],[0,1,0],[0,0,1]]}function S(g,a){var b=K();for(var c=0;c<3;c++){for(var d=0;d<3;d++){var e=0;for(var f=0;f<3;f++){e+=g[c][f]*a[f][d]}b[c][d]=e}}return b}function B(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.d=a.d;b.e=a.e}function C(g){var a,b=1;g=String(g);if(g.substring(0,3)=="rgb"){var c=g.indexOf("(",3),d=g.indexOf(")",c+1),e=g.substring(c+1,d).split(",");a="#";for(var f=0;f<3;f++){a+=Q[Number(e[f])]}if(e.length==4&&g.substr(3,1)=="a"){b=e[3]}}else{a=g}return[a,b]}function R(a){switch(a){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function m(a){this.a=K();this.m=[];this.k=[];this.c=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=N*1;this.globalAlpha=1;this.canvas=a;var b=a.ownerDocument.createElement("div");b.style.width=a.clientWidth+"px";b.style.height=a.clientHeight+"px";b.style.overflow="hidden";b.style.position="absolute";a.appendChild(b);this.j=b;this.d=1;this.e=1}var M=m.prototype;M.clearRect=function(){this.j.innerHTML="";this.c=[]};M.beginPath=function(){this.c=[]};M.moveTo=function(a,b){this.c.push({type:"moveTo",x:a,y:b});this.f=a;this.g=b};M.lineTo=function(a,b){this.c.push({type:"lineTo",x:a,y:b});this.f=a;this.g=b};M.bezierCurveTo=function(e,f,a,b,c,d){this.c.push({type:"bezierCurveTo",cp1x:e,cp1y:f,cp2x:a,cp2y:b,x:c,y:d});this.f=c;this.g=d};M.quadraticCurveTo=function(b,c,d,e){var k=this.f+0.666666666666667*(b-this.f),a=this.g+0.666666666666667*(c-this.g),g=k+(d-this.f)/3,f=a+(e-this.g)/3;this.bezierCurveTo(k,a,g,f,d,e)};M.arc=function(f,g,o,a,b,d){o*=N;var e=d?"at":"wa",k=f+A(a)*o-D,l=g+z(a)*o-D,n=f+A(b)*o-D,c=g+z(b)*o-D;if(k==n&&!d){k+=0.125}this.c.push({type:e,x:f,y:g,radius:o,xStart:k,yStart:l,xEnd:n,yEnd:c})};M.rect=function(c,d,a,b){this.moveTo(c,d);this.lineTo(c+a,d);this.lineTo(c+a,d+b);this.lineTo(c,d+b);this.closePath()};M.strokeRect=function(c,d,a,b){this.beginPath();this.moveTo(c,d);this.lineTo(c+a,d);this.lineTo(c+a,d+b);this.lineTo(c,d+b);this.closePath();this.stroke()};M.fillRect=function(c,d,a,b){this.beginPath();this.moveTo(c,d);this.lineTo(c+a,d);this.lineTo(c+a,d+b);this.lineTo(c,d+b);this.closePath();this.fill()};M.createLinearGradient=function(d,e,a,b){var c=new I("gradient");return c};M.createRadialGradient=function(g,a,b,c,d,e){var f=new I("gradientradial");f.n=b;f.o=e;f.i.x=g;f.i.y=a;return f};M.drawImage=function(s,u){var v,d,e,g,n,p,q,r,f=s.runtimeStyle.width,o=s.runtimeStyle.height;s.runtimeStyle.width="auto";s.runtimeStyle.height="auto";var V=s.width,W=s.height;s.runtimeStyle.width=f;s.runtimeStyle.height=o;if(arguments.length==3){v=arguments[1];d=arguments[2];n=(p=0);q=(e=V);r=(g=W)}else{if(arguments.length==5){v=arguments[1];d=arguments[2];e=arguments[3];g=arguments[4];n=(p=0);q=V;r=W}else{if(arguments.length==9){n=arguments[1];p=arguments[2];q=arguments[3];r=arguments[4];v=arguments[5];d=arguments[6];e=arguments[7];g=arguments[8]}else{throw"Invalid number of arguments"}}}var X=this.b(v,d),Y=[],Z=10,aa=10;Y.push(" <g_vml_:group",' coordsize="',N*Z,",",N*aa,'"',' coordorigin="0,0"',' style="width:',Z,";height:",aa,";position:absolute;");if(this.a[0][0]!=1||this.a[0][1]){var l=[];l.push("M11='",this.a[0][0],"',","M12='",this.a[1][0],"',","M21='",this.a[0][1],"',","M22='",this.a[1][1],"',","Dx='",L(X.x/N),"',","Dy='",L(X.y/N),"'");var c=X,a=this.b(v+e,d),b=this.b(v,d+g),k=this.b(v+e,d+g);c.x=Math.max(c.x,a.x,b.x,k.x);c.y=Math.max(c.y,a.y,b.y,k.y);Y.push("padding:0 ",L(c.x/N),"px ",L(c.y/N),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",l.join(""),", sizingmethod='clip');")}else{Y.push("top:",L(X.y/N),"px;left:",L(X.x/N),"px;")}Y.push(' ">','<g_vml_:image src="',s.src,'"',' style="width:',N*e,";"," height:",N*g,';"',' cropleft="',n/V,'"',' croptop="',p/W,'"',' cropright="',(V-n-q)/V,'"',' cropbottom="',(W-p-r)/W,'"'," />","</g_vml_:group>");this.j.insertAdjacentHTML("BeforeEnd",Y.join(""))};M.stroke=function(g){var k=[],l=C(g?this.fillStyle:this.strokeStyle),n=l[0],o=l[1]*this.globalAlpha,q=10,aa=10;k.push("<g_vml_:shape",' fillcolor="',n,'"',' filled="',Boolean(g),'"',' style="position:absolute;width:',q,";height:",aa,';"',' coordorigin="0 0" coordsize="',N*q," ",N*aa,'"',' stroked="',!g,'"',' strokeweight="',this.lineWidth,'"',' strokecolor="',n,'"',' path="');var ac={x:null,y:null},ad={x:null,y:null};for(var ae=0;ae<this.c.length;ae++){var p=this.c[ae];if(p.type=="moveTo"){k.push(" m ");var ab=this.b(p.x,p.y);k.push(L(ab.x),",",L(ab.y))}else{if(p.type=="lineTo"){k.push(" l ");var ab=this.b(p.x,p.y);k.push(L(ab.x),",",L(ab.y))}else{if(p.type=="close"){k.push(" x ")}else{if(p.type=="bezierCurveTo"){k.push(" c ");var ab=this.b(p.x,p.y),af=this.b(p.cp1x,p.cp1y),ag=this.b(p.cp2x,p.cp2y);k.push(L(af.x),",",L(af.y),",",L(ag.x),",",L(ag.y),",",L(ab.x),",",L(ab.y))}else{if(p.type=="at"||p.type=="wa"){k.push(" ",p.type," ");var ab=this.b(p.x,p.y),ah=this.b(p.xStart,p.yStart),ai=this.b(p.xEnd,p.yEnd);k.push(L(ab.x-this.d*p.radius),",",L(ab.y-this.e*p.radius)," ",L(ab.x+this.d*p.radius),",",L(ab.y+this.e*p.radius)," ",L(ah.x),",",L(ah.y)," ",L(ai.x),",",L(ai.y))}}}}}if(ab){if(ac.x==null||ab.x<ac.x){ac.x=ab.x}if(ad.x==null||ab.x>ad.x){ad.x=ab.x}if(ac.y==null||ab.y<ac.y){ac.y=ab.y}if(ad.y==null||ab.y>ad.y){ad.y=ab.y}}}k.push(' ">');if(typeof this.fillStyle=="object"){var u={x:"50%",y:"50%"},v=ad.x-ac.x,c=ad.y-ac.y,e=v>c?v:c;u.x=L(this.fillStyle.i.x/v*100+50)+"%";u.y=L(this.fillStyle.i.y/c*100+50)+"%";var f=[];if(this.fillStyle.p=="gradientradial"){var d=this.fillStyle.n/e*100,r=this.fillStyle.o/e*100-d}else{var d=0,r=100}var a={offset:null,color:null},b={offset:null,color:null};this.fillStyle.h.sort(function(T,U){return T.offset-U.offset});for(var ae=0;ae<this.fillStyle.h.length;ae++){var s=this.fillStyle.h[ae];f.push(s.offset*r+d,"% ",s.color,",");if(s.offset>a.offset||a.offset==null){a.offset=s.offset;a.color=s.color}if(s.offset<b.offset||b.offset==null){b.offset=s.offset;b.color=s.color}}f.pop();k.push("<g_vml_:fill",' color="',b.color,'"',' color2="',a.color,'"',' type="',this.fillStyle.p,'"',' focusposition="',u.x,", ",u.y,'"',' colors="',f.join(""),'"',' opacity="',o,'" />')}else{if(g){k.push('<g_vml_:fill color="',n,'" opacity="',o,'" />')}else{k.push("<g_vml_:stroke",' opacity="',o,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',R(this.lineCap),'"',' weight="',this.lineWidth,'px"',' color="',n,'" />')}}k.push("</g_vml_:shape>");this.j.insertAdjacentHTML("beforeEnd",k.join(""));this.c=[]};M.fill=function(){this.stroke(true)};M.closePath=function(){this.c.push({type:"close"})};M.b=function(a,b){return{x:N*(a*this.a[0][0]+b*this.a[1][0]+this.a[2][0])-D,y:N*(a*this.a[0][1]+b*this.a[1][1]+this.a[2][1])-D}};M.save=function(){var a={};B(this,a);this.k.push(a);this.m.push(this.a);this.a=S(K(),this.a)};M.restore=function(){B(this.k.pop(),this);this.a=this.m.pop()};M.translate=function(b,c){var a=[[1,0,0],[0,1,0],[b,c,1]];this.a=S(a,this.a)};M.rotate=function(c){var d=A(c),a=z(c),b=[[d,a,0],[-a,d,0],[0,0,1]];this.a=S(b,this.a)};M.scale=function(b,c){this.d*=b;this.e*=c;var a=[[b,0,0],[0,c,0],[0,0,1]];this.a=S(a,this.a)};M.clip=function(){};M.arcTo=function(){};M.createPattern=function(){return new O};function I(a){this.p=a;this.n=0;this.o=0;this.h=[];this.i={x:0,y:0}}I.prototype.addColorStop=function(a,b){b=C(b);this.h.push({offset:1-a,color:b})};function O(){}G_vmlCanvasManager=P;CanvasRenderingContext2D=m;CanvasGradient=I;CanvasPattern=O})()}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(k,m,q){if(typeof q=="undefined"||q==null){q={}}if(k.prototype.constructor==Object.prototype.constructor){k.prototype.constructor=k}var l=function(){};l.prototype=k.prototype;m.prototype=new l();for(var n in q){m.prototype[n]=q[n]}var p=["constructor","hasOwnProperty","isPrototypeOf","toLocaleString","toString","valueOf"];for(var o=0;o<p.length;o++){var n=p[o];if(q.hasOwnProperty(n)){m.prototype[n]=q[n]}}m.prototype.constructor=m;m.prototype.base=k;return m};JSONScriptRequest._Exception=JSONScriptRequest._extends(Object,function(c,d){this.name=c;this.message=d},{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(g){if(typeof g=="undefined"){return"undefined"}else{if(g==null){return"null"}else{if(g.constructor==String){return'"'+g+'"'}else{if(g.constructor==Number){return g}else{if(g.constructor==Array){var e=[];for(var k=0,f=g.length;k<f;k++){e.push(JSONScriptRequest._toSourceHelper(g[k]))}return"["+e.join(", ")+"]"}else{if(g.constructor==Object){var e=[];for(var k in g){e.push(k+":"+JSONScriptRequest._toSourceHelper(g[k]))}return"{"+e.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(k,m,n,p,l){if(this.readyState==4){this._initialize_all()}if(typeof k=="undefined"||k==null||!k.match(JSONScriptRequest._RE.method)){throw new JSONScriptRequest.SYNTAX_ERR("method: "+k)}var q=k.toUpperCase();if(q!="GET"&&(q=="POST"||q=="HEAD"||q=="PUT"||q=="DELETE"||q=="PROPFIND"||q=="PROPPATCH"||q=="MKCOL"||q=="COPY"||q=="MOVE"||q=="LOCK"||q=="UNLOCK"||q=="VERSION-CONTROL"||q=="REPORT"||q=="CHECKOUT"||q=="CHECKIN"||q=="UNCHECKOUT"||q=="MKWORKSPACE"||q=="UPDATE"||q=="LABEL"||q=="MERGE"||q=="BASELINE-CONTROL"||q=="MKACTIVITY"||q=="ORDERPATCH"||q=="ACL")){throw new JSONScriptRequest.SYNTAX_ERR(k+" is not supported")}if(q!="GET"){throw new JSONScriptRequest.SYNTAX_ERR(k+" is not supported")}if(q=="GET"||q=="POST"||q=="HEAD"||q=="PUT"||q=="DELETE"){k=q}if(typeof m=="undefined"||m==null||!m.match(JSONScriptRequest._RE["http_URL-custom"])){throw new JSONScriptRequest.SYNTAX_ERR("url: "+m)}if(0){throw new JSONScriptRequest.SECURITY_ERR("url: "+m+" is cross-site")}if(m.match(new RegExp("^[^:]+://([^@]*)@[^/]+"))){throw new JSONScriptRequest.SYNTAX_ERR(RegExp.$1+" is not supported");var o=RegExp.$1;if(!o.match(JSONScriptRequest._RE.userinfo)){throw new JSONScriptRequest.SYNTAX_ERR("userinfo: "+o)}o=(o.indexOf(":")!=-1)?o.split(/:/):[o];if(2<o.length){throw new JSONScriptRequest.SYNTAX_ERR("userinfo: "+o)}if(typeof p=="undefined"){p=o[0]}if(typeof l=="undefined"){l=o[1]}}if(p!=null&&typeof p!="undefined"&&!p.match(JSONScriptRequest._RE["username-value-custom"])){throw new JSONScriptRequest.SYNTAX_ERR("user: "+p)}this._method=k;this._url=m;this._async=typeof n=="undefined"?true:n;this._user=typeof p=="undefined"?null:p;this._password=typeof l=="undefined"?null:l;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(k){if(this.readyState!=1){throw new JSONScriptRequest.INVALID_STATE_ERR("readyState: "+this.readyState+" is other than 1")}var e=this._url;if(e.indexOf("http://")==-1){if(typeof window.document.baseURI!="undefined"&&window.document.baseURI.match(new RegExp("(.*/)[^/]*$"))){e=RegExp.$1+e}else{}}this._create_dispatcher();e+=(e.indexOf("?")==-1?"?":"&")+this._callback_param+"="+encodeURIComponent("JSONScriptRequest._dispatchers["+this._id+"]");if(typeof k=="undefined"){k=null}if(k!=null){if(typeof k=="string"){}else{if(typeof k=="object"&&"nodeType" in k&&k.nodeType==9){if("xmlEncoding" in k){}else{}}else{k=k.toString()}}e+="&"+k}if(this._user!=null||this._password!=null){var g=(this._user!=null?this._user:"")+":"+(this._password!=null?this._password:"");e.replace(new RegExp("(https?://)(.+)","i"),RegExp.$1+g+"@"+RegExp.$2)}var f=document.createElement("script");f.src=e;f.type="text/javascript";f.charset="UTF-8";this._readystatechange(2);document.documentElement.appendChild(f);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(e){if(!e.match(JSONScriptRequest._RE["field-name"])){throw new JSONScriptRequest.SYNTAX_ERR("header: "+e)}if(this.readyState!=3&&this.readyState!=4){throw new JSONScriptRequest.INVALID_STATE_ERR("readyState: "+this.readyState+" is other than 3 or 4")}e=e.toUpperCase();var f=[];for(var d in this._responseHeaders){if(d.toUpperCase()==e){f.push(this._responseHeaders[d])}}if(f.length==0){return null}else{return f.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}};