//Copyright (c) 2001-2016 Aspose Pty Ltd. All Rights Reserved. var acw_version="v2018.09.06";var ie;var iemv;var firefox;var chrome;var safari;var opera;var clientpageheight=0;var asynctableheight_map=new Map;var scrollTimeout=null;var scrollendDelay=500;var removeloadinggifDelay=6E4;var PERCOLUMNNUMBER=32;var PERROWNUMBER=32;var HCELL=19;var WCELL=79;var CELL_CONTENT_ROW_DELIMITER="#_@row@_#";var CELL_CONTENT_COL_DELIMITER="#_@col@_#";var CELL_CONTENT_FORMAT_DELIMITER="#_@class@_#";var CELL_CONTENT_SMALL_DELIMITER="#_@_S_@_#";var MSEXCEL_ROW_DELIMITER="\n"; var MSEXCEL_COL_DELIMITER="\t";var global_gridwebkeyevent=false;var java_client=false;var needInitAlignmentAdjust=false;var focusinside=true;var copy_with_style=false;var useESCAsLeave=false;var needValidateall=false;var scrollToInvalidate=true;var current_gridweb=null;var current_cell=null;var current_copy_content=null;var actualcolnumber=0;var actualrownumber=0;var selectrowheader=false;var selectcolheader=false;var lastselcolnumber=0;var lastselrownumber=0;var shiftclick=false; var afterajaxaction=null;var inajaxupdating=false;var haveanyupdate=true;var firstgrid=null;var col_row_cache_index=new Array;var asyncbeforepostpredata=null;var asyncbeforepostafterdata=null;var enableasynccache=true;var ajaxgoon=true;var cell_attributes_array=["nowrap","align","valign","vtype","isrequired","listmenu","validationoperator","validationvalue1","validationvalue2"];initAcwGlobal(); function UperCaseExceptInsideQuote(s){var arr=new Array;var insidequote=false;var str=arr.join("");var ccchar;for(var i=0;i=0){ie=true;iemv=parseInt(s.substring(i+5),10)}else if(s.indexOf("Trident/7.0")>0){ie=true;iemv=11}else if(s.indexOf("Firefox")>=0){firefox=true;HTMLElement.prototype.__defineGetter__("innerText",function(){var anyString="";var childS=this.childNodes;for(var i=0;i";else str+=items[i];this.innerHTML=str});HTMLElement.prototype.__defineGetter__("currentStyle",function(){return getComputedStyle(this,null)});HTMLElement.prototype.__defineSetter__("outerHTML", function(sHTML){var r=this.ownerDocument.createRange();r.setStartBefore(this);var df=r.createContextualFragment(sHTML);this.parentNode.replaceChild(df,this);return sHTML});HTMLElement.prototype.__defineGetter__("outerHTML",function(){var attr;var attrs=this.attributes;var str="<"+this.tagName.toLowerCase();for(var i=0;i";return str+">"+this.innerHTML+""});HTMLElement.prototype.__defineGetter__("canHaveChildren",function(){switch(this.tagName.toLowerCase()){case "area":case "base":case "basefont":case "col":case "frame":case "hr":case "img":case "br":case "input":case "isindex":case "link":case "meta":case "param":return false}return true});HTMLElement.prototype.__defineSetter__("unselectable",function(s){if(s=="on")this.style.MozUserSelect="none"})}else if(s.indexOf("Chrome")>=0){chrome=true;HTMLElement.prototype.__defineGetter__("currentStyle", function(){return getComputedStyle(this,null)})}else if(s.indexOf("Safari")>=0){safari=true;HTMLElement.prototype.__defineGetter__("currentStyle",function(){return getComputedStyle(this,null)})}else if(s.indexOf("Opera")>=0)opera=true;else alert("unknown browser.")}if(!ie){HTMLElement.prototype.contains=function(ele){return this.compareDocumentPosition(ele)&16};HTMLElement.prototype.setActive=function(){return this.focus()}} function Stylesheet(ss){if(typeof ss=="number")ss=document.styleSheets[ss];this.ss=ss}Stylesheet.prototype.getRules=function(){return this.ss.cssRules?this.ss.cssRules:this.ss.rules};Stylesheet.prototype.getRule=function(s){var rules=this.getRules();if(!rules)return null;if(typeof s=="number")return rules[s];s=s.toLowerCase();for(var i=rules.length-1;i>=0;i--)if(rules[i].selectorText.toLowerCase()==s)return rules[i];return null}; Stylesheet.prototype.getStyles=function(s){var rule=this.getRule(s);if(rule&&rule.style)return rule.style;else return null};Stylesheet.prototype.getStyleText=function(s){var rule=this.getRule(s);if(rule&&rule.style&&rule.style.cssText)return rule.style.cssText;else return""}; Stylesheet.prototype.addRule=function(selector,styles,n){if(n==undefined){var rules=this.getRules();n=rules.length}if(this.ss.insertRule)this.ss.insertRule(selector+"{"+styles+"}",n);else if(this.ss.addRule)this.ss.addRule(selector,styles,n)}; Stylesheet.prototype.deleteRule=function(s){if(s==undefined){var rules=this.getRules();s=rules.length-1}if(typeof s!="number"){s=s.toLowerCase();var rules=this.getRules();for(var i=rules.length-1;i>=0;i--)if(rules[i].selectorText.toLowerCase()==s){s=i;break}if(i==-1)return}if(this.ss.deleteRule)this.ss.deleteRule(s);else if(this.ss.removeRule)this.ss.removeRule(s)}; function Event(e){if(window.event){this.e=window.event;return}if(e!=null){this.e=e;return}var func=Event.caller;while(func!=null){var arg0=func.arguments[0];if(arg0)if(arg0.constructor==Event||arg0.constructor==MouseEvent||typeof arg0=="object"&&arg0.preventDefault&&arg0.stopPropagation){this.e=arg0;return}func=func.caller}}Event.prototype.getTarget=function(){return this.e.srcElement||this.e.target}; Event.prototype.getFromElement=function(){if(window.event)return this.e.fromElement;var node;if(this.e.type=="mouseover")node=this.e.relatedTarget;else if(this.e.type=="mouseout")node=this.e.target;if(!node)return;while(node.nodeType!=1)node=node.parentNode;return node}; Event.prototype.getToElement=function(){if(window.event)return this.e.toElement;var node;if(this.e.type=="mouseout")node=this.e.relatedTarget;else if(this.e.type=="mouseover")node=this.e.target;if(!node)return;while(node.nodeType!=1)node=node.parentNode;return node};Event.prototype.getOffset=function(){if(window.event){var offset={offsetX:this.e.offsetX,offsetY:this.e.offsetY};return offset}else{var offset={offsetX:this.e.layerX,offsetY:this.e.layerY};return offset}}; function getClient(o){var left=0;var top=0;while(o.offsetParent){left+=o.offsetLeft;top+=o.offsetTop;if(o.offsetParent.scrollLeft)left-=o.offsetParent.scrollLeft;if(o.offsetParent.scrollTop)top-=o.offsetParent.scrollTop;o=o.offsetParent}return{cx:left,cy:top}}function HTMLEncode(str){var s="";if(str.length==0)return"";s=str.replace(/&/g,"&");s=s.replace(//g,">");s=s.replace(/\"/g,""");return s} function HTMLDecode(str){var s="";if(str.length==0)return"";s=str.replace(/&/g,"&");s=s.replace(/</g,"<");s=s.replace(/>/g,">");s=s.replace(/"/g,'"');return s} function getXMLDocument(element){var src=element.innerHTML;if(src==null||src.length==0)if(!ie)src=element.xml;if(opera){arr=src.match(/\'[^\']*\'/g);if(arr!=null)for(var i=0;i=0;i--)this.removeChild(childNodes[i]);var dp=new DOMParser;var newDOM=dp.parseFromString(xmlString,"text/xml");var newElt=this.importNode(newDOM.documentElement,true);this.appendChild(newElt)};XMLDocument.prototype.__proto__.__defineGetter__("xml",function(){try{return(new XMLSerializer).serializeToString(this)}catch(ex){var d=document.createElement("div");d.appendChild(this.cloneNode(true)); return d.innerHTML}});Element.prototype.__proto__.__defineGetter__("xml",function(){try{return(new XMLSerializer).serializeToString(this)}catch(ex){var d=document.createElement("div");d.appendChild(this.cloneNode(true));return d.innerHTML}});XMLDocument.prototype.__proto__.__defineGetter__("text",function(){return this.firstChild.textContent});Element.prototype.__proto__.__defineGetter__("text",function(){return this.textContent});XMLDocument.prototype.getXML=Element.prototype.getXML=function(){try{return(new XMLSerializer).serializeToString(this)}catch(ex){var d= document.createElement("div");d.appendChild(this.cloneNode(true));return d.innerHTML}};XMLDocument.prototype.getChildNodes=Element.prototype.getChildNodes=function(){return this.childNodes};XMLDocument.prototype.getFirstChild=Element.prototype.getFirstChild=function(){return this.firstChild};XMLDocument.prototype.getLastChild=Element.prototype.getLastChild=function(){return this.lastChild};XMLDocument.prototype.selectSingleNode=Element.prototype.selectSingleNode=function(xpath){var x=this.selectNodes(xpath); if(!x||x.length<1)return null;return x[0]};XMLDocument.prototype.selectNodes=Element.prototype.selectNodes=function(xpath){var xpe=new XPathEvaluator;var nsResolver=xpe.createNSResolver(this.ownerDocument==null?this.documentElement:this.ownerDocument.documentElement);var result=xpe.evaluate(xpath,this,nsResolver,0,null);var found=[];var res;while(res=result.iterateNext())found.push(res);return found}} function getattr(o,name){if(o==null)return null;if(ie&&iemv<8)return o[name];if(o.attributes){var attri=o.getAttribute(name);if(attri!=null)return attri;else return o[name]}}function setInnerText(span,v){span.innerText=v} function getInnerText(o){var span=o;if(span.children.length>0){span=span.children[0];if(span.childNodes.length>0)if(span.childNodes[0].nodeType==3)return span.childNodes[0].nodeValue;else if(span.childNodes[0].tagName="span")span=span.childNodes[0];else return""}var text_inner=span.innerText;if(chrome)return text_inner.replace(/\n$/,"");else if(ie&&o.myInnerText)return o.myInnerText.replace(/\n$/,"");else return text_inner} function getPercentageLength(str){if(str.endsWith("%"))return Number(str.substring(0,str.length-1))/100;else return null} function parseLength(str,xy){reSetDPI();var len=str.length;if(str==null||str==""||str.charAt(len-1)=="%")return null;var nval=new Number(str);if(!isNaN(nval))return nval;var pfx=str.substring(len-2,len).toLowerCase();var val=str.substring(0,len-2);var nval=new Number(val);if(isNaN(nval))return null;var d;if(xy=="x")d=screen.deviceXDPI;else d=screen.deviceYDPI;if(d==null)d=96;switch(pfx){case "px":return nval;case "in":return nval*d;case "cm":return nval/2.54*d;case "mm":return nval/25.4*d;case "pt":return nval/ 72*d;case "pc":return nval/6*d;default:return null}}function getlang(){if(typeof ACWLang!="undefined"&&ACWLang!=null)return ACWLang;else return def_lang} var def_lang={TipCellNoValue:"",TipCellFormula:"",TipCellIsRequired:"",TipCellAnyValue:"",TipCellList:"",TipCellFreeList:"