 var ASPxClientCommandConsts={BOLD_COMMAND:"bold",ITALIC_COMMAND:"italic",UNDERLINE_COMMAND:"underline",STRIKETHROUGH_COMMAND:"strikethrough",SUPERSCRIPT_COMMAND:"superscript",SUBSCRIPT_COMMAND:"subscript",JUSTIFYCENTER_COMMAND:"justifycenter",JUSTIFYLEFT_COMMAND:"justifyleft",INDENT_COMMAND:"indent",OUTDENT_COMMAND:"outdent",JUSTIFYRIGHT_COMMAND:"justifyright",JUSTIFYFULL_COMMAND:"justifyfull",FONTSIZE_COMMAND:"fontsize",FONTNAME_COMMAND:"fontname",FONTCOLOR_COMMAND:"forecolor",BACKCOLOR_COMMAND:"backcolor",FORMATBLOCK_COMMAND:"formatblock",APPLYCSS_COMMAND:"applycss",REMOVEFORMAT_COMMAND:"removeformat",UNDO_COMMAND:"undo",REDO_COMMAND:"redo",COPY_COMMAND:"copy",KBCOPY_COMMAND:"kbcopy",PASTE_COMMAND:"paste",KBPASTE_COMMAND:"kbpaste",CUT_COMMAND:"cut",KBCUT_COMMAND:"kbcut",SELECT_ALL:"selectall",DELETE_COMMAND:"delete",TEXTTYPE_COMMAND:"texttype",NEWPARAGRAPHTYPE_COMMAND:"newparagraphtype",LINEBREAKETYPE_COMMAND:"linebreaktype",PASTEHTML_COMMAND:"pastehtml",RESIZEOBJECT_COMMAND:"resizeobject",DRAGDROPOBJECT_COMMAND:"dragdropobject",DROPOBJECTFROMEXTERNAL_COMMAND:"dropobjectfromexternal",INSERTORDEREDLIST_COMMAND:"insertorderedlist",INSERTUNORDEREDLIST_COMMAND:"insertunorderedlist",UNLINK_COMMAND:"unlink",INSERTLINK_COMMAND:"insertlink",INSERTIMAGE_COMMAND:"insertimage",CHANGEIMAGE_COMMAND:"changeimage",CHECKSPELLING_COMMAND:"checkspelling",INSERTIMAGE_DIALOG_COMMAND:"insertimagedialog",CHANGEIMAGE_DIALOG_COMMAND:"changeimagedialog",INSERTLINK_DIALOG_COMMAND:"insertlinkdialog",CHANGELINK_DIALOG_COMMAND:"changelinkdialog",CheckSpellingCore_COMMAND:"checkspellingcore",Start_COMMAND:"start"};var ASPxCommandMessageConsts=new Object();ASPxCommandMessageConsts[ASPxClientCommandConsts.CUT_COMMAND]="Please use Ctrl+X to Cut";ASPxCommandMessageConsts[ASPxClientCommandConsts.PASTE_COMMAND]="Please use Ctrl+V to Paste";ASPxCommandMessageConsts[ASPxClientCommandConsts.COPY_COMMAND]="Please use Ctrl+C to Copy";Command=_aspxCreateClass(null,{constructor:function(cmdID){this.commandID=cmdID;},Execute:function(cmdValue,editor){return true;},GetCommandID:function(){return this.commandID;},GetState:function(editor){return true;},GetValue:function(editor){return null;},IsDefaultAction:function(){return false;},IsImmediateExecution:function(){return false;},IsHtmlChangeable:function(){return true;},IsLocked:function(editor){return false;},IsReversable:function(){return true;}});HtmlProcessingCommand=_aspxCreateClass(Command,{DeleteNewAddedFontElements:function(selInfo,editor){var newElements=selInfo.newElements;for(var i=0;i<newElements.length;i++){if(__aspxIE||__aspxOpera)newElements[i].removeNode(false);else{var range=editor.GetDesignViewIFrameDocument().createRange();range.selectNodeContents(newElements[i]);var selectedContent=range.extractContents();range.selectNode(newElements[i]);range.deleteContents();range.insertNode(selectedContent);}}},SaveSelectionRangeInfo:function(selectionInfo,editor){this.startR=null;this.endR=null;if(__aspxIE&&!selectionInfo.IsControl()){var range=editor.GetDesignViewIFrameDocument().selection.createRange();this.startR=range.duplicate();this.endR=range.duplicate();this.startR.collapse();this.endR.collapse(false);}},RestoreSelectionRange:function(editor){if(__aspxIE){try{var newRange=editor.GetDesignViewIFrameDocument().selection.createRange();newRange.setEndPoint("StartToStart",this.startR);newRange.setEndPoint("EndToEnd",this.endR);newRange.select();}
catch(e){}}else{var selection=editor.GetDesignViewIFrameWindow().getSelection();if(!__aspxSafari){var rng=selection.getRangeAt(0);rng.collapse(true);}}}});BrowserCommand=_aspxCreateClass(Command,{Execute:function(cmdValue,editor){Command.prototype.Execute.call(this);var contentAreaDoc=editor.GetDesignViewIFrameDocument();if(!this.NeedUseCss())contentAreaDoc.execCommand("useCSS",false,false);var isSuccessfully=contentAreaDoc.execCommand(this.GetCommandName(),false,this.GetCorrectedValue(cmdValue));if(!this.NeedUseCss())contentAreaDoc.execCommand("useCSS",false,true);if((this.commandID==ASPxClientCommandConsts.DELETE_COMMAND)&&__aspxOpera){contentAreaDoc.contentEditable=true;contentAreaDoc.designMode="on";contentAreaDoc.body.focus();}else editor.SetFocus();return isSuccessfully;},GetCommandName:function(){return this.commandID;},GetCorrectedValue:function(value){var retValue=value;if((this.commandID==ASPxClientCommandConsts.FONTSIZE_COMMAND)&&(__aspxSafari)){var val=parseInt(value);switch(val){case 1:retValue="8pt";break;case 2:retValue="10pt";break;case 3:retValue="12pt";break;case 4:retValue="14pt";break;case 5:retValue="18pt";break;case 6:retValue="24pt";break;case 7:retValue="36pt";break;}}return retValue;},GetState:function(editor){var ret=true;if(!this.IsAlwaysEnabledCommand(this.commandID)){try{ret=this.TryGetState(editor);}
catch(ex){ret=false;}}return ret;},GetValue:function(editor){var ret=null;try{ret=this.TryGetValue(editor);}
catch(e){}return ret;},IsLocked:function(editor){var ret=this.TryGetIsLocked(editor);if(__aspxOpera&&ret){try{ret=!this.TryGetState(editor);}
catch(ex){ret=false;}}return ret;},TryGetState:function(editor){return editor.GetDesignViewIFrameDocument().queryCommandState(this.GetCommandName());},TryGetValue:function(editor){return editor.GetDesignViewIFrameDocument().queryCommandValue(this.GetCommandName());},TryGetIsLocked:function(editor){return!editor.GetDesignViewIFrameDocument().queryCommandEnabled(this.GetCommandName());},IsAlwaysEnabledCommand:function(commandID){return this.commandID==ASPxClientCommandConsts.FONTSIZE_COMMAND||this.commandID==ASPxClientCommandConsts.FONTNAME_COMMAND;},NeedUseCss:function(){return true;}});var __aspxHEFakeElementClassName="dxHClass";ApplyCssCommand=_aspxCreateClass(HtmlProcessingCommand,{Execute:function(cmdValue,editor){cmdValue.tagName=_aspxTrim(cmdValue.tagName);cmdValue.cssClass=_aspxTrim(cmdValue.cssClass);if(this.IsExclusionTagName(cmdValue.tagName))return false;var curSelection=editor.CreateRestoreSelection();this.SaveSelectionRangeInfo(curSelection,editor);var parentTagName=curSelection.GetParentElement().tagName.toUpperCase();if(this.IsExclusionTagName(parentTagName)&&(cmdValue.tagName=="")){this.SetClassNameAttribute(curSelection.GetParentElement(),cmdValue.cssClass);}else if(curSelection.GetText()!=""){var selInfo=editor.GetEditorSelectionInfo(true);for(var i=0;i<selInfo.allElements.length;i++){var curElem=selInfo.allElements[i];var targetParentElem=this.GetEqualParentElement(curElem,cmdValue.tagName,cmdValue.cssClass);if(!_aspxIsExists(targetParentElem)){var elemInnerHtml=curElem.innerHTML;var newElement=null;if(cmdValue.tagName){var newElement=null;targetParentElem=this.GetParentElementWithTagName(curElem,cmdValue.tagName);if(_aspxIsExists(targetParentElem))this.SetClassNameAttribute(targetParentElem,cmdValue.cssClass);else{newElement=editor.GetDesignViewIFrameDocument().createElement(cmdValue.tagName);this.SetClassNameAttribute(newElement,cmdValue.cssClass);}}else{newElement=editor.GetDesignViewIFrameDocument().createElement("span");this.SetClassNameAttribute(newElement,__aspxHEFakeElementClassName);newElement.className+=" "+cmdValue.cssClass;}if(newElement){newElement.innerHTML=elemInnerHtml;curElem.innerHTML='';curElem.appendChild(newElement);}}}
this.DeleteNewAddedFontElements(selInfo,editor);if(cmdValue.tagName=="")this.OptimizeChildCssClass(editor.GetDesignViewIFrameDocument().body,cmdValue.cssClass);}
this.RestoreSelectionRange(editor);return true;},GetValue:function(editor){return(__aspxIE)?this.GetValueIE(editor):this.GetValueMoz(editor);},GetValueIE:function(editor){var contentAreaDoc=editor.GetDesignViewIFrameDocument();var curSelection=contentAreaDoc.selection;if(!curSelection)return "";var selRange=curSelection.createRange();var parentElement=(selRange.length>0?selRange(0):selRange.parentElement());return this.GetValueByElement(parentElement);},GetValueMoz:function(editor){var contentWindow=editor.GetDesignViewIFrameWindow();var curSelection=contentWindow.getSelection();if(!curSelection||curSelection.rangeCount!=1)return "";var startNode=(curSelection.anchorNode.nodeType!=3?curSelection.anchorNode:curSelection.anchorNode.parentNode);var endNode=(curSelection.focusNode.nodeType!=3?curSelection.focusNode:curSelection.focusNode.parentNode);if(startNode!=endNode)return "";var restoreSelection=editor.CreateRestoreSelection();return this.GetValueByElement(restoreSelection.GetParentElement());},GetValueByElement:function(element){var tagName="";var cssClass="";if(element&&element.tagName.toLowerCase()!="body"){tagName=element.tagName.toLowerCase();cssClass=element.className;}return{tagName:tagName,cssClass:cssClass};},IsExclusionTagName:function(tagName){tagName=tagName.toUpperCase();return tagName=="IMG"||tagName=="TABLE"||tagName=="OBJECT"||tagName=="EMBED";},OptimizeChildCssClass:function(parentElement,targetCssClass){var fakeElementCollection=_aspxGetChildsByClassName(parentElement,__aspxHEFakeElementClassName);var newElementArray=new Array();for(var i=0;i<fakeElementCollection.length;i++){var newElement=this.TryRemoveFakeElement(fakeElementCollection[i],targetCssClass);if(!newElement)this.RemoveFakeCssClass(fakeElementCollection[i]);else _aspxArrayPush(newElementArray,newElement);}
this.TryMoveCssClassToParent(newElementArray,targetCssClass);},TryRemoveFakeElement:function(fakeElement,targetCssClass){var parentElement=fakeElement.parentNode;var ret=null;if((parentElement.tagName.toUpperCase()!="BODY")&&(parentElement.childNodes.length==1)){var elemInnerHtml=fakeElement.innerHTML;_aspxRemoveElement(fakeElement);parentElement.innerHTML=elemInnerHtml;this.SetClassNameAttribute(parentElement,targetCssClass);ret=parentElement;}else if(targetCssClass=="")_aspxRemoveOuterTags(fakeElement);return ret;},TryMoveCssClassToParent:function(elements,targetCssClass){for(var i=0;i<elements.length;i++){var parentElement=elements[i].parentNode;var parentElementTagName=parentElement.tagName.toUpperCase();if((parentElementTagName=="OL"||parentElementTagName=="UL")&&(elements[i].className==targetCssClass)){this.ProcessListElements(parentElement,targetCssClass);}}},ProcessListElements:function(mainListElement,targetCssClass){var listItemElements=_aspxGetElementsByTagName(mainListElement,"li");var isAllItemNeedClear=true;for(var i=0;i<listItemElements.length;i++){if(listItemElements[i].className!=targetCssClass){isAllItemNeedClear=false;return;}}if(isAllItemNeedClear){this.SetClassNameAttribute(mainListElement,targetCssClass);for(var i=0;i<listItemElements.length;i++)this.SetClassNameAttribute(listItemElements[i],"");}},RemoveFakeCssClass:function(sourceElement){var sourceCssClass=sourceElement.className;sourceCssClass=sourceCssClass.replace(__aspxHEFakeElementClassName,"");sourceCssClass=_aspxTrim(sourceCssClass);sourceElement.className=sourceCssClass;},GetParentElementWithTagName:function(element,tagName){var parentElement=element.parentNode;return parentElement.tagName.toUpperCase()==tagName.toUpperCase()?parentElement:null;},GetEqualParentElement:function(elem,tagName,cssClass){var ret=null;if(tagName&&cssClass)ret=_aspxGetParentByTagNameAndAttributeValue(elem,tagName,"class",cssClass);else if(cssClass)ret=_aspxGetParentByClassName(elem);return ret;},SetClassNameAttribute:function(element,className){if(className)element.className=className;else _aspxRemoveAttribute(element,__aspxNS?"class":"className");}});FontColorBrowserCommand=_aspxCreateClass(BrowserCommand,{GetValue:function(editor){return _aspxColorToHexadecimal(BrowserCommand.prototype.GetValue.call(this,editor));}});BgColorBrowserCommand=_aspxCreateClass(FontColorBrowserCommand,{GetCommandName:function(){return __aspxIE?BrowserCommand.prototype.GetCommandName.call(this):"HiliteColor";}});InsertListCommand=_aspxCreateClass(BrowserCommand,{GetState:function(editor){var curSelection=editor.CreateRestoreSelection();var tagName="";switch(this.GetCommandName()){case ASPxClientCommandConsts.INSERTORDEREDLIST_COMMAND:tagName="OL";break;case ASPxClientCommandConsts.INSERTUNORDEREDLIST_COMMAND:tagName="UL";break;}return _aspxIsExists(_aspxGetParentByTagName(curSelection.GetParentElement(),tagName));}});FormatBlockCommand=_aspxCreateClass(BrowserCommand,{GetCorrectedValue:function(value){return __aspxIE?"<"+value+">":value;},GetValue:function(editor){var value=BrowserCommand.prototype.GetValue.call(this,editor);if(_aspxIsExists(value)){value=value.toString();switch(value.toLowerCase()){case "x":case "":case "normal":value="Normal";break;}}return value;}});RemoveFormatCommand=_aspxCreateClass(BrowserCommand,{Execute:function(cmdValue,editor){BrowserCommand.prototype.Execute.call(this,cmdValue,editor);var curSelection=editor.CreateRestoreSelection();var parentElem=curSelection.GetParentElement();if(!curSelection.IsTextOnly()&&!curSelection.IsControl()&&_aspxIsExists(parentElem))this.CleanElement(parentElem);return true;},CleanElement:function(element){for(var i=0;i<element.childNodes.length;i++)this.CleanElement(element.childNodes[i]);if(element.nodeType==1&&element.tagName.toUpperCase()!="BODY"){_aspxRemoveAllAttributes(element,["href","src","alt","target","id","title","value"]);_aspxRemoveAllStyles(element);}}});PasteHtmlCommand=_aspxCreateClass(Command,{Execute:function(htmlText,htmlEditor,needSelect){Command.prototype.Execute.call(this);this.needSelect=_aspxIsExists(needSelect)?needSelect:true;this.htmlText=htmlText;this.htmlEditor=htmlEditor;if(__aspxIE)return this.ExecuteIE();if(__aspxOpera)return this.ExecuteOpera();if(__aspxNS)return this.ExecuteNS();return false;},ExecuteIE:function(){var doc=this.htmlEditor.GetDesignViewIFrameDocument();if(doc.selection.type.toLowerCase()!="none")doc.selection.createRange().execCommand("Delete");doc.body.setActive();var selRange=doc.selection.createRange();if(selRange&&selRange.length){var elem=selRange.item(0);if(elem&&elem.tagName.toUpperCase()=="BODY"){var formElement=elem.getElementsByTagName("FORM")[0];if(formElement)_aspxSetInnerHtml(formElement,formElement.innerHTML+this.htmlText);}}else{var rngStart=selRange.duplicate();rngStart.collapse(true);selRange.pasteHTML(this.htmlText);if(this.needSelect){rngStart.setEndPoint("EndToEnd",selRange);rngStart.select();}}return true;},ExecuteNS:function(){return this.ExecuteOpera();},ExecuteOpera:function(){var doc=this.htmlEditor.GetDesignViewIFrameDocument();var tmpNode=doc.createElement("SPAN");tmpNode.innerHTML=this.htmlText;this.InsertNodeAtSelection(tmpNode);var range=doc.createRange();range.selectNodeContents(tmpNode);var documentFragment=range.extractContents();range.selectNode(tmpNode);range.deleteContents();this.InsertNodeAtSelection(documentFragment);return true;},InsertNodeAtSelection:function(insertNode){var selection=this.htmlEditor.GetDesignViewIFrameWindow().getSelection();var range=selection.getRangeAt(0);selection.removeAllRanges();range.deleteContents();var container=range.startContainer;var startPosition=range.startOffset;range=this.htmlEditor.GetDesignViewIFrameDocument().createRange();if((container.nodeType==3)&&(insertNode.nodeType==3)){container.insertData(startPosition,insertNode.nodeValue);range.setEnd(container,startPosition+insertNode.length);range.setStart(container,startPosition);}else{var afterNode;if(container.nodeType==3){var textNode=container;container=textNode.parentNode;var nodeText=textNode.nodeValue;var textBefore=nodeText.substr(0,startPosition);var textAfter=nodeText.substr(startPosition);var beforeNode=this.htmlEditor.GetDesignViewIFrameDocument().createTextNode(textBefore);var afterNode=this.htmlEditor.GetDesignViewIFrameDocument().createTextNode(textAfter);container.insertBefore(afterNode,textNode);container.insertBefore(insertNode,afterNode);try{container.insertBefore(beforeNode,insertNode);}
catch(exc){}
container.removeChild(textNode);}else{if(container.childNodes.length>0){afterNode=container.childNodes[startPosition];container.insertBefore(insertNode,afterNode);}else{if(container.tagName!="BODY")container=container.parentNode;container.appendChild(insertNode);}}
try{range.setStart(insertNode,0);if(!_aspxIsExists(afterNode))afterNode=__aspxNS?this.htmlEditor.GetDesignViewIFrameDocument().body:insertNode;range.setEnd(_aspxIsExists(afterNode)?afterNode:this.htmlEditor.GetDesignViewIFrameDocument().body,0);}
catch(exc){}}
try{selection.addRange(range);}
catch(exc){}}});CopyPastCommand=_aspxCreateClass(Command,{Execute:function(cmdValue,editor){var isSuccessfully=true;Command.prototype.Execute.call(this);if(__aspxIE)isSuccessfully=this.ExecuteIE(editor);else{var message="Not supported in this browser";if(_aspxIsExists(ASPxCommandMessageConsts[this.commandID]))message=ASPxCommandMessageConsts[this.commandID];alert(message);return false;}return isSuccessfully;},ExecuteIE:function(editor){var isSuccessfully=false;var isEnabled=!__aspxOpera;if(isEnabled){try{editor.GetDesignViewIFrameDocument().queryCommandEnabled(this.commandID);}
catch(e){isEnabled=false;}}if(isEnabled)isSuccessfully=editor.GetDesignViewIFrameDocument().execCommand(this.commandID,false,null);return isSuccessfully;},IsHtmlChangeable:function(){return this.GetCommandID()!=ASPxClientCommandConsts.COPY_COMMAND;},IsLocked:function(editor){return!editor.GetDesignViewIFrameDocument().queryCommandEnabled(this.commandID);}});SelectAllBrowserCommand=_aspxCreateClass(BrowserCommand,{IsHtmlChangeable:function(){return false;}});TextTypeCommand=_aspxCreateClass(Command,{IsDefaultAction:function(){return true;},IsImmediateExecution:function(){return true;}});KbCopyCommand=_aspxCreateClass(TextTypeCommand,{IsHtmlChangeable:function(){return false;}});KbCutCommand=_aspxCreateClass(TextTypeCommand,{});KbPasteCommand=_aspxCreateClass(TextTypeCommand,{});LineBreakTypeCommand=_aspxCreateClass(TextTypeCommand,{});NewParagraphTypeCommand=_aspxCreateClass(Command,{Execute:function(cmdValue,editor){return editor.GetDesignViewIFrameDocument().execCommand("InsertParagraph",false,null);}});DeleteCommand=_aspxCreateClass(Command,{Execute:function(cmdValue,editor){var isSuccessfully=true;if(__aspxOpera){var designViewIFrameDocument=editor.GetDesignViewIFrameDocument();isSuccessfully=designViewIFrameDocument.execCommand(this.commandID,false,null);designViewIFrameDocument.contentEditable=true;designViewIFrameDocument.body.focus();}return isSuccessfully;},IsImmediateExecution:function(){return!__aspxOpera;}});UndoCommand=_aspxCreateClass(Command,{Execute:function(cmdValue,editor){return editor.Undo();},IsReversable:function(){return false;},IsLocked:function(editor){return!editor.IsUndoAvailable();}});RedoCommand=_aspxCreateClass(Command,{Execute:function(cmdValue,editor){return editor.Redo();},IsReversable:function(){return false;},IsLocked:function(editor){return!editor.IsRedoAvailable();}});CheckSpellingCommand=_aspxCreateClass(Command,{Execute:function(cmdValue,editor){return editor.CheckSpelling();},IsLocked:function(editor){var html=_aspxTrim(editor.GetHtml());return html==""||html=="&nbsp;"||html=="<P>&nbsp;</P>";}});CheckSpellingCoreCommand=_aspxCreateClass(Command,{Execute:function(cmdValue,editor){editor.SetHtmlInternal(cmdValue);return true;}});InsertImageCommand=_aspxCreateClass(BrowserCommand,{Execute:function(cmdValue,editor){BrowserCommand.prototype.Execute.call(this,cmdValue.src,editor);var curSelection=editor.CreateRestoreSelection();var newImageElement=curSelection.GetParentElement();ChangeImageCommand.prototype.SetImageProperties(newImageElement,"",cmdValue.width,cmdValue.height,cmdValue.align,cmdValue.alt);return true;}});ChangeImageCommand=_aspxCreateClass(Command,{Execute:function(cmdValue,editor){ChangeImageCommand.prototype.SetImageProperties(cmdValue.imageElement,cmdValue.src,cmdValue.width,cmdValue.height,cmdValue.align,cmdValue.alt);return true;}});ChangeImageCommand.GetImageProperties=function(imageElement){var imageInfoObject=new Object();imageInfoObject.isCustomSize=false;imageInfoObject.src="";imageInfoObject.width="";imageInfoObject.height="";imageInfoObject.align="";imageInfoObject.alt="";imageInfoObject.src=imageElement.src;imageInfoObject.width=null;imageInfoObject.height=null;imageInfoObject.isCustomSize=ChangeImageCommand.IsExistImageAttribute(imageElement,"width")||ChangeImageCommand.IsExistImageAttribute(imageElement,"height");imageInfoObject.width=imageElement.width;imageInfoObject.height=imageElement.height;var parentNode=_aspxGetParentNode(imageElement);if(parentNode.childNodes.length==1&&parentNode.tagName!="BODY"){imageInfoObject.align=parentNode.style.textAlign;if(!imageInfoObject.align)imageInfoObject.align=parentNode.align;}if(!imageInfoObject.align)imageInfoObject.align=_aspxGetAttribute(imageElement,"align");imageInfoObject.alt=_aspxGetAttribute(imageElement,"alt");return imageInfoObject;}
ChangeImageCommand.IsExistImageAttribute=function(image,attrName){var styleAttr=_aspxGetAttribute(image.style,attrName);return((styleAttr!="")&&(styleAttr!=null))||(!__aspxNS&&(image.outerHTML.toLowerCase().indexOf(attrName+"=")>-1));}
ChangeImageCommand.prototype.SetImageProperties=function(imageElement,src,width,height,align,alt){if(src&&src!="")_aspxSetAttribute(imageElement,"src",src);if(width&&width!="")_aspxSetAttribute(imageElement.style,"width",width);else{_aspxRemoveAttribute(imageElement,"width");_aspxRemoveAttribute(imageElement.style,"width");}if(height&&height!="")_aspxSetAttribute(imageElement.style,"height",height);else{_aspxRemoveAttribute(imageElement,"height");_aspxRemoveAttribute(imageElement.style,"height");}if(alt&&alt!="")_aspxSetAttribute(imageElement,"alt",alt);if(align){var parentNode=_aspxGetParentNode(imageElement);var wrapElem=null;if(parentNode.childNodes.length==1&&parentNode.tagName!="BODY"&&parentNode.tagName!="TD")wrapElem=parentNode;_aspxRemoveAttribute(imageElement,"align");if(align.toLowerCase()=="left"||align.toLowerCase()=="right"){if(wrapElem!=null)_aspxRemoveOuterTags(wrapElem);if(align.toLowerCase()=="right")_aspxSetAttribute(imageElement,"align",align);}else{if(wrapElem==null)wrapElem=_aspxWrapElementInNewElement(imageElement,"DIV");wrapElem.style.textAlign="center";}}}
InsertLinkCommand=_aspxCreateClass(HtmlProcessingCommand,{Execute:function(cmdValue,editor){var curSelection=editor.CreateRestoreSelection();var selContainerElement=curSelection.GetParentElement();this.SaveSelectionRangeInfo(curSelection,editor);var link=_aspxGetParentByTagName(selContainerElement,"A");if(_aspxIsExists(link)){InsertLinkCommand.prototype.SetLinkProperties(link,cmdValue.url,InsertLinkCommand.PrepareLinkText(cmdValue.text),cmdValue.target,cmdValue.title);}else if(curSelection.GetText()!=""||curSelection.GetParentElement().tagName=="IMG"||curSelection.GetParentElement().tagName=="TABLE"){ASPxHtmlEditorCommandList[ASPxClientCommandConsts.UNLINK_COMMAND].Execute(null,editor);var selInfo=editor.GetEditorSelectionInfo();for(var i=0;i<selInfo.allElements.length;i++){var curElem=selInfo.allElements[i];var parentLink=_aspxGetParentByTagName(curElem,"A");if(_aspxIsExists(parentLink)){if(parentLink.href!=cmdValue.url)InsertLinkCommand.prototype.SetLinkProperties(parentLink,cmdValue.url,"",cmdValue.target,cmdValue.title);}else{var elemInnerHtml=curElem.innerHTML;var newLinkElement=editor.GetDesignViewIFrameDocument().createElement('A');newLinkElement.innerHTML=elemInnerHtml;curElem.innerHTML='';if(__aspxSafari)newLinkElement.href="#";curElem.appendChild(newLinkElement);InsertLinkCommand.prototype.SetLinkProperties(newLinkElement,cmdValue.url,InsertLinkCommand.PrepareLinkText(cmdValue.text),cmdValue.target,cmdValue.title);}}
this.DeleteNewAddedFontElements(selInfo,editor);}else{var htmlText="<a href='"+cmdValue.url+"'";if(cmdValue.title)htmlText=this.AddAttributeStringToHtml(htmlText,"title",cmdValue.title);if(cmdValue.target)htmlText=this.AddAttributeStringToHtml(htmlText,"target",cmdValue.target);htmlText+=">"+InsertLinkCommand.PrepareLinkText(cmdValue.text)+"</a>";return ASPxHtmlEditorCommandList[ASPxClientCommandConsts.PASTEHTML_COMMAND].Execute(htmlText,editor);}
this.RestoreSelectionRange(editor);return true;},AddAttributeStringToHtml:function(html,attrName,attrValue){return html+" "+attrName+"='"+attrValue+"'";}});InsertLinkCommand.prototype.SetLinkProperties=function(linkElement,url,text,target,title){_aspxSetOrRemoveAttribute(linkElement,"href",url);_aspxSetOrRemoveAttribute(linkElement,"target",target);_aspxSetOrRemoveAttribute(linkElement,"title",title);if(text!="")linkElement.innerHTML=text;}
InsertLinkCommand.PrepareLinkText=function(text){return text.replace("<","&lt;").replace(">","&gt;");}
DialogCommand=_aspxCreateClass(Command,{Execute:function(cmdValue,editor){var dialog=ASPxHtmlEditorDialogList[this.commandID];if(dialog!=null)dialog.Execute(editor);else alert('Dialog is not found');return true;},IsHtmlChangeable:function(){return false;},GetState:function(editor){return false;},IsLocked:function(editor){return false;}});ChangeImageDialogCommand=_aspxCreateClass(DialogCommand,{IsLocked:function(editor){return!_aspxIsExists(InsertImageDialog.prototype.GetSelectedImage(editor));}});ChangeLinkDialogCommand=_aspxCreateClass(DialogCommand,{IsLocked:function(editor){return!InsertLinkDialog.prototype.IsLinkSelected(editor);}});var ASPxHtmlEditorCommandList={};ASPxHtmlEditorCommandList[ASPxClientCommandConsts.BOLD_COMMAND]=new BrowserCommand(ASPxClientCommandConsts.BOLD_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.ITALIC_COMMAND]=new BrowserCommand(ASPxClientCommandConsts.ITALIC_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.UNDERLINE_COMMAND]=new BrowserCommand(ASPxClientCommandConsts.UNDERLINE_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.STRIKETHROUGH_COMMAND]=new BrowserCommand(ASPxClientCommandConsts.STRIKETHROUGH_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.JUSTIFYCENTER_COMMAND]=new BrowserCommand(ASPxClientCommandConsts.JUSTIFYCENTER_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.JUSTIFYLEFT_COMMAND]=new BrowserCommand(ASPxClientCommandConsts.JUSTIFYLEFT_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.JUSTIFYRIGHT_COMMAND]=new BrowserCommand(ASPxClientCommandConsts.JUSTIFYRIGHT_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.JUSTIFYFULL_COMMAND]=new BrowserCommand(ASPxClientCommandConsts.JUSTIFYFULL_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.SUPERSCRIPT_COMMAND]=new BrowserCommand(ASPxClientCommandConsts.SUPERSCRIPT_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.SUBSCRIPT_COMMAND]=new BrowserCommand(ASPxClientCommandConsts.SUBSCRIPT_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.INDENT_COMMAND]=new BrowserCommand(ASPxClientCommandConsts.INDENT_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.INSERTORDEREDLIST_COMMAND]=new InsertListCommand(ASPxClientCommandConsts.INSERTORDEREDLIST_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.INSERTUNORDEREDLIST_COMMAND]=new InsertListCommand(ASPxClientCommandConsts.INSERTUNORDEREDLIST_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.OUTDENT_COMMAND]=new BrowserCommand(ASPxClientCommandConsts.OUTDENT_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.SELECT_ALL]=new SelectAllBrowserCommand(ASPxClientCommandConsts.SELECT_ALL);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.PASTE_COMMAND]=new CopyPastCommand(ASPxClientCommandConsts.PASTE_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.CUT_COMMAND]=new CopyPastCommand(ASPxClientCommandConsts.CUT_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.COPY_COMMAND]=new CopyPastCommand(ASPxClientCommandConsts.COPY_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.KBPASTE_COMMAND]=new KbPasteCommand(ASPxClientCommandConsts.KBPASTE_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.KBCUT_COMMAND]=new KbCutCommand(ASPxClientCommandConsts.KBCUT_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.KBCOPY_COMMAND]=new KbCopyCommand(ASPxClientCommandConsts.KBCOPY_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.FONTSIZE_COMMAND]=new BrowserCommand(ASPxClientCommandConsts.FONTSIZE_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.FONTNAME_COMMAND]=new BrowserCommand(ASPxClientCommandConsts.FONTNAME_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.FONTCOLOR_COMMAND]=new FontColorBrowserCommand(ASPxClientCommandConsts.FONTCOLOR_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.BACKCOLOR_COMMAND]=new BgColorBrowserCommand(ASPxClientCommandConsts.BACKCOLOR_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.APPLYCSS_COMMAND]=new ApplyCssCommand(ASPxClientCommandConsts.APPLYCSS_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.FORMATBLOCK_COMMAND]=new FormatBlockCommand(ASPxClientCommandConsts.FORMATBLOCK_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.REMOVEFORMAT_COMMAND]=new RemoveFormatCommand(ASPxClientCommandConsts.REMOVEFORMAT_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.UNDO_COMMAND]=new UndoCommand(ASPxClientCommandConsts.UNDO_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.REDO_COMMAND]=new RedoCommand(ASPxClientCommandConsts.REDO_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.LINEBREAKETYPE_COMMAND]=new LineBreakTypeCommand(ASPxClientCommandConsts.LINEBREAKETYPE_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.NEWPARAGRAPHTYPE_COMMAND]=new NewParagraphTypeCommand(ASPxClientCommandConsts.NEWPARAGRAPHTYPE_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.TEXTTYPE_COMMAND]=new TextTypeCommand(ASPxClientCommandConsts.TextType_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.RESIZEOBJECT_COMMAND]=new TextTypeCommand(ASPxClientCommandConsts.RESIZEOBJECT_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.DRAGDROPOBJECT_COMMAND]=new TextTypeCommand(ASPxClientCommandConsts.DRAGDROPOBJECT_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.DROPOBJECTFROMEXTERNAL_COMMAND]=new TextTypeCommand(ASPxClientCommandConsts.DROPOBJECTFROMEXTERNAL_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.DELETE_COMMAND]=new DeleteCommand(ASPxClientCommandConsts.DELETE_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.PASTEHTML_COMMAND]=new PasteHtmlCommand(ASPxClientCommandConsts.PASTEHTML_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.INSERTLINK_COMMAND]=new InsertLinkCommand(ASPxClientCommandConsts.INSERTLINK_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.UNLINK_COMMAND]=new BrowserCommand(ASPxClientCommandConsts.UNLINK_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.CHANGEIMAGE_COMMAND]=new ChangeImageCommand(ASPxClientCommandConsts.CHANGEIMAGE_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.INSERTIMAGE_COMMAND]=new InsertImageCommand(ASPxClientCommandConsts.INSERTIMAGE_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.CHECKSPELLING_COMMAND]=new CheckSpellingCommand(ASPxClientCommandConsts.CHECKSPELLING_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.CheckSpellingCore_COMMAND]=new CheckSpellingCoreCommand(ASPxClientCommandConsts.CHECKSPELLING_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.INSERTIMAGE_DIALOG_COMMAND]=new DialogCommand(ASPxClientCommandConsts.INSERTIMAGE_DIALOG_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.CHANGEIMAGE_DIALOG_COMMAND]=new ChangeImageDialogCommand(ASPxClientCommandConsts.CHANGEIMAGE_DIALOG_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.CHANGELINK_DIALOG_COMMAND]=new ChangeLinkDialogCommand(ASPxClientCommandConsts.CHANGELINK_DIALOG_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.INSERTLINK_DIALOG_COMMAND]=new DialogCommand(ASPxClientCommandConsts.INSERTLINK_DIALOG_COMMAND);ASPxHtmlEditorCommandList[ASPxClientCommandConsts.Start_COMMAND]=new Command(ASPxClientCommandConsts.TEXTTYPE_COMMAND);var __aspxEmptySelection="empty";CommandManager=_aspxCreateClass(null,{constructor:function(htmlEditor){this.htmlEditor=htmlEditor;this.commandIdArray=new Array();this.currentCmdIDIndex=-1;this.lastRestoreSelection=null;this.restoreHtmlArray=new Array();this.undoSelectionArray=new Array();this.redoSelectionArray=new Array();this.ExecuteCommand(ASPxClientCommandConsts.Start_COMMAND,"null",true);},ExecuteCommand:function(cmdID,cmdValue,addToUndoStack){var isSuccessfully=false;if(!ASPxHtmlEditorCommandList[cmdID].IsHtmlChangeable()||!addToUndoStack)isSuccessfully=ASPxHtmlEditorCommandList[cmdID].Execute(cmdValue,this.htmlEditor);else{this.OnCommandExecuting(cmdID);isSuccessfully=ASPxHtmlEditorCommandList[cmdID].Execute(cmdValue,this.htmlEditor);var needAddToStack=isSuccessfully&&ASPxHtmlEditorCommandList[cmdID].IsReversable();if(needAddToStack){this.ClearActionsToRedo();this.currentCmdIDIndex=this.commandIdArray.length;_aspxArrayPush(this.commandIdArray,cmdID);}
this.OnCommandExecuted(needAddToStack);}return isSuccessfully;},Undo:function(depth){depth=Math.min(depth,this.commandIdArray.length);var actionCount=this.commandIdArray.length;depth=Math.min(depth,this.commandIdArray.length);while((depth>0)&&(this.currentCmdIDIndex>0)&&(this.currentCmdIDIndex<actionCount)){this.htmlEditor.SetHtmlInternal(this.GetRestoreText(this.currentCmdIDIndex-1));this.GetUndoSelection(this.currentCmdIDIndex-1).Restore();this.currentCmdIDIndex--;depth--;}return true;},Redo:function(depth){depth=Math.min(depth,this.commandIdArray.length);var actionIndex=this.currentCmdIDIndex+1;while(depth>0&&this.commandIdArray.length>=actionIndex){this.htmlEditor.SetHtmlInternal(this.GetRestoreText(actionIndex));this.GetRedoSelection(actionIndex).Restore();this.currentCmdIDIndex=actionIndex;actionIndex++;depth--;}return true;},OnCommandExecuting:function(cmdID){if(this.IsUndoRedoCommand(cmdID)&&_aspxIsExists(this.commandIdArray[this.currentCmdIDIndex+1]))return;if(_aspxIsExists(this.commandIdArray[this.currentCmdIDIndex])){var prevActionUndoSelection=this.htmlEditor.SaveLastSelection();if(this.IsLastCommandImmediateExecute()){this.AddNewItemToArray(this.restoreHtmlArray,this.currentCmdIDIndex,this.lastHTML);this.UpdateOrAddNewItemToArray(this.undoSelectionArray,this.currentCmdIDIndex,prevActionUndoSelection);this.AddNewItemToArray(this.redoSelectionArray,this.currentCmdIDIndex,_aspxCloneObject(this.lastRestoreSelection));}else this.undoSelectionArray[this.currentCmdIDIndex]=prevActionUndoSelection;}},OnCommandExecuted:function(needAddToStack){var lastCmdID=this.GetLastCommandID();if(needAddToStack&&!ASPxHtmlEditorCommandList[lastCmdID].IsImmediateExecution()){this.AddNewItemToArray(this.restoreHtmlArray,this.currentCmdIDIndex,this.GetEditorHtml());this.AddNewItemToArray(this.undoSelectionArray,this.currentCmdIDIndex,__aspxEmptySelection);this.AddNewItemToArray(this.redoSelectionArray,this.currentCmdIDIndex,this.htmlEditor.SaveLastSelection());}},ClearActionsToRedo:function(){if(this.IsRedoAvailable()){this.lastRestoreSelection=null;var startIndex=this.currentCmdIDIndex+1;var length=this.commandIdArray.length-this.currentCmdIDIndex;this.commandIdArray.splice(startIndex,length);this.restoreHtmlArray.splice(startIndex,length);this.undoSelectionArray.splice(startIndex,length);this.redoSelectionArray.splice(startIndex,length);}},ClearUndoHistory:function(){this.lastRestoreSelection=null;this.currentCmdIDIndex=-1;this.commandIdArray.length=0;this.commandIdArray.length=0;this.restoreHtmlArray.length=0;this.undoSelectionArray.length=0;this.redoSelectionArray.length=0;this.ExecuteCommand(ASPxClientCommandConsts.Start_COMMAND,"null",true);},CleanEmptyRestoreHtml:function(){if(this.GetEditorHtml()==this.lastHTML){_aspxArrayRemoveAt(this.commandIdArray,this.currentCmdIDIndex);this.currentCmdIDIndex=this.commandIdArray.length-1;}},GetEditorHtml:function(){return this.htmlEditor.GetHtml();},GetRestoreText:function(index){return this.restoreHtmlArray[index];},GetRedoSelection:function(index){return this.redoSelectionArray[index];},GetUndoSelection:function(index){return this.undoSelectionArray[index];},IsRedoAvailable:function(){return(this.commandIdArray.length-1>this.currentCmdIDIndex);},IsUndoAvailable:function(){return this.currentCmdIDIndex>0;},UpdateLastRestoreSelectionAndHTML:function(){if(this.lastRestoreSelection==null)this.lastRestoreSelection=this.htmlEditor.CreateRestoreSelection();this.lastRestoreSelection.Save();this.UpdateLastRestoreHtml();},UpdateLastRestoreHtml:function(){this.lastHTML=this.GetEditorHtml();},IsLastCommandImmediateExecute:function(){var lastCmdID=this.GetLastCommandID();var isImmediateExecution=ASPxHtmlEditorCommandList[lastCmdID].IsImmediateExecution();return(lastCmdID!=null)&&isImmediateExecution&&(this.currentCmdIDIndex==this.commandIdArray.length-1);},IsDeleting:function(){var lastCmdID=this.GetLastCommandID();return(lastCmdID!=null)&&(lastCmdID==ASPxClientCommandConsts.DELETE_COMMAND)&&(this.currentCmdIDIndex==this.commandIdArray.length-1);},IsUndoRedoCommand:function(cmdID){return(cmdID==ASPxClientCommandConsts.REDO_COMMAND)||(cmdID==ASPxClientCommandConsts.UNDO_COMMAND);},GetLastCommandID:function(){var curAction=this.commandIdArray[this.currentCmdIDIndex];return _aspxIsExists(curAction)?curAction:null;},AddNewItemToArray:function(array,index,value){if(!_aspxIsExists(array[index]))_aspxArrayPush(array,value);},UpdateOrAddNewItemToArray:function(array,index,value){if(!_aspxIsExists(array[index]))_aspxArrayPush(array,value);else if(array[index]==__aspxEmptySelection)array[index]=value;}});CommandManager.prototype.IsDefaultActionCommand=function(cmdID){return(cmdID==ASPxClientCommandConsts.KBPASTE_COMMAND)||(cmdID==ASPxClientCommandConsts.KBCUT_COMMAND)||(cmdID==ASPxClientCommandConsts.LINEBREAKETYPE_COMMAND);}
var ASPxShortcuts=[[ASPxClientCommandConsts.BOLD_COMMAND,"CTRL+B"],[ASPxClientCommandConsts.ITALIC_COMMAND,"CTRL+I"],[ASPxClientCommandConsts.UNDERLINE_COMMAND,"CTRL+U"],[ASPxClientCommandConsts.JUSTIFYLEFT_COMMAND,"CTRL+L"],[ASPxClientCommandConsts.JUSTIFYCENTER_COMMAND,"CTRL+E"],[ASPxClientCommandConsts.JUSTIFYRIGHT_COMMAND,"CTRL+R"],[ASPxClientCommandConsts.JUSTIFYFULL_COMMAND,"CTRL+J"],[ASPxClientCommandConsts.NEWPARAGRAPHTYPE_COMMAND,"CTRL+ENTER"],[ASPxClientCommandConsts.LINEBREAKETYPE_COMMAND,"SHIFT+ENTER"],[ASPxClientCommandConsts.UNDO_COMMAND,"CTRL+Z"],[ASPxClientCommandConsts.REDO_COMMAND,"CTRL+Y"],[ASPxClientCommandConsts.INSERTLINK_DIALOG_COMMAND,"CTRL+K"],[ASPxClientCommandConsts.INSERTIMAGE_DIALOG_COMMAND,"CTRL+G"],[ASPxClientCommandConsts.UNLINK_COMMAND,"CTRL+SHIFT+K"],[ASPxClientCommandConsts.KBPASTE_COMMAND,"CTRL+V"],[ASPxClientCommandConsts.KBPASTE_COMMAND,"SHIFT+INSERT"],[ASPxClientCommandConsts.KBCUT_COMMAND,"CTRL+X"],[ASPxClientCommandConsts.KBCUT_COMMAND,"SHIFT+DELETE"],[ASPxClientCommandConsts.KBCOPY_COMMAND,"CTRL+C"],[ASPxClientCommandConsts.KBCOPY_COMMAND,"CTRL+INSERT"],[ASPxClientCommandConsts.SELECT_ALL,"CTRL+A"]];KeyboardManager=_aspxCreateClass(null,{constructor:function(){this.shortcutCommands=new Array();},AddShortcut:function(shortcutString,commandID){var shortcutCode=_aspxParseShortcutString(shortcutString);this.shortcutCommands[shortcutCode]=commandID;}});KeyboardManager.prototype.IsSystemKey=function(keyCode){if(keyCode>=ASPxKeyConsts.KEY_F1&&keyCode<=ASPxKeyConsts.KEY_F12)return true;if(keyCode>=ASPxKeyConsts.KEY_BACK&&keyCode<=ASPxKeyConsts.KEY_ESC)return true;if(keyCode>=ASPxKeyConsts.KEY_SPACE&&keyCode<=ASPxKeyConsts.KEY_DELETE)return true;if(keyCode==ASPxKeyConsts.KEY_CONTEXT_MENU)return true;return false;}
KeyboardManager.prototype.IsDeleteOrBackSpaceKey=function(keyCode){return(keyCode==ASPxKeyConsts.KEY_DELETE)||(keyCode==ASPxKeyConsts.KEY_BACK);}
KeyboardManager.prototype.IsCursorMovingKey=function(keyCode){return keyCode>=ASPxKeyConsts.KEY_PAGEUP&&keyCode<=ASPxKeyConsts.KEY_DOWN;}
KeyboardManager.prototype.GetShortcutCommand=function(evt){var shortcutCode=_aspxGetShortcutCode(evt.keyCode,evt.ctrlKey,evt.shiftKey,evt.altKey);return this.shortcutCommands[shortcutCode];}