
var RuntimeVersion="2.060315.0";Function.abstractMethod=function(){throw'Abstract method should be implemented';}
Function.createCallback=function(method,context){return function(){return method(context);}}
Function.createDelegate=function(instance,method){return function(){return method.apply(instance,arguments);}}
Function.emptyFunction=Function.emptyMethod=function(){}
Function.prototype.getBaseMethod=function(instance,methodName,baseTypeName){var baseType=baseTypeName?Function.parse(baseTypeName):this.getBaseType();var baseMethod=null;if(baseType){var directBaseType=baseType;if(instance._baseMethods){while(baseType){var methodKey=baseType.getName()+'.'+methodName;var method=instance._baseMethods[methodKey];if(method){return method;}
baseType=baseType._baseType;}}
if(!baseMethod){return directBaseType.prototype[methodName];}}
return null;}
Function.prototype.getBaseType=function(){return this._baseType;}
Function.prototype.getName=function(){return this._typeName;}
Function.parse=function(functionName){if(!Function._htClasses){Function._htClasses={};}
var fn=Function._htClasses[functionName];if(!fn){try{eval('fn = '+functionName);if(typeof(fn)!='function'){fn=null;}
else{Function._htClasses[functionName]=fn;}}
catch(ex){}}
return fn;}
Function.prototype._copyProps=function(p_objFnc){for(var strName in p_objFnc.prototype){var vValue=p_objFnc.prototype[strName];if(!this.prototype[strName]){this.prototype[strName]=vValue;}}}
Function.prototype._setBases=function(p_objRoot){if(p_objRoot._basePrototypePending){var astrPending=this.prototype._astrPendingInherits||[];for(var i=0;i<astrPending.length;i++){var fncType=astrPending[i]instanceof Function?astrPending[i]:Function.parse(astrPending[i]);if(!fncType._parentBase){fncType._parentBase=[];}
fncType._parentBase.push(p_objRoot._typeName);if(!p_objRoot._childBase){p_objRoot._childBase=[];}
p_objRoot._childBase.push(fncType._typeName);if(fncType&&(this!=fncType)&&(!this.inheritsFrom(fncType))&&(!fncType.inheritsFrom(this))&&!fncType._sealed){if(!fncType._typeName){fncType._typeName=typeof(astrPending[i])=="function"?astrPending[i]._typeName:astrPending[i];}
if(!this.bases){this.bases=[];}
this.bases.push(fncType);fncType._setBases(p_objRoot);this._copyProps(fncType);}}}
this._basePrototypePending=false;}
Function.prototype._callBaseConstructors=function(p_objInstance,p_objArgs){if(this.bases){for(var i=0;i<this.bases.length;i++){if(p_objArgs){this.bases[i].apply(p_objInstance,p_objArgs);}
else{this.bases[i].apply(p_objInstance);}}}}
Function.prototype.callBaseMethod=function(instance,methodName,baseArguments){var baseMethod=this.getBaseMethod(instance,methodName);if(baseMethod){if(!baseArguments){return baseMethod.apply(instance);}
else{return baseMethod.apply(instance,baseArguments);}}
return null;}
Function.prototype.implementsInterface=function(interfaceType){this._setBases(this);var interfaces=this._interfaces;if(interfaces){if(interfaces.contains(interfaceType)){return true;}}
if(this.bases)
{for(var i=0;i<this.bases.length;i++)
{if(this.bases[i].implementsInterface(interfaceType))
{return true;}}}
return false;}
Function.prototype.inheritsFrom=function(parentType){if(parentType==this){return true;}
if(!this._basesPending){this._basesPending=true;this._setBases(this);delete this._basesPending;}
if(this.bases){for(var i=0;i<this.bases.length;i++){if(this.bases[i].inheritsFrom(parentType)){return true;}}}
return false;}
Function.prototype.initializeBase=function(instance,baseArguments){if(this._interfaces){for(var i=0;i<this._interfaces.length;i++){this._interfaces[i].call(instance);}}
if(!this._parentBase)
{this._parentBase=[];this._parentBase.push(this._typeName);this._childBase=[];this._childBase.push(this._typeName);}
this._setBases(this);this._callBaseConstructors(instance,baseArguments);return instance;}
Function.prototype.isImplementedBy=function(instance){if(!instance)return false;var instanceType=Object.getType(instance);if(!instanceType.implementsInterface){return false;}
return instanceType.implementsInterface(this);}
Function.prototype.isInstanceOfType=function(instance){if(typeof(instance)=='undefined'||instance==null){return false;}
if(instance instanceof this){return true;}
var instanceType=Object.getType(instance);if(instanceType==this){return true;}
if(!instanceType.inheritsFrom){return false;}
return instanceType.inheritsFrom(this);}
Function.prototype.registerBaseMethod=function(instance,methodName){if(!instance._baseMethods){instance._baseMethods={};}
var methodKey=this.getName()+'.'+methodName;instance._baseMethods[methodKey]=instance[methodName];}
Function.createInstance=function(type){if(typeof(type)!='function'){type=Function.parse(type);}
return new type();}
Function.prototype.registerClass=function(typeName,baseType,interfaceType){this._typeName=typeName;if(baseType){this._baseType=baseType;if(!(baseType instanceof Array)){baseType=[baseType];}
if(!this.prototype._astrPendingInherits){this.prototype._astrPendingInherits=[];}
for(var i=0;i<baseType.length;i++){this.prototype._astrPendingInherits.push(baseType[i]);}
this._basePrototypePending=true;}
if(interfaceType){this._interfaces=[];for(var i=2;i<arguments.length;i++){interfaceType=arguments[i];this._interfaces.push(interfaceType);}}
return this;}
Function.prototype.registerAbstractClass=function(typeName,baseType){this.registerClass.apply(this,arguments);this._abstract=true;return this;}
Function.prototype.registerSealedClass=function(typeName,baseType){this.registerClass.apply(this,arguments);this._sealed=true;return this;}
Function.prototype.registerInterface=function(typeName){this._typeName=typeName;this._interface=true;this._abstract=true;this._sealed=true;return this;}
var registerNamespace=Function.registerNamespace=function(namespacePath){var rootObject=window;var namespaceParts=namespacePath.split('.');for(var i=0;i<namespaceParts.length;i++){var currentPart=namespaceParts[i];if(!rootObject[currentPart]){rootObject[currentPart]=new Object();}
rootObject=rootObject[currentPart];}}
Function._typeName='Function';window.Type=Function;Object.getType=function(instance){var ctor=instance.constructor;if(!ctor||(typeof(ctor)!="function")||!ctor._typeName){return Object;}
return instance.constructor;}
Object.getTypeName=function(instance){return Object.getType(instance).getName();}
Object.fromJSON=function(text)
{try{return!(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(text.replace(/"(\\.|[^"\\])*"/g,'')))&&eval('('+text+')');}catch(e){return false;}}
Object._typeName='Object';Boolean.parse=function(value){if(typeof(value)=='string'){return(value.trim().toLowerCase()=='true');}
return value?true:false;}
Boolean._typeName='Boolean';Number.parse=function(value){if(!value||(value.length==0)){return 0;}
return parseFloat(value);}
Number._typeName='Number';String.prototype.endsWith=function(suffix){return(this.substr(this.length-suffix.length)==suffix);}
String.prototype.startsWith=function(prefix){return(this.substr(0,prefix.length)==prefix);}
String.prototype.lTrim=String.prototype.trimLeft=function(){return this.replace(/^\s*/,"");}
String.prototype.rTrim=String.prototype.trimRight=function(){return this.replace(/\s*$/,"");}
String.prototype.trim=function(){return this.trimRight().trimLeft();}
String.prototype.format=function()
{var s=this;var aRE=String.prototype.format.aRegExp;for(var i=0;i<arguments.length;i++)
{if(!aRE[i])
{aRE[i]=new RegExp("\\{"+i+"\\}","g");}
s=s.replace(aRE[i],arguments[i]);}
return(s);}
String.prototype.format.aRegExp=new Array();String.format=function(format){var result="";for(var i=0;;){var next=format.indexOf("{",i);if(next<0){result+=format.slice(i);break;}
result+=format.slice(i,next);i=next+1;if(format.charAt(i)=='{'){result+='{';i++;continue;}
var next=format.indexOf("}",i);var brace=format.slice(i,next).split(':');var argNumber=Number.parse(brace[0])+1;var arg=arguments[argNumber];if(arg==null){arg='';}
if(arg.toFormattedString)
result+=arg.toFormattedString(brace[1]?brace[1]:'');else
result+=arg.toString();i=next+1;}
return result;}
String.localeFormat=function(format){for(var i=1;i<arguments.length;i++){var arg=arguments[i];if(arg==null){arg='';}
format=format.replace("{"+(i-1)+"}",arg.toLocaleString());}
return format;}
String._typeName='String';Array.prototype.add=Array.prototype.queue=function(item){this.push(item);}
Array.prototype.addRange=function(items){var length=items.length;if(length!=0){for(var index=0;index<length;index++){this.push(items[index]);}}}
Array.prototype.clear=function(){if(this.length>0){this.splice(0,this.length);}}
Array.prototype.clone=function(){var clonedArray=[];var length=this.length;for(var index=0;index<length;index++){clonedArray[index]=this[index];}
return clonedArray;}
Array.prototype.contains=Array.prototype.exists=function(item){var index=this.indexOf(item);return(index>=0);}
Array.prototype.dequeue=function(){return this.shift();}
if(!Array.prototype.indexOf){Array.prototype.indexOf=function(item,startIndex){var length=this.length;if(length!=0){startIndex=startIndex||0;if(startIndex<0){startIndex=Math.max(0,length+startIndex);}
for(var i=startIndex;i<length;i++){if(this[i]==item){return i;}}}
return-1;}}
if(!Array.prototype.forEach)
{Array.prototype.forEach=function(fnCb,objContext){var length=this.length;for(var i=0;i<length;i++){fnCb.call(objContext,this[i],i,this);}}}
Array.prototype.insert=function(index,item){this.splice(index,0,item);}
Array.prototype.remove=function(item){var index=this.indexOf(item);if(index>=0){this.splice(index,1);}
return(index>=0);}
Array.prototype.removeAt=function(index){return this.splice(index,1)[0];}
Array._typeName='Array';Array.parse=function(value){return eval('('+value+')');}
RegExp.parse=function(value){if(value.startsWith('/')){var endSlashIndex=value.lastIndexOf('/');if(endSlashIndex>1){var expression=value.substring(1,endSlashIndex);var flags=value.substr(endSlashIndex+1);return new RegExp(expression,flags);}}
return null;}
RegExp._typeName='RegExp';Date._typeName='Date';Error.createError=function(message,details,innerError){var e=new Error(message);if(details&&details.length){e.details=details;}
if(innerError){e.innerError=innerError;}
return e;}
Error._typeName='Error';Type.registerNamespace("Web");Type.registerNamespace("Sys")
Type.createEnum=function(name){function getValues(){if(!enumeration._values){var values={};for(var f in enumeration){if(typeof(enumeration[f])!='function'){values[f]=enumeration[f];}}
enumeration._values=values;}
return enumeration._values;}
function valueFromString(s){if(s){for(var f in enumeration){if(f.toLowerCase()===s.toLowerCase()){return enumeration[f];}}}
return null;}
function valueToString(value){for(var i in enumeration){if(enumeration[i]===value){return i;}}
throw Error.createError('Invalid Enumeration Value');}
var enumeration={};if(name){eval('enumeration='+name+'={};');}
enumeration.getValues=getValues;enumeration.parse=valueFromString;enumeration.toString=valueToString;enumeration.getName=function(){return name;}
enumeration.isEnum=function(){return true;}
for(var i=1;i<arguments.length;i+=2){enumeration[arguments[i]]=arguments[i+1];}
return enumeration;}
Type.createFlags=function(name){function valueFromString(s){var parts=s.split('|');var value=0;for(var i=parts.length-1;i>=0;i--){var part=parts[i].trim();var found=false;for(var f in flags){if(f==part){value|=flags[f];found=true;break;}}
if(found==false){throw'Invalid Enumeration Value';}}
return value;}
function valueToString(value){var sb=new Sys.StringBuilder();for(var i in flags){if((flags[i]&value)!=0){if(sb.isEmpty()==false){sb.append(' | ');}
sb.append(i);}}
return sb.toString();}
var flags={};if(name){eval('flags='+name+'={};');}
flags.parse=valueFromString;flags.toString=valueToString;flags.getName=function(){return name;}
flags.isFlags=function(){return true;}
for(var i=1;i<arguments.length;i+=2){flags[arguments[i]]=arguments[i+1];}
return flags;}
Web.IArray=Sys.IArray=function(){this.get_length=Function.abstractMethod;this.getItem=Function.abstractMethod;}
Web.IArray.registerInterface("Web.IArray");Sys.IArray.registerInterface("Web.IArray");Array.prototype.get_length=function(){return this.length;}
Array.prototype.getItem=function(index){return this[index];}
Array._interfaces=[];Array._interfaces.push(Sys.IArray);Web.IDisposable=Sys.IDisposable=function(){this.dispose=Function.abstractMethod;}
Web.IDisposable.registerInterface('Web.IDisposable');Sys.IDisposable.registerInterface('Sys.IDisposable');Sys.StringBuilder=Web.StringBuilder=function(initialText){var _parts=new Array();if((typeof(initialText)=='string')&&(initialText.length!=0)){_parts.push(initialText);}
this.append=function(text){if((text==null)||(typeof(text)=='undefined')){return;}
if((typeof(text)=='string')&&(text.length==0)){return;}
_parts.push(text);}
this.appendLine=function(text){this.append(text);_parts.push('\r\n');}
this.clear=function(){_parts.clear();}
this.isEmpty=function(){return(_parts.length==0);}
this.toString=function(delimiter){return _parts.join(delimiter||'');}}
Web.StringBuilder.registerSealedClass('Web.StringBuilder');Sys.StringBuilder.registerSealedClass('Sys.StringBuilder');if(!window.XMLHttpRequest){window.XMLHttpRequest=function(){var progIDs=['Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP','Microsoft.XMLHTTP'];for(var i=0;i<progIDs.length;i++){try{var xmlHttp=new ActiveXObject(progIDs[i]);return xmlHttp;}
catch(ex){}}
return null;}}
if(!window.DOMParser){window.DOMParser=function()
{return new function()
{this.parseFromString=function(xml,mimetype)
{var xmlDocument=null;try
{xmlDocument=new ActiveXObject("Microsoft.XMLDOM");xmlDocument.async=false;xmlDocument.loadXML(xml);}
catch(ex)
{}
return xmlDocument;}}}}