//START Compat.Timer.Timer.js
// (c) 2010 CodePlex Foundation
(function(){var b="ExtendedTimer";function a(){var a="tick",b="interval",c=Sys.version;if(!c&&!Sys._versionChecked){Sys._versionChecked=true;throw new Error("AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll.");}Sys.Timer=function(){var a=this;Sys.Timer.initializeBase(a);a._interval=1e3;a._enabled=false;a._timer=null};Sys.Timer.prototype={get_interval:function(){return this._interval},set_interval:function(c){var a=this;if(a._interval!==c){a._interval=c;a.raisePropertyChanged(b);if(!a.get_isUpdating()&&a._timer!==null){a._stopTimer();a._startTimer()}}},get_enabled:function(){return this._enabled},set_enabled:function(b){var a=this;if(b!==a.get_enabled()){a._enabled=b;a.raisePropertyChanged("enabled");if(!a.get_isUpdating())if(b)a._startTimer();else a._stopTimer()}},add_tick:function(b){this.get_events().addHandler(a,b)},remove_tick:function(b){this.get_events().removeHandler(a,b)},dispose:function(){this.set_enabled(false);this._stopTimer();Sys.Timer.callBaseMethod(this,"dispose")},updated:function(){var a=this;Sys.Timer.callBaseMethod(a,"updated");if(a._enabled){a._stopTimer();a._startTimer()}},_timerCallback:function(){var b=this.get_events().getHandler(a);b&&b(this,Sys.EventArgs.Empty)},_startTimer:function(){var a=this;a._timer=window.setInterval(Function.createDelegate(a,a._timerCallback),a._interval)},_stopTimer:function(){window.clearInterval(this._timer);this._timer=null}};Sys.Timer.descriptor={properties:[{name:b,type:Number},{name:"enabled",type:Boolean}],events:[{name:a}]};Sys.Timer.registerClass("Sys.Timer",Sys.Component)}if(window.Sys&&Sys.loader)Sys.loader.registerScript(b,["ComponentModel"],a);else a()})();
//END Compat.Timer.Timer.js
//START Animation.Animations.js
// (c) 2010 CodePlex Foundation
(function(){var b="ExtendedAnimations";function a(){var k="unit",x="endValue",w="startValue",h="style",y="property",v="forceLayoutInIE",u="maximumOpacity",t="minimumOpacity",j="px",q="height",p="width",g="onEnd",d="onStart",i="animations",o="step",n="ended",m="started",s="percentComplete",r="isActive",f="isPlaying",e=100,b=false,c=true,l="dispose",a=null;Type.registerNamespace("Sys.Extended.UI.Animation");$AA=Sys.Extended.UI.Animation;$AA.registerAnimation=function(c,b){if(b&&(b===$AA.Animation||b.inheritsFrom&&b.inheritsFrom($AA.Animation))){if(!$AA.__animations)$AA.__animations={};$AA.__animations[c.toLowerCase()]=b;b.play=function(){var c=new b;b.apply(c,arguments);c.initialize();var d=Function.createDelegate(c,function(){c.remove_ended(d);d=a;c.dispose()});c.add_ended(d);c.play()}}else throw Error.argumentType("type",b,$AA.Animation,Sys.Extended.UI.Resources.Animation_InvalidBaseType);};$AA.buildAnimation=function(b,d){if(!b||b==="")return a;var c;b="("+b+")";if(!Sys.Debug.isDebug)try{c=Sys.Serialization.JavaScriptSerializer.deserialize(b)}catch(e){}else c=Sys.Serialization.JavaScriptSerializer.deserialize(b);return $AA.createAnimation(c,d)};$AA.createAnimation=function(d,l){var a="obj";if(!d||!d.AnimationName)throw Error.argument(a,Sys.Extended.UI.Resources.Animation_MissingAnimationName);var c=$AA.__animations[d.AnimationName.toLowerCase()];if(!c)throw Error.argument("type",String.format(Sys.Extended.UI.Resources.Animation_UknownAnimationName,d.AnimationName));var e=new c;l&&e.set_target(l);if(d.AnimationChildren&&d.AnimationChildren.length)if($AA.ParentAnimation.isInstanceOfType(e))for(var k=0;k<d.AnimationChildren.length;k++){var m=$AA.createAnimation(d.AnimationChildren[k]);m&&e.add(m)}else throw Error.argument(a,String.format(Sys.Extended.UI.Resources.Animation_ChildrenNotAllowed,c.getName()));var h=c.__animationProperties;if(!h){c.__animationProperties={};c.resolveInheritance();for(var j in c.prototype)if(j.startsWith("set_"))c.__animationProperties[j.substr(4).toLowerCase()]=j;delete c.__animationProperties.id;h=c.__animationProperties}for(var f in d){var g=f.toLowerCase();if(g=="animationname"||g=="animationchildren")continue;var i=d[f],b=h[g];if(b&&String.isInstanceOfType(b)&&e[b])if(!Sys.Debug.isDebug)try{e[b](i)}catch(n){}else e[b](i);else if(g.endsWith("script")){b=h[g.substr(0,f.length-6)];if(b&&String.isInstanceOfType(b)&&e[b])e.DynamicProperties[b]=i;else if(Sys.Debug.isDebug)throw Error.argument(a,String.format(Sys.Extended.UI.Resources.Animation_NoDynamicPropertyFound,f,f.substr(0,f.length-5)));}else if(Sys.Debug.isDebug)throw Error.argument(a,String.format(Sys.Extended.UI.Resources.Animation_NoPropertyFound,f));}return e};$AA.Animation=function(d,c,e){var b=this;$AA.Animation.initializeBase(b);b._duration=1;b._fps=25;b._target=a;b._tickHandler=a;b._timer=a;b._percentComplete=0;b._percentDelta=a;b._owner=a;b._parentAnimation=a;b.DynamicProperties={};d&&b.set_target(d);c&&b.set_duration(c);e&&b.set_fps(e)};$AA.Animation.prototype={dispose:function(){var b=this;if(b._timer){b._timer.dispose();b._timer=a}b._tickHandler=a;b._target=a;$AA.Animation.callBaseMethod(b,l)},play:function(){var a=this;if(!a._owner){var d=c;if(!a._timer){d=b;if(!a._tickHandler)a._tickHandler=Function.createDelegate(a,a._onTimerTick);a._timer=new Sys.Timer;a._timer.add_tick(a._tickHandler);a.onStart();a._timer.set_interval(1e3/a._fps);a._percentDelta=e/(a._duration*a._fps);a._updatePercentComplete(0,c)}a._timer.set_enabled(c);a.raisePropertyChanged(f);!d&&a.raisePropertyChanged(r)}},pause:function(){var a=this;if(!a._owner)if(a._timer){a._timer.set_enabled(b);a.raisePropertyChanged(f)}},stop:function(c){var b=this;if(!b._owner){var d=b._timer;b._timer=a;if(d){d.dispose();if(b._percentComplete!==e){b._percentComplete=e;b.raisePropertyChanged(s);if(c||c===undefined)b.onStep(e)}b.onEnd();b.raisePropertyChanged(f);b.raisePropertyChanged(r)}}},onStart:function(){var a=this;a.raiseStarted();for(var b in a.DynamicProperties)try{a[b](eval(a.DynamicProperties[b]))}catch(c){if(Sys.Debug.isDebug)throw c;}},onStep:function(a){this.setValue(this.getAnimatedValue(a));this.raiseStep()},onEnd:function(){this.raiseEnded()},getAnimatedValue:function(){throw Error.notImplemented();},setValue:function(){throw Error.notImplemented();},interpolate:function(a,c,b){return a+(c-a)*(b/e)},_onTimerTick:function(){this._updatePercentComplete(this._percentComplete+this._percentDelta,c)},_updatePercentComplete:function(a,d){var c=this;if(a>e)a=e;c._percentComplete=a;c.raisePropertyChanged(s);if(d)c.onStep(a);a===e&&c.stop(b)},setOwner:function(a){this._owner=a},raiseStarted:function(){var a=this.get_events().getHandler(m);a&&a(this,Sys.EventArgs.Empty)},add_started:function(a){this.get_events().addHandler(m,a)},remove_started:function(a){this.get_events().removeHandler(m,a)},raiseEnded:function(){var a=this.get_events().getHandler(n);a&&a(this,Sys.EventArgs.Empty)},add_ended:function(a){this.get_events().addHandler(n,a)},remove_ended:function(a){this.get_events().removeHandler(n,a)},raiseStep:function(){var a=this.get_events().getHandler(o);a&&a(this,Sys.EventArgs.Empty)},add_step:function(a){this.get_events().addHandler(o,a)},remove_step:function(a){this.get_events().removeHandler(o,a)},get_target:function(){var a=this;return!a._target&&a._parentAnimation?a._parentAnimation.get_target():a._target},set_target:function(a){if(this._target!=a){this._target=a;this.raisePropertyChanged("target")}},set_animationTarget:function(d){var c=a,b=$get(d);if(b)c=b;else{var e=$find(d);if(e){b=e.get_element();if(b)c=b}}if(c)this.set_target(c);else throw Error.argument("id",String.format(Sys.Extended.UI.Resources.Animation_TargetNotFound,d));},get_duration:function(){return this._duration},set_duration:function(b){var a=this;b=a._getFloat(b);if(a._duration!=b){a._duration=b;a.raisePropertyChanged("duration")}},get_fps:function(){return this._fps},set_fps:function(b){var a=this;b=a._getInteger(b);if(a.fps!=b){a._fps=b;a.raisePropertyChanged("fps")}},get_isActive:function(){return this._timer!==a},get_isPlaying:function(){return this._timer!==a&&this._timer.get_enabled()},get_percentComplete:function(){return this._percentComplete},_getBoolean:function(a){return String.isInstanceOfType(a)?Boolean.parse(a):a},_getInteger:function(a){return String.isInstanceOfType(a)?parseInt(a):a},_getFloat:function(a){return String.isInstanceOfType(a)?parseFloat(a):a},_getEnum:function(a,b){return String.isInstanceOfType(a)&&b&&b.parse?b.parse(a):a}};$AA.Animation.registerClass("Sys.Extended.UI.Animation.Animation",Sys.Component);$AA.registerAnimation("animation",$AA.Animation);$AA.ParentAnimation=function(d,c,e,a){$AA.ParentAnimation.initializeBase(this,[d,c,e]);this._animations=[];if(a&&a.length)for(var b=0;b<a.length;b++)this.add(a[b])};$AA.ParentAnimation.prototype={initialize:function(){var a=this;$AA.ParentAnimation.callBaseMethod(a,"initialize");if(a._animations)for(var c=0;c<a._animations.length;c++){var b=a._animations[c];b&&!b.get_isInitialized&&b.initialize()}},dispose:function(){this.clear();this._animations=a;$AA.ParentAnimation.callBaseMethod(this,l)},get_animations:function(){return this._animations},add:function(b){var a=this;if(a._animations){if(b)b._parentAnimation=a;Array.add(a._animations,b);a.raisePropertyChanged(i)}},remove:function(a){if(this._animations){a&&a.dispose();Array.remove(this._animations,a);this.raisePropertyChanged(i)}},removeAt:function(c){var a=this;if(a._animations){var b=a._animations[c];b&&b.dispose();Array.removeAt(a._animations,c);a.raisePropertyChanged(i)}},clear:function(){var b=this;if(b._animations){for(var c=b._animations.length-1;c>=0;c--){b._animations[c].dispose();b._animations[c]=a}Array.clear(b._animations);b._animations=[];b.raisePropertyChanged(i)}}};$AA.ParentAnimation.registerClass("Sys.Extended.UI.Animation.ParentAnimation",$AA.Animation);$AA.registerAnimation("parent",$AA.ParentAnimation);$AA.ParallelAnimation=function(c,b,d,a){$AA.ParallelAnimation.initializeBase(this,[c,b,d,a])};$AA.ParallelAnimation.prototype={add:function(a){$AA.ParallelAnimation.callBaseMethod(this,"add",[a]);a.setOwner(this)},onStart:function(){$AA.ParallelAnimation.callBaseMethod(this,d);for(var b=this.get_animations(),a=0;a<b.length;a++)b[a].onStart()},onStep:function(c){for(var b=this.get_animations(),a=0;a<b.length;a++)b[a].onStep(c)},onEnd:function(){for(var b=this.get_animations(),a=0;a<b.length;a++)b[a].onEnd();$AA.ParallelAnimation.callBaseMethod(this,g)}};$AA.ParallelAnimation.registerClass("Sys.Extended.UI.Animation.ParallelAnimation",$AA.ParentAnimation);$AA.registerAnimation("parallel",$AA.ParallelAnimation);$AA.SequenceAnimation=function(g,f,h,e,d){var c=this;$AA.SequenceAnimation.initializeBase(c,[g,f,h,e]);c._handler=a;c._paused=b;c._playing=b;c._index=0;c._remainingIterations=0;c._iterations=d!==undefined?d:1};$AA.SequenceAnimation.prototype={dispose:function(){this._handler=a;$AA.SequenceAnimation.callBaseMethod(this,l)},stop:function(){var a=this;if(a._playing){var c=a.get_animations();if(a._index<c.length){c[a._index].remove_ended(a._handler);for(var d=a._index;d<c.length;d++)c[d].stop()}a._playing=b;a._paused=b;a.raisePropertyChanged(f);a.onEnd()}},pause:function(){var b=this;if(b.get_isPlaying()){var d=b.get_animations()[b._index];d!=a&&d.pause();b._paused=c;b.raisePropertyChanged(f)}},play:function(){var d=this,g=d.get_animations();if(!d._playing){d._playing=c;if(d._paused){d._paused=b;var h=g[d._index];if(h!=a){h.play();d.raisePropertyChanged(f)}}else{d.onStart();d._index=0;var e=g[d._index];if(e){e.add_ended(d._handler);e.play();d.raisePropertyChanged(f)}else d.stop()}}},onStart:function(){var a=this;$AA.SequenceAnimation.callBaseMethod(a,d);a._remainingIterations=a._iterations-1;if(!a._handler)a._handler=Function.createDelegate(a,a._onEndAnimation)},_onEndAnimation:function(){var a=this,b=a.get_animations(),c=b[a._index++];c&&c.remove_ended(a._handler);if(a._index<b.length){var e=b[a._index];e.add_ended(a._handler);e.play()}else if(a._remainingIterations>=1||a._iterations<=0){a._remainingIterations--;a._index=0;var d=b[0];d.add_ended(a._handler);d.play()}else a.stop()},onStep:function(){throw Error.invalidOperation(Sys.Extended.UI.Resources.Animation_CannotNestSequence);},onEnd:function(){this._remainingIterations=0;$AA.SequenceAnimation.callBaseMethod(this,g)},get_isActive:function(){return c},get_isPlaying:function(){return this._playing&&!this._paused},get_iterations:function(){return this._iterations},set_iterations:function(b){var a=this;b=a._getInteger(b);if(a._iterations!=b){a._iterations=b;a.raisePropertyChanged("iterations")}},get_isInfinite:function(){return this._iterations<=0}};$AA.SequenceAnimation.registerClass("Sys.Extended.UI.Animation.SequenceAnimation",$AA.ParentAnimation);$AA.registerAnimation("sequence",$AA.SequenceAnimation);$AA.SelectionAnimation=function(d,c,e,b){$AA.SelectionAnimation.initializeBase(this,[d,c,e,b]);this._selectedIndex=-1;this._selected=a};$AA.SelectionAnimation.prototype={getSelectedIndex:function(){throw Error.notImplemented();},onStart:function(){var a=this;$AA.SelectionAnimation.callBaseMethod(a,d);var b=a.get_animations();a._selectedIndex=a.getSelectedIndex();if(a._selectedIndex>=0&&a._selectedIndex<b.length){a._selected=b[a._selectedIndex];if(a._selected){a._selected.setOwner(a);a._selected.onStart()}}},onStep:function(a){if(this._selected)this._selected.onStep(a)},onEnd:function(){var b=this;if(b._selected){b._selected.onEnd();b._selected.setOwner(a)}b._selected=a;b._selectedIndex=a;$AA.SelectionAnimation.callBaseMethod(b,g)}};$AA.SelectionAnimation.registerClass("Sys.Extended.UI.Animation.SelectionAnimation",$AA.ParentAnimation);$AA.registerAnimation("selection",$AA.SelectionAnimation);$AA.ConditionAnimation=function(d,c,e,b,a){$AA.ConditionAnimation.initializeBase(this,[d,c,e,b]);this._conditionScript=a};$AA.ConditionAnimation.prototype={getSelectedIndex:function(){var a=-1;if(this._conditionScript&&this._conditionScript.length>0)try{a=eval(this._conditionScript)?0:1}catch(b){}return a},get_conditionScript:function(){return this._conditionScript},set_conditionScript:function(a){if(this._conditionScript!=a){this._conditionScript=a;this.raisePropertyChanged("conditionScript")}}};$AA.ConditionAnimation.registerClass("Sys.Extended.UI.Animation.ConditionAnimation",$AA.SelectionAnimation);$AA.registerAnimation("condition",$AA.ConditionAnimation);$AA.CaseAnimation=function(d,c,e,b,a){$AA.CaseAnimation.initializeBase(this,[d,c,e,b]);this._selectScript=a};$AA.CaseAnimation.prototype={getSelectedIndex:function(){var a=-1;if(this._selectScript&&this._selectScript.length>0)try{var b=eval(this._selectScript);if(b!==undefined)a=b}catch(c){}return a},get_selectScript:function(){return this._selectScript},set_selectScript:function(a){if(this._selectScript!=a){this._selectScript=a;this.raisePropertyChanged("selectScript")}}};$AA.CaseAnimation.registerClass("Sys.Extended.UI.Animation.CaseAnimation",$AA.SelectionAnimation);$AA.registerAnimation("case",$AA.CaseAnimation);$AA.FadeEffect=function(){throw Error.invalidOperation();};$AA.FadeEffect.prototype={FadeIn:0,FadeOut:1};$AA.FadeEffect.registerEnum("Sys.Extended.UI.Animation.FadeEffect",b);$AA.FadeAnimation=function(j,i,k,h,g,f,e){var d=this;$AA.FadeAnimation.initializeBase(d,[j,i,k]);d._effect=h!==undefined?h:$AA.FadeEffect.FadeIn;d._max=f!==undefined?f:1;d._min=g!==undefined?g:0;d._start=d._min;d._end=d._max;d._layoutCreated=b;d._forceLayoutInIE=e===undefined||e===a?c:e;d._currentTarget=a;d._resetOpacities()};$AA.FadeAnimation.prototype={_resetOpacities:function(){var a=this;if(a._effect==$AA.FadeEffect.FadeIn){a._start=a._min;a._end=a._max}else{a._start=a._max;a._end=a._min}},_createLayout:function(){var a=this,b=a._currentTarget;if(b){a._originalWidth=$common.getCurrentStyle(b,p);var d=$common.getCurrentStyle(b,q);a._originalBackColor=$common.getCurrentStyle(b,"backgroundColor");if((!a._originalWidth||a._originalWidth==""||a._originalWidth=="auto")&&(!d||d==""||d=="auto"))b.style.width=b.offsetWidth+j;if(!a._originalBackColor||a._originalBackColor==""||a._originalBackColor=="transparent"||a._originalBackColor=="rgba(0, 0, 0, 0)")b.style.backgroundColor=$common.getInheritedBackgroundColor(b);a._layoutCreated=c}},onStart:function(){var a=this;$AA.FadeAnimation.callBaseMethod(a,d);a._currentTarget=a.get_target();a.setValue(a._start);a._forceLayoutInIE&&!a._layoutCreated&&Sys.Browser.agent==Sys.Browser.InternetExplorer&&a._createLayout()},getAnimatedValue:function(a){return this.interpolate(this._start,this._end,a)},setValue:function(a){this._currentTarget&&$common.setElementOpacity(this._currentTarget,a)},get_effect:function(){return this._effect},set_effect:function(b){var a=this;b=a._getEnum(b,$AA.FadeEffect);if(a._effect!=b){a._effect=b;a._resetOpacities();a.raisePropertyChanged("effect")}},get_minimumOpacity:function(){return this._min},set_minimumOpacity:function(b){var a=this;b=a._getFloat(b);if(a._min!=b){a._min=b;a._resetOpacities();a.raisePropertyChanged(t)}},get_maximumOpacity:function(){return this._max},set_maximumOpacity:function(b){var a=this;b=a._getFloat(b);if(a._max!=b){a._max=b;a._resetOpacities();a.raisePropertyChanged(u)}},get_forceLayoutInIE:function(){return this._forceLayoutInIE},set_forceLayoutInIE:function(b){var a=this;b=a._getBoolean(b);if(a._forceLayoutInIE!=b){a._forceLayoutInIE=b;a.raisePropertyChanged(v)}},set_startValue:function(a){a=this._getFloat(a);this._start=a}};$AA.FadeAnimation.registerClass("Sys.Extended.UI.Animation.FadeAnimation",$AA.Animation);$AA.registerAnimation("fade",$AA.FadeAnimation);$AA.FadeInAnimation=function(e,d,f,c,b,a){$AA.FadeInAnimation.initializeBase(this,[e,d,f,$AA.FadeEffect.FadeIn,c,b,a])};$AA.FadeInAnimation.prototype={onStart:function(){var a=this;$AA.FadeInAnimation.callBaseMethod(a,d);a._currentTarget&&a.set_startValue($common.getElementOpacity(a._currentTarget))}};$AA.FadeInAnimation.registerClass("Sys.Extended.UI.Animation.FadeInAnimation",$AA.FadeAnimation);$AA.registerAnimation("fadeIn",$AA.FadeInAnimation);$AA.FadeOutAnimation=function(e,d,f,c,b,a){$AA.FadeOutAnimation.initializeBase(this,[e,d,f,$AA.FadeEffect.FadeOut,c,b,a])};$AA.FadeOutAnimation.prototype={onStart:function(){var a=this;$AA.FadeOutAnimation.callBaseMethod(a,d);a._currentTarget&&a.set_startValue($common.getElementOpacity(a._currentTarget))}};$AA.FadeOutAnimation.registerClass("Sys.Extended.UI.Animation.FadeOutAnimation",$AA.FadeAnimation);$AA.registerAnimation("fadeOut",$AA.FadeOutAnimation);$AA.PulseAnimation=function(d,c,e,i,h,g,f){var b=this;$AA.PulseAnimation.initializeBase(b,[d,c,e,a,i!==undefined?i:3]);b._out=new $AA.FadeOutAnimation(d,c,e,h,g,f);b.add(b._out);b._in=new $AA.FadeInAnimation(d,c,e,h,g,f);b.add(b._in)};$AA.PulseAnimation.prototype={get_minimumOpacity:function(){return this._out.get_minimumOpacity()},set_minimumOpacity:function(b){var a=this;b=a._getFloat(b);a._out.set_minimumOpacity(b);a._in.set_minimumOpacity(b);a.raisePropertyChanged(t)},get_maximumOpacity:function(){return this._out.get_maximumOpacity()},set_maximumOpacity:function(b){var a=this;b=a._getFloat(b);a._out.set_maximumOpacity(b);a._in.set_maximumOpacity(b);a.raisePropertyChanged(u)},get_forceLayoutInIE:function(){return this._out.get_forceLayoutInIE()},set_forceLayoutInIE:function(b){var a=this;b=a._getBoolean(b);a._out.set_forceLayoutInIE(b);a._in.set_forceLayoutInIE(b);a.raisePropertyChanged(v)},set_duration:function(a){var b=this;a=b._getFloat(a);$AA.PulseAnimation.callBaseMethod(b,"set_duration",[a]);b._in.set_duration(a);b._out.set_duration(a)},set_fps:function(a){var b=this;a=b._getInteger(a);$AA.PulseAnimation.callBaseMethod(b,"set_fps",[a]);b._in.set_fps(a);b._out.set_fps(a)}};$AA.PulseAnimation.registerClass("Sys.Extended.UI.Animation.PulseAnimation",$AA.SequenceAnimation);$AA.registerAnimation("pulse",$AA.PulseAnimation);$AA.PropertyAnimation=function(f,d,g,e,c){var b=this;$AA.PropertyAnimation.initializeBase(b,[f,d,g]);b._property=e;b._propertyKey=c;b._currentTarget=a};$AA.PropertyAnimation.prototype={onStart:function(){$AA.PropertyAnimation.callBaseMethod(this,d);this._currentTarget=this.get_target()},setValue:function(c){var a=this,b=a._currentTarget;if(b&&a._property&&a._property.length>0)if(a._propertyKey&&a._propertyKey.length>0&&b[a._property])b[a._property][a._propertyKey]=c;else b[a._property]=c},getValue:function(){var b=this,d=b.get_target();if(d&&b._property&&b._property.length>0){var c=d[b._property];if(c)return b._propertyKey&&b._propertyKey.length>0?c[b._propertyKey]:c}return a},get_property:function(){return this._property},set_property:function(a){if(this._property!=a){this._property=a;this.raisePropertyChanged(y)}},get_propertyKey:function(){return this._propertyKey},set_propertyKey:function(a){if(this._propertyKey!=a){this._propertyKey=a;this.raisePropertyChanged("propertyKey")}}};$AA.PropertyAnimation.registerClass("Sys.Extended.UI.Animation.PropertyAnimation",$AA.Animation);$AA.registerAnimation(y,$AA.PropertyAnimation);$AA.DiscreteAnimation=function(e,c,f,d,b,a){$AA.DiscreteAnimation.initializeBase(this,[e,c,f,d,b]);this._values=a&&a.length?a:[]};$AA.DiscreteAnimation.prototype={getAnimatedValue:function(a){var b=Math.floor(this.interpolate(0,this._values.length-1,a));return this._values[b]},get_values:function(){return this._values},set_values:function(a){if(this._values!=a){this._values=a;this.raisePropertyChanged("values")}}};$AA.DiscreteAnimation.registerClass("Sys.Extended.UI.Animation.DiscreteAnimation",$AA.PropertyAnimation);$AA.registerAnimation("discrete",$AA.DiscreteAnimation);$AA.InterpolatedAnimation=function(f,d,g,a,b,c,e){$AA.InterpolatedAnimation.initializeBase(this,[f,d,g,a!==undefined?a:h,b]);this._startValue=c;this._endValue=e};$AA.InterpolatedAnimation.prototype={get_startValue:function(){return this._startValue},set_startValue:function(b){var a=this;b=a._getFloat(b);if(a._startValue!=b){a._startValue=b;a.raisePropertyChanged(w)}},get_endValue:function(){return this._endValue},set_endValue:function(b){var a=this;b=a._getFloat(b);if(a._endValue!=b){a._endValue=b;a.raisePropertyChanged(x)}}};$AA.InterpolatedAnimation.registerClass("Sys.Extended.UI.Animation.InterpolatedAnimation",$AA.PropertyAnimation);$AA.registerAnimation("interpolated",$AA.InterpolatedAnimation);$AA.ColorAnimation=function(i,f,j,h,d,e,g){var c=this;$AA.ColorAnimation.initializeBase(c,[i,f,j,h,d,e,g]);c._start=a;c._end=a;c._interpolateRed=b;c._interpolateGreen=b;c._interpolateBlue=b};$AA.ColorAnimation.prototype={onStart:function(){var a=this;$AA.ColorAnimation.callBaseMethod(a,d);a._start=$AA.ColorAnimation.getRGB(a.get_startValue());a._end=$AA.ColorAnimation.getRGB(a.get_endValue());a._interpolateRed=a._start.Red!=a._end.Red;a._interpolateGreen=a._start.Green!=a._end.Green;a._interpolateBlue=a._start.Blue!=a._end.Blue},getAnimatedValue:function(b){var a=this,e=a._start.Red,d=a._start.Green,c=a._start.Blue;if(a._interpolateRed)e=Math.round(a.interpolate(e,a._end.Red,b));if(a._interpolateGreen)d=Math.round(a.interpolate(d,a._end.Green,b));if(a._interpolateBlue)c=Math.round(a.interpolate(c,a._end.Blue,b));return $AA.ColorAnimation.toColor(e,d,c)},set_startValue:function(a){if(this._startValue!=a){this._startValue=a;this.raisePropertyChanged(w)}},set_endValue:function(a){if(this._endValue!=a){this._endValue=a;this.raisePropertyChanged(x)}}};$AA.ColorAnimation.getRGB=function(a){if(!a||a.length!=7)throw String.format(Sys.Extended.UI.Resources.Animation_InvalidColor,a);return{Red:parseInt(a.substr(1,2),16),Green:parseInt(a.substr(3,2),16),Blue:parseInt(a.substr(5,2),16)}};$AA.ColorAnimation.toColor=function(f,d,e){var c=f.toString(16),b=d.toString(16),a=e.toString(16);if(c.length==1)c="0"+c;if(b.length==1)b="0"+b;if(a.length==1)a="0"+a;return"#"+c+b+a};$AA.ColorAnimation.registerClass("Sys.Extended.UI.Animation.ColorAnimation",$AA.InterpolatedAnimation);$AA.registerAnimation("color",$AA.ColorAnimation);$AA.LengthAnimation=function(h,e,i,g,c,d,f,b){$AA.LengthAnimation.initializeBase(this,[h,e,i,g,c,d,f]);this._unit=b!=a?b:j};$AA.LengthAnimation.prototype={getAnimatedValue:function(b){var a=this,c=a.interpolate(a.get_startValue(),a.get_endValue(),b);return Math.round(c)+a._unit},get_unit:function(){return this._unit},set_unit:function(a){if(this._unit!=a){this._unit=a;this.raisePropertyChanged(k)}}};$AA.LengthAnimation.registerClass("Sys.Extended.UI.Animation.LengthAnimation",$AA.InterpolatedAnimation);$AA.registerAnimation("length",$AA.LengthAnimation);$AA.MoveAnimation=function(e,d,f,g,j,i,k){var b=this;$AA.MoveAnimation.initializeBase(b,[e,d,f,a]);b._horizontal=g?g:0;b._vertical=j?j:0;b._relative=i===undefined?c:i;b._horizontalAnimation=new $AA.LengthAnimation(e,d,f,h,"left",a,a,k);b._verticalAnimation=new $AA.LengthAnimation(e,d,f,h,"top",a,a,k);b.add(b._verticalAnimation);b.add(b._horizontalAnimation)};$AA.MoveAnimation.prototype={onStart:function(){var a=this;$AA.MoveAnimation.callBaseMethod(a,d);var b=a.get_target();a._horizontalAnimation.set_startValue(b.offsetLeft);a._horizontalAnimation.set_endValue(a._relative?b.offsetLeft+a._horizontal:a._horizontal);a._verticalAnimation.set_startValue(b.offsetTop);a._verticalAnimation.set_endValue(a._relative?b.offsetTop+a._vertical:a._vertical)},get_horizontal:function(){return this._horizontal},set_horizontal:function(b){var a=this;b=a._getFloat(b);if(a._horizontal!=b){a._horizontal=b;a.raisePropertyChanged("horizontal")}},get_vertical:function(){return this._vertical},set_vertical:function(b){var a=this;b=a._getFloat(b);if(a._vertical!=b){a._vertical=b;a.raisePropertyChanged("vertical")}},get_relative:function(){return this._relative},set_relative:function(b){var a=this;b=a._getBoolean(b);if(a._relative!=b){a._relative=b;a.raisePropertyChanged("relative")}},get_unit:function(){this._horizontalAnimation.get_unit()},set_unit:function(b){var a=this,c=a._horizontalAnimation.get_unit();if(c!=b){a._horizontalAnimation.set_unit(b);a._verticalAnimation.set_unit(b);a.raisePropertyChanged(k)}}};$AA.MoveAnimation.registerClass("Sys.Extended.UI.Animation.MoveAnimation",$AA.ParallelAnimation);$AA.registerAnimation("move",$AA.MoveAnimation);$AA.ResizeAnimation=function(d,c,e,i,g,f){var b=this;$AA.ResizeAnimation.initializeBase(b,[d,c,e,a]);b._width=i;b._height=g;b._horizontalAnimation=new $AA.LengthAnimation(d,c,e,h,p,a,a,f);b._verticalAnimation=new $AA.LengthAnimation(d,c,e,h,q,a,a,f);b.add(b._horizontalAnimation);b.add(b._verticalAnimation)};$AA.ResizeAnimation.prototype={onStart:function(){var b=this;$AA.ResizeAnimation.callBaseMethod(b,d);var c=b.get_target();b._horizontalAnimation.set_startValue(c.offsetWidth);b._verticalAnimation.set_startValue(c.offsetHeight);b._horizontalAnimation.set_endValue(b._width!==a&&b._width!==undefined?b._width:c.offsetWidth);b._verticalAnimation.set_endValue(b._height!==a&&b._height!==undefined?b._height:c.offsetHeight)},get_width:function(){return this._width},set_width:function(b){var a=this;b=a._getFloat(b);if(a._width!=b){a._width=b;a.raisePropertyChanged(p)}},get_height:function(){return this._height},set_height:function(b){var a=this;b=a._getFloat(b);if(a._height!=b){a._height=b;a.raisePropertyChanged(q)}},get_unit:function(){this._horizontalAnimation.get_unit()},set_unit:function(b){var a=this,c=a._horizontalAnimation.get_unit();if(c!=b){a._horizontalAnimation.set_unit(b);a._verticalAnimation.set_unit(b);a.raisePropertyChanged(k)}}};$AA.ResizeAnimation.registerClass("Sys.Extended.UI.Animation.ResizeAnimation",$AA.ParallelAnimation);$AA.registerAnimation("resize",$AA.ResizeAnimation);$AA.ScaleAnimation=function(i,g,k,c,e,h,f,d){var b=this;$AA.ScaleAnimation.initializeBase(b,[i,g,k]);b._scaleFactor=c!==undefined?c:1;b._unit=e!==undefined?e:j;b._center=h;b._scaleFont=f;b._fontUnit=d!==undefined?d:"pt";b._element=a;b._initialHeight=a;b._initialWidth=a;b._initialTop=a;b._initialLeft=a;b._initialFontSize=a};$AA.ScaleAnimation.prototype={getAnimatedValue:function(a){return this.interpolate(1,this._scaleFactor,a)},onStart:function(){var a=this;$AA.ScaleAnimation.callBaseMethod(a,d);a._element=a.get_target();if(a._element){a._initialHeight=a._element.offsetHeight;a._initialWidth=a._element.offsetWidth;if(a._center){a._initialTop=a._element.offsetTop;a._initialLeft=a._element.offsetLeft}if(a._scaleFont)a._initialFontSize=parseFloat($common.getCurrentStyle(a._element,"fontSize"))}},setValue:function(b){var a=this;if(a._element){var e=Math.round(a._initialWidth*b),d=Math.round(a._initialHeight*b);a._element.style.width=e+a._unit;a._element.style.height=d+a._unit;if(a._center){a._element.style.top=a._initialTop+Math.round((a._initialHeight-d)/2)+a._unit;a._element.style.left=a._initialLeft+Math.round((a._initialWidth-e)/2)+a._unit}if(a._scaleFont){var c=a._initialFontSize*b;if(a._fontUnit==j||a._fontUnit=="pt")c=Math.round(c);a._element.style.fontSize=c+a._fontUnit}}},onEnd:function(){var b=this;b._element=a;b._initialHeight=a;b._initialWidth=a;b._initialTop=a;b._initialLeft=a;b._initialFontSize=a;$AA.ScaleAnimation.callBaseMethod(b,g)},get_scaleFactor:function(){return this._scaleFactor},set_scaleFactor:function(b){var a=this;b=a._getFloat(b);if(a._scaleFactor!=b){a._scaleFactor=b;a.raisePropertyChanged("scaleFactor")}},get_unit:function(){return this._unit},set_unit:function(a){if(this._unit!=a){this._unit=a;this.raisePropertyChanged(k)}},get_center:function(){return this._center},set_center:function(b){var a=this;b=a._getBoolean(b);if(a._center!=b){a._center=b;a.raisePropertyChanged("center")}},get_scaleFont:function(){return this._scaleFont},set_scaleFont:function(b){var a=this;b=a._getBoolean(b);if(a._scaleFont!=b){a._scaleFont=b;a.raisePropertyChanged("scaleFont")}},get_fontUnit:function(){return this._fontUnit},set_fontUnit:function(a){if(this._fontUnit!=a){this._fontUnit=a;this.raisePropertyChanged("fontUnit")}}};$AA.ScaleAnimation.registerClass("Sys.Extended.UI.Animation.ScaleAnimation",$AA.Animation);$AA.registerAnimation("scale",$AA.ScaleAnimation);$AA.Action=function(b,a,c){$AA.Action.initializeBase(this,[b,a,c]);a===undefined&&this.set_duration(0)};$AA.Action.prototype={onEnd:function(){this.doAction();$AA.Action.callBaseMethod(this,g)},doAction:function(){throw Error.notImplemented();},getAnimatedValue:function(){},setValue:function(){}};$AA.Action.registerClass("Sys.Extended.UI.Animation.Action",$AA.Animation);$AA.registerAnimation("action",$AA.Action);$AA.EnableAction=function(d,b,e,a){$AA.EnableAction.initializeBase(this,[d,b,e]);this._enabled=a!==undefined?a:c};$AA.EnableAction.prototype={doAction:function(){var a=this.get_target();if(a)a.disabled=!this._enabled},get_enabled:function(){return this._enabled},set_enabled:function(b){var a=this;b=a._getBoolean(b);if(a._enabled!=b){a._enabled=b;a.raisePropertyChanged("enabled")}}};$AA.EnableAction.registerClass("Sys.Extended.UI.Animation.EnableAction",$AA.Action);$AA.registerAnimation("enableAction",$AA.EnableAction);$AA.HideAction=function(c,a,d,b){$AA.HideAction.initializeBase(this,[c,a,d]);this._visible=b};$AA.HideAction.prototype={doAction:function(){var a=this.get_target();a&&$common.setVisible(a,this._visible)},get_visible:function(){return this._visible},set_visible:function(a){if(this._visible!=a){this._visible=a;this.raisePropertyChanged("visible")}}};$AA.HideAction.registerClass("Sys.Extended.UI.Animation.HideAction",$AA.Action);$AA.registerAnimation("hideAction",$AA.HideAction);$AA.StyleAction=function(c,b,e,a,d){$AA.StyleAction.initializeBase(this,[c,b,e]);this._attribute=a;this._value=d};$AA.StyleAction.prototype={doAction:function(){var a=this.get_target();if(a)a.style[this._attribute]=this._value},get_attribute:function(){return this._attribute},set_attribute:function(a){if(this._attribute!=a){this._attribute=a;this.raisePropertyChanged("attribute")}},get_value:function(){return this._value},set_value:function(a){if(this._value!=a){this._value=a;this.raisePropertyChanged("value")}}};$AA.StyleAction.registerClass("Sys.Extended.UI.Animation.StyleAction",$AA.Action);$AA.registerAnimation("styleAction",$AA.StyleAction);$AA.OpacityAction=function(c,a,d,b){$AA.OpacityAction.initializeBase(this,[c,a,d]);this._opacity=b};$AA.OpacityAction.prototype={doAction:function(){var a=this.get_target();a&&$common.setElementOpacity(a,this._opacity)},get_opacity:function(){return this._opacity},set_opacity:function(b){var a=this;b=a._getFloat(b);if(a._opacity!=b){a._opacity=b;a.raisePropertyChanged("opacity")}}};$AA.OpacityAction.registerClass("Sys.Extended.UI.Animation.OpacityAction",$AA.Action);$AA.registerAnimation("opacityAction",$AA.OpacityAction);$AA.ScriptAction=function(c,a,d,b){$AA.ScriptAction.initializeBase(this,[c,a,d]);this._script=b};$AA.ScriptAction.prototype={doAction:function(){try{eval(this._script)}catch(a){}},get_script:function(){return this._script},set_script:function(a){if(this._script!=a){this._script=a;this.raisePropertyChanged("script")}}};$AA.ScriptAction.registerClass("Sys.Extended.UI.Animation.ScriptAction",$AA.Action);$AA.registerAnimation("scriptAction",$AA.ScriptAction)}if(window.Sys&&Sys.loader)Sys.loader.registerScript(b,["ExtendedCommon","ExtendedTimer"],a);else a()})();var $AA;
//END Animation.Animations.js
//START Animation.AnimationBehavior.js
// (c) 2010 CodePlex Foundation
(function(){var b="ExtendedAnimationBehavior";function a(){var c="mouseout",b="mouseover",a=null;Type.registerNamespace("Sys.Extended.UI.Animation");Sys.Extended.UI.Animation.AnimationBehavior=function(c){var b=this;Sys.Extended.UI.Animation.AnimationBehavior.initializeBase(b,[c]);b._onLoad=a;b._onClick=a;b._onMouseOver=a;b._onMouseOut=a;b._onHoverOver=a;b._onHoverOut=a;b._onClickHandler=a;b._onMouseOverHandler=a;b._onMouseOutHandler=a};Sys.Extended.UI.Animation.AnimationBehavior.prototype={initialize:function(){var a=this;Sys.Extended.UI.Animation.AnimationBehavior.callBaseMethod(a,"initialize");var d=a.get_element();if(d){a._onClickHandler=Function.createDelegate(a,a.OnClick);$addHandler(d,"click",a._onClickHandler);a._onMouseOverHandler=Function.createDelegate(a,a.OnMouseOver);$addHandler(d,b,a._onMouseOverHandler);a._onMouseOutHandler=Function.createDelegate(a,a.OnMouseOut);$addHandler(d,c,a._onMouseOutHandler)}},dispose:function(){var d=this,e=d.get_element();if(e){if(d._onClickHandler){$removeHandler(e,"click",d._onClickHandler);d._onClickHandler=a}if(d._onMouseOverHandler){$removeHandler(e,b,d._onMouseOverHandler);d._onMouseOverHandler=a}if(d._onMouseOutHandler){$removeHandler(e,c,d._onMouseOutHandler);d._onMouseOutHandler=a}}d._onLoad=a;d._onClick=a;d._onMouseOver=a;d._onMouseOut=a;d._onHoverOver=a;d._onHoverOut=a;Sys.Extended.UI.Animation.AnimationBehavior.callBaseMethod(d,"dispose")},get_OnLoad:function(){return this._onLoad?this._onLoad.get_json():a},set_OnLoad:function(b){var a=this;if(!a._onLoad){a._onLoad=new Sys.Extended.UI.Animation.GenericAnimationBehavior(a.get_element());a._onLoad.initialize()}a._onLoad.set_json(b);a.raisePropertyChanged("OnLoad");a._onLoad.play()},get_OnLoadBehavior:function(){return this._onLoad},get_OnClick:function(){return this._onClick?this._onClick.get_json():a},set_OnClick:function(b){var a=this;if(!a._onClick){a._onClick=new Sys.Extended.UI.Animation.GenericAnimationBehavior(a.get_element());a._onClick.initialize()}a._onClick.set_json(b);a.raisePropertyChanged("OnClick")},get_OnClickBehavior:function(){return this._onClick},OnClick:function(){this._onClick&&this._onClick.play()},get_OnMouseOver:function(){return this._onMouseOver?this._onMouseOver.get_json():a},set_OnMouseOver:function(b){var a=this;if(!a._onMouseOver){a._onMouseOver=new Sys.Extended.UI.Animation.GenericAnimationBehavior(a.get_element());a._onMouseOver.initialize()}a._onMouseOver.set_json(b);a.raisePropertyChanged("OnMouseOver")},get_OnMouseOverBehavior:function(){return this._onMouseOver},OnMouseOver:function(){var a=this;if(a._mouseHasEntered)return;a._onMouseOver&&a._onMouseOver.play();if(a._onHoverOver){a._onHoverOut&&a._onHoverOut.quit();a._onHoverOver.play()}a._mouseHasEntered=true},get_OnMouseOut:function(){return this._onMouseOut?this._onMouseOut.get_json():a},set_OnMouseOut:function(b){var a=this;if(!a._onMouseOut){a._onMouseOut=new Sys.Extended.UI.Animation.GenericAnimationBehavior(a.get_element());a._onMouseOut.initialize()}a._onMouseOut.set_json(b);a.raisePropertyChanged("OnMouseOut")},get_OnMouseOutBehavior:function(){return this._onMouseOut},OnMouseOut:function(e){var a=this,d=e.rawEvent,b=a.get_element(),f=e.target;if(f.nodeName!==b.nodeName)return;var c=d.relatedTarget||d.toElement;if(b!=c&&!a._isChild(b,c)){a._mouseHasEntered=false;a._onMouseOut&&a._onMouseOut.play();if(a._onHoverOut){a._onHoverOver&&a._onHoverOver.quit();a._onHoverOut.play()}}},_isChild:function(b,a){var c=document.body;while(a&&b!=a&&c!=a)try{a=a.parentNode}catch(d){return false}return b==a},get_OnHoverOver:function(){return this._onHoverOver?this._onHoverOver.get_json():a},set_OnHoverOver:function(b){var a=this;if(!a._onHoverOver){a._onHoverOver=new Sys.Extended.UI.Animation.GenericAnimationBehavior(a.get_element());a._onHoverOver.initialize()}a._onHoverOver.set_json(b);a.raisePropertyChanged("OnHoverOver")},get_OnHoverOverBehavior:function(){return this._onHoverOver},get_OnHoverOut:function(){return this._onHoverOut?this._onHoverOut.get_json():a},set_OnHoverOut:function(b){var a=this;if(!a._onHoverOut){a._onHoverOut=new Sys.Extended.UI.Animation.GenericAnimationBehavior(a.get_element());a._onHoverOut.initialize()}a._onHoverOut.set_json(b);a.raisePropertyChanged("OnHoverOut")},get_OnHoverOutBehavior:function(){return this._onHoverOut}};Sys.Extended.UI.Animation.AnimationBehavior.registerClass("Sys.Extended.UI.Animation.AnimationBehavior",Sys.Extended.UI.BehaviorBase);Sys.Extended.UI.Animation.GenericAnimationBehavior=function(b){Sys.Extended.UI.Animation.GenericAnimationBehavior.initializeBase(this,[b]);this._json=a;this._animation=a};Sys.Extended.UI.Animation.GenericAnimationBehavior.prototype={dispose:function(){this.disposeAnimation();Sys.Extended.UI.Animation.GenericAnimationBehavior.callBaseMethod(this,"dispose")},disposeAnimation:function(){this._animation&&this._animation.dispose();this._animation=a},play:function(){var a=this;if(a._animation&&!a._animation.get_isPlaying()){a.stop();a._animation.play()}},stop:function(){if(this._animation)this._animation.get_isPlaying()&&this._animation.stop(true)},quit:function(){if(this._animation)this._animation.get_isPlaying()&&this._animation.stop(false)},get_json:function(){return this._json},set_json:function(c){var a=this;if(a._json!=c){a._json=c;a.raisePropertyChanged("json");a.disposeAnimation();var b=a.get_element();if(b){a._animation=Sys.Extended.UI.Animation.buildAnimation(a._json,b);a._animation&&a._animation.initialize();a.raisePropertyChanged("animation")}}},get_animation:function(){return this._animation}};Sys.Extended.UI.Animation.GenericAnimationBehavior.registerClass("Sys.Extended.UI.Animation.GenericAnimationBehavior",Sys.Extended.UI.BehaviorBase)}if(window.Sys&&Sys.loader)Sys.loader.registerScript(b,["ExtendedAnimations","ExtendedBase"],a);else a()})();
//END Animation.AnimationBehavior.js
//START PopupExtender.PopupBehavior.js
// (c) 2010 CodePlex Foundation
(function(){var b="ExtendedPopup";function a(){var g="hidden",f="hiding",e="shown",d="showing",h="absolute",b=false,c=true,a=null;Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.PopupBehavior=function(e){var d=this;Sys.Extended.UI.PopupBehavior.initializeBase(d,[e]);d._x=0;d._y=0;d._positioningMode=Sys.Extended.UI.PositioningMode.Absolute;d._parentElement=a;d._parentElementID=a;d._moveHandler=a;d._firstPopup=c;d._originalParent=a;d._visible=b;d._onShow=a;d._onHide=a;d._onShowEndedHandler=Function.createDelegate(d,d._onShowEnded);d._onHideEndedHandler=Function.createDelegate(d,d._onHideEnded)};Sys.Extended.UI.PopupBehavior.prototype={initialize:function(){Sys.Extended.UI.PopupBehavior.callBaseMethod(this,"initialize");this._hidePopup();this.get_element().style.position=h},dispose:function(){var b=this,c=b.get_element();if(c){b._visible&&b.hide();if(b._originalParent){c.parentNode.removeChild(c);b._originalParent.appendChild(c);b._originalParent=a}c._hideWindowedElementsIFrame=a}b._parentElement=a;b._onShow&&b._onShow.get_animation()&&b._onShow.get_animation().remove_ended(b._onShowEndedHandler);b._onShow=a;b._onHide&&b._onHide.get_animation()&&b._onHide.get_animation().remove_ended(b._onHideEndedHandler);b._onHide=a;Sys.Extended.UI.PopupBehavior.callBaseMethod(b,"dispose")},show:function(){var a=this;if(a._visible)return;var d=new Sys.CancelEventArgs;a.raiseShowing(d);if(d.get_cancel())return;a._visible=c;var e=a.get_element();$common.setVisible(e,c);a.setupPopup();if(a._onShow){$common.setVisible(e,b);a.onShow()}else a.raiseShown(Sys.EventArgs.Empty)},hide:function(){var a=this;if(!a._visible)return;var c=new Sys.CancelEventArgs;a.raiseHiding(c);if(c.get_cancel())return;a._visible=b;if(a._onHide)a.onHide();else{a._hidePopup();a._hideCleanup()}},getBounds:function(){var e=this,d=e.get_element(),k=d.offsetParent||document.documentElement,h,a;if(e.get_parentElement()){a=$common.getBounds(e.get_parentElement());var j=$common.getLocation(k);h={x:a.x-j.x,y:a.y-j.y}}else{a=$common.getBounds(k);h={x:0,y:0}}var f=d.offsetWidth-(d.clientLeft?d.clientLeft*2:0),g=d.offsetHeight-(d.clientTop?d.clientTop*2:0);if(e._firstpopup){d.style.width=f+"px";e._firstpopup=b}var i,c;switch(e._positioningMode){case Sys.Extended.UI.PositioningMode.Center:c={x:Math.round(a.width/2-f/2),y:Math.round(a.height/2-g/2),altX:Math.round(a.width/2-f/2),altY:Math.round(a.height/2-g/2)};break;case Sys.Extended.UI.PositioningMode.BottomLeft:c={x:0,y:a.height,altX:a.width-f,altY:0-g};break;case Sys.Extended.UI.PositioningMode.BottomRight:c={x:a.width-f,y:a.height,altX:0,altY:0-g};break;case Sys.Extended.UI.PositioningMode.TopLeft:c={x:0,y:-d.offsetHeight,altX:a.width-f,altY:a.height};break;case Sys.Extended.UI.PositioningMode.TopRight:c={x:a.width-f,y:-d.offsetHeight,altX:0,altY:a.height};break;case Sys.Extended.UI.PositioningMode.Right:c={x:a.width,y:0,altX:-d.offsetWidth,altY:a.height-g};break;case Sys.Extended.UI.PositioningMode.Left:c={x:-d.offsetWidth,y:0,altX:a.width,altY:a.height-g};break;default:c={x:0,y:0,altX:0,altY:0}}c.x+=e._x+h.x;c.altX+=e._x+h.x;c.y+=e._y+h.y;c.altY+=e._y+h.y;i=e._verifyPosition(c,f,g,a);return new Sys.UI.Bounds(i.x,i.y,f,g)},_verifyPosition:function(a,f,e){var c=0,d=0,b=this._getWindowBounds();if(!(a.x+f>b.x+b.width||a.x<b.x))c=a.x;else{c=a.altX;if(a.altX<b.x){if(a.x>a.altX)c=a.x}else if(b.width+b.x-a.altX<f){var g=a.x>a.altX?Math.abs(b.x-a.x):b.x-a.x;if(g<f-b.width-b.x+a.altX)c=a.x}}if(!(a.y+e>b.y+b.height||a.y<b.y))d=a.y;else{d=a.altY;if(a.altY<b.y){if(b.y-a.altY>e-b.height-b.y+a.y)d=a.y}else if(b.height+b.y-a.altY<e)if(b.y-a.y<e-b.height-b.y+a.altY)d=a.y}return{x:c,y:d}},_getWindowBounds:function(){var a=this;return{x:a._getWindowScrollLeft(),y:a._getWindowScrollTop(),width:a._getWindowWidth(),height:a._getWindowHeight()}},_getWindowHeight:function(){var a=0;if(document.documentElement&&document.documentElement.clientHeight)a=document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight)a=document.body.clientHeight;return a},_getWindowWidth:function(){var a=0;if(document.documentElement&&document.documentElement.clientWidth)a=document.documentElement.clientWidth;else if(document.body&&document.body.clientWidth)a=document.body.clientWidth;return a},_getWindowScrollTop:function(){var a=0;if(typeof window.pageYOffset=="number")a=window.pageYOffset;if(document.body&&document.body.scrollTop)a=document.body.scrollTop;else if(document.documentElement&&document.documentElement.scrollTop)a=document.documentElement.scrollTop;return a},_getWindowScrollLeft:function(){var a=0;if(typeof window.pageXOffset=="number")a=window.pageXOffset;else if(document.body&&document.body.scrollLeft)a=document.body.scrollLeft;else if(document.documentElement&&document.documentElement.scrollLeft)a=document.documentElement.scrollLeft;return a},adjustPopupPosition:function(a){var f=this.get_element();if(!a)a=this.getBounds();var d=$common.getBounds(f),e=b;if(d.x<0){a.x-=d.x;e=c}if(d.y<0){a.y-=d.y;e=c}e&&$common.setLocation(f,a)},addBackgroundIFrame:function(){var c=this,b=c.get_element();if(Sys.Browser.agent===Sys.Browser.InternetExplorer&&Sys.Browser.version<7){var a=b._hideWindowedElementsIFrame;if(!a){a=document.createElement("iframe");a.src="javascript:'<html></html>';";a.style.position=h;a.style.display="none";a.scrolling="no";a.frameBorder="0";a.tabIndex="-1";a.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";b.parentNode.insertBefore(a,b);b._hideWindowedElementsIFrame=a;c._moveHandler=Function.createDelegate(c,c._onMove);Sys.UI.DomEvent.addHandler(b,"move",c._moveHandler)}$common.setBounds(a,$common.getBounds(b));a.style.left=b.style.left;a.style.top=b.style.top;a.style.display=b.style.display;if(b.currentStyle&&b.currentStyle.zIndex)a.style.zIndex=b.currentStyle.zIndex;else if(b.style.zIndex)a.style.zIndex=b.style.zIndex}},setupPopup:function(){var a=this,b=a.get_element(),c=a.getBounds();$common.setLocation(b,c);a.adjustPopupPosition(c);b.style.zIndex=1e3;a.addBackgroundIFrame()},_hidePopup:function(){var c=this.get_element();$common.setVisible(c,b);if(c.originalWidth){c.style.width=c.originalWidth+"px";c.originalWidth=a}},_hideCleanup:function(){var b=this,d=b.get_element();if(b._moveHandler){Sys.UI.DomEvent.removeHandler(d,"move",b._moveHandler);b._moveHandler=a}if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var c=d._hideWindowedElementsIFrame;if(c)c.style.display="none"}b.raiseHidden(Sys.EventArgs.Empty)},_onMove:function(){var a=this.get_element();if(a._hideWindowedElementsIFrame){a.parentNode.insertBefore(a._hideWindowedElementsIFrame,a);a._hideWindowedElementsIFrame.style.top=a.style.top;a._hideWindowedElementsIFrame.style.left=a.style.left}},get_onShow:function(){return this._onShow?this._onShow.get_json():a},set_onShow:function(c){var a=this;if(!a._onShow){a._onShow=new Sys.Extended.UI.Animation.GenericAnimationBehavior(a.get_element());a._onShow.initialize()}a._onShow.set_json(c);var b=a._onShow.get_animation();b&&b.add_ended(a._onShowEndedHandler);a.raisePropertyChanged("onShow")},get_onShowBehavior:function(){return this._onShow},onShow:function(){var a=this;if(a._onShow){a._onHide&&a._onHide.quit();a._onShow.play()}},_onShowEnded:function(){this.adjustPopupPosition();this.addBackgroundIFrame();this.raiseShown(Sys.EventArgs.Empty)},get_onHide:function(){return this._onHide?this._onHide.get_json():a},set_onHide:function(c){var a=this;if(!a._onHide){a._onHide=new Sys.Extended.UI.Animation.GenericAnimationBehavior(a.get_element());a._onHide.initialize()}a._onHide.set_json(c);var b=a._onHide.get_animation();b&&b.add_ended(a._onHideEndedHandler);a.raisePropertyChanged("onHide")},get_onHideBehavior:function(){return this._onHide},onHide:function(){var a=this;if(a._onHide){a._onShow&&a._onShow.quit();a._onHide.play()}},_onHideEnded:function(){this._hideCleanup()},get_parentElement:function(){var a=this;!a._parentElement&&a._parentElementID&&a.set_parentElement($get(a._parentElementID));return a._parentElement},set_parentElement:function(a){this._parentElement=a;this.raisePropertyChanged("parentElement")},get_parentElementID:function(){return this._parentElement?this._parentElement.id:this._parentElementID},set_parentElementID:function(a){this._parentElementID=a;this.get_isInitialized()&&this.set_parentElement($get(a))},get_positioningMode:function(){return this._positioningMode},set_positioningMode:function(a){this._positioningMode=a;this.raisePropertyChanged("positioningMode")},get_x:function(){return this._x},set_x:function(b){var a=this;if(b!=a._x){a._x=b;a._visible&&a.setupPopup();a.raisePropertyChanged("x")}},get_y:function(){return this._y},set_y:function(b){var a=this;if(b!=a._y){a._y=b;a._visible&&a.setupPopup();a.raisePropertyChanged("y")}},get_visible:function(){return this._visible},add_showing:function(a){this.get_events().addHandler(d,a)},remove_showing:function(a){this.get_events().removeHandler(d,a)},raiseShowing:function(b){var a=this.get_events().getHandler(d);a&&a(this,b)},add_shown:function(a){this.get_events().addHandler(e,a)},remove_shown:function(a){this.get_events().removeHandler(e,a)},raiseShown:function(b){var a=this.get_events().getHandler(e);a&&a(this,b)},add_hiding:function(a){this.get_events().addHandler(f,a)},remove_hiding:function(a){this.get_events().removeHandler(f,a)},raiseHiding:function(b){var a=this.get_events().getHandler(f);a&&a(this,b)},add_hidden:function(a){this.get_events().addHandler(g,a)},remove_hidden:function(a){this.get_events().removeHandler(g,a)},raiseHidden:function(b){var a=this.get_events().getHandler(g);a&&a(this,b)}};Sys.Extended.UI.PopupBehavior.registerClass("Sys.Extended.UI.PopupBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.PopupBehavior,{name:"popup"});Sys.Extended.UI.PositioningMode=function(){throw Error.invalidOperation();};Sys.Extended.UI.PositioningMode.prototype={Absolute:0,Center:1,BottomLeft:2,BottomRight:3,TopLeft:4,TopRight:5,Right:6,Left:7};Sys.Extended.UI.PositioningMode.registerEnum("Sys.Extended.UI.PositioningMode")}if(window.Sys&&Sys.loader)Sys.loader.registerScript(b,["ExtendedAnimations","ExtendedAnimationBehavior"],a);else a()})();
//END PopupExtender.PopupBehavior.js
//START ComboBox.ComboBox.js
Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.ComboBoxAutoCompleteMode=function(){};Sys.Extended.UI.ComboBoxAutoCompleteMode.prototype={None:0,Append:1,Suggest:2,SuggestAppend:3};Sys.Extended.UI.ComboBoxAutoCompleteMode.registerEnum("Sys.Extended.UI.ComboBoxAutoCompleteMode",false);Sys.Extended.UI.ComboBoxStyle=function(){};Sys.Extended.UI.ComboBoxStyle.prototype={DropDownList:0,DropDown:1,Simple:2};Sys.Extended.UI.ComboBoxStyle.registerEnum("Sys.Extended.UI.ComboBoxStyle",false);Sys.Extended.UI.ComboBoxTextSelectionStrategy=function(){};Sys.Extended.UI.ComboBoxTextSelectionStrategy.prototype={Unknown:0,Microsoft:1,W3C:2};Sys.Extended.UI.ComboBoxTextSelectionStrategy.registerEnum("Sys.Extended.UI.ComboBoxTextSelectionStrategy",false);Sys.Extended.UI.ComboBox=function(d){var c=false,b=null,a=this;Sys.Extended.UI.ComboBox.initializeBase(a,[d]);a._comboTableControl=b;a._textBoxControl=b;a._optionListControl=b;a._buttonControl=b;a._hiddenFieldControl=b;a._autoPostBack=c;a._autoCompleteMode=b;a._dropDownStyle=b;a._caseSensitive=c;a._originalSelectedIndex=b;a._listItemHoverCssClass=b;a._popupBehavior=b;a._supressFocusHide=true;a._doingPostBack=c;a._textSelectionStrategy=b;a._highlightSuggestedItem=c;a._highlightedIndex=b;a._optionListItems=b;a._optionListItemHeight=b;a._optionListHeight=b;a._optionListWidth=b;a.clearDelegates()};Sys.Extended.UI.ComboBox.prototype={initialize:function(){var a=this;Sys.Extended.UI.ComboBox.callBaseMethod(a,"initialize");a.createDelegates();a.initializeTextBox();a.initializeButton();a.initializeOptionList();a.addHandlers()},dispose:function(){var a=this;if(a._popupBehavior){a._popupBehavior.remove_showing(a._popupShowingHandler);a._popupBehavior.remove_shown(a._popupShownHandler);a._popupBehavior.remove_hiding(a._popupHidingHandler);a._popupBehavior.dispose();a._popupBehavior=null}a.clearHandlers();a.clearDelegates();Sys.Extended.UI.ComboBox.callBaseMethod(a,"dispose")},createDelegates:function(){var a=this;a._listMouseOverHandler=Function.createDelegate(a,a._onListMouseOver);a._listMouseOutHandler=Function.createDelegate(a,a._onListMouseOut);a._listMouseDownHandler=Function.createDelegate(a,a._onListMouseDown);a._listClickHandler=Function.createDelegate(a,a._onListClick);a._listDragHandler=Function.createDelegate(a,a._onListDrag);a._listSelectStartHandler=Function.createDelegate(a,a._onListSelectStart);a._listMouseWheelHandler=Function.createDelegate(a,a._onListMouseWheel);a._textBoxClickHandler=Function.createDelegate(a,a._onTextBoxClick);a._textBoxFocusHandler=Function.createDelegate(a,a._onTextBoxFocus);a._textBoxBlurHandler=Function.createDelegate(a,a._onTextBoxBlur);a._textBoxKeyPressHandler=Function.createDelegate(a,a._onTextBoxKeyPress);a._textBoxKeyDownHandler=Function.createDelegate(a,a._onTextBoxKeyDown);a._buttonClickHandler=Function.createDelegate(a,a._onButtonClick);a._buttonBlurHandler=Function.createDelegate(a,a._onButtonBlur);a._buttonKeyDownHandler=Function.createDelegate(a,a._onButtonKeyDown);a._buttonKeyPressHandler=Function.createDelegate(a,a._onButtonKeyPress);a._documentClickHandler=Function.createDelegate(a,a._onDocumentClick);a._documentMouseWheelHandler=Function.createDelegate(a,a._onDocumentMouseWheel);a._popupShowingHandler=Function.createDelegate(a,a._popupShowing);a._popupShownHandler=Function.createDelegate(a,a._popupShown);a._popupHidingHandler=Function.createDelegate(a,a._popupHiding)},clearDelegates:function(){var a=null,b=this;b._listMouseOverHandler=a;b._listMouseOutHandler=a;b._listMouseDownHandler=a;b._listClickHandler=a;b._listDragHandler=a;b._listSelectStartHandler=a;b._listMouseWheelHandler=a;b._textBoxClickHandler=a;b._textBoxFocusHandler=a;b._textBoxBlurHandler=a;b._textBoxKeyPressHandler=a;b._textBoxKeyDownHandler=a;b._buttonClickHandler=a;b._buttonBlurHandler=a;b._buttonKeyDownHandler=a;b._buttonKeyPressHandler=a;b._documentClickHandler=a;b._documentMouseWheelHandler=a;b._popupShowingHandler=a;b._popupShownHandler=a;b._popupHidingHandler=a},addHandlers:function(){var d="mousewheel",c="DOMMouseScroll",a=this,b=a.get_optionListControl();$addHandlers(b,{mouseover:a._listMouseOverHandler,mouseout:a._listMouseOutHandler,mousedown:a._listMouseDownHandler,click:a._listClickHandler,drag:a._listDragHandler,selectstart:a._listSelectStartHandler},a);$addHandlers(a.get_textBoxControl(),{click:a._textBoxClickHandler,focus:a._textBoxFocusHandler,blur:a._textBoxBlurHandler,keypress:a._textBoxKeyPressHandler},a);(Sys.Browser.agent==Sys.Browser.InternetExplorer||Sys.Browser.agent===Sys.Browser.Safari||Sys.Browser.agent===Sys.Browser.WebKit)&&$addHandler(a.get_textBoxControl(),"keydown",a._textBoxKeyDownHandler);$addHandlers(a.get_buttonControl(),{click:a._buttonClickHandler,blur:a._buttonBlurHandler,keydown:a._buttonKeyDownHandler,keypress:a._buttonKeyPressHandler},a);$addHandler(document,"click",a._documentClickHandler);if(typeof b.onmousewheel==="undefined"){$addHandler(b,c,a._listMouseWheelHandler);$addHandler(document,c,a._documentMouseWheelHandler)}else{$addHandler(b,d,a._listMouseWheelHandler);$addHandler(document,d,a._documentMouseWheelHandler)}},clearHandlers:function(){$clearHandlers(this.get_optionListControl());$clearHandlers(this.get_textBoxControl());$clearHandlers(this.get_buttonControl());$clearHandlers(document)},initializeTextBox:function(){var a=this.get_textBoxControl().style;if(a.margin=="")a.margin="0px"},initializeButton:function(){var b=this,a=b.get_buttonControl().style;if(a.height==""&&b.get_textBoxControl().offsetHeight>=0)a.height=b.get_textBoxControl().offsetHeight+"px";if(a.width=="")a.width=a.height;if(a.margin=="")a.margin="0px";if(a.padding=="")a.padding="0px";b._buttonControl.style.visibility="visible"},initializeOptionList:function(){var a=this;if(a.get_optionListControl()==null){var k=document.createElement("ul");a.get_element().appendChild(k);a.set_optionListControl(k)}var c=a.get_optionListControl();if(Sys.Browser.agent===Sys.Browser.Safari||Sys.Browser.agent===Sys.Browser.WebKit){a.get_element().removeChild(c);var g=a.get_element().parentNode;while(typeof g!=typeof document.forms[0])g=g.parentNode;var j=document.createElement("div");j.className=a.get_element().className;j.appendChild(c);g.appendChild(j)}var h=c.style;h.display="block";h.zIndex="10000";a._optionListItems=[];for(var l=c.childNodes,i=0;i<l.length;i++){var d=l[i];if(d.tagName==undefined||d.tagName.toUpperCase()!="LI"){c.removeChild(d);i--;continue}var m={},b=d.innerHTML.trim(),e=b.indexOf("\r");while(e>=0){b=b.substring(0,e).trim()+" "+b.substring(e+1,b.length).trim();e=b.indexOf("\r")}var f=b.indexOf("\n");while(f>=0){b=b.substring(0,f).trim()+" "+b.substring(f+1,b.length).trim();f=b.indexOf("\n")}b=b.replace(/\&amp;/g,"&").replace(/\&quot;/g,'"').replace(/\&gt;/g,">").replace(/\&lt;/g,"<");m.text=b.trim();Array.add(a._optionListItems,m);a.initializeOptionListItem(d)}h.width=a._getOptionListBounds().width+"px";h.width="0px";a._popupBehavior=$create(Sys.Extended.UI.PopupBehavior,{id:a.get_id()+"_PopupBehavior",parentElement:a.get_textBoxControl(),positioningMode:Sys.Extended.UI.PositioningMode.BottomLeft},null,null,c);a._popupBehavior.add_showing(a._popupShowingHandler);a._popupBehavior.add_shown(a._popupShownHandler);a._popupBehavior.add_hiding(a._popupHidingHandler);if(a.get_selectedIndex()>=0){a._highlightListItem(a.get_selectedIndex());a.get_textBoxControl().value=a._optionListItems[a.get_selectedIndex()].text}else a.get_textBoxControl().text="";a._popupShowing();c.style.display="none"},initializeOptionListItem:function(a){a._textIsEmpty=false;if(a.innerHTML.length<1){a.innerHTML="&nbsp;";a._textIsEmpty=true}},_popupShowing:function(){var l="hidden",e=this,c=e._getWindowBounds(),d=Sys.UI.DomElement.getBounds(e.get_comboTableControl()),k=e._getOptionListBounds(),o=30,u=c.y+c.height/2,t=d.y+d.height,s=c.x+c.width/2,r=d.x+d.width/2,b=d.y-c.y,j="Top";if(t<=u){j="Bottom";b=c.height-d.height-b}var m=e._getOptionListItemHeight();if(b>=k.height)b=k.height;else b=m*(Math.floor(b/m)-2);var q=b/m,n=q<e._optionListItems.length,p=20;if(j=="Top"&&b<c.height-d.y)j="Bottom";var a=d.x-c.x,i="Left";if(r<=s)a=c.width-a;else{i="Right";a=d.width+a}a-=o;var g=k.width;if(n){g+=p;if(a>=g)a=g}else if(a>=g)a=g;if(i=="Right"&&a<c.width-d.x)i="Left";if(b<0)b=0;if(a<0)a=0;var f=e.get_optionListControl().style;f.height=b+"px";f.width=a+"px";if(n){f.overflow="auto";f.overflowX=l}else f.overflow=l;var h=j+i;if(h=="BottomLeft")e._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.BottomLeft);else if(h=="BottomRight")e._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.BottomRight);else if(h=="TopLeft")e._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.TopLeft);else h=="TopRight"&&e._popupBehavior.set_positioningMode(Sys.Extended.UI.PositioningMode.TopRight);f.visibility=l},_popupShown:function(){var a=this,b=a.get_optionListControl();b.style.display="block";var g=Sys.UI.DomElement.getBounds(a.get_comboTableControl()),e=Sys.UI.DomElement.getBounds(b),c=Sys.UI.DomElement.getBounds(a.get_textBoxControl()),f=e.y,d;if(a._popupBehavior.get_positioningMode()===Sys.Extended.UI.PositioningMode.BottomLeft||a._popupBehavior.get_positioningMode()===Sys.Extended.UI.PositioningMode.TopLeft)d=c.x;else if(a._popupBehavior.get_positioningMode()===Sys.Extended.UI.PositioningMode.BottomRight||a._popupBehavior.get_positioningMode()===Sys.Extended.UI.PositioningMode.TopRight)d=c.x-(e.width-c.width);Sys.UI.DomElement.setLocation(b,d,f);a._ensureHighlightedIndex();a._ensureScrollTop();b.style.visibility="visible"},_popupHiding:function(){this._highlightSuggestedItem=false;var a=this.get_optionListControl().style;a.display="none";a.visibility="hidden"},_onButtonClick:function(b){var a=this;if(a.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.Simple)a._popupBehavior.show();else if(a._popupBehavior._visible)a._popupBehavior.hide();else a._popupBehavior.show();b.preventDefault();b.stopPropagation();return false},_onButtonBlur:function(){var a=this;if(a.get_autoPostBack()==true&&!a._doingPostBack&&a._originalSelectedIndex!=a.get_selectedIndex()){a._doingPostBack=true;__doPostBack(a.get_element().id,"")}},_onButtonKeyDown:function(a){var b=this;if(a.keyCode==Sys.UI.Key.tab||a.keyCode==16)return true;if(!b._popupBehavior._visible&&(a.keyCode==Sys.UI.Key.enter||a.keyCode==Sys.UI.Key.down))b._popupBehavior.show();else b._popupBehavior._visible&&(a.keyCode==Sys.UI.Key.enter||a.keyCode==Sys.UI.Key.up)&&b._popupBehavior.hide();a.stopPropagation();a.preventDefault();var c=b.get_textBoxControl().id;setTimeout(function(){document.getElementById(c).focus()},0);return false},_onButtonKeyPress:function(a){if(a.charCode==Sys.UI.Key.tab||a.charCode==16)return true;a.stopPropagation();a.preventDefault();return false},_onListMouseWheel:function(a){var b;if(typeof a.rawEvent.wheelDelta==="undefined")b=a.rawEvent.detail>=1?1:-1;else b=a.rawEvent.wheelDelta>1?-1:1;this.get_optionListControl().scrollTop+=this._getOptionListItemHeight()*b;a.stopPropagation();a.preventDefault();return false},_onListMouseOver:function(d){var b=this.get_optionListControl();if(d.target!==b)for(var e=d.target,c=b.childNodes,a=0;a<c.length;++a)if(e===c[a]){this._highlightListItem(a,true);break}},_onListMouseOut:function(){var a=this;a._popupBehavior._visible&&a.get_autoCompleteMode()==Sys.Extended.UI.ComboBoxAutoCompleteMode.SuggestAppend&&a._highlightListItem(a._highlightedIndex,false)},_onListMouseDown:function(b){var a=this,c=a.get_optionListControl();if(b.target==c||b.target.tagName=="scrollbar")return true;if(b.target!==c){var e=c.childNodes[a._highlightedIndex],d=a._optionListItems[a._highlightedIndex].text;a.get_textBoxControl().value=d;a.set_selectedIndex(a._highlightedIndex);a._supressFocusHide=false;a._handleTextBoxFocus(null)}else return true;b.preventDefault();b.stopPropagation();return false},_onListClick:function(a){if(a.target==this.get_optionListControl())return true;a.preventDefault();a.stopPropagation();return false},_onListDrag:function(a){a.preventDefault();a.stopPropagation();return false},_onListSelectStart:function(a){a.preventDefault();a.stopPropagation();return false},_onTextBoxClick:function(a){this.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.Simple&&this._popupBehavior.show();a.preventDefault();a.stopPropagation();return false},_onTextBoxFocus:function(a){this._handleTextBoxFocus(a)},_onTextBoxBlur:function(){var a=this;for(var d=a.get_textBoxControl().value.trim(),b=-3,c=0;c<a._optionListItems.length;c++){var e=a._optionListItems[c];if(a._isExactMatch(e.text,d)){b=c;break}}if(a._highlightSuggestedItem==true&&a._highlightedIndex!=null&&a._highlightedIndex>=0){a.set_selectedIndex(a._highlightedIndex);a.get_textBoxControl().value=a._optionListItems[a.get_selectedIndex()].text}else if(b==-3&&d.length>0&&a.get_dropDownStyle()!=Sys.Extended.UI.ComboBoxStyle.DropDownList)a.set_selectedIndex(-2);else if(a._optionListItems.length<1&&(d==""||a.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.DropDownList)){a.set_selectedIndex(-1);a.get_textBoxControl().value=""}else if(a._optionListItems.length>=0&&b==-3&&a.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.DropDownList){a.set_selectedIndex(0);a.get_textBoxControl().value=a._optionListItems[0].text}else if(b>=0){a.set_selectedIndex(b);a.get_textBoxControl().value=a._optionListItems[b].text}a._popupBehavior.hide();if(a.get_autoPostBack()==true&&!a._doingPostBack&&a._originalSelectedIndex!=a.get_selectedIndex()){a._doingPostBack=true;__doPostBack(a.get_element().id,"")}},_onTextBoxKeyDown:function(a){var c=this._handleEnterKey(a);if(c!=null)return c;this._handleArrowKey(a);var b=this._handleErasureKeys(a);return b!=null?b:true},_onTextBoxKeyPress:function(c){var g=null,a=this,l=a._handleEnterKey(c);if(l!=g)return l;var k=a._handleArrowKey(c);if(k!=g)return k;var i=a._handleNonCharacterKey(c);if(i!=g)return i;a.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.Simple&&!a._popupBehavior._visible&&a._popupBehavior.show();if(a.get_selectedIndex()==-1&&a.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.DropDownList){a.get_textBoxControl().value="";c.preventDefault();c.stopPropagation();return false}var b=a._getTextSelectionInfo(a.get_textBoxControl(),c),e=b.selectionStart,f=b.selectionEnd,m=b.selectionPrefix+b.typedCharacter+b.selectionText.substring(1)+b.selectionSuffix,d=b.selectionPrefix+b.typedCharacter,h=a._suggestIndex(m,d);if(a.get_autoCompleteMode()==Sys.Extended.UI.ComboBoxAutoCompleteMode.Suggest||a.get_autoCompleteMode()==Sys.Extended.UI.ComboBoxAutoCompleteMode.SuggestAppend){a._highlightSuggestedItem=true;!a._popupBehavior._visible&&a._popupBehavior.show()}if(h>=0)if(a.get_autoCompleteMode()==Sys.Extended.UI.ComboBoxAutoCompleteMode.Append||a.get_autoCompleteMode()==Sys.Extended.UI.ComboBoxAutoCompleteMode.SuggestAppend){a.get_textBoxControl().value=a._optionListItems[h].text;e=b.selectionStart+1;f=a.get_textBoxControl().value.length}else{a.get_textBoxControl().value=a._optionListItems[h].text.substring(0,d.length);e=a.get_textBoxControl().value.length;f=a.get_textBoxControl().value.length}else if(a.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.Simple||a.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.DropDown){a.get_textBoxControl().value=d;e=d.length;f=d.length}var j=a._handleErasureKeys(c);if(j!=g)return j;a._ensureHighlightedIndex();a._ensureScrollTop();a._setTextSelectionRange(a.get_textBoxControl(),e,f);c.preventDefault();c.stopPropagation();return false},_onDocumentClick:function(){this._popupBehavior._visible&&this._popupBehavior.hide()},_onDocumentMouseWheel:function(){this._popupBehavior&&this._popupBehavior.hide();return true},_handleTextBoxFocus:function(b){var a=this;if(!a._supressFocusHide&&a._popupBehavior._visible){a._popupBehavior.hide();a._supressFocusHide=true;if(a.get_autoPostBack()&&!a._doingPostBack&&a._originalSelectedIndex!=a.get_selectedIndex()){a._doingPostBack=true;__doPostBack(a.get_element().id,"")}}a.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.Simple&&a._popupBehavior.show();a._setTextSelectionRange(a.get_textBoxControl(),0,a.get_textBoxControl().value.length);if(b!=null){b.preventDefault();b.stopPropagation()}},_highlightListItem:function(b,d){var a=this;if(b==undefined||b<0){a._highlightedIndex!=undefined&&a._highlightedIndex>=0&&a._highlightListItem(a._highlightedIndex,false);return}var e=a.get_optionListControl().childNodes,c=e[b];if(d==true){if(a._highlightedIndex==b)return;if(b>=0)if(a.get_listItemHoverCssClass()==undefined||a.get_listItemHoverCssClass()==""){c.style.backgroundColor="Highlight";c.style.color="HighlightText"}else c.className=a.get_listItemHoverCssClass;a._highlightedIndex!=null&&a._highlightedIndex!=b&&a._highlightedIndex>=0&&a._highlightListItem(a._highlightedIndex,false);a._highlightedIndex=b}else{if(a.get_listItemHoverCssClass()==undefined||a.get_listItemHoverCssClass()==""){c.style.backgroundColor="";c.style.color=""}else c.className="";if(b==a._highlightedIndex)a._highlightedIndex=-1}},_suggestIndex:function(g,d){var e=this;for(var f=-1,a=false,c=false,b=0;b<e._optionListItems.length;b++){itemText=e._optionListItems[b].text;if(itemText.length<1)continue;if(itemText.substring(0,1).toLowerCase()!=d.substring(0,1).toLowerCase())continue;var i=itemText.substring(0,g.length);c=i==g;if(!c&&!e.get_caseSensitive())c=i.toLowerCase()==g.toLowerCase();if(c){f=b;break}else if(!a){var h=itemText.substring(0,d.length);a=h==d;if(!a&&!e.get_caseSensitive())a=h.toLowerCase()==d.toLowerCase();if(a)f=b}}return f},_getKeyboardCode:function(a){return a.type=="keypress"?a.charCode:a.type=="keydown"?a.keyCode:undefined},_handleArrowKey:function(b){var a=this;if(b.shiftKey==true)return null;var e=a._getKeyboardCode(b);if(e==Sys.UI.Key.up||e==Sys.UI.Key.down){if(a._popupBehavior._visible){var d=e-39;if(d==-1&&a._highlightedIndex>0||d==1&&a._highlightedIndex<a._optionListItems.length-1){var c=a._highlightedIndex+d;a.get_textBoxControl().value=a._optionListItems[c].text;a._highlightListItem(c,true);a.set_selectedIndex(c);a._ensureScrollTop()}}else a._popupBehavior.show();if(b.type=="keypress"){b.preventDefault();b.stopPropagation();return false}return true}return null},_handleEnterKey:function(b){var a=this,c=a._getKeyboardCode(b);if(c==Sys.UI.Key.enter){if(a._popupBehavior._visible){if(a._highlightedIndex>=0){a.get_textBoxControl().value=a._optionListItems[a._highlightedIndex].text;a.set_selectedIndex(a._highlightedIndex)}a._popupBehavior.hide();b.preventDefault();b.stopPropagation();return false}else if(a.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.Simple||a.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.DropDown)return true;else if(a._highlightedIndex==a.get_selectedIndex())return true;b.preventDefault();b.stopPropagation();return false}return null},_handleErasureKeys:function(d){var b=this,j=b._getKeyboardCode(d),h=j==Sys.UI.Key.backspace,g=j==Sys.UI.Key.del;if(typeof window.event==="undefined"&&d.type=="keypress")g=d.rawEvent.keyCode==46;if(h||g){var a=b._getTextSelectionInfo(b.get_textBoxControl(),d),e,f;if(a.selectionStart<a.selectionEnd){b.get_textBoxControl().value=a.selectionPrefix+a.selectionSuffix;e=a.selectionStart;f=a.selectionStart}else if(a.selectionStart==a.selectionEnd){var c;if(h&&a.selectionStart>0){var i=1;if(a.selectionPrefix.charCodeAt(a.selectionPrefix.length-1)==8)i=2;c=a.selectionPrefix.substr(0,a.selectionPrefix.length-i);c+=a.selectionSuffix;b.get_textBoxControl().value=c;e=a.selectionStart-1;f=a.selectionStart-1}else if(g&&a.selectionStart<a.textBoxValue.length){c=a.selectionSuffix;c=a.selectionPrefix+c.substr(1,a.selectionSuffix.length-1);b.get_textBoxControl().value=c;e=a.selectionStart;f=a.selectionStart;b._setTextSelectionRange(b.get_textBoxControl(),a.selectionStart,a.selectionStart)}}b._ensureHighlightedIndex();b._ensureScrollTop();b._setTextSelectionRange(b.get_textBoxControl(),e,f);if((b.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.Simple||b.get_dropDownStyle()==Sys.Extended.UI.ComboBoxStyle.DropDown)&&(b.get_autoCompleteMode()==Sys.Extended.UI.ComboBoxAutoCompleteMode.Suggest||b.get_autoCompleteMode()==Sys.Extended.UI.ComboBoxAutoCompleteMode.SuggestAppend)&&b._highlightedIndex>=0){var k=b._isExactMatch(b._optionListItems[b._highlightedIndex].text,b.get_textBoxControl().value);!k&&b._highlightListItem(b._highlightedIndex,false)}d.preventDefault();d.stopPropagation();return false}return null},_handleNonCharacterKey:function(a){var b=this,c=b._getKeyboardCode(a),e=c==Sys.UI.Key.backspace,d=c==Sys.UI.Key.del;if(a.type=="keypress")d=c==46;if(e||d)return null;if(b._isNonCharacterKey(a)){if(c==Sys.UI.Key.esc){b._popupBehavior.hide();b.get_textBoxControl().blur();a.preventDefault();a.stopPropagation();return false}return true}return null},_isNonCharacterKey:function(c){var b=true,a=this._getKeyboardCode(c);if(a==Sys.UI.Key.enter||a==Sys.UI.Key.esc)return b;else if(Sys.Browser.agent==Sys.Browser.Safari&&Sys.Browser.version<500){if(a==8||a==9||a==63272||a==63276||a==63277||a==63275||a==63273||a==63234||a==63235||a>=63236&&a<=63243||a==63248)return b}else if(Sys.Browser.agent==Sys.Browser.WebKit){if(a==8||a==9||a==19||a==33||a==34||a==35||a==36||a==37||a==39||a==45||a==46||a==91||a==92||a==93||a==113||a==115||a==118||a==119||a==120||a==122||a==145)return b}else if(Sys.Browser.agent!=Sys.Browser.InternetExplorer)if(a==8||a==9||a==33||a==34||a==35||a==36||a==37||a==39||a==45||a==46){if(!c.shiftKey)return b}else if(a==145)return b;else if(a==19)return b;else if(Sys.Browser.agent==Sys.Browser.Opera){if(a==0||a==16||a==17)return b}else if(Sys.Browser.agent==Sys.Browser.Firefox)if(a==91||a==92||a==93)return b;return false},_ensureScrollTop:function(){var a=this,b=a.get_optionListControl();if(a._highlightedIndex>=0){var c=a._getOptionListItemHeight(),d=c*a._highlightedIndex,e=b.scrollTop+b.clientHeight;if(d<=b.scrollTop||d>=e)b.scrollTop=a._highlightedIndex*c}},_ensureSelectedIndex:function(){var a=this,b=a.get_hiddenFieldControl().value;if(b==""){b=a._optionListItems.length>0?0:-1;a.get_hiddenFieldControl().value=b.toString()}if(a._originalSelectedIndex==null)a._originalSelectedIndex=parseInt(b)},_ensureHighlightedIndex:function(){var a=this,c=a.get_textBoxControl().value;if(a._highlightedIndex!=null&&a._highlightedIndex>=0&&a._isExactMatch(a._optionListItems[a._highlightedIndex].text,c))return;for(var d=-1,f=false,b=0;b<a._optionListItems.length;b++){var e=a._optionListItems[b].text;if(a._isExactMatch(e,c)){a._highlightListItem(b,true);f=true;break}else if(d<0&&a._highlightSuggestedItem)if(a._isPrefixMatch(e,c))d=b}!f&&a._highlightListItem(d,true)},_isExactMatch:function(b,c){var a=b==c;if(!a&&!this.get_caseSensitive())a=b.toLowerCase()==c.toLowerCase();return a},_isPrefixMatch:function(b,a){return this._isExactMatch(b.substring(0,a.length),a)},_setTextSelectionRange:function(d,b,c){var e="character",f=this._getTextSelectionStrategy();if(f==Sys.Extended.UI.ComboBoxTextSelectionStrategy.Microsoft){var a=d.createTextRange();a.collapse(true);a.moveEnd(e,c);a.moveStart(e,b);a.select();Sys.Browser.agent==Sys.Browser.Opera&&d.setSelectionRange(b,c)}else f==Sys.Extended.UI.ComboBoxTextSelectionStrategy.W3C&&d.setSelectionRange(b,c)},_getTextSelectionStrategy:function(){var a=this;if(a._textSelectionStrategy==null)if(a.get_textBoxControl().createTextRange)a._textSelectionStrategy=Sys.Extended.UI.ComboBoxTextSelectionStrategy.Microsoft;else if(a.get_textBoxControl().setSelectionRange)a._textSelectionStrategy=Sys.Extended.UI.ComboBoxTextSelectionStrategy.W3C;else a._textSelectionStrategy=Sys.Extended.UI.ComboBoxTextSelectionStrategy.Unknown;return a._textSelectionStrategy},_getTextSelectionInfo:function(b,e){var c="character",a={};a.strategy=this._getTextSelectionStrategy();if(a.strategy==Sys.Extended.UI.ComboBoxTextSelectionStrategy.Microsoft){var d=document.selection.createRange();a.selectionStart=0;a.selectionEnd=b.value.length;while(d.moveStart(c,-1)!=0)a.selectionStart++;while(d.moveEnd(c,1)!=0)a.selectionEnd--}else if(a.strategy==Sys.Extended.UI.ComboBoxTextSelectionStrategy.W3C){a.selectionStart=b.selectionStart;a.selectionEnd=b.selectionEnd}a.typedCharacter=String.fromCharCode(e.charCode);a.textBoxValue=b.value;a.selectionPrefix=a.textBoxValue.length>=a.selectionStart?a.textBoxValue.substring(0,a.selectionStart):"";a.selectionText=a.textBoxValue.length>=a.selectionEnd?a.textBoxValue.substring(a.selectionStart,a.selectionEnd):"";a.selectionSuffix=a.textBoxValue.length>=a.selectionEnd?a.textBoxValue.substring(a.selectionEnd,a.textBoxValue.length):"";a.selectionTextFirst=a.selectionText.substring(0,1);return a},_getOptionListItemHeight:function(){var a=this,b=a.get_optionListControl();if(a._optionListItemHeight==null&&b.scrollHeight>0)a._optionListItemHeight=Math.round(b.scrollHeight/a._optionListItems.length);else if(Sys.Browser.agent===Sys.Browser.InternetExplorer&&Sys.Browser.version<7&&Math.round(b.scrollHeight/a._optionListItems.length)<a._optionListItemHeight)a._optionListItemHeight=Math.round(b.scrollHeight/a._optionListItems.length);return a._optionListItemHeight},_getOptionListBounds:function(){return{width:this._getOptionListWidth(),height:this._getOptionListHeight()}},_getOptionListHeight:function(){var a=this;if(a._optionListHeight==null||a._getOptionListItemHeight()*a._optionListItems.length<a._optionListHeight)a._optionListHeight=a._getOptionListItemHeight()*a._optionListItems.length;if(a._optionListHeight<0)a._optionListHeight=0;return a._optionListHeight},_getOptionListWidth:function(){var a=this,d=a.get_optionListControl();if(a._optionListWidth==null){var i=1,h=1,g=0,f=0,c=d.style;c.overflow="auto";var b=a.get_comboTableControl().offsetWidth;b-=i+h;if(b<0)b=0;var e=c.width;c.width=b+"px";if(a.get_comboTableControl().offsetWidth<d.scrollWidth)b=d.scrollWidth+f+g;c.overflow="hidden";c.width=e;a._optionListWidth=b}if(a._optionListWidth<0)a._optionListWidth=0;return a._optionListWidth},_getWindowBounds:function(){var a=this;return{x:a._getScrollLeft(),y:a._getScrollTop(),width:a._getWindowWidth(),height:a._getWindowHeight()}},_getWindowHeight:function(){var a=0;if(typeof window.innerHeight=="number")a=window.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)a=document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight)a=document.body.clientHeight;return a},_getWindowWidth:function(){var a=0;if(typeof window.innerWidth=="number")a=window.innerWidth;else if(document.documentElement&&document.documentElement.clientWidth)a=document.documentElement.clientWidth;else if(document.body&&document.body.clientWidth)a=document.body.clientWidth;return a},_getScrollTop:function(){var a=0;if(typeof window.pageYOffset=="number")a=window.pageYOffset;if(document.body&&document.body.scrollTop)a=document.body.scrollTop;else if(document.documentElement&&document.documentElement.scrollTop)a=document.documentElement.scrollTop;return a},_getScrollLeft:function(){var a=0;if(typeof window.pageXOffset=="number")a=window.pageXOffset;else if(document.body&&document.body.scrollLeft)a=document.body.scrollLeft;else if(document.documentElement&&document.documentElement.scrollLeft)a=document.documentElement.scrollLeft;return a},set_comboTableControl:function(a){if(this._comboTableControl!==a){this._comboTableControl=a;this.raisePropertyChanged("comboTableControl")}},get_comboTableControl:function(){return this._comboTableControl},set_textBoxControl:function(a){if(this._textBoxControl!==a){this._textBoxControl=a;this.raisePropertyChanged("textBoxControl")}},get_textBoxControl:function(){return this._textBoxControl},set_buttonControl:function(a){if(this._buttonControl!==a){this._buttonControl=a;this.raisePropertyChanged("buttonControl")}},get_buttonControl:function(){return this._buttonControl},set_optionListControl:function(a){if(this._optionListControl!==a){this._optionListControl=a;this.raisePropertyChanged("optionListControl")}},get_optionListControl:function(){return this._optionListControl},set_hiddenFieldControl:function(a){if(this._hiddenFieldControl!==a){this._hiddenFieldControl=a;this.raisePropertyChanged("hiddenFieldControl")}},get_hiddenFieldControl:function(){return this._hiddenFieldControl},set_selectedIndex:function(b){var a=this;if(a.get_hiddenFieldControl().value!==b.toString()){a.get_hiddenFieldControl().value=b.toString();a._ensureSelectedIndex();a.raisePropertyChanged("selectedIndex")}},get_selectedIndex:function(){this._ensureSelectedIndex();var a=this.get_hiddenFieldControl().value;return parseInt(a)},set_autoPostBack:function(a){if(this._autoPostBack!==a){this._autoPostBack=a;this.raisePropertyChanged("autoPostBack")}},get_autoPostBack:function(){return this._autoPostBack},set_autoCompleteMode:function(a){if(this._autoCompleteMode!==a){this._autoCompleteMode=a;this.raisePropertyChanged("autoCompleteMode")}},get_autoCompleteMode:function(){return this._autoCompleteMode},set_dropDownStyle:function(a){if(this._dropDownStyle!==a){this._dropDownStyle=a;this.raisePropertyChanged("dropDownStyle")}},get_dropDownStyle:function(){return this._dropDownStyle},set_caseSensitive:function(a){if(this._caseSensitive!==a){this._caseSensitive=a;this.raisePropertyChanged("caseSensitive")}},get_caseSensitive:function(){return this._caseSensitive},set_listItemHoverCssClass:function(a){if(this._listItemHoverCssClass!==a){this._listItemHoverCssClass=a;this.raisePropertyChanged("listItemHoverCssClass")}},get_listItemHoverCssClass:function(){return this._listItemHoverCssClass}};Sys.Extended.UI.ComboBox.registerClass("Sys.Extended.UI.ComboBox",Sys.UI.Control);
//END ComboBox.ComboBox.js
//START HTMLEditor.Enums.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.ActiveModeType=function(){};Sys.Extended.UI.HTMLEditor.ActiveModeType.prototype={Design:0,Html:1,Preview:2};Sys.Extended.UI.HTMLEditor.ActiveModeType_checkValue=function(a){return a>=0&&a<=2?true:false};Sys.Extended.UI.HTMLEditor.ActiveModeType.registerEnum("Sys.Extended.UI.HTMLEditor.ActiveModeType",true);
//END HTMLEditor.Enums.js
//START HTMLEditor.Editor.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.Editor=function(b){var a=this;Sys.Extended.UI.HTMLEditor.Editor.initializeBase(a,[b]);a._editPanel=null;a._changingToolbar=null;if(Sys.Extended.UI.HTMLEditor.isIE&&Sys.Browser.version==8&&document.compatMode!="BackCompat"||Sys.Extended.UI.HTMLEditor.isOpera)a._onresize$delegate=Function.createDelegate(a,a._onresize)};Sys.Extended.UI.HTMLEditor.Editor.prototype={get_autofocus:function(){return this._editPanel.get_autofocus()},set_autofocus:function(a){this._editPanel.set_autofocus(a)},get_content:function(){return this._editPanel.get_content()},set_content:function(a){this._editPanel.set_content(a)},get_activeMode:function(){return this._editPanel.get_activeMode()},set_activeMode:function(a){this._editPanel.set_activeMode(a)},get_editPanel:function(){return this._editPanel},set_editPanel:function(a){this._editPanel=a},get_changingToolbar:function(){return this._changingToolbar},set_changingToolbar:function(a){this._changingToolbar=a},add_propertyChanged:function(a){this._editPanel.add_propertyChanged(a)},remove_propertyChanged:function(a){this._editPanel.remove_propertyChanged(a)},initialize:function(){var c="BackCompat",a=this;Sys.Extended.UI.HTMLEditor.Editor.callBaseMethod(a,"initialize");var b=a.get_element(),e=b.className;Sys.UI.DomElement.removeCssClass(b,e);Sys.UI.DomElement.addCssClass(b,"ajax__htmleditor_editor_base");Sys.UI.DomElement.addCssClass(b,e);if(!Sys.Extended.UI.HTMLEditor.isIE&&document.compatMode!=c)a.get_element().style.height="100%";if(Sys.Extended.UI.HTMLEditor.isIE&&Sys.Browser.version==8&&document.compatMode!=c||Sys.Extended.UI.HTMLEditor.isOpera){$addHandlers(b,{resize:a._onresize$delegate});var d=a.get_editPanel();a._saved_setActive=d._setActive;d._setActive=Function.createDelegate(a,a._setActive);var f=a;if(Sys.Extended.UI.HTMLEditor.isOpera)setTimeout(function(){f._ensureVisibleResize()},0);else f._ensureVisibleResize()}},_setActive:function(c){var a=this,b=a;Function.createDelegate(a.get_editPanel(),a._saved_setActive)(c);if(!Sys.Extended.UI.HTMLEditor.isReallyVisible(a.get_element()))setTimeout(function(){b._ensureVisibleResize()},0);else b._ensureVisibleResize()},_ensureVisibleResize:function(){var b=false,a;if(!Sys.Extended.UI.HTMLEditor.isReallyVisible(this.get_element())){b=true;a=Sys.Extended.UI.HTMLEditor.setElementVisibility(this.get_element())}this._onresize();if(b){Sys.Extended.UI.HTMLEditor.restoreElementVisibility(a);delete a}},dispose:function(){var a=this;if(Sys.Extended.UI.HTMLEditor.isIE&&Sys.Browser.version==8&&document.compatMode!="BackCompat"||Sys.Extended.UI.HTMLEditor.isOpera){$common.removeHandlers(a.get_element(),{resize:a._onresize$delegate});a.get_editPanel()._setActive=a._saved_setActive}Sys.Extended.UI.HTMLEditor.Editor.callBaseMethod(a,"dispose")},_onresize:function(c){var b="undefined";try{var a=this.get_editPanel().get_element().parentNode;if(typeof c==b||c==null)a.style.height="";var d=Sys.Extended.UI.HTMLEditor.Editor.MidleCellHeightForIE(a.parentNode.parentNode.parentNode,a.parentNode);a.style.height=d;typeof this.get_editPanel().get_activePanel()._onresize!=b&&this.get_editPanel().get_activePanel()._onresize()}catch(e){}return true}};Sys.Extended.UI.HTMLEditor.Editor.registerClass("Sys.Extended.UI.HTMLEditor.Editor",Sys.UI.Control);Sys.Extended.UI.HTMLEditor.Editor.MidleCellHeightForIE=function(a,h){var e="100%";if(Sys.Extended.UI.HTMLEditor.isIE&&document.compatMode!="BackCompat"||Sys.Extended.UI.HTMLEditor.isOpera)try{for(var g=2,c=0;c<a.rows.length;c++)if(a.rows[c]!=h)g+=a.rows[c].offsetHeight+1;var b=a.clientHeight;if(Sys.Browser.version==8||Sys.Extended.UI.HTMLEditor.isOpera){var d=a.style.height,f=a.parentNode.style.height;if(d.indexOf("px")>0)b=parseInt(d);else if(d=="100%"&&f.indexOf("px")>0)b=parseInt(f)}e=(b-g)*100/(b*1)+"%"}catch(i){e=""}return e};
//END HTMLEditor.Editor.js
//START HTMLEditor.Toolbar.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.Toolbar=function(b){var a=this;Sys.Extended.UI.HTMLEditor.Toolbar.initializeBase(a,[b]);a._loaded=false;a._cachedButtonIds=null;a._cachedEditPanel=null;a._buttons=null;a._alwaysVisible=false;a._app_onload$delegate=Function.createDelegate(a,a._app_onload)};Sys.Extended.UI.HTMLEditor.Toolbar.prototype={get_alwaysVisible:function(){return this._alwaysVisible},set_alwaysVisible:function(a){this._alwaysVisible=a;this.get_isInitialized()&&this.raisePropertyChanged("alwaysVisible")},set_activeEditPanel:function(c){var a=this;if(!a._loaded){a._cachedEditPanel=c;return}for(var b=0;b<a.get_buttons().length;b++)a.get_buttons()[b].set_activeEditPanel(c)},disable:function(){var a=this;if(a.get_isInitialized()){if(a._alwaysVisible)return;for(var b=0;b<a.get_buttons().length;b++)a.get_buttons()[b].set_activeEditPanel(null)}},get_buttons:function(){if(this._buttons==null)this._buttons=[];return this._buttons},set_buttons:function(a){this.get_buttons().push(a)},get_buttonIds:function(){},set_buttonIds:function(c){if(!this.get_isInitialized()){this._cachedButtonIds=c;return}for(var b=c.split(";"),a=0;a<b.length;a++)b[a].length>0&&this.set_buttons($find(b[a]))},initialize:function(){Sys.Extended.UI.HTMLEditor.Toolbar.callBaseMethod(this,"initialize");Sys.Application.add_load(this._app_onload$delegate)},dispose:function(){this._loaded=false;Sys.Application.remove_load(this._app_onload$delegate);Sys.Extended.UI.HTMLEditor.Toolbar.callBaseMethod(this,"dispose")},_app_onload:function(){var b=null,a=this;if(a._cachedButtonIds!=b){a.set_buttonIds(a._cachedButtonIds);a._cachedButtonIds=b}a._loaded=true;if(a._cachedEditPanel!=b){a.set_activeEditPanel(a._cachedEditPanel);a._cachedEditPanel=b}}};Sys.Extended.UI.HTMLEditor.Toolbar.registerClass("Sys.Extended.UI.HTMLEditor.Toolbar",Sys.UI.Control);
//END HTMLEditor.Toolbar.js
//START HTMLEditor.Toolbar_buttons.CommonButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton=function(b){var a=this;Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton.initializeBase(a,[b]);a._loaded=false;a._preservePlace=false;a._editPanel=null;a._activeModes=null;a._app_onload$delegate=Function.createDelegate(a,a._app_onload);a._cssClass="";a._onmouseover$delegate=Function.createDelegate(a,a._onmouseover);a._onmouseout$delegate=Function.createDelegate(a,a._onmouseout);a._onmousedown$delegate=Function.createDelegate(a,a._onmousedown);a._onmouseup$delegate=Function.createDelegate(a,a._onmouseup);a._onclick$delegate=Function.createDelegate(a,a._onclick)};Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton.prototype={get_preservePlace:function(){return this._preservePlace},set_preservePlace:function(a){this._preservePlace=a},set_activeEditPanel:function(b){var a=this;a._editPanel=b;if(a._editPanel==null)a.hideButton();else if(a.isAllowedActiveMode(a._editPanel.get_activeMode())&&a.canBeShown()){a.showButton();a.onEditPanelActivity()}else a.hideButton()},isImage:function(){return true},checkRangeInDesign:function(){var a=this;if(typeof a._designPanel=="undefined")return false;if(a._designPanel==null)return false;if(a._designPanel.isPopup())return false;var b=Sys.Extended.UI.HTMLEditor.getSelParent(a._designPanel);if(b.nodeType==3)b=b.parentNode;return b.ownerDocument==a._designPanel._doc},get_buttonName:function(){var a=Object.getType(this).getName();a=a.substring(a.lastIndexOf(".")+1);return a},get_message:function(a){var b="Sys.Extended.UI.Resources.HTMLEditor_toolbar_button_"+this.get_buttonName()+"_message_"+a;return eval(b)},isDisplayed:function(){var a=this.get_element();if(a){var b=a.style;return b.display!="none"&&b.visibility!="hidden"}else return false},hideButton:function(){var a=this.get_element();if(a)if(!this._preservePlace)a.style.display="none";else a.style.visibility="hidden"},showButton:function(){var a=this.get_element();if(a){if(a.style.display=="none")a.style.display="";if(this._preservePlace)a.style.visibility="visible"}},canBeShown:function(){return true},onEditPanelActivity:function(){},get_activeModes:function(){if(this._activeModes==null)this._activeModes=[];return this._activeModes},set_activeModes:function(a){this.get_activeModes().push(a)},get_activeModesIds:function(){},set_activeModesIds:function(c){for(var b=c.split(";"),a=0;a<b.length;a++)this.set_activeModes(parseInt(b[a]))},set_toolTip:function(a){this.get_element().title=a},get_toolTip:function(){return this.get_element().title},isAllowedActiveMode:function(b){for(var a=0;a<this.get_activeModes().length;a++)if(this.get_activeModes()[a]==b)return true;return false},initialize:function(){var c="none",a=this;Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton.callBaseMethod(a,"initialize");Sys.Application.add_load(a._app_onload$delegate);var b=a.get_element();if(a._preservePlace&&!a.canBeShown())b.style.display=c;a._cssClass=b.className;a.isImage()&&$addHandlers(b,{mouseover:a._onmouseover$delegate,mouseout:a._onmouseout$delegate,mousedown:a._onmousedown$delegate,mouseup:a._onmouseup$delegate,click:a._onclick$delegate});if(Sys.Extended.UI.HTMLEditor.isIE){function d(a){if(a.nodeType==1&&a.tagName){var b=a.tagName.toUpperCase();if(b!="INPUT"&&b!="TEXTAREA"&&b!="IFRAME")a.unselectable="on";for(var c=0;c<a.childNodes.length;c++)d(a.childNodes.item(c))}}d(b)}else try{b.style.MozUserSelect=c;b.parentNode.style.MozUserSelect=c}catch(e){}},dispose:function(){var a=this;a.isImage()&&$common.removeHandlers(a.get_element(),{mouseover:a._onmouseover$delegate,mouseout:a._onmouseout$delegate,mousedown:a._onmousedown$delegate,mouseup:a._onmouseup$delegate,click:a._onclick$delegate});a._loaded=false;Sys.Application.remove_load(a._app_onload$delegate);Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton.callBaseMethod(a,"dispose")},_app_onload:function(){this.onButtonLoaded();this._loaded=true},onButtonLoaded:function(){},_onmouseover:function(){if(!this.isEnable())return false;Sys.UI.DomElement.addCssClass(this.get_element(),this._cssClass+"_hover");return true},_onmouseout:function(){var a=this;if(!a.isEnable())return false;Sys.UI.DomElement.removeCssClass(a.get_element(),a._cssClass+"_hover");Sys.UI.DomElement.removeCssClass(a.get_element(),a._cssClass+"_mousedown");return true},_onmousedown:function(){if(!this.isEnable())return null;Sys.UI.DomElement.addCssClass(this.get_element(),this._cssClass+"_mousedown");return false},_onmouseup:function(){if(!this.isEnable())return false;Sys.UI.DomElement.removeCssClass(this.get_element(),this._cssClass+"_mousedown");return true},_onclick:function(){return!this.isEnable()?false:true},isEnable:function(){return!this._loaded?false:this._editPanel==null?false:true},setActivity:function(b){var a=this;if(b)Sys.UI.DomElement.addCssClass(a.get_element(),a._cssClass+"_active");else Sys.UI.DomElement.removeCssClass(a.get_element(),a._cssClass+"_active")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton",Sys.UI.Control);
//END HTMLEditor.Toolbar_buttons.CommonButton.js
//START HTMLEditor.Toolbar_buttons.ImageButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton=function(b){var a=this;Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.initializeBase(a,[b]);a._normalSrc="";a._hoverSrc="";a._downSrc="";a._activeSrc="";a._downTimer=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.prototype={get_normalSrc:function(){return this._normalSrc},set_normalSrc:function(b){this._normalSrc=b;var a=this.get_element();if(/none$/.test(a.src))a.src=b},get_hoverSrc:function(){return this._hoverSrc},set_hoverSrc:function(a){this._hoverSrc=a},get_downSrc:function(){return this._downSrc},set_downSrc:function(a){this._downSrc=a},get_activeSrc:function(){return this._activeSrc},set_activeSrc:function(a){this._activeSrc=a},isImage:function(){return true},_onmouseover:function(){var a=this;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.callBaseMethod(a,"_onmouseover"))return false;if(a._hoverSrc.length>0)a.get_element().src=a._hoverSrc;return true},_onmouseout:function(){var a=this,b=a.get_element();if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.callBaseMethod(a,"_onmouseout"))return false;if(a._hoverSrc.length>0)if(Sys.UI.DomElement.containsCssClass(b,a._cssClass+"_mousedown")&&a._downSrc.length>0)b.src=a._downSrc;else if(Sys.UI.DomElement.containsCssClass(b,a._cssClass+"_active")&&a._activeSrc.length>0)b.src=a._activeSrc;else b.src=a._normalSrc;return true},_onmousedown:function(){var a=this;if(Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.callBaseMethod(a,"_onmousedown")===null)return null;if(a._downSrc.length>0){a.get_element().src=a._downSrc;a._downTimer=setTimeout(Function.createDelegate(a,a._onmouseup),1e3)}return true},_onmouseup:function(){var a=this,b=a.get_element();if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.callBaseMethod(a,"_onmouseup"))return false;if(a._downSrc.length>0){if(Sys.UI.DomElement.containsCssClass(b,a._cssClass+"_hover")&&a._hoverSrc.length>0)b.src=a._hoverSrc;else if(Sys.UI.DomElement.containsCssClass(b,a._cssClass+"_active")&&a._activeSrc.length>0)b.src=a._activeSrc;else b.src=a._normalSrc;if(a._downTimer!=null){clearTimeout(a._downTimer);a._downTimer=null}}return true},setActivity:function(c){var a=this,b=a.get_element();if(a._activeSrc.length>0)if(c){if(!Sys.UI.DomElement.containsCssClass(b,a._cssClass+"_active"))b.src=a._activeSrc}else if(Sys.UI.DomElement.containsCssClass(b,a._cssClass+"_active"))if(Sys.UI.DomElement.containsCssClass(b,a._cssClass+"_mousedown")&&a._downSrc.length>0)b.src=a._downSrc;else if(Sys.UI.DomElement.containsCssClass(b,a._cssClass+"_hover")&&a._hoverSrc.length>0)b.src=a._hoverSrc;else b.src=a._normalSrc;Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.callBaseMethod(a,"setActivity",[c])}};Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton);
//END HTMLEditor.Toolbar_buttons.ImageButton.js
//START HTMLEditor.Toolbar_buttons.DesignModeImageButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton.initializeBase(this,[a]);this._designPanel=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton.prototype={_onmousedown:function(c){var a=false,b=this;if(b._designPanel==null)return a;if(b._designPanel.isPopup())return a;if(Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton.callBaseMethod(b,"_onmousedown",[c])===null)return a;b.callMethod();return a},onEditPanelActivity:function(){this._designPanel=this._editPanel.get_activePanel()},callMethod:function(){return this._designPanel==null?false:this._designPanel.isPopup()?false:true}};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.ImageButton);
//END HTMLEditor.Toolbar_buttons.DesignModeImageButton.js
//START HTMLEditor.Toolbar_buttons.EditorToggleButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton.prototype={onEditPanelActivity:function(){Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton.callBaseMethod(this,"onEditPanelActivity");this.setActivity(this.checkState())},checkState:function(){return!this.checkRangeInDesign()?false:true}};Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton);
//END HTMLEditor.Toolbar_buttons.EditorToggleButton.js
//START HTMLEditor.Toolbar_buttons.Bold.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("bold",false,null)},checkState:function(){return!Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold.callBaseMethod(this,"checkState")?false:this._designPanel._queryCommandState("bold")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Bold",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.Bold.js
//START HTMLEditor.Toolbar_buttons.Italic.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("italic",false,null)},checkState:function(){return!Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic.callBaseMethod(this,"checkState")?false:this._designPanel._queryCommandState("italic")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Italic",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.Italic.js
//START HTMLEditor.Toolbar_buttons.Underline.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("underline",false,null)},checkState:function(){return!Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline.callBaseMethod(this,"checkState")?false:this._designPanel._queryCommandState("underline")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Underline",Sys.Extended.UI.HTMLEditor.ToolbarButton.EditorToggleButton);
//END HTMLEditor.Toolbar_buttons.Underline.js
//START HTMLEditor.Toolbar_buttons.HorizontalSeparator.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.HorizontalSeparator=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.HorizontalSeparator.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.HorizontalSeparator.prototype={isImage:function(){return false}};Sys.Extended.UI.HTMLEditor.ToolbarButton.HorizontalSeparator.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.HorizontalSeparator",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton);
//END HTMLEditor.Toolbar_buttons.HorizontalSeparator.js
//START HTMLEditor.Toolbar_buttons.BoxButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton.prototype={initialize:function(){Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton.callBaseMethod(this,"initialize")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton);
//END HTMLEditor.Toolbar_buttons.BoxButton.js
//START HTMLEditor.Toolbar_buttons.DesignModeBoxButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton.initializeBase(this,[a]);this._designPanel=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton.prototype={_onmousedown:function(c){var a=false,b=this;if(b._designPanel==null)return a;if(b._designPanel.isPopup())return a;if(Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton.callBaseMethod(b,"_onmousedown",[c])===null)return a;b.callMethod();return a},onEditPanelActivity:function(){this._designPanel=this._editPanel.get_activePanel()},callMethod:function(){return this._designPanel==null?false:this._designPanel.isPopup()?false:true}};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.BoxButton);
//END HTMLEditor.Toolbar_buttons.DesignModeBoxButton.js
//START HTMLEditor.Toolbar_buttons.FixedColorButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton=function(b){var a=this;Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton.initializeBase(a,[b]);a._defaultColor="#000000";a._colorDiv=null;a._methodButton=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton.prototype={get_defaultColor:function(){return this._defaultColor},set_defaultColor:function(a){this._defaultColor=a;if(this._colorDiv!=null)this._colorDiv.get_element().style.backgroundColor=a},get_colorDiv:function(){return this._colorDiv},set_colorDiv:function(a){this._colorDiv=a},get_methodButton:function(){return this._methodButton},set_methodButton:function(a){this._methodButton=a},callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton.callBaseMethod(this,"callMethod"))return false;this.setColor(this.get_defaultColor())},setColor:function(){},initialize:function(){var a=this;Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton.callBaseMethod(a,"initialize");if(a._methodButton!=null)a._methodButton.callMethod=Function.createDelegate(a,a.callMethod);if(a._colorDiv!=null)a._colorDiv.callMethod=Function.createDelegate(a,a.callMethod)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeBoxButton);
//END HTMLEditor.Toolbar_buttons.FixedColorButton.js
//START HTMLEditor.Toolbar_buttons.FixedForeColor.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedForeColor=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedForeColor.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedForeColor.prototype={setColor:function(a){this._designPanel._execCommand("forecolor",false,a)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedForeColor.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedForeColor",Sys.Extended.UI.HTMLEditor.ToolbarButton.FixedColorButton);
//END HTMLEditor.Toolbar_buttons.FixedForeColor.js
//START HTMLEditor.Toolbar_buttons.MethodButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton.prototype={};Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeImageButton);
//END HTMLEditor.Toolbar_buttons.MethodButton.js
//START HTMLEditor.Toolbar_buttons.DesignModePopupImageButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton=function(b){var a=this;Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton.initializeBase(a,[b]);a._relatedPopup=null;a._autoClose=true;a._forclose_onmousedown$delegate=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton.prototype={set_activeEditPanel:function(b){var a=this;a._editPanel!=b&&a._editPanel!=null&&a.closePopup();Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton.callBaseMethod(a,"set_activeEditPanel",[b])},get_autoClose:function(){return this._autoClose},set_autoClose:function(a){this._autoClose=a},get_relatedPopup:function(){return this._relatedPopup},set_relatedPopup:function(a){this._relatedPopup=a},openPopup:function(h,j,i){var c=null,a=this;if(a._autoClose&&a._forclose_onmousedown$delegate!=c)return;if(a._relatedPopup!=c){a._bookmark=c;if(Sys.Extended.UI.HTMLEditor.isIE){var e=a._designPanel._getSelection();a._selType=e.type.toLowerCase();var d=a._designPanel._createRange(e);if(a._selType=="text"||a._selType=="none")try{a._bookmark=d.duplicate()}catch(k){}else if(a._selType=="control"){a._bookmark=d.item(0);d.remove(0);e.empty()}}if(typeof a._relatedPopup.set_relatedElement=="function"){a._relatedPopup.set_relatedElement(a.get_element());a._forclose_onmousedown$delegate=Function.createDelegate(a,a._forclose_onmousedown);if(a._autoClose){var f=a._designPanel.get_element().contentWindow,g=f.document.body,b=a;setTimeout(function(){var d="keydown",a="mousedown";if(b._forclose_onmousedown$delegate!=c){Sys.Extended.UI.HTMLEditor._addEvent(g,a,b._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._addEvent(g,d,b._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._addEvent(document.body,d,b._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._addEvent(window,d,b._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._addEvent(f,a,b._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._addEvent(document.body,a,b._forclose_onmousedown$delegate);document.documentElement&&Sys.Extended.UI.HTMLEditor._addEvent(document.documentElement,a,b._forclose_onmousedown$delegate)}},0)}a._relatedPopup.open(h)}else a._relatedPopup.open(h,j,i)}},_forclose_onmousedown:function(e){var d="keydown",c="mousedown",a=this;if(a._forclose_onmousedown$delegate==null)return true;if(a._relatedPopup.isOpened)a._relatedPopup.close();else return true;if(a._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel)try{if(a._bookmark){if(Sys.Extended.UI.HTMLEditor.isIE){var b;if(a._selType=="control"){b=a._designPanel._doc.body.createControlRange();b.add(a._bookmark)}else b=a._bookmark;b.select()}a._bookmark=null}if(!Sys.Extended.UI.HTMLEditor.isIE){var f=a._designPanel._getSelection(),b=a._designPanel._createRange(f);a._designPanel._removeAllRanges(f);a._designPanel._selectRange(f,b);a._designPanel.focusEditor()}}catch(j){}var i=a;setTimeout(function(){if(i._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel)try{i._editPanel.updateToolbar()}catch(a){}},0);if(a._autoClose)try{var g=a._designPanel.get_element().contentWindow,h=g.document.body;document.documentElement&&Sys.Extended.UI.HTMLEditor._removeEvent(document.documentElement,c,a._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._removeEvent(h,d,a._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._removeEvent(document.body,d,a._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._removeEvent(window,d,a._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._removeEvent(h,c,a._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._removeEvent(g,c,a._forclose_onmousedown$delegate);Sys.Extended.UI.HTMLEditor._removeEvent(document.body,c,a._forclose_onmousedown$delegate)}catch(j){}a._forclose_onmousedown$delegate=null;if(e&&e.type)if(e.type==d){Sys.Extended.UI.HTMLEditor._stopEvent(e);return false}return true},closePopup:function(){this._forclose_onmousedown$delegate!=null&&this._forclose_onmousedown$delegate(null)},dispose:function(){this._forclose_onmousedown$delegate!=null&&this._forclose_onmousedown$delegate(null);Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton.callBaseMethod(this,"dispose")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.DesignModePopupImageButton.js
//START HTMLEditor.Toolbar_buttons.Selector.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.Selector=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.Selector.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.Selector.prototype={};Sys.Extended.UI.HTMLEditor.ToolbarButton.Selector.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.Selector",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModePopupImageButton);
//END HTMLEditor.Toolbar_buttons.Selector.js
//START HTMLEditor.Toolbar_buttons.ColorSelector.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector.initializeBase(this,[a]);this._fixedColorButton=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector.prototype={get_fixedColorButton:function(){return this._fixedColorButton},set_fixedColorButton:function(a){this._fixedColorButton=a},callMethod:function(){var a=this;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector.callBaseMethod(a,"callMethod"))return false;a.openPopup(Function.createDelegate(a,a._onopened));return true},_onopened:function(a){a.setColor=Function.createDelegate(this,this.setColor)},setColor:function(a){this.closePopup();this._fixedColorButton!=null&&this._fixedColorButton.set_defaultColor(a)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector",Sys.Extended.UI.HTMLEditor.ToolbarButton.Selector);
//END HTMLEditor.Toolbar_buttons.ColorSelector.js
//START HTMLEditor.Toolbar_buttons.ForeColorSelector.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector.callBaseMethod(this,"callMethod"))return false},setColor:function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector.callBaseMethod(this,"setColor",[a]);this._designPanel._execCommand("forecolor",false,a)}};Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorSelector",Sys.Extended.UI.HTMLEditor.ToolbarButton.ColorSelector);
//END HTMLEditor.Toolbar_buttons.ForeColorSelector.js
//START HTMLEditor.Popups.Popup.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.Popups");Sys.Extended.UI.HTMLEditor.Popups.Popup=function(b){var a=this;Sys.Extended.UI.HTMLEditor.Popups.Popup.initializeBase(a,[b]);a._iframe=null;a._top=0;a._left=0;a._doc=null;a._initialContent="";a._cssPath="";a._autoDimensions=true;a._registeredFields=[];a._registeredHandlers=[];a._app_onload$delegate=Function.createDelegate(a,a._app_onload);a.isOpened=false;a.isLoaded=false;a.isLoading=false};Sys.Extended.UI.HTMLEditor.Popups.Popup.prototype={getDocument:function(){return this._doc},getPopupMediator:function(){return this._iframe.contentWindow&&this._iframe.contentWindow.popupMediator?this._iframe.contentWindow.popupMediator:null},get_registeredFields:function(){return this._registeredFields},set_registeredFields:function(a){this._registeredFields=eval(a)},get_registeredHandlers:function(){return this._registeredHandlers},set_registeredHandlers:function(a){this._registeredHandlers=eval(a)},get_initialContent:function(){return this._initialContent},set_initialContent:function(a){this._initialContent=a},get_cssPath:function(){return this._cssPath},set_cssPath:function(a){this._cssPath=a},get_autoDimensions:function(){return this._autoDimensions},set_autoDimensions:function(a){this._autoDimensions=a},get_iframe:function(){return this._iframe},set_iframe:function(a){this._iframe=a},checkCorrectLoaded:function(c){var a=this,b=a;if(b.isLoaded&&(b._iframe.style.height=="0px"||b._iframe.style.width=="0px"))a.isLoaded=false;if(!a.isLoaded){!a.isLoading&&a.reload();typeof c!="undefined"&&setTimeout(c,10);return false}return true},_baseOpen:function(b,e,d){var f="undefined",a=this,c=a;if(!a.checkCorrectLoaded(function(){c._baseOpen(b,e,d)}))return;var g=a.get_element();if(typeof d!=f)a._left=parseInt(d);if(typeof e!=f)a._top=parseInt(e);g.style.top=a._top+"px";g.style.left=a._left+"px";setTimeout(function(){typeof b=="function"&&c._onDocumentLoaded(b);c.isOpened=true},0)},open:function(a,c,b){this._baseOpen(a,c,b)},close:function(a){var b=this.get_element();this.isOpened=false;b.style.top="-2000px";b.style.left="-2000px";typeof a=="function"&&a()},reload:function(){var a=this;a.isLoading=true;var c=a.get_element(),d=c.parentNode;document.body.appendChild(c);d.appendChild(a.get_element());a._doc=a._iframe.contentWindow.document;a._doc.open();var b=new Sys.StringBuilder;b.append('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html><head>');a._cssPath.length>0&&b.append('<link rel="stylesheet" href="'+a._cssPath+'" media="all" />');b.append("<script>var __loaded__ = false;<\/script></head><body style='margin:0px; padding:0px; border-width:0px;' onload='__loaded__ = true;'>");a._autoDimensions&&b.append("<table cellspacing='0' cellpadding='0' border='0'><tr><td>");b.append(a._initialContent);a._autoDimensions&&b.append("</td></tr></table>");b.append("</body></html>");a._doc.write(b.toString());a._doc.close();a.isLoaded=false;a._afterReload()},_afterReload:function(){var e=true,g="TEXTAREA",d=false,c=this,b=c._iframe.contentWindow,a=c;c.isLoaded=b.__loaded__;if(!(a._doc.body&&a._doc.body.innerHTML))c.isLoaded=d;if(!c.isLoaded){setTimeout(function(){a._afterReload()},10);return}c.isLoaded=d;b.popupMediator={};b.popupMediator.registeredFields=c._registeredFields;b.popupMediator.registeredHandlers=c._registeredHandlers;b.popupMediator.get_callMethodByName=function(e){for(var c=b.popupMediator.registeredHandlers,a=0;a<c.length;a++){var d=c[a];if(d.name==e)return d.callMethod}return null};b.popupMediator.set_callMethodByName=function(f,e){for(var c=b.popupMediator.registeredHandlers,a=0;a<c.length;a++){var d=c[a];if(d.name==f)d.callMethod=e}};b.popupMediator.getField=function(e){for(var c=b.popupMediator.registeredFields,a=0;a<c.length;a++){var d=c[a];if(d.name==e)return b.document.getElementById(d.clientID)}return null};b.Sys=Sys;for(var f=0;f<c._registeredHandlers.length;f++)$find(c._registeredHandlers[f].clientID).activate(b.document.getElementById(c._registeredHandlers[f].clientID));if(Sys.Extended.UI.HTMLEditor.isIE)a._doc.onselectstart=function(){var c=a._iframe.contentWindow.event,b=c.srcElement.tagName.toUpperCase();return b=="INPUT"||b==g?e:d};else{a._doc.onmousedown=function(b){var a=b.target.tagName.toUpperCase();if(a=="INPUT"||a==g||a=="SELECT")return e;if(Sys.Extended.UI.HTMLEditor.isSafari)if(a=="TABLE"||a=="TR"||a=="TD"||a=="DIV")return e;return d};for(var h=a._doc.getElementsByTagName("input"),f=0;f<h.length;f++)h[f].setAttribute("autocomplete","off")}if(c._autoDimensions){a._iframe.style.height="1000px";a._iframe.style.width="1000px";setTimeout(function(){a._iframe.style.height=a._doc.body.firstChild.offsetHeight+"px";a._iframe.style.width=a._doc.body.firstChild.offsetWidth+"px";a.isLoaded=e;a.isLoading=d},0)}else{a.isLoaded=e;a.isLoading=d}},_onDocumentLoaded:function(b){var a=this,c=a;if(!a.isLoaded){setTimeout(function(){c._onDocumentLoaded(b)},10);return}a.isLoaded=true;b(a._iframe.contentWindow)},initialize:function(){this.__appLoaded__=false;Sys.Extended.UI.HTMLEditor.Popups.Popup.callBaseMethod(this,"initialize");Sys.Application.add_load(this._app_onload$delegate)},dispose:function(){var a=this;Sys.Application.remove_load(a._app_onload$delegate);a.isOpened&&a.close();Sys.Extended.UI.HTMLEditor.Popups.Popup.callBaseMethod(a,"dispose")},_app_onload:function(){var a=this;if(a.__appLoaded__)return;a.__appLoaded__=true;var b=a.get_element();if(Sys.Extended.UI.HTMLEditor.isReallyVisible(b)){a._parentNode_=b.parentNode;a.reload()}}};Sys.Extended.UI.HTMLEditor.Popups.Popup.registerClass("Sys.Extended.UI.HTMLEditor.Popups.Popup",Sys.UI.Control);
//END HTMLEditor.Popups.Popup.js
//START HTMLEditor.Popups.AttachedPopup.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.Popups");Sys.Extended.UI.HTMLEditor.Popups.AttachedPopup=function(a){Sys.Extended.UI.HTMLEditor.Popups.AttachedPopup.initializeBase(this,[a]);this._relatedElement=null};Sys.Extended.UI.HTMLEditor.Popups.AttachedPopup.prototype={get_relatedElement:function(){return this._relatedElement},set_relatedElement:function(a){this._relatedElement=a},open:function(j){var a=this;if(a._relatedElement!=null){var n=a;if(!a.checkCorrectLoaded(function(){n.open(j)}))return;var k=$common.getLocation(a._relatedElement),d=k.x,e=k.y+a._relatedElement.offsetHeight,b=a.get_element().parentNode;while(b&&b.tagName&&b.tagName.toUpperCase()!="BODY"){var f=Sys.Extended.UI.HTMLEditor.getStyle(b,"position");if(f=="absolute"||f=="fixed"){var m=parseInt(Sys.Extended.UI.HTMLEditor.getStyle(b,"top")),l=parseInt(Sys.Extended.UI.HTMLEditor.getStyle(b,"left"));if(!isNaN(m)&&!isNaN(l)){d-=l;e-=m}break}else if(f=="relative"){var g=$common.getLocation(b);d-=g.x;e-=g.y}b=b.parentNode}var c=Sys.Extended.UI.HTMLEditor.getClientViewportElement(a._iframe),i=c.clientWidth+c.scrollLeft,h=c.clientHeight+c.scrollTop;if(e<c.scrollTop)e=c.scrollTop;if(d<c.scrollLeft)d=c.scrollLeft;if(e+a._iframe.offsetHeight>h)e-=e+a._iframe.offsetHeight-h;if(d+a._iframe.offsetWidth>i)d-=d+a._iframe.offsetWidth-i;Sys.Extended.UI.HTMLEditor.Popups.AttachedPopup.callBaseMethod(a,"open",[j,e,d])}},close:function(a){Sys.Extended.UI.HTMLEditor.Popups.AttachedPopup.callBaseMethod(this,"close",[a])},initialize:function(){Sys.Extended.UI.HTMLEditor.Popups.AttachedPopup.callBaseMethod(this,"initialize")},dispose:function(){Sys.Extended.UI.HTMLEditor.Popups.AttachedPopup.callBaseMethod(this,"dispose")}};Sys.Extended.UI.HTMLEditor.Popups.AttachedPopup.registerClass("Sys.Extended.UI.HTMLEditor.Popups.AttachedPopup",Sys.Extended.UI.HTMLEditor.Popups.Popup);
//END HTMLEditor.Popups.AttachedPopup.js
//START HTMLEditor.Popups.AttachedTemplatePopup.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.Popups");Sys.Extended.UI.HTMLEditor.Popups.AttachedTemplatePopup=function(a){Sys.Extended.UI.HTMLEditor.Popups.AttachedTemplatePopup.initializeBase(this,[a]);this._contentDiv=null};Sys.Extended.UI.HTMLEditor.Popups.AttachedTemplatePopup.prototype={get_contentDiv:function(){return this._contentDiv},set_contentDiv:function(a){this._contentDiv=a},initialize:function(){Sys.Extended.UI.HTMLEditor.Popups.AttachedTemplatePopup.callBaseMethod(this,"initialize");this.set_initialContent(this._contentDiv.innerHTML)},dispose:function(){Sys.Extended.UI.HTMLEditor.Popups.AttachedTemplatePopup.callBaseMethod(this,"dispose")}};Sys.Extended.UI.HTMLEditor.Popups.AttachedTemplatePopup.registerClass("Sys.Extended.UI.HTMLEditor.Popups.AttachedTemplatePopup",Sys.Extended.UI.HTMLEditor.Popups.AttachedPopup);
//END HTMLEditor.Popups.AttachedTemplatePopup.js
//START HTMLEditor.Popups.BaseColorsPopup.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.Popups");Sys.Extended.UI.HTMLEditor.Popups.BaseColorsPopup=function(a){Sys.Extended.UI.HTMLEditor.Popups.BaseColorsPopup.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.Popups.BaseColorsPopup.prototype={};Sys.Extended.UI.HTMLEditor.Popups.BaseColorsPopup.registerClass("Sys.Extended.UI.HTMLEditor.Popups.BaseColorsPopup",Sys.Extended.UI.HTMLEditor.Popups.AttachedTemplatePopup);
//END HTMLEditor.Popups.BaseColorsPopup.js
//START HTMLEditor.Toolbar_buttons.ForeColorClear.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear.prototype={callMethod:function(){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear.callBaseMethod(this,"callMethod"))return false;this._designPanel._execCommand("forecolor",false,"")}};Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.ForeColorClear",Sys.Extended.UI.HTMLEditor.ToolbarButton.MethodButton);
//END HTMLEditor.Toolbar_buttons.ForeColorClear.js
//START HTMLEditor.Toolbar_buttons.SelectButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton=function(b){var a=this;Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton.initializeBase(a,[b]);a._onclick_option$delegate=Function.createDelegate(a,a._onclick_option);a._onchange$delegate=Function.createDelegate(a,a._onchange)};Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton.prototype={initialize:function(){var a=this,c=a.get_element().id;Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton.callBaseMethod(a,"initialize");a._select=$get(c+"_select");$addHandler(a._select,"change",a._onchange$delegate);for(var b=0;b<a._select.options.length;b++){var d=a._select.options[b];$addHandler(d,"click",a._onclick_option$delegate)}},dispose:function(){var a=this;for(var b=0;b<a._select.options.length;b++){var c=a._select.options[b];$removeHandler(c,"click",a._onclick_option$delegate)}$removeHandler(a._select,"change",a._onchange$delegate);Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton.callBaseMethod(a,"dispose")},isImage:function(){return false},callMethod:function(){return true},_onclick_option:function(b){if(!this.isEnable())return false;var a=b.target;a.parentNode.value=a.value;Sys.Extended.UI.HTMLEditor._stopEvent(b);if(!Sys.Extended.UI.HTMLEditor.isSafari)return false;this.callMethod(a.parentNode,b);return true},_onchange:function(a){if(!this.isEnable())return false;var b=a.target;Sys.Extended.UI.HTMLEditor._stopEvent(a);this.callMethod(b,a);return true}};Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.CommonButton);
//END HTMLEditor.Toolbar_buttons.SelectButton.js
//START HTMLEditor.Toolbar_buttons.DesignModeSelectButton.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton.initializeBase(this,[a]);this._designPanel=null};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton.prototype={onEditPanelActivity:function(){this._designPanel=this._editPanel.get_activePanel();this.checkState()},checkState:function(){return!this.checkRangeInDesign()?false:true},callMethod:function(){return!Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton.callBaseMethod(this,"callMethod")?false:this._designPanel==null?false:this._designPanel.isPopup()?false:true}};Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton",Sys.Extended.UI.HTMLEditor.ToolbarButton.SelectButton);
//END HTMLEditor.Toolbar_buttons.DesignModeSelectButton.js
//START HTMLEditor.Toolbar_buttons.FontName.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.prototype={initialize:function(){Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.callBaseMethod(this,"initialize")},callMethod:function(a){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.callBaseMethod(this,"callMethod"))return false;try{var b=this._designPanel;b._execCommand("fontname",false,a.options.item(a.selectedIndex).value)}catch(d){}},checkState:function(){var e=this;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.callBaseMethod(e,"checkState"))return false;var f=e._designPanel,a=null;try{a=Function.createDelegate(f,Sys.Extended.UI.HTMLEditor._queryCommandValue)("fontname")}catch(i){}if(!f._FontNotSet)if(!a||a.length==0)a=Sys.Extended.UI.HTMLEditor.getStyle(f._doc.body,"font-family");var c=e._select,b=0;if(a&&a.length>0){var g=a.toLowerCase().split(",")[0].replace(/^(['"])/,"").replace(/(['"])$/,"");for(b=0;b<c.options.length;b++){var h=c.options.item(b).value.toLowerCase().split(",")[0];if(h==g)break}if(b==c.options.length)try{var d=document.createElement("OPTION");d.value=a.replace(/^(['"])/,"").replace(/(['"])$/,"");d.text=a.split(",")[0].replace(/^(['"])/,"").replace(/(['"])$/,"");c.add(d,Sys.Extended.UI.HTMLEditor.isIE?b:null);$addHandler(d,"click",e._onclick_option$delegate)}catch(i){b=0}}c.selectedIndex=b}};Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.FontName",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton);
//END HTMLEditor.Toolbar_buttons.FontName.js
//START HTMLEditor.Toolbar_buttons.FontSize.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor.ToolbarButton");Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize=function(a){Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.initializeBase(this,[a])};Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.prototype={initialize:function(){Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.callBaseMethod(this,"initialize")},callMethod:function(a){if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.callBaseMethod(this,"callMethod"))return false;try{var b=this._designPanel;b._execCommand("FontSize",false,Sys.Extended.UI.HTMLEditor.fontSizeSeek(a.options.item(a.selectedIndex).value))}catch(d){}},checkState:function(){var c=this;if(!Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.callBaseMethod(c,"checkState"))return false;var f=c._designPanel,a=null,g=c._select.id;try{a=Function.createDelegate(f,Sys.Extended.UI.HTMLEditor._queryCommandValue)("fontsize",g)}catch(j){}if(a)a=a.toString();if(!f._FontNotSet)if(!a||a.length==0){a=Sys.Extended.UI.HTMLEditor.getStyle(f._doc.body,"font-size");a=Sys.Extended.UI.HTMLEditor._TryTransformFromPxToPt(a,c,g)}try{var d=c._select,b=0;if(a&&a.length>0){var h=a.toLowerCase().split(",")[0];for(b=0;b<d.options.length;b++){var i=Sys.Extended.UI.HTMLEditor.fontSizeSeek(d.options.item(b).value.toLowerCase().split(",")[0]);if(i==h)break}if(b==d.options.length)try{var e=document.createElement("OPTION");e.value=a;e.text=a;d.add(e,Sys.Extended.UI.HTMLEditor.isIE?b:null);$addHandler(e,"click",c._onclick_option$delegate)}catch(j){b=0}}d.selectedIndex=b}catch(j){}}};Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize.registerClass("Sys.Extended.UI.HTMLEditor.ToolbarButton.FontSize",Sys.Extended.UI.HTMLEditor.ToolbarButton.DesignModeSelectButton);
//END HTMLEditor.Toolbar_buttons.FontSize.js
//START HTMLEditor.HTMLEditor.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.Trim=function(a){return a.replace(/[\x00-\x1F]+/g,"")};Sys.Extended.UI.HTMLEditor.TrimAll=function(a){return a.replace(/[\x00-\x1F]/g,"").replace(/^[\x20]+/g,"").replace(/[\x20]+$/g,"")};Sys.Extended.UI.HTMLEditor.isIE=Sys.Browser.agent==Sys.Browser.InternetExplorer;Sys.Extended.UI.HTMLEditor.isSafari=Sys.Browser.agent==Sys.Browser.Safari;Sys.Extended.UI.HTMLEditor.isOpera=Sys.Browser.agent==Sys.Browser.Opera;Sys.Extended.UI.HTMLEditor.tryReplaceRgb=function(c){var a=c,e=/(rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\))/ig;function b(a){return a<16?"0"+a.toString(16):a.toString(16)}function d(h,i,a,c,d){var g=parseInt(a),f=parseInt(c),e=parseInt(d);return"#"+b(g)+b(f)+b(e)}try{a=a.replace(e,d)}catch(f){}return a};Sys.Extended.UI.HTMLEditor._getScrollTop=function(c){var a=c.document,b=0;if(typeof c.pageYOffset=="number")b=c.pageYOffset;if(a.body&&a.body.scrollTop)b=a.body.scrollTop;else if(a.documentElement&&a.documentElement.scrollTop)b=a.documentElement.scrollTop;return b};Sys.Extended.UI.HTMLEditor._getScrollLeft=function(c){var a=c.document,b=0;if(typeof c.pageXOffset=="number")b=c.pageXOffset;else if(a.body&&a.body.scrollLeft)b=a.body.scrollLeft;else if(a.documentElement&&a.documentElement.scrollLeft)b=a.documentElement.scrollLeft;return b};Sys.Extended.UI.HTMLEditor.addFormOnSubmit=function(e,d){var b="undefined",a=null,c=window.theForm;if(window.theForm!=a&&typeof window.theForm!=b){if(c.HTMLEditor_editPanels==a||typeof c.HTMLEditor_editPanels==b){c.originalOnSubmit_HTMLEditor=window.theForm.onsubmit;c.HTMLEditor_editPanels=[];window.theForm.onsubmit=Sys.Extended.UI.HTMLEditor.EditPanelsOnSubmit;if(window.__doPostBack!=a&&typeof window.__doPostBack!=b)if(window.__doPostBack_HTMLEditor_original==a||typeof window.__doPostBack_HTMLEditor_original==b){window.__doPostBack_HTMLEditor_original=window.__doPostBack;window.__doPostBack=Sys.Extended.UI.HTMLEditor.EditPanelsOnPostBack}if(window.ValidatorGetValue!=a&&typeof window.ValidatorGetValue!=b)if(window.ValidatorGetValue_HTMLEditor_original==a||typeof window.ValidatorGetValue_HTMLEditor_original==b){window.ValidatorGetValue_HTMLEditor_original=window.ValidatorGetValue;window.ValidatorGetValue=Sys.Extended.UI.HTMLEditor.ValidatorGetValue}}c.HTMLEditor_editPanels.push({handler:e,editPanel:d})}};Sys.Extended.UI.HTMLEditor.removeFormOnSubmit=function(h){var c="undefined",b=null,a=window.theForm;if(window.theForm!=b&&typeof window.theForm!=c){var g=a.originalOnSubmit_HTMLEditor;if(a.HTMLEditor_editPanels!=b&&typeof a.HTMLEditor_editPanels!=c){for(var e=[],d=0;d<a.HTMLEditor_editPanels.length;d++){var f=a.HTMLEditor_editPanels[d];f.handler!=h&&e.push(f)}a.HTMLEditor_editPanels=e;if(a.HTMLEditor_editPanels.length==0){window.theForm.onsubmit=g;a.originalOnSubmit_HTMLEditor=b;a.HTMLEditor_editPanels=b;if(window.__doPostBack_HTMLEditor_original!=b&&typeof window.__doPostBack_HTMLEditor_original!=c){window.__doPostBack=window.__doPostBack_HTMLEditor_original;window.__doPostBack_HTMLEditor_original=b}if(window.ValidatorGetValue_HTMLEditor_original!=b&&typeof window.ValidatorGetValue_HTMLEditor_original!=c){window.ValidatorGetValue=window.ValidatorGetValue_HTMLEditor_original;window.ValidatorGetValue_HTMLEditor_original=b}}}}};Sys.Extended.UI.HTMLEditor.EditPanelsOnSubmit=function(d){for(var a=window.theForm,c=true,b=0;b<a.HTMLEditor_editPanels.length;b++){var c=a.HTMLEditor_editPanels[b].handler(d);if(!c)break}if(c&&a.originalOnSubmit_HTMLEditor!=null&&typeof a.originalOnSubmit_HTMLEditor!="undefined")c=a.originalOnSubmit_HTMLEditor(d);if(!c||!window.Page_IsValid)for(var b=0;b<a.HTMLEditor_editPanels.length;b++)a.HTMLEditor_editPanels[b].editPanel._contentPrepared=false;return c};Sys.Extended.UI.HTMLEditor.ValidatorGetValue=function(e){var c=null,a=$find(e);if(a!=c){var b=c;if(Sys.Extended.UI.HTMLEditor.Editor.isInstanceOfType(a))b=a.get_editPanel();else if(Sys.Extended.UI.HTMLEditor.EditPanel.isInstanceOfType(a))b=a;if(b!=c){var d=b._contentForValidation;if(d==c||typeof d=="undefined")d=b.get_content();return d}}return window.ValidatorGetValue_HTMLEditor_original(e)};Sys.Extended.UI.HTMLEditor.EditPanelsOnPostBack=function(d,c){for(var b=window.theForm,a=0;a<b.HTMLEditor_editPanels.length;a++){var e=b.HTMLEditor_editPanels[a].handler(null);if(!e)return false}return window.__doPostBack_HTMLEditor_original!=null&&typeof window.__doPostBack_HTMLEditor_original!="undefined"?window.__doPostBack_HTMLEditor_original(d,c):true};Sys.Extended.UI.HTMLEditor.getRealAttributeIE=function(e,f,g){var c="^(?:<[^>]*?",b=g,a="";function d(c,b){a=b}e.outerHTML.replace(new RegExp(c+f+'=")([^"]*?)"',"ig"),d);a==""&&e.outerHTML.replace(new RegExp(c+f+"=')([^']*?)'","ig"),d);a==""&&e.outerHTML.replace(new RegExp(c+f+"=)([^s>]*?)","ig"),d);if(b!=a&&a!=""){b=a;b=b.replace(/&amp;/g,"&")}return b};Sys.Extended.UI.HTMLEditor.getRealAttribute=function(d,b){var f=b.toLowerCase(),e=d.attributes,a="";for(i=0;i<e.length;++i){var c=e.item(i);if(!c.specified)continue;var b=c.name.toLowerCase();if(b==f){a=c.value;if(Sys.Extended.UI.HTMLEditor.isIE)a=Sys.Extended.UI.HTMLEditor.getRealAttributeIE(d,b,a);if(b=="src"||b=="href")a=a.replace(/(\(S\([A-Za-z0-9_]+\)\)\/)/,"");break}}return a};Sys.Extended.UI.HTMLEditor.enabledWordTags=["img","strong","p","b","i","u","a","h1","h2","h3","h4","h5","h6","table","tbody","tr","td","ul","ol","li","span","div","font","xml","del","ins","em","sub","sup","hr","br"];Sys.Extended.UI.HTMLEditor.cleanUp=function(f){var a="",c,b=Sys.Extended.UI.HTMLEditor.Trim(f.replace(/[\x00-\x1F]+/g," ")).replace(/^[^\u0000]+?<html(?:[^>]*?)>/gi,a).replace(/<\/html(?:[^>]*?)>[^\u0000]*$/gi,a).replace(/<head(?:[^>]*?)>[^\u0000]*?<\/head(?:[^>]*?)>/gi,a).replace(/<body[^>]*?>([^\u0000]*?)<\/body(?:[^>]*?)>/gi,"$1").replace(/<\/?html(?:[^>]*?)>/gi,a).replace(/<\/?head(?:[^>]*?)>/gi,a).replace(/<\/?body(?:[^>]*?)>/gi,a).replace(/<!--(\w|\W)+?-->/ig,a).replace(/(<[\/]?)(?:o|v|x|p|w|\?xml):(\w+)([^>]*?>)/ig,"$1$2$3").replace(/<(IMAGEDATA)([^>]*?)>/ig,"<img$2>").replace(/<p[^>]*><p>&nbsp;<\/p><\/p>/ig,"<br>").replace(/<p[^>]*?\/>/ig,a).replace(/<(p|div)[^>]*?>&nbsp;<\/(\1)[^>]*?>/ig,a).replace(/<(p|div)[^>]*?><\/(\1)[^>]*?>/ig,a);do{c=b;b=b.replace(/<([^>]*)(?:class|size|lang|face|start|type|border|[ovwxp]:\w+)=(?:\'[^\']*\'|\"[^\"]*\"|[^> ]+)([^>]*)>/ig,"<$1$2>")}while(b!=c);var d=document.createElement("div");d.innerHTML=b;function e(m){var h="solid",g="black",f="1px",d="height",c="width";for(var r=m.childNodes.length,i=0;i<m.childNodes.length;i++){var b=m.childNodes.item(i);if(b.nodeType==1)if(b.tagName.indexOf("/")>=0){i--;b.parentNode.removeChild(b)}else{for(var j=b.tagName.toLowerCase(),q=false,s=Sys.Extended.UI.HTMLEditor.enabledWordTags.length,n=0;n<s;n++)if(Sys.Extended.UI.HTMLEditor.enabledWordTags[n]==j){q=true;break}e(b);if(!q){i+=b.childNodes.length;while(b.firstChild)b.parentNode.insertBefore(b.firstChild,b);b.parentNode.removeChild(b);i--}else{var k=b.style.backgroundColor,l=b.style.color;b.style.cssText=a;b.removeAttribute("style");if(b.getAttribute(c)&&b.getAttribute(c).length>0)b.style.width=b.getAttribute(c);if(b.width&&b.width.length>0)b.style.width=b.width;b.width=a;try{b.removeAttribute(c)}catch(u){}if(b.getAttribute(d)&&b.getAttribute(d).length>0)b.style.height=b.getAttribute(d);if(b.height&&b.height.length>0)b.style.height=b.height;b.height=a;try{b.removeAttribute(d)}catch(u){}if(j=="table"){b.style.borderLeftWidth=f;b.style.borderLeftColor=g;b.style.borderLeftStyle=h;b.style.borderTopWidth=f;b.style.borderTopColor=g;b.style.borderTopStyle=h;b.style.backgroundColor=k;b.style.color=l}if(j=="td"){b.style.borderRightWidth=f;b.style.borderRightColor=g;b.style.borderRightStyle=h;b.style.borderBottomWidth=f;b.style.borderBottomColor=g;b.style.borderBottomStyle=h;b.style.backgroundColor=k;b.style.color=l}if(j=="font"||j=="span"){b.style.backgroundColor=k;b.style.color=l;for(var p=b.attributes,r=0,o=0;o<p.length;++o){var t=p.item(o);if(!t.specified)continue;r++}if(r==0&&b.style.cssText==a){i+=b.childNodes.length;while(b.firstChild)b.parentNode.insertBefore(b.firstChild,b);b.parentNode.removeChild(b);i--}}}}}}e(d);b=Sys.Extended.UI.HTMLEditor.Trim(d.innerHTML);delete d;b=b.replace(/<[\/]?(xml|del|ins)[^>]*?>/ig,a).replace(/<(p|div)[^>]*?>/ig,a).replace(/<\/(p|div)[^>]*?>/ig,"<br>");do{c=b;b=b.replace(/<b><\/b>/ig,a).replace(/<i><\/i>/ig,a).replace(/<u><\/u>/ig,a).replace(/<strong><\/strong>/ig,a).replace(/<em><\/em>/ig,a).replace(/<sub><\/sub>/ig,a).replace(/<sup><\/sup>/ig,a);b=b.replace(/<span[^>]*?><\/span>/ig,a).replace(/<span>([^<]+?)<\/span>/ig,"$1");b=b.replace(/<font[^>]*?><\/font>/ig,a).replace(/<font>([^<]+?)<\/font>/ig,"$1")}while(b!=c);b=b.replace(/&rsquo;/g,"'").replace(/&lsquo;/g,"'").replace(/&ndash;/g,"-").replace(/&mdash;/g,"-").replace(/&hellip;/g,"...").replace(/&quot;/g,'"').replace(/&ldquo;/g,'"').replace(/&rdquo;/g,'"').replace(//g,a).replace(/&bull;/g,a).replace(/[ \s]+/g," ").replace(/((&nbsp;)+)/g,"&nbsp;");if(document.all)b=b.replace(/^[\x00-\x1F]*&nbsp;/,a);return b};Sys.Extended.UI.HTMLEditor.spanJoiner=function(g,s,o,p,r){var l="SPAN",k="class",j=null,n="undefined",q=0,e=g.childNodes.length;if(typeof o!=n&&o!=j)q=o;if(typeof p!=n&&p!=j)e=p;for(var f=q;f<e&&f<g.childNodes.length;f++){var a=g.childNodes.item(f);if(a.parentNode!=g)continue;switch(a.nodeType){case 1:if(a.childNodes.length==0&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)&&a.tagName.toUpperCase()!="A"&&!(a.className.length>0||a.getAttribute(k)&&a.getAttribute(k).length>0)&&!Sys.Extended.UI.HTMLEditor.isTempElement(a)){g.removeChild(a);f--;e--;continue}if(a.tagName.toUpperCase()==l){while(a.childNodes.length==1&&a.firstChild.nodeType==1){if(a.firstChild.tagName.toUpperCase()==l&&!Sys.Extended.UI.HTMLEditor.isTempElement(a.firstChild)){var h=Sys.Extended.UI.HTMLEditor.differAttr(a.firstChild,[]),d=Sys.Extended.UI.HTMLEditor.differStyle(a.firstChild),i=a.firstChild,w=i.childNodes;while(i.firstChild!=j)a.insertBefore(i.firstChild,i);for(var b=0;b<d.length;b++)if(d[b][1])try{if(a.style[d[b][0]])if(d[b][0].toLowerCase().indexOf("color")>=0)a.style[d[b][0]]=d[b][1];else try{var u=a.style[d[b][0]];a.style[d[b][0]]=a.style[d[b][0]]+" "+d[b][1];if(u==a.style[d[b][0]])a.style[d[b][0]]=d[b][1]}catch(y){a.style[d[b][0]]=d[b][1]}else a.style[d[b][0]]=d[b][1]}catch(x){}for(var b=0;b<h.length;b++)h[b][1]&&a.setAttribute(h[b][0],h[b][1]);a.removeChild(i);continue}else if(a.firstChild.tagName.toUpperCase()==l&&Sys.Extended.UI.HTMLEditor.isTempElement(a.firstChild)){var t=a.firstChild;a.parentNode.insertBefore(a.firstChild,a);a.parentNode.removeChild(a);a=t}break}var m=[],c=a.nextSibling;while(!Sys.Extended.UI.HTMLEditor.isTempElement(a)&&c&&f+1<e&&(c.nodeType==3||c.nodeType==1&&(c.tagName.toUpperCase()==l||c.tagName.toUpperCase()=="BR"&&typeof r==n)&&!Sys.Extended.UI.HTMLEditor.isTempElement(c)))if(c.nodeType==3)if((""+c.data+"").length==0){c.parentNode.removeChild(c);c=a.nextSibling;e--}else break;else if(c.tagName.toUpperCase()=="BR"){m.push(c);c=c.nextSibling}else{var h=Sys.Extended.UI.HTMLEditor.differAttr(a,[],c),d=Sys.Extended.UI.HTMLEditor.differStyle(a,c);if(h.length==0&&d.length==0&&a.className==c.className){for(var v=m.length,b=0;b<v;b++){a.appendChild(m[b]);e--}m=[];while(c.firstChild)a.appendChild(c.firstChild);c.parentNode.removeChild(c);c=a.nextSibling;e--}else break}if(!Sys.Extended.UI.HTMLEditor.isTempElement(a)&&a.className.length==0){var h=Sys.Extended.UI.HTMLEditor.differAttr(a,[]),d=Sys.Extended.UI.HTMLEditor.differStyle(a);if(h.length==0&&d.length==0){f--;e--;while(a.firstChild){a.parentNode.insertBefore(a.firstChild,a);e++}a.parentNode.removeChild(a);continue}}}if(a.parentNode!=j)if(a.childNodes.length==0&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)&&a.tagName.toUpperCase()!="A"&&!(a.className.length>0||a.getAttribute(k)&&a.getAttribute(k).length>0)&&!Sys.Extended.UI.HTMLEditor.isTempElement(a)){g.removeChild(a);f--;e--;continue}else Sys.Extended.UI.HTMLEditor.spanJoiner(a,s)}}};Sys.Extended.UI.HTMLEditor._styleTags=["strong","em","u","strike","s","span","font","b","sub","sup","a","i"];Sys.Extended.UI.HTMLEditor.isStyleTag=function(b){if(!b)return false;for(var a=0;a<Sys.Extended.UI.HTMLEditor._styleTags.length;a++)if(Sys.Extended.UI.HTMLEditor._styleTags[a].toLowerCase()==b.toLowerCase())return true;return false};Sys.Extended.UI.HTMLEditor.smartClassName="MSIEparagraph";Sys.Extended.UI.HTMLEditor.noContextMenuAttribute="obout-no-contextmenu";Sys.Extended.UI.HTMLEditor.isTempElement=function(a){return a.id&&a.id.length>0&&a.id.indexOf(Sys.Extended.UI.HTMLEditor.smartClassName)>=0?true:false};Sys.Extended.UI.HTMLEditor.differAttr=function(c,j,h){var d=[],b=c.parentNode;if(typeof h!="undefined")b=h;if(!b||!b.tagName||!Sys.Extended.UI.HTMLEditor.isStyleTag(b.tagName))b=null;if(c.attributes)for(var f=0;f<c.attributes.length;f++){for(var a=c.attributes[f],i=false,g=0;g<j.length;g++)if(a.name.toUpperCase()==j[g].toUpperCase()){i=true;break}if(i)continue;if(a.name.toUpperCase()=="STYLE")continue;if(a.name.toUpperCase().substr(0,4)=="_MOZ")continue;if(a.specified)if(b&&b.attributes&&b.attributes[a.name]){var e=b.attributes[a.name];if(e)(a.name!=e.name||a.value!=e.value)&&d.push([a.name,a.value])}else{if(a.name.toUpperCase()=="CLASS"&&a.value=="")continue;d.push([a.name,a.value])}}return d};Sys.Extended.UI.HTMLEditor.differStyle=function(e,l){var i="length",h="csstext",g="accelerator",f="string",m="undefined",k=[],d=e.parentNode;if(typeof l!=m)d=l;if(!d||!d.tagName||!Sys.Extended.UI.HTMLEditor.isStyleTag(d.tagName))d=null;function j(b,a){a=""+a;if(b.toLowerCase()=="textdecoration")for(var d=a.split(" "),c=0;c<d.length;c++)k.push([b,Sys.Extended.UI.HTMLEditor.Trim(d[c])]);else k.push([b,a])}for(var b in e.style)if(b&&typeof b==f&&b!=g){var a=b;if(!isNaN(parseInt(b))){if(!Sys.Extended.UI.HTMLEditor.isSafari)continue;a=e.style[b]}var c=e.style[a];if(c&&typeof c==f&&c!=g)if(d&&d.style){var n=d.style[a];if(a.toLowerCase()!=h&&a.toLowerCase()!=i)c!=n&&j(a,c)}else a.toLowerCase()!=h&&a.toLowerCase()!=i&&j(a,c)}if(typeof l!=m)for(var b in d.style)if(b&&typeof b==f&&b!=g){var a=b;if(!isNaN(parseInt(b))){if(!Sys.Extended.UI.HTMLEditor.isSafari)continue;a=e.style[b]}var c=d.style[a];if(c&&typeof c==f&&c!=g){var n=e.style[a];if(b.toLowerCase()!=h&&a.toLowerCase()!=i)c!=n&&j(a,c)}}return k};Sys.Extended.UI.HTMLEditor.brXHTML=function(a){return a.replace(/<br>/ig,"<br/>")};Sys.Extended.UI.HTMLEditor._needsClosingTag=function(b){var a=" script style div span a del strong em u strike font b sub sup p iframe li ul ol placeholder textarea td tr ";return a.indexOf(" "+b.tagName.toLowerCase()+" ")!=-1};Sys.Extended.UI.HTMLEditor._encodeText_=function(a){return a.replace(/&/ig,"&amp;").replace(/</ig,"&lt;").replace(/>/ig,"&gt;").replace(/\"/ig,"&quot;").replace(/\xA0/ig,"&nbsp;")};Sys.Extended.UI.HTMLEditor._noNeedsClosingTag=function(b){var a=" hr br ";return a.indexOf(" "+b.tagName.toLowerCase()+" ")!=-1};Sys.Extended.UI.HTMLEditor.canBeInsideP=function(b,e){var d="TABLE";if(b&&b.style&&b.style.display&&b.style.display.toLowerCase()=="inline")return true;var c=b.tagName.toUpperCase();if(c.length==2)if(c.substr(0,1)=="H"&&parseInt(c.substr(1,1))>0)return false;switch(c){case"TBODY":case"TR":case"TD":if(typeof e!="undefined"){var a=b.parentNode;while(a&&a.tagName&&a.tagName.toUpperCase()!=d)a=a.parentNode;if(a.tagName.toUpperCase()==d&&a.style&&a.style.display&&a.style.display.toLowerCase()=="inline")return true}case"P":case"PRE":case d:case"OL":case"UL":case"LI":case"HR":case"DIV":case"BLOCKQUOTE":case"FORM":case"FIELDSET":case"LEGEND":return false;default:return true}};Sys.Extended.UI.HTMLEditor.convertAlign=function(b){var a,c;try{c=parseInt(b)-1}catch(d){return b}switch(c){case 1:a="left";break;case 2:a="right";break;case 3:a="texttop";break;case 4:a="absmiddle";break;case 5:a="baseline";break;case 6:a="absbottom";break;case 7:a="bottom";break;case 8:a="middle";break;case 9:a="top";break;default:a=b.replace(/\"/g,"&quot;")}return a};Sys.Extended.UI.HTMLEditor.getHTML=function(a,b,d){try{if(typeof d=="undefined")if(!b&&a.nodeType==1)return a.innerHTML;else if(b&&a.nodeType==1&&Sys.Extended.UI.HTMLEditor.isIE)return a.outerHTML}catch(e){}var c=new Sys.Extended.UI.HTMLEditor.jsDocument(true);Sys.Extended.UI.HTMLEditor._getHTML_(c,a,b);return c.toString()};Sys.Extended.UI.HTMLEditor._getHTML_=function(c,a,v){var f='"',g="&quot;",e="",j=null,s="embed";switch(a.nodeType){case 1:case 11:if(a.tagName&&a.tagName.indexOf("/")>=0){if(Sys.Extended.UI.HTMLEditor.isIE){var h=a.tagName.toLowerCase().substr(a.tagName.indexOf("/")+1),o=a.previousSibling;if(h==s)return;while(o!=j){if(o.nodeType==a.nodeType&&o.tagName&&o.tagName.toLowerCase()==h){c.append("</teo"+Sys.Extended.UI.HTMLEditor.smartClassName+":"+a.tagName.toLowerCase().substr(a.tagName.indexOf("/")+1)+">");return}o=o.previousSibling}}return}var l,r,i;if(v&&a.tagName.length>0){var h=a.tagName.toLowerCase();l=!(a.hasChildNodes()||Sys.Extended.UI.HTMLEditor._needsClosingTag(a));r=true;var u=e;if(Sys.Extended.UI.HTMLEditor.isIE&&a.scopeName&&typeof a.scopeName!="undefined")u=a.scopeName.toUpperCase()=="HTML"?e:a.scopeName+":";if(Sys.Extended.UI.HTMLEditor.isIE&&(l||h=="placeholder")&&!Sys.Extended.UI.HTMLEditor._noNeedsClosingTag(a)&&h!=s){var n=a.nextSibling;while(n!=j){if(n.nodeType==a.nodeType&&n.tagName){var t=n.tagName;if(t.indexOf("/")>=0)if(t.toLowerCase().substr(t.indexOf("/")+1)==h){l=false;r=false;break}}n=n.nextSibling}}!Sys.Extended.UI.HTMLEditor.canBeInsideP(a)&&c.append("\n");c.append("<"+(!l&&!r?"teo"+Sys.Extended.UI.HTMLEditor.smartClassName+":":u)+h);Sys.Extended.UI.HTMLEditor.isIE&&a.name&&a.name.length>0&&c.append(' name="'+a.name.replace(/\"/g,g)+f);Sys.Extended.UI.HTMLEditor.isIE&&a.value&&a.value.length>0&&h!="textarea"&&c.append(' value="'+a.value.replace(/\"/g,g)+f);Sys.Extended.UI.HTMLEditor.isIE&&a.className&&a.className.length>0&&c.append(' class="'+a.className.replace(/\"/g,g)+f);Sys.Extended.UI.HTMLEditor.isIE&&a.align&&a.align.length>0&&c.append(' align="'+a.align.replace(/\"/g,g)+f);Sys.Extended.UI.HTMLEditor.isIE&&a.color&&a.color.length>0&&c.append(' color="'+a.color.replace(/\"/g,g)+f);Sys.Extended.UI.HTMLEditor.isIE&&a.size&&a.size.length>0&&a.size!="+0"&&c.append(' size="'+a.size.replace(/\"/g,g)+f);Sys.Extended.UI.HTMLEditor.isIE&&a.shape&&a.shape.length>0&&c.write(' shape="'+a.shape.replace(/\"/g,g)+f);Sys.Extended.UI.HTMLEditor.isIE&&a.coords&&a.coords.length>0&&c.write(' coords="'+a.coords.replace(/\"/g,g)+f);var w=a.attributes,q=j;for(i=0;i<w.length;++i){var p=w.item(i);if(!p.specified)continue;var d=p.name.toLowerCase();if(d.substr(0,4)=="_moz")continue;if(d=="teoalign")continue;var b;if(d!="style")if(d=="width"){b=a.width;if(Sys.Extended.UI.HTMLEditor.isIE&&b==0){var k=0;a.outerHTML.replace(new RegExp("^(?:<[^>]*?width=)([\\d]+)","ig"),function(b,a){k=a});if(b!=k)b=k}}else if(d=="height"){b=a.height;if(Sys.Extended.UI.HTMLEditor.isIE&&b==0){var k=0;a.outerHTML.replace(new RegExp("^(?:<[^>]*?height=)([\\d]+)","ig"),function(b,a){k=a});if(b!=k)b=k}}else if(Sys.Extended.UI.HTMLEditor.isIE&&d=="name"&&a.name&&a.name.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&d=="value"&&a.value&&a.value.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&d=="align"&&a.align&&a.align.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&d=="class"&&a.className&&a.className.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&d=="color"&&a.color&&a.color.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&d=="size"&&a.size&&a.size.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&d=="shape"&&a.shape&&a.shape.length>0)continue;else if(Sys.Extended.UI.HTMLEditor.isIE&&d=="coords"&&a.coords&&a.coords.length>0)continue;else if(h==s&&d=="align"&&Sys.Extended.UI.HTMLEditor.isIE)b=Sys.Extended.UI.HTMLEditor.convertAlign(p.value);else{b=p.value;if(Sys.Extended.UI.HTMLEditor.isSafari&&d=="class")if(/apple-style/ig.test(b))continue;if(d=="src"||d=="href"){if(Sys.Extended.UI.HTMLEditor.isIE)b=Sys.Extended.UI.HTMLEditor.getRealAttributeIE(a,d,b);b=b.replace(/(\(S\([A-Za-z0-9_]+\)\)\/)/,e)}b=b.replace(/\"/g,g)}else{if(Sys.Extended.UI.HTMLEditor.isSafari)q=p.value;continue}var m=f;if((e+b+e).indexOf(f)>=0)m="'";d!=j&&c.append(" "+d+"="+m+b+m)}if(a.style.cssText.length>0||q!=j){var d="style",z=/(url\((?:[^\)]*)\))/ig,y=[];function C(b,a){y.push(a)}var b=(q!=j?q:a.style.cssText).toLowerCase();b.replace(z,C);var x=0;function D(){var a=y[x];x++;return a}b=Sys.Extended.UI.HTMLEditor.tryReplaceRgb(b.replace(z,D)).replace(/(font-weight\s*:\s*)(700)/ig,"$1bold").replace(/([\s]*-moz-[^;]*[;][\s]*)/ig,e).replace(/(-moz-.*)$/i,e).replace(/(background-position: 0% 0%[;]*[\s]*)/ig,e);if(Sys.Extended.UI.HTMLEditor.isSafari){function B(d,a,b,c){return a+b.replace(/(,)/g,e)+c}b=b.replace(/(text-decoration:)([^;$]+)([;$])/ig,B)}if(Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera){function A(d,a,b,c){return a+b.replace(/(['"])/g,e)+c}b=b.replace(/(font-family:)([^;]+)([;]*)/ig,A)}if(b.length>0){var m=f;if((e+b+e).indexOf(f)>=0)m="'";c.append(" "+d+"="+m+b+m)}}c.append(l?" />":">");h=="br"&&c.append("\n")}a.tagName&&a.tagName.toUpperCase()=="SCRIPT"&&c.append(a.text);if(a.tagName&&a.tagName.toUpperCase()=="STYLE")c.append(a.innerHTML);else for(i=a.firstChild;i;i=i.nextSibling)Sys.Extended.UI.HTMLEditor._getHTML_(c,i,true);v&&a.tagName.length>0&&!l&&r&&c.append("</"+u+a.tagName.toLowerCase()+">");break;case 3:c.append(Sys.Extended.UI.HTMLEditor._encodeText_(e+a.data+e));break;case 8:if(a.length>0)c.append("<!--"+a.data+"-->");else c.append("<!---->")}};Sys.Extended.UI.HTMLEditor.RemoveContextMenu=function(){var a=this,b=a._contextElement.parentNode.removeChild(a._contextElement);if(b)delete b;a._contextElement=null;a._contextTable=null;if(a.__saved_range__){a.__saved_range__.select();a.__saved_range__=null}};Sys.Extended.UI.HTMLEditor.contentEditable=function(a,f){var e="undefined",b=null;while(a!=b){try{var c=b;if(a.contentEditable!=b&&typeof a.contentEditable!=e&&!(Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera))if(!a.contentEditable||a.contentEditable=="false")c=false;else c=true;else{var d=a.getAttribute("contenteditable");if(typeof d=="boolean")c=d;else if(typeof d=="string"&&d.toLowerCase()=="false")c=false}if(c!=b&&typeof c=="boolean")if(!c)return a}catch(g){}if(typeof f!=e&&f)return b;if(a.tagName!=b&&typeof a.tagName!=e&&(a.tagName.toUpperCase()=="BODY"||a.tagName.toUpperCase()=="HTML"))break;a=a.parentNode}return b};Sys.Extended.UI.HTMLEditor.getSelParent=function(c){var d=c._getSelection(),b=c._createRange(d),a=null;if(Sys.Extended.UI.HTMLEditor.isIE)if(d.type.toLowerCase()=="control")a=b.item(0);else a=c._getParent(b);else{a=c._getParent(b);if(a.nodeType!=3&&b.startContainer==b.endContainer){var e=a;a=a.childNodes.item(b.startOffset);if(a==null)a=e}}return a};Sys.Extended.UI.HTMLEditor.__getIndex=function(b){var a=0;if(b.parentNode)for(;a<b.parentNode.childNodes.length;a++)if(b.parentNode.childNodes.item(a)==b)break;return a};Sys.Extended.UI.HTMLEditor.isInlineElement=function(a){var b=false;if(a.nodeType==3)return true;if(a.nodeType!=1)return b;if(!a.tagName||a.tagName.length==0)return b;if(a&&a.style&&a.style.display&&a.style.display.toLowerCase()=="inline")return true;var c=a.tagName.toUpperCase();if(c.length==2)if(c.substr(0,1)=="H"&&parseInt(c.substr(1,1))>0)return b;switch(c){case"BR":case"TBODY":case"TR":case"TD":case"P":case"PRE":case"TABLE":case"OL":case"UL":case"LI":case"HR":case"DIV":case"BLOCKQUOTE":case"FORM":case"FIELDSET":case"LEGEND":return b;default:return true}};Sys.Extended.UI.HTMLEditor.capLock=function(b){var a=b.charCode,c=b.shiftKey?b.shiftKey:a==16?true:false;return a>=65&&a<=90&&!c||a>=97&&a<=122&&c?true:false};Sys.Extended.UI.HTMLEditor.operateAnchors=function(e,i,k){for(var h=i.getElementsByTagName("A"),j=false,f=0;f<h.length;f++){var a=h[f];if(a.name&&a.name.length>0){for(var d=[],g=0;g<a.childNodes.length;g++){var b=a.childNodes.item(g);if(b.nodeType==1&&b.tagName&&b.tagName.toUpperCase()=="IMG"&&b.src==e._editPanel.get_imagePath_anchor()){d.push(b);j=true}}while(d.length>0)a.removeChild(d.pop());if(!k){var c=i.createElement("IMG");c.title=a.name;c.src=e._editPanel.get_imagePath_anchor();c.setAttribute(e.noContextMenuAttributeName(),"yes");a.appendChild(c)}}}return j};Sys.Extended.UI.HTMLEditor.operatePlaceHolders=function(q,h,r){var n="undefined",m="PLACEHOLDER",l="placeholder",k="dummytag",o=false;if(r){for(var g=h.getElementsByTagName("IMG"),c=[],b=0;b<g.length;b++)c.push(g[b]);for(var b=0;b<c.length;b++){var a=c[b],i=a.getAttribute(k);if(i&&i.length>0&&i.toLowerCase()==l){var j=h.createElement(m),d=a.title;if(d==null||typeof d==n)d=a.getAttribute("title");j.name=d;j.setAttribute("name",d);a.parentNode.insertBefore(j,a);a.parentNode.removeChild(a);o=true}}}else{for(var g=h.getElementsByTagName(m),c=[],b=0;b<g.length;b++)c.push(g[b]);for(var b=0;b<c.length;b++){var a=c[b],p=true;try{if(a.childNodes.length>0)p=false}catch(s){}if(p){var e=a.name;if(e==null||typeof e==n)e=a.getAttribute("name");var f=h.createElement("IMG");f.title=e;f.src=q._editPanel.get_imagePath_placeHolder();f.setAttribute(k,l);f.setAttribute("title",e);a.parentNode.insertBefore(f,a);a.parentNode.removeChild(a)}}}return o};Sys.Extended.UI.HTMLEditor.inspectForShadows=function(e){var d="draggesture",c="dragstart";for(var b=e.getElementsByTagName("IMG"),a=0;a<b.length;a++)if(b[a].getAttribute(Sys.Extended.UI.HTMLEditor.attachedIdAttribute)&&b[a].getAttribute(Sys.Extended.UI.HTMLEditor.attachedIdAttribute).length>0){try{if(Sys.Extended.UI.HTMLEditor.isIE)$removeHandler(b[a],c,Sys.Extended.UI.HTMLEditor.stopDrag);else $removeHandler(b[a],d,Sys.Extended.UI.HTMLEditor.stopDrag)}catch(f){}if(Sys.Extended.UI.HTMLEditor.isIE)$addHandler(b[a],c,Sys.Extended.UI.HTMLEditor.stopDrag);else $addHandler(b[a],d,Sys.Extended.UI.HTMLEditor.stopDrag)}};Sys.Extended.UI.HTMLEditor.attachedIdAttribute="obout-attached-id";Sys.Extended.UI.HTMLEditor.stopDrag=function(a){a&&a.stopPropagation();a.preventDefault();return false};Sys.Extended.UI.HTMLEditor.replacingRules=[["strong","font-weight","bold"],["b","font-weight","bold"],["strong","font-weight","700"],["em","font-style","italic"],["i","font-style","italic"],["u","text-decoration","underline"],["strike","text-decoration","line-through"]];Sys.Extended.UI.HTMLEditor.replaceOldTags=function(c,g){for(var j=c.innerHTML,k=false,d=0;d<Sys.Extended.UI.HTMLEditor.replacingRules.length;d++){var m=new RegExp("<"+Sys.Extended.UI.HTMLEditor.replacingRules[d][0]+"[s>]","ig");if(m.test(j)){k=true;break}}if(!k)if(!/<font[\s>]/ig.test(j))return;for(var h=0;h<c.childNodes.length;h++){var a=c.childNodes.item(h);if(a.nodeType==1){for(var e=null,i=a.tagName.toLowerCase(),d=0;d<Sys.Extended.UI.HTMLEditor.replacingRules.length;d++)if(Sys.Extended.UI.HTMLEditor.replacingRules[d][0].toLowerCase()==i){e=Sys.Extended.UI.HTMLEditor.replacingRules[d];break}if(e){var b=g._doc.createElement("SPAN");b.style.cssText=a.style.cssText;if(Sys.Extended.UI.HTMLEditor.isIE)b.style[e[1]]=e[2];else b.style[e[1].replace(/\-(\w)/g,function(b,a){return a.toUpperCase()})]=e[2];while(a.firstChild)b.appendChild(a.firstChild);c.insertBefore(b,a);c.removeChild(a);a=b}else if(i=="font"){var b=g._doc.createElement("SPAN"),l=a.size;b.style.cssText=a.style.cssText;if(a.color)b.style.color=a.color;if(a.face)b.style.fontFamily=a.face;while(a.firstChild)b.appendChild(a.firstChild);c.insertBefore(b,a);c.removeChild(a);if(l){var f=g._doc.createElement("FONT");f.size=l;c.insertBefore(f,b);if(b.style.cssText.length>0){f.appendChild(b);a=b}else{while(b.firstChild)f.appendChild(b.firstChild);c.removeChild(b);a=f}}else a=b}Sys.Extended.UI.HTMLEditor.replaceOldTags(a,g)}}};Sys.Extended.UI.HTMLEditor.getStyle=function(a,b){var c="";if(a.nodeType==1)if(a.ownerDocument&&a.ownerDocument.defaultView&&a.ownerDocument.defaultView.getComputedStyle)c=a.ownerDocument.defaultView.getComputedStyle(a,"").getPropertyValue(b);else if(a.currentStyle)try{b=b.replace(/\-(\w)/g,function(b,a){return a.toUpperCase()});c=a.currentStyle[b]}catch(d){c=a.style[b]}else c=a.style[b];return c};Sys.Extended.UI.HTMLEditor._Marker=function(c,d,f){var b=this;if(Sys.Extended.UI.HTMLEditor.isIE){b._nArr=Sys.Extended.UI.HTMLEditor.getNames(c._doc.body);b._save=c._doc.body.innerHTML;b._tree=null;if(f.type.toLowerCase()=="control")try{var a=d.item(0);b._tree=[];while(a&&(a.nodeType==3||!a.tagName||a.tagName.toUpperCase()!="BODY")){var e=0;while(a.previousSibling){e++;a=a.previousSibling}b._tree.push(e);a=a.parentNode}}catch(g){}else{b._offsetLeft=d.offsetLeft;b._offsetTop=d.offsetTop}}else{if(Sys.Extended.UI.HTMLEditor.isOpera)b._save=Sys.Extended.UI.HTMLEditor.Trim(c._doc.body.innerHTML);else b._save=c._doc.body.cloneNode(true);b._tree=[];b._offset=0;try{var a=d.startContainer;b._offset=d.startOffset;if(a&&a.nodeType==1&&a.tagName.toUpperCase()=="HTML"){a=c._doc.body;setTimeout(function(){try{f=c._getSelection();d=c._createRange();c._removeAllRanges(f);d.setStart(a,0);d.setEnd(a,0);c._selectRange(f,d)}catch(b){}},0)}while(a&&a.nodeType&&(a.nodeType==3||!a.tagName||a.tagName.toUpperCase()!="BODY")){var e=0;while(a.previousSibling){e++;if(Sys.Extended.UI.HTMLEditor.isOpera)if(a.nodeType==3&&a.previousSibling!=null&&a.previousSibling.nodeType==3)e--;a=a.previousSibling}b._tree.push(e);a=a.parentNode}}catch(g){}}};Sys.Extended.UI.HTMLEditor.__stackMaxSize=30;Sys.Extended.UI.HTMLEditor.getNames=function(i){for(var e=i.all,g=[],h=[],d=0;d<e.length;d++){var a=e[d];if(a.name&&a.name.length>0){for(var b=a.tagName,f=i.getElementsByTagName(b),j=0,c=0;c<f.length;c++)if(f[c]==a){j=c;break}h[b]=j;g.push([b,h[b],a.name])}}return g};Sys.Extended.UI.HTMLEditor.setNames=function(c,b){for(var a=0;a<b.length;a++)if(c.getElementsByTagName(b[a][0]).length>b[a][1])c.getElementsByTagName(b[a][0])[b[a][1]].name=b[a][2]};Sys.Extended.UI.HTMLEditor._lookChild=function(c,d){for(var a=0;a<c.childNodes.length;a++){var b=c.childNodes.item(a);if(b==d)return a;if(b.nodeType==1)if(Sys.Extended.UI.HTMLEditor._lookChild(b,d)>=0)return a}return-1};Sys.Extended.UI.HTMLEditor.getHrefsText=function(d){var a=[];function b(g,e,h,i,j,f){for(var d=e.replace(/^<([^\s>]+)/,"$1"),c=true,b=0;b<a.length;b++)if(a[b][0]==d){c=false;break}if(c)a[b]=[d];a[b].push(f)}var c=new RegExp("(<[^\\s><]+)([^><]*?)(href=)(\"|')([^\\4]*?)(\\4)((?:[^><]*?)>)","ig");d.replace(c,b);return a};Sys.Extended.UI.HTMLEditor.setHrefsText=function(g,d){for(var b=0;b<d.length;b++)for(var c=g.getElementsByTagName(d[b][0]),e=1,a=0;a<c.length;a++){if(!c[a].href)continue;if(d[b][e]&&d[b][e].length>0){var f;if(Sys.Extended.UI.HTMLEditor.isIE)f=c[a].innerHTML;c[a].href=d[b][e].replace(/&amp;/ig,"&");if(Sys.Extended.UI.HTMLEditor.isIE)c[a].innerHTML=f}e++}};Sys.Extended.UI.HTMLEditor.getImagesText=function(c){var a=[];function b(b,d,e,c){a.push(c);return b}c.replace(/(<img(?:.*?))(src=")(.*?)(")((?:.*?)>)/ig,b);return a};Sys.Extended.UI.HTMLEditor.setImagesText=function(e,d){for(var c=e.getElementsByTagName("IMG"),b=0,a=0;a<c.length;a++){if(!c[a].src)continue;if(d[b]&&d[b].length>0)c[a].src=d[b].replace(/&amp;/ig,"&");b++}};Sys.Extended.UI.HTMLEditor.canHaveChildren=function(a){return Sys.Extended.UI.HTMLEditor.isIE?a.canHaveChildren:!/^(area|base|basefont|col|frame|hr|img|br|input|isindex|link|meta|param)$/.test(a.tagName.toLowerCase())};Sys.Extended.UI.HTMLEditor._setCursor=function(j,a){var c=j;if(Sys.Extended.UI.HTMLEditor.isIE){var e=a._getSelection(),b=a._createRange(e);if(e.type.toLowerCase()=="control"){b.remove(0);e.empty();b=a._createRange()}var g=c.nodeType==3,d;if(g){d=a._doc.createElement("SPAN");d.innerHTML="&nbsp;";c.parentNode.insertBefore(d,c);c=d}var f=$common.getLocation(c),h=f.x,i=f.y;g&&d.parentNode.removeChild(d);try{b.moveToPoint(h,i)}catch(k){}b.select()}else{var e=a._getSelection(),b=a._createRange();b.setStart(c,0);b.setEnd(c,0);a._removeAllRanges(e);a._selectRange(e,b);a.focusEditor()}};Sys.Extended.UI.HTMLEditor.myClone=function(a,e,d){var b;if(Sys.Extended.UI.HTMLEditor.isIE&&a.tagName&&(a.tagName.toUpperCase()=="EMBED"||a.tagName.toUpperCase()=="OBJECT")){var c=e.createElement("DIV");try{c.innerHTML=a.outerHTML;b=c.firstChild}catch(f){b=a}delete c}else b=a.cloneNode(d);return b};Sys.Extended.UI.HTMLEditor.unStyle=function(a){var k="function",f=false,b=null,c=a.parentNode!=b&&typeof a.parentNode!="undefined"?a.parentNode:b;if(c){var d=b;while(c&&c.tagName&&c.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(c.tagName)&&c.tagName.toUpperCase()!="A"){d=c;c=c.parentNode}if(d){function j(g,c,h,i,l){var a=h.cloneNode(f);if(g)if(g.push&&typeof g.push==k)for(var n=0;n<g.length;n++)a.appendChild(g[n]);else a.appendChild(g);if(l)a.appendChild(c);else while(c){var q=i?c.previousSibling:c.nextSibling;if(c.nodeType==1||c.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(""+c.data+"").length>0){if(c.nodeType==1)if(c.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(c.tagName)&&c.childNodes.length==0&&!Sys.Extended.UI.HTMLEditor.isTempElement(c))c=b;if(c)if(a.childNodes.length==0||!i)a.appendChild(c);else a.insertBefore(c,a.firstChild)}c=q}if(a.childNodes.length==0){delete a;a=b}else if(a.childNodes.length==1&&a.firstChild.nodeType==3&&(""+a.firstChild.data+"").length==0){delete a;a=b}else if(!l&&a.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)&&a.tagName.toUpperCase()!="A"&&!Sys.Extended.UI.HTMLEditor.isTempElement(a)){for(var o=a.childNodes.length,m=0;m<a.childNodes.length;m++){var e=a.childNodes.item(m);if(e.nodeType==1&&e.tagName&&!Sys.Extended.UI.HTMLEditor.isStyleTag(e.tagName)&&(e.tagName.toUpperCase()=="BR"||e.tagName.toUpperCase()=="TABLE"||Sys.Extended.UI.HTMLEditor.isTempElement(e)))o--}if(o==0){var p=[];while(a.firstChild){var e=a.removeChild(a.firstChild);p.push(e)}a=p}}return h==d?a:!l?j(a,i?h.previousSibling:h.nextSibling,h.parentNode,i,l):j(b,a,h.parentNode,i,l)}c=a.parentNode;if(a.previousSibling==b&&a.nextSibling==b&&c&&c.tagName&&c.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(c.tagName)&&Sys.Extended.UI.HTMLEditor.differAttr(c,["class","color","face","size"]).length>0)a=c;var h=j(b,a.previousSibling,a.parentNode,true,f),i=j(b,a.nextSibling,a.parentNode,f,f),e=d.parentNode;if(h)if(h.push&&typeof h.push==k)for(var g=0;g<h.length;g++)e.insertBefore(h[g],d);else e.insertBefore(h,d);if(a.nodeType==1&&a.tagName&&(a.tagName.toUpperCase()=="BR"||a.tagName.toUpperCase()=="TABLE"||Sys.Extended.UI.HTMLEditor.isTempElement(a)))e.insertBefore(a,d);else{var l=j(b,a,a.parentNode,f,true);e.insertBefore(l,d)}if(i)if(i.push&&typeof i.push==k)for(var g=0;g<i.length;g++)e.insertBefore(i[g],d);else e.insertBefore(i,d);e.removeChild(d)}}};Sys.Extended.UI.HTMLEditor.isTempElement=function(a){return a.id&&a.id.length>0&&a.id.indexOf(Sys.Extended.UI.HTMLEditor.smartClassName)>=0?true:false};Sys.Extended.UI.HTMLEditor._moveTagsUp=function(d,e){function b(a){if(!Sys.Extended.UI.HTMLEditor.isInlineElement(a)||a.nodeType==3)Sys.Extended.UI.HTMLEditor.unStyle(a);else if(a.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)&&a.tagName.toUpperCase()!="A"&&!Sys.Extended.UI.HTMLEditor.isTempElement(a)){var c=a.firstChild;while(c!=null){var d=c.nextSibling;b(c);c=d}}}var a=d;while(a!=null&&a!=e){var c=a.nextSibling;b(a);a=c}};Sys.Extended.UI.HTMLEditor._commonTotalParent=function(e,g){var h=null,a=e.parentNode,f=e;while(a){if(a.tagName&&!Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)){var d=Sys.Extended.UI.HTMLEditor._lookChild(a,g);if(d>=0){for(var c=0,b=0;b<a.childNodes.length;b++)if(a.childNodes.item(b)==f){c=b;break}return{parent:a,indexFirst:c,indexLast:d}}}f=a;a=a.parentNode}return h};Sys.Extended.UI.HTMLEditor._commonParent=function(e,g){var h=null,a=e.parentNode,f=e;while(a&&a.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)){var d=Sys.Extended.UI.HTMLEditor._lookChild(a,g);if(d>=0){for(var c=0,b=0;b<a.childNodes.length;b++)if(a.childNodes.item(b)==f){c=b;break}return{parent:a,indexFirst:c,indexLast:d}}f=a;a=a.parentNode}return h};Sys.Extended.UI.HTMLEditor.positionInParagraph=function(b,e,c,a,f){while(true){var d=Sys.Extended.UI.HTMLEditor.positionInParagraphLevel(b,e,c,f);if(d!=null)return d;if(a.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)&&a.tagName.toUpperCase()!="A"&&!Sys.Extended.UI.HTMLEditor.isTempElement(a)){e=c?a.previousSibling:a.nextSibling;a=a.parentNode}else{if(!c||a.firstChild==null)a.appendChild(b);else a.insertBefore(b,a.firstChild);return b}}};Sys.Extended.UI.HTMLEditor.positionInParagraphLevel=function(c,a,d,g){while(a){var j=d?a.previousSibling:a.nextSibling;if(!Sys.Extended.UI.HTMLEditor.isInlineElement(a)){var e=a.parentNode;if(!d)e.insertBefore(c,a);else if(a.nextSibling)e.insertBefore(c,a.nextSibling);else e.appendChild(c);return c}else if(typeof g=="function"&&a.nodeType==3){var b,f=""+a.data+"";if(d){for(b=f.length-1;b>=0;b--)if(g(f.substr(b,1)))break}else for(b=0;b<f.length;b++)if(g(f.substr(b,1)))break;if(b>=0&&b<f.length){var e=a.parentNode,h;if((b>0||d&&b==0)&&(b<f.length-1||!d&&b==f.length-1)){if(d)h=a.splitText(b+1);else h=a.splitText(b);e.insertBefore(c,h)}else if(!d)e.insertBefore(c,a);else if(a.nextSibling)e.insertBefore(c,a.nextSibling);else e.appendChild(c);return c}}a=d?a.lastChild:a.firstChild;if(a){var i=Sys.Extended.UI.HTMLEditor.positionInParagraphLevel(c,a,d,g);if(i!=null)return i}a=j}return null};Sys.Extended.UI.HTMLEditor._addEvent=function(a,b,c){if(a.attachEvent)a.attachEvent("on"+b,c);else a.addEventListener&&a.addEventListener(b,c,true)};Sys.Extended.UI.HTMLEditor._addEvents=function(d,b,c){for(var a=0;a<b.length;a++)Sys.Extended.UI.HTMLEditor._addEvent(d,b[a],c)};Sys.Extended.UI.HTMLEditor._removeEvent=function(a,b,c){if(a.detachEvent)a.detachEvent("on"+b,c);else a.removeEventListener&&a.removeEventListener(b,c,true)};Sys.Extended.UI.HTMLEditor._removeEvents=function(d,b,c){for(var a=0;a<b.length;a++)Sys.Extended.UI.HTMLEditor._removeEvent(d,b[a],c)};Sys.Extended.UI.HTMLEditor._stopEvent=function(a){if(a)if(Sys.Extended.UI.HTMLEditor.isIE){a.cancelBubble=true;a.returnValue=false}else{a.preventDefault();a.stopPropagation()}};Sys.Extended.UI.HTMLEditor.restrictedTags=["DIV","P","TD","TR","TABLE","TBODY","LI","OL","UL","FORM","INPUT"];Sys.Extended.UI.HTMLEditor.isRestricted=function(b){for(var c=b.tagName.toUpperCase(),a=0;a<Sys.Extended.UI.HTMLEditor.restrictedTags.length;a++)if(Sys.Extended.UI.HTMLEditor.restrictedTags[a].toUpperCase()==c)return true;return Sys.Extended.UI.HTMLEditor.isIE&&b.scopeName.toUpperCase()!="HTML"?true:false};Sys.Extended.UI.HTMLEditor.jsDocument=function(c){var a="\n",b=this;b.noExtraLf=typeof c!="undefined"&&c;b.text=[];b.write=function(c){var b=this;if(!b.noExtraLf||b.text.length==0&&c!=a||b.text.length>0&&(b.text[b.text.length-1]!=a||c!=a))b.text[b.text.length]=c};b.append=b.write;b.writeln=function(b){this.text[this.text.length]=b+a};b.toString=function(){return this.text.join("")};b.clear=function(){delete this.text;this.text=null;this.text=[]}};Sys.Extended.UI.HTMLEditor.isHeader=function(b){var a=b.tagName.toUpperCase();if(a.length==2)if(a.substr(0,1)=="H"&&parseInt(a.substr(1,1))>0)return true;return false};Sys.Extended.UI.HTMLEditor._getReallyFirst=function(a){var b="undefined";if(typeof a.firstChild!=b&&a.firstChild!=null)if(typeof a.firstChild.childNodes!=b&&a.firstChild.childNodes!=null)return Sys.Extended.UI.HTMLEditor._getReallyFirst(a.firstChild);return a};Sys.Extended.UI.HTMLEditor._getReallyLast=function(a){var b="undefined";if(typeof a.lastChild!=b&&a.lastChild!=null)if(typeof a.lastChild.childNodes!=b&&a.lastChild.childNodes!=null)return Sys.Extended.UI.HTMLEditor._getReallyLast(a.lastChild);return a};Sys.Extended.UI.HTMLEditor._reallyFirst=function(a,b){if(a.firstChild){if(a.firstChild==b)return true;if(a.firstChild.childNodes)if(Sys.Extended.UI.HTMLEditor._lookChild(a.firstChild,b)==0)return Sys.Extended.UI.HTMLEditor._reallyFirst(a.firstChild,b)}return false};Sys.Extended.UI.HTMLEditor._reallyLast=function(a,b){if(a.lastChild){if(a.lastChild==b)return true;if(a.lastChild.childNodes)if(Sys.Extended.UI.HTMLEditor._lookChild(a.lastChild,b)==a.lastChild.childNodes.length-1)return Sys.Extended.UI.HTMLEditor._reallyLast(a.lastChild,b)}return false};Sys.Extended.UI.HTMLEditor.getContainer=function(b,c){if(c==b)return b;if(b.nodeType==1)for(var d=0;d<b.childNodes.length;d++){var a=b.childNodes.item(d);if(c==a)return a;if(a.nodeType==1){var e=Sys.Extended.UI.HTMLEditor._lookChild(a,c);if(e>=0)return a.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)&&a.tagName.toUpperCase()!="A"&&!Sys.Extended.UI.HTMLEditor.isTempElement(a)?Sys.Extended.UI.HTMLEditor.getContainer(a,c):a}}return null};Sys.Extended.UI.HTMLEditor._TryTransformFromPxToPt=function(h,f,g){var c=h.replace(/^(\d+)\.(\d+)px/i,"$1px");if(!Sys.Extended.UI.HTMLEditor.isIE)if(c&&c.length>0){var d=c.toLowerCase().split(",")[0];if(typeof g!="undefined"){var e=document.getElementById(g);if(e!=null){for(var a=0;a<e.options.length;a++){var i=Sys.Extended.UI.HTMLEditor.fontSizeSeek(e.options.item(a).value.toLowerCase().split(",")[0]);if(i==d)break}if(a==e.options.length){var b=f._doc.createElement("SPAN");f._doc.body.appendChild(b);for(a=1;a<100;a++){b.style.fontSize=a+"pt";if(Sys.Extended.UI.HTMLEditor.getStyle(b,"font-size").replace(/^(\d+)\.(\d+)px/i,"$1px")==d){d=a+"pt";break}}b.parentNode.removeChild(b)}}}c=d}return c};Sys.Extended.UI.HTMLEditor.fontSizeSeek=function(b){var a=b.toString();switch(a){case"1":a="8pt";break;case"2":a="10pt";break;case"3":a="12pt";break;case"4":a="14pt";break;case"5":a="18pt";break;case"6":a="24pt";break;case"7":a="36pt"}return a};Sys.Extended.UI.HTMLEditor.getOwnerDocument=function(a){return a.nodeType==9?a:a.ownerDocument||a.document};Sys.Extended.UI.HTMLEditor.getClientViewportElement=function(b){var a;if(b.nodeType==9)a=b;else a=Sys.Extended.UI.HTMLEditor.getOwnerDocument(b);return Sys.Extended.UI.HTMLEditor.isIE&&a.compatMode!="CSS1Compat"?a.body:a.documentElement};Sys.Extended.UI.HTMLEditor.isReallyVisible=function(c){var a=c,b=true;while(a){if(a.style&&Sys.Extended.UI.HTMLEditor.getStyle(a,"display")=="none"){b=false;break}a=a.parentNode}return b};Sys.Extended.UI.HTMLEditor.setSelectionRange=function(a,d,e){var c="character";a.focus();if(a.setSelectionRange)a.setSelectionRange(d,e);else if(a.createTextRange){var b=a.createTextRange();b.collapse(true);b.moveEnd(c,e);b.moveStart(c,d);b.select()}};Sys.Extended.UI.HTMLEditor.setElementVisibility=function(e){var d=[],a=e;while(a&&a.nodeType==1&&a.tagName.toUpperCase()!="BODY"){var c=a.style.display,b=a.style.visibility;if(a.style&&(c=="none"||b=="hidden")){d.push({element:a,display:c,visibility:b});a.style.display="";a.style.visibility="visible"}a=a.parentNode}return d};Sys.Extended.UI.HTMLEditor.restoreElementVisibility=function(d){for(var b=0;b<d.length;b++){var a=d[b],c=a.element.style;c.display=a.display;c.visibility=a.visibility}};if(!Sys.Extended.UI.HTMLEditor.isIE)try{Sys.Extended.UI.HTMLEditor.__MozillaGetInnerText=function(g,b){for(var d=g.childNodes,c=0;c<d.length;c++){var a=d[c];a.nodeType==3&&b.write(a.nodeValue.replace("\n",""));if(a.nodeType==1){var f=Sys.Extended.UI.HTMLEditor.getStyle(a,"display"),e=Sys.Extended.UI.HTMLEditor.getStyle(a,"visibility");Sys.Extended.UI.HTMLEditor.__needLineBreakBefore(a)&&b.write("\n");Sys.Extended.UI.HTMLEditor.__needTabBefore(a)&&b.write("\t");f!="none"&&e!="hidden"&&Sys.Extended.UI.HTMLEditor.__MozillaGetInnerText(a,b);Sys.Extended.UI.HTMLEditor.__needLineBreakAfter(a)&&b.write("\n")}}};Sys.Extended.UI.HTMLEditor.__needLineBreakBefore=function(b){var a=" div table p pre ol ul blockquote form fieldset ";return a.indexOf(" "+b.tagName.toLowerCase()+" ")!=-1};Sys.Extended.UI.HTMLEditor.__needLineBreakAfter=function(b){var a=" br div table tr p pre ol ul li hr blockquote form fieldset legend ";return a.indexOf(" "+b.tagName.toLowerCase()+" ")!=-1};Sys.Extended.UI.HTMLEditor.__needTabBefore=function(b){var a=" td li ";return a.indexOf(" "+b.tagName.toLowerCase()+" ")!=-1}}catch(ex){};
//END HTMLEditor.HTMLEditor.js
//START HTMLEditor.Events.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.ActiveModeChangedArgs=function(d,c,b){var a=this;if(arguments.length!=3)throw Error.parameterCount();Sys.Extended.UI.HTMLEditor.ActiveModeChangedArgs.initializeBase(a);a._oldMode=d;a._newMode=c;a._editPanel=b};Sys.Extended.UI.HTMLEditor.ActiveModeChangedArgs.prototype={get_oldMode:function(){return this._oldMode},get_newMode:function(){return this._newMode},get_editPanel:function(){return this._editPanel}};Sys.Extended.UI.HTMLEditor.ActiveModeChangedArgs.registerClass("Sys.Extended.UI.HTMLEditor.ActiveModeChangedArgs",Sys.EventArgs);
//END HTMLEditor.Events.js
//START HTMLEditor.EditPanel.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel=null;Sys.Extended.UI.HTMLEditor.EditPanel=function(e){var d=true,b=null,c=false,a=this;Sys.Extended.UI.HTMLEditor.EditPanel.initializeBase(a,[e]);a._loaded=c;a._eAfter=b;a._toolbars=b;a._modePanels=b;a._contentChangedElement=b;a._contentElement=b;a._contentForceElement=b;a._activeModeElement=b;a._suppressTabInDesignMode=c;a._keyboardEnabled=d;a._noPaste=c;a._hotkeys=b;a._showAnchors=c;a._showPlaceHolders=c;a._startEnd=d;a._relativeImages=d;a._documentCssPath=b;a._designPanelCssPath=b;a._imagePath_1x1=b;a._imagePath_flash=b;a._imagePath_media=b;a._imagePath_anchor=b;a._imagePath_placeHolder=b;a._autofocus=d;a._initialCleanUp=c;a._noScript=c;a._noUnicode=c;a._cachedToolbarIds=b;a._contentPrepared=c;a._activeMode=b;a._pageRequestManager=b;a._formOnSubmitSaved=b;a._validators=b;a._app_onload$delegate=Function.createDelegate(a,a._app_onload);a._onsubmit$delegate=Function.createDelegate(a,a._onsubmit);a._disposed=d};Sys.Extended.UI.HTMLEditor.EditPanel.prototype={get_relativeImages:function(){return this._relativeImages},set_relativeImages:function(a){this._relativeImages=a;this._loaded&&this.raisePropertyChanged("relativeImages")},get_startEnd:function(){return this._startEnd},set_startEnd:function(a){this._startEnd=a;this._loaded&&this.raisePropertyChanged("startEnd")},get_showPlaceHolders:function(){return this._showPlaceHolders},set_showPlaceHolders:function(a){this._showPlaceHolders=a;this._loaded&&this.raisePropertyChanged("showPlaceHolders")},get_showAnchors:function(){return this._showAnchors},set_showAnchors:function(a){this._showAnchors=a;this._loaded&&this.raisePropertyChanged("showAnchors")},get_hotkeys:function(){return this._hotkeys},set_hotkeys:function(a){this._hotkeys=a;this._loaded&&this.raisePropertyChanged("noPaste")},get_noPaste:function(){return this._noPaste},set_noPaste:function(a){this._noPaste=a;this._loaded&&this.raisePropertyChanged("noPaste")},get_suppressTabInDesignMode:function(){return this._suppressTabInDesignMode},set_suppressTabInDesignMode:function(a){this._suppressTabInDesignMode=a;this._loaded&&this.raisePropertyChanged("suppressTabInDesignMode")},get_keyboardEnabled:function(){return this._keyboardEnabled},set_keyboardEnabled:function(a){this._keyboardEnabled=a;this._loaded&&this.raisePropertyChanged("keyboardEnabled")},get_noUnicode:function(){return this._noUnicode},set_noUnicode:function(a){this._noUnicode=a;this._loaded&&this.raisePropertyChanged("noUnicode")},get_noScript:function(){return this._noScript},set_noScript:function(a){this._noScript=a;this._loaded&&this.raisePropertyChanged("noScript")},get_initialCleanUp:function(){return this._initialCleanUp},set_initialCleanUp:function(a){this._initialCleanUp=a;this._loaded&&this.raisePropertyChanged("initialCleanUp")},get_imagePath_1x1:function(){return this._imagePath_1x1},set_imagePath_1x1:function(a){this._imagePath_1x1=a},get_imagePath_flash:function(){return this._imagePath_flash},set_imagePath_flash:function(a){this._imagePath_flash=a},get_imagePath_media:function(){return this._imagePath_media},set_imagePath_media:function(a){this._imagePath_media=a},get_imagePath_anchor:function(){return this._imagePath_anchor},set_imagePath_anchor:function(a){this._imagePath_anchor=a},get_imagePath_placeHolder:function(){return this._imagePath_placeHolder},set_imagePath_placeHolder:function(a){this._imagePath_placeHolder=a},get_documentCssPath:function(){return this._documentCssPath},set_documentCssPath:function(a){this._documentCssPath=a;this._loaded&&this.raisePropertyChanged("documentCssPath")},get_designPanelCssPath:function(){return this._designPanelCssPath},set_designPanelCssPath:function(a){this._designPanelCssPath=a;this._loaded&&this.raisePropertyChanged("designPanelCssPath")},get_autofocus:function(){return this._autofocus},set_autofocus:function(a){this._autofocus=a;this._loaded&&this.raisePropertyChanged("autofocus")},get_content:function(){var a=this;return a._activeMode==null?a.get_contentElement()!=null?a._getContentForPostback():"":a.getContent()},set_content:function(b){var a=this;if(!a.get_isInitialized()||!a._loaded){if(a.get_contentElement()!=null)a.get_contentElement().value=b.replace(/\"/g,"&quot;");return}a.setContent(b);a._contentPrepared=false;a._loaded&&a.raisePropertyChanged("content")},get_activeMode:function(){return this._activeMode==null?Sys.Extended.UI.HTMLEditor.ActiveModeType.Design:this._activeMode},set_activeMode:function(b){var a=this;if(!Sys.Extended.UI.HTMLEditor.ActiveModeType_checkValue(b))throw Error.argumentOutOfRange("value, function: Sys.Extended.UI.HTMLEditor.EditPanel.set_activeMode");var c=a._activeMode,d=true;if(a._loaded&&c!=null&&c!=b){var e=new Sys.Extended.UI.HTMLEditor.ActiveModeChangedArgs(c,b,a);a.raiseBeforeActiveModeChanged(e);a._eAfter=new Sys.Extended.UI.HTMLEditor.ActiveModeChangedArgs(c,b,a);d=a._setMode(b)}else a._activeMode=b;a.get_activeModeElement().value=b;return d},get_contentChangedElement:function(){return this._contentChangedElement},set_contentChangedElement:function(a){this._contentChangedElement=a},get_contentElement:function(){return this._contentElement},set_contentElement:function(a){this._contentElement=a},get_contentForceElement:function(){return this._contentForceElement},set_contentForceElement:function(a){this._contentForceElement=a},get_activeModeElement:function(){return this._activeModeElement},set_activeModeElement:function(a){this._activeModeElement=a},setCancelOnPostback:function(){if(this._loaded)this.get_contentForceElement().value=""},setAcceptOnPostback:function(){if(this._loaded)this.get_contentForceElement().value="1"},get_toolbars:function(){if(this._toolbars==null)this._toolbars=[];return this._toolbars},set_toolbars:function(a){this.get_toolbars().push(a)},get_toolbarIds:function(){},set_toolbarIds:function(c){if(!this.get_isInitialized()){this._cachedToolbarIds=c;return}for(var b=c.split(";"),a=0;a<b.length;a++)b[a].length>0&&this.set_toolbars($find(b[a]))},get_modePanels:function(){if(this._modePanels==null)this._modePanels=[];return this._modePanels},set_modePanel:function(a){this.get_modePanels().push(a)},get_modePanelIds:function(){},set_modePanelIds:function(c){for(var b=c.split(";"),a=0;a<b.length;a++)this.set_modePanel($find(b[a]))},add_focused:function(a){this.get_events().addHandler("focused",a)},remove_focused:function(a){this.get_events().removeHandler("focused",a)},raiseFocused:function(b){var a=this.get_events().getHandler("focused");a&&a(this,b)},add_activeModeChanged:function(a){this.get_events().addHandler("activeModeChanged",a)},remove_activeModeChanged:function(a){this.get_events().removeHandler("activeModeChanged",a)},raiseActiveModeChanged:function(b){var a=this.get_events().getHandler("activeModeChanged");a&&a(this,b)},add_beforeActiveModeChanged:function(a){this.get_events().addHandler("beforeActiveModeChanged",a)},remove_beforeActiveModeChanged:function(a){this.get_events().removeHandler("beforeActiveModeChanged",a)},raiseBeforeActiveModeChanged:function(b){var a=this.get_events().getHandler("beforeActiveModeChanged");a&&a(this,b)},get_activePanel:function(){var a=this.get_modePanels()[this.get_activeMode()];if(a==null||typeof a=="undefined")throw Error.argumentOutOfRange("activeMode, function: Sys.Extended.UI.HTMLEditor.EditPanel.get_activePanel");return a},initialize:function(){var a=this;a.__appLoaded__=false;Sys.Extended.UI.HTMLEditor.EditPanel.callBaseMethod(a,"initialize");a._disposed=false;Sys.Application.add_load(a._app_onload$delegate);if(Sys&&Sys.WebForms&&Sys.WebForms.PageRequestManager){a._pageRequestManager=Sys.WebForms.PageRequestManager.getInstance();if(a._pageRequestManager){a._partialUpdateEndRequestHandler=Function.createDelegate(a,a._partialUpdateEndRequest);a._pageRequestManager.add_endRequest(a._partialUpdateEndRequestHandler);a._invokingRequestHandler=Function.createDelegate(a,a._invokingRequest);Sys.Net.WebRequestManager.add_invokingRequest(a._invokingRequestHandler);a._completedRequestHandler=Function.createDelegate(a,a._completedRequest);Sys.Net.WebRequestManager.add_completedRequest(a._completedRequestHandler)}}Sys.Extended.UI.HTMLEditor.addFormOnSubmit(a._onsubmit$delegate,a)},dispose:function(){var b=null,a=this;a._loaded=false;a._disposed=true;if(a._pageRequestManager){if(a._invokingRequestHandler){a._pageRequestManager.remove_endRequest(a._partialUpdateEndRequestHandler);a._partialUpdateEndRequestHandler=b;Sys.Net.WebRequestManager.remove_invokingRequest(a._invokingRequestHandler);a._invokingRequestHandler=b;Sys.Net.WebRequestManager.remove_completedRequest(a._completedRequestHandler);a._completedRequestHandler=b}a._pageRequestManager=b}Sys.Extended.UI.HTMLEditor.removeFormOnSubmit(a._onsubmit$delegate);Sys.Application.remove_load(a._app_onload$delegate);a.disableToolbars();Sys.Extended.UI.HTMLEditor.EditPanel.callBaseMethod(a,"dispose")},_onsubmit:function(){var a=this;if(!a._contentPrepared){a._prepareContentForPostback(a.get_content());a._contentPrepared=true}return true},_invokingRequest:function(f,d){var a=this;if(a._contentPrepared)return;var c=d.get_webRequest(),b=c.get_body(),e=new RegExp("([\\?&])("+a.get_contentElement().name+"=)([^&$]*)([&$])","g");a._prepareContentForPostback(a.get_content());b=b.replace(e,"$1$2"+escape(a.get_contentElement().value)+"$4");a._contentPrepared=true;c.set_body(b)},_completedRequest:function(){this._contentPrepared=false},_partialUpdateEndRequest:function(){var a=this;a._contentPrepared=false;if(Sys.Extended.UI.HTMLEditor.isIE&&a.__blured){a.__blured=false;a.get_activePanel()._focus()}},_app_onload:function(){var c=null,d=true,a=this;if(a.__appLoaded__)return;a.__appLoaded__=d;if(a._disposed)return;var l=a;a._loaded=d;a.set_activeMode(parseInt(a.get_activeModeElement().value));if(a._cachedToolbarIds!=c){a.set_toolbarIds(a._cachedToolbarIds);a._cachedToolbarIds=c}a._validators=a.get_modePanels()[Sys.Extended.UI.HTMLEditor.ActiveModeType.Html].get_element().Validators;a._shouldResize=false;if(Sys.Extended.UI.HTMLEditor.isIE&&document.compatMode!="BackCompat")a._shouldResize=d;if(a._shouldResize){var f=a.get_modePanels(),e=f[Sys.Extended.UI.HTMLEditor.ActiveModeType.Design];if(e==c)e=f[Sys.Extended.UI.HTMLEditor.ActiveModeType.Preview];var i=f[Sys.Extended.UI.HTMLEditor.ActiveModeType.Html];if(e!=c&&i!=c){var b=e.get_element();b.style.display="";var g=b.offsetHeight,j=false,h;if(g==0){j=d;h=Sys.Extended.UI.HTMLEditor.setElementVisibility(b.parentNode);g=b.offsetHeight}i.get_element().style.height=g+"px";if(j){Sys.Extended.UI.HTMLEditor.restoreElementVisibility(h);delete h}b.style.display="none"}}var k=a.get_contentElement().value.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&amp;/g,"&");a.setContent(a._initialCleanUp?Sys.Extended.UI.HTMLEditor.cleanUp(k.replace(/[\n\r]+/g," ")):k);a.setAcceptOnPostback()},_setActive:function(){var a=this;for(var b=0;b<a.get_toolbars().length;b++)a.get_toolbars()[b].set_activeEditPanel(a,true);if(a._eAfter!=null){a.raisePropertyChanged("activeMode");a.raiseActiveModeChanged(a._eAfter);a._eAfter=null}},_focused:function(c){var a=this;if(!(typeof c!="undefined"&&c))for(var b=0;b<a.get_toolbars().length;b++)a.get_toolbars()[b].set_activeEditPanel(a);Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel=a},_really_focused:function(){this._focused();this.raiseFocused(new Sys.EventArgs)},updateToolbar:function(){this._focused()},getContent:function(){var a=this.get_activePanel().get_content().replace(/<\/?html(?=\s|>)(?:[^>]*?)>/gi,"").replace(/<\/?head(?=\s|>)(?:[^>]*?)>/gi,"").replace(/<\/?body(?=\s|>)(?:[^>]*?)>/gi,"").replace(/^([\n\r]+)/,"").replace(/([\n\r]+)$/,"");if(!Sys.Extended.UI.HTMLEditor.isIE)a=a.replace(/^<br\s*[\/]*>$/,"");return a},setContent:function(c){var b=this,a=c;if(b.get_noScript())a=a.replace(/(<script(?:[^>]*?)>(?:[^<]*?)<\/script(?:[^>]*?)>)/ig,"");a=a.replace(/<\/?html(?=\s|>)(?:[^>]*?)>/gi,"").replace(/<\/?head(?=\s|>)(?:[^>]*?)>/gi,"").replace(/<\/?body(?=\s|>)(?:[^>]*?)>/gi,"").replace(/^([\n\r]+)/,"").replace(/([\n\r]+)$/,"");b._prepareContentForPostback(a);b.get_activePanel().set_content(a);b._validate(null,a)},_validate:function(d,c){var a=this._validators;if(a!=null&&typeof a!="undefined"){this._contentForValidation=c;try{for(var b=0;b<a.length;b++)window.ValidatorValidate(a[b],null,d);window.ValidatorUpdateIsValid()}catch(e){}this._contentForValidation=null}},_prepareContentForPostback:function(a){this.get_contentElement().value=a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;")},_getContentForPostback:function(){return this.get_contentElement().value.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&amp;/g,"&")},_setMode:function(b){var a=this,g=a.get_activePanel();if(!g._activated){var k=a;setTimeout(function(){k._setMode(b)},10);return false}var d=a.get_content();if(Sys.Extended.UI.HTMLEditor.isOpera)d=d.replace(/\r/ig,"");if(a._shouldResize&&b==Sys.Extended.UI.HTMLEditor.ActiveModeType.Html){var h=a.get_activePanel(),i=a.get_modePanels()[Sys.Extended.UI.HTMLEditor.ActiveModeType.Html];if(h!=null&&i!=null){var c=h.get_element(),e=c.offsetHeight,j=false,f;if(e==0){j=true;f=Sys.Extended.UI.HTMLEditor.setElementVisibility(c.parentNode);e=c.offsetHeight}i.get_element().style.height=e+"px";if(j){Sys.Extended.UI.HTMLEditor.restoreElementVisibility(f);delete f}}}a.disableToolbars(b);g._deactivate();a._activeMode=b;a.setContent(d);return true},disableToolbars:function(c){for(var a=0;a<this.get_toolbars().length;a++){var b=this.get_toolbars()[a];b._loaded&&b.disable(c)}},openWait:function(){},closeWait:function(){}};Sys.Extended.UI.HTMLEditor.EditPanel.registerClass("Sys.Extended.UI.HTMLEditor.EditPanel",Sys.UI.Control);
//END HTMLEditor.EditPanel.js
//START HTMLEditor.ExecCommandEmulation.js
Sys.Extended.UI.HTMLEditor.MSIE_list=function(r){var f="LI",h=false,a=null,m=this,k=m.get_paragraphs(),j=m.getSelectionAfterOperation(k),e=a,c=[],g=m,b=a,d=[],n=r.toUpperCase(),q=h;function i(){if(b!=a){var e;e=b.cloneNode(h);b.parentNode.insertBefore(e,b);while(b.firstChild!=d[0])e.appendChild(b.firstChild);e.firstChild==a&&e.parentNode.removeChild(e);if(b.tagName.toUpperCase()==n)for(var k=0;k<d.length;k++){var c=d[k];if(c.nodeType==1&&c.tagName&&c.tagName.toUpperCase()==f){var p=h;b.parentNode.insertBefore(c,b);if(c.style.textAlign=="")c.style.textAlign=b.style.textAlign;if(b.childNodes.length==0&&k==d.length-1){b.parentNode.removeChild(b);b=a}if(c.style.textAlign==""||c.style.textAlign.toLowerCase()=="left"&&!g.rtlState()||c.style.textAlign.toLowerCase()=="right"&&g.rtlState()){p=g.tryUnWrap(c,j);if(p)q=true}if(!p){for(var l=g._doc.createElement(g.dfltBlockElement),o=c.attributes,m=0;m<o.length;++m){var i=o.item(m);if(!i.specified)continue;if(i.name.toLowerCase()=="style")continue;l.setAttribute(i.name,i.value)}l.style.cssText=c.style.cssText;if(l.tagName.toUpperCase()=="P")l.style.margin="0px";while(c.firstChild)l.appendChild(c.firstChild);c.parentNode.insertBefore(l,c);c.parentNode.removeChild(c)}}else b.parentNode.insertBefore(c,b)}else{for(var e=g._doc.createElement(n),o=b.attributes,m=0;m<o.length;++m){var i=o.item(m);if(!i.specified)continue;if(i.name.toLowerCase()=="style")continue;e.setAttribute(i.name,i.value)}e.style.cssText=b.style.cssText;b.parentNode.insertBefore(e,b);for(var k=0;k<d.length;k++){var c=d[k];e.appendChild(c)}}if(b!=a){e=b.cloneNode(h);b.parentNode.insertBefore(e,b);while(b.firstChild)e.appendChild(b.firstChild);e.firstChild==a&&e.parentNode.removeChild(e);b.parentNode.removeChild(b)}}b=a;d=[]}function p(){var t="BR",E=e.firstChild,F=e.lastChild,q=e.tagName.toUpperCase();if(!Sys.Extended.UI.HTMLEditor.isInlineElement(e)&&c[0][0]==E&&c[c.length-1][c[c.length-1].length-1]==F&&(q=="OL"||q=="UL"||q=="DL"||q==f||(q=="P"||q=="DIV"||Sys.Extended.UI.HTMLEditor.isHeader(e))&&q==f)){i();d=[];if(q==f){b=e.parentNode;d.push(e)}else if(q=="P"||q=="DIV"||Sys.Extended.UI.HTMLEditor.isHeader(e)){b=e.parentNode.parentNode;d.push(e.parentNode)}else{b=e;for(var s=0;s<c.length;s++)for(var r=c[s],m=0;m<r.length;m++)d.push(r[m])}i()}else if(q==f&&c.length<k.length){if(b!=e.parentNode){i();b=e.parentNode;d=[]}d.push(e)}else if(q=="OL"||q=="UL"||q=="DL"){i();b=e;d=[];for(var s=0;s<c.length;s++)for(var r=c[s],m=0;m<r.length;m++)d.push(r[m]);i()}else{var l=a,o=a;function v(){if(l!=a)if(l.childNodes==1&&(l.firstChild==j[0]||l.firstChild==j[1])){l.parentNode.insertBefore(l.firstChild,l);l.parentNode.removeChild(l)}l=a}b!=a&&i();var y="";if(c.length==1&&c[0].length==1&&c[0][0].nodeType==1&&c[0][0].tagName)y=c[0][0].tagName.toUpperCase();if(y=="OL"||y=="UL"||y=="DL"){var p=c[0][0];b=p;d=[];for(var s=0;s<p.childNodes.length;s++){var H=p.childNodes.item(s);d.push(H)}i()}else for(var s=0;s<c.length;s++){for(var r=c[s],m=0;m<r.length;m++){var p=r[m],z=p.tagName?p.tagName.toUpperCase():"";if(o==a){o=g._doc.createElement(n);p.parentNode.insertBefore(o,p)}if(!Sys.Extended.UI.HTMLEditor.isInlineElement(p)&&z!=t){l&&l.firstChild&&v();if(l==a){l=g._doc.createElement(f);o.appendChild(l)}l.appendChild(p);v()}else{if(l==a){l=g._doc.createElement(f);o.appendChild(l)}var C=r[r.length-1]==j[1]?r.length-1:r.length,D=r[0]==j[0]?1:0;if(z==t&&m==C-1&&m==D)if(Sys.Extended.UI.HTMLEditor.isIE){l.appendChild(g._doc.createTextNode(String.fromCharCode(160)));p.parentNode.removeChild(p)}else l.appendChild(p);else if(z==t&&m==C-1&&m>D)p.parentNode.removeChild(p);else l.appendChild(p);if(z==t&&m==r.length-1){v();l=a}if(p==j[1]&&m==r.length-1){v();l=a}}}l&&l.firstChild&&v()}if(o!=a){for(var u=[],m=0;m<o.childNodes.length;m++)u.push(o.childNodes.item(m).style.textAlign);for(var w=1;w<u.length;w++)if(u[w-1]!=u[w])break;if(w==u.length){for(var G=u[0]=="left"&&!g.rtlState()||u[0]=="right"&&g.rtlState()?"":u[0],m=0;m<o.childNodes.length;m++)o.childNodes.item(m).style.textAlign="";o.style.textAlign=G}}if(o!=a)if(o.parentNode.tagName.toUpperCase()=="P"&&o.parentNode.childNodes.length==1){var x=o.parentNode,A=x.cloneNode(h);x.parentNode.insertBefore(o,x);x.parentNode.removeChild(x);if(o.childNodes.length==1){var B=o.firstChild;while(B.firstChild)A.appendChild(B.firstChild);B.appendChild(A)}else delete A}}}for(var o=0;o<k.length;o++){var l=k[o];if(l.length>0){if(l[0].parentNode!=e){c.length>0&&p();c=[];e=l[0].parentNode}c.push(l)}}c.length>0&&p();b!=a&&i();m.setSelectionAfterOperation(j,q)};Sys.Extended.UI.HTMLEditor.MSIE_justify=function(e,u,p){var a="",k=false,g=true,c=null,o=this,r=o.get_paragraphs(),h=o.getSelectionAfterOperation(r),b=c,f=[],j=o,d=typeof u!="undefined"&&u?g:k,i=typeof p=="string"?g:k,l=typeof p=="string"?p:a,m=k;function q(a){if(a!=c)if(a.childNodes==1&&(a.firstChild==h[0]||a.firstChild==h[1])){a.parentNode.insertBefore(a.firstChild,a);a.parentNode.removeChild(a)}}function t(){var H="TABLE",u="0px",D="LI",C="remain",s="left",o="P",z="DIV",y="align",U=b.firstChild,V=b.lastChild,T=k,x;if(b.tagName&&!Sys.Extended.UI.HTMLEditor.isInlineElement(b)&&f[0][0]==U&&f[f.length-1][f[f.length-1].length-1]==V){x=b.tagName.toUpperCase();if(x!="TD"&&x!="TH"&&x!="FIELDSET"&&x!="LEGEND")T=g}if(T){var L=a;if(b.getAttribute(y)&&b.getAttribute(y).length>0)L=b.getAttribute(y);if(b.align&&b.align.length>0)L=b.align;if(b.style.textAlign&&b.style.textAlign.length>0)L=b.style.textAlign;b.align=a;b.setAttribute(y,a);b.removeAttribute(y);if((x==z||x==o||Sys.Extended.UI.HTMLEditor.isHeader(b))&&e==s&&d){if(j.tryUnWrap(b,h,d))m=g}else{if(e!=C)if(!(e==s&&d)||x==D&&b.parentNode.style.textAlign.length>0)b.style.textAlign=e;else b.style.textAlign=a;if(d)b.style.margin=x==o?u:a;if(x==D){for(var t=b.parentNode,w=[],F=0;F<t.childNodes.length;F++)t.childNodes.item(F).nodeType==1&&w.push(t.childNodes.item(F).style.textAlign);for(var A=1;A<w.length;A++)if(w[A-1]!=w[A])break;if(A==w.length){for(var L=w[0]==s&&d?a:w[0],r=0;r<t.childNodes.length;r++)if(t.childNodes.item(r).nodeType==1){t.childNodes.item(r).style.textAlign=a;if(d)t.childNodes.item(r).style.margin=t.childNodes.item(r).tagName.toUpperCase()==o?u:a}t.style.textAlign=L}}if((x==z||x==o||Sys.Extended.UI.HTMLEditor.isHeader(b))&&i&&l.toUpperCase()!=x){for(var E=j._doc.createElement(l),M=b.attributes,K=0;K<M.length;++K){var G=M.item(K);if(!G.specified)continue;if(G.name.toLowerCase()=="style")continue;E.setAttribute(G.name,G.value)}E.style.cssText=b.style.cssText;while(b.firstChild)E.appendChild(b.firstChild);b.parentNode.insertBefore(E,b);b.parentNode.removeChild(b)}}}else for(var v=c,Q=0;Q<f.length;Q++){if(!i)v=c;for(var B=f[Q],r=0;r<B.length;r++){var n=B[r],p=n.nodeType==1&&n.tagName?n.tagName.toUpperCase():c;if(p!=c&&(p=="UL"||p=="OL"||p=="DL"||p==z||Sys.Extended.UI.HTMLEditor.isHeader(n)||p==o||p==D||p==H)){q(v);v=c;if(e!=C)if(p!=H&&!d)n.style.textAlign=e;if(d)n.style.margin=p==o?u:a;if(p=="UL"||p=="OL"||p=="DL"){for(var O=0;O<n.childNodes.length;O++){var J=n.childNodes.item(O);if(J.nodeType==1){J.style.textAlign=a;if(d)J.style.margin=J.tagName.toUpperCase()==o?u:a;for(var P=0;P<J.childNodes.length;P++){var I=J.childNodes.item(P);if(I.nodeType==1&&I.tagName){var N=I.tagName.toUpperCase();if(d)I.style.margin=N==o?u:a;if(N==z||N==o||Sys.Extended.UI.HTMLEditor.isHeader(I))if(j.tryUnWrap(I,h,d))m=g}}}}if(e==s&&d)n.style.textAlign=a;continue}else if(p==D){if(e!=C)if(!(e==s&&d)||n.parentNode.style.textAlign.length>0)n.style.textAlign=e;else n.style.textAlign=a;if(d)n.style.margin=p==o?u:a;for(var t=n.parentNode,w=[],F=0;F<t.childNodes.length;F++)t.childNodes.item(F).nodeType==1&&w.push(t.childNodes.item(F).style.textAlign);for(var A=1;A<w.length;A++)if(w[A-1]!=w[A])break;if(A==w.length){for(var L=w[0]==s&&d?a:w[0],r=0;r<t.childNodes.length;r++)if(t.childNodes.item(r).nodeType==1){t.childNodes.item(r).style.textAlign=a;if(d)t.childNodes.item(r).style.margin=t.childNodes.item(r).tagName.toUpperCase()==o?u:a}t.style.textAlign=L}continue}else if(p==H)if(e!=C)if(!(e==s&&d))n.align=e;else{n.align=a;n.removeAttribute(y)}if((p==z||p==o||Sys.Extended.UI.HTMLEditor.isHeader(n))&&e==s&&d)if(j.tryUnWrap(n,h,d))m=g;if((p==z||p==o||Sys.Extended.UI.HTMLEditor.isHeader(n))&&i&&l.toUpperCase()!=p){for(var E=j._doc.createElement(l),M=n.attributes,K=0;K<M.length;++K){var G=M.item(K);if(!G.specified)continue;if(G.name.toLowerCase()=="style")continue;E.setAttribute(G.name,G.value)}E.style.cssText=n.style.cssText;while(n.firstChild)E.appendChild(n.firstChild);n.parentNode.insertBefore(E,n);n.parentNode.removeChild(n)}}else if(!(e==s&&d)||i){if(v==c){v=j._doc.createElement(i?l:j.dfltBlockElement);if(j.dfltBlockElement.toUpperCase()==o&&!i)v.style.margin=u;if(!i)v.style.textAlign=e;n.parentNode.insertBefore(v,n)}var R=B[B.length-1]==h[1]?B.length-1:B.length,S=B[0]==h[0]?1:0;if(p=="BR"&&r==R-1&&r==S)if(Sys.Extended.UI.HTMLEditor.isIE){v.appendChild(j._doc.createTextNode(String.fromCharCode(160)));n.parentNode.removeChild(n)}else v.appendChild(n);else if(p=="BR"&&r==R-1&&r>S&&(!i||n.nextSibling!=c&&n.nextSibling==h[1]))n.parentNode.removeChild(n);else v.appendChild(n);if(p=="BR"&&r==B.length-1&&!i){q(v);v=c}if(n==h[1]&&r==B.length-1){q(v);v=c}}}}}for(var s=0;s<r.length;s++){var n=r[s];if(n.length>0){if(n[0].parentNode!=b){f.length>0&&t();f=[];b=n[0].parentNode}f.push(n)}}f.length>0&&t();o.setSelectionAfterOperation(h,m)};Sys.Extended.UI.HTMLEditor.MSIE_indent=function(s){var h="px",a="",e="P",c=null,m=this,p=m.get_paragraphs(),i=m.getSelectionAfterOperation(p),b=c,f=[],d=m,k=false;function j(a){if(a.nodeType==1){var b=!d.rtlState()?a.style.marginLeft:a.style.marginRight;if(b.length>0)return parseInt(b)}return 0}function g(c,b){if(c.nodeType==1){if(c.tagName.toUpperCase()==e&&b==a)b="0px";if(!d.rtlState())c.style.marginLeft=b;else c.style.marginRight=b}}function n(b){if(s)g(b,j(b)+40+h);else if(b.tagName.toUpperCase()==e)if(j(b)>=40)g(b,j(b)-40+h);else g(b,"0px");else if(j(b)>40)g(b,j(b)-40+h);else g(b,a)}function o(a){if(a!=c)if(a.childNodes==1&&(a.firstChild==i[0]||a.firstChild==i[1])){a.parentNode.insertBefore(a.firstChild,a);a.parentNode.removeChild(a)}}function r(){var z="LI",y="DIV",B="right",A="left",u="align",N=b.firstChild,O=b.lastChild;if(b.tagName&&!Sys.Extended.UI.HTMLEditor.isInlineElement(b)&&f[0][0]==N&&f[f.length-1][f[f.length-1].length-1]==O){var m=a;if(b.getAttribute(u)&&b.getAttribute(u).length>0)m=b.getAttribute(u);if(b.align&&b.align.length>0)m=b.align;if(b.style.textAlign&&b.style.textAlign.length>0)m=b.style.textAlign;if(m.toLowerCase()==A&&!d.rtlState()||m.toLowerCase()==B&&d.rtlState())m=a;b.align=a;b.setAttribute(u,a);b.removeAttribute(u);n(b);var E=b.tagName.toUpperCase();if((E==y||E==e||Sys.Extended.UI.HTMLEditor.isHeader(b))&&m==a){if(d.tryUnWrap(b,i))k=true}else{if(m!=a||E==z&&b.parentNode.style.textAlign.length>0)b.style.textAlign=m;else b.style.textAlign=a;if(E==z){for(var v=b.parentNode,r=[],D=0;D<v.childNodes.length;D++)r.push(j(v.childNodes.item(D)));for(var w=1;w<r.length;w++)if(r[w-1]!=r[w])break;if(w==r.length){for(var M=r[0]==0?a:r[0]+h,q=0;q<v.childNodes.length;q++)g(v.childNodes.item(q),a);g(v,M)}}}}else for(var I=0;I<f.length;I++)for(var t=c,x=f[I],q=0;q<x.length;q++){var l=x[q],p=l.nodeType==1&&l.tagName?l.tagName.toUpperCase():c;if(p!=c&&(p=="UL"||p=="OL"||p=="DL"||p==y||Sys.Extended.UI.HTMLEditor.isHeader(l)||p==e||p==z)){o(t);t=c;n(l);if(p=="UL"||p=="OL"||p=="DL"){for(var G=0;G<l.childNodes.length;G++){var F=l.childNodes.item(G);if(F.nodeType==1){g(F,a);for(var H=0;H<F.childNodes.length;H++){var C=F.childNodes.item(H),m=C.nodeType==1?l.style.textAlign:a;if(m.toLowerCase()==A&&!d.rtlState()||m.toLowerCase()==B&&d.rtlState())m=a;if(C.nodeType==1){g(C,a);if(m==a&&C.tagName){var K=C.tagName.toUpperCase();if(K==y||K==e)if(d.tryUnWrap(C,i))k=true}}}}}continue}else if(p==z){for(var v=l.parentNode,r=[],D=0;D<v.childNodes.length;D++)r.push(j(v.childNodes.item(D)));for(var w=1;w<r.length;w++)if(r[w-1]!=r[w])break;if(w==r.length){for(var M=r[0]==0?a:r[0]+h,q=0;q<v.childNodes.length;q++)g(v.childNodes.item(q),a);g(v,M)}continue}var m=l.style.textAlign;if(m.toLowerCase()==A&&!d.rtlState()||m.toLowerCase()==B&&d.rtlState())m=a;if((p==y||p==e||Sys.Extended.UI.HTMLEditor.isHeader(l))&&m==a)if(d.tryUnWrap(l,i))k=true}else if(s){if(t==c){t=d._doc.createElement(d.dfltBlockElement);if(d.dfltBlockElement.toUpperCase()==e)t.style.margin="0px";n(t);l.parentNode.insertBefore(t,l)}var J=x[x.length-1]==i[1]?x.length-1:x.length,L=x[0]==i[0]?1:0;if(p=="BR"&&q==J-1&&q==L)if(Sys.Extended.UI.HTMLEditor.isIE){t.appendChild(d._doc.createTextNode(String.fromCharCode(160)));l.parentNode.removeChild(l)}else t.appendChild(l);else if(p=="BR"&&q==J-1&&q>L)l.parentNode.removeChild(l);else t.appendChild(l);if(p=="BR"&&q==x.length-1){o(t);t=c}if(l==i[1]&&q==x.length-1){o(t);t=c}}}}for(var q=0;q<p.length;q++){var l=p[q];if(l.length>0){if(l[0].parentNode!=b){f.length>0&&r();f=[];b=l[0].parentNode}f.push(l)}}f.length>0&&r();m.setSelectionAfterOperation(i,k)};Sys.Extended.UI.HTMLEditor.getSelectionAfterOperation=function(a){if(a.length==0)return[];var e=this._doc.createElement("SPAN"),d=this._doc.createElement("SPAN"),f=a[0][0],b=a[a.length-1][a[a.length-1].length-1];if(f==b&&b.nodeType==1&&b.childNodes.length==0&&Sys.Extended.UI.HTMLEditor.canHaveChildren(b)){b.appendChild(e);b.appendChild(d)}else{var g=Sys.Extended.UI.HTMLEditor._getReallyFirst(f);g.parentNode.insertBefore(e,g);if(g==f){var h=[];h.push(e);for(var i=0;i<a[0].length;i++)h.push(a[0][i]);a[0]=h}var c=Sys.Extended.UI.HTMLEditor._getReallyLast(b);if(c.nextSibling)c.parentNode.insertBefore(d,c.nextSibling);else c.parentNode.appendChild(d);c==b&&a[a.length-1].push(d)}return[e,d]};Sys.Extended.UI.HTMLEditor.setSelectionAfterOperation=function(m,p){var a=null,c=this;if(m.length==0)return;var d=m[0],b=m[1],g=c._getSelection(),f=a,j=a;if(Sys.Extended.UI.HTMLEditor.isIE){g.empty();g=c._getSelection();var h=c._createRange(g),l=c._createRange(g);try{if(d!=a&&b!=a&&d.nextSibling==b){f=c._doc.createTextNode(" ");b.parentNode.insertBefore(f,b)}c._TcurrentFormat=a;d!=a&&h.moveToElementText(d);b!=a&&l.moveToElementText(b);if(d!=a&&b!=a){h.setEndPoint("EndToStart",l);h.select();if(f!=a){h.collapse(false);h.select();f.parentNode.removeChild(f)}}else if(d!=a)h.select();else b!=a&&l.select()}catch(r){}}else try{var e,i=d.nextSibling,q=b.previousSibling;c._TcurrentFormat=a;if(i==q&&i.nodeType==1&&i.tagName.toUpperCase()=="BR"){var o=Sys.Extended.UI.HTMLEditor.__getIndex(i);e=c._doc.createRange();e.setStart(i.parentNode,o);e.setEnd(i.parentNode,o)}else{f=c._doc.createTextNode("");j=c._doc.createTextNode("");d.parentNode.insertBefore(f,d);b.parentNode.insertBefore(j,b);e=c._doc.createRange();e.setStart(f,0);e.setEnd(j,0)}c._removeAllRanges(g);c._selectRange(g,e)}catch(r){}var n=Sys.Extended.UI.HTMLEditor._commonTotalParent(d==a?b:d,b==a?d:b),k=a;if(n!=a)k=n.parent;d!=a&&d.parentNode.removeChild(d);b!=a&&b.parentNode.removeChild(b);if(p&&k!=a){Sys.Extended.UI.HTMLEditor.spanJoiner(k,c._doc);if(!Sys.Extended.UI.HTMLEditor.isIE&&f!=a&&j!=a){var e=c._doc.createRange();e.setStart(f,0);e.setEnd(j,0);c._removeAllRanges(g);c._selectRange(g,e)}}};Sys.Extended.UI.HTMLEditor.get_paragraphs=function(){var a=this;a._TcurrentFormat=null;var b=a.getPseudoP();if(b.length==0)try{var e="<span id='"+Sys.Extended.UI.HTMLEditor.smartClassName+"_ll'></span><span id='"+Sys.Extended.UI.HTMLEditor.smartClassName+"_rr'></span><br>";a.insertHTML(e);var c=a._doc.getElementById(Sys.Extended.UI.HTMLEditor.smartClassName+"_ll"),d=a._doc.getElementById(Sys.Extended.UI.HTMLEditor.smartClassName+"_rr"),f=a._TcurrentFormat;a._TcurrentFormat=null;a.setSelectionAfterOperation([c,d],false);a._TcurrentFormat=f;b=a.getPseudoP()}catch(g){}return b};Sys.Extended.UI.HTMLEditor.getPseudoP=function(){var y="<span id='",n="SPAN",c=null,d=this,s=[];try{var l=d._getSelection(),j=d._createRange(l),q=Sys.Extended.UI.HTMLEditor.smartClassName+"_right",v=Sys.Extended.UI.HTMLEditor.smartClassName+"_left",h=c,g=c;if(Sys.Extended.UI.HTMLEditor.isIE){if(l.type.toLowerCase()!="control"){h=j.duplicate();g=j.duplicate();h.setEndPoint("EndToStart",j);g.setEndPoint("StartToEnd",j)}}else{h=j.cloneRange();g=j.cloneRange();h.setEnd(h.startContainer,h.startOffset);g.setStart(g.endContainer,g.endOffset)}var a=c,b=c;if(Sys.Extended.UI.HTMLEditor.isIE&&l.type.toLowerCase()=="control"){var o=j.item(0),i;i=d._doc.createElement(n);i.id=v;o.parentNode.insertBefore(i,o);i=d._doc.createElement(n);i.id=q;if(o.nextSibling==c)o.parentNode.appendChild(i);else o.parentNode.insertBefore(i,o.nextSibling)}else{if(!d.insertHTML(y+q+"'/>",g))return[];if(!d.insertHTML(y+v+"'/>",h)){var x=d._doc.getElementById(q);if(x!=c){p=x.parentNode;p.removeChild(x)}return[]}}a=d._doc.getElementById(v);b=d._doc.getElementById(q);if(a!=c&&b!=c)while(a.nextSibling==c)if(a.parentNode.nextSibling)a.parentNode.parentNode.insertBefore(a,a.parentNode.nextSibling);else a.parentNode.parentNode.appendChild(a);if(a!=c&&b!=c){while(b.previousSibling==c)b.parentNode.parentNode.insertBefore(b,b.parentNode);if(b.previousSibling.nodeType==1){var A=b.previousSibling.tagName.toUpperCase();if(A!="BR"&&A!="IMG"){var t=Sys.Extended.UI.HTMLEditor._getReallyLast(b.previousSibling);if(t.nodeType==1&&Sys.Extended.UI.HTMLEditor.canHaveChildren(t))t.appendChild(b);else t.parentNode.appendChild(b)}}b.previousSibling&&b.previousSibling.nodeType==1&&b.previousSibling.tagName.toUpperCase()=="BR"&&b.parentNode.insertBefore(b,b.previousSibling)}if(a==c){var f=d._doc.createElement(n);f.id=v;b.parentNode.insertBefore(f,b);a=f}if(b==c){var f=d._doc.createElement(n);f.id=q;if(a.nextSibling)a.parentNode.insertBefore(f,a.nextSibling);else a.parentNode.appendChild(f);b=f}if(a!=c&&b!=c)if(a.parentNode==b)b.parentNode.insertBefore(a,b);else if(b.parentNode==a)if(a.nextSibling!=c)a.parentNode.insertBefore(b,a.nextSibling);else a.parentNode.appendChild(b);while(a.nextSibling!=c&&a.nextSibling.nodeType==3&&(""+a.nextSibling.data+"").length==0)a.parentNode.removeChild(a.nextSibling);if(d._TcurrentFormat==c&&a!=c&&b!=c&&a.nextSibling==b){var k=b.parentNode;d._TcurrentFormat=c;while(k&&k.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(k.tagName)){if(k.tagName.toUpperCase()!="A"){var p=k.cloneNode(false);if(d._TcurrentFormat==c)d._TcurrentFormat=p;else{p.appendChild(d._TcurrentFormat);d._TcurrentFormat=p}}k=k.parentNode}if(d._TcurrentFormat){var C=d._doc.createElement("span");C.appendChild(d._TcurrentFormat);d._TcurrentFormat=C.innerHTML}}var e=a;while(e&&e.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(e.tagName)&&e.tagName.toUpperCase()!="A")e=e.parentNode;if(e!=c&&e.tagName.toUpperCase()=="P")if(e.firstChild!=c)e.insertBefore(a,e.firstChild);else e.appendChild(a);else Sys.Extended.UI.HTMLEditor.positionInParagraph(a,a.previousSibling,true,a.parentNode);e=b;while(e&&e.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(e.tagName)&&e.tagName.toUpperCase()!="A")e=e.parentNode;if(e!=c&&e.tagName.toUpperCase()=="P")e.appendChild(b);else Sys.Extended.UI.HTMLEditor.positionInParagraph(b,b.nextSibling,false,b.parentNode);s=d.getPseudoP_Recur(a,b,0);var z=a.parentNode.tagName.toUpperCase();if(s.length==0&&a.previousSibling==c&&b.nextSibling==c&&a.nextSibling==b&&(z=="P"||llpTagName=="DIV"||z=="LI"))s=[[a.parentNode]];if(Sys.Extended.UI.HTMLEditor.isIE){l.empty();l=d._getSelection();var r=d._createRange(l),w=d._createRange(l);try{a!=c&&r.moveToElementText(a);b!=c&&w.moveToElementText(b);if(a!=c&&b!=c){r.setEndPoint("EndToEnd",w);r.select()}else if(a!=c)r.select();else b!=c&&w.select()}catch(E){}}a!=c&&a.parentNode.removeChild(a);b!=c&&b.parentNode.removeChild(b)}catch(E){for(var B=d._doc.getElementsByTagName(n),u=[],m=0;m<B.length;m++){var f=B[m];if(f.id&&f.id.length>0){var D=new RegExp(Sys.Extended.UI.HTMLEditor.smartClassName,"ig");D.test(f.id)&&u.push(f)}}for(var m=0;m<u.length;m++)u[m].parentNode.removeChild(u[m])}return s};Sys.Extended.UI.HTMLEditor.getPseudoP_Recur=function(u,p,t){var A="span",K="_left_",J="_right_",I="TABLE",z=true,k=null,r=this,n=[],b=u,h=p.nextSibling!=k&&p.nextSibling.tagName&&p.nextSibling.tagName.toUpperCase()=="BR"?p.nextSibling:p,j=k;if(b==k||h==k){if(b!=k)j=Sys.Extended.UI.HTMLEditor._commonTotalParent(b,b);if(h!=k)j=Sys.Extended.UI.HTMLEditor._commonTotalParent(h,h)}else j=Sys.Extended.UI.HTMLEditor._commonTotalParent(b,h);if(j!=k){b=Sys.Extended.UI.HTMLEditor.getContainer(j.parent.childNodes.item(j.indexFirst),b);h=Sys.Extended.UI.HTMLEditor.getContainer(j.parent.childNodes.item(j.indexLast),h);Sys.Extended.UI.HTMLEditor.unStyle(b);Sys.Extended.UI.HTMLEditor.unStyle(h);while(b.parentNode!=j.parent)b=b.parentNode;while(h.parentNode!=j.parent)h=h.parentNode;Sys.Extended.UI.HTMLEditor._moveTagsUp(b.nextSibling,h);j=k;if(u==k||p==k){if(u!=k)j=Sys.Extended.UI.HTMLEditor._commonTotalParent(u,u);if(p!=k)j=Sys.Extended.UI.HTMLEditor._commonTotalParent(p,p)}else j=Sys.Extended.UI.HTMLEditor._commonTotalParent(u,p);j!=k&&Sys.Extended.UI.HTMLEditor.spanJoiner(j.parent,r._doc,j.indexFirst,j.indexLast+1,z);function V(a){if(!Sys.Extended.UI.HTMLEditor.isInlineElement(a))return z;else if(a.tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)&&a.tagName.toUpperCase()!="A"&&!Sys.Extended.UI.HTMLEditor.isTempElement(a)){var b=a.firstChild;while(b!=k){nnnNext=b.nextSibling;var c=V(b);if(c)return z;b=nnnNext}}return false}var d=0,c=[],f=0;if(b.tagName&&h.tagName){var x=b.tagName.toUpperCase(),F=h.tagName.toUpperCase();if((x=="TD"||x=="TR")&&(F=="TD"||F=="TR")){while(b.tagName.toUpperCase()!=I)b=b.parentNode;h=b}else if((x=="DD"||x=="DT")&&(F=="DD"||F=="DT")){while(b.tagName&&b.tagName.toUpperCase()!="DL")b=b.parentNode;h=b}else if(x=="LI"&&F=="LI"){while(x!="UL"&&x!="OL"){b=b.parentNode;x=b.tagName?b.tagName.toUpperCase():k}h=b}}var l=u?u:p,m=p?p:u,a=b;while(z){if(!Sys.Extended.UI.HTMLEditor.isTempElement(a)){var Z=V(a);if(!Z){if(a.nodeType&&a.nodeType==3){var X=""+a.data+"";if(X.length==0||/^[\n\r]+$/.test(X)){var Y=a.nextSibling;a.parentNode.removeChild(a);if(a==h)break;a=Y;continue}}c[f]=a;f++}else if(a.tagName&&a.tagName.toUpperCase()=="BR"){c[f]=a;n[d]=c;d++;c=[];f=0}else if((a==h||a==b)&&!(a==h&&a==b?Sys.Extended.UI.HTMLEditor._reallyFirst(a,l)&&Sys.Extended.UI.HTMLEditor._reallyLast(a,m):Sys.Extended.UI.HTMLEditor._reallyFirst(a,l)||Sys.Extended.UI.HTMLEditor._reallyLast(a,m))){var G=a.tagName?a.tagName.toUpperCase():k;if(G==I||G=="TBODY"){var s=a;while(s.tagName.toUpperCase()!=I)s=s.parentNode;for(var R=0,L=0,S=s.rows.item(s.rows.length-1).cells.length-1,M=s.rows.length-1,i=0;i<s.rows.length;i++)for(var W=s.rows.item(i),y=0;y<W.cells.length;y++){var q=W.cells.item(y);if(Sys.Extended.UI.HTMLEditor._lookChild(q,l)>=0){R=y;L=i}if(Sys.Extended.UI.HTMLEditor._lookChild(q,m)>=0){S=y;M=i}}for(var i=L;i<=M;i++)for(var y=i==L?R:0;y<=(i==M?S:s.rows.item(i).cells.length-1);y++){var q=s.rows.item(i).cells.item(y);if(f>0){n[d]=c;d++;c=[];f=0}var B=Sys.Extended.UI.HTMLEditor._lookChild(q,l)>=0,C=Sys.Extended.UI.HTMLEditor._lookChild(q,m)>=0;if(B||C){var e=l,g=m,Q=Sys.Extended.UI.HTMLEditor.smartClassName+J+t,P=Sys.Extended.UI.HTMLEditor.smartClassName+K+t;if(B){g=r._doc.createElement(A);g.id=Q;q.appendChild(g)}if(C){e=r._doc.createElement(A);e.id=P;if(q.firstChild)q.insertBefore(e,q.firstChild);else q.appendChild(e)}for(var D=r.getPseudoP_Recur(e,g,t+1),v=0;v<D.length;v++){n[d]=D[v];d++}e!=l&&e.parentNode.removeChild(e);g!=m&&g.parentNode.removeChild(g)}else{for(var N=0,O=q.childNodes.length,w=N;w<O;w++){var E=q.childNodes.item(w);if(!Sys.Extended.UI.HTMLEditor.isTempElement(E)){c[f]=E;f++}}if(c.length>0){n[d]=c;d++;c=[];f=0}}}}else if(G=="UL"||G=="OL"||G=="DL"){for(var H=a,T=0,U=H.childNodes.length-1,i=0;i<H.childNodes.length;i++){var o=H.childNodes.item(i);if(o.nodeType==1){if(o==l||Sys.Extended.UI.HTMLEditor._lookChild(o,l)>=0)T=i;if(o==m||Sys.Extended.UI.HTMLEditor._lookChild(o,m)>=0)U=i}}for(var i=T;i<=U;i++){var o=H.childNodes.item(i);if(f>0){n[d]=c;d++;c=[];f=0}var B=Sys.Extended.UI.HTMLEditor._lookChild(o,l)>=0,C=Sys.Extended.UI.HTMLEditor._lookChild(o,m)>=0;if(B||C){var e=l,g=m,Q=Sys.Extended.UI.HTMLEditor.smartClassName+J+t,P=Sys.Extended.UI.HTMLEditor.smartClassName+K+t;if(B){g=r._doc.createElement(A);g.id=Q;o.appendChild(g)}if(C){e=r._doc.createElement(A);e.id=P;if(o.firstChild)o.insertBefore(e,o.firstChild);else o.appendChild(e)}for(var D=r.getPseudoP_Recur(e,g,t+1),v=0;v<D.length;v++){n[d]=D[v];d++}e!=l&&e.parentNode.removeChild(e);g!=m&&g.parentNode.removeChild(g)}else{for(var N=0,O=o.childNodes.length,w=N;w<O;w++){var E=o.childNodes.item(w);if(!Sys.Extended.UI.HTMLEditor.isTempElement(E)){c[f]=E;f++}}if(c.length>0){n[d]=c;d++;c=[];f=0}}}}else{var B=Sys.Extended.UI.HTMLEditor._lookChild(a,l)>=0,C=Sys.Extended.UI.HTMLEditor._lookChild(a,m)>=0;if(f>0){n[d]=c;d++;c=[];f=0}if(B||C){var e=l,g=m,Q=Sys.Extended.UI.HTMLEditor.smartClassName+J+t,P=Sys.Extended.UI.HTMLEditor.smartClassName+K+t;if(B){g=r._doc.createElement(A);g.id=Q;a.appendChild(g)}if(C){e=r._doc.createElement(A);e.id=P;if(a.firstChild)a.insertBefore(e,a.firstChild);else a.appendChild(e)}for(var D=r.getPseudoP_Recur(e,g,t+1),v=0;v<D.length;v++){n[d]=D[v];d++}e!=l&&e.parentNode.removeChild(e);g!=m&&g.parentNode.removeChild(g)}else{for(var N=0,O=a.childNodes.length,w=N;w<O;w++){var E=a.childNodes.item(w);if(!Sys.Extended.UI.HTMLEditor.isTempElement(E)){c[f]=E;f++}}if(c.length>0){n[d]=c;d++;c=[];f=0}}}}else{if(f>0){n[d]=c;d++;c=[];f=0}c[f]=a;n[d]=c;d++;c=[];f=0}}if(a==h)break;a=a.nextSibling}if(f>0)n[d]=c}return n};Sys.Extended.UI.HTMLEditor.unWrap=function(a,f){var d="BR",e=this;if(a.firstChild){while(a.firstChild&&a.firstChild.nodeType==3&&""+a.firstChild.data+""=="")a.removeChild(a.firstChild);var b=[];while(a.firstChild){a.firstChild!=f[0]&&a.firstChild!=f[1]&&b.push(a.firstChild);a.parentNode.insertBefore(a.firstChild,a)}if(b.length==0){var g=e._doc.createElement(d);a.parentNode.insertBefore(g,a)}if(Sys.Extended.UI.HTMLEditor.isIE&&b.length==1&&b[0].nodeType==3){var h=""+b[0].data+"";if(h.length==1&&h.charCodeAt(0)==160){var g=e._doc.createElement(d);b[0].parentNode.insertBefore(g,b[0]);b[0].parentNode.removeChild(b[0])}}while(a.nextSibling&&a.nextSibling.nodeType==3&&""+a.nextSibling.data+""=="")a.parentNode.removeChild(a.nextSibling);var c=a.previousSibling&&f[1]==a.previousSibling?f[1].previousSibling:a.previousSibling;if(c&&Sys.Extended.UI.HTMLEditor.isInlineElement(c))if(c.nodeType==1&&c.childNodes.length>0)c=Sys.Extended.UI.HTMLEditor._getReallyLast(c);if(Sys.Extended.UI.HTMLEditor.isInlineElement(c)&&a.nextSibling!=null){var g=e._doc.createElement(d);a.parentNode.insertBefore(g,a)}}else{var g=e._doc.createElement(d);a.parentNode.insertBefore(g,a)}a.parentNode.removeChild(a)};Sys.Extended.UI.HTMLEditor.tryUnWrap=function(b,m,e){var g="undefined",l=this;b.style.textAlign="";for(var h=0,i=b.attributes,f=0;f<i.length;++f){var j=i.item(f);if(!j.specified)continue;if(j.name.toLowerCase()=="style")continue;h++}var k=b.style.cssText,d=0,a,c=b.tagName.toUpperCase();if(!(typeof e!=g&&e))if(c!="LI")try{a=parseInt(Sys.Extended.UI.HTMLEditor.getStyle(b,"margin-top"));if(isNaN(a))a=c=="P"?1:0;d+=a;a=parseInt(Sys.Extended.UI.HTMLEditor.getStyle(b,"margin-bottom"));if(isNaN(a))a=c=="P"?1:0;d+=a;a=parseInt(Sys.Extended.UI.HTMLEditor.getStyle(b,"margin-right"));if(isNaN(a))a=c=="P"?1:0;d+=a;a=parseInt(Sys.Extended.UI.HTMLEditor.getStyle(b,"margin-left"));if(isNaN(a))a=c=="P"?1:0;d+=a}catch(n){d=1}b.style.margin="";if(h==0&&b.style.cssText.length==0&&d==0||typeof e!=g&&e&&c!="LI"){l.unWrap(b,m);return true}else{b.style.cssText=k;return false}};Sys.Extended.UI.HTMLEditor._queryCommandValue=function(n,o){var e="font-size",l="font-family",g=null,d=this,f=d._rangeStartEnd();if(f==g)return"";try{if(n.toLowerCase()=="backcolor"){var i=f.start;while(i){var j=Sys.Extended.UI.HTMLEditor.getStyle(i,"background-color").toLowerCase();if(j.length>0&&j!="transparent")return j;i=i.parentNode}return"#FFFFFF"}var c="none";switch(n.toLowerCase()){case"forecolor":c="color";break;case"fontname":c=l;break;case"fontsize":c=e}var b;if((c==e||c==l)&&d._FontNotSet){b="";var a=f.start;while(a!=g){if(c==e){if(a.style&&a.style.fontSize&&a.style.fontSize.length>0){b=a.style.fontSize;break}else if(a.tagName&&a.tagName.toUpperCase()=="FONT"&&a.size&&a.size.length>0){b=Sys.Extended.UI.HTMLEditor.fontSizeSeek(a.size);break}}else if(a.style&&a.style.fontFamily&&a.style.fontFamily.length>0){b=a.style.fontFamily;break}else if(a.tagName&&a.tagName.toUpperCase()=="FONT"&&a.face&&a.face.length>0){b=a.face;break}if(a.className&&a.className.length>0){b=Sys.Extended.UI.HTMLEditor.getStyle(a,c).toLowerCase();if(c==e)if(!Sys.Extended.UI.HTMLEditor.isIE)b=Sys.Extended.UI.HTMLEditor._TryTransformFromPxToPt(b,d,o);break}var h=a.tagName.toUpperCase();if(h=="BODY"||h=="TD")break;a=a.parentNode}}else{b=Sys.Extended.UI.HTMLEditor.getStyle(f.start,c).toLowerCase();if(c==e)if(!Sys.Extended.UI.HTMLEditor.isIE){b=Sys.Extended.UI.HTMLEditor._TryTransformFromPxToPt(b,d,o);var a=f.start;while(a!=g){if(a.style&&a.style.fontSize&&a.style.fontSize.length>0){b=a.style.fontSize;break}if(a.className&&a.className.length>0)break;var h=a.tagName.toUpperCase();if(h=="BODY"||h=="TD")break;a=a.parentNode}}}if(d._StyleForTyping!=g&&d._StyleForTyping.length>0)for(var k=0;k<d._StyleForTyping.length;k++){var m=d._StyleForTyping[k];if(m.name==c){b=m.value;break}}return b}catch(p){return""}};
//END HTMLEditor.ExecCommandEmulation.js
//START HTMLEditor.DesignPanelEventHandler.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.DesignPanelEventHandler=function(b){var Z="'></span>",R="<span id='",ib="StyleForTyping",Q="EMBED",P="BR",D="\n",O="text",N="span",k="",M="LI",x="P",H="undefined",w="BODY",C="control",hb="function",B="keypress",e=null,j="keydown",Y="mousedown",c=false,m=true,f=this;try{var a=f;if(a._editPanel!=Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel)return m;if(Sys.Extended.UI.HTMLEditor.isIE)try{var Db=f._doc.selection,Ib=f._createRange(Db)}catch(Mb){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}(b.type==Y||b.type=="dblclick")&&f._focus(m);if(!Sys.Extended.UI.HTMLEditor.isIE&&b.type==j&&b.keyCode==Sys.UI.Key.tab&&f._editPanel.get_suppressTabInDesignMode()){Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel=e;return m}if(f.isPopup()){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}var gb=c;if(a._contextElement&&a._contextElement!=e){Function.createDelegate(f,Sys.Extended.UI.HTMLEditor.RemoveContextMenu)();if(b.type==j||b.type==B){Sys.Extended.UI.HTMLEditor._stopEvent(b);return}gb=m}if(typeof a.captureInDesign==hb)if(a.captureInDesign(b)===c){Sys.Extended.UI.HTMLEditor._stopEvent(b);return}if(Sys.Extended.UI.HTMLEditor.isIE&&b.type==Y&&b.ctrlKey){var l=a._getSelection(),zb=b.clientX,Ab=b.clientY;setTimeout(function(){var c=a._getSelection();if(c.type.toLowerCase()!=C){var d=a._doc.body.createTextRange();d.moveToPoint(zb,Ab);d.select()}c=a._getSelection();var d=a._createRange(c),b=Sys.Extended.UI.HTMLEditor.getSelParent(a);while(b!=e&&b.tagName.toUpperCase()!=w){if(b.tagName.toUpperCase()=="A"&&b.href!=e&&typeof b.href!=H&&b.href.length>0){window.open(b.href,"LinkViewWindow");break}b=b.parentNode}},0);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}var h=!Sys.Extended.UI.HTMLEditor.isIE?b.target:b.srcElement;if(h.tagName!=e&&typeof h.tagName!=H&&(h.tagName.toUpperCase()=="HTML"||h.tagName.toUpperCase()==w)){if(a.__kkoka!=m){a.__kkoka=m;setTimeout(function(){if(a._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel)if(!a.toEndOfProtected())try{a.focusEditor()}catch(b){}a.__kkoka=c},0)}}else Sys.Extended.UI.HTMLEditor.contentEditable(h)!=e&&setTimeout(function(){a._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel&&a.toEndOfProtected()},0);if(gb&&Sys.Extended.UI.HTMLEditor.isIE){var ub=f._getSelection(),Ib;try{Ib=f._createRange(ub);if(ub.type.toLowerCase()==C){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}}catch(Lb){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}}var F=Sys.Extended.UI.HTMLEditor.isIE&&b.type==j||b.type==B,Kb=b.type+"--"+F;if(F&&!f._editPanel.get_keyboardEnabled()){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}var p=String.fromCharCode(Sys.Extended.UI.HTMLEditor.isIE?b.keyCode:b.charCode).toLowerCase();if(F&&a._editPanel.get_hotkeys()!=e)if(a._editPanel.get_hotkeys().length>0){var Cb=a._editPanel.get_hotkeys().length,ob=p;if(b.keyCode==18||b.keyCode==17||b.keyCode==16)ob=e;for(var eb=0;eb<Cb;eb++){var G=a._editPanel.get_hotkeys()[eb];if(G[1]==ob&&G[2]==b.altKey&&G[3]==b.shiftKey&&G[4]==b.ctrlKey){typeof G[0]==hb&&setTimeout(function(){G[0](a);a.onContentChanged();a.focusEditor()},0);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}}}if(F&&b.shiftKey&&b.keyCode==45)f._commonPaste(b);else if(F&&b.ctrlKey&&b.altKey&&b.keyCode==Sys.UI.Key.home){var V=e,h=Sys.Extended.UI.HTMLEditor.getSelParent(a);while(h&&(h.nodeType==3||h.tagName&&h.tagName.toUpperCase()!=w)){if(h.nodeType==3||!h.tagName){h=h.parentNode;continue}var t=h.tagName.toUpperCase();if(!Sys.Extended.UI.HTMLEditor.canBeInsideP(h)&&t!=x){if(t=="TD")while(t!="TABLE"){h=h.parentNode;t=h.tagName.toUpperCase()}else if(t==M)while(t!="OL"&&t!="UL"){h=h.parentNode;t=h.tagName.toUpperCase()}V=h;break}h=h.parentNode}if(V!=e){var l=a._getSelection(),d=a._createRange(l),s=a._doc.createTextNode(k);V.parentNode.insertBefore(s,V);if(Sys.Extended.UI.HTMLEditor.isIE){var ab=a._createRange(l),lb=a._createRange(l),bb=a._doc.createElement(N),U=a._doc.createElement(N);s.parentNode.insertBefore(bb,s);if(s.nextSibling)s.parentNode.insertBefore(U,s.nextSibling);else s.parentNode.appendChild(U);try{ab.moveToElementText(bb);lb.moveToElementText(U);ab.setEndPoint("EndToEnd",lb);ab.select()}catch(Mb){}s.parentNode.removeChild(bb);s.parentNode.removeChild(U)}else{a._removeAllRanges(l);d.setStart(s,0);d.setEnd(s,0);a._selectRange(l,d)}}}else if(Sys.Extended.UI.HTMLEditor.isIE&&b.keyCode>=33&&b.keyCode<=40&&!b.shiftKey){var yb=b.keyCode==Sys.UI.Key.pageDown||b.keyCode==Sys.UI.Key.end||b.keyCode==Sys.UI.Key.right||b.keyCode==Sys.UI.Key.down;setTimeout(function(){var f=a._getSelection(),d=a._createRange(f);if(f.type.toLowerCase()==C){var b=d.item(0);if(!b.contentEditable||b.contentEditable=="false"){d.remove(0);f.empty();d=a._createRange(f);var c=a._doc.createElement("SPAN");c.appendChild(a._doc.createTextNode(k));if(yb)if(b.nextSibling==e)b.parentNode.appendChild(c);else b.parentNode.insertBefore(c,b.nextSibling);else b.parentNode.insertBefore(c,b);d.moveToElementText(c);d.select();setTimeout(function(){a.focusEditor();c.parentNode.removeChild(c)},0)}}},0)}else if((F&&!Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isSafari&&b.type==j)&&b.ctrlKey&&!b.altKey){a._a_prize=c;var l=e,d=e,p=String.fromCharCode(Sys.Extended.UI.HTMLEditor.isIE||Sys.Extended.UI.HTMLEditor.isOpera||Sys.Extended.UI.HTMLEditor.isSafari?b.keyCode:b.charCode).toLowerCase(),u=e,K=e;if((Sys.Extended.UI.HTMLEditor.isIE||Sys.Extended.UI.HTMLEditor.isSafari)&&b.keyCode==17)return c;else if(!Sys.Extended.UI.HTMLEditor.isIE&&b.keyCode==Sys.UI.Key.end&&!b.shiftKey)a._setToEnd();else if(b.keyCode==46&&f.isShadowed()){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}else if(b.keyCode==46||b.keyCode==Sys.UI.Key.backspace)(Sys.Extended.UI.HTMLEditor.isIE&&b.type==j||!Sys.Extended.UI.HTMLEditor.isIE&&b.type==B)&&f._saveContent();else switch(p){case"a":if(!Sys.Extended.UI.HTMLEditor.isIE){l=f._getSelection();f._removeAllRanges(l);d=f._createRange();d.selectNodeContents(f._doc.body);f._selectRange(l,d);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}else a._a_prize=m;break;case"z":f.undo();Sys.Extended.UI.HTMLEditor._stopEvent(b);return c;break;case"p":if(!Sys.Extended.UI.HTMLEditor.isIE){setTimeout(function(){a._contextMenuCallP()},0);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}break;case"y":f.redo();Sys.Extended.UI.HTMLEditor._stopEvent(b);return c;break;case"x":if(f.isShadowed()){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}f._saveContent();if(Sys.Extended.UI.HTMLEditor.isIE)if(b.type==j){a.openWait();setTimeout(function(){a._copyCut(p,c);a.closeWait()},0);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}break;case"c":if(f.isShadowed()){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}if(Sys.Extended.UI.HTMLEditor.isIE)if(b.type==j){a.openWait();setTimeout(function(){a._copyCut(p,c);a.closeWait();setTimeout(function(){a._ifShadow()},0)},0);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}break;case"v":if(f.isShadowed()){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}if(Sys.Extended.UI.HTMLEditor.isIE){f._saveContent();return m}f._commonPaste(b);break;case"b":f._execCommand("bold",c,K);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c;case"i":f._execCommand("italic",c,K);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c;case"u":f._execCommand("underline",c,K);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c;case"s":f._execCommand("strikethrough",c,K);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c;case"l":u="justifyleft";break;case"e":u="justifycenter";break;case"r":u="justifyright";break;case"j":u="justifyfull";break;case"q":alert(f._doc.body.innerHTML);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c;break;case"0":var Gb="Your browser:\n\n"+navigator.userAgent;alert(Gb);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c;break;case"9":if(!Sys.Extended.UI.HTMLEditor.isIE){var l=a._getSelection(),d=a._createRange(l),g=d.startContainer,A=d.endContainer,y=k;y+="startContainer: "+(g.nodeType==1?g.tagName:O)+D;y+="endContainer  : "+(A.nodeType==1?A.tagName:O)+D;if(g==A){y+="startOffset: "+d.startOffset+D;y+="endOffset  : "+d.endOffset+D;if(g.nodeType==1){g=g.childNodes.item(d.startOffset);if(g&&g.nodeType){y+="startOffset node: "+(g.nodeType==1?g.tagName:O)+D;if(d.startOffset!=d.endOffset){g=A.childNodes.item(d.endOffset);if(g&&g.nodeType)y+="endOffset node: "+(g.nodeType==1?g.tagName:O)+D}}else y+=g}}alert(y)}else{var l=a._getSelection(),d=a._createRange(l);alert("boundingLeft: "+d.boundingLeft+" boundingTop: "+d.boundingTop+D+"boundingWidth: "+d.boundingWidth+" boundingHeight: "+d.boundingHeight)}Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}if(u){f._execCommand(u,c,K);if(u=="formatblock"&&!Sys.Extended.UI.HTMLEditor.isIE){f._saveContent();f._undo(c)}Sys.Extended.UI.HTMLEditor._stopEvent(b);(u=="delete"||u=="paste")&&f._clearP()}}else if(F||(Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera)&&b.type==j){if(Sys.Extended.UI.HTMLEditor.isIE&&f._tryForward){var d=f._createRange(f._getSelection());d.select();f._tryForward=c}var p=String.fromCharCode(Sys.Extended.UI.HTMLEditor.isIE?b.keyCode:b.charCode).toLowerCase();if(a._a_prize){a._a_prize=c;function Bb(){var c=a._createRange(a._getSelection()),b=c.parentElement();if(b&&b.nodeType==1&&b.tagName.toUpperCase()==x){while(b.firstChild)b.parentNode.insertBefore(b.firstChild,b);b.parentNode.removeChild(b)}}setTimeout(Bb,0)}if(f.isShadowed()){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}switch(b.keyCode){case Sys.UI.Key.tab:if((Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera)&&b.type!=j)break;if(!f._editPanel.get_suppressTabInDesignMode()){!f.isControl()&&f.insertHTML("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");Sys.Extended.UI.HTMLEditor._stopEvent(b)}else{Sys.Extended.UI.HTMLEditor.isSafari&&Sys.Extended.UI.HTMLEditor._stopEvent(b);Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel=e;return m}break;case 46:case Sys.UI.Key.backspace:if((Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera)&&b.type!=j)break;((Sys.Extended.UI.HTMLEditor.isIE||Sys.Extended.UI.HTMLEditor.isSafari)&&b.type==j||!Sys.Extended.UI.HTMLEditor.isIE&&b.type==B)&&f._saveContent();if(!Sys.Extended.UI.HTMLEditor.isIE){var d=f._createRange(f._getSelection()),g=d.startContainer,A=d.endContainer;if(b.type==B)if(Sys.Extended.UI.HTMLEditor.contentEditable(g)!=e||Sys.Extended.UI.HTMLEditor.contentEditable(A)!=e){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}if(g==A&&g.nodeType==1&&g.tagName.toUpperCase()=="TD"&&d.startOffset==d.startOffset&&g.childNodes.item(d.startOffset)&&g.childNodes.item(d.startOffset).tagName&&g.childNodes.item(d.startOffset).tagName.toUpperCase()==P){var tb=g.childNodes.item(d.startOffset),qb=0,nb=0,z;z=tb.previousSibling;while(z){qb++;z=z.previousSibling}z=tb.nextSibling;while(z){nb++;z=z.nextSibling}if(b.keyCode==46&&nb==0||b.keyCode==Sys.UI.Key.backspace&&qb==0){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}else if(b.keyCode==46&&g.firstChild==g.lastChild&&g.firstChild.nodeType==1){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}}if(g==A&&g.nodeType==3&&d.startOffset==d.endOffset&&!Sys.Extended.UI.HTMLEditor.isOpera){var Fb=g.data+k;if(b.keyCode==46)if(d.startOffset==Fb.length&&!(g.nextSibling&&g.nextSibling.nodeType==3)){if(g.nextSibling){g.parentNode.removeChild(g.nextSibling);a.onContentChanged()}Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}if(b.keyCode==Sys.UI.Key.backspace)if(d.startOffset==0&&!(g.previousSibling&&g.previousSibling.nodeType==3)){if(g.previousSibling){g.parentNode.removeChild(g.previousSibling);a.onContentChanged()}Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}}if(b.keyCode==Sys.UI.Key.backspace&&g.nodeType==1&&g==A&&d.startOffset==d.endOffset){var v=g.childNodes.item(d.startOffset);if(v!=e&&v.nodeType==1&&v.tagName.toUpperCase()==P){v=v.previousSibling;if(v!=e&&v.nodeType!=3){v.parentNode.removeChild(v);a.onContentChanged();Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}}}setTimeout(function(){var j=a._getSelection(),b=a._createRange(j),h=b.startContainer,l=b.endContainer;if(Sys.Extended.UI.HTMLEditor.contentEditable(h)!=e||Sys.Extended.UI.HTMLEditor.contentEditable(l)!=e){a._undo(c);return}if(Sys.Extended.UI.HTMLEditor.isOpera&&h==l&&h.nodeType==3&&h.data.length==0)h.parentNode.removeChild(h);else if(h==l&&h.nodeType==1&&Sys.Extended.UI.HTMLEditor.isStyleTag(h.tagName)&&b.startOffset==b.endOffset&&h.childNodes.length==0){while(h.parentNode.nodeType==1&&Sys.Extended.UI.HTMLEditor.isStyleTag(h.parentNode.tagName)&&h.parentNode.childNodes.length==1)h=h.parentNode;var d=h.nextSibling,f=h.previousSibling,i=h.parentNode;i.removeChild(h);a.onContentChanged();if(d==e&&f==e){b.setStart(i,0);b.setEnd(i,0)}else if(d!=e&&f!=e)if(d.nodeType==3&&f.nodeType==3){var g=(k+f.data+k).length;f.appendData(d.data);i.removeChild(d);b.setStart(f,g);b.setEnd(f,g)}else if(f.nodeType==3){var g=(k+f.data+k).length;b.setStart(f,g);b.setEnd(f,g)}else if(d.nodeType==3){b.setStart(d,0);b.setEnd(d,0)}else if(d.childNodes.length>0){b.setStart(d,0);b.setEnd(d,0)}else{var g=Sys.Extended.UI.HTMLEditor.__getIndex(d);b.setStart(i,g);b.setEnd(i,g)}else if(f!=e)if(f.nodeType==3){var g=(k+f.data+k).length;b.setStart(f,g);b.setEnd(f,g)}else{var g=f.childNodes.length;if(g>0){b.setStart(f,g);b.setEnd(f,g)}else{g=Sys.Extended.UI.HTMLEditor.__getIndex(f);b.setStart(i,g);b.setEnd(i,g)}}else if(d!=e)if(d.nodeType==3){b.setStart(d,0);b.setEnd(d,0)}else{var g=d.childNodes.length;if(g>0){b.setStart(d,g);b.setEnd(d,g)}else{g=Sys.Extended.UI.HTMLEditor.__getIndex(d);b.setStart(i,g);b.setEnd(i,g)}}a._removeAllRanges(j);a._selectRange(j,b)}},0)}else{var l=a._getSelection();if(l.type.toLowerCase()==C){if(b.keyCode==8){setTimeout(function(){a._ifShadow();a.onContentChanged()},0);Sys.Extended.UI.HTMLEditor._stopEvent(b);return}var r=a._createRange(l),W=r.item(0);if(W.tagName.toUpperCase()==Q){W.src=k;W.parentNode.removeChild(W);while(r.length>0)r.remove(0);try{r.collapse(c)}catch(Mb){}Sys.Extended.UI.HTMLEditor._stopEvent(b);a._saveContent();setTimeout(function(){a._undo(c);a.onContentChanged()},0);return}}var fb=a._doc.body.getElementsByTagName(Q).length;if(fb>0){var mb=a._body.ownerDocument.createElement("div");a._body.appendChild(mb);var Jb=b.keyCode;setTimeout(function(){a._body.removeChild(mb);var b=a._doc.body.getElementsByTagName(Q);if(fb!=b.length){a._saveContent();setTimeout(function(){a._undo(c);a.onContentChanged()},0)}},0)}setTimeout(function(){a._clearP()},0)}break;case Sys.UI.Key.enter:if((Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera)&&b.type==j)break;(!Sys.Extended.UI.HTMLEditor.isIE&&b.type==B||Sys.Extended.UI.HTMLEditor.isIE&&b.type==j)&&f._saveContent();if(Sys.Extended.UI.HTMLEditor.isIE&&b.type==j){var l=a._getSelection();if(l.type.toLowerCase()==C)break;var r=a._createRange(l);if(!b.shiftKey){var i=r.parentElement();if(i.tagName.toUpperCase()=="TEXTAREA")break;while(i&&i.tagName&&i.tagName.toUpperCase()!=w&&Sys.Extended.UI.HTMLEditor.isStyleTag(i.tagName))i=i.parentNode;if(i&&i.tagName){var t=i.tagName.toUpperCase();if(t==x||t==M){if(t==M){function Hb(){r=a._createRange(a._getSelection());var b=r.parentElement();while(b&&b.tagName&&b.tagName.toUpperCase()!=w&&Sys.Extended.UI.HTMLEditor.isStyleTag(b.tagName))b=b.parentNode;if(b&&b.nodeType==1&&b.tagName.toUpperCase()==x){var d=a._doc.createElement(N),f=a._doc.createTextNode(" "),c=b;while(c.firstChild!=e&&c.firstChild.nodeType==1)c=c.firstChild;if(c.nodeType==1){c.appendChild(f);c.appendChild(d);while(b.firstChild)b.parentNode.insertBefore(b.firstChild,b)}else{b.parentNode.insertBefore(f,b);b.parentNode.insertBefore(d,b)}b.parentNode.removeChild(b);r.moveToElementText(d);r.select();d.parentNode.removeChild(d);a.onContentChanged()}}setTimeout(Hb,0)}break}}try{var db=Sys.Extended.UI.HTMLEditor.smartClassName+"_middle_add",n=e,I="<span id="+db+"></span>";function wb(){var c=a._getSelection(),b=a._createRange(c);if(n!=e){n.innerHTML="&nbsp;";b.moveToElementText(n);b.select();n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n);a.onContentChanged()}}r.pasteHTML(I);var S=c;n=a._doc.getElementById(db);if(n!=e){var E=n.nextSibling,J=n.parentNode;while(E==e&&J!=e&&Sys.Extended.UI.HTMLEditor.isStyleTag(J.tagName)){E=J.nextSibling;J=J.parentNode}if(E!=e&&!Sys.Extended.UI.HTMLEditor.isInlineElement(E)&&E.tagName!=e&&typeof E.tagName!=H){var X=E.tagName.toUpperCase();if(X!=P&&X!="UL"&&X!="OL"&&X!=x)S=m}n.parentNode.removeChild(n)}r.pasteHTML("<br/>"+(S?I:k));if(S)n=a._doc.getElementById(db);r.select();if(S){setTimeout(wb,0);Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}}catch(Lb){}}else break;Sys.Extended.UI.HTMLEditor._stopEvent(b)}else if(!b.shiftKey&&(Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera)){var i=Sys.Extended.UI.HTMLEditor.getSelParent(f);if(i.nodeType==3)i=i.parentNode;while(i&&i.tagName&&i.tagName.toUpperCase()!=w&&Sys.Extended.UI.HTMLEditor.isStyleTag(i.tagName))i=i.parentNode;if(i&&i.tagName&&(i.tagName.toUpperCase()==x||i.tagName.toUpperCase()==M))break;var I="<br />";if(Sys.Extended.UI.HTMLEditor.isOpera){var l=a._getSelection(),d=a._createRange(l);if(d.startContainer==d.endContainer)if(d.startContainer.nodeType==1){var kb=d.startContainer.childNodes.item(d.startOffset);if(kb.nodeType==1&&kb.tagName.toUpperCase()==P)I+="<br />"}else if(d.startContainer.nodeType==3&&d.startOffset==d.endOffset&&d.startContainer.data.length==d.endOffset&&!(d.startContainer.nextSibling&&d.startContainer.nextSibling.nodeType==3))I+="&nbsp;"}f.insertHTML(I);Sys.Extended.UI.HTMLEditor._stopEvent(b);if(Sys.Extended.UI.HTMLEditor.isOpera){var l=a._getSelection(),d=a._createRange(l);if(d.startContainer==d.endContainer&&d.startContainer.nodeType==3&&d.startOffset==d.endOffset&&d.startContainer.data.length==0){var rb=d.startContainer.previousSibling;d.startContainer.parentNode.removeChild(d.startContainer);a._removeAllRanges(l);d=a._createRange();d.setStart(rb,0);d.setEnd(rb,1);a._selectRange(l,d)}}a.onContentChanged()}else if(Sys.Extended.UI.HTMLEditor.isSafari){f.insertHTML("<br/>");Sys.Extended.UI.HTMLEditor._stopEvent(b);a.onContentChanged()}}}else a._a_prize=c;if(Sys.Extended.UI.HTMLEditor.isIE&&b.type==B&&!b.ctrlKey){var p=b.keyCode,sb=a._getSelection(),T=a._createRange(sb);if(T.text.length>0){var L=String.fromCharCode(p),pb=Sys.Extended.UI.HTMLEditor.capLock(b),Eb=b.shiftKey&&!pb||pb;if(!Eb)L=L.toLowerCase();var q=Sys.Extended.UI.HTMLEditor.smartClassName+ib,o=a._doc.getElementById(q);if(o!=e){L=R+q+Z+L+R+q+q+Z;o.parentNode.removeChild(o)}T.pasteHTML(L);if(o!=e){a.trickWithStyles(q);o=a._doc.getElementById(q+q);o.parentNode.removeChild(o)}Sys.Extended.UI.HTMLEditor._stopEvent(b);a.onContentChanged();return c}}if(b.type=="mouseup"||b.type==Y||b.type==j){var xb=m;if(b.type==j&&!b.ctrlKey){var p=b.keyCode;if(p>=48&&p<=90||p==32||p==13||p>=186&&p<=222||p>=96&&p<=111)if(a._StyleForTyping!=e){a.n_arr=[];for(var cb=0;cb<a._StyleForTyping.length;cb++)a.n_arr.push(a._StyleForTyping[cb]);var q=Sys.Extended.UI.HTMLEditor.smartClassName+ib,jb=m;if(!Sys.Extended.UI.HTMLEditor.isIE)a.insertHTML(R+q+Z);else{a.insertHTML(R+q+"'>&nbsp;</span>");var o=a._doc.getElementById(q);if(o&&o.nextSibling&&o.nextSibling.nodeType==3){jb=c;var sb=a._getSelection(),T=a._createRange(sb);T.moveToElementText(a._doc.getElementById(q));T.select()}else o&&o.removeChild(o.firstChild)}jb&&setTimeout(function(){a.trickWithStyles(q);a.onContentChanged()},0)}}if(xb||!Sys.Extended.UI.HTMLEditor.isIE)if(!a._updated_now){if(a._updateTimer){clearTimeout(a._updateTimer);a._updateTimer=e}a._updateTimerLimit=3;function vb(){if(a._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel)try{if(Sys.Extended.UI.HTMLEditor.isIE){try{var b=a._doc.selection}catch(d){return c}if(a._getSelection().type=="None"&&a._doc.queryCommandValue("backcolor")==0&&a._doc.queryCommandValue("forecolor")==0){a._updateTimerLimit--;if(a._updateTimerLimit>0){a._updateTimer=setTimeout(vb,100);return}}}a._updated_now=m;a._editPanel.updateToolbar();a._updated_now=c;a._updateTimer=e;!Sys.Extended.UI.HTMLEditor.isIE&&a.focusEditor()}catch(d){}}a._updateTimer=setTimeout(vb,300)}}if(!(!Sys.Extended.UI.HTMLEditor.isIE&&(b.type==j||b.type=="keyup")||Sys.Extended.UI.HTMLEditor.isIE&&(b.type==j||b.type=="keyup")&&(b.keyCode==16||b.keyCode==20)))a._StyleForTyping=e;Sys.Extended.UI.HTMLEditor.isSafari&&setTimeout(function(){a._createRange(a._getSelection())},0);!Sys.Extended.UI.HTMLEditor.isIE&&setTimeout(function(){if(a._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel){var c=a._getSelection(),b=a._createRange(c);if(b.startContainer.nodeType!=3&&b.startContainer==b.endContainer)if(b.startOffset==b.endOffset)if(b.startContainer.childNodes.item(b.startOffset))if(b.startContainer.childNodes.item(b.startOffset).nodeType==3){var d=b.startContainer.childNodes.item(b.startOffset);c.collapseToEnd();a._removeAllRanges(c);c=a._getSelection();b=a._createRange(c);b.setStart(d,0);b.setEnd(d,0);a._selectRange(c,b)}}},0);if(!Sys.Extended.UI.HTMLEditor.isIE){var l=a._getSelection(),d=a._createRange(l);a._saved_startContainer=d.startContainer;a._saved_startOffset=d.startOffset}setTimeout(function(){try{a._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel&&a._ifShadow()}catch(b){}},0);if(b.type==j)if(a._AfterOnContentChanged==e||typeof a._AfterOnContentChanged==H||!a._AfterOnContentChanged){a._AfterOnContentChanged=m;setTimeout(function(){if(a._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel){a.onContentChanged();a._AfterOnContentChanged=c}},0)}return m}catch(Lb){Sys.Extended.UI.HTMLEditor._stopEvent(b);return c}};
//END HTMLEditor.DesignPanelEventHandler.js
//START HTMLEditor.ModePanel.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.ModePanel=function(b){var a=this;Sys.Extended.UI.HTMLEditor.ModePanel.initializeBase(a,[b]);a._activated=false;a._isActivating=false;a._editPanel=null;a._cachedContent=null;a._onbeforeunload$delegate=Function.createDelegate(a,a._onbeforeunload)};Sys.Extended.UI.HTMLEditor.ModePanel.prototype={set_editPanel:function(a){this._editPanel=a},get_content:function(){var a=this;return a._activated?a._getContent():a._cachedContent!=null?a._cachedContent:""},set_content:function(b){var a=this;a._cachedContent=b;if(!a._activated&&!a._isActivating)a._activate(b);else if(!a._isActivating)a._setContent(b);else{var c=a;setTimeout(function(){c.set_content(b)},10);return false}return true},_activate:function(){this.get_element().style.display="";this._isActivating=true},_activateFinished:function(){var a=this;a._activated=true;a._isActivating=false;a._editPanel._setActive();a._editPanel.get_autofocus()&&a._focus()},_deactivate:function(){this.get_element().style.display="none";this._activated=false;this._isActivating=false},initialize:function(){Sys.Extended.UI.HTMLEditor.ModePanel.callBaseMethod(this,"initialize");Sys.Extended.UI.HTMLEditor.isIE&&$addHandlers(window,{beforeunload:this._onbeforeunload$delegate})},dispose:function(){var a=this;Sys.Extended.UI.HTMLEditor.isIE&&$common.removeHandlers(window,{beforeunload:a._onbeforeunload$delegate});if(a._activated){Sys.Extended.UI.HTMLEditor.isIE&&a._onbeforeunload();a._deactivate()}Sys.Extended.UI.HTMLEditor.ModePanel.callBaseMethod(a,"dispose")},_onbeforeunload:function(){var a=this;if(a._activated)if(!a._editPanel._contentPrepared){a._editPanel._prepareContentForPostback(a.get_content());a._editPanel._contentPrepared=true}},_getContent:function(){return this._cachedContent!=null?this._cachedContent:""},_setContent:function(){},_focus:function(){this._focused()},_focused:function(a){this._editPanel._focused(a);this._editPanel.set_autofocus(true)},_really_focused:function(){this._editPanel._really_focused();this._editPanel.set_autofocus(true)}};Sys.Extended.UI.HTMLEditor.ModePanel.registerClass("Sys.Extended.UI.HTMLEditor.ModePanel",Sys.UI.Control);
//END HTMLEditor.ModePanel.js
//START HTMLEditor.DesignPanel.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.DesignPanel=function(d){var c=false,b=null,a=this;Sys.Extended.UI.HTMLEditor.DesignPanel.initializeBase(a,[d]);a._doc=b;a._updated_now=c;a._updateTimer=b;a._popup=b;a._contextElement=b;a._a_prize=c;a.__stack=b;a._StyleForTyping=b;a.isWord=c;a.isPlainText=c;a.dfltBlockElement="P";a._FontNotSet=true;a._design_timer1=b;a._events$delegate=Function.createDelegate(a,Sys.Extended.UI.HTMLEditor.DesignPanelEventHandler);a._blur$delegate=Function.createDelegate(a,a._blur);a._focus$delegate=Function.createDelegate(a,a._focus_event)};Sys.Extended.UI.HTMLEditor.DesignPanel.prototype={initialize:function(){Sys.Extended.UI.HTMLEditor.DesignPanel.callBaseMethod(this,"initialize")},dispose:function(){Sys.Extended.UI.HTMLEditor.DesignPanel.callBaseMethod(this,"dispose")},_activate:function(b){var a=this;Sys.Extended.UI.HTMLEditor.DesignPanel.callBaseMethod(a,"_activate");a._wasFocused=false;a._initIframe(b);a._onDocumentLoaded()},_deactivate:function(){var a=this;a._deactivateCommon();if(Sys.Extended.UI.HTMLEditor.isIE){a._doc.open();a._doc.write("");a._doc.close();a.get_element().src="javascript:false;"}a._doc=null;Sys.Extended.UI.HTMLEditor.DesignPanel.callBaseMethod(a,"_deactivate")},_deactivateCommon:function(){var a=this;a._editPanel.__blured=false;for(var c=a._doc.body.getElementsByTagName("IMG"),b=0;b<c.length;b++)if(c[b].getAttribute(Sys.Extended.UI.HTMLEditor.attachedIdAttribute)&&c[b].getAttribute(Sys.Extended.UI.HTMLEditor.attachedIdAttribute).length>0)try{if(Sys.Extended.UI.HTMLEditor.isIE)$removeHandler(c[b],"dragstart",Sys.Extended.UI.HTMLEditor.stopDrag);else $removeHandler(c[b],"draggesture",Sys.Extended.UI.HTMLEditor.stopDrag)}catch(d){}Sys.Extended.UI.HTMLEditor._removeEvents(a._doc,["keydown","keypress","mousedown","mouseup","dblclick"],a._events$delegate);Sys.Extended.UI.HTMLEditor._removeEvents(a.get_element().contentWindow,["blur"],a._blur$delegate);Sys.Extended.UI.HTMLEditor._removeEvents(a.get_element().contentWindow,["focus"],a._focus$delegate)},_initIframe:function(b){var a=this;if(!Sys.Extended.UI.HTMLEditor.isIE){a._savedValue=b;a._absAndFixedParents=a._getAbsAndFixedParents()}var c=Sys.Extended.UI.HTMLEditor.Trim(a._prepareContent(b));a._doc=a.get_element().contentWindow.document;if(!Sys.Extended.UI.HTMLEditor.isIE)a._doc.designMode="on";a._doc.open();a._doc.write('<html><head><link rel="stylesheet" href="'+a._editPanel.get_documentCssPath()+'" media="all" /><link rel="stylesheet" href="'+a._editPanel.get_designPanelCssPath()+'" media="all" /></head><body>'+c+"</body></html>");a._doc.close();a._doc.id="EditorDocument";if(Sys.Extended.UI.HTMLEditor.isIE){a._doc.body.contentEditable=true;a._tryForward=true}},_blur:function(b){var a=this;a._editPanel.__blured=true;if(!Sys.Extended.UI.HTMLEditor.isIE&&a._design_timer1!=null){clearTimeout(a._design_timer1);a._design_timer1=null}!a.isPopup&&a._editPanel._validate(b,null);return true},_focus_event:function(){var a=this;a._editPanel.__blured=false;if(Sys.Extended.UI.HTMLEditor.isIE)a._really_focused();else{var b=a;Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel=a._editPanel;if(a._design_timer1==null)a._design_timer1=setTimeout(function(){b._really_focused();b._design_timer1=null},0)}return true},_getAbsAndFixedParents:function(){var a=this.get_element(),b="";while(a!=null&&a.tagName&&a.tagName.toLowerCase()!="body"){b+=a.tagName;if(a.style.position=="absolute"||a.style.position=="fixed")b+=": "+a.style.position;b+="\n";a=a.parentNode}return b},_onDocumentLoaded:function(){var a=this,b=a;if(!Sys.Extended.UI.HTMLEditor.isIE){var c=a._getAbsAndFixedParents();if(c!=a._absAndFixedParents){a._initIframe(a._savedValue);setTimeout(function(){b._onDocumentLoaded()},10);return}}try{if(!Sys.Extended.UI.HTMLEditor.isIE){a._doc.queryCommandValue("forecolor");if(Sys.Extended.UI.HTMLEditor.isSafari||Sys.Extended.UI.HTMLEditor.isOpera)if(!Sys.Extended.UI.HTMLEditor.isReallyVisible(a.get_element())){setTimeout(function(){b._onDocumentLoaded()},10);return}}var d=b._doc.body.innerHTML}catch(e){setTimeout(function(){b._onDocumentLoaded()},10);return}a._afterBodyIsFormed();setTimeout(function(){b._activateFinished();Sys.Extended.UI.HTMLEditor.isIE&&!b._editPanel.get_autofocus()&&b._getSelection().empty()},0)},_afterBodyIsFormed:function(){var b=this,d=b;Sys.Extended.UI.HTMLEditor._addEvents(b._doc,["keydown","keypress","mousedown","mouseup","dblclick"],b._events$delegate);Sys.Extended.UI.HTMLEditor._addEvents(b.get_element().contentWindow,["blur"],b._blur$delegate);Sys.Extended.UI.HTMLEditor._addEvents(b.get_element().contentWindow,["focus"],b._focus$delegate);Sys.Extended.UI.HTMLEditor.inspectForShadows(d._doc.body);var a=b._doc.body;if(a.childNodes.length==1&&a.firstChild.tagName&&a.firstChild.tagName.toUpperCase()=="DIV"&&a.firstChild.style.cssText.length>0&&a.firstChild.style.direction.length>0&&Sys.Extended.UI.HTMLEditor.getStyle(a.firstChild,"position")!="absolute"){a.style.cssText=a.firstChild.style.cssText;var c=a.firstChild;while(c.firstChild)a.insertBefore(c.firstChild,c);a.removeChild(c)}d._clearP()},_getContent:function(){var t="pseudomode",s="dummybgcolor",r="dummysrc",q="dummytag",f="$1$3",p="$1<br/>$3",b=this;if(b._popup!=null)if(typeof b._popup._forceImClose=="function"){var y=b._popup._forceImClose;y(b._popup._iframe.contentWindow)}b._clearP();var a;if(Sys.Extended.UI.HTMLEditor.isIE){Sys.Extended.UI.HTMLEditor.spanJoiner(b._doc.body,b._doc);a=Sys.Extended.UI.HTMLEditor.getHTML(b._doc.body,false,true);a=a.replace(/(<td[^>]*?>)([\s ]*?)(<\/td[^>]*?>)/ig,"$1&nbsp;$3").replace(/(<td[^>]*?>)\s*(&nbsp;)\s*(<\/td[^>]*?>)/ig,p).replace(/(<p[^>]*?>)\s*(&nbsp;)\s*(<\/p[^>]*?>)/ig,p);a=(b._doc.body.style.cssText.length>0?'<div style="'+b._doc.body.style.cssText.replace('"',"'")+'">':"")+a+(b._doc.body.style.cssText.length>0?"</div>":"");if(b._editPanel.get_noScript())a=a.replace(/(<script(?:[^>]*?)>(?:[^<]*?)<\/script(?:[^>]*?)>)/gi,"");if(/<embed/ig.test(a))a=a.replace(/(<embed(?:.*?))(\sloop=\"true\")((?:.*?)>)/ig,f).replace(/(<embed(?:.*?))(\splay=\"true\")((?:.*?)>)/ig,f).replace(/(<embed(?:.*?))(\sbgcolor=\"\")((?:.*?)>)/ig,f).replace(/(<embed(?:.*?))(\sscale=\"\")((?:.*?)>)/ig,f).replace(/(<embed(?:.*?))(\shspace=\"0\")((?:.*?)>)/ig,f).replace(/(<embed(?:.*?))(\svspace=\"0\")((?:.*?)>)/ig,f).replace(/(<embed(?:.*?))(\swmode=\"[^\"]+\")((?:.*?)>)/ig,f).replace(/(<embed(?:.*?))(pseudomode=)(\"[^\"]*\")((?:.*?)>)/ig,"$1wmode=$3$4").replace(/(<embed(?:.*?))(\swmode=\"\")((?:.*?)>)/ig,f);var x=new RegExp("(<[/]?)(teo"+Sys.Extended.UI.HTMLEditor.smartClassName+":)","ig");a=a.replace(x,"$1")}else{var h=b._doc.createElement("DIV"),v=new Sys.Extended.UI.HTMLEditor.DesignPanel.ScriptRecover;h.style.cssText=b._doc.body.style.cssText;!b._editPanel.get_noScript()&&b._doc.body.innerHTML.replace(/<script(?:[^>]*?)>(.*?)<\/script(?:[^>]*?>)/gi,function(a,b){return v.regReplScript1(a,b)});h.innerHTML=Sys.Extended.UI.HTMLEditor.Trim(b._doc.body.innerHTML);for(var u=h.getElementsByTagName("IMG"),l=[],i=0;i<u.length;i++)l.push(u[i]);for(var o=0;o<l.length;o++){var c=l[o],k;k=c.getAttribute(q);if(k&&k.length>0&&k.toLowerCase()=="embed"){var z=c.getAttribute(r),j=c.getAttribute(s),m=c.getAttribute(t),w=c.attributes,e=b._doc.createElement("EMBED");e.src=z;e.width=c.width;e.height=c.height;if(j&&j.length>0){j=Sys.Extended.UI.HTMLEditor.tryReplaceRgb(j);e.setAttribute("bgcolor",j)}m&&m.length>0&&e.setAttribute("wmode",m);for(var i=0;i<w.length;++i){var n=w.item(i);if(!n.specified)continue;var d=n.name.toLowerCase(),g=n.value;if(d==q||d==r||d==s||d=="style"||d=="wmode"||d==t||d=="src")continue;if(d=="loop"&&g=="true")continue;if(d=="play"&&g=="true")continue;if(d=="hspace"&&g=="0")continue;if(d=="vspace"&&g=="0")continue;if(d=="scale"&&g.length==0)continue;if(d=="align"&&g.length==0)continue;e.setAttribute(d,g)}if(c.style.width&&c.style.width.length>0)e.style.width=c.style.width;if(c.style.height&&c.style.height.length>0)e.style.height=c.style.height;c.parentNode.insertBefore(e,c);c.parentNode.removeChild(c)}}Sys.Extended.UI.HTMLEditor.spanJoiner(h,b._doc);a=Sys.Extended.UI.HTMLEditor.getHTML(h,h.style.cssText.length>0?true:false,true);if(!b._editPanel.get_noScript())a=a.replace(/(<script(?:[^>]*?)>)(.*?)(<\/script(?:[^>]*?)>)/gi,function(a,b,c,d){return v.regReplFromScript1(a,b,c,d)});else a=a.replace(/(<script(?:[^>]*?)>(?:[^<]*?)<\/script(?:[^>]*?)>)/gi,"");delete h}a=Sys.Extended.UI.HTMLEditor.brXHTML(a.replace(/^([\n|\r]+)/,""));if(b._editPanel.get_noUnicode())a=a.replace(/([\u0080-\uFFFF])/g,function(b,a){return"&#"+a.charCodeAt(0).toString(10)+";"});if(Sys.Extended.UI.HTMLEditor.Trim(a)=="<br />")a="";return a},_setContent:function(b){var a=this;a._deactivateCommon();var c=Sys.Extended.UI.HTMLEditor.Trim(a._prepareContent(b));a._doc.open();a._doc.write('<html><head><link rel="stylesheet" href="'+a._editPanel.get_documentCssPath()+'" media="all" /><link rel="stylesheet" href="'+a._editPanel.get_designPanelCssPath()+'" media="all" /></head><body>'+c+"</body></html>");a._doc.close();if(Sys.Extended.UI.HTMLEditor.isIE){a._doc.body.contentEditable=true;a._tryForward=true}a._afterBodyIsFormed();a._editPanel.get_autofocus()&&a._focus();Sys.Extended.UI.HTMLEditor.isIE&&!a._editPanel.get_autofocus()&&a._getSelection().empty()},_focus:function(a){this.focusEditor();this._focused(a)},focusEditor:function(){var a=this;try{a.get_element().contentWindow.focus()}catch(b){}if(!a._wasFocused){a._wasFocused=true;!a._editPanel.get_startEnd()&&a._setToEnd()}},_prepareContent:function(o){var l="$1&nbsp;$3",g=this,a=o;a=a.replace(/<object(?:[^>]*?)>(?:[^\u0000]*?)(<embed(?:[^>]*?)>)(?:[^\u0000]*?)<\/object(?:[^>]*?)>/gi,"$1");if(Sys.Extended.UI.HTMLEditor.isIE){a=Sys.Extended.UI.HTMLEditor.Trim(a.replace(/([\n\r]+<)/g,"<").replace(/([^>])([\n\r]+)([^<])/g,"$1 $3")).replace(/(&amp;)/g,"&amp;amp;").replace(/<br\s*[\/]*>\s*<\/td>/ig,"</td>").replace(/(<td[^>]*?>)([\s ]*?)(<\/td[^>]*?>)/ig,l).replace(/(<p[^>]*?>)\s*(<br[^>]*?>)\s*(<\/p[^>]*?>)/ig,l);if(/<embed/ig.test(a))a=a.replace(/(<embed(?:.*?))(wmode=)(\"[^\"]*\")((?:.*?)>)/ig,"$1pseudomode=$3$4").replace(/(<embed)([^>]*?>)/ig,'$1 wmode="transparent"$2');a=a.replace(/&amp;/ig,"&");return a}else{var i=new Sys.Extended.UI.HTMLEditor.DesignPanel.ScriptRecover,f=document.createElement("DIV");!g._editPanel.get_noScript()&&a.replace(/<script(?:[^>]*?)>(.*?)<\/script(?:[^>]*?>)/gi,function(a,b){return i.regReplScript1(a,b)});f.innerHTML=Sys.Extended.UI.HTMLEditor.Trim(a.replace(/([^>])([\n\r]+)([^<])/g,"$1 $3"));for(var m=f.getElementsByTagName("EMBED"),h=[],e=0;e<m.length;e++)h.push(m[e]);for(var k=0;k<h.length;k++){var b=h[k],c=document.createElement("IMG"),n=b.attributes;c.src=g._editPanel.get_imagePath_1x1();c.setAttribute("dummytag","embed");for(var e=0;e<n.length;++e){var j=n.item(e);if(!j.specified)continue;var d=j.name.toLowerCase(),o=j.value;if(d=="src")d="dummysrc";else if(d=="bgcolor")d="dummybgcolor";else if(d=="wmode")d="pseudomode";c.setAttribute(d,o)}c.style.cssText="border: 1px dotted #000000; background-image: url('"+(c.getAttribute("type").toLowerCase()=="application/x-mplayer2"?g._editPanel.get_imagePath_media():tthis._editPanel.get_imagePath_flash())+"'); background-position: center; background-repeat: no-repeat; background-color: #c0c0c0;";if(b.style.width&&b.style.width.length>0)c.style.width=b.style.width;if(b.style.height&&b.style.height.length>0)c.style.height=b.style.height;b.parentNode.insertBefore(c,b);b.parentNode.removeChild(b)}Sys.Extended.UI.HTMLEditor.spanJoiner(f,document);a=Sys.Extended.UI.HTMLEditor.Trim(Sys.Extended.UI.HTMLEditor.getHTML(f,false,true));if(!g._editPanel.get_noScript())a=a.replace(/(<script(?:[^>]*?)>)(.*?)(<\/script(?:[^>]*?)>)/gi,function(a,b,c,d){return i.regReplFromScript1(a,b,c,d)});delete f;delete i;a=Sys.Extended.UI.HTMLEditor.brXHTML(a);if(a.length==0)a="<br/>";return a}},_clearP:function(){var b=true;try{var a=this._doc.body;if(a.firstChild)if(a.firstChild.nodeType==3){var d=Sys.Extended.UI.HTMLEditor.Trim(""+a.firstChild.data+"");if(d.length==0)a.removeChild(a.firstChild);else if(d!=""+a.firstChild.data+"")a.firstChild.data=d}if(Sys.Extended.UI.HTMLEditor.isIE)if(a.childNodes.length==1){a=a.firstChild;if(a.nodeType==1){var c=a.tagName.toLowerCase();if(c=="p"||c=="ul"||c=="ol"){var f=false,g=c=="ul"||c=="ol";function e(a){var d=false;if(a.nodeType==1){var c=a.tagName.toUpperCase();if(!(g&&c=="LI"))if(Sys.Extended.UI.HTMLEditor.isRestricted(a)||c=="IMG"||c=="IFRAME"||c=="EMBED"||c=="SCRIPT")return b;if(a.childNodes.length>1)return b;if(a.childNodes.length==0)return false;d|=e(a.firstChild)}else if(a.nodeType==3)d|=b;return d}if(a.childNodes.length==1)if(!e(a.firstChild)){a.removeChild(a.firstChild);f=b}(f||a.parentNode.innerHTML.toLowerCase()=="<p>&nbsp;</p>")&&this._doc.body.removeChild(a)}}}}catch(h){}},isControl:function(){var b=false;try{var d=this._getSelection();if(Sys.Extended.UI.HTMLEditor.isIE)return d.type.toLowerCase()=="control"?true:b;else{var a=this._createRange(d),c=this._getParent(a);return c.nodeType!=3&&a.startContainer==a.endContainer?!c.tagName?b:a.startContainer.childNodes.item(a.startOffset)==null?b:a.startOffset==a.endOffset&&a.startContainer.childNodes.item(a.startOffset).tagName&&(a.startContainer.childNodes.item(a.startOffset).tagName.toUpperCase()=="BR"||Sys.Extended.UI.HTMLEditor.isStyleTag(a.startContainer.childNodes.item(a.startOffset).tagName))?b:c.tagName.toUpperCase()=="BODY"&&a.startOffset==0&&a.endOffset>0&&a.endOffset==c.childNodes.length?b:a.startOffset==a.endOffset&&a.startContainer.childNodes.item(a.startOffset).nodeType==3?b:true:b}}catch(e){return true}},isPopup:function(){return this._popup!=null},_getSelection:function(){var a=this;if(Sys.Extended.UI.HTMLEditor.isIE)return a._doc.selection;else{a.focusEditor();var b,c,d,e=a.get_element().contentWindow;b=e.getSelection();c=a._createRange(b);d=c.startContainer;try{while(d&&d.nodeType)d=d.parentNode}catch(f){a._removeAllRanges(b);c=a._createRange(b);c.setStart(a._saved_startContainer,a._saved_startOffset);c.setEnd(a._saved_startContainer,a._saved_startOffset);a._selectRange(b,c);b=e.getSelection()}return b}},_createRange:function(b){var c="undefined",a=this;if(Sys.Extended.UI.HTMLEditor.isIE)return typeof b==c?a._doc.body.createTextRange():b.createRange();else{a.focusEditor();if(typeof b==c)return a._doc.createRange();else try{return b.getRangeAt(0)}catch(e){return a._doc.createRange()}}},toEndOfProtected:function(){var e=null,c=this,g=this._getSelection(),b;try{b=this._createRange(g)}catch(h){return false}var a;if(!Sys.Extended.UI.HTMLEditor.isIE){a=Sys.Extended.UI.HTMLEditor.contentEditable(b.startContainer);if(a==e)a=Sys.Extended.UI.HTMLEditor.contentEditable(b.endContainer)}else a=Sys.Extended.UI.HTMLEditor.contentEditable(Sys.Extended.UI.HTMLEditor.getSelParent(c));if(Sys.Extended.UI.HTMLEditor.isIE&&a!=e){try{b.remove(a)}catch(i){}b=c._doc.body.createControlRange();b.add(a);b.select()}else if(!Sys.Extended.UI.HTMLEditor.isIE&&a!=e){var f=c._getSelection(),d;if(a.nextSibling!=e&&a.nextSibling.nodeType==3)d=a.nextSibling;else{d=c._doc.createTextNode("");if(a.nextSibling!=e)a.parentNode.insertBefore(d,a.nextSibling);else a.parentNode.appendChild(d)}c._removeAllRanges(f);var b=c._createRange(f);b.setStart(d,0);b.setEnd(d,0);c._selectRange(f,b)}return true},_commonPaste:function(h){var c=null,d=this,a=d;d._saveContent();if(Sys.Extended.UI.HTMLEditor.isIE){d.openWait();setTimeout(function(){a._paste(!a._editPanel.get_noPaste());a.closeWait()},0);Sys.Extended.UI.HTMLEditor._stopEvent(h)}else if(!d.isPlainText&&!d.isWord&&!d._editPanel.get_noPaste())setTimeout(function(){Sys.Extended.UI.HTMLEditor.operateAnchors(a,a._doc,!a._editPanel.get_showAnchors());Sys.Extended.UI.HTMLEditor.operatePlaceHolders(a,a._doc,!a._editPanel.get_showPlaceHolders());Sys.Extended.UI.HTMLEditor.inspectForShadows(a._doc.body);a._checkImages(a._doc.body);a.onContentChanged()},0);else{var e=a._getSafePlace();if(e!=c){var b=a._doc.createElement("div");b.style.display="inline";b.style.borderStyle="none";e.parentNode.insertBefore(b,e);b.appendChild(e);b.removeChild(e);b.innerHTML="xx";var g=a._getSelection(),f=a._createRange();a._removeAllRanges(g);f.setStart(b.firstChild,0);f.setEnd(b.firstChild,1);a._selectRange(g,f);a.openWait();setTimeout(function(){var i=b.parentNode;b.lastChild.deleteData(b.lastChild.length-1,1);if(a.isWord){b.innerHTML=Sys.Extended.UI.HTMLEditor.cleanUp(b.innerHTML);Sys.Extended.UI.HTMLEditor.replaceOldTags(b,a);Sys.Extended.UI.HTMLEditor.spanJoiner(b,a._doc)}else{var g=document.createElement("div");g.innerHTML=Sys.Extended.UI.HTMLEditor.cleanUp(b.innerHTML);var j=new Sys.Extended.UI.HTMLEditor.jsDocument(true);Sys.Extended.UI.HTMLEditor.__MozillaGetInnerText(g,j);b.innerHTML=j.toString().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"").replace(/\n/g,"<br/>").replace(/\t/g,"&nbsp;");delete g}while(b.firstChild)i.insertBefore(b.firstChild,b);var e=c,d=c;if(b.nextSibling&&b.nextSibling.nodeType==3&&b.previousSibling&&b.previousSibling.nodeType==3){e=b.nextSibling;d=b.previousSibling}i.removeChild(b);var f=c;if(e!=c&&d!=c){f=d.data.length;d.data=""+d.data+""+e.data+"";e.parentNode.removeChild(e)}a.isWord=false;a.isPlainText=false;a.closeWait();if(f!=c){var k=a._getSelection(),h=a._createRange();a._removeAllRanges(k);h.setStart(d,f);h.setEnd(d,f);a._selectRange(k,h)}a.onContentChanged()},0)}else Sys.Extended.UI.HTMLEditor._stopEvent(h)}},_selectRange:function(b,a){b.addRange(a);this.focusEditor()},_selectRng:function(a){var d="character",b=this,g=b._getSelection();if(!Sys.Extended.UI.HTMLEditor.isIE){var h=b._doc.createRange();h.setStart(a[0],0);h.setEnd(a[a.length-1],(""+a[a.length-1].data+"").length);b._removeAllRanges(g);b._selectRange(g,h)}else{var c=b._createRange(g),e=b._createRange(g),i=b._doc.createElement("span"),f=b._doc.createElement("span");a[0].parentNode.insertBefore(i,a[0]);if(a[a.length-1].nextSibling)a[a.length-1].parentNode.insertBefore(f,a[a.length-1].nextSibling);else a[a.length-1].parentNode.appendChild(f);try{c.moveToElementText(i);var j=c.moveStart(d,1);c.moveStart(d,-j);e.moveToElementText(f);j=e.moveEnd(d,-1);e.moveEnd(d,-j);c.setEndPoint("EndToEnd",e);c.select()}catch(k){}a[0].parentNode.removeChild(i);a[a.length-1].parentNode.removeChild(f)}},_removeAllRanges:function(a){a.removeAllRanges()},_setToEnd:function(){var a=this;setTimeout(function(){a._setToEnd_();a._editPanel.updateToolbar()},0)},_setToEnd_:function(){var a=this;if(Sys.Extended.UI.HTMLEditor.isIE){var f=a._getSelection(),d=a._createRange(f);if(f.type.toLowerCase()!="control"){d.moveEnd("textedit",1);d.collapse(false)}d.select();a.focusEditor();return}var e=0,b=a._doc.body,c=null;if(b.lastChild&&b.lastChild.nodeType==3){b=b.lastChild;e=(""+b.data+"").length}else{var g=a._doc.createTextNode("");if(b.lastChild&&b.lastChild.nodeType==1&&b.lastChild.tagName.toUpperCase()=="BR")b.insertBefore(g,b.lastChild);else b.appendChild(g);b=g;e=0}var f=a._getSelection();a._removeAllRanges(f);var d=a._createRange();d.setStart(b,e);d.setEnd(b,e);a._selectRange(f,d);c!=null&&a._doc.body.removeChild(c);a.focusEditor();if(!Sys.Extended.UI.HTMLEditor.isSafari&&!Sys.Extended.UI.HTMLEditor.isOpera)try{var c=a._doc.createElement("button");c.style.width="0px";c.style.height="20px";a._doc.body.appendChild(c);c.focus();c.blur();a.focusEditor();a._doc.body.removeChild(c)}catch(h){}},isShadowed:function(){var b=this;if(!b.isControl())return false;var e=b._getSelection(),a=b._createRange(e),c;if(Sys.Extended.UI.HTMLEditor.isIE)c=a.item(0);else c=a.startContainer.childNodes.item(a.startOffset);if(c.tagName&&c.tagName.toUpperCase()=="IMG"&&c.getAttribute(Sys.Extended.UI.HTMLEditor.attachedIdAttribute)&&c.getAttribute(Sys.Extended.UI.HTMLEditor.attachedIdAttribute).length>0){var d=b.getAttachedElement(c);if(d!=null){if(Sys.Extended.UI.HTMLEditor.isIE){a=b._doc.body.createControlRange();a.add(d);a.select()}else try{var f=Sys.Extended.UI.HTMLEditor.__getIndex(d);e.collapseToEnd();b._removeAllRanges(e);a=b._createRange(e);a.setStart(d.parentNode,f);a.setEnd(d.parentNode,f+1);b._selectRange(e,a)}catch(g){return true}return false}return true}return false},_ifShadow:function(){if(Sys.Extended.UI.HTMLEditor.isIE)try{var g=this._doc.selection}catch(h){return false}var b=this,d=null,a=Sys.Extended.UI.HTMLEditor.getSelParent(b);while(a&&(a.nodeType==3||a.tagName&&a.tagName.toUpperCase()!="BODY")){if(a.nodeType==3||!a.tagName){a=a.parentNode;continue}var f=a.tagName.toUpperCase();if(f=="TABLE"&&a.getAttribute(Sys.Extended.UI.HTMLEditor.noContextMenuAttribute)&&a.getAttribute(Sys.Extended.UI.HTMLEditor.noContextMenuAttribute)=="yes"){d=a.rows.item(0).cells.item(0).firstChild;if(Sys.Extended.UI.HTMLEditor.isIE&&f=="P")d=d.firstChild;break}a=a.parentNode}if(d!=null){var e=b._getSelection(),c=b._createRange(e);if(Sys.Extended.UI.HTMLEditor.isIE){c=b._doc.body.createControlRange();c.add(d);c.select()}else try{e.collapseToEnd();b._removeAllRanges(e);c=b._createRange(e);c.setStart(d.parentNode,0);c.setEnd(d.parentNode,1);b._selectRange(e,c)}catch(h){}}},_saveContent:function(){var a=this,b,d,c;try{try{b=a._getSelection();d=a._createRange(b)}catch(e){}c=new Sys.Extended.UI.HTMLEditor._Marker(a,d,b)}catch(e){return}if(!a.__stack){a.__stack=[];a.__stackPos=0}while(a.__stackPos<a.__stack.length)a.__stack.pop();if(a.__stack.length==Sys.Extended.UI.HTMLEditor.__stackMaxSize){a.__stack.reverse();a.__stack.pop();a.__stack.reverse()}a.__stack.push(c);a.__stackPos=a.__stack.length},_restoreContent:function(){var a=this;if(a.__stack&&a.__stackPos>=0&&a.__stackPos<a.__stack.length){var b=a.__stack[a.__stackPos],f,d;if(Sys.Extended.UI.HTMLEditor.isIE){function o(d,b,e,a,c){return b.replace(/\salign=[^\s>]*/ig,"")+(a=='"X"'?"":"align="+a)+c.replace(/\salign=[^\s>]*/ig,"")}for(var l=a._doc.body.getElementsByTagName("EMBED"),h=[],c=0;c<l.length;c++)h.push(l[c]);for(var i=0;i<h.length;i++)h[i].parentNode.removeChild(h[i]);var g=b._save.replace(/&amp;/ig,"&");g=g.replace(/(<embed(?:.*?))(teoalign=)(\"[^\"]*\")((?:.*?)>)/ig,o);a._doc.body.innerHTML="!!!<span></span>"+Sys.Extended.UI.HTMLEditor.Trim(g);a._doc.body.firstChild&&a._doc.body.removeChild(a._doc.body.firstChild);a._doc.body.firstChild&&a._doc.body.removeChild(a._doc.body.firstChild);var k=Sys.Extended.UI.HTMLEditor.getHrefsText(g);Sys.Extended.UI.HTMLEditor.setHrefsText(a._doc.body,k);if(a._editPanel.get_relativeImages()){k=Sys.Extended.UI.HTMLEditor.getImagesText(g);Sys.Extended.UI.HTMLEditor.setImagesText(a._doc.body,k)}Sys.Extended.UI.HTMLEditor.setNames(a._doc.body,b._nArr);Sys.Extended.UI.HTMLEditor.operateAnchors(a,a._doc,!a._editPanel.get_showAnchors());Sys.Extended.UI.HTMLEditor.operatePlaceHolders(a,a._doc,!a._editPanel.get_showPlaceHolders());if(b._tree!=null){var e=a._doc.body,c;try{for(c=b._tree.length-1;c>=0;c--)e=e.childNodes.item(b._tree[c])}catch(q){if(a.__stackPos>0){a.__stackPos--;a._restoreContent();a.__stackPos++}return}try{var n=a._doc.body.createControlRange();n.add(e);n.select()}catch(q){}}else{var j=a;setTimeout(function(){try{if(j._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel){f=j._getSelection();d=j._createRange(f);if(f.type.toLowerCase()!="control")try{d.moveToPoint(b._offsetLeft,b._offsetTop)}catch(a){}d.select()}}catch(a){}},0)}}else{if(Sys.Extended.UI.HTMLEditor.isOpera)a._doc.body.innerHTML=Sys.Extended.UI.HTMLEditor.Trim(b._save);else{a._doc.body.innerHTML="";for(var c=0;c<b._save.childNodes.length;c++)a._doc.body.appendChild(b._save.childNodes.item(c).cloneNode(true))}Sys.Extended.UI.HTMLEditor.operateAnchors(a,a._doc,!a._editPanel.get_showAnchors());Sys.Extended.UI.HTMLEditor.operatePlaceHolders(a,a._doc,!a._editPanel.get_showPlaceHolders());try{f=a._getSelection();d=a._createRange();a._removeAllRanges(f)}catch(q){}for(var p="",e=a._doc.body,c=b._tree.length-1;c>=0;c--){p+=" "+b._tree[c];e=e.childNodes.item(b._tree[c])}var m=b._offset;try{d.setStart(e,m);d.setEnd(e,m)}catch(q){Sys.Extended.UI.HTMLEditor.inspectForShadows(a._doc.body);return}try{a._selectRange(f,d)}catch(q){}}try{Sys.Extended.UI.HTMLEditor.inspectForShadows(a._doc.body)}catch(q){}}},SaveContent:function(){this._saveContent()},RestoreContent:function(){this._undo(false)},_undo:function(c){var a=this;if(a.__stack)if(a.__stackPos>0){a.__stackPos==a.__stack.length&&c&&a._saveContent();do{var d=Sys.Extended.UI.HTMLEditor.Trim(a._doc.body.innerHTML);a.__stackPos--;a._restoreContent()}while(Sys.Extended.UI.HTMLEditor.Trim(a._doc.body.innerHTML)==d&&a.__stackPos>0&&c);var b=a;setTimeout(function(){try{b._ifShadow()}catch(a){}if(b._editPanel==Sys.Extended.UI.HTMLEditor.LastFocusedEditPanel)try{b._editPanel.updateToolbar()}catch(a){}!c&&b.onContentChanged()},0)}},_redo:function(){var a=this;if(a.__stack)if(a.__stackPos<a.__stack.length-1){a.__stackPos++;var b=a,c;if(Sys.Extended.UI.HTMLEditor.isIE){c=b._doc.body.getElementsByTagName("EMBED").length;if(c>0){var d=b._body.ownerDocument.createElement("div");b._body.appendChild(d);setTimeout(function(){b._body.removeChild(d)},0)}}a._restoreContent();var b=a;setTimeout(function(){b._ifShadow();b._editPanel.updateToolbar()},0)}},undo:function(){this._undo(true);this.onContentChanged()},redo:function(){this._redo();this.onContentChanged()},_contextMenuCallP:function(){},onContentChanged:function(){},_copyCut:function(i,q){var e=true,a=this,l=a;if(Sys.Extended.UI.HTMLEditor.isIE){var c=a._getSelection(),b=a._createRange(c),j=false,f="";i=="x"&&a._saveContent();if(c.type.toLowerCase()=="control"){j=e;f=Sys.Extended.UI.HTMLEditor.getHTML(b.item(0),e)}else if(b.text!=""){j=e;f=b.htmlText;var o=b.duplicate(),h=a._getTextNodeCollection();if(h.length<1)return;var m=Sys.Extended.UI.HTMLEditor._commonParent(h[0],h[h.length-1]);if(m!=null&&h[0].previousSibling&&h[0].previousSibling.nodeType==3){var g=m.parent;while(g&&g.tagName.toUpperCase()!="BODY"&&Sys.Extended.UI.HTMLEditor.isStyleTag(g.tagName)){var n=g.cloneNode(false);n.innerHTML=f;f=n.outerHTML;g=g.parentNode}}c=a._getSelection();c.empty();b=a._createRange(c);b.setEndPoint("EndToEnd",o);b.setEndPoint("StartToStart",o);b.select()}else if(b.htmlText!=""){j=e;f=b.htmlText}if(j){var d=a._doc.createElement("DIV");d.innerHTML="!!!<span></span>"+f;d.removeChild(d.firstChild);d.removeChild(d.firstChild);var k=Sys.Extended.UI.HTMLEditor.getHTML(d,false,e),p=new RegExp("(<[/]?)(teo"+Sys.Extended.UI.HTMLEditor.smartClassName+":)","ig");k=k.replace(p,"$1");delete d;a._contentCopy(k,e);b.select();if(i=="x"){c.clear();a._clearP()}}else if(i=="x"){c.clear();a._clearP()}q&&setTimeout(function(){l._editPanel.updateToolbar()},0)}else if(i=="x"){a._saveContent();var c=a._getSelection(),b=a._createRange(c);a._removeAllRanges(c);b.deleteContents();if(a._doc.body.innerHTML==""){a._doc.body.innerHTML="<br/>";b.setStart(a._doc.body,0);b.setEnd(a._doc.body,0)}l.onContentChanged();a._selectRange(c,b)}else{var c=a._getSelection(),b=a._createRange(c);a._removeAllRanges(c);alert(String.format(Sys.Extended.UI.Resources.HTMLEditor_toolbar_button_Use_verb,Sys.Extended.UI.HTMLEditor.isSafari&&navigator.userAgent.indexOf("mac")!=-1?"Apple-C":"Ctrl-C"));a._selectRange(c,b)}},_paste:function(m,n){var c=this,d=c,o=c._getSelection(),g=c._createRange(o),k,l;if(!m){k=g.offsetLeft;l=g.offsetTop;c.insertHTML(c._getPlain());d.onContentChanged();return}if(c._editPanel.get_noPaste())return;k=g.offsetLeft;l=g.offsetTop;var b=c._doc.createElement("span"),a,h=c._contentCopy("",false,n);if(/<[\/]*p[\s>]+/i.test(h)||/<[\/]*h/i.test(h))a=c._getSafePlace();else{a=c._doc.createElement("SPAN");a.id=Sys.Extended.UI.HTMLEditor.smartClassName;if(!c.insertHTML(Sys.Extended.UI.HTMLEditor.getHTML(a,true)))return;a=c._doc.getElementById(Sys.Extended.UI.HTMLEditor.smartClassName);if(a){a.id=null;a.removeAttribute("id");a.setAttribute("para","no")}}b.innerHTML=h;if(!a)return;c._checkImages(b);var i=a.parentNode,f=a.getAttribute("para");if(f!="no"){if(f.indexOf("left")>=0&&b.firstChild)if(b.firstChild.tagName&&b.firstChild.tagName.toUpperCase()=="P"){while(b.firstChild.firstChild)a.previousSibling.appendChild(b.firstChild.firstChild);b.removeChild(b.firstChild)}if(f.indexOf("right")>=0&&b.lastChild)if(b.lastChild.tagName&&b.lastChild.tagName.toUpperCase()=="P"){while(b.lastChild.lastChild)a.nextSibling.insertBefore(b.lastChild.lastChild,a.nextSibling.firstChild);b.removeChild(b.lastChild)}}var j=a,e=null;if(b.childNodes.length==0&&f.indexOf("left")>=0&&f.indexOf("right")>=0){if(a.nextSibling.firstChild){e=c._doc.createElement("span");j=e;e.innerHTML="111";a.previousSibling.appendChild(e)}while(a.nextSibling.firstChild)a.previousSibling.appendChild(a.nextSibling.firstChild);i.removeChild(a.nextSibling)}else while(b.firstChild)i.insertBefore(b.firstChild,a);setTimeout(function(){var c=d._getSelection(),b=d._createRange(c);if(c.type.toLowerCase()=="control")while(b.length>0)b.remove(0);try{b.collapse(false)}catch(f){}d.focusEditor();Sys.Extended.UI.HTMLEditor._setCursor(j,d);e&&e.parentNode.removeChild(e);i.removeChild(a);Sys.Extended.UI.HTMLEditor.inspectForShadows(d._doc.body);d.onContentChanged();b.select()},0)},_contentCopy:function(i,n,p){var j=true,o="$1<br/>$3",m="$1&nbsp;$3",b=this;if(i!="")i=i.replace(/(<td[^>]*?>)([\s ]*?)(<\/td[^>]*?>)/ig,m).replace(/(<td[^>]*?>)\s*(&nbsp;)\s*(<\/td[^>]*?>)/ig,o).replace(/(<p[^>]*?>)\s*(&nbsp;)\s*(<\/p[^>]*?>)/ig,o);var e=b._doc.createElement("iframe");e.width="0";e.height="0";if(Sys.Extended.UI.HTMLEditor.isIE)e.src="javascript:false;";b._doc.appendChild(e);var a=e.contentWindow.document;a.write("<html><head></head><body>"+i+"</body></html>");a.close();a.body.contentEditable=j;var k=a.body.createTextRange(),q=false;if(i==""){k.execCommand("paste");for(var t=a.createElement("DIV"),d=0;d<a.body.childNodes.length;d++){var h=a.body.childNodes.item(d);if(h.nodeType==8){var c=""+h.data+"";if(c.search(/StartFragment/i)>=0)if(h.nextSibling&&h.nextSibling.nodeType==3){var c=""+h.nextSibling.data+"";if(c.length)if(c.charCodeAt(0)==160){c=c.substr(1);h.nextSibling.data=c;q=j;break}}}}if(typeof p!="undefined"&&p)a.body.innerHTML=Sys.Extended.UI.HTMLEditor.cleanUp(a.body.innerHTML);var c=Sys.Extended.UI.HTMLEditor.Trim(Sys.Extended.UI.HTMLEditor.getHTML(a.body,false,j));c=c.replace(/(<script(?:[^>]*?)>(?:[^<]*?)<\/script(?:[^>]*?)>)/gi,"");a.body.innerHTML=c;if(!n){Sys.Extended.UI.HTMLEditor.operateAnchors(b,a,!b.showAnchors);Sys.Extended.UI.HTMLEditor.operatePlaceHolders(b,a,!b.showPlaceHolders);for(var l=a.body.getElementsByTagName("EMBED"),f=[],d=0;d<l.length;d++)f.push(l[d]);for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g])}delete k;delete t;if(n&&Sys.Extended.UI.HTMLEditor.isIE)k=a.body.createTextRange()}if(n&&Sys.Extended.UI.HTMLEditor.isIE){if(i!=""){Sys.Extended.UI.HTMLEditor.operateAnchors(b,a,j);Sys.Extended.UI.HTMLEditor.operatePlaceHolders(b,a,j)}k.select();k.execCommand("copy")}for(var s=Sys.Extended.UI.HTMLEditor.Trim(a.body.innerHTML).replace(/<br\s*[\/]*>\s*<\/td>/ig,"</td>").replace(/(<td[^>]*?>)([\s ]*?)(<\/td[^>]*?>)/ig,m).replace(/(<p[^>]*?>)\s*(<br[^>]*?>)\s*(<\/p[^>]*?>)/ig,m).replace(/(<embed(?:.*?))(wmode=)(\"[^\"]*\")((?:.*?)>)/ig,"$1pseudomode=$3$4").replace(/(<embed)([^>]*?>)/ig,'$1 wmode="transparent"$2'),l=a.body.getElementsByTagName("EMBED"),f=[],d=0;d<l.length;d++)f.push(l[d]);for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);e.src="";var r=b;r._doc.removeChild(e);delete e;return s},insertHTML:function(p,c){var m="<span>qqq</span>",b=this;b.focusEditor();var w=b._getSelection();if(typeof c=="undefined")c=b._createRange(w);if(Sys.Extended.UI.HTMLEditor.isIE){function r(b,a){return'<span class="'+Sys.Extended.UI.HTMLEditor.smartClassName+"_script\" style='display:none;visibility:hidden;'>"+a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")+"</span>"}function q(b,a){return a.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&")}var d='<span id="'+Sys.Extended.UI.HTMLEditor.smartClassName+'">111<span></span>'+p+"</span>",u=Sys.Extended.UI.HTMLEditor.getHrefsText(d),s=Sys.Extended.UI.HTMLEditor.getImagesText(d);if(!b._editPanel.get_noScript())d=d.replace(/(<script(?:[^>]*?)>.*?<\/script(?:[^>]*?)>)/gi,r);else d=d.replace(/(<script(?:[^>]*?)>.*?<\/script(?:[^>]*?)>)/gi,"");var x=b;try{if(c.pasteHTML)c.pasteHTML(d);else{var f=b._doc.createElement("DIV");f.innerHTML=d;while(f.firstChild)c(0).parentNode.insertBefore(f.firstChild,c(0));c(0).parentNode.removeChild(c(0));c.remove(0);delete f}}catch(y){return false}var a=b._doc.getElementById(Sys.Extended.UI.HTMLEditor.smartClassName);a.innerHTML=m+Sys.Extended.UI.HTMLEditor.getHTML(a,false,true).replace(new RegExp("<span(?:[^>]*?)class="+Sys.Extended.UI.HTMLEditor.smartClassName+"_script(?:[^>]*?)>(.*?)</span(?:[^>]*?)>","gi"),q)+m;a.removeChild(a.firstChild);a.removeChild(a.lastChild);Sys.Extended.UI.HTMLEditor.setHrefsText(a,u);Sys.Extended.UI.HTMLEditor.setImagesText(a,s);a.firstChild&&a.removeChild(a.firstChild);a.firstChild&&a.removeChild(a.firstChild);while(a.firstChild)a.parentNode.insertBefore(a.firstChild,a);a.parentNode.removeChild(a);delete a;return true}else{var f=b._doc.createElement("div");f.innerHTML=p;for(var n=f.getElementsByTagName("EMBED"),j=[],h=0;h<n.length;h++)j.push(n[h]);for(var l=0;l<j.length;l++){var i=j[l],g=document.createElement("IMG"),o=i.attributes;g.src=b._images_list[1];g.setAttribute("dummytag","embed");for(var h=0;h<o.length;++h){var k=o.item(h);if(!k.specified)continue;var e=k.name.toLowerCase(),t=k.value;if(e=="src")e="dummysrc";else if(e=="bgcolor")e="dummybgcolor";else if(e=="wmode")e="pseudomode";g.setAttribute(e,t)}g.getAttribute("type");g.style.cssText="border: 1px dotted #000000; background-image: url('"+(g.getAttribute("type").toLowerCase()=="application/x-mplayer2"?b._images_list[3]:b._images_list[2])+"'); background-position: center; background-repeat: no-repeat; background-color: #c0c0c0;";i.parentNode.insertBefore(g,i);i.parentNode.removeChild(i)}var v=b.insertNodeAtSelection(f,c);return v}},insertNodeAtSelection:function(e,b){var d=false,c=this;if(!Sys.Extended.UI.HTMLEditor.isIE){var f=c._getSelection();if(typeof b=="undefined")try{b=c._createRange(f)}catch(l){c._removeAllRanges(f);return d}var a=b.startContainer,j=b.startOffset;if(a.ownerDocument.id!="EditorDocument")return d;if(b.startContainer.nodeType==1&&b.startContainer.tagName.toUpperCase()=="TR"||b.endContainer.nodeType==1&&b.endContainer.tagName.toUpperCase()=="TR")return d;c._removeAllRanges(f);b.deleteContents();try{b=c._createRange()}catch(l){c._removeAllRanges(f);return d}switch(a.nodeType){case 3:if(j>0)a=a.splitText(j);while(e.firstChild)a.parentNode.insertBefore(e.firstChild,a);b.setStart(a,0);b.setEnd(a,0);break;case 1:case 11:try{c._removeAllRanges(f);if(a.childNodes.length>=j+1){a=a.childNodes.item(j);while(e.firstChild)a.parentNode.insertBefore(e.firstChild,a);var g=c._doc.createTextNode("");a.parentNode.insertBefore(g,a);a=g}else{var g=c._doc.createTextNode("");if(Sys.Extended.UI.HTMLEditor.canHaveChildren(a)){while(e.firstChild)a.appendChild(e.firstChild);a.appendChild(g)}else{while(e.firstChild)a.parentNode.insertBefore(e.firstChild,a);a.parentNode.insertBefore(g,a)}a=g}if(a.nodeType==1){for(var h=a.parentNode,k=h,i=0;i<h.childNodes.length;i++)if(a==h.childNodes.item(i))break;b.setStart(h,i);b.setEnd(h,i)}else{b.setStart(a,0);b.setEnd(a,0)}}catch(l){c._removeAllRanges(f);return d}}c._selectRange(f,b);return true}else return d},trickWithStyles:function(j){var a=this,c=a._doc.getElementById(j);if(c!=null)if(c.nextSibling&&c.nextSibling.nodeType==3){var b=c.nextSibling;c.parentNode.removeChild(c);var e=(""+b.data+"").indexOf(" ");if(e>0)b.splitText(e);else e==0&&b.splitText(1);if(a.n_arr!=null)for(var h=0;h<a.n_arr.length;h++)a.MSIE_applyCssStyle(a.n_arr[h],[b],false);a.n_arr=null;var g=a._getSelection();if(!Sys.Extended.UI.HTMLEditor.isIE){var f=a._doc.createRange();f.setStart(b,b.length);f.setEnd(b,b.length);a._removeAllRanges(g);a._selectRange(g,f)}else{var i=a._createRange(g),d=a._doc.createElement("span");if(b.nextSibling)b.parentNode.insertBefore(d,b.nextSibling);else b.parentNode.appendChild(d);try{i.moveToElementText(d);i.select()}catch(k){}d.parentNode.removeChild(d)}}else c.parentNode.removeChild(c)},_getParent:function(a){return Sys.Extended.UI.HTMLEditor.isIE?a.parentElement():a.startContainer},_checkImages:function(g){var e="qwerty.gif";if(this._editPanel.get_relativeImages())for(var f=g.getElementsByTagName("IMG"),d=0;d<f.length;d++){var a=f[d];if(a.src.indexOf("http://")>=0){var b=a.src;a.src=e;var c=a.src.indexOf(e);if(b.substr(0,c)==a.src.substr(0,c))b=b.substr(c,b.length-c);a.src=b}}},_getSafePlace:function(d){var e="para",b=null,g=this,a=g._doc.createElement("SPAN"),j=g;a.id=Sys.Extended.UI.HTMLEditor.smartClassName;if(typeof d=="undefined"){if(!g.insertHTML(Sys.Extended.UI.HTMLEditor.getHTML(a,true)))return b}else{if(d.nextSibling==b)d.parentNode.appendChild(a);else d.parentNode.insertBefore(a,d.nextSibling);d.parentNode.removeChild(d)}a=g._doc.getElementById(Sys.Extended.UI.HTMLEditor.smartClassName);a.id=b;a.removeAttribute("id");a.setAttribute(e,"no");var c=a.parentNode,f=c.tagName.toUpperCase();while(f!="BODY"&&f!="TD"&&f!="P"&&f!="DIV")if(Sys.Extended.UI.HTMLEditor.isStyleTag(c.tagName)){c=c.parentNode;f=c.tagName.toUpperCase()}else break;if(f=="P"){a.setAttribute(e,"");function i(k,a,e,f){var l,d=Sys.Extended.UI.HTMLEditor.myClone(e,j._doc,false);k&&d.appendChild(k);while(a){if(a.nodeType==1||a.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(""+a.data+"").length>0){var g=b;if(a.tagName&&a.tagName.toUpperCase()=="SCRIPT")g=a.text;var h=Sys.Extended.UI.HTMLEditor.myClone(a,j._doc,true);if(d.childNodes.length==0||!f)d.appendChild(h);else d.insertBefore(h,d.firstChild);if(g!=b)h.text=g}a=f?a.previousSibling:a.nextSibling}if(d.childNodes.length==0){delete d;d=b}return e==c?d:i(d,f?e.previousSibling:e.nextSibling,e.parentNode,f)}var k=i(b,a.previousSibling,a.parentNode,true),l=i(b,a.nextSibling,a.parentNode,false),h=c.parentNode;if(k){h.insertBefore(k,c);a.setAttribute(e,a.getAttribute(e)+" left")}h.insertBefore(a,c);if(l){h.insertBefore(l,c);a.setAttribute(e,a.getAttribute(e)+" right")}h.removeChild(c)}return a},noContextMenuAttributeName:function(){return Sys.Extended.UI.HTMLEditor.noContextMenuAttribute},_getTextNodeCollection:function(x){var a="",u="<span id='",n="undefined",f=null,d=this,e=[];if(d.isControl())return e;var o=d._getSelection(),j=d._createRange(o),m=Sys.Extended.UI.HTMLEditor.smartClassName+"_right",r=Sys.Extended.UI.HTMLEditor.smartClassName+"_left",g=f,i=f,q;if(typeof x==n){if(Sys.Extended.UI.HTMLEditor.isIE){g=j.duplicate();i=j.duplicate();g.setEndPoint("EndToStart",j);i.setEndPoint("StartToEnd",j)}else{g=j.cloneRange();i=j.cloneRange();g.setEnd(g.startContainer,g.startOffset);i.setStart(i.endContainer,i.endOffset);q=g.endOffset}if(!d.insertHTML(u+m+"'/>",i))return e;else{if(Sys.Extended.UI.HTMLEditor.isOpera){g.setEnd(g.startContainer,q);g.setStart(g.startContainer,q)}if(!d.insertHTML(u+r+"'/>",g)){var t=d._doc.getElementById(m);if(t!=f){h=t.parentNode;h.removeChild(t)}var s=d._doc.getElementById(rl);if(s!=f){h=s.parentNode;h.removeChild(s)}return e}}}else{var k;k=d._doc.createElement("SPAN");k.id=m;d._doc.body.appendChild(k);k=d._doc.createElement("SPAN");k.id=r;d._doc.body.insertBefore(k,d._doc.body.firstChild)}var b=d._doc.getElementById(r),c=d._doc.getElementById(m);if(b==f||c==f){var h;if(b!=f){h=b.parentNode;h.removeChild(b)}if(c!=f){h=c.parentNode;h.removeChild(c)}return[]}while(b.firstChild)b.removeChild(b.firstChild);while(c.firstChild)c.removeChild(c.firstChild);while(b.previousSibling&&b.previousSibling.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(a+b.previousSibling.data+a).length==0)b.parentNode.removeChild(b.previousSibling);while(b.nextSibling&&b.nextSibling.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(a+b.nextSibling.data+a).length==0)b.parentNode.removeChild(b.nextSibling);while(c.previousSibling&&c.previousSibling.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(a+c.previousSibling.data+a).length==0)c.parentNode.removeChild(c.previousSibling);while(c.nextSibling&&c.nextSibling.nodeType==3&&Sys.Extended.UI.HTMLEditor.Trim(a+c.nextSibling.data+a).length==0)c.parentNode.removeChild(c.nextSibling);var w=false,l=d;function v(b,d){while(b){if(b.id&&b.id==m){w=true;return}if(b.nodeType==3){while(b.nextSibling&&(b.nextSibling.nodeType==3||!Sys.Extended.UI.HTMLEditor.isIE&&typeof l.__saveBM__!=n&&l.__saveBM__!=f&&l.__saveBM__[0]==b.nextSibling)){if(b.nextSibling.nodeType==3)b.data=a+b.data+a+b.nextSibling.data+a;else{l.__saveBM__[0]=b;l.__saveBM__[1]=(a+b.data+a).length}b.parentNode.removeChild(b.nextSibling)}Sys.Extended.UI.HTMLEditor.Trim(a+b.data+a).length>0&&e.push(b)}else{var c=b.tagName;if(b.tagName){c=c.toUpperCase();if(!(c=="MAP"||c=="AREA"||c=="SCRIPT"||c=="NOSCRIPT"))!(b.style&&(Sys.Extended.UI.HTMLEditor.getStyle(b,"display")=="none"||Sys.Extended.UI.HTMLEditor.getStyle(b,"visibility")=="hidden"))&&v(b.firstChild,false)}}if(w)return;var g=b.parentNode;if(d)while(b.nextSibling==f)b=b.parentNode;b=b.nextSibling}}v(b,true);var h;h=b.parentNode;h.removeChild(b);h=c.parentNode;h.removeChild(c);if(typeof x==n)if(Sys.Extended.UI.HTMLEditor.isIE){o.empty();i.select()}else if(e.length>0){d._removeAllRanges(o);var p=d._createRange();p.setEnd(e[e.length-1],e[e.length-1].length);p.setStart(e[e.length-1],e[e.length-1].length);d._selectRange(o,p)}return e},_getPlain:function(){var a=this._doc.createElement("textarea");a.width="0";a.height="0";this._doc.appendChild(a);var c=a.createTextRange();c.execCommand("paste");var b=a.value;b=b.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"").replace(/\n/g,"<br/>");this._doc.removeChild(a);return b},_execCommand:function(c,g,b){var e=false,h="createlink",a=this,i=a,d,f;if(Sys.Extended.UI.HTMLEditor.isIE&&!a.isControl()){d=a._getSelection();f=a._createRange(d);var j=f.parentElement();if(j.tagName.toUpperCase()=="TEXTAREA")return}c.toLowerCase()!=h&&a._saveContent();switch(c.toLowerCase()){case h:if(Sys.Extended.UI.HTMLEditor.isIE||!g)a._doc.execCommand(c,g,b);else{var b;(b=prompt("Enter URL"))&&a._doc.execCommand(c,e,b)}break;case"backcolor":case"forecolor":case"fontname":case"fontsize":a.MSIE_applyCommand(c.toLowerCase(),b);break;case"indent":a.MSIE_indent(true);break;case"outdent":a.MSIE_indent(e);break;case"justifyleft":a.MSIE_justify("left");break;case"justifyfull":a.MSIE_justify("justify");break;case"justifycenter":a.MSIE_justify("center");break;case"justifyright":a.MSIE_justify("right");break;case"paragraph":a.MSIE_justify("remain",e,"P");break;case"formatblock":if(b!=null&&typeof b=="string"&&b.length==2)if(b.substr(0,1).toUpperCase()=="H"&&parseInt(b.substr(1,1))>0){a.MSIE_justify("remain",e,b);break}a._doc.execCommand(c,g,b);break;case"insertunorderedlist":a.MSIE_list("UL");break;case"insertorderedlist":a.MSIE_list("OL");break;case"bold":case"italic":case"underline":case"strikethrough":case"superscript":case"subscript":a.MSIE_applyCommand(c.toLowerCase());break;default:a._doc.execCommand(c,g,b)}a.onContentChanged();if(!Sys.Extended.UI.HTMLEditor.isIE){d=a._getSelection();f=a._createRange(d);a._removeAllRanges(d);a._selectRange(d,f);a.focusEditor()}var i=a;setTimeout(function(){i._editPanel.updateToolbar()},0)},MSIE_indent:function(a){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.MSIE_indent)(a)},MSIE_justify:function(c,b,a){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.MSIE_justify)(c,b,a)},MSIE_list:function(a){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.MSIE_list)(a)},getSelectionAfterOperation:function(a){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.getSelectionAfterOperation)(a)},setSelectionAfterOperation:function(b,a){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.setSelectionAfterOperation)(b,a)},get_paragraphs:function(){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.get_paragraphs)()},getPseudoP:function(){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.getPseudoP)()},getPseudoP_Recur:function(b,c,a){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.getPseudoP_Recur)(b,c,a)},unWrap:function(a,b){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.unWrap)(a,b)},tryUnWrap:function(a,c,b){return Function.createDelegate(this,Sys.Extended.UI.HTMLEditor.tryUnWrap)(a,c,b)},MSIE_applyCommand:function(n,g){var f=null,k="vertical-align",j="text-decoration",i="underline",d=false,a=this,l=!Sys.Extended.UI.HTMLEditor.isIE?Sys.Extended.UI.HTMLEditor.Trim(a.getSelectedHTML()):"";if(a.isControl())return;var e=a._getSelection(),c=a._createRange(e),o=Sys.Extended.UI.HTMLEditor.isIE?[c.boundingLeft,c.boundingTop]:[c.startContainer,c.startOffset],m=Sys.Extended.UI.HTMLEditor.isIE&&c.text.length>0||!Sys.Extended.UI.HTMLEditor.isIE&&l.length>0,b={name:"none",value:"none"};switch(n.toLowerCase()){case"bold":b={name:"font-weight",value:"bold",repl:d};break;case"italic":b={name:"font-style",value:"italic",repl:d};break;case i:b={name:j,value:i,repl:d};break;case"strikethrough":b={name:j,value:"line-through",repl:d};break;case"superscript":b={name:k,value:"super",repl:d};break;case"subscript":b={name:k,value:"sub",repl:d};break;case"forecolor":b={name:"color",value:g,repl:d};break;case"backcolor":b={name:"background-color",value:g,repl:d};break;case"fontname":b={name:"font-family",value:g,repl:d};break;case"fontsize":b={name:"font-size",value:g,repl:d}}if(m){var h=a._getTextNodeCollection();a.MSIE_applyCssStyle(b,h,true)}else{if(a.isControl())return;var h=a._tryExpand();if(h.length>0){a.MSIE_applyCssStyle(b,h,d);if(Sys.Extended.UI.HTMLEditor.isIE&&a.__saveBM__!=f){e=a._getSelection();c=a._createRange(e);c.moveToBookmark(a.__saveBM__);c.select();a.__saveBM__=f}else if(a.__saveBM__!=f){if(a.__saveBM__[0].nodeType==3){e=a._getSelection();c=a._doc.createRange();c.setStart(a.__saveBM__[0],a.__saveBM__[1]);c.setEnd(a.__saveBM__[0],a.__saveBM__[1]);a._removeAllRanges(e);a._selectRange(e,c)}else{a._trySelect(a.__saveBM__[0],a.__saveBM__[0]);a.__saveBM__[0].parentNode.removeChild(a.__saveBM__[0])}a.__saveBM__=f}}else a._setStyleForTyping(b)}},MSIE_applyCssStyle:function(h,c,J){var q=true,G="text-decoration",u=null,p="SPAN",i=this,b=h.name.replace(/\-(\w)/g,function(b,a){return a.toUpperCase()}),d=h.value,L=h.repl,A=false,B=false;i._saveContent();var N=Sys.Extended.UI.HTMLEditor.smartClassName+"_right",M=Sys.Extended.UI.HTMLEditor.smartClassName+"_left",o=i._doc.createElement(p);o.id=M;var m=i._doc.createElement(p);m.id=N;c[0].parentNode.insertBefore(o,c[0]);if(c[c.length-1].nextSibling!=u)c[c.length-1].parentNode.insertBefore(m,c[c.length-1].nextSibling);else c[c.length-1].parentNode.appendChild(m);Sys.Extended.UI.HTMLEditor.unStyle(o);Sys.Extended.UI.HTMLEditor.unStyle(m);for(var n=[],g=0;g<c.length;g++){for(var l=c[g],a=l.parentNode,z=0;z<n.length;z++){var x=n[z];if(x.parent==a){x.textNodes.push(l);break}}z==n.length&&n.push({parent:a,textNodes:[l]})}for(var g=0;g<n.length;g++){var x=n[g];if(x.textNodes.length>1){var e=x.textNodes,w=i._doc.createElement(p),t=i._doc.createElement(p);e[0].parentNode.insertBefore(w,e[0]);if(e[e.length-1].nextSibling!=u)e[e.length-1].parentNode.insertBefore(t,e[e.length-1].nextSibling);else e[e.length-1].parentNode.appendChild(t);Sys.Extended.UI.HTMLEditor._moveTagsUp(w,t);w.parentNode.removeChild(w);t.parentNode.removeChild(t)}}for(var g=0;g<c.length;g++){var l=c[g],a=l.parentNode,D=false;while(a&&a.tagName&&a.childNodes.length==1&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName)){var f=a.tagName.toUpperCase();if((f=="I"||f=="EM")&&h.name=="font-style"||(f=="B"||f=="STRONG")&&h.name=="font-weight"||(f=="S"||f=="STRIKE")&&h.name==G||f=="U"&&h.name==G||(f=="SUB"||f=="SUP")&&h.name=="vertical-align"){var v=a;a=a.parentNode;while(v.firstChild)a.insertBefore(v.firstChild,v);a.removeChild(v);D=q;continue}else if(a.style&&a.style[b]&&a.style[b].length>0){var k=a.style[b];if(b.toLowerCase().indexOf("color")>=0||b=="fontFamily"||b=="fontSize")a.style[b]=d;else if(L)try{a.style[b]=a.style[b]+" "+d;if(k==a.style[b])a.style[b]=d}catch(O){a.style[b]=d}else if(!A){var F=k.replace(d,"");if(b=="fontWeight"&&k.toString()=="700")F="";if(F==k)try{a.style[b]=a.style[b]+" "+d;if(k==a.style[b])a.style[b]=d}catch(O){a.style[b]=d}else{a.style[b]=F.replace(/,/,"");B=q}A=q}else if(B)a.style[b]=k.replace(d,"").replace(/,/,"");else try{a.style[b]=a.style[b]+" "+d;if(k==a.style[b])a.style[b]=d}catch(O){a.style[b]=d}D=q}a=a.parentNode}if(!D&&!B){var y;y=i._doc.createElement(p);y.style[b]=d;var K=l.parentNode;K.insertBefore(y,l);y.appendChild(l);A=q}}var j=Sys.Extended.UI.HTMLEditor._commonTotalParent(o,m),I=j.parent.childNodes.item(j.indexFirst).previousSibling,s=j.parent.childNodes.item(j.indexLast).nextSibling;o.parentNode.removeChild(o);m.parentNode.removeChild(m);var H=0,r=j.parent.childNodes.length;if(I!=u)H=Sys.Extended.UI.HTMLEditor.__getIndex(I);if(s!=u){r=Sys.Extended.UI.HTMLEditor.__getIndex(s)+1;if(r<j.parent.childNodes.length)if(s.nodeType==3)r++;else if(s.nodeType==1){var E=s.tagName.toUpperCase();if(E!="TR"&&E!="TD"&&E!="LI")r++}}Sys.Extended.UI.HTMLEditor.spanJoiner(j.parent,i._doc,H,r);var C=i;J&&C._selectRng(c);setTimeout(function(){!Sys.Extended.UI.HTMLEditor.isIE&&C.focusEditor();C._editPanel.updateToolbar()},0)},_tryExpand:function(p){var u="'></span><span id='",h=false,n="undefined",a=this,v=[],i,j,m=a._getSelection(),b=a._createRange(m),l,k,x=Sys.Extended.UI.HTMLEditor.smartClassName+"_right_add",w=Sys.Extended.UI.HTMLEditor.smartClassName+"_left_add",q=Sys.Extended.UI.HTMLEditor.smartClassName+"_middle_add";if(Sys.Extended.UI.HTMLEditor.isIE&&typeof p==n){b.execCommand("bold");a.__saveBM__=b.getBookmark();b.execCommand("bold")}if(Sys.Extended.UI.HTMLEditor.isIE){var d=null,r="<span id="+q+"></span>",o=b.duplicate();try{b.pasteHTML(r)}catch(y){}d=a._doc.getElementById(q);if(d==null)return[];if(typeof p!=n)a.__saveBM__=d;if(d.nextSibling!=null&&!Sys.Extended.UI.HTMLEditor.isInlineElement(d.nextSibling)){d.parentNode.removeChild(d);return[]}b.expand("word");b.select();if(b.text.length==0){d.parentNode.removeChild(d);o.select();return[]}var t=new RegExp(r,"ig");if(!t.test(b.htmlText.replace(/[\n\r]/g,""))){d.parentNode.removeChild(d);o.select();return[]}t=new RegExp(r+"(</span>|&nbsp;|[\\s])*$","ig");if(t.test(b.htmlText.replace(/[\n\r]/g,""))){d.parentNode.removeChild(d);o.select();return[]}while(b.text.length>0&&b.text.substr(b.text.length-1,1)==" "){b.moveEnd("character",-1);b.select();if(b.text.length==0){d.parentNode.removeChild(d);o.select();return[]}}typeof p==n&&d.parentNode.removeChild(d);return a._getTextNodeCollection()}function s(b){var a=/[\d\w]/;if(a.test(b))return h;a=/[\u0080-\u024F]/;if(a.test(b))return h;a=/[\u0370-\u2000]/;return a.test(b)?h:true}if(!a.insertHTML("<span id='"+w+u+q+u+x+"'></span>"))return[];var c=a._doc.getElementById(w),e=a._doc.getElementById(x),g=a._doc.getElementById(q);Sys.Extended.UI.HTMLEditor.positionInParagraph(c,c.previousSibling,true,c.parentNode,s);try{a._trySelect(c,e)}catch(y){}l=a._getSelection();k=a._createRange(l);i=!Sys.Extended.UI.HTMLEditor.isIE?Sys.Extended.UI.HTMLEditor.Trim(a.getSelectedHTML()):"";j=Sys.Extended.UI.HTMLEditor.isIE&&k.text.length>0||!Sys.Extended.UI.HTMLEditor.isIE&&i.length>0;if(!j||a._getTextNodeCollection().length==0){var f=a._doc.createTextNode("");c.parentNode.insertBefore(f,c);c.parentNode.removeChild(c);e.parentNode.removeChild(e);g.parentNode.removeChild(g);var b=a._doc.createRange();b.setStart(f,0);b.setEnd(f,0);b.setStart(f,0);b.setEnd(f,0);a._removeAllRanges(m);a._selectRange(m,b);return[]}e.parentNode.insertBefore(c,g);Sys.Extended.UI.HTMLEditor.positionInParagraph(e,e.nextSibling,h,e.parentNode,s);a._trySelect(c,e);l=a._getSelection();k=a._createRange(l);i=!Sys.Extended.UI.HTMLEditor.isIE?Sys.Extended.UI.HTMLEditor.Trim(a.getSelectedHTML()):"";j=Sys.Extended.UI.HTMLEditor.isIE&&k.text.length>0||!Sys.Extended.UI.HTMLEditor.isIE&&i.length>0;if(!j||a._getTextNodeCollection().length==0){var f=a._doc.createTextNode("");c.parentNode.insertBefore(f,c);c.parentNode.removeChild(c);e.parentNode.removeChild(e);g.parentNode.removeChild(g);var b=a._doc.createRange();b.setStart(f,0);b.setEnd(f,0);b.setStart(f,0);b.setEnd(f,0);a._removeAllRanges(m);a._selectRange(m,b);return[]}Sys.Extended.UI.HTMLEditor.positionInParagraph(c,c.previousSibling,true,c.parentNode,s);a._trySelect(c,e);l=a._getSelection();k=a._createRange(l);i=!Sys.Extended.UI.HTMLEditor.isIE?Sys.Extended.UI.HTMLEditor.Trim(a.getSelectedHTML()):"";j=Sys.Extended.UI.HTMLEditor.isIE&&k.text.length>0||!Sys.Extended.UI.HTMLEditor.isIE&&i.length>0;if(Sys.Extended.UI.HTMLEditor.isIE)if(typeof p!=n)a.__saveBM__=g;else g.parentNode.removeChild(g);else a.__saveBM__=[g,0];if(j)v=a._getTextNodeCollection();c.parentNode.removeChild(c);e.parentNode.removeChild(e);return v},_setStyleForTyping:function(c){var a=this,i=c.name.replace(/\-(\w)/g,function(b,a){return a.toUpperCase()}),h=c.value,j=c.repl;if(a._StyleForTyping==null)a._StyleForTyping=[];for(var e=[],d=true,b=0;b<a._StyleForTyping.length;b++){var g=a._StyleForTyping[b].name.replace(/\-(\w)/g,function(b,a){return a.toUpperCase()}),f=a._StyleForTyping[b].value;if(!(g==i&&(f==h||j)))e.push(a._StyleForTyping[b]);else d=false}a._StyleForTyping=e;d&&a._StyleForTyping.push(c)},_trySelect:function(c,d){var b=null,a=this,e=a._getSelection(),i=b,j=b;if(Sys.Extended.UI.HTMLEditor.isIE){e.empty();e=a._getSelection();var f=a._createRange(e),g=a._createRange(e);try{c!=b&&f.moveToElementText(c);d!=b&&g.moveToElementText(d);if(c!=b&&d!=b){f.setEndPoint("EndToEnd",g);f.select()}else if(c!=b)f.select();else d!=b&&g.select()}catch(k){}}else try{i=a._doc.createTextNode("");j=a._doc.createTextNode("");c.parentNode.insertBefore(i,c);d.parentNode.insertBefore(j,d);var h=a._doc.createRange();h.setStart(i,0);h.setEnd(j,0);a._removeAllRanges(e);a._selectRange(e,h)}catch(k){}},getSelectedHTML:function(){var c=this._getSelection(),b=this._createRange(c),a=null;if(Sys.Extended.UI.HTMLEditor.isIE)a=b.htmlText;else if(Sys.Extended.UI.HTMLEditor.isSafari&&(c.type=="Caret"||c.type=="None"))a="";else{if(Sys.Extended.UI.HTMLEditor.isSafari)if(b.cloneContents()==null)return"";a=Sys.Extended.UI.HTMLEditor.getHTML(b.cloneContents(),false)}return a},_queryCommandState:function(h){var r="vertical-align",k="line-through",j="strikethrough",q="text-decoration",f="underline",m="font-weight",i="bold",g=this,n=g._rangeStartEnd();if(n==null)return false;try{var a={name:"none",value:"none"};switch(h.toLowerCase()){case i:a={name:m,value:i};break;case"italic":a={name:"font-style",value:"italic"};break;case f:a={name:q,value:f};break;case j:a={name:q,value:k};break;case"superscript":a={name:r,value:"super"};break;case"subscript":a={name:r,value:"sub"}}var b=n.start,c=n.end,d=Sys.Extended.UI.HTMLEditor.getStyle(b,a.name).toString().toLowerCase(),e=Sys.Extended.UI.HTMLEditor.getStyle(c,a.name).toString().toLowerCase();if(a.name==m&&d=="700")d=i;if(a.name==m&&e=="700")e=i;if(/MSIE (5|6)/.test(navigator.userAgent)&&h.toLowerCase()==j&&(d==f||e==f)){while(b&&Sys.Extended.UI.HTMLEditor.isStyleTag(b.tagName)){if(b.style.textDecoration.indexOf(k)>=0){d=b.style.textDecoration;break}b=b.parentNode}while(c&&Sys.Extended.UI.HTMLEditor.isStyleTag(c.tagName)){if(c.style.textDecoration.indexOf(k)>=0){e=c.style.textDecoration;break}c=c.parentNode}}if(Sys.Extended.UI.HTMLEditor.isSafari&&(h.toLowerCase()==j||h.toLowerCase()==f)){var l=h.toLowerCase();if(l==j)l=k;while(b&&Sys.Extended.UI.HTMLEditor.isStyleTag(b.tagName)){if(b.style.textDecoration.indexOf(l)>=0){d=b.style.textDecoration;break}b=b.parentNode}while(c&&Sys.Extended.UI.HTMLEditor.isStyleTag(c.tagName)){if(c.style.textDecoration.indexOf(l)>=0){e=c.style.textDecoration;break}c=c.parentNode}}var o=d.indexOf(a.value)>=0&&e.indexOf(a.value)>=0;if(g._StyleForTyping!=null&&g._StyleForTyping.length>0)for(var p=0;p<g._StyleForTyping.length;p++){var s=g._StyleForTyping[p];if(s.name==a.name&&s.value==a.value){o=!o;break}}return o}catch(t){return false}},_textAlignState:function(b){var a=this._rangeStartEnd();if(a==null)return false;try{var c=this._textAlignStateSingle(a.start),d=this._textAlignStateSingle(a.end);return c==b&&d==b}catch(e){return false}},_textAlignStateSingle:function(a){while(a&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.tagName))a=a.parentNode;if(a!=null){var b=a.tagName.toUpperCase();if(b=="P"||b=="DIV")return a.style.textAlign.toLowerCase()}return null},_rangeStartEnd:function(){var i="<span id='",b=null,e=this;if(e.isControl())return b;try{var o=e._getSelection(),a=e._createRange(o),c=b,d=b;if(!Sys.Extended.UI.HTMLEditor.isIE){function f(c,d){var e=b;while(e==b){if(c.nodeType==3)if(d&&a.startContainer!=a.endContainer&&a.startOffset==c.length&&c.nextSibling)e=f(c.nextSibling,d);else if(!d&&a.startContainer!=a.endContainer&&a.endOffset==0&&c.previousSibling)e=f(c.previousSibling,d);else e=c;else if((d?c.firstChild:c.lastChild)==b)e=b;else e=f(d?c.firstChild:c.lastChild,d);if(e==b){c=d?c.nextSibling:c.previousSibling;if(c==b)return b}else return e}}var n=e._getParent(a);if(n.nodeType!=3&&a.startContainer==a.endContainer&&a.startOffset==a.endOffset&&a.startContainer.childNodes.item(a.startOffset).tagName&&Sys.Extended.UI.HTMLEditor.isStyleTag(a.startContainer.childNodes.item(a.startOffset).tagName))return{start:a.startContainer.childNodes.item(a.startOffset),end:a.startContainer.childNodes.item(a.startOffset)};c=f(a.startContainer,true);if(c!=b&&c.parentNode!=b)c=c.parentNode;if(c==b)c=a.startContainer;d=f(a.endContainer,false);if(d!=b&&d.parentNode!=b)d=d.parentNode;if(d==b)d=a.endContainer}else if(a.text.length==0)c=d=e._getParent(a);else{var m=Sys.Extended.UI.HTMLEditor.smartClassName+"_right_marker",l=Sys.Extended.UI.HTMLEditor.smartClassName+"_left_marker",k=a.duplicate(),j=a.duplicate();k.setEndPoint("EndToStart",a);j.setEndPoint("StartToEnd",a);j.pasteHTML(i+m+"'/>");k.pasteHTML(i+l+"'/>");var g=e._doc.getElementById(l),h=e._doc.getElementById(m);c=g.parentNode;d=h.parentNode;g.parentNode.removeChild(g);h.parentNode.removeChild(h)}return{start:c,end:d}}catch(p){return b}},rtlState:function(){return this._doc.body.style.direction&&this._doc.body.style.direction=="rtl"?true:false},openWait:function(){this._editPanel.openWait()},closeWait:function(){this._editPanel.closeWait()}};Sys.Extended.UI.HTMLEditor.DesignPanel.ScriptRecover=function(){var a=this;a.scriptsArray=[];a.scriptsArray_index=-1;a.regReplScript1=function(b,a){this.scriptsArray.push(a);return""};a.regReplFromScript=function(b,a){return a.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&")};a.regReplFromScript1=function(e,c,f,d){var a=this;a.scriptsArray_index++;var b;if(!Sys.Extended.UI.HTMLEditor.isIE)b=a.scriptsArray[a.scriptsArray_index].replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"');else b=a.scriptsArray[a.scriptsArray_index];return c+b+d}};Sys.Extended.UI.HTMLEditor.DesignPanel.registerClass("Sys.Extended.UI.HTMLEditor.DesignPanel",Sys.Extended.UI.HTMLEditor.ModePanel);
//END HTMLEditor.DesignPanel.js
//START HTMLEditor.HtmlPanel.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.HtmlPanel=function(b){var a=this;Sys.Extended.UI.HTMLEditor.HtmlPanel.initializeBase(a,[b]);a._onfocus$delegate=Function.createDelegate(a,a._onfocus);if(Sys.Extended.UI.HTMLEditor.isIE&&document.compatMode!="BackCompat")a._onresize$delegate=Function.createDelegate(a,a._onresize)};Sys.Extended.UI.HTMLEditor.HtmlPanel.prototype={_activate:function(c){var a=this;a._shouldResize=false;var b=a.get_element();if(Sys.Extended.UI.HTMLEditor.isIE&&Sys.Browser.version>6&&document.compatMode!="BackCompat"&&b.parentNode.clientHeight>0)a._shouldResize=true;Sys.Extended.UI.HTMLEditor.HtmlPanel.callBaseMethod(a,"_activate");if(Sys.Extended.UI.HTMLEditor.isIE){b.value="";var d=a;setTimeout(function(){b.value=c},0)}else b.value=c;$addHandlers(b,{focus:a._onfocus$delegate});a._shouldResize&&$addHandlers(b,{resize:a._onresize$delegate});a._activateFinished()},_deactivate:function(){var a=this,b=a.get_element();a._shouldResize&&$common.removeHandlers(b,{resize:a._onresize$delegate});a._shouldResize=false;$common.removeHandlers(b,{focus:a._onfocus$delegate});b.value="";Sys.Extended.UI.HTMLEditor.HtmlPanel.callBaseMethod(a,"_deactivate")},_getContent:function(){return this.get_element().value},_setContent:function(b){this.get_element().value=b;if(Sys.Extended.UI.HTMLEditor.isReallyVisible(this.get_element().parentNode))try{var a=this.get_element();a.focus();setTimeout(function(){try{Sys.Extended.UI.HTMLEditor.setSelectionRange(a,0,0)}catch(b){}},0)}catch(c){}},_focus:function(){if(Sys.Extended.UI.HTMLEditor.isReallyVisible(this.get_element().parentNode))try{var a=this.get_element();a.focus();setTimeout(function(){try{Sys.Extended.UI.HTMLEditor.setSelectionRange(a,0,0)}catch(b){}},0)}catch(c){}var b=this;setTimeout(function(){b._focused()},0)},_onfocus:function(){this._really_focused();var a=this.get_element();setTimeout(function(){a.focus()},0);return true},_onresize:function(){var b=this.get_element(),a=b.parentNode.clientHeight;if(a>0)b.style.height=a+"px"}};Sys.Extended.UI.HTMLEditor.HtmlPanel.registerClass("Sys.Extended.UI.HTMLEditor.HtmlPanel",Sys.Extended.UI.HTMLEditor.ModePanel);
//END HTMLEditor.HtmlPanel.js
//START HTMLEditor.PreviewPanel.js
Type.registerNamespace("Sys.Extended.UI.HTMLEditor");Sys.Extended.UI.HTMLEditor.PreviewPanel=function(b){var a=this;Sys.Extended.UI.HTMLEditor.PreviewPanel.initializeBase(a,[b]);a._focus$delegate=Function.createDelegate(a,a._focus_event);a._blur$delegate=Function.createDelegate(a,a._blur_event);a._doc=null;a._content="";a._panel_timer=null};Sys.Extended.UI.HTMLEditor.PreviewPanel.prototype={_focus:function(){try{this.get_element().contentWindow.focus()}catch(a){}this._focused()},_focus_event:function(){var a=this;if(a._panel_timer==null){var c=a.get_element().contentWindow,b=a;a._really_focused();a._panel_timer=setTimeout(function(){c.focus();b._really_focused();b._panel_timer=null},0)}return true},_blur_event:function(){if(this._panel_timer!=null){clearTimeout(this._panel_timer);this._panel_timer=null}return true},_activate:function(b){var a=this;Sys.Extended.UI.HTMLEditor.PreviewPanel.callBaseMethod(a,"_activate");a._content=b;a._wasFocused=false;a._initIframe(b);Sys.Extended.UI.HTMLEditor._addEvents(a.get_element().contentWindow,["focus"],a._focus$delegate);Sys.Extended.UI.HTMLEditor._addEvents(a.get_element().contentWindow,["blur"],a._blur$delegate);a._activateFinished()},_deactivate:function(){var a=this;Sys.Extended.UI.HTMLEditor._removeEvents(a.get_element().contentWindow,["blur"],a._blur$delegate);Sys.Extended.UI.HTMLEditor._removeEvents(a.get_element().contentWindow,["focus"],a._focus$delegate);if(Sys.Extended.UI.HTMLEditor.isIE)try{a._doc.open();a._doc.write("");a._doc.close();a.get_element().src="javascript:false;"}catch(b){}a._doc=null;a._content="";Sys.Extended.UI.HTMLEditor.PreviewPanel.callBaseMethod(a,"_deactivate")},_initIframe:function(c){var a=this,b=Sys.Extended.UI.HTMLEditor.Trim(c);a._doc=a.get_element().contentWindow.document;if(Sys.Extended.UI.HTMLEditor.isIE)b=b.replace(/&amp;/ig,"&");a._doc.open();a._doc.write('<html><head><link rel="stylesheet" href="'+a._editPanel.get_documentCssPath()+'" media="all" /></head><body>'+b+"</body></html>");a._doc.close()},_getContent:function(){return this._content},_setContent:function(a){this._content=a;this._initIframe(a)}};Sys.Extended.UI.HTMLEditor.PreviewPanel.registerClass("Sys.Extended.UI.HTMLEditor.PreviewPanel",Sys.Extended.UI.HTMLEditor.ModePanel);
//END HTMLEditor.PreviewPanel.js
//START NoBot.NoBotBehavior.js
Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.NoBotBehavior=function(a){Sys.Extended.UI.NoBotBehavior.initializeBase(this,[a]);this._ChallengeScript=""};Sys.Extended.UI.NoBotBehavior.prototype={initialize:function(){Sys.Extended.UI.NoBotBehavior.callBaseMethod(this,"initialize");var a=eval(this._ChallengeScript);Sys.Extended.UI.NoBotBehavior.callBaseMethod(this,"set_ClientState",[a])},dispose:function(){Sys.Extended.UI.NoBotBehavior.callBaseMethod(this,"dispose")},get_ChallengeScript:function(){return this._ChallengeScript},set_ChallengeScript:function(a){if(this._ChallengeScript!=a){this._ChallengeScript=a;this.raisePropertyChanged("ChallengeScript")}}};Sys.Extended.UI.NoBotBehavior.registerClass("Sys.Extended.UI.NoBotBehavior",Sys.Extended.UI.BehaviorBase);
//END NoBot.NoBotBehavior.js
//START TextboxWatermark.TextboxWatermark.js
// (c) 2010 CodePlex Foundation
(function(){var b="ExtendedWatermark";function a(){var f="WatermarkCssClass",e="WatermarkText",c=true,d="keypress",b=false,a=null;Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.TextBoxWatermarkBehavior=function(c){var b=this;Sys.Extended.UI.TextBoxWatermarkBehavior.initializeBase(b,[c]);b._watermarkText=a;b._watermarkCssClass=a;b._focusHandler=a;b._blurHandler=a;b._keyPressHandler=a;b._propertyChangedHandler=a;b._watermarkChangedHandler=a;b._oldClassName=a;b._clearedForSubmit=a;b._maxLength=a;if(typeof WebForm_OnSubmit=="function"&&!Sys.Extended.UI.TextBoxWatermarkBehavior._originalWebForm_OnSubmit){Sys.Extended.UI.TextBoxWatermarkBehavior._originalWebForm_OnSubmit=WebForm_OnSubmit;WebForm_OnSubmit=Sys.Extended.UI.TextBoxWatermarkBehavior.WebForm_OnSubmit}};Sys.Extended.UI.TextBoxWatermarkBehavior.prototype={initialize:function(){var e=this;Sys.Extended.UI.TextBoxWatermarkBehavior.callBaseMethod(e,"initialize");var f=e.get_element(),i=b,g=Sys.Extended.UI.TextBoxWatermarkBehavior.callBaseMethod(e,"get_ClientState");if(g!=a&&g!=""){i=g=="Focused";Sys.Extended.UI.TextBoxWatermarkBehavior.callBaseMethod(e,"set_ClientState",a)}e._oldClassName=f.className;e._focusHandler=Function.createDelegate(e,e._onFocus);e._blurHandler=Function.createDelegate(e,e._onBlur);e._keyPressHandler=Function.createDelegate(e,e._onKeyPress);$addHandler(f,"focus",e._focusHandler);$addHandler(f,"blur",e._blurHandler);$addHandler(f,d,e._keyPressHandler);e.registerPropertyChanged();var j=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element()).get_Current(),h=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e.get_element());if(""==j||e._watermarkText==j){h.set_Watermark(e._watermarkText);h.set_IsWatermarked(c)}if(i)e._onFocus();else{f.blur();e._onBlur()}e._clearedForSubmit=b;e.registerPartialUpdateEvents();e._watermarkChangedHandler=Function.createDelegate(e,e._onWatermarkChanged);h.add_WatermarkChanged(e._watermarkChangedHandler)},dispose:function(){var c=this,e=c.get_element();if(c._watermarkChangedHandler){Sys.Extended.UI.TextBoxWrapper.get_Wrapper(c.get_element()).remove_WatermarkChanged(c._watermarkChangedHandler);c._watermarkChangedHandler=a}if(e.control&&c._propertyChangedHandler){e.control.remove_propertyChanged(c._propertyChangedHandler);c._propertyChangedHandler=a}if(c._focusHandler){$removeHandler(e,"focus",c._focusHandler);c._focusHandler=a}if(c._blurHandler){$removeHandler(e,"blur",c._blurHandler);c._blurHandler=a}if(c._keyPressHandler){$removeHandler(e,d,c._keyPressHandler);c._keyPressHandler=a}Sys.Extended.UI.TextBoxWrapper.get_Wrapper(c.get_element()).get_IsWatermarked()&&c.clearText(b);Sys.Extended.UI.TextBoxWatermarkBehavior.callBaseMethod(c,"dispose")},_onWatermarkChanged:function(){if(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked())this._onBlur();else this._onFocus()},clearText:function(d){var a=this.get_element(),c=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a);c.set_Value("");c.set_IsWatermarked(b);if(d){a.setAttribute("autocomplete","off");a.select()}},_onFocus:function(f){var d=this,e=d.get_element();Sys.Extended.UI.TextBoxWrapper.get_Wrapper(e).get_IsWatermarked()&&d.clearText(f?c:b);e.className=d._oldClassName;if(d._maxLength>0){d.get_element().maxLength=d._maxLength;d._maxLength=a}},_onBlur:function(){var a=this,b=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element());if(""==b.get_Current()||b.get_IsWatermarked()){if(a.get_element().maxLength>0&&a._watermarkText.length>a.get_element().maxLength){a._maxLength=a.get_element().maxLength;a.get_element().maxLength=a._watermarkText.length}a._applyWatermark()}},_applyWatermark:function(){var a=this,b=Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element());b.set_Watermark(a._watermarkText);b.set_IsWatermarked(c);if(a._watermarkCssClass)a.get_element().className=a._watermarkCssClass},_onKeyPress:function(){Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).set_IsWatermarked(b)},registerPropertyChanged:function(){var a=this,b=a.get_element();if(b.control&&!a._propertyChangedHandler){a._propertyChangedHandler=Function.createDelegate(a,a._onPropertyChanged);b.control.add_propertyChanged(a._propertyChangedHandler)}},_onPropertyChanged:function(b,a){"text"==a.get_propertyName()&&this.set_Text(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_Current())},_onSubmit:function(){if(Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_IsWatermarked()){this.clearText(b);this._clearedForSubmit=c}},_partialUpdateEndRequest:function(d,c){var a=this;Sys.Extended.UI.TextBoxWatermarkBehavior.callBaseMethod(a,"_partialUpdateEndRequest",[d,c]);if(a.get_element()&&a._clearedForSubmit){a.get_element().blur();a._onBlur();a._clearedForSubmit=b}},get_WatermarkText:function(){return this._watermarkText},set_WatermarkText:function(b){var a=this;if(a._watermarkText!=b){a._watermarkText=b;Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element()).get_IsWatermarked()&&a._applyWatermark();a.raisePropertyChanged(e)}},get_WatermarkCssClass:function(){return this._watermarkCssClass},set_WatermarkCssClass:function(b){var a=this;if(a._watermarkCssClass!=b){a._watermarkCssClass=b;Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element()).get_IsWatermarked()&&a._applyWatermark();a.raisePropertyChanged(f)}},get_Text:function(){return Sys.Extended.UI.TextBoxWrapper.get_Wrapper(this.get_element()).get_Value()},set_Text:function(b){var a=this;if(""==b){Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element()).set_Current("");a.get_element().blur();a._onBlur()}else{a._onFocus();Sys.Extended.UI.TextBoxWrapper.get_Wrapper(a.get_element()).set_Current(b)}}};Sys.Extended.UI.TextBoxWatermarkBehavior.registerClass("Sys.Extended.UI.TextBoxWatermarkBehavior",Sys.Extended.UI.BehaviorBase);Sys.registerComponent(Sys.Extended.UI.TextBoxWatermarkBehavior,{name:"watermark",parameters:[{name:e,type:"String"},{name:f,type:"String"}]});Sys.Extended.UI.TextBoxWatermarkBehavior.WebForm_OnSubmit=function(){var d=Sys.Extended.UI.TextBoxWatermarkBehavior._originalWebForm_OnSubmit();if(d)for(var b=Sys.Application.getComponents(),a=0;a<b.length;a++){var c=b[a];Sys.Extended.UI.TextBoxWatermarkBehavior.isInstanceOfType(c)&&c._onSubmit()}return d}}if(window.Sys&&Sys.loader)Sys.loader.registerScript(b,["ExtendedBase","ExtendedCommon"],a);else a()})();
//END TextboxWatermark.TextboxWatermark.js
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();
(function() {var fn = function() {$get('ctl00_ucSiteHeader_ToolkitScriptManager1_HiddenField').value += ';;AjaxControlToolkit, Version=4.1.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e:en-US:315e40c1-4559-4b59-ba08-9c63c3f1ef4d:f2c8e708:720a52bf:589eaa30:698129cf:d9d4bb33:a578e1b4:347641bc:5a15a1b0:5f7bdc4f:52352bec:4c797d40:54faba7a:f2b15c81:2a44e3cc:1c9108b5:47a6309d:8d1c8c98:73671002:8a2dc8cf:737231d4:3699b58e:9a87c62e:66bd1a69:3def063d:11fb7995:5ec83a74:67f6b48f:983d445b:3fce0808:5e87ca19:bd1a3ba5:49d880ab:c156824:b399670c:a737f871:7c33c41:1226bbfb:6cba3bab:e48edae4:8cef1288:50a74782:8afeb62d:4b5e28d8:b81afd1e:35576c48';Sys.Application.remove_load(fn);};Sys.Application.add_load(fn);})();
