﻿Function.__typeName='Function';Function.createCallback=function(method,context){return function(){var l=arguments.length;if(l>0){var args=[];for(var i=0;i<l;i++){args[i]=arguments[i];}
args[l]=context;return method.apply(this,args);}
return method.call(this,context);}
}
Function.createDelegate=function(instance,method){return function(){return method.apply(instance,arguments);}
}
Function.emptyFunction=Function.emptyMethod=function(){}
Error.__typeName='Error';Error.create=function(message,errorInfo){var e=new Error(message);e.message=message;if(errorInfo){for(var v in errorInfo){e[v]=errorInfo[v];}
}
e.popStackFrame();return e;}
Error.argument=function(paramName,message){var displayMessage="Sys.ArgumentException: "+(message?message:Sys.RuntimeRes.argument);if(paramName){displayMessage+="\n"+String.format(Sys.RuntimeRes.paramName,paramName);}
var e=Error.create(displayMessage,{name:"Sys.ArgumentException",paramName:paramName});e.popStackFrame();return e;}
Error.argumentNull=function(paramName,message){var displayMessage="Sys.ArgumentNullException: "+(message?message:Sys.RuntimeRes.argumentNull);if(paramName){displayMessage+="\n"+String.format(Sys.RuntimeRes.paramName,paramName);}
var e=Error.create(displayMessage,{name:"Sys.ArgumentNullException",paramName:paramName});e.popStackFrame();return e;}
Error.argumentOutOfRange=function(paramName,actualValue,message){var displayMessage="Sys.ArgumentOutOfRangeException: "+(message?message:Sys.RuntimeRes.argumentOutOfRange);if(paramName){displayMessage+="\n"+String.format(Sys.RuntimeRes.paramName,paramName);}
if(typeof(actualValue)!=="undefined"&&actualValue!==null){displayMessage+="\n"+String.format(Sys.RuntimeRes.actualValue,actualValue);}
var e=Error.create(displayMessage,{name:"Sys.ArgumentOutOfRangeException",paramName:paramName,actualValue:actualValue
});e.popStackFrame();return e;}
Error.argumentType=function(paramName,actualType,expectedType,message){var displayMessage="Sys.ArgumentTypeException: ";if(message){displayMessage+=message;}
else if(actualType&&expectedType){displayMessage+=String.format(Sys.RuntimeRes.argumentTypeWithTypes,actualType.getName(),expectedType.getName());}
else{displayMessage+=Sys.RuntimeRes.argumentType;}
if(paramName){displayMessage+="\n"+String.format(Sys.RuntimeRes.paramName,paramName);}
var e=Error.create(displayMessage,{name:"Sys.ArgumentTypeException",paramName:paramName,actualType:actualType,expectedType:expectedType
});e.popStackFrame();return e;}
Error.argumentUndefined=function(paramName,message){var displayMessage="Sys.ArgumentUndefinedException: "+(message?message:Sys.RuntimeRes.argumentUndefined);if(paramName){displayMessage+="\n"+String.format(Sys.RuntimeRes.paramName,paramName);}
var e=Error.create(displayMessage,{name:"Sys.ArgumentUndefinedException",paramName:paramName});e.popStackFrame();return e;}
Error.invalidOperation=function(message){var displayMessage="Sys.InvalidOperationException: "+(message?message:Sys.RuntimeRes.invalidOperation);var e=Error.create(displayMessage,{name:'Sys.InvalidOperationException'});e.popStackFrame();return e;}
Error.notImplemented=function(message){var displayMessage="Sys.NotImplementedException: "+(message?message:Sys.RuntimeRes.notImplemented);var e=Error.create(displayMessage,{name:'Sys.NotImplementedException'});e.popStackFrame();return e;}
Error.parameterCount=function(message){var displayMessage="Sys.ParameterCountException: "+(message?message:Sys.RuntimeRes.parameterCount);var e=Error.create(displayMessage,{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 stackFrames=this.stack.split("\n");var currentFrame=stackFrames[0];var pattern=this.fileName+":"+this.lineNumber;while(typeof(currentFrame)!=="undefined"&&currentFrame!==null&&currentFrame.indexOf(pattern)===-1){stackFrames.shift();currentFrame=stackFrames[0];}
var nextFrame=stackFrames[1];if(typeof(nextFrame)==="undefined"||nextFrame===null){return;}
var nextFrameParts=nextFrame.match(/@(.*):(\d+)$/);if(typeof(nextFrameParts)==="undefined"||nextFrameParts===null){return;}
this.fileName=nextFrameParts[1];this.lineNumber=parseInt(nextFrameParts[2]);stackFrames.shift();this.stack=stackFrames.join("\n");}
if(!window)this.window=this;window.Type=Function;window.__rootNamespaces=[];Type.prototype.callBaseMethod=function(instance,name,baseArguments){var baseMethod=this.getBaseMethod(instance,name);if(!baseArguments){return baseMethod.apply(instance);}
else{return baseMethod.apply(instance,baseArguments);}
}
Type.prototype.getBaseMethod=function(instance,name){var baseType=this.getBaseType();if(baseType){var baseMethod=baseType.prototype[name];return(baseMethod instanceof Function)?baseMethod:null;}
return null;}
Type.prototype.getBaseType=function(){return(typeof(this.__baseType)==="undefined")?null:this.__baseType;}
Type.prototype.getInterfaces=function(){var result=[];var type=this;while(type){var interfaces=type.__interfaces;if(interfaces){for(var i=0,l=interfaces.length;i<l;i++){var interfaceType=interfaces[i];if(!result.contains(interfaceType)){result[result.length]=interfaceType;}
}
}
type=type.__baseType;}
return result;}
Type.prototype.getName=function(){return(typeof(this.__typeName)==="undefined")?"":this.__typeName;}
Type.prototype.implementsInterface=function(interfaceType){this.resolveInheritance();var interfaceName=interfaceType.getName();var cache=this.__interfaceCache;if(cache){var cacheEntry=cache[interfaceName];if(typeof(cacheEntry)!=='undefined')return cacheEntry;}
else{cache=this.__interfaceCache={};}
var baseType=this;while(baseType){var interfaces=baseType.__interfaces;if(interfaces){if(interfaces.contains(interfaceType)){return cache[interfaceName]=true;}
}
baseType=baseType.__baseType;}
return cache[interfaceName]=false;}
Type.prototype.inheritsFrom=function(parentType){this.resolveInheritance();var baseType=this.__baseType;while(baseType){if(baseType===parentType){return true;}
baseType=baseType.__baseType;}
return false;}
Type.prototype.initializeBase=function(instance,baseArguments){this.resolveInheritance();if(this.__baseType){if(!baseArguments){this.__baseType.apply(instance);}
else{this.__baseType.apply(instance,baseArguments);}
}
return instance;}
Type.prototype.isImplementedBy=function(instance){if(typeof(instance)==="undefined"||instance===null)return false;var instanceType=Object.getType(instance);return!!(instanceType.implementsInterface&&instanceType.implementsInterface(this));}
Type.prototype.isInstanceOfType=function(instance){if(typeof(instance)==="undefined"||instance===null)return false;if(instance instanceof this)return true;var instanceType=Object.getType(instance);return!!(instanceType===this)||(instanceType.inheritsFrom&&instanceType.inheritsFrom(this))||(instanceType.implementsInterface&&instanceType.implementsInterface(this));}
Type.prototype.registerClass=function(typeName,baseType,interfaceTypes){this.prototype.constructor=this;this.__typeName=typeName;this.__class=true;if(baseType){this.__baseType=baseType;this.__basePrototypePending=true;}
if(!window.__classes)window.__classes={};window.__classes[typeName.toUpperCase()]=this;if(interfaceTypes){this.__interfaces=[];for(var i=2;i<arguments.length;i++){var interfaceType=arguments[i];this.__interfaces.push(interfaceType);}
}
return this;}
Type.prototype.registerInterface=function(typeName){this.prototype.constructor=this;this.__typeName=typeName;this.__interface=true;return this;}
Type.prototype.resolveInheritance=function(){if(this.__basePrototypePending){var baseType=this.__baseType;baseType.resolveInheritance();for(var memberName in baseType.prototype){var memberValue=baseType.prototype[memberName];if(!this.prototype[memberName]){this.prototype[memberName]=memberValue;}
}
delete this.__basePrototypePending;}
}
Type.createInstance=function(type){if(typeof(type)!=='function'){type=Type.parse(type);}
return new type();}
Type.getRootNamespaces=function(){return window.__rootNamespaces.clone();}
Type.isClass=function(type){if((typeof(type)==='undefined')||(type===null))return false;return!!type.__class;}
Type.isInterface=function(type){if((typeof(type)==='undefined')||(type===null))return false;return!!type.__interface;}
Type.isNamespace=function(object){if((typeof(object)==='undefined')||(object===null))return false;return!!object.__namespace;}
Type.parse=function(typeName,ns){var fn;if(ns){if(!window.__classes)return null;fn=window.__classes[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;}
var registerNamespace=Type.registerNamespace=function(namespacePath){var rootObject=window;var namespaceParts=namespacePath.split('.');for(var i=0;i<namespaceParts.length;i++){var currentPart=namespaceParts[i];var ns=rootObject[currentPart];if(!ns){ns=rootObject[currentPart]={};if(i===0){window.__rootNamespaces[window.__rootNamespaces.length]=ns;}
ns.__namespace=true;ns.__typeName=namespaceParts.slice(0,i+1).join('.');ns.getName=function(){return this.__typeName;}
}
rootObject=ns;}
}
Object.__typeName='Object';Object.getType=function(instance){var ctor=instance.constructor;if(!ctor||(typeof(ctor)!=="function")||!ctor.__typeName||(ctor.__typeName==='Object')){if(Sys&&Sys.UI&&Sys.UI.DomElement&&Sys.UI.DomElement.isInstanceOfType(instance)){return Sys.UI.DomElement;}
return Object;}
return ctor;}
Object.getTypeName=function(instance){return Object.getType(instance).getName();}
Boolean.__typeName='Boolean';Boolean.parse=function(value){var v=value.trim().toLowerCase();if(v==='false')return false;if(v==='true')return true;}
Date.__typeName='Date';Number.__typeName='Number';Number.parse=function(value){return parseFloat(value);}
RegExp.__typeName='RegExp';Array.__typeName='Array';Array.prototype.add=Array.prototype.queue=function(item){this[this.length]=item;}
Array.prototype.addRange=function(items){this.push.apply(this,items);}
Array.prototype.clear=function(){this.length=0;}
Array.prototype.clone=function(){if(this.length===1){return[this[0]];}
else{return Array.apply(null,this);}
}
Array.prototype.contains=Array.prototype.exists=function(item){return(this.indexOf(item)>=0);}
Array.prototype.dequeue=Array.prototype.shift;if(!Array.prototype.forEach){Array.prototype.forEach=function(method,instance){var length=this.length;for(var i=0;i<length;i++){var elt=this[i];if(typeof(elt)!=='undefined')method.call(instance,elt,i,this);}
}
}
if(!Array.prototype.indexOf){Array.prototype.indexOf=function(item,start){if(typeof(item)==="undefined")return-1;var length=this.length;if(length!==0){start=start-0;if(isNaN(start)){start=0;}
else{if(isFinite(start)){start=start-(start%1);}
if(start<0){start=Math.max(0,length+start);}
}
for(var i=start;i<length;i++){if(this[i]===item){return i;}
}
}
return-1;}
}
Array.prototype.insert=function(index,item){this.splice(index,0,item);}
Array.parse=function(value){if(!value)return[];return eval(value);}
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){this.splice(index,1);}
String.__typeName='String';String.prototype.endsWith=function(suffix){return(this.substr(this.length-suffix.length)===suffix);}
String.format=function(format,args){var result='';for(var i=0;;){var open=format.indexOf('{',i);var close=format.indexOf('}',i);if((open<0)&&(close<0)){result+=format.slice(i);break;}
if((close>0)&&((close<open)||(open<0))){result+=format.slice(i,close+1);i=close+2;continue;}
result+=format.slice(i,open);i=open+1;if(format.charAt(i)==='{'){result+='{';i++;continue;}
if(close<0)break;var brace=format.slice(i,close).split(':');var argNumber=parseInt(brace[0])+1;var arg=arguments[argNumber];if(typeof(arg)==="undefined"||arg===null){arg='';}
if(arg.toFormattedString)result+=arg.toFormattedString(brace[1]?brace[1]:'');else
result+=arg.toString();i=close+1;}
return result;}
String.prototype.startsWith=function(prefix){return(this.substr(0,prefix.length)===prefix);}
String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,'');}
String.prototype.trimEnd=String.prototype.rTrim=function(){return this.replace(/\s+$/,'');}
String.prototype.trimStart=String.prototype.lTrim=function(){return this.replace(/^\s+/,'');}
Type.registerNamespace('Sys');Sys.RuntimeRes={actualValue:'Actual value was {0}.',argument:'Value does not fall within the expected range.',argumentNull:'Value cannot be null.',argumentOutOfRange:'Specified argument was out of the range of valid values.',argumentType:"Object cannot be converted to the required type.",argumentTypeWithTypes:"Object of type '{0}' cannot be converted to type '{1}'.",argumentUndefined:'Value cannot be undefined.',invalidOperation:'Operation is not valid due to the current state of the object.',notImplemented:'The method or operation is not implemented.',parameterCount:'Parameter count mismatch.',paramName:'Parameter name: {0}'}
Sys.IDisposable=function(){}
Sys.IDisposable.prototype={}
Sys.IDisposable.registerInterface('Sys.IDisposable');Sys.StringBuilder=function(initialText){this._parts=[];this.append(initialText)}
Sys.StringBuilder.prototype={append:function(text){if(typeof(text)!=="undefined"&&text!==null){this._parts.push(text);}
},appendLine:function(text){this.append(text);this.append('\r\n');},clear:function(){this._parts=[];},isEmpty:function(){return(this._parts.length===0);},toString:function(separator){return this._parts.join(separator||'');}
}
Sys.StringBuilder.registerClass('Sys.StringBuilder');if(!window.XMLHttpRequest){window.XMLHttpRequest=function(){var progIDs=['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;}
}
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.Res={assertFailed:'Assertion Failed: {0}',assertFailedCaller:'Assertion Failed: {0}\r\nat {1}',breakIntoDebugger:'{0}\r\n\r\nBreak into debugger?',enumInvalidValue:"'{0}' is not a valid value for enum {1}.",eventHandlerInvalid:'Handler was not added through the Sys.UI.DomEvent.addHandler method.',badBaseUrl1:'Base URL does not contain ://.',badBaseUrl2:'Base URL does not contain another /.',badBaseUrl3:'Cannot find last / in base URL.',cannotAbortBeforeStart:'Cannot abort when executor has not started.',cannotCallBeforeResponse:'Cannot call {0} when responseAvailable is false.',cannotCallOnceStarted:'Cannot call {0} once started.',cannotCallOutsideHandler:'Cannot call {0} outside of a completed event handler.',cannotDeserializeEmptyString:'Cannot deserialize empty string.',cannotSerializeNonFiniteNumbers:'Cannot serialize non finite numbers.',controlCantSetId:"The id property can't be set on a control.",invalidExecutorType:'Could not create a valid Sys.Net.WebRequestExecutor from: {0}.',invalidHttpVerb:'httpVerb cannot be set to an empty or null string.',invalidTimeout:'Value must be greater than or equal to zero.',invokeCalledTwice:'Cannot call invoke more than once.',nullWebRequest:'Cannot call executeRequest with a null webRequest.',setExecutorAfterActive:'Cannot set executor after it has become active.',webServiceFailed:"The server method '{0}' failed with the following error: {1}",webServiceFailedNoMsg:"The server method '{0}' failed.",webServiceTimedOut:"The server method '{0}' timed out.",invalidServiceUrl:'Cannot be set to an empty or null string.'}
Sys._Debug=function(){}
Sys._Debug.prototype={assert:function(condition,message,displayCaller){if(!condition){message=(displayCaller&&this.assert.caller)?String.format(Sys.Res.assertFailedCaller,message,this.assert.caller):String.format(Sys.Res.assertFailed,message);if(confirm(String.format(Sys.Res.breakIntoDebugger,message))){this.fail(message);}
}
},fail:function(message){if(Debug&&Debug.writeln)Debug.writeln(message);if(Sys.Browser.hasDebuggerStatement){eval('debugger');}
}
}
Sys._Debug.registerClass('Sys._Debug');window.debug=new Sys._Debug();window.debug.isDebug=false;function Sys$Enum$parse(value){var values=this.prototype;if(!this.__flags){var val=values[value.trim()];if(typeof(val)!=='number')throw Error.argument('value',String.format(Sys.Res.enumInvalidValue,value,this.__typeName));return val;}
else{var parts=value.split(',');var v=0;for(var i=parts.length-1;i>=0;i--){var part=parts[i].trim();var val=values[part];if(typeof(val)!=='number')throw Error.argument('value',String.format(Sys.Res.enumInvalidValue,part,this.__typeName));v|=val;}
return v;}
}
function Sys$Enum$toString(value){if((typeof(value)==='undefined')||(value===null))return this.__string;var values=this.prototype;var i;if(!this.__flags||(value===0)){for(i in values){if(values[i]===value){return i;}
}
}
else{var sorted=this.__sortedValues;if(!sorted){sorted=[];for(i in values){sorted[sorted.length]={key:i,value:values[i]};}
sorted.sort(function(a,b){return a.value-b.value;});this.__sortedValues=sorted;}
var parts=[];var v=value;for(i=sorted.length-1;i>=0;i--){var kvp=sorted[i];var vali=kvp.value;if(vali===0)continue;if((vali&value)===vali){parts.add(kvp.key);v-=vali;if(v===0)break;}
}
if(parts.length&&v===0)return parts.reverse().join(', ');}
return'';}
Type.prototype.registerEnum=function(name,flags){for(var i in this.prototype){this[i]=this.prototype[i];}
this.__typeName=name;this.parse=Sys$Enum$parse;this.__string=this.toString();this.toString=Sys$Enum$toString;this.__flags=flags;this.__enum=true;}
Type.isEnum=function(type){if((typeof(type)==='undefined')||(type===null))return false;return!!type.__enum;}
Type.isFlags=function(type){if((typeof(type)==='undefined')||(type===null))return false;return!!type.__flags;}
Sys.EventHandlerList=function(){this._list={};}
Sys.EventHandlerList.prototype={addHandler:function(id,handler){this._getEvent(id,true).add(handler);},removeHandler:function(id,handler){var evt=this._getEvent(id);if(!evt)return;evt.remove(handler);},getHandler:function(id){var evt=this._getEvent(id);if(!evt||(evt.length===0))return null;evt=evt.clone();if(!evt._handler){evt._handler=function(source,args){for(var i=0,l=evt.length;i<l;i++){evt[i](source,args);}
};}
return evt._handler;},_getEvent:function(id,create){if(!this._list[id]){if(!create)return null;this._list[id]=[];}
return this._list[id];}
}
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(value){this._cancel=value;}
}
Sys.CancelEventArgs.registerClass('Sys.CancelEventArgs',Sys.EventArgs);Sys.INotifyPropertyChange=function(){}
Sys.INotifyPropertyChange.prototype={}
Sys.INotifyPropertyChange.registerInterface('Sys.INotifyPropertyChange');Sys.PropertyChangedEventArgs=function(propertyName){Sys.PropertyChangedEventArgs.initializeBase(this);this._propertyName=propertyName;}
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,_idSet:false,_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(value){this._id=value;this._idSet=true;},get_isInitialized:function(){return this._initialized;},get_isUpdating:function(){return this._updating;},add_disposing:function(handler){this.get_events().addHandler("disposing",handler);},remove_disposing:function(handler){this.get_events().removeHandler("disposing",handler);},add_propertyChanged:function(handler){this.get_events().addHandler("propertyChanged",handler);},remove_propertyChanged:function(handler){this.get_events().removeHandler("propertyChanged",handler);},beginUpdate:function(){this._updating=true;},dispose:function(){if(this._events){var handler=this._events.getHandler("disposing");if(handler){handler(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(propertyName){if(!this._events)return;var handler=this._events.getHandler("propertyChanged");if(handler){handler(this,new Sys.PropertyChangedEventArgs(propertyName));}
},updated:function(){}
}
Sys.Component.registerClass('Sys.Component',null,Sys.IDisposable,Sys.INotifyPropertyChange,Sys.INotifyDisposing);function Sys$Component$_setProperties(target,properties){var current;var targetType=Object.getType(target);var isObject=(targetType===Object)||(targetType===Sys.UI.DomElement);var isComponent=Sys.Component.isInstanceOfType(target)&&!target.get_isUpdating();if(isComponent)target.beginUpdate();for(var name in properties){var val=properties[name];var getter=isObject?null:target["get_"+name];if(isObject||typeof(getter)!=='function'){var targetVal=target[name];if((typeof(val)!=='object')||(isObject&&(typeof(targetVal)==='undefined'))){target[name]=val;}
else{Sys$Component$_setProperties(targetVal,val);}
}
else{var setter=target["set_"+name];if(typeof(setter)==='function'){setter.apply(target,[val]);}
else if(val instanceof Array){current=getter.apply(target);for(var i=0,j=current.length,l=val.length;i<l;i++,j++){current[j]=val[i];}
}
else if((typeof(val)==='object')&&(Object.getType(val)===Object)){current=getter.apply(target);Sys$Component$_setProperties(current,val);}
}
}
if(isComponent)target.endUpdate();}
function Sys$Component$_setReferences(component,references){for(var name in references){var setter=component["set_"+name];var reference=$find(references[name]);setter.apply(component,[reference]);}
}
var $create=Sys.Component.create=function(type,properties,events,references,element){var component=(element?new type(element):new type());var app=Sys.Application;var creatingComponents=app.get_isCreatingComponents();component.beginUpdate();if(properties){Sys$Component$_setProperties(component,properties);}
if(events){for(var name in events){component["add_"+name](events[name]);}
}
app._createdComponents.add(component);if(component.get_id()){app.addComponent(component);}
if(creatingComponents){if(references){app._addComponentToSecondPass(component,references);}
else{component.endUpdate();}
}
else{if(references){Sys$Component$_setReferences(component,references);}
component.endUpdate();}
return component;}
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,"return":13,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,windowsDelete:46,"delete":127
}
Sys.UI.Key.registerEnum("Sys.UI.Key");Sys.UI.DomEvent=function(eventObject){var e=eventObject;this.rawEvent=e;this.altKey=e.altKey;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;this.charCode=e.charCode?e.charCode:e.keyCode;this.clientX=e.clientX;this.clientY=e.clientY;this.ctrlKey=e.ctrlKey;this.target=e.target?e.target:e.srcElement;if(this.target){var loc=Sys.UI.DomElement.getLocation(this.target);this.offsetX=e.offsetX?e.offsetX:window.pageXOffset+e.clientX-loc.x;this.offsetY=e.offsetY?e.offsetY:window.pageYOffset+e.clientY-loc.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){window.event.returnValue=false;}
},stopPropagation:function(){if(this.rawEvent.stopPropagation){this.rawEvent.stopPropagation();}
else if(window.event){window.event.cancelBubble=true;}
}
}
Sys.UI.DomEvent.registerClass('Sys.UI.DomEvent');var $addHandler=Sys.UI.DomEvent.addHandler=function(element,eventName,handler){if(element.addEventListener){if(!handler._browserHandler){handler._browserHandler=function(e){handler.call(element,new Sys.UI.DomEvent(e));}
}
element.addEventListener(eventName,handler._browserHandler,false);}
else if(element.attachEvent){if(!handler._browserHandler){handler._browserHandler=function(){handler.call(element,new Sys.UI.DomEvent(window.event));}
}
element.attachEvent('on'+eventName,handler._browserHandler);}
}
var $removeHandler=Sys.UI.DomEvent.removeHandler=function(element,eventName,handler){var browserHandler=handler._browserHandler;if(element.removeEventListener){element.removeEventListener(eventName,browserHandler,false);}
else if(element.detachEvent){element.detachEvent('on'+eventName,browserHandler);}
}
Sys.IContainer=function(){}
Sys.IContainer.prototype={}
Sys.IContainer.registerInterface("Sys.IContainer");Sys.ApplicationLoadEventArgs=function(components){Sys.ApplicationLoadEventArgs.initializeBase(this);this._components=components;}
Sys.ApplicationLoadEventArgs.prototype={get_components:function(){return this._components;}
}
Sys.ApplicationLoadEventArgs.registerClass('Sys.ApplicationLoadEventArgs',Sys.EventArgs);Sys._Application=function(){Sys._Application.initializeBase(this);this._disposableObjects=[];this._components={};this._createdComponents=[];this._secondPassComponents=[];this._loadHandlerDelegate=Function.createDelegate(this,this._loadHandler);this._unloadHandlerDelegate=Function.createDelegate(this,this._unloadHandler);Sys.UI.DomEvent.addHandler(window,"load",this._loadHandlerDelegate);Sys.UI.DomEvent.addHandler(window,"unload",this._unloadHandlerDelegate);}
Sys._Application.prototype={_creatingComponents:false,_disposing:false,get_isCreatingComponents:function(){return this._creatingComponents;},add_load:function(handler){this.get_events().addHandler("load",handler);},remove_load:function(handler){this.get_events().removeHandler("load",handler);},add_init:function(handler){if(this._initialized){handler(this,Sys.EventArgs.Empty);}
else{this.get_events().addHandler("init",handler);}
},remove_init:function(handler){this.get_events().removeHandler("init",handler);},add_unload:function(handler){this.get_events().addHandler("unload",handler);},remove_unload:function(handler){this.get_events().removeHandler("unload",handler);},addComponent:function(component){this._components[component.get_id()]=component;},beginCreateComponents:function(){this._creatingComponents=true;},dispose:function(){if(!this._disposing){this._disposing=true;if(window.pageUnload){window.pageUnload(this,Sys.EventArgs.Empty);}
var unloadHandler=this.get_events().getHandler("unload");if(unloadHandler){unloadHandler(this,Sys.EventArgs.Empty);}
var disposableObjects=this._disposableObjects.clone();for(var i=0,l=disposableObjects.length;i<l;i++){disposableObjects[i].dispose();}
this._disposableObjects.clear();Sys.UI.DomEvent.removeHandler(window,"load",this._loadHandlerDelegate);Sys.UI.DomEvent.removeHandler(window,"unload",this._unloadHandlerDelegate);Sys._Application.callBaseMethod(this,'dispose');}
},endCreateComponents:function(){var components=this._secondPassComponents;for(var i=0,l=components.length;i<l;i++){var component=components[i].component;Sys$Component$_setReferences(component,components[i].references);component.endUpdate();}
this._secondPassComponents=[];this._creatingComponents=false;},findComponent:function(id,parent){return(parent?((Sys.IContainer.isInstanceOfType(parent))?parent.findComponent(id):parent[id]||null):Sys.Application._components[id]||null);},getComponents:function(){var res=[];var components=this._components;for(var name in components){res[res.length]=components[name];}
return res;},initialize:function(){if(!this._initialized){Sys._Application.callBaseMethod(this,'initialize');var handler=this.get_events().getHandler("init");if(handler){this.beginCreateComponents();handler(this,Sys.EventArgs.Empty);this.endCreateComponents();}
}
this.raiseLoad();},registerDisposableObject:function(object){if(!this._disposing){this._disposableObjects[this._disposableObjects.length]=object;}
},raiseLoad:function(){var h=this.get_events().getHandler("load");var args=new Sys.ApplicationLoadEventArgs(this._createdComponents.clone());if(h){h(this,args);}
if(window.pageLoad){window.pageLoad(this,args);}
this._createdComponents=[];},removeComponent:function(component){var id=component.get_id();if(id)delete this._components[id];},unregisterDisposableObject:function(object){if(!this._disposing){this._disposableObjects.remove(object);}
},_addComponentToSecondPass:function(component,references){this._secondPassComponents.add({component:component,references:references});},_loadHandler:function(event){this.initialize();},_unloadHandler:function(event){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(value){this._webRequest=value;},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(header){throw Error.notImplemented();},getAllResponseHeaders:function(){throw Error.notImplemented();}
}
Sys.Net.WebRequestExecutor.registerClass('Sys.Net.WebRequestExecutor');window.XMLDOM=function(markup){if(!window.DOMParser){var progIDs=['Msxml2.DOMDocument.3.0','Msxml2.DOMDocument'];for(var i=0;i<progIDs.length;i++){try{var xmlDOM=new ActiveXObject(progIDs[i]);xmlDOM.async=false;xmlDOM.loadXML(markup);xmlDOM.setProperty('SelectionLanguage','XPath');return xmlDOM;}
catch(ex){}
}
return null;}
else{var domParser=new window.DOMParser();return domParser.parseFromString(markup,'text/xml');}
}
Sys.Net.XMLHttpExecutor=function(){Sys.Net.XMLHttpExecutor.initializeBase(this);var _this=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(_this._xmlHttpRequest.readyState===4){_this._clearTimer();_this._responseAvailable=true;_this._webRequest.completed(Sys.EventArgs.Empty);if(_this._xmlHttpRequest!=null){_this._xmlHttpRequest.onreadystatechange=Function.emptyMethod;_this._xmlHttpRequest=null;}
}
}
this._clearTimer=function(){if(_this._timer!=null){window.clearTimeout(_this._timer);_this._timer=null;}
}
this._onTimeout=function(){if(!_this._responseAvailable){_this._clearTimer();_this._timedOut=true;_this._xmlHttpRequest.onreadystatechange=Function.emptyMethod;_this._xmlHttpRequest.abort();_this._webRequest.completed(Sys.EventArgs.Empty);_this._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 body=this._webRequest.get_body();var headers=this._webRequest.get_headers();this._xmlHttpRequest=new XMLHttpRequest();this._xmlHttpRequest.onreadystatechange=this._onReadyStateChange;var verb=this._webRequest.get_httpVerb();this._xmlHttpRequest.open(verb,this._webRequest.getResolvedUrl(),true);if(headers){for(var header in headers){var val=headers[header];if(typeof(val)!=="function")this._xmlHttpRequest.setRequestHeader(header,val);}
}
if(verb.toLowerCase()==="post"){if((headers===null)||!headers['Content-Type']){this._xmlHttpRequest.setRequestHeader('Content-Type','application/x-www-form-urlencoded');}
if(!body){body="";}
}
var timeout=this._webRequest.get_timeout();if(timeout>0){this._timer=window.setTimeout(Function.createDelegate(this,this._onTimeout),timeout);}
this._xmlHttpRequest.send(body);this._started=true;},getResponseHeader:function(header){var result;try{result=this._xmlHttpRequest.getResponseHeader(header);}catch(e){}
if(!result)result="";return result;},getAllResponseHeaders:function(){return this._xmlHttpRequest.getAllResponseHeaders();},get_responseData:function(){return this._xmlHttpRequest.responseText;},get_statusCode:function(){return this._xmlHttpRequest.status;},get_statusText:function(){return this._xmlHttpRequest.statusText;},get_xml:function(){var xml=this._xmlHttpRequest.responseXML;if(xml===null||!xml.documentElement){xml=new XMLDOM(this._xmlHttpRequest.responseText);if(xml===null||!xml.documentElement)return null;}
else if(navigator.userAgent.indexOf('MSIE')!==-1){xml.setProperty('SelectionLanguage','XPath');}
if(xml.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml"&&xml.documentElement.tagName==="parsererror"){return null;}
if(xml.documentElement.tagName==="root"&&xml.documentElement.firstChild&&xml.documentElement.firstChild.tagName==="parsererror"){return null;}
return xml;},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;var handler=this._webRequest._get_eventHandlerList().getHandler("completed");if(handler){handler(this,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(handler){this._get_eventHandlerList().addHandler("invokingRequest",handler);},remove_invokingRequest:function(handler){this._get_eventHandlerList().removeHandler("invokingRequest",handler);},add_completedRequest:function(handler){this._get_eventHandlerList().addHandler("completedRequest",handler);},remove_completedRequest:function(handler){this._get_eventHandlerList().removeHandler("completedRequest",handler);},_get_eventHandlerList:function(){if(!this._events){this._events=new Sys.EventHandlerList();}
return this._events;},get_defaultTimeout:function(){return this._defaultTimeout;},set_defaultTimeout:function(value){this._defaultTimeout=value;},get_defaultExecutorType:function(){return this._defaultExecutorType;},set_defaultExecutorType:function(value){this._defaultExecutorType=value;},executeRequest:function(webRequest){var executor=webRequest.get_executor();if(!executor){var failed=false;try{var executorType=eval(this._defaultExecutorType);executor=new executorType();}catch(e){failed=true;}
webRequest.set_executor(executor);}
if(executor.get_aborted()){return;}
var evArgs=new Sys.Net.NetworkRequestEventArgs(webRequest);var 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(webRequest){Sys.Net.NetworkRequestEventArgs.initializeBase(this);this._webRequest=webRequest;}
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(handler){this._get_eventHandlerList().addHandler("completed",handler);},remove_completed:function(handler){this._get_eventHandlerList().removeHandler("completed",handler);},completed:function(eventArgs){var handler=Sys.Net.WebRequestManager._get_eventHandlerList().getHandler("completedRequest");if(handler){handler(this._executor,eventArgs);}
handler=this._get_eventHandlerList().getHandler("completed");if(handler){handler(this._executor,eventArgs);}
},_get_eventHandlerList:function(){if(!this._events){this._events=new Sys.EventHandlerList();}
return this._events;},get_url:function(){return this._url;},set_url:function(value){this._url=value;},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(value){this._httpVerb=value;},get_body:function(){return this._body;},set_body:function(value){this._body=value;},get_userContext:function(){return this._userContext;},set_userContext:function(value){this._userContext=value;},get_executor:function(){return this._executor;},set_executor:function(value){this._executor=value;this._executor._set_webRequest(this);},get_timeout:function(){if(this._timeout===0){return Sys.Net.WebRequestManager.get_defaultTimeout();}
return this._timeout;},set_timeout:function(value){this._timeout=value;},getResolvedUrl:function(){return Sys.Net.WebRequest._resolveUrl(this._url);},invoke:function(){Sys.Net.WebRequestManager.executeRequest(this);this._invokeCalled=true;}
}
Sys.Net.WebRequest._resolveUrl=function(url,baseUrl){if(url&&url.indexOf('://')!==-1){return url;}
if(!baseUrl||baseUrl.length===0){var baseElement=document.getElementsByTagName('base')[0];if(baseElement&&baseElement.href&&baseElement.href.length>0){baseUrl=baseElement.href;}
else{baseUrl=document.URL;}
}
var qsStart=baseUrl.indexOf('?');if(qsStart!==-1){baseUrl=baseUrl.substr(0,qsStart);}
baseUrl=baseUrl.substr(0,baseUrl.lastIndexOf('/')+1);if(!url||url.length===0){return baseUrl;}
if(url.charAt(0)==='/'){var slashslash=baseUrl.indexOf('://');var nextSlash=baseUrl.indexOf('/',slashslash+3);return baseUrl.substr(0,nextSlash)+url;}
else{var lastSlash=baseUrl.lastIndexOf('/');return baseUrl.substr(0,lastSlash+1)+url;}
}
Sys.Net.WebRequest._createQueryString=function(queryString,encodeMethod){if(!encodeMethod)encodeMethod=encodeURIComponent;var sb=new Sys.StringBuilder();var i=0;for(var arg in queryString){var obj=queryString[arg];if(typeof(obj)==="function")continue;var val=Sys.Serialization.JavaScriptSerializer.serialize(obj);if(i!==0){sb.append('&');}
sb.append(arg);sb.append('=');sb.append(encodeMethod(val));i++;}
return sb.toString();}
Sys.Net.WebRequest._createUrl=function(url,queryString){if(!queryString){return url;}
var qs=Sys.Net.WebRequest._createQueryString(queryString);if(qs.length>0){var sep='?';if(url&&url.indexOf('?')!==-1)sep='&';return url+sep+qs;}else{return url;}
}
Sys.Net.WebRequest.registerClass('Sys.Net.WebRequest');Sys.Net._WebMethod=function(proxy,methodName,fullName,useGet){this._proxy=proxy;this._fullMethodName=fullName;this._methodName=methodName
this._useGet=useGet;}
Sys.Net._WebMethod.prototype={addHeaders:function(headers){headers['Content-Type']='application/json';},getUrl:function(params){if(!this._useGet||!params)params={};return Sys.Net.WebRequest._createUrl(this._proxy._get_path()+"/js/"+this._methodName,params);},getBody:function(params){if(this._useGet)return null;var body=Sys.Serialization.JavaScriptSerializer.serialize(params);if(body==="{}")return"";return body;},_execute:function(params){return this._invokeInternal.apply(this,arguments);},_invokeInternal:function(params,onSuccess,onFailure,userContext){var methodName=this._fullMethodName;if(onSuccess===null||typeof onSuccess==='undefined')onSuccess=this._proxy.get_defaultSucceededCallback();if(onFailure===null||typeof onFailure==='undefined')onFailure=this._proxy.get_defaultFailedCallback();if(userContext===null||typeof userContext==='undefined')userContext=this._proxy.get_defaultUserContext();var request=new Sys.Net.WebRequest();this.addHeaders(request.get_headers());request.set_url(this.getUrl(params));if(!params)params={};request.set_body(this.getBody(params));request.add_completed(onComplete);var timeout=this._proxy.get_timeout();if(timeout>0)request.set_timeout(timeout);request.invoke();function onComplete(response,eventArgs){if(response.get_responseAvailable()){var statusCode=response.get_statusCode();var result=null;try{var contentType=response.getResponseHeader("Content-Type");if(contentType.startsWith("application/json")){result=response.get_object();}
else if(contentType.startsWith("text/xml")){result=response.get_xml();}
else{result=response.get_responseData();}
}catch(ex){}
if(((statusCode<200)||(statusCode>=300))||Sys.Net.WebServiceError.isInstanceOfType(result)){if(onFailure){if(!result||!Sys.Net.WebServiceError.isInstanceOfType(result)){result=new Sys.Net.WebServiceError(false,String.format(Sys.Res.webServiceFailedNoMsg,methodName),"","");}
result._statusCode=statusCode;onFailure(result,userContext,methodName);}
}
else if(onSuccess){onSuccess(result,userContext,methodName);}
}
else{var msg;if(response.get_timedOut()){msg=String.format(Sys.Res.webServiceTimedOut,methodName);}
else{msg=String.format(Sys.Res.webServiceFailedNoMsg,methodName)}
if(onFailure){onFailure(new Sys.Net.WebServiceError(response.get_timedOut(),msg,"",""),userContext,methodName);}
}
}
return request;}
}
Sys.Net._WebMethod.registerClass('Sys.Net._WebMethod');Sys.Net._WebMethod._generateTypedConstructor=function(type){return function(properties){this.__type=type;if(properties){for(var name in properties){this[name]=properties[name];}
}
}
}
Sys.Net._WebMethod._invoke=function(proxy,methodName,fullName,useGet){var method=new Sys.Net._WebMethod(proxy,methodName,fullName,useGet);var callMethodArgs=new Array();for(var i=4;i<arguments.length;i++)callMethodArgs[i-4]=arguments[i];return method._execute.apply(method,callMethodArgs);}
Sys.Net._WebMethod._createProxyMethod=function(proxy,methodName,fullName,useGet){var numOfParams=arguments.length-4;var createWebMethodArguments=arguments;return function(){var args={};for(var i=0;i<numOfParams;i++){args[createWebMethodArguments[i+4]]=arguments[i];}
var callMethodArgs=[this,methodName,fullName,useGet,args];for(var i=0;i+numOfParams<arguments.length;i++)callMethodArgs[i+5]=arguments[numOfParams+i];return Sys.Net._WebMethod._invoke.apply(null,callMethodArgs);}
}
Sys.Net.WebServiceError=function(timedOut,message,stackTrace,exceptionType){this._timedOut=timedOut;this._message=message;this._stackTrace=stackTrace;this._exceptionType=exceptionType;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.WebServicePath='ScriptServices/Microsoft/Web/Profile/ProfileService.asmx';Sys.Services._ProfileService.prototype={_defaultFailedCallback:null,_defaultLoadCompletedCallback:null,_defaultSaveCompletedCallback:null,_path:'',_timeout:0,get_defaultFailedCallback:function(){return this._defaultFailedCallback;},set_defaultFailedCallback:function(value){this._defaultFailedCallback=value;},get_defaultLoadCompletedCallback:function(){return this._defaultLoadCompletedCallback;},set_defaultLoadCompletedCallback:function(value){this._defaultLoadCompletedCallback=value;},get_defaultSaveCompletedCallback:function(){return this._defaultSaveCompletedCallback;},set_defaultSaveCompletedCallback:function(value){this._defaultSaveCompletedCallback=value;},get_path:function(){return this._path;},set_path:function(value){if((!value)||(!value.length)){value='';}
this._path=value;},get_timeout:function(){return this._timeout;},set_timeout:function(value){this._timeout=value;},_get_path:function(){var path=this.get_path();return path.length>0?path:Sys.Services._ProfileService.WebServicePath;},load:function(propertyNames,loadCompletedCallback,failedCallback,userContext){var parameters={};var methodName;var fullMethodName;if(!propertyNames){methodName="GetAllPropertiesForCurrentUser";fullMethodName="Microsoft.Web.Profile.ProfileService.GetAllPropertiesForCurrentUser";}
else{methodName="GetPropertiesForCurrentUser";fullMethodName="Microsoft.Web.Profile.ProfileService.GetPropertiesForCurrentUser";parameters={properties:this._clonePropertyNames(propertyNames)};}
Sys.Net._WebMethod._invoke(this,methodName,fullMethodName,false,parameters,Function.createDelegate(this,this._onLoadComplete),Function.createDelegate(this,this._onLoadFailed),[loadCompletedCallback,failedCallback,userContext]);},save:function(propertyNames,saveCompletedCallback,failedCallback,userContext){var flattenedProperties=this._flattenProperties(propertyNames,this.properties);Sys.Net._WebMethod._invoke(this,"SetPropertiesForCurrentUser","Microsoft.Web.Profile.ProfileService.SetPropertiesForCurrentUser",false,{values:flattenedProperties},Function.createDelegate(this,this._onSaveComplete),Function.createDelegate(this,this._onSaveFailed),[saveCompletedCallback,failedCallback,userContext]);},_clonePropertyNames:function(arr){var nodups=[];var seen={};for(var i=0;i<arr.length;i++){var prop=arr[i];if(!seen[prop]){nodups.add(prop);seen[prop]=true;};}
return nodups;},_flattenProperties:function(propertyNames,properties,groupName){var flattenedProperties={};var val;var key;if(propertyNames&&propertyNames.length==0){return flattenedProperties;}
for(var property in properties){val=properties[property];key=groupName?groupName+"."+property:property;if(Sys.Services.ProfileGroup.isInstanceOfType(val)){var groupProperties=this._flattenProperties(propertyNames,val,key);for(var subKey in groupProperties){var subVal=groupProperties[subKey];flattenedProperties[subKey]=subVal;}
}
else{if(!propertyNames||propertyNames.indexOf(key)!=-1){flattenedProperties[key]=val;}
}
}
return flattenedProperties;},_onLoadComplete:function(result,context,methodName){var unflattened=this._unflattenProperties(result);for(var name in unflattened){this.properties[name]=unflattened[name];}
var userCallback=context[0];var callback=userCallback?userCallback:this._defaultLoadCompletedCallback;if(callback){callback(result.length,context[2],"Sys.Services.ProfileService.load");}
},_onLoadFailed:function(err,context,methodName){var userCallback=context[1];var callback=userCallback?userCallback:this._defaultFailedCallback;if(callback){callback(err,context[2],"Sys.Services.ProfileService.load");}
},_onSaveComplete:function(result,context,methodName){var userCallback=context[0];var userContext=context[2];var callback=userCallback?userCallback:this._defaultSaveCompletedCallback;if(callback){callback(result,userContext,"Sys.Services.ProfileService.save");}
},_onSaveFailed:function(err,context,methodName){var userCallback=context[1];var userContext=context[2];var callback=userCallback?userCallback:this._defaultFailedCallback;if(callback){callback(err,userContext,"Sys.Services.ProfileService.save");}
},_unflattenProperties:function(properties){var unflattenedProperties={};var dotIndex;var val;var count=0;for(var key in properties){count++;val=properties[key];dotIndex=key.indexOf('.');if(dotIndex!==-1){var groupName=key.substr(0,dotIndex);key=key.substr(dotIndex+1);var group=unflattenedProperties[groupName];if((!group)||(!Sys.Services.ProfileGroup.isInstanceOfType(group))){group=new Sys.Services.ProfileGroup();unflattenedProperties[groupName]=group;}
group[key]=val;}
else{unflattenedProperties[key]=val;}
}
properties.length=count;return unflattenedProperties;}
}
Sys.Services._ProfileService.registerClass('Sys.Services._ProfileService');Sys.Services.ProfileService=new Sys.Services._ProfileService();Sys.Services.ProfileGroup=function(properties){if(properties){for(var property in properties){this[property]=properties[property];}
}
}
Sys.Services.ProfileGroup.registerClass('Sys.Services.ProfileGroup');Sys.Services._AuthenticationService=function(){Sys.Services._AuthenticationService.initializeBase(this);}
Sys.Services._AuthenticationService.WebServicePath='ScriptServices/Microsoft/Web/Security/AuthenticationService.asmx';Sys.Services._AuthenticationService.prototype={_defaultFailedCallback:null,_defaultLoginCompletedCallback:null,_defaultLogoutCompletedCallback:null,_path:'',_timeout:0,_authenticated:false,get_defaultFailedCallback:function(){return this._defaultFailedCallback;},set_defaultFailedCallback:function(value){this._defaultFailedCallback=value;},get_defaultLoginCompletedCallback:function(){return this._defaultLoginCompletedCallback;},set_defaultLoginCompletedCallback:function(value){this._defaultLoginCompletedCallback=value;},get_defaultLogoutCompletedCallback:function(){return this._defaultLogoutCompletedCallback;},set_defaultLogoutCompletedCallback:function(value){this._defaultLogoutCompletedCallback=value;},get_isLoggedIn:function(){return this._authenticated;},get_path:function(){return this._path;},set_path:function(value){if((!value)||(!value.length)){value='';}
this._path=value;},get_timeout:function(){return this._timeout;},set_timeout:function(value){this._timeout=value;},_set_authenticated:function(authenticated){this._authenticated=authenticated;},_get_path:function(){var path=this.get_path();return path.length>0?path:Sys.Services._AuthenticationService.WebServicePath;},login:function(username,password,isPersistent,customInfo,redirectUrl,loginCompletedCallback,failedCallback,userContext){Sys.Net._WebMethod._invoke(this,"Login","Microsoft.Web.Security.AuthenticationService.Login",false,{userName:username,password:password,createPersistentCookie:isPersistent},Function.createDelegate(this,this._onLoginComplete),Function.createDelegate(this,this._onLoginFailed),[username,password,isPersistent,redirectUrl,loginCompletedCallback,failedCallback,userContext]);},logout:function(redirectUrl,logoutCompletedCallback,failedCallback,userContext){Sys.Net._WebMethod._invoke(this,"Logout","Microsoft.Web.Security.AuthenticationService.Logout",false,{},Function.createDelegate(this,this._onLogoutComplete),Function.createDelegate(this,this._onLogoutFailed),[redirectUrl,logoutCompletedCallback,failedCallback,userContext]);},_onLoginComplete:function(result,context,methodName){var redirectUrl=context[3];var userCallback=context[4];var userContext=context[6];var callback=userCallback?userCallback:this._defaultLoginCompletedCallback;if(result){this._authenticated=true;if(redirectUrl&&redirectUrl.length>0){window.location=redirectUrl;}
else if(callback){callback(true,userContext,"Sys.Services.AuthenticationService.login");}
}
else if(callback){callback(false,userContext,"Sys.Services.AuthenticationService.login");}
},_onLoginFailed:function(err,context,methodName){var userCallback=context[5];var callback=userCallback?userCallback:this._defaultFailedCallback;if(callback){callback(err,context[6],"Sys.Services.AuthenticationService.login");}
},_onLogoutComplete:function(result,context,methodName){var redirectUrl=context[0];var userCallback=context[1];var userContext=context[3];var callback=userCallback?userCallback:this._defaultLogoutCompletedCallback;this._authenticated=false;if(redirectUrl&&redirectUrl.length>0){window.location=redirectUrl;}
else if(callback){callback(null,userContext,"Sys.Services.AuthenticationService.logout");}
},_onLogoutFailed:function(err,context,methodName){var userCallback=context[2];var callback=userCallback?userCallback:this._defaultFailedCallback;if(callback){callback(err,context[3],"Sys.Services.AuthenticationService.logout");}
}
}
Sys.Services._AuthenticationService.registerClass('Sys.Services._AuthenticationService');Sys.Services.AuthenticationService=new Sys.Services._AuthenticationService();Type.registerNamespace('Sys.Serialization');Sys.Serialization.JavaScriptSerializer=function(){}
Sys.Serialization.JavaScriptSerializer.registerClass('Sys.Serialization.JavaScriptSerializer');Sys.Serialization.JavaScriptSerializer._stringRegEx=new RegExp('["\b\f\n\r\t\\\\\x00-\x1F]','i');Sys.Serialization.JavaScriptSerializer._serializeWithBuilder=function(object,stringBuilder,sort){var i;switch(typeof object){case'object':if(object){if(Array.isInstanceOfType(object)){stringBuilder.append('[');for(i=0;i<object.length;++i){if(i>0){stringBuilder.append(',');}
stringBuilder.append(Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(object[i],stringBuilder));}
stringBuilder.append(']');}
else{if(Date.isInstanceOfType(object)){stringBuilder.append('"@');stringBuilder.append(''+object.getTime());stringBuilder.append('@"');break;}
var properties=[];var propertyCount=0;for(var name in object){if(name.startsWith('$')){continue;}
properties[propertyCount++]=name;}
if(sort)properties.sort();stringBuilder.append('{');var needComma=false;for(i=0;i<propertyCount;i++){var value=object[properties[i]];if(typeof value!=='undefined'&&typeof value!=='function'){if(needComma){stringBuilder.append(',');}
else{needComma=true;}
stringBuilder.append(Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(properties[i],stringBuilder,sort));stringBuilder.append(':');stringBuilder.append(Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(value,stringBuilder,sort));}
}
stringBuilder.append('}');}
}
else{stringBuilder.append('null');}
break;case'number':if(isFinite(object)){stringBuilder.append(String(object));}
else{throw Error.invalidOperation(Sys.Res.cannotSerializeNonFiniteNumbers);}
break;case'string':stringBuilder.append('"');if(Sys.Serialization.JavaScriptSerializer._stringRegEx.test(object)){var length=object.length;for(i=0;i<length;++i){var curChar=object.charAt(i);if(curChar>=' '){if(curChar==='\\'||curChar==='"'){stringBuilder.append('\\');}
stringBuilder.append(curChar);}
else{switch(curChar){case'\b':stringBuilder.append('\\b');break;case'\f':stringBuilder.append('\\f');break;case'\n':stringBuilder.append('\\n');break;case'\r':stringBuilder.append('\\r');break;case'\t':stringBuilder.append('\\t');break;default:stringBuilder.append('\\u00');if(curChar.charCodeAt()<16)stringBuilder.append('0');stringBuilder.append(curChar.charCodeAt().toString(16));}
}
}
}else{stringBuilder.append(object);}
stringBuilder.append('"');break;case'boolean':stringBuilder.append(object.toString());break;default:stringBuilder.append('null');break;}
}
Sys.Serialization.JavaScriptSerializer.serialize=function(object){var stringBuilder=new Sys.StringBuilder();Sys.Serialization.JavaScriptSerializer._serializeWithBuilder(object,stringBuilder,false);return stringBuilder.toString();}
Sys.Serialization.JavaScriptSerializer.deserialize=function(data){if(data.length===0)throw Error.argument('data',Sys.Res.cannotDeserializeEmptyString);var exp=data.replace(new RegExp('\\"@(-?[0-9]+)@\\"','g'),"new Date($1)");exp=exp.replace(new RegExp('\\"@_Error(.*)Error_@\\"','g'),"new Sys.Net.WebServiceError$1");return eval('('+exp+')');}
Sys.UI.DomElement=function(){}
Sys.UI.DomElement.registerClass('Sys.UI.DomElement');Sys.UI.DomElement.isInstanceOfType=function(instance){return!!((instance===window)||(instance===document)||(window.HTMLElement&&(instance instanceof HTMLElement))||(typeof(instance.nodeName)==='string'));}
Sys.UI.DomElement.addCssClass=function(element,className){if(!Sys.UI.DomElement.containsCssClass(element,className)){element.className+=' '+className;}
}
Sys.UI.DomElement.containsCssClass=function(element,className){return element.className.split(' ').contains(className);}
Sys.UI.DomElement.getBounds=function(element){var offset=Sys.UI.DomElement.getLocation(element);return{x:offset.x,y:offset.y,width:element.offsetWidth,height:element.offsetHeight};}
var $get=Sys.UI.DomElement.getElementById=function(id,element){if(!element)return document.getElementById(id);if(element.getElementById)return element.getElementById(id);var nodeQueue=[];var childNodes=element.childNodes;for(var i=0;i<childNodes.length;i++){var node=childNodes[i];if(node.nodeType==1){nodeQueue[nodeQueue.length]=node;}
}
while(nodeQueue.length){node=nodeQueue.shift();if(node.id==id){return node;}
childNodes=node.childNodes;for(i=0;i<childNodes.length;i++){node=childNodes[i];if(node.nodeType==1){nodeQueue[nodeQueue.length]=node;}
}
}
return null;}
Sys.UI.DomElement.getLocation=function(element){var offsetX=0;var offsetY=0;var parent;for(parent=element;parent;parent=parent.offsetParent){if(parent.offsetLeft){offsetX+=parent.offsetLeft;}
if(parent.offsetTop){offsetY+=parent.offsetTop;}
}
return{x:offsetX,y:offsetY};}
Sys.UI.DomElement.removeCssClass=function(element,className){var currentClassName=' '+element.className+' ';var index=currentClassName.indexOf(' '+className+' ');if(index>=0){element.className=(currentClassName.substr(0,index)+' '+currentClassName.substring(index+className.length+1,currentClassName.length)).trim();}
}
Sys.UI.DomElement.setAccessibilityAttribute=function(element,name,value){if(element.setAttributeNS){element.setAttributeNS("http://www.w3.org/2005/07/aaa",name,value);}
}
Sys.UI.DomElement.setLocation=function(element,x,y){var style=element.style;style.position='absolute';style.left=x+"px";style.top=y+"px";}
Sys.UI.DomElement.toggleCssClass=function(element,className){if(Sys.UI.DomElement.containsCssClass(element,className)){Sys.UI.DomElement.removeCssClass(element,className);}
else{Sys.UI.DomElement.addCssClass(element,className);}
}
Sys.UI.Behavior=function(element){Sys.UI.Behavior.initializeBase(this);this._element=element;var behaviors=element._behaviors;if(!behaviors){element._behaviors=[this];}
else{behaviors[behaviors.length]=this;}
}
Sys.UI.Behavior.prototype={_name:null,get_element:function(){return this._element;},get_id:function(){var baseId=Sys.UI.Behavior.callBaseMethod(this,'get_id');if(baseId)return baseId;if(!this._element||!this._element.id)return'';return this._element.id+'$'+this.get_name();},get_name:function(){if(this._name)return this._name;var name=Object.getTypeName(this);var i=name.lastIndexOf('.');if(i!=-1)name=name.substr(i+1);if(!this.get_isInitialized())this._name=name;return name;},set_name:function(value){this._name=value;},initialize:function(){Sys.UI.Behavior.callBaseMethod(this,'initialize');var name=this.get_name();if(name)this._element[name]=this;},dispose:function(){Sys.UI.Behavior.callBaseMethod(this,'dispose');if(this._element){var name=this.get_name();if(name){this._element[name]=null;}
this._element._behaviors.remove(this);delete this._element;}
}
}
Sys.UI.Behavior.registerClass('Sys.UI.Behavior',Sys.Component);Sys.UI.Behavior.getBehaviorByName=function(element,name){var b=element[name];return(b&&Sys.UI.Behavior.isInstanceOfType(b))?b:null;}
Sys.UI.Behavior.getBehaviors=function(element){if(!element._behaviors)return[];return element._behaviors.clone();}
Sys.UI.Behavior.getBehaviorsByType=function(element,type){var behaviors=element._behaviors;var results=[];if(behaviors){for(var i=0,l=behaviors.length;i<l;i++){if(type.isInstanceOfType(behaviors[i])){results[results.length]=behaviors[i];}
}
}
return results;}
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(element){Sys.UI.Control.initializeBase(this);this._element=element;element.control=this;this._oldDisplayMode=this._element.style.display;if(!this._oldDisplayMode||(this._oldDisplayMode=='none')){this._oldDisplayMode='';}
}
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(value){throw Error.invalidOperation(Sys.Res.cantSetId);},get_parent:function(){if(this._parent){return this._parent;}
else{var parentElement=this._element.parentNode;while(parentElement){if(parentElement.control){return parentElement.control;}
parentElement=parentElement.parentNode;}
return null;}
},set_parent:function(value){this._parent=value;},get_role:function(){return"";},get_visibilityMode:function(){return this._visibilityMode;},set_visibilityMode:function(value){if(this._visibilityMode!==value){this._visibilityMode=value;if(this.get_visible()===false){if(this._visibilityMode===Sys.UI.VisibilityMode.hide){this._element.style.display=this._oldDisplayMode;}
else{this._element.style.display='none';}
}
}
this._visibilityMode=value;},get_visible:function(){return(this._element.style.visibility!='hidden');},set_visible:function(value){if(value!=this.get_visible()){this._element.style.visibility=value?'visible':'hidden';if(value||(this._visibilityMode===Sys.UI.VisibilityMode.hide)){this._element.style.display=this._oldDisplayMode;}
else{this._element.style.display='none';}
}
},dispose:function(){Sys.UI.Control.callBaseMethod(this,'dispose');if(this._element){this._element.control=null;delete this._element;}
},initialize:function(){Sys.UI.Control.callBaseMethod(this,'initialize');var elt=this._element;if(elt.setAttributeNS){elt.setAttributeNS("http://www.w3.org/TR/xhtml2","role",this.get_role());}
},onBubbleEvent:function(source,args){return false;},raiseBubbleEvent:function(source,args){var currentTarget=this.get_parent();while(currentTarget){if(currentTarget.onBubbleEvent(source,args)){return;}
currentTarget=currentTarget.get_parent();}
}
}
Sys.UI.Control.registerClass('Sys.UI.Control',Sys.Component);Sys.UI._Timer=function(element){Sys.UI._Timer.initializeBase(this,[element]);this._interval=60000;this._enabled=true;this._postbackPending=false;this._raiseTickDelegate=null;this._endRequestHandlerDelegate=null;this._timer=null;this._pageRequestManager=null;}
Sys.UI._Timer.prototype={get_enabled:function(){return this._enabled;},set_enabled:function(value){this._enabled=value;},get_interval:function(){return this._interval;},set_interval:function(value){this._interval=value;},dispose:function(){this._stopTimer();if(this._pageRequestManager!==null){this._pageRequestManager.remove_endRequest(this._endRequestHandlerDelegate);}
Sys.UI._Timer.callBaseMethod(this,"dispose");},_doPostback:function(){__doPostBack(this.get_id(),'');},_handleEndRequest:function(sender,arg){var dataItem=arg.get_dataItems()[this.get_id()];if(dataItem){this._update(dataItem[0],dataItem[1]);}
if((this._postbackPending===true)&&(this._pageRequestManager!==null)&&(!pageRequestManager.get_isInAsyncPostBack())){this._postbackPending=false;this._doPostback();}
},initialize:function(){Sys.UI._Timer.callBaseMethod(this,'initialize');this._raiseTickDelegate=Function.createDelegate(this,this._raiseTick);this._endRequestHandlerDelegate=Function.createDelegate(this,this._handleEndRequest);if(Sys.WebForms&&Sys.WebForms.PageRequestManager){this._pageRequestManager=Sys.WebForms.PageRequestManager.getInstance();}
if(this._pageRequestManager!==null){this._pageRequestManager.add_endRequest(this._endRequestHandlerDelegate);}
if(this.get_enabled()){this._startTimer();}
},_raiseTick:function(){if((this._pageRequestManager===null)||(!this._pageRequestManager.get_isInAsyncPostBack())){this._doPostback();}else{this._postBackPending=true;}
},_startTimer:function(){this._timer=window.setInterval(Function.createDelegate(this,this._raiseTick),this.get_interval());},_stopTimer:function(){if(this._timer!==null){window.clearInterval(this._timer);this._timer=null;}},_update:function(enabled,interval){var stopped=!this.get_enabled();var intervalChanged=(this.get_interval()!==interval);if((!stopped)&&((!enabled)||(intervalChanged))){this._stopTimer();stopped=true;}this.set_enabled(enabled);this.set_interval(interval);if((this.get_enabled())&&(stopped)){this._startTimer();}
}
}
Sys.UI._Timer.registerClass('Sys.UI._Timer',Sys.UI.Control);
function BarNav(element,categoryid,productid,lines){
var me=this;
if(element){
if(typeof element=="string"){
me.element=document.getElementById(element);
}else{
me.element=element;
}
}
me.element.style.display="block";
me.blankimage=document.createElement("img");
me.blankimage.src="images/blank.gif";
me.blankimage.style.width="1px";
me.blankimage.style.height="1px";
me.element.appendChild(me.blankimage);
me.icons={
grandparent:"skins/blue/bnarrow-up.gif",
sibling:"skins/blue/bnarrow-right.gif",
parent:"skins/blue/bnarrow-down.gif",
child:"skins/blue/bnarrow-right.gif",
product:"skins/blue/bnarrow-dot.gif"
}
me.oldheight=0;
me.indent=10;
me.height=25;
me.NavNode=function(node,indent,top,color,className){
this.node=node;
this.indent=indent;
this.top=top;
this.oldindent=0;
this.oldtop=0;
this.color=color;
this.oldcolor=128;
this.New=true;
this.className=className;
}
me.cloneDisplay=function(o){
if(typeof o=='undefined')return o;
var d={};
d.Count=o.Count;
for(var i=0;i<o.Count;i++){
var c={};
for(x in o[i]){
c[x]=o[i][x];
}
d[i]=c;
}
return d;
}
me.Replace=function(oldStr,findStr,repStr){
var srchNdx=0;
var newStr="";
while(oldStr.indexOf(findStr,srchNdx)!=-1)
{
newStr+=oldStr.substring(srchNdx,oldStr.indexOf(findStr,srchNdx));
newStr+=repStr;
srchNdx=(oldStr.indexOf(findStr,srchNdx)+findStr.length);
}
newStr+=oldStr.substring(srchNdx,oldStr.length);
return newStr;
}
me.FormatCategoryName=function(Name)
{
return me.Replace(me.Replace(Name,' ','_'),'&','n');
}
me.ReadyToDisplay=0;
me.OnPopulate=function(Node){
me.ReadyToDisplay=me.ReadyToDisplay-1;
Kenwood.Kenworld.Utilities.GetProductsTree(Node.Value,me.ContinueOnPopulate,Node);
}
me.ContinueOnPopulate=function(ret){
var Node=ret.context;
if(ret.error){
Node.PopulateOnDemand=true;
Node.Expanded=false;
}else{
var Nodes=ret.value;
while(Nodes.Count!=0){
Node.ChildNodes.Add(Nodes[0]);
}
me.SetOnPopulate(Node.ChildNodes);
}
me.ReadyToDisplay=me.ReadyToDisplay+1
if(me.ReadyToDisplay==0)me.Redisplay();
}
me.Redisplay=function(){
me.SetRoot(me.Node,true);
}
me.SetOnPopulate=function(Nodes){
for(var i=0;i<Nodes.Count;i++){
Nodes[i].OnPopulate=me.OnPopulate;
me.SetOnPopulate(Nodes[i].ChildNodes);
}
}
me.laste=null;
me.ShowDisplayFirst=function(){
var d=me.CurrentDisplay;
for(var i=d.Count-1;i>=0;i--){
var n=d[i];
if(i==0){
n.prev=null;
}else{
n.prev=d[i-1];
}
if(!n.e){
if(n.node.e){
n.e=n.node.e;
}else{
n.e=document.createElement("span");
n.e.icon=document.createElement("img");
n.e.dash=document.createElement("img");
n.e.dash.border="0";
n.e.d=document.createElement("span");
n.e.d.style.position="relative";
n.e.d.className="navnodetext";
n.e.icon.style.width="8px";
n.e.icon.style.height="8px";
n.e.icon.src="skins/blue/bnarrow-dot.gif";
n.e.icon.className="navnodeicon";
n.e.dash.style.width="180px";
n.e.dash.style.height="1px";
n.e.dash.src="skins/blue/dash.gif";
n.e.dash.className="navnodedash";
n.e.appendChild(n.e.icon);
n.e.appendChild(n.e.d);
if(lines!='No')n.e.appendChild(n.e.dash);
n.node.e=n.e;
}
}
n.e.style.position="absolute";
if(n.e.d.a){
n.e.d.removeChild(n.e.d.a);
}
n.e.d.a=document.createElement("a");
n.e.d.appendChild(n.e.d.a);
n.e.d.a.appendChild(document.createTextNode(n.node.Text));
n.e.d.a.style.color="black";
if(n.node.href!="")n.e.d.a.href=n.node.href;
n.e.navnode=n;
n.e.className="navnode";
n.e.d.className="navnode_"+(n.stay|n.New?n.className:"gone");
me.element.appendChild(n.e);
}
for(var i=d.Count-1;i>=0;i--){
var n=d[i];
if(!n.New)
me.element.appendChild(n.e);
}
}
me.SetRoot=function(node,restore){
me.Node=node;
if(restore){
me.CurrentDisplay=me.Backup;
}else{
me.Backup=me.cloneDisplay(me.CurrentDisplay);
}
if(me.CurrentDisplay){
me.OldDisplay=me.CurrentDisplay;
for(var i=0;i<me.OldDisplay.Count;i++){
me.OldDisplay[i].stay=false;
me.OldDisplay[i].oldtop=me.OldDisplay[i].top;
me.OldDisplay[i].e.onclick=null;
me.OldDisplay[i].e.style.cursor='wait';
}
}
me.CurrentDisplay=me.GenerateDisplay();
if(me.ReadyToDisplay==0)me.ShowDisplay(0);
}
me.onclick=function(){
var Node=this.navnode.node;
if(Node==me.Node||Node.SelectAction==0){
var url=me.FormatCategoryName(Node.getTextPath());
}else{
me.SetRoot(this.navnode.node);
}
}
me.Gray=function(p){
return me.toHex(Math.floor(p),Math.floor(p),Math.floor(p));
}
this.toHex=function(R,G,B){
var r=R.toString(16);
var g=G.toString(16);
var b=B.toString(16);
if(r.length==1)r='0'+r;
if(g.length==1)g='0'+g;
if(b.length==1)b='0'+b;
return'#'+r+g+b;
}
me.ShowDisplay=function(p,mso){
var date=new Date();
if(p==0){
me.ShowDisplayFirst();
mso=date.getMilliseconds()+((date.getSeconds()+(date.getMinutes()*60))*1000);
}
var ms=date.getMilliseconds()+((date.getSeconds()+(date.getMinutes()*60))*1000);
ms=ms-mso;
if(ms<0){
p=100;
}else{
p=100*(ms/500);
if(p>100){
p=100;
};
}
var d=me.CurrentDisplay;
var shrink=(100-p)/100;
var grow=p/100;
var maxdash=0;
var h=me.avg(me.oldheight,d.Count*me.height,grow)-(lines=="Yes"?0:2);
if(p==100){
me.oldheight=d.Count*me.height;
}else{
var fun=function(){
me.ShowDisplay(p+5,mso);
}
var tim=setTimeout(fun,10);
}
if(me.OldDisplay){
for(var x=0;x<me.OldDisplay.Count;x++){
if(!me.OldDisplay[x].stay){
if(p<100){
if(x>0)me.OldDisplay[x].top=me.OldDisplay[x-1].top;
me.OldDisplay[x].e.d.a.style.color=me.Gray(me.avg(0,128,grow));
me.OldDisplay[x].e.style.overflow="hidden";
me.OldDisplay[x].e.style.top=me.avg(me.OldDisplay[x].oldtop,me.OldDisplay[x].top,grow)+"px";
}else{
me.element.removeChild(me.OldDisplay[x].e);
}
}
}
}
var etop;
var dashtop;
for(var i=0;i<d.Count;i++){
var n=d[i];
var n=d[i];
if(i>0){
var oh=n.prev.e.d.a.offsetHeight;
if(oh==0)oh=15;
n.etop=n.prev.etop+oh+10;
}else{
n.etop=n.top
}
n.stop=me.avg(n.oldtop,n.etop,grow);
n.e.style.top=me.avg(n.oldtop,n.etop,grow)+"px";
n.e.style.height=me.height+"px";
var oh=n.e.d.a.offsetHeight;
if(oh==0)oh=15;
dashtop=(oh+8);
n.e.dash.style.top=dashtop+"px";
if(n.etop+dashtop>maxdash)maxdash=n.etop+dashtop;
var ind=me.avg(n.oldindent,n.indent,grow);
n.e.icon.style.left=ind+"px";
n.e.icon.src=me.icons[n.className];
n.e.d.style.left=10+ind+"px";
if(n.oldcolor!=n.color)n.e.d.a.style.color=me.Gray(me.avg(n.oldcolor,n.color,grow));
n.e.onclick=p==100?me.onclick:null;
n.e.style.cursor='pointer';
if(false){
if(i>0)n.top=n.prev.top+n.prev.e.d.a.offsetHeight+10;
etop=me.avg(n.oldtop,n.top,grow);
n.e.style.top=etop+"px";
dashtop=(n.e.d.a.offsetHeight+8);
n.e.dash.style.top=dashtop+"px";
if(etop+dashtop>maxdash)maxdash=etop+dashtop;
var ind=me.avg(n.oldindent,n.indent,grow);
n.e.icon.style.left=ind+"px";
n.e.icon.src=me.icons[n.className];
n.e.d.style.left=10+ind+"px";
if(n.oldcolor!=n.color)n.e.d.a.style.color=me.Gray(me.avg(n.oldcolor,n.color,grow));
n.e.onclick=p==100?me.onclick:null;
n.e.style.cursor='pointer';
}
}
if(p==0)me.element.style.height=maxdash+"px";
}
me.avg=function(start,end,p){
return(start)+((end-start)*p);
}
me.GenerateDisplay=function(){
var d={Count:0};
var grand=null;
var c=0;
if(me.Node.getParent()){
me.AddToDisplay(d,me.Node.Parent,0,"grandparent");
me.Node.Parent.setExpanded(true);
}
if(me.Node.getParentList()){
while(c<me.Node.ParentList.Count&&grand!=me.Node){
grand=me.Node.ParentList[c];
if(grand!=me.Node){
me.AddToDisplay(d,grand,me.indent,"sibling");
}
c++;
}
}
me.Node.setExpanded(true);
var url=BaseHref+me.FormatCategoryName(me.Node.getTextPath());
me.AddToDisplay(d,me.Node,me.indent*1.5,"parent");
for(var i=0;i<me.Node.ChildNodes.Count;i++){
me.AddToDisplay(d,me.Node.ChildNodes[i],me.indent*2,"child");
}
if(me.Node.getParentList()){
grand=me.Node.ParentList[c];
while(c<me.Node.ParentList.Count&&grand!=me.Node){
grand=me.Node.ParentList[c];
if(grand!=me.Node){
me.AddToDisplay(d,grand,me.indent,"sibling");
}
c++;
}
}
return d;
}
me.AddToDisplay=function(d,Node,Indent,className,url){
var i=d.Count;
var found=false;
if(me.CurrentDisplay){
for(var x=0;x<me.CurrentDisplay.Count;x++){
if(me.CurrentDisplay[x].node==Node){
d[i]=me.CurrentDisplay[x];
d[i].stay=true;
d[i].oldindent=d[i].indent;
d[i].oldtop=d[i].top;
d[i].oldtop=d[i].etop;
d[i].top=i*me.height;
d[i].indent=Indent;
d[i].oldcolor=d[i].color;
d[i].className=Node.SelectAction==0?"product":className;
d[i].New=false;
found=true;
}
}
}
if(!found)d[i]=new me.NavNode(Node,Indent,i*me.height,0,Node.SelectAction==0?"product":className);
Node.href=(Node.SelectAction==0|className=="parent")?BaseHref+me.FormatCategoryName(Node.getTextPath())+(Node.SelectAction==0?"":"/"):"";
if(d[i].oldtop==0&i>0){
d[i].oldtop=d[i-1].oldtop;
}
d.Count=i+1;
}
me.Nodes=null;
me.FindSelectedNode=function(Nodes){
if(typeof Nodes=="undefined")Nodes=me.Nodes;
for(var i=0;i<Nodes.Count;i++){
if(Nodes[i].Selected)return Nodes[i];
var ret=me.FindSelectedNode(Nodes[i].ChildNodes);
if(ret)return ret;
}
}
me.Begin=function(ret){
if(ret.error){
alert(ret.error.Message+"\n"+ret.error.Stack);
return;
}
me.Nodes=ret.value;
me.SetOnPopulate(me.Nodes);
var sel=me.FindSelectedNode();
me.Node=sel==null?me.Nodes[0]:sel;
me.SetRoot(me.Node);
}
Kenwood.Kenworld.Utilities.GetProductsTreeFirst(categoryid,productid,me.Begin);
}
registerNamespace("Kenwood.Kenworld");
var Animator=new function(){
var Interval=10;
var Animators=[];
function DoAnimation(){
var MyAnimators=Animators;
for(var i=0;i<MyAnimators.length;i++){
var a=MyAnimators[i];
if(a.Animations.length==0){
Animators.remove(a)
}else{
var MyAnimations=a.Animations;
for(var x=0;x<MyAnimations.length;x++){
MyAnimations[x].Animate();
}
}
}
if(location.hash!="#_"&location.hash!="#"&location.hash!=""){
var message=location.hash;
while(message.substring(0,1)=="#")message=message.substring(1);
var qs=new Querystring(message);
var cmd=qs.get("cmd");
if(cmd=="rif"){
var iframe=document.getElementById(qs.get("fid"));
if(iframe!=null){
try{
iframe.style.width=(iframe.offsetWidth+parseInt(qs.get("w")))+"px";
iframe.style.height=(iframe.offsetHeight+parseInt(qs.get("h")))+"px";
}catch(ex){
}
}
}
location.hash="#_";
}
}
function GetProperty(element,property){
switch(property){
case"width":return element.offsetWidth;
case"height":return element.offsetHeight;
case"top":return element.offsetTop;
case"left":return element.offsetLeft;
}
return element.props[property];
}
this.GetProperty=GetProperty;
function SetProperty(element,property,value){
if(value==Infinity|value==-Infinity)value=0;
element.props[property]=value;
switch(property){
case"width":element.style.width=value+"px";break;
case"height":element.style.height=value+"px";break;
case"top":element.style.top=value+"px";break;
case"left":element.style.left=value+"px";break;
case"opacity":SetOpacity(element,value);break;
case"scale":element.style.zoom=value/100;break;
case"display":element.style.display=(value==0?"none":"");break;
}
}
this.SetProperty=SetProperty;
function SetOpacity(element,opacity){
if(typeof(element.props)=="undefined")element.props={};
element.props.opacity=opacity;
if(navigator.appName.indexOf("Microsoft")!=-1&&parseInt(navigator.appVersion)>=4)
{
if(element.filters.length==0)element.style.filter="progid:DXImageTransform.Microsoft.BasicImage(enabled=true)";
element.filters['DXImageTransform.Microsoft.BasicImage'].opacity=opacity/100;
}else{
try{
element.style.MozOpacity=opacity/100;
}catch(ex){
try{
element.style.opacity=opacity/100;
}catch(ex2){
}
}
}
}
this.SetOpacity=SetOpacity;
function Animation(element,property,parameters){
if(typeof(element.props)=="undefined")element.props={};
if(typeof(parameters.from)=="undefined")parameters.from=null;
if(typeof(parameters.to)=="undefined")parameters.to=null;
if(typeof(parameters.time)=="undefined")parameters.time=500;
if(typeof(parameters.speed)=="undefined")parameters.speed=null;
parameters.tick=0;
var a=this;
a.Animate=function(){
var from=parameters.from;
var to=parameters.to;
var time=parameters.time;
var speed=parameters.speed;
if(from==null)from=GetProperty(element,property);
if(to==null)to=from;
var diff=to-from;
var ticks=Math.ceil(time/Interval);
if(speed==null)speed=diff/ticks;
parameters.tick=parameters.tick+1;
var tick=parameters.tick;
var val=from+tick*speed;
if(tick==ticks){
val=to;
element.Animations.remove(a);
if(element.Animations.length==0){
Animators.remove(element);
if(element.onfinish){
element.onfinish();
}
}
if(parameters.onfinish){
parameters.onfinish();
}
}
SetProperty(element,property,val);
}
}
this.Animate=function(element,property,parameters){
if(typeof(element.Animations)=="undefined"){
element.Animations=[];
element.PropertyAnimations={};
}
var ani=new Animation(element,property,parameters);
element.Animations.add(ani);
if(typeof(element.PropertyAnimations[property])!="undefined"){
if(element.PropertyAnimations[property]!=null){
element.Animations.remove(element.PropertyAnimations[property]);
element.PropertyAnimations[property]=null;
}
}
element.PropertyAnimations[property]=ani;
if(!Animators.contains(element))Animators.add(element);
}
this.Batch=function(base,batch){
for(var i=0;i<batch.length;i++){
var n={};
for(var item in base){
n[item]=base[item];
}
var batchitem=batch[i];
for(var item in batchitem){
n[item]=batchitem[item];
}
this.Animate(n.element,n.property,n);
}
}
setInterval(DoAnimation,Interval);
}();
function WebForm_PostBackOptions(eventTarget,eventArgument,validation,validationGroup,actionUrl,trackFocus,clientSubmit){
this.eventTarget=eventTarget;
this.eventArgument=eventArgument;
this.validation=validation;
this.validationGroup=validationGroup;
this.actionUrl=actionUrl;
this.trackFocus=trackFocus;
this.clientSubmit=clientSubmit;
}
function WebForm_DoPostBackWithOptions(options){
var validationResult=true;
if(options.validation){
if(typeof(Page_ClientValidate)=='function'){
validationResult=Page_ClientValidate(options.validationGroup);
}
}
if(validationResult){
if((typeof(options.actionUrl)!="undefined")&&(options.actionUrl!=null)&&(options.actionUrl.length>0)){
theForm.action=options.actionUrl;
}
if(options.trackFocus){
var lastFocus=theForm.elements["__LASTFOCUS"];
if((typeof(lastFocus)!="undefined")&&(lastFocus!=null)){
if(typeof(document.activeElement)=="undefined"){
lastFocus.value=options.eventTarget;
}
else{
var active=document.activeElement;
if((typeof(active)!="undefined")&&(active!=null)){
if((typeof(active.id)!="undefined")&&(active.id!=null)&&(active.id.length>0)){
lastFocus.value=active.id;
}
else if(typeof(active.name)!="undefined"){
lastFocus.value=active.name;
}
}
}
}
}
}
if(options.clientSubmit){
__doPostBack(options.eventTarget,options.eventArgument);
}
}
var __pendingCallbacks=new Array();
var __synchronousCallBackIndex=-1;
function WebForm_DoCallback(eventTarget,eventArgument,eventCallback,context,errorCallback,useAsync){
var postData=__theFormPostData+
"__CALLBACKID="+WebForm_EncodeCallback(eventTarget)+
"&__CALLBACKPARAM="+WebForm_EncodeCallback(eventArgument);
if(theForm["__EVENTVALIDATION"]){
postData+="&__EVENTVALIDATION="+WebForm_EncodeCallback(theForm["__EVENTVALIDATION"].value);
}
var xmlRequest,e;
try{
xmlRequest=new XMLHttpRequest();
}
catch(e){
try{
xmlRequest=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){
}
}
var setRequestHeaderMethodExists=true;
try{
setRequestHeaderMethodExists=(xmlRequest&&xmlRequest.setRequestHeader);
}
catch(e){}
var callback=new Object();
callback.eventCallback=eventCallback;
callback.context=context;
callback.errorCallback=errorCallback;
callback.async=useAsync;
var callbackIndex=WebForm_FillFirstAvailableSlot(__pendingCallbacks,callback);
if(!useAsync){
if(__synchronousCallBackIndex!=-1){
__pendingCallbacks[__synchronousCallBackIndex]=null;
}
__synchronousCallBackIndex=callbackIndex;
}
if(setRequestHeaderMethodExists){
xmlRequest.onreadystatechange=WebForm_CallbackComplete;
callback.xmlRequest=xmlRequest;
xmlRequest.open("POST",theForm.action,true);
xmlRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlRequest.send(postData);
return;
}
callback.xmlRequest=new Object();
var callbackFrameID="__CALLBACKFRAME"+callbackIndex;
var xmlRequestFrame=document.frames[callbackFrameID];
if(!xmlRequestFrame){
xmlRequestFrame=document.createElement("IFRAME");
xmlRequestFrame.width="1";
xmlRequestFrame.height="1";
xmlRequestFrame.frameBorder="0";
xmlRequestFrame.id=callbackFrameID;
xmlRequestFrame.name=callbackFrameID;
xmlRequestFrame.style.position="absolute";
xmlRequestFrame.style.top="-100px"
xmlRequestFrame.style.left="-100px";
try{
if(callBackFrameUrl){
xmlRequestFrame.src=callBackFrameUrl;
}
}
catch(e){}
document.body.appendChild(xmlRequestFrame);
}
var interval=window.setInterval(function(){
xmlRequestFrame=document.frames[callbackFrameID];
if(xmlRequestFrame&&xmlRequestFrame.document){
window.clearInterval(interval);
xmlRequestFrame.document.write("");
xmlRequestFrame.document.close();
xmlRequestFrame.document.write('<html><body><form method="post"><input type="hidden" name="__CALLBACKLOADSCRIPT" value="t"></form></body></html>');
xmlRequestFrame.document.close();
xmlRequestFrame.document.forms[0].action=theForm.action;
var count=__theFormPostCollection.length;
var element;
for(var i=0;i<count;i++){
element=__theFormPostCollection[i];
if(element){
var fieldElement=xmlRequestFrame.document.createElement("INPUT");
fieldElement.type="hidden";
fieldElement.name=element.name;
fieldElement.value=element.value;
xmlRequestFrame.document.forms[0].appendChild(fieldElement);
}
}
var callbackIdFieldElement=xmlRequestFrame.document.createElement("INPUT");
callbackIdFieldElement.type="hidden";
callbackIdFieldElement.name="__CALLBACKID";
callbackIdFieldElement.value=eventTarget;
xmlRequestFrame.document.forms[0].appendChild(callbackIdFieldElement);
var callbackParamFieldElement=xmlRequestFrame.document.createElement("INPUT");
callbackParamFieldElement.type="hidden";
callbackParamFieldElement.name="__CALLBACKPARAM";
callbackParamFieldElement.value=eventArgument;
xmlRequestFrame.document.forms[0].appendChild(callbackParamFieldElement);
if(theForm["__EVENTVALIDATION"]){
var callbackValidationFieldElement=xmlRequestFrame.document.createElement("INPUT");
callbackValidationFieldElement.type="hidden";
callbackValidationFieldElement.name="__EVENTVALIDATION";
callbackValidationFieldElement.value=theForm["__EVENTVALIDATION"].value;
xmlRequestFrame.document.forms[0].appendChild(callbackValidationFieldElement);
}
var callbackIndexFieldElement=xmlRequestFrame.document.createElement("INPUT");
callbackIndexFieldElement.type="hidden";
callbackIndexFieldElement.name="__CALLBACKINDEX";
callbackIndexFieldElement.value=callbackIndex;
xmlRequestFrame.document.forms[0].appendChild(callbackIndexFieldElement);
xmlRequestFrame.document.forms[0].submit();
}
},10);
}
function WebForm_CallbackComplete(){
for(i=0;i<__pendingCallbacks.length;i++){
callbackObject=__pendingCallbacks[i];
if(callbackObject&&callbackObject.xmlRequest&&(callbackObject.xmlRequest.readyState==4)){
WebForm_ExecuteCallback(callbackObject);
if(!__pendingCallbacks[i].async){
__synchronousCallBackIndex=-1;
}
__pendingCallbacks[i]=null;
var callbackFrameID="__CALLBACKFRAME"+i;
var xmlRequestFrame=document.getElementById(callbackFrameID);
if(xmlRequestFrame){
xmlRequestFrame.parentNode.removeChild(xmlRequestFrame);
}
}
}
}
function WebForm_ExecuteCallback(callbackObject){
var response=callbackObject.xmlRequest.responseText;
if(response.charAt(0)=="s"){
if((typeof(callbackObject.eventCallback)!="undefined")&&(callbackObject.eventCallback!=null)){
callbackObject.eventCallback(response.substring(1),callbackObject.context);
}
}
else if(response.charAt(0)=="e"){
if((typeof(callbackObject.errorCallback)!="undefined")&&(callbackObject.errorCallback!=null)){
callbackObject.errorCallback(response.substring(1),callbackObject.context);
}
}
else{
var separatorIndex=response.indexOf("|");
if(separatorIndex!=-1){
var validationFieldLength=parseInt(response.substring(0,separatorIndex));
if(!isNaN(validationFieldLength)){
var validationField=response.substring(separatorIndex+1,separatorIndex+validationFieldLength+1);
if(validationField!=""){
var validationFieldElement=theForm["__EVENTVALIDATION"];
if(!validationFieldElement){
validationFieldElement=document.createElement("INPUT");
validationFieldElement.type="hidden";
validationFieldElement.name="__EVENTVALIDATION";
theForm.appendChild(validationFieldElement);
}
validationFieldElement.value=validationField;
}
if((typeof(callbackObject.eventCallback)!="undefined")&&(callbackObject.eventCallback!=null)){
callbackObject.eventCallback(response.substring(separatorIndex+validationFieldLength+1),callbackObject.context);
}
}
}
}
}
function WebForm_FillFirstAvailableSlot(array,element){
var i;
for(i=0;i<array.length;i++){
if(!array[i])break;
}
array[i]=element;
return i;
}
var __nonMSDOMBrowser=(window.navigator.appName.toLowerCase().indexOf('explorer')==-1);
var __theFormPostData="";
var __theFormPostCollection=new Array();
function WebForm_InitCallback(){
var count=theForm.elements.length;
var element;
for(var i=0;i<count;i++){
element=theForm.elements[i];
var tagName=element.tagName.toLowerCase();
if(tagName=="input"){
var type=element.type;
if((type=="text"||type=="hidden"||type=="password"||
((type=="checkbox"||type=="radio")&&element.checked))&&
(element.id!="__EVENTVALIDATION")){
WebForm_InitCallbackAddField(element.name,element.value);
}
}
else if(tagName=="select"){
var selectCount=element.options.length;
for(var j=0;j<selectCount;j++){
var selectChild=element.options[j];
if(selectChild.selected==true){
WebForm_InitCallbackAddField(element.name,element.value);
}
}
}
else if(tagName=="textarea"){
WebForm_InitCallbackAddField(element.name,element.value);
}
}
}
function WebForm_InitCallbackAddField(name,value){
var nameValue=new Object();
nameValue.name=name;
nameValue.value=value;
__theFormPostCollection[__theFormPostCollection.length]=nameValue;
__theFormPostData+=name+"="+WebForm_EncodeCallback(value)+"&";
}
function WebForm_EncodeCallback(parameter){
if(encodeURIComponent){
return encodeURIComponent(parameter);
}
else{
return escape(parameter);
}
}
var __disabledControlArray=new Array();
function WebForm_ReEnableControls(){
if(typeof(__enabledControlArray)=='undefined'){
return false;
}
var disabledIndex=0;
for(var i=0;i<__enabledControlArray.length;i++){
var c;
if(__nonMSDOMBrowser){
c=document.getElementById(__enabledControlArray[i]);
}
else{
c=document.all[__enabledControlArray[i]];
}
if((typeof(c)!="undefined")&&(c!=null)&&(c.disabled==true)){
c.disabled=false;
__disabledControlArray[disabledIndex++]=c;
}
}
setTimeout("WebForm_ReDisableControls()",0);
return true;
}
function WebForm_ReDisableControls(){
for(var i=0;i<__disabledControlArray.length;i++){
__disabledControlArray[i].disabled=true;
}
}
function WebForm_FireDefaultButton(event,target){
if(event.keyCode==13&&!(event.srcElement&&(event.srcElement.tagName.toLowerCase()=="textarea"))){
var defaultButton;
if(__nonMSDOMBrowser){
defaultButton=document.getElementById(target);
}
else{
defaultButton=document.all[target];
}
if(defaultButton&&typeof(defaultButton.click)!="undefined"){
defaultButton.click();
event.cancelBubble=true;
if(event.stopPropagation)event.stopPropagation();
return false;
}
}
return true;
}
function WebForm_GetScrollX(){
if(__nonMSDOMBrowser){
return window.pageXOffset;
}
else{
if(document.documentElement&&document.documentElement.scrollLeft){
return document.documentElement.scrollLeft;
}
else if(document.body){
return document.body.scrollLeft;
}
}
return 0;
}
function WebForm_GetScrollY(){
if(__nonMSDOMBrowser){
return window.pageYOffset;
}
else{
if(document.documentElement&&document.documentElement.scrollTop){
return document.documentElement.scrollTop;
}
else if(document.body){
return document.body.scrollTop;
}
}
return 0;
}
function WebForm_SaveScrollPositionSubmit(){
if(__nonMSDOMBrowser){
theForm.elements['__SCROLLPOSITIONY'].value=window.pageYOffset;
theForm.elements['__SCROLLPOSITIONX'].value=window.pageXOffset;
}
else{
theForm.__SCROLLPOSITIONX.value=WebForm_GetScrollX();
theForm.__SCROLLPOSITIONY.value=WebForm_GetScrollY();
}
if((typeof(this.oldSubmit)!="undefined")&&(this.oldSubmit!=null)){
return this.oldSubmit();
}
return true;
}
function WebForm_SaveScrollPositionOnSubmit(){
theForm.__SCROLLPOSITIONX.value=WebForm_GetScrollX();
theForm.__SCROLLPOSITIONY.value=WebForm_GetScrollY();
if((typeof(this.oldOnSubmit)!="undefined")&&(this.oldOnSubmit!=null)){
return this.oldOnSubmit();
}
return true;
}
function WebForm_RestoreScrollPosition(){
if(__nonMSDOMBrowser){
window.scrollTo(theForm.elements['__SCROLLPOSITIONX'].value,theForm.elements['__SCROLLPOSITIONY'].value);
}
else{
window.scrollTo(theForm.__SCROLLPOSITIONX.value,theForm.__SCROLLPOSITIONY.value);
}
if((typeof(theForm.oldOnLoad)!="undefined")&&(theForm.oldOnLoad!=null)){
return theForm.oldOnLoad();
}
return true;
}
function WebForm_TextBoxKeyHandler(event){
if(event.keyCode==13){
var target;
if(__nonMSDOMBrowser){
target=event.target;
}
else{
target=event.srcElement;
}
if((typeof(target)!="undefined")&&(target!=null)){
if(typeof(target.onchange)!="undefined"){
target.onchange();
event.cancelBubble=true;
if(event.stopPropagation)event.stopPropagation();
return false;
}
}
}
return true;
}
function WebForm_AppendToClassName(element,className){
var current=element.className;
if(current){
if(current.charAt(current.length-1)!=' '){
current+=' ';
}
current+=className;
}
else{
current=className;
}
element.className=current;
}
function WebForm_RemoveClassName(element,className){
var current=element.className;
if(current){
if(current.substring(current.length-className.length-1,current.length)==' '+className){
element.className=current.substring(0,current.length-className.length-1);
return;
}
if(current==className){
element.className="";
return;
}
var index=current.indexOf(' '+className+' ');
if(index!=-1){
element.className=current.substring(0,index)+current.substring(index+className.length+2,current.length);
return;
}
if(current.substring(0,className.length)==className+' '){
element.className=current.substring(className.length+1,current.length);
}
}
}
function WebForm_GetElementById(elementId){
if(document.getElementById){
return document.getElementById(elementId);
}
else if(document.all){
return document.all[elementId];
}
else return null;
}
function WebForm_GetElementByTagName(element,tagName){
var elements=WebForm_GetElementsByTagName(element,tagName);
if(elements&&elements.length>0){
return elements[0];
}
else return null;
}
function WebForm_GetElementsByTagName(element,tagName){
if(element&&tagName){
if(element.getElementsByTagName){
return element.getElementsByTagName(tagName);
}
if(element.all&&element.all.tags){
return element.all.tags(tagName);
}
}
return null;
}
function WebForm_GetElementDir(element){
if(element){
if(element.dir){
return element.dir;
}
return WebForm_GetElementDir(element.parentNode);
}
return"ltr";
}
function WebForm_GetElementPosition(element){
var result=new Object();
result.x=0;
result.y=0;
result.width=0;
result.height=0;
if(element.offsetParent){
result.x=element.offsetLeft;
result.y=element.offsetTop;
var parent=element.offsetParent;
while(parent){
result.x+=parent.offsetLeft;
result.y+=parent.offsetTop;
var parentTagName=parent.tagName.toLowerCase();
if(parentTagName!="table"&&
parentTagName!="body"&&
parentTagName!="html"&&
parentTagName!="div"&&
parent.clientTop&&
parent.clientLeft){
result.x+=parent.clientLeft;
result.y+=parent.clientTop;
}
parent=parent.offsetParent;
}
}
else if(element.left&&element.top){
result.x=element.left;
result.y=element.top;
}
else{
if(element.x){
result.x=element.x;
}
if(element.y){
result.y=element.y;
}
}
if(element.offsetWidth&&element.offsetHeight){
result.width=element.offsetWidth;
result.height=element.offsetHeight;
}
else if(element.style&&element.style.pixelWidth&&element.style.pixelHeight){
result.width=element.style.pixelWidth;
result.height=element.style.pixelHeight;
}
return result;
}
function WebForm_GetParentByTagName(element,tagName){
var parent=element.parentNode;
var upperTagName=tagName.toUpperCase();
while(parent&&(parent.tagName.toUpperCase()!=upperTagName)){
parent=parent.parentNode?parent.parentNode:parent.parentElement;
}
return parent;
}
function WebForm_SetElementHeight(element,height){
if(element&&element.style){
element.style.height=height+"px";
}
}
function WebForm_SetElementWidth(element,width){
if(element&&element.style){
element.style.width=width+"px";
}
}
function WebForm_SetElementX(element,x){
if(element&&element.style){
element.style.left=x+"px";
}
}
function WebForm_SetElementY(element,y){
if(element&&element.style){
element.style.top=y+"px";
}
}
function AC_AddExtension(src,ext)
{
if(src.indexOf('?')!=-1)
return src.replace(/\?/,ext+'?');
else
return src+ext;
}
function AC_Generateobj(objAttrs,params,embedAttrs)
{
var str='<object ';
for(var i in objAttrs)
str+=i+'="'+objAttrs[i]+'" ';
str+='>';
for(var i in params)
str+='<param name="'+i+'" value="'+params[i]+'" /> ';
str+='<embed ';
for(var i in embedAttrs)
str+=i+'="'+embedAttrs[i]+'" ';
str+=' ></embed></object>';
document.write(str);
}
function AC_FL_RunContent(){
var ret=
AC_GetArgs
(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
,"application/x-shockwave-flash"
);
AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);
}
function AC_SW_RunContent(){
var ret=
AC_GetArgs
(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000"
,null
);
AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);
}
function AC_GetArgs(args,ext,srcParamName,classid,mimeType){
var ret=new Object();
ret.embedAttrs=new Object();
ret.params=new Object();
ret.objAttrs=new Object();
for(var i=0;i<args.length;i=i+2){
var currArg=args[i].toLowerCase();
switch(currArg){
case"classid":
break;
case"pluginspage":
ret.embedAttrs[args[i]]=args[i+1];
break;
case"src":
case"movie":
args[i+1]=AC_AddExtension(args[i+1],ext);
ret.embedAttrs["src"]=args[i+1];
ret.params[srcParamName]=args[i+1];
break;
case"onafterupdate":
case"onbeforeupdate":
case"onblur":
case"oncellchange":
case"onclick":
case"ondblClick":
case"ondrag":
case"ondragend":
case"ondragenter":
case"ondragleave":
case"ondragover":
case"ondrop":
case"onfinish":
case"onfocus":
case"onhelp":
case"onmousedown":
case"onmouseup":
case"onmouseover":
case"onmousemove":
case"onmouseout":
case"onkeypress":
case"onkeydown":
case"onkeyup":
case"onload":
case"onlosecapture":
case"onpropertychange":
case"onreadystatechange":
case"onrowsdelete":
case"onrowenter":
case"onrowexit":
case"onrowsinserted":
case"onstart":
case"onscroll":
case"onbeforeeditfocus":
case"onactivate":
case"onbeforedeactivate":
case"ondeactivate":
case"type":
case"codebase":
ret.objAttrs[args[i]]=args[i+1];
break;
case"width":
case"height":
case"align":
case"vspace":
case"hspace":
case"class":
case"title":
case"accesskey":
case"name":
case"id":
case"tabindex":
ret.embedAttrs[args[i]]=ret.objAttrs[args[i]]=args[i+1];
break;
default:
ret.embedAttrs[args[i]]=ret.params[args[i]]=args[i+1];
}
}
ret.objAttrs["classid"]=classid;
if(mimeType)ret.embedAttrs["type"]=mimeType;
return ret;
}
registerNamespace("Kenwood.Kenworld");
var Animator=new function(){
var Interval=10;
var Animators=[];
function DoAnimation(){
var MyAnimators=Animators;
for(var i=0;i<MyAnimators.length;i++){
var a=MyAnimators[i];
if(a.Animations.length==0){
Animators.remove(a)
}else{
var MyAnimations=a.Animations;
for(var x=0;x<MyAnimations.length;x++){
MyAnimations[x].Animate();
}
}
}
if(location.hash!="#_"&location.hash!="#"&location.hash!=""){
var message=location.hash;
while(message.substring(0,1)=="#")message=message.substring(1);
var qs=new Querystring(message);
var cmd=qs.get("cmd");
if(cmd=="rif"){
var iframe=document.getElementById(qs.get("fid"));
if(iframe!=null){
try{
iframe.style.width=(iframe.offsetWidth+parseInt(qs.get("w")))+"px";
iframe.style.height=(iframe.offsetHeight+parseInt(qs.get("h")))+"px";
}catch(ex){
}
}
}
location.hash="#_";
}
}
function GetProperty(element,property){
switch(property){
case"width":return element.offsetWidth;
case"height":return element.offsetHeight;
case"top":return element.offsetTop;
case"left":return element.offsetLeft;
}
return element.props[property];
}
this.GetProperty=GetProperty;
function SetProperty(element,property,value){
if(value==Infinity|value==-Infinity)value=0;
element.props[property]=value;
switch(property){
case"width":element.style.width=value+"px";break;
case"height":element.style.height=value+"px";break;
case"top":element.style.top=value+"px";break;
case"left":element.style.left=value+"px";break;
case"opacity":SetOpacity(element,value);break;
case"scale":element.style.zoom=value/100;break;
case"display":element.style.display=(value==0?"none":"");break;
}
}
this.SetProperty=SetProperty;
function SetOpacity(element,opacity){
if(typeof(element.props)=="undefined")element.props={};
element.props.opacity=opacity;
if(navigator.appName.indexOf("Microsoft")!=-1&&parseInt(navigator.appVersion)>=4)
{
if(element.filters.length==0)element.style.filter="progid:DXImageTransform.Microsoft.BasicImage(enabled=true)";
element.filters['DXImageTransform.Microsoft.BasicImage'].opacity=opacity/100;
}else{
try{
element.style.MozOpacity=opacity/100;
}catch(ex){
try{
element.style.opacity=opacity/100;
}catch(ex2){
}
}
}
}
this.SetOpacity=SetOpacity;
function Animation(element,property,parameters){
if(typeof(element.props)=="undefined")element.props={};
if(typeof(parameters.from)=="undefined")parameters.from=null;
if(typeof(parameters.to)=="undefined")parameters.to=null;
if(typeof(parameters.time)=="undefined")parameters.time=500;
if(typeof(parameters.speed)=="undefined")parameters.speed=null;
parameters.tick=0;
var a=this;
a.Animate=function(){
var from=parameters.from;
var to=parameters.to;
var time=parameters.time;
var speed=parameters.speed;
if(from==null)from=GetProperty(element,property);
if(to==null)to=from;
var diff=to-from;
var ticks=Math.ceil(time/Interval);
if(speed==null)speed=diff/ticks;
parameters.tick=parameters.tick+1;
var tick=parameters.tick;
var val=from+tick*speed;
if(tick==ticks){
val=to;
element.Animations.remove(a);
if(element.Animations.length==0){
Animators.remove(element);
if(element.onfinish){
element.onfinish();
}
}
if(parameters.onfinish){
parameters.onfinish();
}
}
SetProperty(element,property,val);
}
}
this.Animate=function(element,property,parameters){
if(typeof(element.Animations)=="undefined"){
element.Animations=[];
element.PropertyAnimations={};
}
var ani=new Animation(element,property,parameters);
element.Animations.add(ani);
if(typeof(element.PropertyAnimations[property])!="undefined"){
if(element.PropertyAnimations[property]!=null){
element.Animations.remove(element.PropertyAnimations[property]);
element.PropertyAnimations[property]=null;
}
}
element.PropertyAnimations[property]=ani;
if(!Animators.contains(element))Animators.add(element);
}
this.Batch=function(base,batch){
for(var i=0;i<batch.length;i++){
var n={};
for(var item in base){
n[item]=base[item];
}
var batchitem=batch[i];
for(var item in batchitem){
n[item]=batchitem[item];
}
this.Animate(n.element,n.property,n);
}
}
setInterval(DoAnimation,Interval);
}();
function ConstructMenu(){
function getid(id){return document.getElementById(id);}
var row1=getid("menu_row1");
var row2=getid("menu_row2");
var menus=row1.childNodes;
var submenus=row2.childNodes;
var activemenu=null;
var activesubmenu=null;
var e;
for(var i=0;i<menus.length;i++){
var menu=menus[i];
if(menu.className!="menu_filler"){
menu.table=menu.childNodes[0];
menu.tbody=menu.table.childNodes[0];
menu.row=menu.tbody.childNodes[0];
menu.arrow=menu.row.childNodes[0];
menu.image=menu.row.childNodes[1];
menu.a=menu.image.childNodes[0];
}
}
function resetMenu(menu){
menu.arrow.style.marginLeft="25px";
menu.arrow.style.marginRight="0px";
menu.arrow.style.backgroundPosition="12px 0px";
menu.image.style.backgroundPosition="0px 0px";
}
function cell_onmouseover(){
if(activemenu!=this){
if(activemenu!=null){
resetMenu(activemenu);
}
activemenu=this;
activesubmenu=this.submenu;
BeginAnimation();
}
}
var animationtimer=null;
var animationprogress=0;
var lastsubx=-1;
var lastarrowx=-1;
var lastopacity=-1;
function BeginAnimation(){
lastsubx=-1;
lastarrowx=-1;
lastopacity=-1;
if(animationtimer==null){
animationtimer=setInterval(Animate,33);
}
for(var s=0;s<submenus.length;s++){
var submenu=submenus[s];
if(submenu==activesubmenu){
if(m.filters)submenu.filters.item(0).opacity=0;
submenu.style.opacity="0";
submenu.style.display="";
}else{
submenu.style.display="none";
}
}
var menu=activemenu;
menu.arrow.style.backgroundPosition="0px -40px";
menu.image.style.backgroundPosition="0px 38px";
animationprogress=0;
}
function Animate(){
var maxw=870;
var incr=(100-animationprogress)*.1;
if(incr<1)incr=1;
var p=animationprogress+=incr;
if(p>99)p=100;
var m=activesubmenu;
var menu=activemenu;
if(p<=100){
if(m!=null){
var mleft=menu.offsetLeft;
var mwidth=menu.offsetWidth;
var smwidth=m.offsetWidth;
var smleft=(mleft+(mwidth/2))-(smwidth/2)
if(smleft+smwidth>maxw)smleft=maxw-smwidth;
if(smleft<0)smleft=0;
if(Math.floor(p)!=Math.floor(lastopacity)){
if(m.filters)m.filters.item(0).opacity=p;
m.style.opacity=p/100;
}
lastopacity=p;
var l=(-25+((p/100)*25));
if(Math.floor(l)!=Math.floor(lastsubx)){
m.style.left=(l+smleft)+'px';
}
}
var ax=Math.floor(12*(p/100));
if(ax!=lastarrowx){
menu.arrow.style.backgroundPosition=ax+"px -40px";
}
}
if(p==100){
clearInterval(animationtimer);
animationtimer=null;
}
}
for(var m=0;m<menus.length;m++){
var menu=menus[m];
if(menu.className!="menu_filler"){
var submenu=getid(menu.id+"_sub");
menu.submenu=submenu;
if(submenu!=null)submenu.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=0)";
menu.onmouseover=cell_onmouseover;
}
}
}
function popuplink(a){
var sFeatures="";
var url=a.href;
var name="";
if(a.target)name=a.target;
if(a.features)sFeatures=a.features;
try{
var w=window.open(url,name,sFeatures);
window.event.returnValue=false;
window.event.cancelBubble=true;
return false;
}catch(ex){
return true;
}
}
var cpsFirstTime=true;
var CompareButton;
var CompareList;
function ConstructCompareButton(){
function GetModels(){
var models=getCookieJSON("CompareModels");
if(models==null){
models=[];
}
return models;
}
function SetModels(models){
setCookieJSON("CompareModels",models,30,"/",'','');
}
cpsFirstTime=false;
var Canvas=document.getElementById("Canvas");
var ButtonCanvas=document.getElementById("CompareButtonCanvas");
CompareButton=document.createElement("img");
CompareButton.src="/images/compare.gif";
CompareButton.title="Click to Compare";
CompareButton.style.cursor="hand";
ButtonCanvas.appendChild(CompareButton);
var copy=null;
CompareButton.flash=function(){
CompareButton.UpdateVisibility();
return;
if(copy==null){
copy=CompareButton.cloneNode();
copy.style.position="absolute";
copy.style.display="none";
Canvas.appendChild(copy);
}
var but=WebForm_GetElementPosition(CompareButton);
Animator.Batch({element:copy,time:250},[{property:'top',from:but.y,to:but.y-10},{property:'left',from:but.x,to:but.x-40},{property:'scale',from:100,to:200},{property:'opacity',from:100,to:0},{property:'display',from:100,to:0}]);
}
CompareButton.addModel=function(modelnumber){
var models=GetModels();
if(!models.contains(modelnumber)){
models.add(modelnumber);
CompareList.Add(modelnumber);
}
SetModels(models);
}
CompareButton.removeModel=function(modelnumber){
var models=GetModels();
if(models.contains(modelnumber)){
models.remove(modelnumber);
CompareList.Remove(modelnumber);
}
SetModels(models);
CompareButton.UpdateVisibility();
}
CompareButton.onclick=function(){
var models=GetModels();
location.href="/Compare/?Models="+models.join(',');
}
CompareButton.onmouseover=function(){
CompareButton.GainFocus();
}
CompareButton.onmouseout=function(){
CompareButton.LoseFocus();
}
var focus=0;
var focustimer=null;
CompareButton.GainFocus=function(){
focus=true;
if(focustimer!=null){
clearTimeout(focustimer);
focustimer=null;
}
CompareList.style.display="";
var pos=WebForm_GetElementPosition(CompareList);
var but=WebForm_GetElementPosition(CompareButton);
CompareList.style.left=((but.x+but.width)-pos.width)+"px";
CompareList.style.top=(but.y+but.height)+"px";
CompareList.style.display="";
}
CompareButton.LoseFocus=function(){
focus=false;
focustimer=setTimeout(CompareButton.HideList,500);
}
CompareButton.HideList=function(){
if(focus)return;
focustimer=null;
CompareList.style.display="none";
}
CompareButton.UpdateVisibility=function(){
var models=GetModels();
if(models.length==0){
CompareButton.style.visibility="hidden";
CompareList.style.display="none";
}else{
CompareButton.style.visibility="";
}
}
ConstructCompareList();
var models=GetModels();
for(var i=0;i<models.length;i++){
CompareList.Add(models[i]);
}
CompareButton.UpdateVisibility();
}
function ConstructCompareList(){
var Canvas=document.getElementById("Canvas");
var div=document.createElement("div");
div.style.position="absolute";
div.style.top="0px";
div.style.left="0px";
div.style.border="solid 1px black";
div.style.backgroundColor="white";
div.style.display="none";
Canvas.appendChild(div);
CompareList=div;
var rows={};
var tbl=document.createElement("table");
var tbody=document.createElement("tbody");
div.appendChild(tbl);
tbl.appendChild(tbody);
div.Add=function(model){
var tr=document.createElement("tr");
var cell1=document.createElement("td");
var cell2=document.createElement("td");
var img=document.createElement("img");
tr.appendChild(cell1);
tr.appendChild(cell2);
cell1.appendChild(document.createTextNode(model));
cell1.style.width="100px";
img.src="/images/trash.gif";
img.style.cursor="hand";
img.title="Click to Remove";
img.onclick=function(){
CompareButton.removeModel(model);
}
cell2.appendChild(img);
cell2.style.width="18px";
tbody.appendChild(tr);
rows[model]=tr;
}
div.Remove=function(model){
tbody.removeChild(rows[model]);
}
div.onmouseover=function(){
CompareButton.GainFocus();
}
div.onmouseout=function(){
CompareButton.LoseFocus();
}
}
function ConstructProductSelect(id,compid,modelnumber,defaultWidth,defaultHeight){
if(cpsFirstTime)ConstructCompareButton();
var Canvas=document.getElementById("Canvas");
var e=document.getElementById(id);
var c=document.getElementById(compid);
e.style.position="relative";
if(navigator.appName.indexOf("Microsoft")!=-1&&parseInt(navigator.appVersion)>=4)
{
e.clone=true;
}
else
{
e.clone=false;
}
var copy=null;
var a=document.createElement("img");
e.addbutton=a;
a.src="/images/psAdd.gif";
a.style.width="74px";
a.style.height="16px";
a.style.visibility="hidden";
c.appendChild(a);
e.onmouseover=function(){
a.style.visibility="";
}
e.onmouseout=function(){
a.style.visibility="hidden";
}
a.onclick=function(){
CompareButton.addModel(modelnumber);
var pos=WebForm_GetElementPosition(e);
if(pos.width==0)pos.width=defaultWidth;
if(pos.height==0)pos.height=defaultHeight;
var but=WebForm_GetElementPosition(CompareButton);
if(copy==null){
if(e.clone){
copy=e.cloneNode(true);
copy.style.border="solid 1px black";
copy.style.position="absolute";
copy.style.display="none";
copy.style.backgroundColor="white";
}else{
copy=document.createElement("div");
copy.style.position="absolute";
copy.style.border="solid 1px black";
copy.style.display="none";
}
Canvas.appendChild(copy);
}
copy.style.width=e.offsetWidth+"px";
copy.style.height=e.offsetHeight+"px";
if(e.clone){
Animator.Batch({element:copy,time:600,from:100,to:0},[{property:"top",from:pos.y,to:but.y,onfinish:CompareButton.flash},{property:"left",from:pos.x,to:but.x},{property:"display",time:500},{property:"scale",to:25,time:500}]);
}else{
Animator.Batch({element:copy,time:600,from:100,to:0},[{property:"top",from:pos.y,to:but.y,onfinish:CompareButton.flash},{property:"left",from:pos.x,to:but.x},{property:"width",from:pos.width,to:but.width},{property:"height",from:pos.height,to:but.height},{property:"display"}]);
}
}
}
function serialize(o){
return Sys.Serialization.JavaScriptSerializer.serialize(o);
}
function deserialize(o){
return Sys.Serialization.JavaScriptSerializer.deserialize(o);
}
function getCookieJSON(name){
try{
var ret=Sys.Serialization.JavaScriptSerializer.deserialize(getCookie(name));
if(typeof(ret)=="undefined")return null;
return ret;
}catch(ex){
return null;
}
}
function setCookieJSON(name,value,expires,path,domain,secure){
var ret=Sys.Serialization.JavaScriptSerializer.serialize(value);
setCookie(name,ret,expires,path,domain,secure);
}
function getCookie(name){
var start=document.cookie.indexOf(name+"=");
var len=start+name.length+1;
if((!start)&&(name!=document.cookie.substring(0,name.length))){
return null;
}
if(start==-1)return null;
var end=document.cookie.indexOf(";",len);
if(end==-1)end=document.cookie.length;
return unescape(document.cookie.substring(len,end));
}
function setCookie(name,value,expires,path,domain,secure){
var today=new Date();
today.setTime(today.getTime());
if(expires){
expires=expires*1000*60*60*24;
}
var expires_date=new Date(today.getTime()+(expires));
document.cookie=name+"="+escape(value)+
((expires)?";expires="+expires_date.toGMTString():"")+
((path)?";path="+path:"")+
((domain)?";domain="+domain:"")+
((secure)?";secure":"");
}
function deleteCookie(name,path,domain){
if(getCookie(name))document.cookie=name+"="+
((path)?";path="+path:"")+
((domain)?";domain="+domain:"")+
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
function ConstructCustomScrollBar(canvasid,targetid){
var canvas=document.getElementById(canvasid);
var target=document.getElementById(targetid);
var div=document.createElement("div");
div.style.overflowX='scroll';
var img=document.createElement("img");
img.src="/images/blank.gif";
img.style.height="1px";
div.appendChild(img);
function Update(){
div.style.width=target.offsetWidth+"px";
img.style.width=target.scrollWidth+"px";
}
}
var stackc=0;
var stacks=[];
function Stack(func){
stacks[stackc]=func;
stackc++;
if(stackc==5){
alert(stacks.join(', '));
throw"Overflow";
}
}
function Unstack(){
stackc--;
}
function ScrollBar(){
var sb=this;
sb.Element=null;
sb.onscroll=null;
sb.get_Minimum=function(){return minimum;}
sb.set_Minimum=function(value){
minimum=value;
Redraw();
}
sb.get_Maximum=function(){return maximum;}
sb.set_Maximum=function(value){
maximum=value;
Redraw();
}
sb.get_Width=function(){return width;}
sb.set_Width=function(value){
width=value;
Redraw();
}
sb.get_Value=function(){return value;}
sb.set_Value=function(val){
value=val;
Redraw();
}
var width;
var minimum;
var maximum;
var smallChange;
var largeChange;
var outerDiv;
var innerDiv;
var value;
function Redraw(){
Stack("Redraw");
var pages=maximum/largeChange;
var innerWidth=pages*100;
innerDiv.style.width=innerWidth+"%";
if(width.toString().indexOf("%")!=-1){
outerDiv.style.width=width;
}else{
outerDiv.style.width=width+"px";
}
var valuepercent=((value-minimum)/(maximum-minimum));
outerDiv.scrollLeft=Math.round(valuepercent*outerDiv.scrollWidth);
Unstack();
}
function Scroll(){
Stack("Scroll");
var val=minimum+((outerDiv.scrollLeft/outerDiv.scrollWidth)*maximum);
value=val;
if(sb.onscroll){
sb.onscroll(sb);
}
Unstack();
}
{
width=80;
minimum=0;
maximum=100;
smallChange=1;
largeChange=10;
outerDiv=document.createElement("div");
outerDiv.style.overflowX="scroll";
outerDiv.style.overflowY="hidden";
outerDiv.style.height="19px";
outerDiv.onscroll=Scroll;
innerDiv=document.createElement("div");
innerDiv.style.width="100%";
innerDiv.style.height="0px";
outerDiv.appendChild(innerDiv);
sb.Element=outerDiv;
Redraw();
}
sb.Attachment=null;
function Attachment_onscroll(bar){
Stack("Attachment_onscroll");
window.status=bar.get_Value();
sb.Attachment.scrollLeft=bar.get_Value();
Unstack();
}
function Attachment_onclientscroll(){
Stack("Attachment_onclientscroll");
var sb=this.sb;
var div=this;
sb.set_Value(div.scrollLeft);
Unstack();
}
sb.Attach=function(div){
sb.Attachment=div;
maximum=div.scrollWidth;
minimum=0;
largeChange=div.clientWidth;
value=div.scrollLeft;
width=div.clientWidth;
Redraw();
sb.onscroll=Attachment_onscroll;
div.sb=sb;
div.onscroll=Attachment_onclientscroll;
}
}
function ConstructLanguageMenu(){
var canvas=document.getElementById("Canvas");
var div=document.getElementById("LanguageMenu");
var button=document.getElementById("LanguageButton");
var focus=false;
var focustimer=null;
function Hide(){
if(focus)return;
focustimer=null;
div.style.display="none";
}
function GainFocus(){
focus=true;
if(focustimer!=null){
clearTimeout(focustimer);
focustimer=null;
}
div.style.display="inline";
var pos=WebForm_GetElementPosition(button);
var size=WebForm_GetElementPosition(div);
div.style.left=((pos.x+pos.width)-size.width)+"px";
div.style.top=(pos.y+pos.height)+"px";
}
function LoseFocus(){
focus=false;
if(focustimer!=null){
clearTimeout(focustimer);
}
focustimer=setTimeout(Hide,500);
}
button.onmouseover=function(){
GainFocus();
}
button.onmouseout=function(){
LoseFocus();
}
div.onmouseover=function(){
GainFocus();
}
div.onmouseout=function(){
LoseFocus();
}
canvas.appendChild(div);
}
function Querystring(qs){
this.params=new Object()
this.get=Querystring_get
if(qs==null)
qs=location.search.substring(1,location.search.length)
if(qs.length==0)return
qs=qs.replace(/\+/g,' ')
var args=qs.split('&')
for(var i=0;i<args.length;i++){
var value;
var pair=args[i].split('=')
var name=unescape(pair[0])
if(pair.length==2)
value=unescape(pair[1])
else
value=name
this.params[name]=value
}
}
function Querystring_get(key,default_){
if(default_==null)default_=null;
var value=this.params[key]
if(value==null)value=default_;
return value
}
Object.extend=function(dest,source,replace){
for(prop in source){
if(replace==false&&dest[prop]!=null)continue;
dest[prop]=source[prop];
}
return dest;
}
Object.extend(Function.prototype,{
apply:function(o,a){
var r,x="__fapply";
if(typeof o!="object")o={};
o[x]=this;
var s="r = o."+x+"(";
for(var i=0;i<a.length;i++){
if(i>0)s+=",";
s+="a["+i+"]";
}
s+=");";
eval(s);
delete o[x];
return r;
},
bind:function(o){
if(!Function.__objs){
Function.__objs=[];
Function.__funcs=[];
}
var objId=o.__oid;
if(!objId)
Function.__objs[objId=o.__oid=Function.__objs.length]=o;
var me=this;
var funcId=me.__fid;
if(!funcId)
Function.__funcs[funcId=me.__fid=Function.__funcs.length]=me;
if(!o.__closures)
o.__closures=[];
var closure=o.__closures[funcId];
if(closure)
return closure;
o=null;
me=null;
return Function.__objs[objId].__closures[funcId]=function(){
return Function.__funcs[funcId].apply(Function.__objs[objId],arguments);
};
}
},false);
Object.extend(Array.prototype,{
push:function(o){
this[this.length]=o;
},
addRange:function(items){
if(items.length>0)
for(var i=0;i<items.length;i++)
this.push(items[i]);
},
clear:function(){
this.length=0;
return this;
},
shift:function(){
if(this.length==0)return null;
var o=this[0];
for(var i=0;i<this.length-1;i++)
this[i]=this[i+1];
this.length--;
return o;
}
},false);
Object.extend(String.prototype,{
trimLeft:function(){
return this.replace(/^\s*/,"");
},
trimRight:function(){
return this.replace(/\s*$/,"");
},
trim:function(){
return this.trimRight().trimLeft();
},
endsWith:function(s){
if(this.length==0||this.length<s.length)return false;
return(this.substr(this.length-s.length)==s);
},
startsWith:function(s){
if(this.length==0||this.length<s.length)return false;
return(this.substr(0,s.length)==s);
},
split:function(c){
var a=[];
if(this.length==0)return a;
var p=0;
for(var i=0;i<this.length;i++){
if(this.charAt(i)==c){
a.push(this.substring(p,i));
p=++i;
}
}
a.push(s.substr(p));
return a;
}
},false);
Object.extend(String,{
format:function(s){
for(var i=1;i<arguments.length;i++)
s=s.replace("{"+(i-1)+"}",arguments[i]);
return s;
},
isNullOrEmpty:function(s){
if(s==null||s.length==0)
return true;
return false;
}
},false);
if(typeof addEvent=="undefined")
addEvent=function(o,evType,f,capture){
if(o==null)return false;
if(o.addEventListener){
o.addEventListener(evType,f,capture);
return true;
}else if(o.attachEvent){
var r=o.attachEvent("on"+evType,f);
return r;
}else{
try{o["on"+evType]=f;}catch(e){}
}
};
if(typeof removeEvent=="undefined")
removeEvent=function(o,evType,f,capture){
if(o==null)return false;
if(o.removeEventListener){
o.removeEventListener(evType,f,capture);
return true;
}else if(o.detachEvent){
o.detachEvent("on"+evType,f);
}else{
try{o["on"+evType]=function(){};}catch(e){}
}
};
Object.extend(Function.prototype,{
getArguments:function(){
var args=[];
for(var i=0;i<this.arguments.length;i++)
args.push(this.arguments[i]);
return args;
}
},false);
var MS={"Browser":{}};
Object.extend(MS.Browser,{
isIE:navigator.userAgent.indexOf('MSIE')!=-1,
isFirefox:navigator.userAgent.indexOf('Firefox')!=-1,
isOpera:window.opera!=null
},false);
var AjaxPro={};
AjaxPro.IFrameXmlHttp=function(){};
AjaxPro.IFrameXmlHttp.prototype={
onreadystatechange:null,headers:[],method:"POST",url:null,async:true,iframe:null,
status:0,readyState:0,responseText:null,
abort:function(){
},
readystatechanged:function(){
var doc=this.iframe.contentDocument||this.iframe.document;
if(doc!=null&&doc.readyState=="complete"&&doc.body!=null&&doc.body.res!=null){
this.status=200;
this.statusText="OK";
this.readyState=4;
this.responseText=doc.body.res;
this.onreadystatechange();
return;
}
setTimeout(this.readystatechanged.bind(this),10);
},
open:function(method,url,async){
if(async==false){
alert("Synchronous call using IFrameXMLHttp is not supported.");
return;
}
if(this.iframe==null){
var iframeID="hans";
if(document.createElement&&document.documentElement&&
(window.opera||navigator.userAgent.indexOf('MSIE 5.0')==-1))
{
var ifr=document.createElement('iframe');
ifr.setAttribute('id',iframeID);
ifr.style.visibility='hidden';
ifr.style.position='absolute';
ifr.style.width=ifr.style.height=ifr.borderWidth='0px';
this.iframe=document.getElementsByTagName('body')[0].appendChild(ifr);
}
else if(document.body&&document.body.insertAdjacentHTML)
{
document.body.insertAdjacentHTML('beforeEnd','<iframe name="'+iframeID+'" id="'+iframeID+'" style="border:1px solid black;display:none"></iframe>');
}
if(window.frames&&window.frames[iframeID])this.iframe=window.frames[iframeID];
this.iframe.name=iframeID;
this.iframe.document.open();
this.iframe.document.write("<html><body></body></html>");
this.iframe.document.close();
}
this.method=method;
this.url=url;
this.async=async;
},
setRequestHeader:function(name,value){
for(var i=0;i<this.headers.length;i++){
if(this.headers[i].name==name){
this.headers[i].value=value;
return;
}
}
this.headers.push({"name":name,"value":value});
},
getResponseHeader:function(name,value){
return null;
},
addInput:function(doc,form,name,value){
var ele;
var tag="input";
if(value.indexOf("\n")>=0)tag="textarea";
if(doc.all){
ele=doc.createElement("<"+tag+" name=\""+name+"\" />");
}else{
ele=doc.createElement(tag);
ele.setAttribute("name",name);
}
ele.setAttribute("value",value);
form.appendChild(ele);
ele=null;
},
send:function(data){
if(this.iframe==null){
return;
}
var doc=this.iframe.contentDocument||this.iframe.document;
var form=doc.createElement("form");
doc.body.appendChild(form);
form.setAttribute("action",this.url);
form.setAttribute("method",this.method);
form.setAttribute("enctype","application/x-www-form-urlencoded");
for(var i=0;i<this.headers.length;i++){
switch(this.headers[i].name.toLowerCase()){
case"content-length":
case"accept-encoding":
case"content-type":
break;
default:
this.addInput(doc,form,this.headers[i].name,this.headers[i].value);
}
}
this.addInput(doc,form,"data",data);
form.submit();
setTimeout(this.readystatechanged.bind(this),1);
}
};
var progids=["Msxml2.XMLHTTP","Microsoft.XMLHTTP"];
var _progid=null;
if(typeof ActiveXObject!="undefined"){
var ie7xmlhttp=false;
if(typeof XMLHttpRequest=="object"){
try{var o=new XMLHttpRequest();ie7xmlhttp=true;}catch(e){}
}
if(typeof XMLHttpRequest=="undefined"||!ie7xmlhttp){
XMLHttpRequest=function(){
var xmlHttp=null;
if(!AjaxPro.noActiveX){
if(_progid)return new ActiveXObject(_progid);
for(var i=0;i<progids.length&&xmlHttp==null;i++){
try{
xmlHttp=new ActiveXObject(progids[i]);
progid=progids[i];
}catch(e){}
}
}
if(xmlHttp==null&&MS.Browser.isIE){
return new AjaxPro.IFrameXmlHttp();
}
return xmlHttp;
};
}
}
Object.extend(AjaxPro,{
noOperation:function(){},
onLoading:function(){},
onError:function(){},
onTimeout:function(){},
onStateChanged:function(){},
cryptProvider:null,
queue:null,
token:"",
version:"6.7.20.1",
ID:"AjaxPro",
noActiveX:false,
timeoutPeriod:10*1000,
queue:null,
toJSON:function(o){
if(o==null)
return"null";
switch(o.constructor){
case String:
var v=[];
for(var i=0;i<o.length;i++){
var c=o.charAt(i);
if(c>=" "){
if(c=="\\"||c=='"')v.push("\\");
v.push(c);
}else{
switch(c){
case"\n":v.push("\\n");break;
case"\r":v.push("\\r");break;
case"\b":v.push("\\b");break;
case"\f":v.push("\\f");break;
case"\t":v.push("\\t");break;
default:
v.push("\\u00");
v.push(c.charCodeAt().toString(16));
}
}
}
return'"'+v.join('')+'"';
case Array:
var v=[];
for(var i=0;i<o.length;i++)
v.push(AjaxPro.toJSON(o[i]));
return"["+v.join(",")+"]";
case Number:
return isFinite(o)?o.toString():AjaxPro.toJSON(null);
case Boolean:
return o.toString();
case Date:
var d=new Object();
d.__type="System.DateTime";
d.Year=o.getUTCFullYear();
d.Month=o.getUTCMonth()+1;
d.Day=o.getUTCDate();
d.Hour=o.getUTCHours();
d.Minute=o.getUTCMinutes();
d.Second=o.getUTCSeconds();
d.Millisecond=o.getUTCMilliseconds();
return AjaxPro.toJSON(d);
default:
if(typeof o.toJSON=="function")
return o.toJSON();
if(typeof o=="object"){
var v=[];
for(attr in o){
if(typeof o[attr]!="function")
v.push('"'+attr+'":'+AjaxPro.toJSON(o[attr]));
}
if(v.length>0)
return"{"+v.join(",")+"}";
return"{}";
}
return o.toString();
}
},
dispose:function(){
if(AjaxPro.queue!=null){
AjaxPro.queue.dispose();
}
}
},false);
addEvent(window,"unload",AjaxPro.dispose);
AjaxPro.Request=function(url){
this.url=url;
this.xmlHttp=null;
};
AjaxPro.Request.prototype={
url:null,
callback:null,
onLoading:AjaxPro.noOperation,
onError:AjaxPro.noOperation,
onTimeout:AjaxPro.noOperation,
onStateChanged:AjaxPro.noOperation,
args:null,
context:null,
isRunning:false,
abort:function(){
if(this.timeoutTimer!=null)clearTimeout(this.timeoutTimer);
if(this.xmlHttp){
this.xmlHttp.onreadystatechange=AjaxPro.noOperation;
this.xmlHttp.abort();
}
if(this.isRunning){
this.isRunning=false;
this.onLoading(false);
}
},
dispose:function(){
this.abort();
},
getEmptyRes:function(){
return{
error:null,
value:null,
request:{method:this.method,args:this.args},
context:this.context,
duration:this.duration
};
},
endRequest:function(res){
this.abort();
if(res.error!=null)this.onError(res.error,this);
if(typeof this.callback=="function")
this.callback(res,this);
},
mozerror:function(){
if(this.timeoutTimer!=null)clearTimeout(this.timeoutTimer);
var res=this.getEmptyRes();
res.error={Message:"Unknown",Type:"ConnectFailure",Status:0};
this.endRequest(res);
},
doStateChange:function(){
this.onStateChanged(this.xmlHttp.readyState,this);
if(this.xmlHttp.readyState!=4||!this.isRunning)
return;
this.duration=new Date().getTime()-this.__start;
if(this.timeoutTimer!=null)clearTimeout(this.timeoutTimer);
var res=this.getEmptyRes();
if(this.xmlHttp.status==200&&this.xmlHttp.statusText=="OK"){
res=this.createResponse(res);
}else{
res=this.createResponse(res,true);
res.error={Message:this.xmlHttp.statusText,Type:"ConnectFailure",Status:this.xmlHttp.status};
}
this.endRequest(res);
},
createResponse:function(r,noContent){
if(!noContent){
var responseText=new String(this.xmlHttp.responseText);
if(AjaxPro.cryptProvider!=null&&typeof AjaxPro.cryptProvider=="function")
responseText=AjaxPro.cryptProvider.decrypt(responseText);
if(this.xmlHttp.getResponseHeader("Content-Type")=="text/xml")
r.value=this.xmlHttp.responseXML;
else{
if(responseText!=null&&responseText.trim().length>0){
r.json=responseText;
eval("r.value = "+responseText+"*/");
}
}
}
return r;
},
timeout:function(){
this.duration=new Date().getTime()-this.__start;
var r=this.onTimeout(this.duration,this);
if(typeof r=="undefined"||r!=false){
this.abort();
}else{
this.timeoutTimer=setTimeout(this.timeout.bind(this),AjaxPro.timeoutPeriod);
}
},
invoke:function(method,args,callback,context){
this.__start=new Date().getTime();
if(this.xmlHttp==null)
this.xmlHttp=new XMLHttpRequest();
this.isRunning=true;
this.method=method;
this.args=args;
this.callback=callback;
this.context=context;
var async=typeof callback=="function"&&callback!=AjaxPro.noOperation;
if(async){
if(MS.Browser.isIE)
this.xmlHttp.onreadystatechange=this.doStateChange.bind(this);
else{
this.xmlHttp.onload=this.doStateChange.bind(this);
this.xmlHttp.onerror=this.mozerror.bind(this);
}
this.onLoading(true);
}
var json=AjaxPro.toJSON(args)+"";
if(AjaxPro.cryptProvider!=null)
json=AjaxPro.cryptProvider.encrypt(json);
this.xmlHttp.open("POST",this.url,async);
this.xmlHttp.setRequestHeader("Content-Type","text/plain; charset=utf-8");
this.xmlHttp.setRequestHeader("X-"+AjaxPro.ID+"-Method",method);
if(AjaxPro.token!=null&&AjaxPro.token.length>0)
this.xmlHttp.setRequestHeader("X-"+AjaxPro.ID+"-Token",AjaxPro.token);
if(!MS.Browser.isIE){
this.xmlHttp.setRequestHeader("Connection","close");
}
this.timeoutTimer=setTimeout(this.timeout.bind(this),AjaxPro.timeoutPeriod);
try{this.xmlHttp.send(json);}catch(e){}
if(!async){
return this.createResponse({error:null,value:null});
}
return true;
}
};
AjaxPro.RequestQueue=function(conc){
this.queue=[];
this.requests=[];
this.timer=null;
if(isNaN(conc))conc=2;
for(var i=0;i<conc;i++){
this.requests[i]=new AjaxPro.Request();
this.requests[i].callback=function(res){
var r=res.context;
res.context=r[3][1];
r[3][0](res,this);
};
this.requests[i].callbackHandle=this.requests[i].callback.bind(this.requests[i]);
}
};
AjaxPro.RequestQueue.prototype={
process:function(){
this.timer=null;
if(this.queue.length==0)return;
for(var i=0;i<this.requests.length&&this.queue.length>0;i++){
if(this.requests[i].isRunning==false){
var r=this.queue.shift();
this.requests[i].url=r[0];
this.requests[i].onLoading=r[3].length>2&&r[3][2]!=null&&typeof r[3][2]=="function"?r[3][2]:AjaxPro.onLoading;
this.requests[i].onError=r[3].length>3&&r[3][3]!=null&&typeof r[3][3]=="function"?r[3][3]:AjaxPro.onError;
this.requests[i].onTimeout=r[3].length>4&&r[3][4]!=null&&typeof r[3][4]=="function"?r[3][4]:AjaxPro.onTimeout;
this.requests[i].onStateChanged=r[3].length>5&&r[3][5]!=null&&typeof r[3][5]=="function"?r[3][5]:AjaxPro.onStateChanged;
this.requests[i].invoke(r[1],r[2],this.requests[i].callbackHandle,r);
r=null;
}
}
if(this.queue.length>0&&this.timer==null){
this.timer=setTimeout(this.process.bind(this),10);
}
},
add:function(url,method,args,e){
this.queue.push([url,method,args,e]);
if(this.timer==null){
this.timer=setTimeout(this.process.bind(this),1);
}
},
abort:function(){
this.queue.length=0;
if(this.timer!=null){
clearTimeout(this.timer);
}
this.timer=null;
for(var i=0;i<this.requests.length;i++){
if(this.requests[i].isRunning==true){
this.requests[i].abort();
}
}
},
dispose:function(){
for(var i=0;i<this.requests.length;i++){
var r=this.requests[i];
r.dispose();
}
this.requests.clear();
}
};
AjaxPro.queue=new AjaxPro.RequestQueue(2);
AjaxPro.AjaxClass=function(url){
this.url=url;
};
AjaxPro.AjaxClass.prototype={
invoke:function(method,args,e){
if(e!=null){
if(e.length!=6)for(;e.length<6;)e.push(null);
if(e[0]!=null&&typeof e[0]=="function"){
return AjaxPro.queue.add(this.url,method,args,e);
}
}
var r=new AjaxPro.Request();
r.url=this.url;
return r.invoke(method,args);
}
};
if(typeof Ajax=="undefined")Ajax={};
if(typeof Ajax.Web=="undefined")Ajax.Web={};
Ajax.Web.NameValueCollection=function(items){
this.__type="System.Collections.Specialized.NameValueCollection";
this.keys=[];
this.values=[];
if(items!=null&&!isNaN(items.length)){
for(var i=0;i<items.length;i++)
this.add(items[i][0],items[i][1]);
}
}
Object.extend(Ajax.Web.NameValueCollection.prototype,{
add:function(k,v){
if(k==null||k.constructor!=String||v==null||v.constructor!=String)
return-1;
this.keys.push(k);
this.values.push(v);
return this.values.length-1;
},
containsKey:function(key){
for(var i=0;i<this.keys.length;i++)
if(this.keys[i]==key)return true;
return false;
},
getKeys:function(){
return this.keys;
},
getValue:function(k){
for(var i=0;i<this.keys.length&&i<this.values.length;i++)
if(this.keys[i]==k)return this.values[i];
return null;
},
setValue:function(k,v){
if(k==null||k.constructor!=String||v==null||v.constructor!=String)
return-1;
for(var i=0;i<this.keys.length&&i<this.values.length;i++){
if(this.keys[i]==k)this.values[i]=v;
return i;
}
return this.add(k,v);
},
toJSON:function(){
return AjaxPro.toJSON({__type:this.__type,keys:this.keys,values:this.values});
}
},true);
if(typeof Ajax=="undefined")Ajax={};
if(typeof Ajax.Web=="undefined")Ajax.Web={};
Ajax.Web.DataSet=function(t){
this.__type="System.Data.DataSet,System.Data";
this.Tables=[];
this.addTable=function(t){
this.Tables.push(t);
}
if(t!=null){
for(var i=0;i<t.length;i++){
this.addTable(t[i]);
}
}
}
if(typeof Ajax=="undefined")Ajax={};
if(typeof Ajax.Web=="undefined")Ajax.Web={};
Ajax.Web.DataTable=function(c,r){
this.__type="System.Data.DataTable,System.Data";
this.Columns=[];
this.Rows=[];
this.addColumn=function(name,type){
this.Columns.push({Name:name,__type:type});
}
this.toJSON=function(){
var dt={};
dt.Columns=[];
for(var i=0;i<this.Columns.length;i++)
dt.Columns.push([this.Columns[i].Name,this.Columns[i].__type]);
dt.Rows=[];
for(var i=0;i<this.Rows.length;i++){
var row=[];
for(var j=0;j<this.Columns.length;j++)
row.push(this.Rows[i][this.Columns[j].Name]);
dt.Rows.push(row);
}
return AjaxPro.toJSON(dt);
}
this.addRow=function(row){
this.Rows.push(row);
}
if(c!=null){
for(var i=0;i<c.length;i++)
this.addColumn(c[i][0],c[i][1]);
}
if(r!=null){
for(var i=0;i<r.length;i++){
var row={};
for(var c=0;c<this.Columns.length&&c<r[i].length;c++)
row[this.Columns[c].Name]=r[i][c];
this.addRow(row);
}
}
}
if(typeof Ajax=="undefined")Ajax={};
if(typeof Ajax.Web=="undefined")Ajax.Web={};
Ajax.Web.Profile=function(){
this.toJSON=function(){
throw"Ajax.Web.Profile cannot be converted to JSON format.";
}
this.setProperty_callback=function(res){
}
this.setProperty=function(name,object){
this[name]=object;
AjaxPro.Services.Profile.SetProfile({name:o},this.setProperty_callback.bind(this));
}
}
if(typeof Ajax=="undefined")Ajax={};
if(typeof Ajax.Web=="undefined")Ajax.Web={};
Ajax.Web.Dictionary=function(type,items){
this.__type=type;
this.keys=[];
this.values=[];
if(items!=null&&!isNaN(items.length)){
for(var i=0;i<items.length;i++)
this.add(items[i][0],items[i][1]);
}
}
Object.extend(Ajax.Web.Dictionary.prototype,{
add:function(k,v){
this.keys.push(k);
this.values.push(v);
return this.values.length-1;
},
containsKey:function(key){
for(var i=0;i<this.keys.length;i++)
if(this.keys[i]==key)return true;
return false;
},
getKeys:function(){
return this.keys;
},
getValue:function(key){
for(var i=0;i<this.keys.length&&i<this.values.length;i++)
if(this.keys[i]==key)return this.values[i];
return null;
},
setValue:function(k,v){
for(var i=0;i<this.keys.length&&i<this.values.length;i++){
if(this.keys[i]==k)this.values[i]=v;
return i;
}
return this.add(k,v);
},
toJSON:function(){
return AjaxPro.toJSON({__type:this.__type,keys:this.keys,values:this.values});
}
},true);
var TreeNodeLines=[
{Line:0,Type:0,Char:' ',Img:'blank.gif'},
{Line:1,Type:0,Char:'│',Img:'line1.gif'},
{Line:2,Type:0,Char:'└',Img:'line2.gif'},
{Line:3,Type:0,Char:'├',Img:'line3.gif'},
{Line:4,Type:0,Char:'┌',Img:'line4.gif'},
{Line:0,Type:5,Char:'+',Img:'plus.gif'},
{Line:1,Type:5,Char:'+',Img:'plus1.gif'},
{Line:2,Type:5,Char:'+',Img:'plus2.gif'},
{Line:3,Type:5,Char:'+',Img:'plus3.gif'},
{Line:4,Type:5,Char:'+',Img:'plus4.gif'},
{Line:0,Type:10,Char:'-',Img:'minus.gif'},
{Line:1,Type:10,Char:'-',Img:'minus1.gif'},
{Line:2,Type:10,Char:'-',Img:'minus2.gif'},
{Line:3,Type:10,Char:'-',Img:'minus3.gif'},
{Line:4,Type:10,Char:'-',Img:'minus4.gif'}
];
var TreeNodeProperties=[
{a:'T',f:'Text'},
{a:'V',f:'Value'},
{a:'I',f:'ImageUrl'},
{a:'N',f:'NavigateUrl'},
{a:'G',f:'Target'},
{a:'C',f:'ChildNodes'},
{a:'E',f:'Expanded'},
{a:'P',f:'PopulateOnDemand'},
{a:'S',f:'Selected'},
{a:'A',f:'SelectAction'}
];
var TreeNodeID_Counter=0;
var TreeNodeID=function(){
return'TreeNode_'+TreeNodeID_Counter++;
}
var TreeNode=function(text,value,imageUrl,navigateUrl,target){
var me=this;
this.uniqueID=TreeNodeID();
me.Checked='';
me.setChecked=function(value){
me.Checked=value;
}
me.Expanded=false;
me.setExpanded=function(value){
if(me.PopulateOnDemand==true&&me.OnPopulate){
me.OnPopulate(me);
me.setPopulateOnDemand(false);
}
me.Expanded=value;
}
me.ImageToolTip='';
me.setImageToolTip=function(value){
me.ImageToolTip=value;
}
me.ImageUrl='';
me.setImageUrl=function(value){
me.ImageUrl=value;
}
me.NavigateUrl='';
me.setNavigateUrl=function(value){
me.NavigateUrl=value;
}
me.PopulateOnDemand=false;
me.setPopulateOnDemand=function(value){
me.PopulateOnDemand=value;
}
me.SelectAction='';
me.setSelectAction=function(value){
me.SelectAction=value;
}
me.Selected='';
me.setSelected=function(value){
me.Selected=value;
}
me.ShowCheckbox='';
me.setShowCheckbox=function(value){
me.ShowCheckbox=value;
}
me.Target='';
me.setTarget=function(value){
me.Target=value;
}
me.Text='';
me.setText=function(value){
me.Text=value;
}
me.ToolTip='';
me.setToolTip=function(value){
me.ToolTip=value;
}
me.Value='';
me.setValue=function(value){
me.Value=value;
}
me.Parent=null;
me.setParent=function(value){
me.Parent=value;
}
me.getParent=function(){
return me.Parent;
}
me.ParentList=null;
me.setParentList=function(value){
me.ParentList=value;
}
me.getParentList=function(){
return me.ParentList;
}
me.OnPopulate=null;
if(typeof text=='object'){
for(var d in TreeNodeProperties){
var a=TreeNodeProperties[d].a;
var f=TreeNodeProperties[d].f;
if(typeof text[a]!='undefined'){
if(me['set'+f]){
me['set'+f](text[a]);
}else{
me[f]=text[a];
}
}
}
}else{
}
if(typeof text=='string')me.setText(text);
if(typeof value!='undefined')me.setValue(value);
if(typeof imageUrl!='undefined')me.setImageUrl(imageUrl);
if(typeof navigateUrl!='undefined')me.setNavigateUrl(navigateUrl);
if(typeof target!='undefined')me.setTarget(target);
if(typeof me.ChildNodes=='undefined')me.ChildNodes=new TreeNodeCollection();
me.ChildNodes.setOwner(me);
me.Depth=-2;
me.getDepth=function(){
if(me.Parent==null){
me.Depth=-1;
}else{
me.Depth=me.Parent.getDepth()+1;
}
return me.Depth;
}
me.getLine=function(){
var line;
var outerline;
var myindex;
var amlast;
var amfirst;
var children=me.ChildNodes.Count==0?false:true;
var expand=children
if(me.Expanded==false)expand=false;
if(me.ParentList){
myindex=me.ParentList.IndexOf(me);
amlast=myindex==me.ParentList.Count-1?true:false;
}else{
myindex=0;
amlast=true;
}
var parent=me.Parent==null?false:true;
amfirst=myindex==0?true:false;
if(amfirst&amlast){
line=parent?2:0;
outerline=0;
}else if(amfirst&!amlast){
line=parent?3:4;
outerline=1;
}else if(!amfirst&amlast){
line=2;
outerline=0;
}else if(!amfirst&!amlast){
line=3;
outerline=1;
}
if(children){
if(expand){
type=10;
}else{
type=5;
}
}else{
type=0;
}
var ret=TreeNodeLines[type+line];
ret.OuterLine=TreeNodeLines[outerline];
return ret;
}
me.getLineString=function(outer){
var line=me.getLine();
var ParentLine='';
if(outer==2){
if(me.Parent)ParentLine=me.Parent.getLineString(2);
return ParentLine+line.OuterLine.Char;
}else{
if(me.Parent)ParentLine=me.Parent.getLineString(2);
return ParentLine+line.Char;
}
}
me.ValuePath='';
me.getValuePath=function(){
if(me.Parent!=null){
var ppath=me.Parent.getValuePath();
me.ValuePath=((ppath.length==0)&&(me.Parent.getDepth()==-1))?me.Value:(ppath+'/'+me.Value);
return me.ValuePath;
}
return me.Value;
}
me.TextPath='';
me.getTextPath=function(){
if(me.Parent!=null){
var ppath=me.Parent.getTextPath();
me.TextPath=((ppath.length==0)&&(me.Parent.getDepth()==-1))?me.Text:(ppath+'/'+me.Text);
return me.TextPath;
}
return me.Text;
}
me.toString=function(){
var indent='';
me.getDepth();
indent=me.getLineString();
var strOut;
strOut=indent+' '+me.Text+'\n';
strOut+=me.ChildNodes;
return strOut;
}
}
var TN=TreeNode;
var TreeNodeCollection=function(list,owner){
var me=this;
me.Count=0;
if(typeof list=='object'){
if(typeof list.C!='undefined')list.Count=list.C;
for(var i=0;i<list.Count;i++){
me[i]=list[i];
me[i].setParentList(me);
}
me.Count=list.Count;
delete list;
}
me._owner=typeof owner=='undefined'?owner:null;
me.setOwner=function(owner){
me._owner=owner;
for(var i=0;i<me.Count;i++){
me[i].setParent(owner);
}
}
me.Add=function(child){
me.AddAt(me.Count,child);
}
me.AddAt=function(index,child){
if(child.ParentList!=null){
child.ParentList.Remove(child);
}
if(index>me.Count)index=me.Count;
child.setParent(me._owner);
child.setParentList(me);
for(var i=me.Count;i>index;i--){
me[i]=me[i-1];
}
me[index]=child;
me.Count=me.Count+1;
}
me.Clear=function(){
while(me.Count!=0){
me.Remove(me[me.Count-1]);
}
}
me.IndexOf=function(child){
for(var i=0;i<me.Count;i++){
if(me[i]==child)return i;
}
return-1;
}
me.RemoveAt=function(index){
me[index].setParent(null);
for(var i=index;i<me.Count;i++){
me[i]=me[i+1];
}
delete me[me.Count];
me.Count=me.Count-1;
}
me.Remove=function(child){
var index=me.IndexOf(child);
if(index!=-1){
me.RemoveAt(index);
}
}
me.toString=function(){
var strOut='';
for(var i=0;i<me.Count;i++){
strOut+=me[i];
}
return strOut;
}
}
var TNC=TreeNodeCollection;
var ImageBehavior=function(type){
var me=this;
me.ImageType=type;
switch(type){
case 1:
me.Extension='.jpg';
me.MimeType='image/jpeg';
me.Resizable=true;
me.HTML='<img src=\'{0}\' width=\'{1}\' height=\'{2}\' border=\'0\' />';
break;
case 2:
me.Extension='.gif';
me.MimeType='image/gif';
me.Resizable=false;
me.HTML='<img src=\'{0}\' width=\'{1}\' height=\'{2}\' border=\'0\' />';
break;
case 3:
me.Extension='.png';
me.MimeType='image/png';
me.Resizable=true;
me.HTML='<img src=\'images/blank.gif\' width=\'{1}\' height=\'{2}\' border=\'0\' style=\"filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'/{0}\', sizingMethod=\'scale\');\" />';
break;
case 4:
me.Extension='.swf';
me.MimeType='application/x-shockwave-flash';
me.Resizable=false;
me.HTML='<embed src=\'{0}\' width=\'{1}\' height=\'{2}\' />';
break;
default:
me.Extension='.img';
me.MimeType='image/unknown';
me.Resizable=false;
me.HTML='';
break;
}
}
var SqlAjaxWriter=function(query,records,fields,count,fieldcount){
var me=this;
me.__type="SqlAjaxWriter,App_Code";
me.Query=query;
me._Records=records;
me._Fields=fields;
me._Count=count;
me.RecordCount=count;
me.FieldCount=fieldcount;
me._FieldCount=fieldcount;
me._Cursor=-1;
me._Ordinals={};
for(var o=0;o<me._FieldCount;o++){
me._Ordinals[o]=me._Fields[o];
me._Ordinals[me._Fields[o]]=o;
}
me.SetCursor=function(row){
me._Cursor=row-1;
return me.Read();
}
me.Read=function(){
me._Cursor=me._Cursor+1;
if(me._Cursor>=me._Count||me._Count==0){
return false;
}else{
me._Record=me._Records[me._Cursor];
for(var i=0;i<me._FieldCount;i++){
var name=me._GetName(i);
var value=me._Record[i];
me[i]=value;
me[name]=value;
me[name.toLowerCase()]=value;
}
return true;
}
}
me._GetOrdinal=function(name){
var i;
for(i=0;i<=me._FieldCount-1;i++)
{
if(name.toLowerCase()==me._Fields[i].toLowerCase())
{
return i;
}
}
throw'Field Not Found: '+name;
return 0;
}
me._GetName=function(ordinal){
return me._Fields[ordinal];
}
me.ReadCell=function(column,row){
return me._Records[row][column];
}
me.toJSON=function(){
return AjaxPro.toJSON([me._Records,me._Fields,me._Count,me._FieldCount]);
}
}
if(typeof Kenwood=="undefined")Kenwood={};
if(typeof Kenwood.Kenworld=="undefined")Kenwood.Kenworld={};
Kenwood.Kenworld.Imaging_class=function(){};
Object.extend(Kenwood.Kenworld.Imaging_class.prototype,Object.extend(new AjaxPro.AjaxClass(),{
SearchGlobalImages:function(Criterea){
return this.invoke("SearchGlobalImages",{"Criterea":Criterea},this.SearchGlobalImages.getArguments().slice(1));
},
GetImageInfo:function(ImageID){
return this.invoke("GetImageInfo",{"ImageID":ImageID},this.GetImageInfo.getArguments().slice(1));
},
GetImageSize:function(ImageID){
return this.invoke("GetImageSize",{"ImageID":ImageID},this.GetImageSize.getArguments().slice(1));
},
GetImagePath:function(ImageID){
return this.invoke("GetImagePath",{"ImageID":ImageID},this.GetImagePath.getArguments().slice(1));
},
url:'/ajaxpro/Kenwood.Kenworld.Imaging,App_Code.qpqtoq8n.ashx'
}));
Kenwood.Kenworld.Imaging=new Kenwood.Kenworld.Imaging_class();
if(typeof Kenwood=="undefined")Kenwood={};
if(typeof Kenwood.Kenworld=="undefined")Kenwood.Kenworld={};
Kenwood.Kenworld.DB_class=function(){};
Object.extend(Kenwood.Kenworld.DB_class.prototype,Object.extend(new AjaxPro.AjaxClass(),{
CheckModelNumber:function(modelnumber){
return this.invoke("CheckModelNumber",{"modelnumber":modelnumber},this.CheckModelNumber.getArguments().slice(1));
},
GetGlobalTextString:function(TextID){
return this.invoke("GetGlobalTextString",{"TextID":TextID},this.GetGlobalTextString.getArguments().slice(1));
},
GetGlobalTextIDInt:function(Text){
return this.invoke("GetGlobalTextIDInt",{"Text":Text},this.GetGlobalTextIDInt.getArguments().slice(1));
},
url:'/ajaxpro/Kenwood.Kenworld.DB,App_Code.qpqtoq8n.ashx'
}));
Kenwood.Kenworld.DB=new Kenwood.Kenworld.DB_class();
if(typeof Kenwood=="undefined")Kenwood={};
if(typeof Kenwood.Kenworld=="undefined")Kenwood.Kenworld={};
Kenwood.Kenworld.Translation_class=function(){};
Object.extend(Kenwood.Kenworld.Translation_class.prototype,Object.extend(new AjaxPro.AjaxClass(),{
GetLanguages:function(){
return this.invoke("GetLanguages",{},this.GetLanguages.getArguments().slice(0));
},
GetTranslations:function(CountryID,LanguageID,HideCompleted){
return this.invoke("GetTranslations",{"CountryID":CountryID,"LanguageID":LanguageID,"HideCompleted":HideCompleted},this.GetTranslations.getArguments().slice(3));
},
SetTranslation:function(CountryID,LanguageID,TextID,Text){
return this.invoke("SetTranslation",{"CountryID":CountryID,"LanguageID":LanguageID,"TextID":TextID,"Text":Text},this.SetTranslation.getArguments().slice(4));
},
url:'/ajaxpro/Kenwood.Kenworld.Translation,App_Code.qpqtoq8n.ashx'
}));
Kenwood.Kenworld.Translation=new Kenwood.Kenworld.Translation_class();
if(typeof Kenwood=="undefined")Kenwood={};
if(typeof Kenwood.Kenworld=="undefined")Kenwood.Kenworld={};
Kenwood.Kenworld.Utilities_class=function(){};
Object.extend(Kenwood.Kenworld.Utilities_class.prototype,Object.extend(new AjaxPro.AjaxClass(),{
GetGarbageCollectorStatus:function(){
return this.invoke("GetGarbageCollectorStatus",{},this.GetGarbageCollectorStatus.getArguments().slice(0));
},
GetCategoriesTree:function(){
return this.invoke("GetCategoriesTree",{},this.GetCategoriesTree.getArguments().slice(0));
},
GetCategoryPath:function(CategoryID){
return this.invoke("GetCategoryPath",{"CategoryID":CategoryID},this.GetCategoryPath.getArguments().slice(1));
},
GetCategoryPathLink:function(CategoryID){
return this.invoke("GetCategoryPathLink",{"CategoryID":CategoryID},this.GetCategoryPathLink.getArguments().slice(1));
},
GetCategoryPathString:function(CategoryID){
return this.invoke("GetCategoryPathString",{"CategoryID":CategoryID},this.GetCategoryPathString.getArguments().slice(1));
},
GetProductsTreeFirst:function(CategoryID,ProductID){
return this.invoke("GetProductsTreeFirst",{"CategoryID":CategoryID,"ProductID":ProductID},this.GetProductsTreeFirst.getArguments().slice(2));
},
GetProductsTree:function(ParentID){
return this.invoke("GetProductsTree",{"ParentID":ParentID},this.GetProductsTree.getArguments().slice(1));
},
url:'/ajaxpro/Kenwood.Kenworld.Utilities,App_Code.qpqtoq8n.ashx'
}));
Kenwood.Kenworld.Utilities=new Kenwood.Kenworld.Utilities_class();
if(typeof Kenwood=="undefined")Kenwood={};
if(typeof Kenwood.Kenworld=="undefined")Kenwood.Kenworld={};
Kenwood.Kenworld.Articles_class=function(){};
Object.extend(Kenwood.Kenworld.Articles_class.prototype,Object.extend(new AjaxPro.AjaxClass(),{
SaveTemplate:function(Name,Type,Template){
return this.invoke("SaveTemplate",{"Name":Name,"Type":Type,"Template":Template},this.SaveTemplate.getArguments().slice(3));
},
SaveSnippet:function(Name,Type,Snippet){
return this.invoke("SaveSnippet",{"Name":Name,"Type":Type,"Snippet":Snippet},this.SaveSnippet.getArguments().slice(3));
},
GetTemplateTypes:function(){
return this.invoke("GetTemplateTypes",{},this.GetTemplateTypes.getArguments().slice(0));
},
GetSnippetTypes:function(){
return this.invoke("GetSnippetTypes",{},this.GetSnippetTypes.getArguments().slice(0));
},
DeleteTemplate:function(ID){
return this.invoke("DeleteTemplate",{"ID":ID},this.DeleteTemplate.getArguments().slice(1));
},
DeleteSnippet:function(ID){
return this.invoke("DeleteSnippet",{"ID":ID},this.DeleteSnippet.getArguments().slice(1));
},
url:'/ajaxpro/Kenwood.Kenworld.Articles,App_Code.qpqtoq8n.ashx'
}));
Kenwood.Kenworld.Articles=new Kenwood.Kenworld.Articles_class();
if(typeof System=="undefined")System={};
if(typeof System.Data=="undefined")System.Data={};
if(typeof System.Data.SqlClient=="undefined")System.Data.SqlClient={};
System.Data.SqlClient.SqlAjaxWriter_class=function(){};
Object.extend(System.Data.SqlClient.SqlAjaxWriter_class.prototype,Object.extend(new AjaxPro.AjaxClass(),{
url:'/ajaxpro/System.Data.SqlClient.SqlAjaxWriter,App_Code.qpqtoq8n.ashx'
}));
System.Data.SqlClient.SqlAjaxWriter=new System.Data.SqlClient.SqlAjaxWriter_class();
(function(){
function getInner(l,n,s){
if(!l||l==""||!n||n==""||!s||s=="")return"-";
var i,i2,i3,c="-";
i=l.indexOf(n);
i3=n.indexOf("=")+1;
if(i>-1){
i2=l.indexOf(s,i);if(i2<0){i2=l.length;}
c=l.substring((i+i3),i2);
}
return c;
}
function detectAdmin(){
var h=location.hash,a;
if(h&&h!=""&&h.indexOf("#kwa=")==0){
a=getInner(h,"kwa=","&");
setCookie("kwa",a);
}else{
a=getCookie("kwa");
}
return a;
}
var a=detectAdmin();
if(!a||a==""||a==null)return;
var sc=document.createElement('script');
sc.type='text/javascript';
sc.id="_kwajs";
sc.src='http://pa.dev.kenworld.local/scripts/admin.js?kwa='+a+'&'+Math.random();
document.getElementsByTagName('head')[0].appendChild(sc);
})()

