var __doc=document;function $(A){return __doc.getElementById(A)}function node(A){return __doc.createElement(A)}function evalJS(e){eval(e.responseText)}function getHTTPObject(){var A=false;if(window.XMLHttpRequest){try{A=new XMLHttpRequest()}catch(B){A=false}}else{if(window.ActiveXObject){try{A=new ActiveXObject("Msxml2.XMLHTTP")}catch(B){try{A=new ActiveXObject("Microsoft.XMLHTTP")}catch(B){A=false}}}}return A}function rm(A){while(A&&A.childNodes.length>0){A.removeChild(A.firstChild)}}function read(D,B,C){var A=getHTTPObject();try{A.open("GET",B,!C);if(!C){A.onreadystatechange=function(){if(A.readyState==4){if(A.status!=200){readRetry(D,B,C);return false}if(D){D(A)}}}}A.send(null);if(C){if(A.status!=200){readRetry(D,B,C);return false}if(D){D(A)}}return true}catch(E){readRetry(D,B,C,E.message);return false}}function readRetry(E,C,D,B){var A=$("retryRead");if(A){if(B){A.em=B}else{A.em="No Error"}A.style.display=""}}var floatingWinUrlFunc;function floatTinyWin(A,B){if(!B){return }$("floatingTinyWin").style.display="";$("floatingTinyWinContent").innerHTML=B;if(A){$("floatingTinyWin").onclick=A}}function closeGalleryIntro(){$("desc").style.display="";$("floatingTinyWin").style.display="none"}function floatWin(A,B){ctrl.outOfNUI=true;if(B){$("floatingWin").style.display="";$("floatingWinContent").innerHTML=B;if(A){A()}return }if(A){floatingWinUrlFunc=A}$("floatingWinContent").innerHTML="Loading...";$("floatingWin").style.display="";read(function(C){$("floatingWinContent").innerHTML=C.responseText},floatingWinUrlFunc())}function dropWin(D,C,B,A){if(C.style.display==""){C.style.display="none";return }C.style.display="";var E=findPos(D);C.style.top=E[1]+D.offsetHeight;if(A){C.style.left=E[0]-C.offsetWidth+D.offsetWidth}else{C.style.left=E[0]}floatingPanels.push(C);ctrl.dropWin=true}function loadRightsSetting(){saveRightsSetting("EVERYONE",builder.rights.EVERYONE);saveRightsSetting("MANAGER",builder.rights.MANAGER);saveRightsSetting("USER",builder.rights.USER)}function saveRightsSetting(A,B){if(!A){return }if(!B){B=0}B=parseInt(B);builder.setRights(A,B);if($("rights_desc_"+A)){$("rights_desc_"+A).innerHTML=$("rights_"+B).innerHTML}$("dropdown").style.display="none"}function saveBuilderMode(B,A){var C=nui;if(!B){B=builder.defaultMode}builder.mode=B;if(A){builder.defaultMode=B;C._focus(C.fcol,C.frow)}$("builderMode_desc").innerHTML=$("builderMode"+B).innerHTML;$("builderModes").style.display="none"}function indexOf(C,B){if(!B||!C){return -1}var A=0;for(;B&&AE){E=parseInt(D[0])}}E++;var A=E+"_Sheet "+E;B.href="#"+A;B.sheetName=A;B.onclick=function(){if(mode!=BUILDER){changeSheet(this.sheetName);modeBrowse()}return false};F.className="tabbelow";F.id=A;F.innerHTML="Sheet "+E;sheetNameList.push(A);changeSheet(A)}function newFolder(){var A=prompt("Enter the name of your new folder.","New Folder");if(!A){return }if(A.length<3){floatWin(null,"Your folder name is too short.");return }if(indexOf(A,folderNameList)!=-1){floatWin(null,"Your folder name exists.");return }if(A.indexOf("/")!=-1||A.indexOf("\\")!=-1||A.indexOf("..")!=-1){floatWin(null,"Your folder name is illegal.");return }read(null,"/sims/folder.jsp?a="+ap+"&p="+path+"&f="+encodeURIComponent(A),true);window.location.reload()}function renameSheet(id){if(!owner){return }var split=id.split("_");var newName=prompt("Please enter the new name of this sheet.",decodeURIComponent(split[1]).replace(/\+/g," "));if(!newName){return }if(newName.indexOf("_")!=-1){floatWin(null,'You sheet name cannot contain the character "_".');return }if(newName&&newName!=""){read(function(o){eval(o.responseText)},"/sims/sheet.jsp?act=mv&a="+ap+"&fn="+id+"&n="+encodeURIComponent(newName)+"&p="+encodeURIComponent(path))}}function refreshSheet(id){read(function(o){eval(o.responseText)},"/sims/sheet.jsp?act=rl&a="+ap+"&fn="+id+"&p="+encodeURIComponent(path))}function deleteSheet(id){if(confirm("Are you sure you want to delete this sheet?")){read(function(o){eval(o.responseText)},"/sims/sheet.jsp?act=rm&a="+ap+"&fn="+id+"&p="+encodeURIComponent(path))}}function changeSheet(D){nuiController.resetBrowseLeft();if(D){var B=indexOf(D,sheetNameList);if(B!=-1){sheet=D}}else{if(defaultSheet){var B=indexOf(defaultSheet,sheetNameList);if(B==-1){defaultSheet=null}}}if(!D){var A=window.location.toString();if(defaultSheet){sheet=defaultSheet}else{sheet=sheetNameList[0]}}for(B=0;B=0;B=B-1){C=A[B];if(C[0].removeEventListener){C[0].removeEventListener(C[1],C[2],C[3])}if(C[1].substring(0,2)!="on"){C[1]="on"+C[1]}if(C[0].detachEvent){C[0].detachEvent(C[1],C[2])}C[0][C[1]]=null}}}}();addEvent(window,"unload",EventCache.flush);function findPos(A){var B=curtop=0;if(A.offsetParent){do{B+=A.offsetLeft;curtop+=A.offsetTop}while(A=A.offsetParent);return[B,curtop]}return[A.offsetLeft,A.offsetTop]}var pickedHeader=0;function pickExcelHeader(A){$("headerRow"+pickedHeader).className="";$("headerRow"+A).className="pickedRow";$("pickHeader"+pickedHeader).checked=false;$("pickHeader"+A).checked=true;pickedHeader=A}function pickExcelCell(A){if(A==-1){return }if($("pickCell"+A).checked){$("headerCell"+A).className="";$("pickCell"+A).checked=false}else{$("headerCell"+A).className="pickedCell";$("pickCell"+A).checked=true}}function deleteEntry(A,B){if(confirm("Delete this item?")){read(null,"/sims/del.jsp?a="+encodeURIComponent(ap)+"&d="+A+"&n="+B,true);nuiController.resetBrowseLeft();nuiController.load("","",null)}}function validateAll(){var D=biffdata.biffs;var B="";for(i=0;i0){floatWin(null,"Your value format is not correct for: "+A);return }$("nuiform").submit()}function updateShortcut(B,C,A){if($("newInstUrl").value==""||$("newInstName").value==""){alert("Please enter database name and URL.");return false}else{if(A){progressBar();read(evalJS,"/sims/copyAp.jsp?a="+B+"&i="+A+"&nn="+encodeURIComponent($("newInstName").value)+"&iu="+encodeURIComponent($("newInstUrl").value))}else{nui._blur();builder.saveServer(true);read(evalJS,"/sims/saveShortcut.jsp?a="+B+"&nn="+encodeURIComponent($("newInstName").value)+"&p="+encodeURIComponent($("newInstUrl").value)+C)}}}function calculateCost(){var C=$("numOfLicense");var D=$("monthOfExtension");var B=parseInt(C.options[C.selectedIndex].value);var A=parseInt(D.options[D.selectedIndex].value);var F=25*B;if(B>1000){F=2499}else{if(B>150){F=999}else{if(B>23){F=599}}}var E=F*A;$("cost1").value=E;$("cost2").innerHTML=E}function motd(){if(!ctrl.isIE){return }var A=getCookie("motd");if(!A){floatWin(null,"
"+lm.motd+"
");setCookie("motd","1",3*24*3600*1000)}}function mmailLoadEmail(E){var C=E.split("\n"),B;var A="";for(B=0;B'+D[1]+" "}return A}function setCaretTo(B,C){if(B.createTextRange){var A=B.createTextRange();A.move("character",C);A.select()}else{B.focus();B.setSelectionRange(C,C)}}function browseNextPage(){nuiController.load("","&pd=1",function(){if(mode==BROWSE){browse._init();browse._focus()}})}function browsePrevPage(){nuiController.load("","&pd=-1",function(){if(mode==BROWSE){browse._init();browse._focus()}})}function browseBack(){nui.main.scrollTop=0;if(biffdata.formType=="2"){return }nuiController.load("&gb","",function(){browse._trav(false)},nuiController.LEFT)}function browseForward(){var C=browse._getCell();if(!C){return }var B=browse._getCell().ip;if(!B){return }nui.main.scrollTop=0;var A="&dm="+(biffdata.formType==2?"index":B.domainId)+"&des="+B.domainNodeSeq+"&dnpd="+B.parentDomainId+"&dnpn="+B.parentNodeId;nuiController.load(A,"",function(){browse._trav(true)},nuiController.RIGHT)}function newData(){nui.main.scrollTop=0;if(biffdata.formType=="2"){var A="&dm=index&ft=f&dnpd=-1&dnpn=-1";nuiController.load(A,"",function(){browse._trav(true);modeUpdate()},nuiController.RIGHT)}else{nuiController.load("","&pd=new",function(){modeUpdate()})}}function BiffData(){var A=this;A.biffs=new Array();A.rootDomainId=-1;A.rootNodeId=-1;A.rights="R";A.notify=new Array();A.selections=new Array();A.formulaMap=new Object();A.domainIdCellMapping=new Object();A.existingCellCords=new Array()}BiffData.prototype.debug=function(){var C,B="";for(C=0;C3){this.formType=D[3]}return false}else{if(D[0]=="S"&&H==DATA){this.selections.push(D);return true}}}}var G=new Biff(D,H);if(this.rootDomainId==-1&&H==DATA){if(G.domainId){this.rootDomainId=G.domainId}if(G.nodeId){this.rootNodeId=G.nodeId}}if(H==HEADER){this.domainIdCellMapping[G.domainId]=colNames[G.x]+G.y}G.index=this.biffs.length;if(indexOf(G.x+","+G.y+","+G.domainId,this.existingCellCords)!=-1){var E=this.findBiff(G.domainId,G.y);E.value=G.value;G.updatedCell=true}else{this.biffs.push(G);this.existingCellCords.push(G.x+","+G.y+","+G.domainId)}return G};BiffData.prototype.findBiff=function(D,E){var C,B=this;for(C=0;C3){if(!E[I]){E[I]=S-3}else{E[I]=Math.max(E[I],S-3)}}}}}catch(O){}for(K=0;K50){Q=G.y}}if(Q){this.maxY=Q}for(K=0;K0){A.focusbcell=A.focusbcellList.pop()}}A._init()},checkClickable:function(){var E=browse;var C=E.bcells[E.focusbcell];var F=C&&C.length>1;var B=C&&C[0].ip.biff;var D=B&&B.attr&&B.attr.s;var A=C&&C.length==1&&(C[0].ip.biff.IPType==SELECTOR||C[0].ip.biff.IPType==MSELECTOR)&&owner;return !D&&(F||A)},_init:function(){var M=this,N,G,E;M.bcells=new Array();var H=new Array();var D=new Array();for(E=0;E=B.bcells.length){B.focusbcell=B.bcells.length-1}if(isNaN(B.focusbcell)){B.focusbcell=0}B._focus()},_focus:function(){var B,A=this,C=A.bcells[A.focusbcell];A._nofocus();if(!C){return }for(B=0;B-1;if($("nui_outer")){ctrl.ctrlHeight=$("nui_outer").offsetTop}if(K.isIE8){K.focusWidth=2;K.focusHeight=2;K.focusTop=-1;K.focusLeft=-1;K.dropdownTop=50}else{if(K.isIE){K.focusWidth=2;K.focusHeight=2;K.focusTop=0;K.focusLeft=0;K.dropdownTop=50}else{if(K.isChrome){K.focusWidth=-2;K.focusHeight=-2;K.focusTop=0;K.focusLeft=0;K.dropdownTop=50}else{K.isFF=true;K.focusWidth=-2;K.focusHeight=-2;K.focusTop=-1;K.focusLeft=-1;K.dropdownTop=30}}}K.updateCellIds=new Array();K.updateCellIndex=0;K.dragging=false;K.propoffset=20;K.multiSelected=new Array();K.NUIRowNum=50;K.NUIRowExtendedNum=50;K.NUIColNum=16;K.TABLE_DEF_ROWS=3;K.dropWin=false;K.nuiLock=false},setWidth:function(G,A,H,C){var B=new Object();if(H){var I=H.split("&"),D;for(D=0;D");for(i=0;i<=D;i++){B.push("");for(j=0;j<=ctrl.NUIColNum;j++){B.push("0){if(theme=="default"||mode==BUILDER){A=i}B.push('class="sideCellLeft" onmouseover="dvcellMouseover(this);" ')}else{if(i==0&&j>0){if(theme=="default"||mode==BUILDER){A=colNames[j]}B.push('class="sideCell" onmouseover="dhcellMouseover(this);" ')}else{if(mode==BUILDER){B.push('class="builderEmpty" ')}else{B.push(" ")}}}}B.push(">"+A+"")}B.push("")}B.push("");if(C){return B.join("")}defaultNUIString[mode]=B.join("");return defaultNUIString[mode]}NUI.prototype.setScrolling=function(G){var I=this,B=I.main,D=I.main_outer;var H=B.scrollLeft-(document.body.clientLeft?(D.scrollLeft%document.body.clientLeft):0);var F=G.offsetLeft;var E=G.offsetTop;var C=D.offsetHeight-150;var A=D.offsetWidth*(mode==BUILDER?0.7:1)-200;if(F>A+B.scrollLeft){B.scrollLeft=F-A}else{if(FC+B.scrollTop){B.scrollTop=E-C}else{if(E=ctrl.updateCellIds.length){ctrl.updateCellIndex=ctrl.updateCellIds.length-1}var D=ctrl.updateCellIds[ctrl.updateCellIndex];if(!D){return }var B=D.split("_");C._focus(parseInt(B[1]),parseInt(B[2]))};NUI.prototype.vmove=function(B){var E=this;var A=E.frow;var D=0;var H=null;var G=null;var F=20;while(!H&&F>0){if(D<=0){A+=B;D=E.fcol}else{D--}G="_"+D+"_"+A;var C=E._getcell(D,A);H=C?C.ip:null;F--}if(F==0){return }E._focus(D,A);ctrl.updateCellIndex=indexOf(G,ctrl.updateCellIds)};NUI.prototype.keyUp=function(E){if(!E){return }var H=this._curcell(),I=this;var D=false;var G=E.keyCode;var B=nui._getcell(I.fcol-1,I.frow);var C=H&&H.oldClassName=="builderFocusRight"&&B.builderField;if(mode==BUILDER&&H&&!H.ip&&$("hin").value.length>0&&(H.oldClassName=="builderEmpty"||C||builder.mode==BUILDER_TEXT)){if(builder.mode==BUILDER_FIELDS&&C){var A=builder.cellData[I.fcol-1+","+I.frow].IPType;if(A==SELECTOR||A==MSELECTOR){floatWin(null,"A select field can not be the first field of a table.
Please add a text field instead.\nYou can set the default value to $SEQ for auto sequence defaulting.");return }}H.ip=new Typer();H.ip.cell=H;H.ip.focused=true;H.ip.inputBox=node("input");H.ip.loadValue("")}if(G==27&&(!H||!H.ip||!H.ip.typing)){window.setTimeout("nui._blur();backToBrowse();",500)}else{if((G==13&&H.ip.type==TYPER&&!nui._atHighRow())&&(H&&H.ip&&!H.ip.typingLock)){var F=$("hin").value;H.ip.loadValue(F);H.ip.render();return false}else{if((G>=37&&G<=40)&&(H&&H.ip&&!H.ip.typingLock&&!H.ip.typing)){$("hin").focus();$("hin").select()}else{if(H&&H.ip){if(H.ip.keyUp(E)){D=true}}}}}};NUI.prototype.keyDown=function(G){if(!G){return false}var F=G.altKey;var E=G.ctrlKey;var B=G.shiftKey;var D=this,A=D._curcell();var C=false;if(A&&A.ip){if(!A.ip.keyDown(G)){C=true}}if(!C&&mode!=BROWSE){if(!G){G=window.event}var H=G.keyCode;switch(H){case 13:if(mode==BUILDER){nui._move(0,1)}else{nui.vmove(1)}return 123;break;case 9:if(mode==BUILDER){nui._move(1,0)}else{nui.hmove(1)}return 123;break;case 83:if(F||E){if(mode==UPDATE){submitNUIForm();return 123}else{if(mode==BUILDER){saveBuilder();return 123}}}break}if(A&&A.ip&&A.ip.typingLock){return true}switch(H){case 37:if(mode==BUILDER){nui._move(-1,0)}else{nui.hmove(-1)}break;case 39:if(mode==BUILDER){nui._move(1,0)}else{nui.hmove(1)}break;case 38:if(mode==BUILDER){nui._move(0,-1)}else{nui.vmove(-1)}break;case 40:if(mode==BUILDER){nui._move(0,1)}else{nui.vmove(1)}break;default:return true}return false}};NUI.prototype._getcell=function(A,D){var C=this.main;if(!C||D<0){return null}var B=C.firstChild.rows[D];if(!B||!B.cells||A<0){return null}return B.cells[A]};NUI.prototype._removecell=function(A,D){var C=this.main;if(!C||D<0){return }var B=C.firstChild.rows[D];if(!B||!B.cells||A<0||!B.cells[A]){return }B.cells[A].style.display="none"};NUI.prototype._curcell=function(){var A=this;return A._getcell(A.fcol,A.frow)};NUI.prototype._setFocusColorBack=function(A){var C=this,B;if(C.focusChanged.length>0){for(B=0;B0){B.style.width=parseInt(B.clientWidth)+H;if(F){F.style.left=parseInt(F.offsetLeft)+H;if(F.dWidth){F.dWidth+=H}else{F.dWidth=H}}}};NUI.prototype.addHeight=function(F,E,G){if(isNaN(F)){return }var I=this,H=I._getcell(0,F),D,B=I.main;var A=parseInt(H.offsetHeight)+G;if(A>0){H.style.height=A;if(E){E.style.top=E.offsetTop+G}if(E){if(E.dHeight){E.dHeight+=G}else{E.dHeight=G}}if(noUnit(H.style.height)>40){var J=nui.main.firstChild.rows[F],C;for(C=0;CJ){M=I;I=J;J=M}if(G>H){M=G;G=H;H=M}var L=nui,F,E;var D="";for(E=G;E<=H;E++){var C=true;for(F=I;F<=J;F++){var K=L._getcell(F,E);K.tempOldBackgroundColor=K.style.backgroundColor;K.style.backgroundColor="#FFDDDD";ctrl.multiSelected.push(K);if(!C){D+="\t"}if(K.ip&&K.ip.biff){D+=K.ip.biff.value}else{if(K.biff){D+=K.biff.value}}C=false}D+="\n"}$("hin").value=D;$("hin").focus();$("hin").select()}}addEvent(document,"mousemove",eventDocumentOnmousemove);function eventDocumentOnmousemove(C){if(!C){C=window.event}var A=ctrl.dragging;if(ctrl.builderMoveStart){updateBuilderMove(C)}if(A&&A.className=="dwcell"){var B=parseInt(C.clientX)-noUnit(A.style.left);nui.addWidth(A.index,A,B);nui._updateFocus();positionFilterIcons()}else{if(A&&A.className=="dhcell"){var B=parseInt(C.clientY)-noUnit(A.style.top);nui.addHeight(A.index,A,B);nui._updateFocus()}}}function cellClick(B){if(ctrl.cellClickBlocked){ctrl.cellClickBlocked=false;return }var A=parseInt(B.id.split("_")[1]);var C=parseInt(B.id.split("_")[2]);if(mode==BUILDER){if(!nui._focus(A,C)&&B.ip){B.ip.click()}}else{if(mode==UPDATE){if(B.ip){ctrl.updateCellIndex=indexOf("_"+A+"_"+C,ctrl.updateCellIds)}if(!nui._focus(A,C)&&B.ip){B.ip.click()}}else{if(mode==BROWSE){if(browse.checkClickable()&&!ctrl.dropWin&&ctrl.multiSelected.length==0){browseForward()}}}}}function cellDblclick(B){if(B.ip){var A=parseInt(B.id.split("_")[1]);var C=parseInt(B.id.split("_")[2]);B.ip.dblclick()}}function cellMouseDown(A){if(mode==BUILDER){ctrl.builderMoveStart=A}else{ctrl.multiSelect=A}}function cellMouseover(C){if(ctrl.multiSelect){ctrl.multiSelectEnd=C}else{if(ctrl.builderMoveStart){var B=parseInt(C.id.split("_")[1]);var D=parseInt(C.id.split("_")[2]);if(nui._getcell(B,D).className=="builderFocusRight"){return }ctrl.builderMoveEnd=C;if(ctrl.builderMoveCellMouseover){ctrl.builderMoveCellMouseover.style.backgroundColor=ctrl.builderMoveCellMouseover.tempOldBackgroundColor}C.tempOldBackgroundColor=C.style.backgroundColor;C.style.backgroundColor="#FFDDDD";ctrl.builderMoveCellMouseover=C}else{if(mode==BROWSE&&ctrl.multiSelected.length==0){var A=browse;A.focusbcell=C.browseIndex;A._focus()}}}processMultiSelect()}function cellOnpaste(){var A=nui._curcell();if(A){var B=A.ip;if(B&&B.onpaste){B.onpaste()}}}function processPaste(){var F=$("hin").value,H=nui;while(F.charAt(F.length-1)=="\n"){F=F.substr(0,F.length-1)}$("hin").value=F;if(!nui._atHighRow()){var B,A,D=F.split("\n");var I=H._curcell();var G=parseInt(I.id.split("_")[1]);var E=parseInt(I.id.split("_")[2]);for(B=0;Blisting automatically generated by Ragic. You can remove fields that you do not want, and add descriptions to the form. It is generally not suggested to add fields here.")}}function modeUpdate(){if(biffdata.rights!="W"){floatWin(null,"You don't have access right to enter data here.");return }if(mode==UPDATE){return }mode=UPDATE;displayData();$("bDoneBuild").style.display="none";$("bBrowse").style.display="";$("bEdit").style.display="none";$("bSave").style.display="";$("bBack").style.display="none";$("bNewData").style.display="none";$("bDeleteEntry").style.display="none";$("bInfo").style.display="";$("bBuilderSave").style.display="none";$("bRichText").style.display="none";$("bBuilderMode").style.display="none";$("bBuilderSetting").style.display="none";if(owner){$("bDesign").style.display=""}$("bExcel").style.display="";$("modedesc").innerHTML=lm.editMode;$("menu").style.backgroundColor="#FFCFCF";adjustPrevNext();browse._nofocus();nui.moveInit()}function modeBrowse(){mode=BROWSE;$("nui").style.width=30000;$("nui").style.height=30000;$("propDiv").style.display="none";$("bDoneBuild").style.display="none";$("bBrowse").style.display="none";$("bEdit").style.display="";$("bSave").style.display="none";$("bBack").style.display="";$("bNewData").style.display="";if(owner){$("bDeleteEntry").style.display=""}$("bInfo").style.display="";$("bBuilderSave").style.display="none";$("bRichText").style.display="none";$("bBuilderMode").style.display="none";$("bBuilderSetting").style.display="none";if(owner){$("bDesign").style.display=""}$("bExcel").style.display="";$("modedesc").innerHTML=lm.browseMode;$("menu").style.backgroundColor="";hideEditElements();if(nui){nui.init()}nuiController.load("","&pd=0",function(){browse._init();browse._focus();if(biffdata.formType=="2"){$("bBack").style.display="none";$("bNewData").style.display="";$("bDeleteEntry").style.display="none";$("bEdit").style.display="none"}else{$("bBack").style.display="";$("bNewData").style.display="none";if(owner){$("bDeleteEntry").style.display=""}$("bEdit").style.display=""}adjustPrevNext()})}function setBuilderSelectBox(A){var C=node("div");C.style.cssFloat="left";C.style.display="inline";C.innerHTML="List of Value";A.appendChild(C);var B=node("span");B.className="selbut";B.innerHTML='

';A.appendChild(B)}function shift(B,A,E,C,D){if(!B){return }if(D&&(C&&D!=B.y||!C&&D!=B.x)){return }if(!C&&B.y>A){B.y+=E}else{if(C&&B.x>A){B.x+=E}}}function shiftData(C,B,D,G){var I=shift,A,J=new Object(),F=new Object();if(mode==BUILDER){for(var H in builder.cellData){var E=builder.cellData[H];if(!E){continue}I(E,C,B,D,G);J[E.x+","+E.y]=E}builder.cellData=J;for(var H in builder.freeData){var E=builder.freeData[H];if(!E){continue}I(E,C,B,D,G);F[E.x+","+E.y]=E}builder.freeData=F}else{for(A=0;AA){G[0]=B+F;E[D]=G[0]+"="+G[1]}}if(C&&biffdata.widthCommand){biffdata.widthCommand=E.join("&")}else{if(biffdata.heightCommand){biffdata.heightCommand=E.join("&")}}}function copyDataY(B){var D;for(i=0;i0){P+="|"+R.value}else{P+=R.value}}}this.table.ip.loadValue(P);this.table.ip.render();ctrl.dropWin=true});var C="L_"+createControlBitString()+"_"+F+"_"+B+"_"+M;var D=A.options[i];var J="U_"+createControlBitString()+"_"+F+"_"+B+"_"+M;var I=indexOf(A.nodeIds[i],K)!=-1;E.value=D;E.innerHTML='  '+D+(I?'':"");H.appendChild(E);N.opdivArray.push(E)}if(A.options.length==0){H=O.insertCell(0);H.innerHTML="No Value"}return N};A.listAll=function(){var C=this,B,F=C.container;rm(F);for(B=0;BNo Value"}C.highlighted=0};A.listMatch=function(D){var C=this,B,I=C.container;var G=new Array();var E=new Array();for(B=0;B"+F.substr(0,D.length)+""+F.substring(D.length,F.length);I.appendChild(H)}C.highlighted=-1;return true};A.moveop=function(C){var D=this,E=D.container;if(D.highlighted>=0&&D.highlighted=E.childNodes.length){D.highlighted=E.childNodes.length-1}}var B=E.childNodes[D.highlighted];B.className="selItemOn";this.selector.userInput=B.option}}function getInput(){var A=$("hin").value;if(A=="\n"&&!nui._atHighRow()){return""}$("hin").value="";return A}function opdivclick(){if(mode!=UPDATE){floatWin(null,"You can only make modifications in editing mode.");return }var A=this.selector;if(A){A.loadValue(this.option);A.highlight=true;A.render()}if(this.container){this.container.style.display="none"}$("hin").focus()}var SELECTOR="L",TYPER="D",SELECTION="S",UPLOADER="U",GRAPHICS="G",MSELECTOR="M",FREE="F";function Selector(C,B,A){this.type=SELECTOR;this.domainId=C;this.userInput="";this.highlight=false;this.selectList=selpro.getSelectList(C,B,A)}Selector.prototype.keyDown=function(B){if(this.readOnly){return true}var C=B.keyCode;var A=B.shiftKey;switch(C){case 8:this._backspace(1);break;case 46:this._backspace();break;case 38:if(this.selectList.container.style.display!="none"){this.selectList.moveop(-1);return false}case 40:if(this.selectList.container.style.display!="none"){this.selectList.moveop(1);return false}}return true};Selector.prototype.keyUp=function(A){if(this.readOnly){return false}var B=getInput();if(B&&B.length>0){this._write(B)}return true};Selector.prototype._backspace=function(A){if(this.highlight||!A){this.userInput=""}else{this.userInput=this.userInput.substr(0,this.userInput.length-A)}this.highlight=false;this.selectList.place(this);this.render()};Selector.prototype._write=function(B){var A=this.userInput;if(this.highlight){A=B}else{A+=B}this.highlight=false;if(this.selectList.listMatch(A)){this.userInput=A;this.selectList.place(this);this.render()}else{if(this.userInput==""){this.selectList.listAll();this.selectList.place(this);this.render()}}};Selector.prototype.click=function(){};Selector.prototype.dblclick=function(){};Selector.prototype.focus=function(){this.highlight=true;nui.focus.onclick=selectorClick};Selector.prototype.blur=function(){var A=this;A.highlight=false;nui.focus.onclick=null;A.loadValue(A._getSuggest());A.render();clearDropWin()};Selector.prototype.loadValue=function(E,B){var D=this;D.userInput=E;if(D.biff&&D.inputBox){var F=D._getSuggest();var C=D._getSuggestNodeId();D.biff.value=F;D.biff.nodeId=C;D.inputBox.value=C;if(D.notify&&D.oldSuggest!=F&&!B){var A=D.biff;D.oldSuggest=F;if(C&&C.length>0){read(biffdata.loadData,"/sims/form_subform.jsp?a="+ap+"&p="+encodeURIComponent(path)+"&fn="+encodeURIComponent(sheet)+"&x="+A.x+"&y="+A.y+"&d="+A.domainId+"&n="+C,true)}}}if(mode==UPDATE&&!B&&D.biff&&D.biff.ifCreateInsertRow()&&E&&E.length>0&&(D.biff.attr&&E!=D.biff.attr.dv)){shiftData(this.biff.y,1);copyDataY(this.biff.y);displayData()}};Selector.prototype.render=function(){var G=this.cell;if(this.readOnly){G.style.backgroundColor="#F6F6F6"}var I=nui.focus;G.style.width="100%";G.innerHTML="";var C=node("div"),H=this;G.appendChild(C);var F=node("span");F.className="selbut";F.innerHTML=" ";F.cell=G;F.onmouseover=function(){this.className="selbutOn"};F.onmouseout=function(){this.className="selbut"};F.onclick=selectorClick;G.appendChild(F);var D=H._getSuggest(true);var E=H.emptyValue&&H.userInput=="";var B=node("span");B.className=H.highlight&&!E?"cellSuggest":"cellText";var A=node("span");A.className="cellSuggest";C.appendChild(B);C.appendChild(A);if(E){B.innerHTML=H.emptyValue}else{B.innerHTML=H.userInput}A.innerHTML=D.substring(H.userInput.length,D.length);if(A.innerHTML.length==0){A.style.backgroundColor="white"}};Selector.prototype._getSuggest=function(B){this.selectList.listMatch(this.userInput);if(this.userInput==""){return""}var A=this.selectList.highlighted;var C;if(A>=0){C=A}else{C=indexOf(this.userInput,this.selectList.match);if(!B&&C==-1){C=0}}var D=this.selectList.match[C];if(C==-1){return""}else{if(D){return D}else{return""}}};Selector.prototype._getSuggestNodeId=function(){if(this.userInput==""){return""}var A=this.selectList.matchNodeIds[0];if(A){return A}else{return""}};Selector.prototype.clear=function(){this.userInput="";this.render()};function selectorClick(){var B=this.cell.ip;if(B.readOnly){return }if(B.selectList.container.style.display!="none"){B.selectList.container.style.display="none"}else{var A=parseInt(this.cell.id.split("_")[1]);var C=parseInt(this.cell.id.split("_")[2]);nui._focus(A,C);ctrl.cellClickBlocked=true;clearDropWin();B.selectList.place(B);B.selectList.listAll()}ctrl.dropWin=true}function Typer(){this.type=TYPER;this.typing=false;this.focused=false}Typer.prototype.keyDown=function(D){if(this.readOnly){return true}var F=D.keyCode,I=this;var C=D.altKey;switch(F){case 46:if(!I.typing){var B=nui._getcell(nui.fcol-1,nui.frow);var G=B&&B.ip;var H=nui._getcell(nui.fcol+1,nui.frow);var J=H&&H.ip;var A=!G&&J;if(A&&mode==UPDATE){deleteEntry(this.domainId,this.nodeId)}else{I.clear();I.typing=true;I.render()}}break;case 8:if(!I.typing){I.clear();I.typing=true;I.render()}break}var E=F==13&&(C||nui._atHighRow());return !E};Typer.prototype.keyUp=function(F){if(this.readOnly){return true}var D=$("hin");var A=this.cell;var H=F.keyCode;var E=F.altKey;var G=H==13&&(E||nui._atHighRow());if(!this.typing&&D.value!=D.oldValue){this.typing=true;if(mode==UPDATE&&this.biff&&this.biff.ifCreateInsertRow()){shiftData(this.biff.y,1);copyDataY(this.biff.y);biffdata.debug();displayData()}}if(G){if(E){$("hin").value+="\n"}if(ctrl.isIE){var C=$("hin").createTextRange();C.move("character",$("hin").value.length);C.select()}}if(H==27&&$("hin").oldValue&&this.typing){this.loadValue($("hin").oldValue);$("hin").value=$("hin").oldValue;$("hin").oldValue="";A.ip.typing=false;return true}var B=$("hin").value;this.loadValue(B);this.render();return !G};Typer.prototype.onpaste=function(){window.setTimeout(processPaste,100)};Typer.prototype.click=function(){if(this.typing){this.typingLock=true}};Typer.prototype.dblclick=function(){var A=this;if(!A.typing){$("hin").value=this.value;setCaretTo($("hin"),this.value.length);this.typing=true;this.render();this.typingLock=true}};Typer.prototype.focus=function(){this.focused=true};Typer.prototype.blur=function(){var A=this;A.validate();A.typing=false;A.typingLock=false;A.render();A.focused=false};Typer.prototype.validate=function(C){var A=this;if(A.biff&&A.biff.attr&&A.biff.attr.va){var B=new RegExp(A.biff.attr.va);if(!B.test(A.value)){if(!C){floatWin(null,"Your value format is not correct.")}return false}}return true};Typer.prototype.loadValue=function(E,C){var B=this,A=B.biff;if(E!=B.oldValue){B.changed=true}B.value=E;B.oldValue=E;B.displayValue=C;if(B.inputBox){B.inputBox.value=E}if(A){A.value=E}if(mode!=BUILDER){var D=biffdata.domainIdCellMapping[A.domainId];if(!biffdata.formulaMap[D]){biffdata.formulaMap[D]=new Object()}biffdata.formulaMap[D][A.y]=A.value;formulaBuilder.update(D,A)}};Typer.prototype._renderFocus=function(A){var B=this;if(B.typing){var C=$("hin"),D=C.style;D.width=A.offsetWidth;D.height=A.offsetHeight;D.top=A.offsetTop;D.left=A.offsetLeft;D.display=""}else{hideEditElements()}};Typer.prototype._renderCell=function(A){var B=this;if(B.readOnly){A.style.backgroundColor="#F6F6F6"}else{if(mode!=BUILDER){A.style.backgroundColor=""}}cellRender(A,B.displayValue?B.displayValue:B.value,true)};Typer.prototype.render=function(){var A=nui.focus,B=this;B.cell.style.width="100%";if(!B.typing){B._renderCell(B.cell)}if(B.focused){B._renderFocus(A)}};Typer.prototype.clear=function(){$("hin").value=""};function cellTextProcess(B){if(!B){return B}B=B.toString();var A=/\r\n/gim;B=B.replace(A,"
");A=/\n/gim;B=B.replace(A,"
");A=/(^|[^=\[\]"'])http:\/\/([^\s><]+)/gim;B=B.replace(A,"$1http://$2");A=/([^=\[\]"'])https:\/\/([^\s><]+)/gim;B=B.replace(A,"$1https://$2");A=/\[img\][\s]*([^\[]+)\[\/img\]/gim;B=B.replace(A,"");A=/[ ]{2}/gim;B=B.replace(A,"  ");A=/[\t]/gim;B=B.replace(A,"    ");return B}function loadTextProcess(A){if(!A){return A}A=A.replace(//gim,"\n");A=A.replace(/,/gim,",");return A}var currentBiff;var propOptions;var propOptionIds;var choicesDomainId;function setPropertyTable(C){if(!C||!C.biff){$("prop").innerHTML="";return }else{resetPropertyTable()}var B=C.biff;currentBiff=B;$("at_name").innerHTML=B.value;$("at_spid").innerHTML="_ragic_"+B.domainId+"_?";$("f_ag").style.display="none";if(B.IPType==SELECTOR||B.IPType==MSELECTOR){$("f_ch").style.display="";if(B.IPType==SELECTOR){$("at_it").selectedIndex=1}else{if(B.IPType==MSELECTOR){$("at_it").selectedIndex=4}}choicesDomainId=B.domainId;initChoices()}else{if(B.IPType==UPLOADER){$("at_it").selectedIndex=2}else{if(B.IPType==GRAPHICS){$("at_it").selectedIndex=3}else{$("f_ag").style.display=""}}$("f_ch").style.display="none"}if(!B.attr){B.attr=new Object()}if(B.attr){var A=$("at_l").options[$("at_l").selectedIndex].value;for(var F in B.attr){var H=F;var G=B.attr[F];if(F=="vd"||F=="vdn"){H="s"}if(F=="ln"){H="l"}if(F=="rf"){G=B.domainId}var D=$("at_"+H);if(!D){continue}if(D.tagName.toUpperCase()=="SELECT"){var E;for(E=0;E=macrolines.length){macrolineNum=0;builder.saveServer();return }var A=macrolines[macrolineNum];var B=A.split(" ");if(B[0].toLowerCase()=="move"){nui._focus(parseInt(B[1]),parseInt(B[2]));window.setTimeout("macroLine();",500)}else{if(B[0].toLowerCase()=="type"){macroword=A.substring(5).replace(/\r/,"");macrowordNum=0;macroWord()}else{if(B[0].toLowerCase()=="location"){setCookie("macroLineNum",macrolineNum);location=A.substring(9)}else{if(B[0].toLowerCase()=="prompt"){$("tutorialDesc").innerHTML=A.substring(7);$("tutorialNext").style.display=""}else{if(B[0].toLowerCase()=="end"){$("tutorialDesc").innerHTML=A.substring(4);$("tutorialReplay").style.display=""}else{if(B[0].toLowerCase()=="mode"){modeBuilder();window.setTimeout("macroLine();",1000)}else{if(B[0].toLowerCase()=="sheet"){newSheet();window.setTimeout("macroLine();",1000)}else{if(B[0].toLowerCase()=="pause"){window.setTimeout("macroLine();",parseInt(B[1]))}else{window.setTimeout("macroLine();",1000)}}}}}}}}macrolineNum++}function macroWord(){if(macrowordNum>=macroword.length){window.setTimeout("macroLine();",200);return }var A=macroword.charAt(macrowordNum);var B=new Object();B.keyCode=A.charCodeAt(macrowordNum);nui.keyDown(B);$("hin").value+=A;nui.keyUp(B);macrowordNum++;window.setTimeout("macroWord();",60)}var BUILDER_FIELDS=1,BUILDER_TEXT=2,BUILDER_NOOP=0;var builder={cellData:new Object(),freeData:new Object(),rights:new Object(),unsave:false,mode:BUILDER_NOOP,defaultMode:BUILDER_FIELDS,setContent:function(B,G,F){this.unsave=true;if(this.mode==BUILDER_FIELDS){var E=this.cellData[B+","+G];if(!F&&E){if(E.tableFirst==2){var D=nui._getcell(B,G).ip;D.loadValue("--Deleted--");D.render();floatWin(null,"You're deleting a first column of a table, which is highly not recommended especially if you have already entered some data to this table. It will make the table unable to load correctly. If you really want to delete this field, you can do it again.");E.tableFirst=1;return }if(E.tableFirst==1){floatWin(null,"I warned you, the field will be deleted now. You can still leave design mode now without saving.")}E.unrender();this.cellData[B+","+G]=null}else{if(E){setObjectHeaderValue(E,F);E.render()}else{var A=new BuilderObject(B,G,F,TYPER);this.cellData[B+","+G]=A;this.freeData[B+","+G]=null;A.render()}}}else{if(this.mode==BUILDER_TEXT){var C=this.freeData[B+","+G];if(!F&&C){C.unrender();nui._getcell(B,G).style.backgroundColor="";this.freeData[B+","+G]=null}else{if(C){C.value=F;C.render()}else{var A=new FreeObject(B,G,F);this.cellData[B+","+G]=null;this.freeData[B+","+G]=A;A.render()}}}}},setAction:function(A,E){this.unsave=true;var B=this.freeData[A+","+E];if(B){var C=B.action?B.action:"";var D=prompt("Please enter the URL that you would like this to link to:",C);B.action=D}},setStyle:function(B,G,F,D){this.unsave=true;ctrl.dropWin=true;var E=nui._curcell().ip;var C=$("hin");if(E.typing){builder.setContent(B,G,C.value);E.typing=false;E.changed=true;E.render()}var A=this.freeData[B+","+G];if(!A){return }if(A.styling[F]==D){A.styling[F]=null}else{A.styling[F]=D}A.render();nui._updateFocus()},setAttribute:function(B,E,D,C){this.unsave=true;var A=this.cellData[B+","+E];if(D=="it"){A.IPType=C}else{if(D=="rf"){if(C&&C.length>0){A.attr.rf=A.domainId;A.domainId=C}else{A.domainId=A.attr.rf;A.attr.rf=null}}else{if(D=="s"){A.attr.s=C;A.attr.vd=C;A.attr.vdn=C}else{if(D=="l"){A.attr.l=C;A.attr.ln=C}else{A.attr[D]=C}}}}A.adjustAttributes();A.render()},setRights:function(A,B){if(B==0){B="0"}this.unsave=true;this.rights[A]=B},load:function(H){this.unsave=false;var N=builder;N.cellData=new Object();N.rights=new Object();N.rights.EVERYONE="0";N.rights.USER=3;N.rights.MANAGER=6;N.freeData=new Object();biffdata=new BiffData();biffdata.widthCommand=null;biffdata.heightCommand=null;loadRightsSetting();var L=H.responseText;var O=L.split("\n"),C;for(C=0;C1){biffdata.widthCommand=D[1]}if(D.length>2){biffdata.heightCommand=D[2]}}else{if(D[0]=="A"){var A=D[1].split("&"),B;for(B=0;B0;var D=H;while(D!=I){var K=E?D-1:D+1;var A=this.cellData[K+","+F];this.cellData[D+","+F]=A;A.x=D;D=K;if(K==I){this.cellData[K+","+F]=J;J.x=I;break}}}else{if(!this.cellData[B]){this.cellData[B]=J;this.cellData[C]=null;J.x=I;J.y=G}}nui.init();this.renderAll()}};function checkSave(){if(path=="/designer"){$("bPackage").onclick();return false}return true}function setObjectHeaderValue(G,F){if(!G||!F){return }else{if(!G.value||(G.value.indexOf("|")==-1&&G.value.indexOf("=")==-1)){G.value=F;return }}var B=G.value.split("|");if(B.length==1){G.value=F}else{var E=lang;var A=0;var D=false;for(;AUpload File"}else{if(B=="G"){A.innerHTML="Upload Graphic"}else{A.innerHTML="Free Text"}}}}function saveBuilder(){if(checkSave()){nui._blur();builder.saveServer()}}function updateBuilderMove(A){if(!ctrl.builderMovePrompt){ctrl.builderMovePrompt=node("div");ctrl.builderMovePrompt.style.position="absolute";ctrl.builderMovePrompt.innerHTML=ctrl.builderMoveStart.innerHTML;ctrl.builderMovePrompt.style.backgroundColor=ctrl.builderMoveStart.style.backgroundColor;ctrl.builderMovePrompt.style.fontSize="12px";ctrl.builderMovePrompt.style.width=ctrl.builderMoveStart.offsetWidth;ctrl.builderMovePrompt.style.height=ctrl.builderMoveStart.offsetHeight;document.body.appendChild(ctrl.builderMovePrompt)}ctrl.builderMovePrompt.style.top=0;ctrl.builderMovePrompt.style.left=0;ctrl.builderMovePrompt.style.top=A.clientY;ctrl.builderMovePrompt.style.left=A.clientX}function endBuilderMove(C){if(ctrl.builderMovePrompt){document.body.removeChild(ctrl.builderMovePrompt);ctrl.builderMovePrompt=null}var G,E,F,D;if(ctrl.builderMoveStart){var B=ctrl.builderMoveStart.id;G=parseInt(B.split("_")[1]);E=parseInt(B.split("_")[2]);ctrl.builderMoveStart=null}if(ctrl.builderMoveEnd){var A=ctrl.builderMoveEnd.id;F=parseInt(A.split("_")[1]);D=parseInt(A.split("_")[2]);ctrl.builderMoveEnd=null}if(!G||!E||!F||!D){return }if(G==F&&E==D){return }builder.moveHeader(G,E,F,D)}function Uploader(B){var A=this;A.type=UPLOADER;A.IPType=B}Uploader.prototype.keyDown=function(A){return true};Uploader.prototype.keyUp=function(A){return true};Uploader.prototype.onpaste=function(){};Uploader.prototype.click=function(){this.uploadDiv.style.display=""};Uploader.prototype.dblclick=function(){};Uploader.prototype.focus=function(){};Uploader.prototype.blur=function(){};Uploader.prototype.loadValue=function(B,A){this.biff.value=B;this.render()};Uploader.prototype.render=function(){if(mode==BROWSE){if(this.IPType=="G"){this.cell.style.verticalAlign="top";if(this.biff.value){this.cell.innerHTML=''}}else{this.cell.innerHTML=''+this.biff.value+""}}else{if(mode==UPDATE){this.cell.ip=this;if(this.biff.value){this.cell.innerHTML=""+this.biff.value+""}else{this.cell.innerHTML="Upload"}}}};Uploader.prototype.clear=function(){};Uploader.prototype.createUploadInputElement=function(){var A=this;A.uploadDiv=node("div");A.uploadDiv.id="floatingUpload";A.uploadDiv.className="floatingWin";A.uploadDiv.style.display="none";A.uploadDiv.ip=this;$("nuiform").appendChild(A.uploadDiv);A.uploadDiv.innerHTML='
close
';A.inputBox=A.uploadDiv.childNodes[1];return A.inputBox};function MSelector(){var A=this;A.type=MSELECTOR}MSelector.prototype.keyDown=function(A){return true};MSelector.prototype.keyUp=function(A){return true};MSelector.prototype.onpaste=function(){};MSelector.prototype.click=function(){this.render()};MSelector.prototype.dblclick=function(){};MSelector.prototype.focus=function(){nui.focus.onclick=mselectorClick};MSelector.prototype.blur=function(){};MSelector.prototype.loadValue=function(B,A){this.value=B;this.valueList=B.split("|")};MSelector.prototype.render=function(){rm(this.cell);var B=node("span");B.innerHTML=this.valueList.join(",");B.style.cssFloat="left";this.cell.style.width="100%";this.cell.appendChild(B);var A=node("span");A.className="selbut";A.innerHTML=" ";A.cell=this.cell;A.onmouseover=function(){this.className="selbutOn"};A.onmouseout=function(){this.className="selbut"};A.onclick=mselectorClick;this.cell.appendChild(A)};MSelector.prototype.clear=function(){};function mselectorClick(){if(mode!=UPDATE){floatWin(null,"You can only make modifications in editing mode.");ctrl.dropWin=true;return }var B=this.cell.ip,A=this.cell;if(!B.listdiv){B.selectList=selpro.getSelectList(B.domainId);B.listdiv=B.selectList.listMulti(B.domainId,B.parentDomainId,B.parentNodeId,B.nodeId);B.listdiv.ip=B;B.listdiv.style.top=A.offsetTop+A.clientHeight+ctrl.ctrlHeight;B.listdiv.style.left=A.offsetLeft;$("nuiform").appendChild(B.listdiv);floatingPanels.push(B.listdiv);ctrl.dropWin=true}else{if(B.listdiv.style.display=="none"){B.listdiv.style.top=A.offsetTop+A.clientHeight+ctrl.ctrlHeight;B.listdiv.style.left=A.offsetLeft;B.listdiv.style.display="";floatingPanels.push(B.listdiv);ctrl.dropWin=true}else{B.listdiv.style.display="none"}}}var formulaBuilder={listenMapping:new Object(),update:function(C,E){var G=this.listenMapping[C],B,A;if(!G){return }for(B=0;B0){G.push(D)}var L=new Array();for(C=0;C=65&&K<=90&&(I<65||I>90)){var F=B.split(".",2);if(F.length>1){L.push(F[0])}else{L.push(B)}}}return L},add:function(D,E,F){var C,B=this;var A=B._findChangeCellNames(F);for(C=0;Cy){continue}total+=parseFloat(value)}var temp=formula.replace(new RegExp(key+"\\.ACC","g"),total);formula=temp;formula=formula.replace(new RegExp(key,"gi"),formulaMap[key][y])}else{var total=0,count=0;for(var k in formulaMap[key]){count++;var value=formulaMap[key][k];if(!value||isNaN(value)){continue}total+=parseFloat(value)}formula=formula.replace(new RegExp(key+"\\.COUNT","gi"),count);formula=formula.replace(new RegExp(key,"gi"),total)}}if(print){}var result="";try{formula=formula.replace(new RegExp("--","gi"),"+");result=eval(formula);if(result==0){result="0"}}catch(e){}if(!result||result.length==0||isNaN(result)){return null}else{result=Math.round(result*100)/100;return result}}var ani_obj,ani_rx,ani_xy,ani_speed=10;function animate(D,E,C,B){ani_obj=D;ani_xy=B;if(!ani_obj.rx){var A=B?ani_obj.style.top:ani_obj.style.right;ani_obj.rx=parseInt(A.substring(0,A.length-2))}if(Math.abs(ani_obj.rx-E)<10){ani_rx=C}else{ani_rx=E}_animate()}function _animate(){if(!ani_obj||Math.abs(ani_obj.rx-ani_rx)==0){return }var A=ani_speed;if(A>Math.abs(ani_obj.rx-ani_rx)){if(A/4>Math.abs(ani_obj.rx-ani_rx)){A=Math.abs(ani_obj.rx-ani_rx)}else{if(A/2>Math.abs(ani_obj.rx-ani_rx)){A=A/4}else{A=A/2}}}if(A>Math.abs(ani_obj.rx-ani_rx)){A=Math.abs(ani_obj.rx-ani_rx)}if(ani_obj.rx>ani_rx){ani_obj.rx-=A}else{if(ani_obj.rxMath.abs(scrollAmount)){A=Math.abs(scrollAmount)}if(scrollAmount>0){$("nui_outer").scrollLeft+=A;scrollAmount-=A}else{if(scrollAmount<0){$("nui_outer").scrollLeft-=A;scrollAmount+=A}}if(scrollAmount==0){window.clearInterval(scrollTimer);nuiController._load();if(biffdata.formType=="2"){$("filterIcons").style.display="";$("bNewData").style.display="";$("bDeleteEntry").style.display="none";$("bEdit").style.display="none";$("bBack").style.display="none"}else{$("filterIcons").style.display="none";$("bNewData").style.display="none";if(owner){$("bDeleteEntry").style.display=""}$("bEdit").style.display="";$("bBack").style.display=""}if(scrollCallback){scrollCallback()}}else{window.setTimeout(_animateScroll,20)}}var nui=null,biffdata=null;var nuiController={NONE:0,LEFT:1,RIGHT:2,DOWN:3,UP:5,nuichain:new Array(),biffchain:new Array(),nui:$("nui"),load:function(C,A,E,F){var B=this;B.headerQS=C;B.dataQS=A;B.callBack=E;var D=B.nui.childNodes;B.ifNullResponse=false;switch(F){case B.LEFT:if(D.length>1){B.nuichain.pop();B.biffchain.pop();nui=B.nuichain[B.nuichain.length-1];biffdata=B.biffchain[B.biffchain.length-1];B.ifNullResponse=true}else{nui=new NUI();nui.init();biffdata=new BiffData();B.nuichain=[nui];B.biffchain=[biffdata];B.nui.insertBefore(nui.main,D[0]);$("nui_outer").scrollLeft=document.body.clientWidth}animateScroll(document.body.clientWidth*-1,function(){var G=nuiController;G.nui.removeChild(G.nui.childNodes[G.nui.childNodes.length-1]);adjustPrevNext();browse._trav(false)});break;case B.RIGHT:nui=new NUI();nui.init();biffdata=new BiffData();B.nuichain.push(nui);B.biffchain.push(biffdata);B.nui.appendChild(nui.main);animateScroll(document.body.clientWidth);break;default:if(!nui){nui=new NUI();nui.init();biffdata=new BiffData();B.nuichain.push(nui);B.biffchain.push(biffdata);B.nui.appendChild(nui.main)}else{biffdata.reset()}B._load();break}},_load:function(){if(ctrl.semaphore){return }ctrl.semaphore=true;formulaBuilder.listenMapping=new Object();var A=this;if(A.ifNullResponse){read(function(){ctrl.semaphore=false},"/sims/form_headers.jsp?a="+encodeURIComponent(ap)+"&p="+encodeURIComponent(path)+"&fn="+encodeURIComponent(sheet)+A.headerQS);return }if(!initDataLoaded){biffdata.loadHeader($("formHeaders").innerHTML.replace(/\r/g,"").replace(/&/g,"&"));biffdata.loadData($("formData").innerHTML.replace(/\r/g,"").replace(/&/g,"&"));if(nuiController.callBack){nuiController.callBack()}ctrl.semaphore=false;initDataLoaded=true}else{read(biffdata.loadHeader,"/sims/form_headers.jsp?a="+encodeURIComponent(ap)+"&p="+encodeURIComponent(path)+"&fn="+encodeURIComponent(sheet)+A.headerQS,true);read(function(B){biffdata.loadData(B);if(nuiController.callBack){nuiController.callBack()}ctrl.semaphore=false},"/sims/form_update.jsp?a="+encodeURIComponent(ap)+"&p="+encodeURIComponent(path)+"&fn="+encodeURIComponent(sheet)+A.dataQS)}},resetBrowseLeft:function(){var B=this,C=B.nui,A;try{var E=true;for(A=C.childNodes.length-1;A>=0;A--){if(C.childNodes[A].nodeType!=1){continue}if(E){E=false;continue}else{B.nui.removeChild(C.childNodes[A])}}for(A=0;A0){$("nui_outer").scrollLeft=(B.nuichain.length-1)*B.nuichain[0].main.offsetWidth}}};var chart=new Chart();function Chart(){}Chart.prototype.trigger=function(A){if(this.on){this.on=false}else{if(!this.ready){$("chartMain").style.display="";$("charts").style.right=$("chartMain").clientWidth*-1;this.prepareOptions();this.loadChart();this.ready=true}this.on=true}ani_speed=120;animate(A.parentNode,-1*A.nextSibling.offsetWidth,0)};Chart.prototype.prepareOptions=function(){this.linkDomains=$("linkDomains"),i,_biffs=biffdata.biffs;for(i=0;i<_biffs.length;i++){var A=_biffs[i];if(i==0){this.rootDomainId=A.domainId}if(A.dataType==1&&A.IPType=="L"){var B=node("option");B.innerHTML=A.value;B.value=A.domainId;linkDomains.appendChild(B)}}};Chart.prototype.loadChart=function(){var A=this,B=$("theChart");if(!A.linkDomains||A.linkDomains.options.length==0){B.innerHTML='

No chart available.

';return }B.innerHTML=''}; var lm=new Object(); lm['away']="Are you sure you want to navigate away from this page?"; lm['AutoGen']="Auto Generate"; lm['tutorial1']=" ? "; lm['tutorial2']=" ? "; lm['tutorial3']=" ? "; lm['tutorial4']=" ? "; lm['checkRegistered']=" ? "; lm['myPrivMsg0']="You don't have any access to this form."; lm['myPrivMsg1']="You can create and view your own entries."; lm['myPrivMsg2']="You can view all entries."; lm['myPrivMsg3']="You can create entries, and view all entries."; lm['myPrivMsg6']="You can create, modify, delete all entries."; lm['browseMode']="Browsing Mode - Click on the Edit Data button to modify data on the form below."; lm['editMode']="Editing Mode - Edit the data like any spreadsheet, click Save when you're done, click Back Browse if you would like to discard changes."; lm['builderMode']="Design Mode - You can change the design of the form for users to enter different data."; lm['motd']="Oh! I see you're using the Internet Explorer(IE). We recommend that you use the fast and secure Firefox browser. Ragic runs 3 to 5 times quicker in Firefox than IE!

Click here to install Firefox"; lm['tt_noShow']="Don't show the tooltips in the future?"; lm['tt_bNewData']="Click here to create a new entry!"; lm['tt_bEdit']="Click here to modify the entry!"; lm['tt_bNextPage']="Click here to see the next page of entries!"; lm['tt_bDesign']="Click here to enter design mode!"; lm['tt_bBack']="Click here to see listing of entries"; lm['tt_bBrowse']="Click here to exit without saving"; lm['tt_filter']="Click to query for the entries you want"; var theme='webby'; var setBorderClass=__setBorderClasswebby;