
Type.createNamespace('Windex');Windex.$create_AjaxResponse=function(){return {};}
Windex.VisibilityResult=function(){};Windex.VisibilityResult.prototype = {none:0,visible:1,above:2,below:4,left:8,right:16}
Windex.VisibilityResult.createEnum('Windex.VisibilityResult',true);Windex.Ajax=function(){}
Windex.Ajax.add_countUpdate=function(value){Windex.Ajax.$0=Delegate.combine(Windex.Ajax.$0,value);}
Windex.Ajax.remove_countUpdate=function(value){Windex.Ajax.$0=Delegate.remove(Windex.Ajax.$0,value);}
Windex.Ajax.deserialize=function(s){if(String.isNullOrEmpty(s)){return null;}if(!Windex.Ajax.dateRegex){Windex.Ajax.dateRegex=new RegExp('[\'\"]\\\\\\/Date\\((-?[0-9]+)\\)\\\\\\/[\'\"]','gm');}s=s.replace(Windex.Ajax.dateRegex,'new Date($1)');return eval('('+s+')');}
Windex.Ajax.serialize=function(o){if(isNullOrUndefined(o)){return String.Empty;}var $0=new StringBuilder();Windex.Ajax.$1($0,o);return $0.toString();}
Windex.Ajax.$1=function($p0,$p1){if(isNullOrUndefined($p1)){$p0.append('null');}else{switch(typeof($p1)){case 'boolean':$p0.append($p1.toString());return;case 'number':$p0.append((isFinite($p1))?$p1.toString():'null');return;case 'string':$p0.append(($p1).quote());return;case 'object':if(Array.isInstance($p1)){$p0.append('[');var $3=$p1;var $4=$3.length;var $5=true;for(var $6=0;$6<$4;$6++){if($5){$5=false;}else{$p0.append(',');}Windex.Ajax.$1($p0,$3[$6]);}$p0.append(']');return;}if(Date.isInstance($p1)){var $7=$p1;var $8=Date.UTC($7.getUTCFullYear(),$7.getUTCMonth(),$7.getUTCDate(),$7.getUTCHours(),$7.getUTCMinutes(),$7.getUTCSeconds(),$7.getUTCMilliseconds());$p0.append('\"\\/Date(');$p0.append($8);$p0.append(')\\/\"');return;}if(RegExp.isInstance($p1)){$p0.append($p1.toString());return;}$p0.append('{');var $0=true;var $1=$p1;var $2=null;for (var $2 in $1) { var x;var $9={ key: $2, value: $1[$2] };if($9.key.startsWith('$')||(Function.isInstance($9.value))){continue;}if($0){$0=false;}else{$p0.append(',');}$p0.append($9.key);$p0.append(':');Windex.Ajax.$1($p0,$9.value);};$p0.append('}');return;}$p0.append('null');}}
Windex.Ajax.callAjax=function(path,method,args,context,responseCallback,exceptionCallback){var $0=new Windex.AjaxRequest(path,method,args,context,responseCallback,exceptionCallback);$0.invoke();}
Windex.Ajax.add_ajaxCalling=function(value){Windex.Ajax.$2=Delegate.combine(Windex.Ajax.$2,value);}
Windex.Ajax.remove_ajaxCalling=function(value){Windex.Ajax.$2=Delegate.remove(Windex.Ajax.$2,value);}
Windex.Ajax.$3=function($p0,$p1){if(Windex.Ajax.$2){Windex.Ajax.$2.invoke($p0,$p1);}}
Windex.AjaxCallingEventArgs=function(){Windex.AjaxCallingEventArgs.constructBase(this);}
Windex.AjaxCallingEventArgs.prototype={args:null,path:null,method:null,context:null,headers:null}
Windex.AjaxRequest=function(path,method,args,context,responseCallback,exceptionCallback){this.context=context;this.path=path;this.method=method;this.args=args;this.responseCallback=responseCallback;this.exceptionCallback=exceptionCallback;}
Windex.AjaxRequest.prototype={request:null,responseCallback:null,exceptionCallback:null,context:null,path:null,method:null,args:null,invoke:function(){var $0=new Windex.AjaxCallingEventArgs();$0.args=this.args;$0.context=this.context;$0.method=this.method;$0.path=this.path;$0.headers={};Windex.Ajax.$3(this,$0);var $1;$1=Windex.Ajax.serialize($0.args);this.request=new XMLHttpRequest();this.request.onreadystatechange=Delegate.create(this,this.callback);if(!$0.path.endsWith('/')){$0.path+='/';}this.request.open('POST',$0.path+$0.method);this.request.setRequestHeader('Content-Type','application/json');var $dict1=$0.headers;for(var $key2 in $dict1){var $2={key:$key2,value:$dict1[$key2]};try{this.request.setRequestHeader($2.key,$2.value);}catch($3){}}this.request.send($1);},callback:function(){if(this.request.readyState===4){this.request.onreadystatechange=Delegate.Null;var $0=this.request.responseText;var $1=null;var $2=null;var $3=null;if(this.request.status===200){try{$3=Windex.Ajax.deserialize($0);if(!isUndefined($3.d)){$1=$3.d;}else{$2=$3;}}catch($4){$2=new Windex.AjaxException();$2.Message=$4.message;}}else{$2=Windex.Ajax.deserialize($0);if(isNullOrUndefined($2.Message)){if(this.request.status.toString()==='500'){$2=new Windex.AjaxException();$2.ExceptionType=this.request.statusText;var $5=Windex.Util.getInner($0,'<!--','-->',0);$2.ExceptionType=Windex.Util.getInner($5,'[',']',0);$2.Message=Windex.Util.getInner($5,':','   at ',0);$2.StackTrace=Windex.Util.getInner($5+'</>',$2.Message,'</>',0);$2.Message=$2.Message.trim();}else{$2=new Windex.AjaxException();$2.ExceptionType='HttpRequestException';$2.Message=this.request.statusText;}}}if($2){this.exceptionCallback.invoke($2,this.context);}else{this.responseCallback.invoke($1,this.context);}}}}
Windex.AjaxException=function(){}
Windex.AjaxException.prototype={Message:null,StackTrace:null,ExceptionType:null}
Windex.Util=function(){}
Windex.Util.createButton=function(){var $0=document.createElement('Button');return new ScriptFX.UI.Button($0);}
Windex.Util.createInputButton=function(){var $0=document.createElement('Input');$0.type='Button';return new ScriptFX.UI.Button($0);}
Windex.Util.createCheckBox=function(){var $0=document.createElement('Input');$0.type='CheckBox';return new ScriptFX.UI.CheckBox($0);}
Windex.Util.createTextBox=function(){var $0=document.createElement('Input');$0.type='Text';return new ScriptFX.UI.TextBox($0);}
Windex.Util.createLabel=function(){var $0=document.createElement('Label');return new ScriptFX.UI.Label($0);}
Windex.Util.getRandomId=function(){Windex.Util.randIdCount++;return 'kslrndid'+Windex.Util.randIdCount.toString();}
Windex.Util.createRadioButton=function(name){var $0;try{$0=document.createElement('<input type=\"radio\" name=\"'+name+'\" />');}catch($1){$0=document.createElement('input');$0.setAttribute('type','radio');$0.setAttribute('name',name);}return new ScriptFX.UI.CheckBox($0);}
Windex.Util.setField=function(o,field,val){(o)[field]=val;}
Windex.Util.getField=function(o,field){return (o)[field];}
Windex.Util.getInner=function(Text,LeftSide,RightSide,Start){var $0;var $1;var $2;var $3;$1=Text.indexOf(LeftSide,Start);if($1>0){$2=$1+LeftSide.length;if($2>=Text.length){Start=0;$0='';return $0;}$3=Text.indexOf(RightSide,$2);if($3){Start=$3;$0=Text.substr($2-1,$3-$2);return $0;}else{Start=0;$0='';return $0;}}else{Start=0;$0='';return $0;}}
Windex.Util.resizeSelect=function(select){select.style.width='1px';select.style.width='';}
Windex.Util.htmlEncode=function(text){if(!Windex.Util.encoder){Windex.Util.encoder=document.createElement('span');}Windex.Util.encoder.innerText=text;return Windex.Util.encoder.innerHTML;}
Windex.Util.htmlDecode=function(text){if(!Windex.Util.encoder){Windex.Util.encoder=document.createElement('span');}Windex.Util.encoder.innerHTML=text;return Windex.Util.encoder.innerText;}
Windex.Util.clearChildren=function(element){while(element.firstChild){element.removeChild(element.firstChild);}}
Windex.Util.createTable=function(){var $0=document.createElement('table');Windex.Util.set($0,'cellPadding',0);Windex.Util.set($0,'cellSpacing',0);$0.style.padding='0 0 0 0';$0.style.margin='0 0 0 0';return $0;}
Windex.Util.set=function(o,key,val){o[key] = val;}
Windex.Util.get=function(o,key){return (o)[key];}
Windex.Util.add=function(a,o){a.add(o);}
Windex.Util.removeAt=function(a,index){a.removeAt(index);}
Windex.Util.squeeze=function(DOMElement,p){DOMElement.style.margin='0 0 0 0';DOMElement.style.padding='0 0 0 0';if(p){DOMElement.style.position='absolute';DOMElement.style.top='0px';DOMElement.style.left='0px';}}
Windex.Util.getSelectedOptions=function(lstArticles){var $0=new Array(0);for(var $1=0;$1<lstArticles.options.length;$1++){if((lstArticles.options[$1]).selected){Windex.Util.add($0,lstArticles.options[$1]);}}return $0;}
Windex.Util.getPoint=function(element){var $0=new Windex.Point(0,0);if(element.offsetParent){$0.x=element.offsetLeft;$0.y=element.offsetTop;var $1=element.offsetParent;while($1){$0.x+=$1.offsetLeft;$0.y+=$1.offsetTop;var $2=$1.tagName.toLowerCase();if($2!=='table'&&$2!=='body'&&$2!=='html'&&$2!=='div'&&$1.clientTop&&$1.clientLeft){$0.x+=$1.clientLeft;$0.y+=$1.clientTop;}$1=$1.offsetParent;}}return $0;}
Windex.Util.isVisible=function(e){var $0=e.parentNode;if($0.scrollTop>e.offsetTop|$0.scrollTop+$0.offsetHeight<e.offsetTop+e.offsetHeight){return false;}return true;}
Windex.Util.testVisibility=function(e,p){var $0=p||e.offsetParent;var $1=0;if($0.scrollTop>e.offsetTop){$1|=2;}else if($0.scrollTop+$0.offsetHeight<e.offsetTop+e.offsetHeight){$1|=4;}if($0.scrollLeft>e.offsetLeft){$1|=8;}else if($0.scrollLeft+$0.offsetWidth<e.offsetLeft+e.offsetWidth){$1|=16;}if(!$1){return 1;}else{return $1;}}
Windex.Util.unselectable=function(e){e.setAttribute('Unselectable',true);var $0=e.children;try{for(var $1=0;$1<$0.length;$1++){Windex.Util.unselectable($0[$1]);}}catch($2){}}
Windex.Util.get_$1=function(){if(!Windex.Util.$0){Windex.Util.$0=document.createElement('A');}return Windex.Util.$0;}
Windex.Util.findWidth=function(e){if(e.offsetWidth>0){return e.offsetWidth;}var $0=true;if(!e.parentNode){$0=false;}if($0){e.parentNode.replaceChild(Windex.Util.get_$1(),e);}document.body.appendChild(e);var $1=e.offsetWidth;if($0){Windex.Util.get_$1().parentNode.replaceChild(e,Windex.Util.get_$1());}else{document.body.removeChild(e);}return $1;}
Windex.Util.findHeight=function(e){if(e.offsetHeight>0){return e.offsetHeight;}var $0=true;if(!e.parentNode){$0=false;}if($0){e.parentNode.replaceChild(Windex.Util.get_$1(),e);}document.body.appendChild(e);var $1=e.offsetHeight;if($0){Windex.Util.get_$1().parentNode.replaceChild(e,Windex.Util.get_$1());}else{document.body.removeChild(e);}return $1;}
Windex.Util.swapNode=function(item1,item2){var $0=Windex.Util.get_$1();var $1=item1.parentNode;var $2=item2.parentNode;if(!$1&$2){$2.replaceChild(item1,item2);}else if($1&!$2){$1.replaceChild(item2,item1);}else if(!$1&!$2){}else{$1.replaceChild($0,item1);$2.replaceChild(item1,item2);$1.replaceChild(item2,$0);}}
Windex.Util.blank=function(width,height){var $0=document.createElement('img');$0.src='/images/blank.gif';$0.style.width=width+'px';$0.style.height=height+'px';return $0;}
Windex.Util.createHidden=function(name){var $0;try{$0=document.createElement('<input type=\"hidden\" name=\"'+name+'\" />');}catch($1){$0=document.createElement('input');$0.setAttribute('type','hidden');$0.setAttribute('name',name);}return $0;}
Windex.Util.createOption=function(text,value){var $0=document.createElement('option');$0.innerText=text;$0.value=value;return $0;}
Windex.Point=function(x,y){this.x=x;this.y=y;}
Windex.Point.prototype={x:0,y:0}
Windex.CenterFloat=function(table){Windex.CenterFloat.constructBase(this,[table,'CenterFloat']);this.cell=table.insertRow(-1).insertCell(-1);this.cell.style.verticalAlign='middle';this.cell.style.textAlign='center';table.style.display='inline';}
Windex.CenterFloat.create=function(){var $0=document.createElement('table');return new Windex.CenterFloat($0);}
Windex.CenterFloat.prototype={cell:null}
Type.createNamespace('Windex.HTML');Windex.HTML.CSS=function(){}
Windex.HTML.CSS.get_styleSheets=function(){return eval('document.styleSheets');}
Windex.HTML.CSS.createStyleSheet=function(){var $0=document.createElement('style');$0.type='text/css';$0.rel='stylesheet';$0.title='dynamicSheet';document.getElementsByTagName('head')[0].appendChild($0);return Windex.HTML.CSS.get_styleSheets()[Windex.HTML.CSS.get_styleSheets().length-1];}
Type.createNamespace('Kenwood.Kenworld');Kenwood.Kenworld.GT=function(id,text){this.ID=id;this.Text=text;}
Kenwood.Kenworld.GT.fromString=function(input){var $0=0;var $1=null;var $2=input.indexOf(':');if($2===-1){$0=0;$1=null;}else{try{$0=ScriptLib.Convert.toInt32(input.substring(0,$2));$1=input.substr($2+1);}catch($3){throw new Error('Input not in correct format: '+input);}}return new Kenwood.Kenworld.GT($0,$1);}
Kenwood.Kenworld.GT.prototype={Text:null,ID:0,toString:function(){return this.ID.toString()+':'+(this.Text||'');}}
Type.createNamespace('ScriptLib');ScriptLib.Convert=function(){}
ScriptLib.Convert.toInt16=function(o){return Object.parse(o);}
ScriptLib.Convert.toInt32=function(o){return Object.parse(o);}
ScriptLib.Convert.toInt64=function(o){return Object.parse(o);}
ScriptLib.Convert.toDouble=function(o){return Object.parse(o);}
ScriptLib.Convert.toSingle=function(o){return Object.parse(o);}
ScriptLib.Convert.toString=function(o){if(!o){return '';}return o.toString();}
ScriptLib.NameObjectEntry=function(name,value){this.Key=name;this.Value=value;}
ScriptLib.NameObjectEntry.prototype={Key:null,Value:null}
ScriptLib.NameValueCollection=function(){this.$0=new Array(0);}
ScriptLib.NameValueCollection.getDictionary=function(collection){var $0=collection;var $1={};for(var $2=0;$2<$0.length;$2++){$1[$0[$2].Key]=$0[$2].Value;}return $1;}
ScriptLib.NameValueCollection.fromCSS=function(text){var $0=new ScriptLib.NameValueCollection();var $1=text.split(';');for(var $2=0;$2<$1.length;$2++){var $3=$1[$2].trim();if($3.indexOf(':')===-1){$0.set_item($3,null);}else{var $4=$3.split(':',2);$0.set_item($4[0].trim(),$4[1].trim());}}return $0;}
ScriptLib.NameValueCollection.fromJSON=function(json){var $0=new ScriptLib.NameValueCollection();$0.$0=json;return $0;}
ScriptLib.NameValueCollection.prototype={$0:null,get_count:function(){return this.$0.length;},clear:function(){this.$0=new Array(0);},containsKey:function(key){if(this.$2(key)===-1){return false;}else{return true;}},add:function(key,value){if(this.containsKey(key)){throw new Error('Key already exists in the collection.');}Windex.Util.add(this.$0,new ScriptLib.NameObjectEntry(key,value));},remove:function(key){var $0=this.$2(key);if($0===-1){return false;}Windex.Util.removeAt(this.$0,$0);return true;},$1:function($p0){var $0=this.$2($p0);if($0===-1){return null;}return this.$0[$0];},$2:function($p0){for(var $0=0;$0<this.$0.length;$0++){if(this.$0[$0].Key===$p0){return $0;}}return -1;},getKeys:function(){var $0=new Array(0);for(var $1=0;$1<this.$0.length;$1++){Windex.Util.add($0,this.$0[$1].Key);}return $0;},get_item:function(key){var $0=this.$1(key);if(!$0){throw new Error('The item does not exist in the collection.');}return $0.Value;},set_item:function(key,value){var $0=this.$1(key);if(!$0){this.$0[this.$0.length]=new ScriptLib.NameObjectEntry(key,value);}else{$0.Value=value;}return value;}}
Type.createNamespace('Interop');Interop.CompareMethod=function(){};Interop.CompareMethod.prototype = {binary:0,text:1}
Interop.CompareMethod.createEnum('Interop.CompareMethod',false);Interop.MsgBoxStyle=function(){};Interop.MsgBoxStyle.prototype = {abortRetryIgnore:2,applicationModal:0,critical:16,defaultButton1:0,defaultButton2:256,defaultButton3:512,exclamation:48,information:64,msgBoxHelp:16384,msgBoxRight:524288,msgBoxRtlReading:1048576,msgBoxSetForeground:65536,okCancel:1,okOnly:0,question:32,retryCancel:5,systemModal:4096,yesNo:4,yesNoCancel:3}
Interop.MsgBoxStyle.createEnum('Interop.MsgBoxStyle',true);Interop.MsgBoxResult=function(){};Interop.MsgBoxResult.prototype = {abort:3,cancel:2,ignore:5,no:7,ok:1,retry:4,yes:6}
Interop.MsgBoxResult.createEnum('Interop.MsgBoxResult',false);Interop.DateFormat=function(){};Interop.DateFormat.prototype = {generalDate:0,longDate:1,shortDate:2,longTime:3,shortTime:4}
Interop.DateFormat.createEnum('Interop.DateFormat',false);Windex.Ajax.createClass('Windex.Ajax');Windex.AjaxCallingEventArgs.createClass('Windex.AjaxCallingEventArgs',EventArgs);Windex.AjaxRequest.createClass('Windex.AjaxRequest');Windex.AjaxException.createClass('Windex.AjaxException');Windex.Util.createClass('Windex.Util');Windex.Point.createClass('Windex.Point');Windex.CenterFloat.createClass('Windex.CenterFloat',ScriptFX.UI.Behavior);Windex.HTML.CSS.createClass('Windex.HTML.CSS');Kenwood.Kenworld.GT.createClass('Kenwood.Kenworld.GT');ScriptLib.Convert.createClass('ScriptLib.Convert');ScriptLib.NameObjectEntry.createClass('ScriptLib.NameObjectEntry');ScriptLib.NameValueCollection.createClass('ScriptLib.NameValueCollection');Windex.Ajax.$0=null;Windex.Ajax.dateRegex=null;Windex.Ajax.$2=null;Windex.Util.disabledColor='#808080';Windex.Util.randIdCount=0;Windex.Util.encoder=null;Windex.Util.$0=null;
// ---- Do not remove this footer ----
// Generated using Script# v0.5.1.0 (http://projects.nikhilk.net)
// -----------------------------------
